From 62bc0b42f11c530aaae6b6079df426cb0b9513c6 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Fri, 29 Sep 2017 10:06:13 +0900 Subject: Imported Upstream version 2.53.1 Change-Id: Ib0e6300c6063e8d638e99eb22b58ddebf7768e79 Signed-off-by: DongHun Kwak --- docs/reference/.gitignore | 16 + docs/reference/Makefile.in | 755 -- docs/reference/gio/.gitignore | 3 + docs/reference/gio/Makefile.in | 1134 -- docs/reference/gio/gapplication.1 | 293 - docs/reference/gio/gdbus-codegen.1 | 780 -- docs/reference/gio/gdbus.1 | 324 - docs/reference/gio/gdbus.xml | 55 + docs/reference/gio/gio-overrides.txt | 0 docs/reference/gio/gio-querymodules.1 | 44 - docs/reference/gio/gio-sections.txt | 6 + docs/reference/gio/gio.1 | 583 -- docs/reference/gio/gio.types | 2 + docs/reference/gio/glib-compile-resources.1 | 193 - docs/reference/gio/glib-compile-schemas.1 | 101 - docs/reference/gio/gresource.1 | 95 - docs/reference/gio/gsettings.1 | 175 - docs/reference/gio/gvfs-overview.odg | Bin 0 -> 17772 bytes docs/reference/gio/html/GAction.html | 822 -- docs/reference/gio/html/GActionGroup.html | 1234 --- docs/reference/gio/html/GActionMap.html | 503 - docs/reference/gio/html/GAppInfo.html | 2310 ----- docs/reference/gio/html/GAppInfoMonitor.html | 147 - docs/reference/gio/html/GApplication.html | 2616 ----- .../gio/html/GApplicationCommandLine.html | 1052 -- docs/reference/gio/html/GAsyncInitable.html | 762 -- docs/reference/gio/html/GAsyncResult.html | 503 - docs/reference/gio/html/GBufferedInputStream.html | 696 -- docs/reference/gio/html/GBufferedOutputStream.html | 388 - docs/reference/gio/html/GBytesIcon.html | 201 - docs/reference/gio/html/GCancellable.html | 857 -- docs/reference/gio/html/GCharsetConverter.html | 313 - docs/reference/gio/html/GConverter.html | 461 - docs/reference/gio/html/GCredentials.html | 557 - docs/reference/gio/html/GDBusActionGroup.html | 162 - docs/reference/gio/html/GDBusAuthObserver.html | 384 - docs/reference/gio/html/GDBusConnection.html | 4774 --------- docs/reference/gio/html/GDBusInterface.html | 330 - .../reference/gio/html/GDBusInterfaceSkeleton.html | 869 -- docs/reference/gio/html/GDBusMenuModel.html | 153 - docs/reference/gio/html/GDBusMessage.html | 2469 ----- docs/reference/gio/html/GDBusMethodInvocation.html | 972 -- docs/reference/gio/html/GDBusObject.html | 403 - docs/reference/gio/html/GDBusObjectManager.html | 592 -- .../gio/html/GDBusObjectManagerClient.html | 1270 --- .../gio/html/GDBusObjectManagerServer.html | 504 - docs/reference/gio/html/GDBusObjectProxy.html | 254 - docs/reference/gio/html/GDBusObjectSkeleton.html | 481 - docs/reference/gio/html/GDBusProxy.html | 2151 ---- docs/reference/gio/html/GDBusServer.html | 627 -- docs/reference/gio/html/GDataInputStream.html | 1584 --- docs/reference/gio/html/GDataOutputStream.html | 688 -- docs/reference/gio/html/GDatagramBased.html | 762 -- docs/reference/gio/html/GDrive.html | 1892 ---- docs/reference/gio/html/GDtlsClientConnection.html | 464 - docs/reference/gio/html/GDtlsConnection.html | 1521 --- docs/reference/gio/html/GDtlsServerConnection.html | 204 - docs/reference/gio/html/GEmblem.html | 351 - docs/reference/gio/html/GEmblemedIcon.html | 324 - docs/reference/gio/html/GFile.html | 9658 ----------------- docs/reference/gio/html/GFileDescriptorBased.html | 176 - docs/reference/gio/html/GFileEnumerator.html | 824 -- docs/reference/gio/html/GFileIOStream.html | 350 - docs/reference/gio/html/GFileIcon.html | 199 - docs/reference/gio/html/GFileInfo.html | 4274 -------- docs/reference/gio/html/GFileInputStream.html | 292 - docs/reference/gio/html/GFileMonitor.html | 514 - docs/reference/gio/html/GFileOutputStream.html | 343 - docs/reference/gio/html/GFilenameCompleter.html | 284 - docs/reference/gio/html/GFilterInputStream.html | 247 - docs/reference/gio/html/GFilterOutputStream.html | 249 - docs/reference/gio/html/GIOModule.html | 594 -- docs/reference/gio/html/GIOStream.html | 785 -- docs/reference/gio/html/GIcon.html | 471 - docs/reference/gio/html/GInetAddress.html | 1029 -- docs/reference/gio/html/GInetAddressMask.html | 501 - docs/reference/gio/html/GInetSocketAddress.html | 413 - docs/reference/gio/html/GInitable.html | 446 - docs/reference/gio/html/GInputStream.html | 1300 --- docs/reference/gio/html/GListModel.html | 526 - docs/reference/gio/html/GListStore.html | 535 - docs/reference/gio/html/GLoadableIcon.html | 348 - docs/reference/gio/html/GMemoryInputStream.html | 304 - docs/reference/gio/html/GMemoryOutputStream.html | 577 -- docs/reference/gio/html/GMenu.html | 1870 ---- docs/reference/gio/html/GMenuModel.html | 1208 --- docs/reference/gio/html/GMount.html | 1912 ---- docs/reference/gio/html/GMountOperation.html | 1187 --- docs/reference/gio/html/GNetworkAddress.html | 501 - docs/reference/gio/html/GNetworkMonitor.html | 719 -- docs/reference/gio/html/GNetworkService.html | 416 - docs/reference/gio/html/GNotification.html | 780 -- docs/reference/gio/html/GOutputStream.html | 1701 --- docs/reference/gio/html/GPermission.html | 664 -- docs/reference/gio/html/GPollableInputStream.html | 402 - docs/reference/gio/html/GPollableOutputStream.html | 402 - docs/reference/gio/html/GPropertyAction.html | 331 - docs/reference/gio/html/GProxy.html | 448 - docs/reference/gio/html/GProxyAddress.html | 573 -- docs/reference/gio/html/GProxyResolver.html | 428 - docs/reference/gio/html/GRemoteActionGroup.html | 286 - docs/reference/gio/html/GResolver.html | 1247 --- docs/reference/gio/html/GResource.html | 1196 --- docs/reference/gio/html/GSeekable.html | 430 - docs/reference/gio/html/GSettings.html | 3846 ------- docs/reference/gio/html/GSettingsBackend.html | 815 -- docs/reference/gio/html/GSimpleAction.html | 580 -- docs/reference/gio/html/GSimpleActionGroup.html | 317 - docs/reference/gio/html/GSimpleAsyncResult.html | 1730 ---- docs/reference/gio/html/GSimpleIOStream.html | 187 - docs/reference/gio/html/GSimplePermission.html | 127 - docs/reference/gio/html/GSimpleProxyResolver.html | 373 - docs/reference/gio/html/GSocket.html | 4069 -------- docs/reference/gio/html/GSocketAddress.html | 369 - docs/reference/gio/html/GSocketClient.html | 2070 ---- docs/reference/gio/html/GSocketConnectable.html | 664 -- docs/reference/gio/html/GSocketConnection.html | 626 -- docs/reference/gio/html/GSocketControlMessage.html | 326 - docs/reference/gio/html/GSocketListener.html | 986 -- docs/reference/gio/html/GSocketService.html | 360 - docs/reference/gio/html/GSrvTarget.html | 418 - docs/reference/gio/html/GSubprocess.html | 1587 --- docs/reference/gio/html/GSubprocessLauncher.html | 960 -- docs/reference/gio/html/GTask.html | 2636 ----- docs/reference/gio/html/GTcpConnection.html | 207 - docs/reference/gio/html/GTcpWrapperConnection.html | 211 - docs/reference/gio/html/GTestDBus.html | 506 - docs/reference/gio/html/GThemedIcon.html | 463 - .../reference/gio/html/GThreadedSocketService.html | 238 - docs/reference/gio/html/GTlsBackend.html | 554 - docs/reference/gio/html/GTlsCertificate.html | 614 -- docs/reference/gio/html/GTlsClientConnection.html | 629 -- docs/reference/gio/html/GTlsConnection.html | 1292 --- docs/reference/gio/html/GTlsDatabase.html | 1309 --- docs/reference/gio/html/GTlsFileDatabase.html | 203 - docs/reference/gio/html/GTlsInteraction.html | 836 -- docs/reference/gio/html/GTlsPassword.html | 684 -- docs/reference/gio/html/GTlsServerConnection.html | 209 - docs/reference/gio/html/GUnixConnection.html | 550 - .../gio/html/GUnixCredentialsMessage.html | 264 - docs/reference/gio/html/GUnixFDList.html | 451 - docs/reference/gio/html/GUnixFDMessage.html | 347 - docs/reference/gio/html/GUnixInputStream.html | 310 - docs/reference/gio/html/GUnixOutputStream.html | 310 - docs/reference/gio/html/GUnixSocketAddress.html | 608 -- docs/reference/gio/html/GVfs.html | 578 -- docs/reference/gio/html/GVolume.html | 1375 --- docs/reference/gio/html/GVolumeMonitor.html | 925 -- docs/reference/gio/html/GZlibCompressor.html | 328 - docs/reference/gio/html/GZlibDecompressor.html | 218 - docs/reference/gio/html/annotation-glossary.html | 93 - docs/reference/gio/html/api-index-full.html | 10275 ------------------- docs/reference/gio/html/application.html | 79 - docs/reference/gio/html/async.html | 47 - docs/reference/gio/html/ch01.html | 231 - docs/reference/gio/html/ch02.html | 161 - docs/reference/gio/html/ch03.html | 44 - docs/reference/gio/html/ch32.html | 74 - docs/reference/gio/html/ch33.html | 216 - docs/reference/gio/html/ch33s02.html | 40 - docs/reference/gio/html/ch33s03.html | 38 - docs/reference/gio/html/ch34.html | 55 - docs/reference/gio/html/ch34s02.html | 58 - docs/reference/gio/html/ch34s03.html | 158 - docs/reference/gio/html/ch34s04.html | 45 - docs/reference/gio/html/ch34s05.html | 47 - docs/reference/gio/html/ch34s06.html | 277 - docs/reference/gio/html/ch34s07.html | 159 - docs/reference/gio/html/ch35.html | 94 - docs/reference/gio/html/ch35s02.html | 141 - docs/reference/gio/html/ch35s03.html | 201 - docs/reference/gio/html/ch35s04.html | 96 - docs/reference/gio/html/conversion.html | 43 - docs/reference/gio/html/data-models.html | 37 - docs/reference/gio/html/extending-gio.html | 130 - docs/reference/gio/html/extending.html | 40 - .../gio/html/failable_initialization.html | 37 - docs/reference/gio/html/file_mon.html | 32 - docs/reference/gio/html/file_ops.html | 49 - docs/reference/gio/html/gapplication-tool.html | 287 - docs/reference/gio/html/gdbus-codegen.html | 1122 -- docs/reference/gio/html/gdbus-convenience.html | 64 - .../gio/html/gdbus-example-gdbus-codegen.html | 89 - docs/reference/gio/html/gdbus-lowlevel.html | 58 - docs/reference/gio/html/gdbus.html | 299 - docs/reference/gio/html/gio-D-Bus-Addresses.html | 441 - .../gio/html/gio-D-Bus-Introspection-Data.html | 1562 --- docs/reference/gio/html/gio-D-Bus-Utilities.html | 390 - .../gio/html/gio-Desktop-file-based-GAppInfo.html | 1190 --- docs/reference/gio/html/gio-Extension-Points.html | 612 -- .../gio/html/gio-GActionGroup-exporter.html | 190 - docs/reference/gio/html/gio-GContentType.html | 640 -- .../gio/html/gio-GConverterInputstream.html | 212 - .../gio/html/gio-GConverterOutputstream.html | 212 - docs/reference/gio/html/gio-GDBusError.html | 1098 -- docs/reference/gio/html/gio-GFileAttribute.html | 652 -- docs/reference/gio/html/gio-GIOError.html | 561 - docs/reference/gio/html/gio-GIOScheduler.html | 362 - .../gio/html/gio-GMenuModel-exporter.html | 181 - .../gio-GSettingsSchema-GSettingsSchemaSource.html | 1276 --- docs/reference/gio/html/gio-GWin32InputStream.html | 254 - .../reference/gio/html/gio-GWin32OutputStream.html | 255 - docs/reference/gio/html/gio-GWin32RegistryKey.html | 2066 ---- docs/reference/gio/html/gio-Owning-Bus-Names.html | 653 -- docs/reference/gio/html/gio-TLS-Overview.html | 310 - docs/reference/gio/html/gio-Unix-Mounts.html | 1419 --- .../reference/gio/html/gio-Watching-Bus-Names.html | 570 - docs/reference/gio/html/gio-gnetworking.h.html | 93 - docs/reference/gio/html/gio-gpollableutils.html | 470 - docs/reference/gio/html/gio-hierarchy.html | 190 - docs/reference/gio/html/gio-querymodules.html | 52 - docs/reference/gio/html/gio.devhelp2 | 3671 ------- docs/reference/gio/html/gio.html | 664 -- .../reference/gio/html/glib-compile-resources.html | 235 - docs/reference/gio/html/glib-compile-schemas.html | 123 - docs/reference/gio/html/gresource-tool.html | 110 - docs/reference/gio/html/gsettings-tool.html | 184 - docs/reference/gio/html/gvfs-overview.png | Bin 48474 -> 0 bytes docs/reference/gio/html/highlevel-socket.html | 59 - docs/reference/gio/html/home.png | Bin 256 -> 0 bytes docs/reference/gio/html/icons.html | 52 - docs/reference/gio/html/index.html | 641 -- docs/reference/gio/html/left-insensitive.png | Bin 395 -> 0 bytes docs/reference/gio/html/left.png | Bin 262 -> 0 bytes docs/reference/gio/html/menu-example.png | Bin 31470 -> 0 bytes docs/reference/gio/html/menu-model.png | Bin 20647 -> 0 bytes docs/reference/gio/html/migrating.html | 60 - docs/reference/gio/html/networking.html | 77 - docs/reference/gio/html/permissions.html | 38 - docs/reference/gio/html/pt01.html | 39 - docs/reference/gio/html/pt02.html | 602 -- docs/reference/gio/html/registry.html | 32 - docs/reference/gio/html/resolver.html | 52 - docs/reference/gio/html/resources.html | 32 - docs/reference/gio/html/right-insensitive.png | Bin 373 -> 0 bytes docs/reference/gio/html/right.png | Bin 261 -> 0 bytes docs/reference/gio/html/running-gio-apps.html | 189 - docs/reference/gio/html/settings.html | 41 - docs/reference/gio/html/streaming.html | 109 - docs/reference/gio/html/style.css | 479 - docs/reference/gio/html/subprocesses.html | 37 - docs/reference/gio/html/testing.html | 32 - docs/reference/gio/html/tls.html | 70 - docs/reference/gio/html/tools.html | 58 - docs/reference/gio/html/types.html | 43 - docs/reference/gio/html/up-insensitive.png | Bin 374 -> 0 bytes docs/reference/gio/html/up.png | Bin 260 -> 0 bytes docs/reference/gio/html/utils.html | 32 - docs/reference/gio/html/volume_mon.html | 46 - docs/reference/gio/version.xml | 1 - docs/reference/glib/Makefile.in | 1071 -- docs/reference/glib/glib-gettextize.1 | 79 - docs/reference/glib/gtester-report.1 | 57 - docs/reference/glib/gtester.1 | 141 - .../Sorted_binary_tree_breadth-first_traversal.svg | 134 - .../glib/html/Sorted_binary_tree_inorder.svg | 753 -- .../glib/html/Sorted_binary_tree_postorder.svg | 750 -- .../glib/html/Sorted_binary_tree_preorder.svg | 750 -- docs/reference/glib/html/annotation-glossary.html | 98 - docs/reference/glib/html/api-index-full.html | 9249 ----------------- docs/reference/glib/html/deprecated.html | 46 - docs/reference/glib/html/file-name-encodings.png | Bin 32141 -> 0 bytes docs/reference/glib/html/glib-Arrays.html | 1113 -- .../glib/html/glib-Asynchronous-Queues.html | 1412 --- .../glib/html/glib-Atomic-Operations.html | 930 -- .../html/glib-Automatic-String-Completion.html | 610 -- .../glib/html/glib-Balanced-Binary-Trees.html | 945 -- docs/reference/glib/html/glib-Base64-Encoding.html | 438 - docs/reference/glib/html/glib-Basic-Types.html | 1176 --- .../glib/html/glib-Bookmark-file-parser.html | 2418 ----- .../glib-Bounds-checked-integer-arithmetic.html | 384 - docs/reference/glib/html/glib-Byte-Arrays.html | 1499 --- .../glib/html/glib-Byte-Order-Macros.html | 2092 ---- docs/reference/glib/html/glib-Caches.html | 535 - .../glib/html/glib-Character-Set-Conversion.html | 1287 --- .../glib/html/glib-Commandline-option-parser.html | 2320 ----- docs/reference/glib/html/glib-Data-Checksums.html | 645 -- docs/reference/glib/html/glib-Data-HMACs.html | 597 -- docs/reference/glib/html/glib-Datasets.html | 658 -- .../glib/html/glib-Date-and-Time-Functions.html | 2775 ----- .../glib/html/glib-Deprecated-Thread-APIs.html | 2086 ---- .../glib/html/glib-Double-ended-Queues.html | 1841 ---- .../glib/html/glib-Doubly-Linked-Lists.html | 1921 ---- .../glib/html/glib-Dynamic-Loading-of-Modules.html | 660 -- docs/reference/glib/html/glib-Error-Reporting.html | 1250 --- docs/reference/glib/html/glib-File-Utilities.html | 2515 ----- docs/reference/glib/html/glib-GDateTime.html | 2385 ----- docs/reference/glib/html/glib-GTimeZone.html | 654 -- docs/reference/glib/html/glib-GUuid.html | 134 - docs/reference/glib/html/glib-GVariant.html | 7092 ------------- docs/reference/glib/html/glib-GVariantType.html | 1831 ---- .../html/glib-Glob-style-pattern-matching.html | 367 - docs/reference/glib/html/glib-Hash-Tables.html | 2260 ---- docs/reference/glib/html/glib-Hook-Functions.html | 1797 ---- .../glib/html/glib-Hostname-Utilities.html | 281 - docs/reference/glib/html/glib-I18N.html | 815 -- docs/reference/glib/html/glib-IO-Channels.html | 2627 ----- .../glib/html/glib-Key-value-file-parser.html | 3532 ------- .../reference/glib/html/glib-Keyed-Data-Lists.html | 999 -- docs/reference/glib/html/glib-Lexical-Scanner.html | 1992 ---- .../glib/html/glib-Memory-Allocation.html | 1473 --- docs/reference/glib/html/glib-Memory-Slices.html | 652 -- docs/reference/glib/html/glib-Message-Logging.html | 2018 ---- .../glib/html/glib-Miscellaneous-Macros.html | 1633 --- .../html/glib-Miscellaneous-Utility-Functions.html | 2254 ---- docs/reference/glib/html/glib-N-ary-Trees.html | 1961 ---- .../glib/html/glib-Numerical-Definitions.html | 232 - .../glib-Perl-compatible-regular-expressions.html | 3523 ------- docs/reference/glib/html/glib-Pointer-Arrays.html | 1046 -- docs/reference/glib/html/glib-Quarks.html | 371 - docs/reference/glib/html/glib-Random-Numbers.html | 760 -- .../glib/html/glib-Relations-and-Tuples.html | 653 -- docs/reference/glib/html/glib-Sequences.html | 2068 ---- .../glib/html/glib-Shell-related-Utilities.html | 298 - .../glib/html/glib-Simple-XML-Subset-Parser.html | 1478 --- .../glib/html/glib-Singly-Linked-Lists.html | 1535 --- .../glib/html/glib-Spawning-Processes.html | 1153 --- docs/reference/glib/html/glib-Standard-Macros.html | 585 -- docs/reference/glib/html/glib-String-Chunks.html | 369 - .../glib/html/glib-String-Utility-Functions.html | 4060 -------- docs/reference/glib/html/glib-Strings.html | 1791 ---- docs/reference/glib/html/glib-Testing.html | 3335 ------ .../glib/html/glib-The-Main-Event-Loop.html | 5122 --------- docs/reference/glib/html/glib-Thread-Pools.html | 808 -- docs/reference/glib/html/glib-Threads.html | 3323 ------ docs/reference/glib/html/glib-Timers.html | 316 - docs/reference/glib/html/glib-Trash-Stacks.html | 272 - .../glib/html/glib-Type-Conversion-Macros.html | 308 - ...ib-UNIX-specific-utilities-and-integration.html | 616 -- docs/reference/glib/html/glib-URI-Functions.html | 502 - .../glib/html/glib-Unicode-Manipulation.html | 5090 --------- .../glib/html/glib-Version-Information.html | 532 - .../glib/html/glib-Warnings-and-Assertions.html | 584 -- .../html/glib-Windows-Compatibility-Functions.html | 699 -- docs/reference/glib/html/glib-building.html | 437 - docs/reference/glib/html/glib-changes.html | 152 - docs/reference/glib/html/glib-compiling.html | 144 - docs/reference/glib/html/glib-core.html | 66 - docs/reference/glib/html/glib-cross-compiling.html | 164 - docs/reference/glib/html/glib-data-types.html | 99 - docs/reference/glib/html/glib-fundamentals.html | 59 - docs/reference/glib/html/glib-gettextize.html | 95 - docs/reference/glib/html/glib-programming.html | 75 - docs/reference/glib/html/glib-regex-syntax.html | 2216 ---- docs/reference/glib/html/glib-resources.html | 123 - docs/reference/glib/html/glib-running.html | 295 - docs/reference/glib/html/glib-utilities.html | 128 - docs/reference/glib/html/glib.devhelp2 | 3193 ------ docs/reference/glib/html/glib.html | 71 - docs/reference/glib/html/gtester-report.html | 80 - docs/reference/glib/html/gtester.html | 186 - .../glib/html/gvariant-format-strings.html | 1338 --- docs/reference/glib/html/gvariant-text.html | 666 -- docs/reference/glib/html/home.png | Bin 256 -> 0 bytes docs/reference/glib/html/index.html | 340 - docs/reference/glib/html/left-insensitive.png | Bin 395 -> 0 bytes docs/reference/glib/html/left.png | Bin 262 -> 0 bytes docs/reference/glib/html/mainloop-states.gif | Bin 7088 -> 0 bytes docs/reference/glib/html/right-insensitive.png | Bin 373 -> 0 bytes docs/reference/glib/html/right.png | Bin 261 -> 0 bytes docs/reference/glib/html/style.css | 479 - docs/reference/glib/html/tools.html | 40 - docs/reference/glib/html/up-insensitive.png | Bin 374 -> 0 bytes docs/reference/glib/html/up.png | Bin 260 -> 0 bytes docs/reference/glib/version.xml | 1 - docs/reference/gobject/Makefile.in | 1030 -- docs/reference/gobject/glib-genmarshal.1 | 340 - docs/reference/gobject/glib-mkenums.1 | 229 - docs/reference/gobject/gobject-query.1 | 90 - docs/reference/gobject/gobject-sections.txt | 5 + docs/reference/gobject/html/GBinding.html | 976 -- docs/reference/gobject/html/GTypeModule.html | 838 -- docs/reference/gobject/html/GTypePlugin.html | 557 - .../gobject/html/annotation-glossary.html | 89 - docs/reference/gobject/html/api-index-full.html | 3030 ------ docs/reference/gobject/html/ch01s02.html | 161 - docs/reference/gobject/html/chapter-gobject.html | 321 - docs/reference/gobject/html/chapter-gtype.html | 316 - docs/reference/gobject/html/chapter-intro.html | 100 - docs/reference/gobject/html/chapter-signal.html | 253 - docs/reference/gobject/html/glib-genmarshal.html | 424 - docs/reference/gobject/html/glib-mkenums.html | 381 - docs/reference/gobject/html/glue.png | Bin 12722 -> 0 bytes .../gobject/html/gobject-Boxed-Types.html | 690 -- docs/reference/gobject/html/gobject-Closures.html | 5125 --------- .../html/gobject-Enumeration-and-Flag-Types.html | 1130 -- .../reference/gobject/html/gobject-GParamSpec.html | 1991 ---- .../gobject/html/gobject-Generic-values.html | 1089 -- docs/reference/gobject/html/gobject-Signals.html | 3440 ------- ...gobject-Standard-Parameter-and-Value-Types.html | 7096 ------------- .../gobject/html/gobject-The-Base-Object-Type.html | 4225 -------- .../gobject/html/gobject-Type-Information.html | 6495 ------------ .../gobject/html/gobject-Value-arrays.html | 642 -- .../html/gobject-Varargs-Value-Collection.html | 333 - docs/reference/gobject/html/gobject-memory.html | 208 - .../reference/gobject/html/gobject-properties.html | 406 - docs/reference/gobject/html/gobject-query.html | 127 - docs/reference/gobject/html/gobject.devhelp2 | 1032 -- docs/reference/gobject/html/gtype-conventions.html | 173 - .../gobject/html/gtype-instantiable-classed.html | 412 - .../html/gtype-non-instantiable-classed.html | 564 - .../gobject/html/gtype-non-instantiable.html | 107 - docs/reference/gobject/html/home.png | Bin 256 -> 0 bytes .../gobject/html/howto-gobject-chainup.html | 118 - .../reference/gobject/html/howto-gobject-code.html | 170 - .../gobject/html/howto-gobject-construction.html | 214 - .../gobject/html/howto-gobject-destruction.html | 189 - .../gobject/html/howto-gobject-methods.html | 543 - docs/reference/gobject/html/howto-gobject.html | 286 - .../gobject/html/howto-interface-implement.html | 164 - .../gobject/html/howto-interface-override.html | 227 - .../gobject/html/howto-interface-prerequisite.html | 222 - .../gobject/html/howto-interface-properties.html | 235 - docs/reference/gobject/html/howto-interface.html | 278 - docs/reference/gobject/html/howto-signals.html | 175 - docs/reference/gobject/html/index.html | 180 - docs/reference/gobject/html/left-insensitive.png | Bin 395 -> 0 bytes docs/reference/gobject/html/left.png | Bin 262 -> 0 bytes docs/reference/gobject/html/pr01.html | 71 - docs/reference/gobject/html/pt01.html | 79 - docs/reference/gobject/html/pt02.html | 66 - docs/reference/gobject/html/pt03.html | 54 - docs/reference/gobject/html/right-insensitive.png | Bin 373 -> 0 bytes docs/reference/gobject/html/right.png | Bin 261 -> 0 bytes docs/reference/gobject/html/rn01.html | 84 - docs/reference/gobject/html/rn02.html | 46 - docs/reference/gobject/html/signal.html | 372 - docs/reference/gobject/html/style.css | 479 - docs/reference/gobject/html/tools-ginspector.html | 34 - docs/reference/gobject/html/tools-gob.html | 39 - docs/reference/gobject/html/tools-gtkdoc.html | 82 - docs/reference/gobject/html/tools-refdb.html | 47 - docs/reference/gobject/html/tools-vala.html | 42 - docs/reference/gobject/html/up-insensitive.png | Bin 374 -> 0 bytes docs/reference/gobject/html/up.png | Bin 260 -> 0 bytes docs/reference/gobject/tmpl/.gitignore | 15 + docs/reference/gobject/tut_gtype.xml | 4 +- docs/reference/gobject/tut_howto.xml | 4 +- docs/reference/gobject/version.xml | 1 - 439 files changed, 106 insertions(+), 342713 deletions(-) create mode 100644 docs/reference/.gitignore delete mode 100644 docs/reference/Makefile.in create mode 100644 docs/reference/gio/.gitignore delete mode 100644 docs/reference/gio/Makefile.in delete mode 100644 docs/reference/gio/gapplication.1 delete mode 100644 docs/reference/gio/gdbus-codegen.1 delete mode 100644 docs/reference/gio/gdbus.1 delete mode 100644 docs/reference/gio/gio-overrides.txt delete mode 100644 docs/reference/gio/gio-querymodules.1 delete mode 100644 docs/reference/gio/gio.1 delete mode 100644 docs/reference/gio/glib-compile-resources.1 delete mode 100644 docs/reference/gio/glib-compile-schemas.1 delete mode 100644 docs/reference/gio/gresource.1 delete mode 100644 docs/reference/gio/gsettings.1 create mode 100644 docs/reference/gio/gvfs-overview.odg delete mode 100644 docs/reference/gio/html/GAction.html delete mode 100644 docs/reference/gio/html/GActionGroup.html delete mode 100644 docs/reference/gio/html/GActionMap.html delete mode 100644 docs/reference/gio/html/GAppInfo.html delete mode 100644 docs/reference/gio/html/GAppInfoMonitor.html delete mode 100644 docs/reference/gio/html/GApplication.html delete mode 100644 docs/reference/gio/html/GApplicationCommandLine.html delete mode 100644 docs/reference/gio/html/GAsyncInitable.html delete mode 100644 docs/reference/gio/html/GAsyncResult.html delete mode 100644 docs/reference/gio/html/GBufferedInputStream.html delete mode 100644 docs/reference/gio/html/GBufferedOutputStream.html delete mode 100644 docs/reference/gio/html/GBytesIcon.html delete mode 100644 docs/reference/gio/html/GCancellable.html delete mode 100644 docs/reference/gio/html/GCharsetConverter.html delete mode 100644 docs/reference/gio/html/GConverter.html delete mode 100644 docs/reference/gio/html/GCredentials.html delete mode 100644 docs/reference/gio/html/GDBusActionGroup.html delete mode 100644 docs/reference/gio/html/GDBusAuthObserver.html delete mode 100644 docs/reference/gio/html/GDBusConnection.html delete mode 100644 docs/reference/gio/html/GDBusInterface.html delete mode 100644 docs/reference/gio/html/GDBusInterfaceSkeleton.html delete mode 100644 docs/reference/gio/html/GDBusMenuModel.html delete mode 100644 docs/reference/gio/html/GDBusMessage.html delete mode 100644 docs/reference/gio/html/GDBusMethodInvocation.html delete mode 100644 docs/reference/gio/html/GDBusObject.html delete mode 100644 docs/reference/gio/html/GDBusObjectManager.html delete mode 100644 docs/reference/gio/html/GDBusObjectManagerClient.html delete mode 100644 docs/reference/gio/html/GDBusObjectManagerServer.html delete mode 100644 docs/reference/gio/html/GDBusObjectProxy.html delete mode 100644 docs/reference/gio/html/GDBusObjectSkeleton.html delete mode 100644 docs/reference/gio/html/GDBusProxy.html delete mode 100644 docs/reference/gio/html/GDBusServer.html delete mode 100644 docs/reference/gio/html/GDataInputStream.html delete mode 100644 docs/reference/gio/html/GDataOutputStream.html delete mode 100644 docs/reference/gio/html/GDatagramBased.html delete mode 100644 docs/reference/gio/html/GDrive.html delete mode 100644 docs/reference/gio/html/GDtlsClientConnection.html delete mode 100644 docs/reference/gio/html/GDtlsConnection.html delete mode 100644 docs/reference/gio/html/GDtlsServerConnection.html delete mode 100644 docs/reference/gio/html/GEmblem.html delete mode 100644 docs/reference/gio/html/GEmblemedIcon.html delete mode 100644 docs/reference/gio/html/GFile.html delete mode 100644 docs/reference/gio/html/GFileDescriptorBased.html delete mode 100644 docs/reference/gio/html/GFileEnumerator.html delete mode 100644 docs/reference/gio/html/GFileIOStream.html delete mode 100644 docs/reference/gio/html/GFileIcon.html delete mode 100644 docs/reference/gio/html/GFileInfo.html delete mode 100644 docs/reference/gio/html/GFileInputStream.html delete mode 100644 docs/reference/gio/html/GFileMonitor.html delete mode 100644 docs/reference/gio/html/GFileOutputStream.html delete mode 100644 docs/reference/gio/html/GFilenameCompleter.html delete mode 100644 docs/reference/gio/html/GFilterInputStream.html delete mode 100644 docs/reference/gio/html/GFilterOutputStream.html delete mode 100644 docs/reference/gio/html/GIOModule.html delete mode 100644 docs/reference/gio/html/GIOStream.html delete mode 100644 docs/reference/gio/html/GIcon.html delete mode 100644 docs/reference/gio/html/GInetAddress.html delete mode 100644 docs/reference/gio/html/GInetAddressMask.html delete mode 100644 docs/reference/gio/html/GInetSocketAddress.html delete mode 100644 docs/reference/gio/html/GInitable.html delete mode 100644 docs/reference/gio/html/GInputStream.html delete mode 100644 docs/reference/gio/html/GListModel.html delete mode 100644 docs/reference/gio/html/GListStore.html delete mode 100644 docs/reference/gio/html/GLoadableIcon.html delete mode 100644 docs/reference/gio/html/GMemoryInputStream.html delete mode 100644 docs/reference/gio/html/GMemoryOutputStream.html delete mode 100644 docs/reference/gio/html/GMenu.html delete mode 100644 docs/reference/gio/html/GMenuModel.html delete mode 100644 docs/reference/gio/html/GMount.html delete mode 100644 docs/reference/gio/html/GMountOperation.html delete mode 100644 docs/reference/gio/html/GNetworkAddress.html delete mode 100644 docs/reference/gio/html/GNetworkMonitor.html delete mode 100644 docs/reference/gio/html/GNetworkService.html delete mode 100644 docs/reference/gio/html/GNotification.html delete mode 100644 docs/reference/gio/html/GOutputStream.html delete mode 100644 docs/reference/gio/html/GPermission.html delete mode 100644 docs/reference/gio/html/GPollableInputStream.html delete mode 100644 docs/reference/gio/html/GPollableOutputStream.html delete mode 100644 docs/reference/gio/html/GPropertyAction.html delete mode 100644 docs/reference/gio/html/GProxy.html delete mode 100644 docs/reference/gio/html/GProxyAddress.html delete mode 100644 docs/reference/gio/html/GProxyResolver.html delete mode 100644 docs/reference/gio/html/GRemoteActionGroup.html delete mode 100644 docs/reference/gio/html/GResolver.html delete mode 100644 docs/reference/gio/html/GResource.html delete mode 100644 docs/reference/gio/html/GSeekable.html delete mode 100644 docs/reference/gio/html/GSettings.html delete mode 100644 docs/reference/gio/html/GSettingsBackend.html delete mode 100644 docs/reference/gio/html/GSimpleAction.html delete mode 100644 docs/reference/gio/html/GSimpleActionGroup.html delete mode 100644 docs/reference/gio/html/GSimpleAsyncResult.html delete mode 100644 docs/reference/gio/html/GSimpleIOStream.html delete mode 100644 docs/reference/gio/html/GSimplePermission.html delete mode 100644 docs/reference/gio/html/GSimpleProxyResolver.html delete mode 100644 docs/reference/gio/html/GSocket.html delete mode 100644 docs/reference/gio/html/GSocketAddress.html delete mode 100644 docs/reference/gio/html/GSocketClient.html delete mode 100644 docs/reference/gio/html/GSocketConnectable.html delete mode 100644 docs/reference/gio/html/GSocketConnection.html delete mode 100644 docs/reference/gio/html/GSocketControlMessage.html delete mode 100644 docs/reference/gio/html/GSocketListener.html delete mode 100644 docs/reference/gio/html/GSocketService.html delete mode 100644 docs/reference/gio/html/GSrvTarget.html delete mode 100644 docs/reference/gio/html/GSubprocess.html delete mode 100644 docs/reference/gio/html/GSubprocessLauncher.html delete mode 100644 docs/reference/gio/html/GTask.html delete mode 100644 docs/reference/gio/html/GTcpConnection.html delete mode 100644 docs/reference/gio/html/GTcpWrapperConnection.html delete mode 100644 docs/reference/gio/html/GTestDBus.html delete mode 100644 docs/reference/gio/html/GThemedIcon.html delete mode 100644 docs/reference/gio/html/GThreadedSocketService.html delete mode 100644 docs/reference/gio/html/GTlsBackend.html delete mode 100644 docs/reference/gio/html/GTlsCertificate.html delete mode 100644 docs/reference/gio/html/GTlsClientConnection.html delete mode 100644 docs/reference/gio/html/GTlsConnection.html delete mode 100644 docs/reference/gio/html/GTlsDatabase.html delete mode 100644 docs/reference/gio/html/GTlsFileDatabase.html delete mode 100644 docs/reference/gio/html/GTlsInteraction.html delete mode 100644 docs/reference/gio/html/GTlsPassword.html delete mode 100644 docs/reference/gio/html/GTlsServerConnection.html delete mode 100644 docs/reference/gio/html/GUnixConnection.html delete mode 100644 docs/reference/gio/html/GUnixCredentialsMessage.html delete mode 100644 docs/reference/gio/html/GUnixFDList.html delete mode 100644 docs/reference/gio/html/GUnixFDMessage.html delete mode 100644 docs/reference/gio/html/GUnixInputStream.html delete mode 100644 docs/reference/gio/html/GUnixOutputStream.html delete mode 100644 docs/reference/gio/html/GUnixSocketAddress.html delete mode 100644 docs/reference/gio/html/GVfs.html delete mode 100644 docs/reference/gio/html/GVolume.html delete mode 100644 docs/reference/gio/html/GVolumeMonitor.html delete mode 100644 docs/reference/gio/html/GZlibCompressor.html delete mode 100644 docs/reference/gio/html/GZlibDecompressor.html delete mode 100644 docs/reference/gio/html/annotation-glossary.html delete mode 100644 docs/reference/gio/html/api-index-full.html delete mode 100644 docs/reference/gio/html/application.html delete mode 100644 docs/reference/gio/html/async.html delete mode 100644 docs/reference/gio/html/ch01.html delete mode 100644 docs/reference/gio/html/ch02.html delete mode 100644 docs/reference/gio/html/ch03.html delete mode 100644 docs/reference/gio/html/ch32.html delete mode 100644 docs/reference/gio/html/ch33.html delete mode 100644 docs/reference/gio/html/ch33s02.html delete mode 100644 docs/reference/gio/html/ch33s03.html delete mode 100644 docs/reference/gio/html/ch34.html delete mode 100644 docs/reference/gio/html/ch34s02.html delete mode 100644 docs/reference/gio/html/ch34s03.html delete mode 100644 docs/reference/gio/html/ch34s04.html delete mode 100644 docs/reference/gio/html/ch34s05.html delete mode 100644 docs/reference/gio/html/ch34s06.html delete mode 100644 docs/reference/gio/html/ch34s07.html delete mode 100644 docs/reference/gio/html/ch35.html delete mode 100644 docs/reference/gio/html/ch35s02.html delete mode 100644 docs/reference/gio/html/ch35s03.html delete mode 100644 docs/reference/gio/html/ch35s04.html delete mode 100644 docs/reference/gio/html/conversion.html delete mode 100644 docs/reference/gio/html/data-models.html delete mode 100644 docs/reference/gio/html/extending-gio.html delete mode 100644 docs/reference/gio/html/extending.html delete mode 100644 docs/reference/gio/html/failable_initialization.html delete mode 100644 docs/reference/gio/html/file_mon.html delete mode 100644 docs/reference/gio/html/file_ops.html delete mode 100644 docs/reference/gio/html/gapplication-tool.html delete mode 100644 docs/reference/gio/html/gdbus-codegen.html delete mode 100644 docs/reference/gio/html/gdbus-convenience.html delete mode 100644 docs/reference/gio/html/gdbus-example-gdbus-codegen.html delete mode 100644 docs/reference/gio/html/gdbus-lowlevel.html delete mode 100644 docs/reference/gio/html/gdbus.html delete mode 100644 docs/reference/gio/html/gio-D-Bus-Addresses.html delete mode 100644 docs/reference/gio/html/gio-D-Bus-Introspection-Data.html delete mode 100644 docs/reference/gio/html/gio-D-Bus-Utilities.html delete mode 100644 docs/reference/gio/html/gio-Desktop-file-based-GAppInfo.html delete mode 100644 docs/reference/gio/html/gio-Extension-Points.html delete mode 100644 docs/reference/gio/html/gio-GActionGroup-exporter.html delete mode 100644 docs/reference/gio/html/gio-GContentType.html delete mode 100644 docs/reference/gio/html/gio-GConverterInputstream.html delete mode 100644 docs/reference/gio/html/gio-GConverterOutputstream.html delete mode 100644 docs/reference/gio/html/gio-GDBusError.html delete mode 100644 docs/reference/gio/html/gio-GFileAttribute.html delete mode 100644 docs/reference/gio/html/gio-GIOError.html delete mode 100644 docs/reference/gio/html/gio-GIOScheduler.html delete mode 100644 docs/reference/gio/html/gio-GMenuModel-exporter.html delete mode 100644 docs/reference/gio/html/gio-GSettingsSchema-GSettingsSchemaSource.html delete mode 100644 docs/reference/gio/html/gio-GWin32InputStream.html delete mode 100644 docs/reference/gio/html/gio-GWin32OutputStream.html delete mode 100644 docs/reference/gio/html/gio-GWin32RegistryKey.html delete mode 100644 docs/reference/gio/html/gio-Owning-Bus-Names.html delete mode 100644 docs/reference/gio/html/gio-TLS-Overview.html delete mode 100644 docs/reference/gio/html/gio-Unix-Mounts.html delete mode 100644 docs/reference/gio/html/gio-Watching-Bus-Names.html delete mode 100644 docs/reference/gio/html/gio-gnetworking.h.html delete mode 100644 docs/reference/gio/html/gio-gpollableutils.html delete mode 100644 docs/reference/gio/html/gio-hierarchy.html delete mode 100644 docs/reference/gio/html/gio-querymodules.html delete mode 100644 docs/reference/gio/html/gio.devhelp2 delete mode 100644 docs/reference/gio/html/gio.html delete mode 100644 docs/reference/gio/html/glib-compile-resources.html delete mode 100644 docs/reference/gio/html/glib-compile-schemas.html delete mode 100644 docs/reference/gio/html/gresource-tool.html delete mode 100644 docs/reference/gio/html/gsettings-tool.html delete mode 100644 docs/reference/gio/html/gvfs-overview.png delete mode 100644 docs/reference/gio/html/highlevel-socket.html delete mode 100644 docs/reference/gio/html/home.png delete mode 100644 docs/reference/gio/html/icons.html delete mode 100644 docs/reference/gio/html/index.html delete mode 100644 docs/reference/gio/html/left-insensitive.png delete mode 100644 docs/reference/gio/html/left.png delete mode 100644 docs/reference/gio/html/menu-example.png delete mode 100644 docs/reference/gio/html/menu-model.png delete mode 100644 docs/reference/gio/html/migrating.html delete mode 100644 docs/reference/gio/html/networking.html delete mode 100644 docs/reference/gio/html/permissions.html delete mode 100644 docs/reference/gio/html/pt01.html delete mode 100644 docs/reference/gio/html/pt02.html delete mode 100644 docs/reference/gio/html/registry.html delete mode 100644 docs/reference/gio/html/resolver.html delete mode 100644 docs/reference/gio/html/resources.html delete mode 100644 docs/reference/gio/html/right-insensitive.png delete mode 100644 docs/reference/gio/html/right.png delete mode 100644 docs/reference/gio/html/running-gio-apps.html delete mode 100644 docs/reference/gio/html/settings.html delete mode 100644 docs/reference/gio/html/streaming.html delete mode 100644 docs/reference/gio/html/style.css delete mode 100644 docs/reference/gio/html/subprocesses.html delete mode 100644 docs/reference/gio/html/testing.html delete mode 100644 docs/reference/gio/html/tls.html delete mode 100644 docs/reference/gio/html/tools.html delete mode 100644 docs/reference/gio/html/types.html delete mode 100644 docs/reference/gio/html/up-insensitive.png delete mode 100644 docs/reference/gio/html/up.png delete mode 100644 docs/reference/gio/html/utils.html delete mode 100644 docs/reference/gio/html/volume_mon.html delete mode 100644 docs/reference/gio/version.xml delete mode 100644 docs/reference/glib/Makefile.in delete mode 100644 docs/reference/glib/glib-gettextize.1 delete mode 100644 docs/reference/glib/gtester-report.1 delete mode 100644 docs/reference/glib/gtester.1 delete mode 100644 docs/reference/glib/html/Sorted_binary_tree_breadth-first_traversal.svg delete mode 100644 docs/reference/glib/html/Sorted_binary_tree_inorder.svg delete mode 100644 docs/reference/glib/html/Sorted_binary_tree_postorder.svg delete mode 100644 docs/reference/glib/html/Sorted_binary_tree_preorder.svg delete mode 100644 docs/reference/glib/html/annotation-glossary.html delete mode 100644 docs/reference/glib/html/api-index-full.html delete mode 100644 docs/reference/glib/html/deprecated.html delete mode 100644 docs/reference/glib/html/file-name-encodings.png delete mode 100644 docs/reference/glib/html/glib-Arrays.html delete mode 100644 docs/reference/glib/html/glib-Asynchronous-Queues.html delete mode 100644 docs/reference/glib/html/glib-Atomic-Operations.html delete mode 100644 docs/reference/glib/html/glib-Automatic-String-Completion.html delete mode 100644 docs/reference/glib/html/glib-Balanced-Binary-Trees.html delete mode 100644 docs/reference/glib/html/glib-Base64-Encoding.html delete mode 100644 docs/reference/glib/html/glib-Basic-Types.html delete mode 100644 docs/reference/glib/html/glib-Bookmark-file-parser.html delete mode 100644 docs/reference/glib/html/glib-Bounds-checked-integer-arithmetic.html delete mode 100644 docs/reference/glib/html/glib-Byte-Arrays.html delete mode 100644 docs/reference/glib/html/glib-Byte-Order-Macros.html delete mode 100644 docs/reference/glib/html/glib-Caches.html delete mode 100644 docs/reference/glib/html/glib-Character-Set-Conversion.html delete mode 100644 docs/reference/glib/html/glib-Commandline-option-parser.html delete mode 100644 docs/reference/glib/html/glib-Data-Checksums.html delete mode 100644 docs/reference/glib/html/glib-Data-HMACs.html delete mode 100644 docs/reference/glib/html/glib-Datasets.html delete mode 100644 docs/reference/glib/html/glib-Date-and-Time-Functions.html delete mode 100644 docs/reference/glib/html/glib-Deprecated-Thread-APIs.html delete mode 100644 docs/reference/glib/html/glib-Double-ended-Queues.html delete mode 100644 docs/reference/glib/html/glib-Doubly-Linked-Lists.html delete mode 100644 docs/reference/glib/html/glib-Dynamic-Loading-of-Modules.html delete mode 100644 docs/reference/glib/html/glib-Error-Reporting.html delete mode 100644 docs/reference/glib/html/glib-File-Utilities.html delete mode 100644 docs/reference/glib/html/glib-GDateTime.html delete mode 100644 docs/reference/glib/html/glib-GTimeZone.html delete mode 100644 docs/reference/glib/html/glib-GUuid.html delete mode 100644 docs/reference/glib/html/glib-GVariant.html delete mode 100644 docs/reference/glib/html/glib-GVariantType.html delete mode 100644 docs/reference/glib/html/glib-Glob-style-pattern-matching.html delete mode 100644 docs/reference/glib/html/glib-Hash-Tables.html delete mode 100644 docs/reference/glib/html/glib-Hook-Functions.html delete mode 100644 docs/reference/glib/html/glib-Hostname-Utilities.html delete mode 100644 docs/reference/glib/html/glib-I18N.html delete mode 100644 docs/reference/glib/html/glib-IO-Channels.html delete mode 100644 docs/reference/glib/html/glib-Key-value-file-parser.html delete mode 100644 docs/reference/glib/html/glib-Keyed-Data-Lists.html delete mode 100644 docs/reference/glib/html/glib-Lexical-Scanner.html delete mode 100644 docs/reference/glib/html/glib-Memory-Allocation.html delete mode 100644 docs/reference/glib/html/glib-Memory-Slices.html delete mode 100644 docs/reference/glib/html/glib-Message-Logging.html delete mode 100644 docs/reference/glib/html/glib-Miscellaneous-Macros.html delete mode 100644 docs/reference/glib/html/glib-Miscellaneous-Utility-Functions.html delete mode 100644 docs/reference/glib/html/glib-N-ary-Trees.html delete mode 100644 docs/reference/glib/html/glib-Numerical-Definitions.html delete mode 100644 docs/reference/glib/html/glib-Perl-compatible-regular-expressions.html delete mode 100644 docs/reference/glib/html/glib-Pointer-Arrays.html delete mode 100644 docs/reference/glib/html/glib-Quarks.html delete mode 100644 docs/reference/glib/html/glib-Random-Numbers.html delete mode 100644 docs/reference/glib/html/glib-Relations-and-Tuples.html delete mode 100644 docs/reference/glib/html/glib-Sequences.html delete mode 100644 docs/reference/glib/html/glib-Shell-related-Utilities.html delete mode 100644 docs/reference/glib/html/glib-Simple-XML-Subset-Parser.html delete mode 100644 docs/reference/glib/html/glib-Singly-Linked-Lists.html delete mode 100644 docs/reference/glib/html/glib-Spawning-Processes.html delete mode 100644 docs/reference/glib/html/glib-Standard-Macros.html delete mode 100644 docs/reference/glib/html/glib-String-Chunks.html delete mode 100644 docs/reference/glib/html/glib-String-Utility-Functions.html delete mode 100644 docs/reference/glib/html/glib-Strings.html delete mode 100644 docs/reference/glib/html/glib-Testing.html delete mode 100644 docs/reference/glib/html/glib-The-Main-Event-Loop.html delete mode 100644 docs/reference/glib/html/glib-Thread-Pools.html delete mode 100644 docs/reference/glib/html/glib-Threads.html delete mode 100644 docs/reference/glib/html/glib-Timers.html delete mode 100644 docs/reference/glib/html/glib-Trash-Stacks.html delete mode 100644 docs/reference/glib/html/glib-Type-Conversion-Macros.html delete mode 100644 docs/reference/glib/html/glib-UNIX-specific-utilities-and-integration.html delete mode 100644 docs/reference/glib/html/glib-URI-Functions.html delete mode 100644 docs/reference/glib/html/glib-Unicode-Manipulation.html delete mode 100644 docs/reference/glib/html/glib-Version-Information.html delete mode 100644 docs/reference/glib/html/glib-Warnings-and-Assertions.html delete mode 100644 docs/reference/glib/html/glib-Windows-Compatibility-Functions.html delete mode 100644 docs/reference/glib/html/glib-building.html delete mode 100644 docs/reference/glib/html/glib-changes.html delete mode 100644 docs/reference/glib/html/glib-compiling.html delete mode 100644 docs/reference/glib/html/glib-core.html delete mode 100644 docs/reference/glib/html/glib-cross-compiling.html delete mode 100644 docs/reference/glib/html/glib-data-types.html delete mode 100644 docs/reference/glib/html/glib-fundamentals.html delete mode 100644 docs/reference/glib/html/glib-gettextize.html delete mode 100644 docs/reference/glib/html/glib-programming.html delete mode 100644 docs/reference/glib/html/glib-regex-syntax.html delete mode 100644 docs/reference/glib/html/glib-resources.html delete mode 100644 docs/reference/glib/html/glib-running.html delete mode 100644 docs/reference/glib/html/glib-utilities.html delete mode 100644 docs/reference/glib/html/glib.devhelp2 delete mode 100644 docs/reference/glib/html/glib.html delete mode 100644 docs/reference/glib/html/gtester-report.html delete mode 100644 docs/reference/glib/html/gtester.html delete mode 100644 docs/reference/glib/html/gvariant-format-strings.html delete mode 100644 docs/reference/glib/html/gvariant-text.html delete mode 100644 docs/reference/glib/html/home.png delete mode 100644 docs/reference/glib/html/index.html delete mode 100644 docs/reference/glib/html/left-insensitive.png delete mode 100644 docs/reference/glib/html/left.png delete mode 100644 docs/reference/glib/html/mainloop-states.gif delete mode 100644 docs/reference/glib/html/right-insensitive.png delete mode 100644 docs/reference/glib/html/right.png delete mode 100644 docs/reference/glib/html/style.css delete mode 100644 docs/reference/glib/html/tools.html delete mode 100644 docs/reference/glib/html/up-insensitive.png delete mode 100644 docs/reference/glib/html/up.png delete mode 100644 docs/reference/glib/version.xml delete mode 100644 docs/reference/gobject/Makefile.in delete mode 100644 docs/reference/gobject/glib-genmarshal.1 delete mode 100644 docs/reference/gobject/glib-mkenums.1 delete mode 100644 docs/reference/gobject/gobject-query.1 delete mode 100644 docs/reference/gobject/html/GBinding.html delete mode 100644 docs/reference/gobject/html/GTypeModule.html delete mode 100644 docs/reference/gobject/html/GTypePlugin.html delete mode 100644 docs/reference/gobject/html/annotation-glossary.html delete mode 100644 docs/reference/gobject/html/api-index-full.html delete mode 100644 docs/reference/gobject/html/ch01s02.html delete mode 100644 docs/reference/gobject/html/chapter-gobject.html delete mode 100644 docs/reference/gobject/html/chapter-gtype.html delete mode 100644 docs/reference/gobject/html/chapter-intro.html delete mode 100644 docs/reference/gobject/html/chapter-signal.html delete mode 100644 docs/reference/gobject/html/glib-genmarshal.html delete mode 100644 docs/reference/gobject/html/glib-mkenums.html delete mode 100644 docs/reference/gobject/html/glue.png delete mode 100644 docs/reference/gobject/html/gobject-Boxed-Types.html delete mode 100644 docs/reference/gobject/html/gobject-Closures.html delete mode 100644 docs/reference/gobject/html/gobject-Enumeration-and-Flag-Types.html delete mode 100644 docs/reference/gobject/html/gobject-GParamSpec.html delete mode 100644 docs/reference/gobject/html/gobject-Generic-values.html delete mode 100644 docs/reference/gobject/html/gobject-Signals.html delete mode 100644 docs/reference/gobject/html/gobject-Standard-Parameter-and-Value-Types.html delete mode 100644 docs/reference/gobject/html/gobject-The-Base-Object-Type.html delete mode 100644 docs/reference/gobject/html/gobject-Type-Information.html delete mode 100644 docs/reference/gobject/html/gobject-Value-arrays.html delete mode 100644 docs/reference/gobject/html/gobject-Varargs-Value-Collection.html delete mode 100644 docs/reference/gobject/html/gobject-memory.html delete mode 100644 docs/reference/gobject/html/gobject-properties.html delete mode 100644 docs/reference/gobject/html/gobject-query.html delete mode 100644 docs/reference/gobject/html/gobject.devhelp2 delete mode 100644 docs/reference/gobject/html/gtype-conventions.html delete mode 100644 docs/reference/gobject/html/gtype-instantiable-classed.html delete mode 100644 docs/reference/gobject/html/gtype-non-instantiable-classed.html delete mode 100644 docs/reference/gobject/html/gtype-non-instantiable.html delete mode 100644 docs/reference/gobject/html/home.png delete mode 100644 docs/reference/gobject/html/howto-gobject-chainup.html delete mode 100644 docs/reference/gobject/html/howto-gobject-code.html delete mode 100644 docs/reference/gobject/html/howto-gobject-construction.html delete mode 100644 docs/reference/gobject/html/howto-gobject-destruction.html delete mode 100644 docs/reference/gobject/html/howto-gobject-methods.html delete mode 100644 docs/reference/gobject/html/howto-gobject.html delete mode 100644 docs/reference/gobject/html/howto-interface-implement.html delete mode 100644 docs/reference/gobject/html/howto-interface-override.html delete mode 100644 docs/reference/gobject/html/howto-interface-prerequisite.html delete mode 100644 docs/reference/gobject/html/howto-interface-properties.html delete mode 100644 docs/reference/gobject/html/howto-interface.html delete mode 100644 docs/reference/gobject/html/howto-signals.html delete mode 100644 docs/reference/gobject/html/index.html delete mode 100644 docs/reference/gobject/html/left-insensitive.png delete mode 100644 docs/reference/gobject/html/left.png delete mode 100644 docs/reference/gobject/html/pr01.html delete mode 100644 docs/reference/gobject/html/pt01.html delete mode 100644 docs/reference/gobject/html/pt02.html delete mode 100644 docs/reference/gobject/html/pt03.html delete mode 100644 docs/reference/gobject/html/right-insensitive.png delete mode 100644 docs/reference/gobject/html/right.png delete mode 100644 docs/reference/gobject/html/rn01.html delete mode 100644 docs/reference/gobject/html/rn02.html delete mode 100644 docs/reference/gobject/html/signal.html delete mode 100644 docs/reference/gobject/html/style.css delete mode 100644 docs/reference/gobject/html/tools-ginspector.html delete mode 100644 docs/reference/gobject/html/tools-gob.html delete mode 100644 docs/reference/gobject/html/tools-gtkdoc.html delete mode 100644 docs/reference/gobject/html/tools-refdb.html delete mode 100644 docs/reference/gobject/html/tools-vala.html delete mode 100644 docs/reference/gobject/html/up-insensitive.png delete mode 100644 docs/reference/gobject/html/up.png create mode 100644 docs/reference/gobject/tmpl/.gitignore delete mode 100644 docs/reference/gobject/version.xml (limited to 'docs/reference') diff --git a/docs/reference/.gitignore b/docs/reference/.gitignore new file mode 100644 index 000000000..f9e370ee8 --- /dev/null +++ b/docs/reference/.gitignore @@ -0,0 +1,16 @@ +*-decl-list.txt +*-decl.txt +*-unused.txt +*-undocumented.txt +*-undeclared.txt +*.args +*.hierarchy +*.interfaces +*.prerequisites +*.signals +*.stamp +html +xml +*.bak +version.xml +*.1 diff --git a/docs/reference/Makefile.in b/docs/reference/Makefile.in deleted file mode 100644 index 6b415cc02..000000000 --- a/docs/reference/Makefile.in +++ /dev/null @@ -1,755 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = docs/reference -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4macros/attributes.m4 \ - $(top_srcdir)/m4macros/glibtests.m4 \ - $(top_srcdir)/m4macros/gtk-doc.m4 \ - $(top_srcdir)/m4macros/libtool.m4 \ - $(top_srcdir)/m4macros/ltoptions.m4 \ - $(top_srcdir)/m4macros/ltsugar.m4 \ - $(top_srcdir)/m4macros/ltversion.m4 \ - $(top_srcdir)/m4macros/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/acglib.m4 \ - $(top_srcdir)/glib/libcharset/codeset.m4 \ - $(top_srcdir)/glib/libcharset/glibc21.m4 \ - $(top_srcdir)/m4macros/glib-gettext.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ - ctags-recursive dvi-recursive html-recursive info-recursive \ - install-data-recursive install-dvi-recursive \ - install-exec-recursive install-html-recursive \ - install-info-recursive install-pdf-recursive \ - install-ps-recursive install-recursive installcheck-recursive \ - installdirs-recursive pdf-recursive ps-recursive \ - tags-recursive uninstall-recursive -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ - distclean-recursive maintainer-clean-recursive -am__recursive_targets = \ - $(RECURSIVE_TARGETS) \ - $(RECURSIVE_CLEAN_TARGETS) \ - $(am__extra_recursive_targets) -AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ - distdir -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -# Read a list of newline-separated strings from the standard input, -# and print each of them once, without duplicates. Input order is -# *not* preserved. -am__uniquify_input = $(AWK) '\ - BEGIN { nonempty = 0; } \ - { items[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in items) print i; }; } \ -' -# Make sure the list of sources is unique. This is necessary because, -# e.g., the same source file might be shared among _SOURCES variables -# for different programs/libraries. -am__define_uniq_tagged_files = \ - list='$(am__tagged_files)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS COPYING ChangeLog NEWS \ - README -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -ABS_TAPSET_DIR = @ABS_TAPSET_DIR@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CARBON_LIBS = @CARBON_LIBS@ -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COCOA_LIBS = @COCOA_LIBS@ -CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ -DBUS1_CFLAGS = @DBUS1_CFLAGS@ -DBUS1_LIBS = @DBUS1_LIBS@ -DBUS_DAEMON = @DBUS_DAEMON@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DTRACE = @DTRACE@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FAM_LIBS = @FAM_LIBS@ -FGREP = @FGREP@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GIO = @GIO@ -GIO_MODULE_DIR = @GIO_MODULE_DIR@ -GLIBC21 = @GLIBC21@ -GLIB_BINARY_AGE = @GLIB_BINARY_AGE@ -GLIB_DEBUG_FLAGS = @GLIB_DEBUG_FLAGS@ -GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ -GLIB_HIDDEN_VISIBILITY_CFLAGS = @GLIB_HIDDEN_VISIBILITY_CFLAGS@ -GLIB_INTERFACE_AGE = @GLIB_INTERFACE_AGE@ -GLIB_LINK_FLAGS = @GLIB_LINK_FLAGS@ -GLIB_MAJOR_VERSION = @GLIB_MAJOR_VERSION@ -GLIB_MICRO_VERSION = @GLIB_MICRO_VERSION@ -GLIB_MINOR_VERSION = @GLIB_MINOR_VERSION@ -GLIB_RUNTIME_LIBDIR = @GLIB_RUNTIME_LIBDIR@ -GLIB_VERSION = @GLIB_VERSION@ -GLIB_WARN_CFLAGS = @GLIB_WARN_CFLAGS@ -GLIB_WIN32_STATIC_COMPILATION_DEFINE = @GLIB_WIN32_STATIC_COMPILATION_DEFINE@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ -GREP = @GREP@ -GSPAWN = @GSPAWN@ -GTHREAD_COMPILE_IMPL_DEFINES = @GTHREAD_COMPILE_IMPL_DEFINES@ -GTKDOC_CHECK = @GTKDOC_CHECK@ -GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ -GTKDOC_MKPDF = @GTKDOC_MKPDF@ -GTKDOC_REBASE = @GTKDOC_REBASE@ -G_LIBS_EXTRA = @G_LIBS_EXTRA@ -G_MODULE_BROKEN_RTLD_GLOBAL = @G_MODULE_BROKEN_RTLD_GLOBAL@ -G_MODULE_HAVE_DLERROR = @G_MODULE_HAVE_DLERROR@ -G_MODULE_IMPL = @G_MODULE_IMPL@ -G_MODULE_LDFLAGS = @G_MODULE_LDFLAGS@ -G_MODULE_LIBS = @G_MODULE_LIBS@ -G_MODULE_LIBS_EXTRA = @G_MODULE_LIBS_EXTRA@ -G_MODULE_NEED_USCORE = @G_MODULE_NEED_USCORE@ -G_MODULE_PLUGIN_LIBS = @G_MODULE_PLUGIN_LIBS@ -G_MODULE_SUPPORTED = @G_MODULE_SUPPORTED@ -G_THREAD_CFLAGS = @G_THREAD_CFLAGS@ -G_THREAD_LIBS = @G_THREAD_LIBS@ -G_THREAD_LIBS_EXTRA = @G_THREAD_LIBS_EXTRA@ -G_THREAD_LIBS_FOR_GTHREAD = @G_THREAD_LIBS_FOR_GTHREAD@ -HTML_DIR = @HTML_DIR@ -ICONV_LIBS = @ICONV_LIBS@ -INDENT = @INDENT@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLLIBS = @INTLLIBS@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBELF_CFLAGS = @LIBELF_CFLAGS@ -LIBELF_LIBS = @LIBELF_LIBS@ -LIBFFI_CFLAGS = @LIBFFI_CFLAGS@ -LIBFFI_LIBS = @LIBFFI_LIBS@ -LIBMOUNT_CFLAGS = @LIBMOUNT_CFLAGS@ -LIBMOUNT_LIBS = @LIBMOUNT_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_EXE_MACHINE_FLAG = @LIB_EXE_MACHINE_FLAG@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LTP = @LTP@ -LTP_GENHTML = @LTP_GENHTML@ -LT_AGE = @LT_AGE@ -LT_CURRENT = @LT_CURRENT@ -LT_CURRENT_MINUS_AGE = @LT_CURRENT_MINUS_AGE@ -LT_RELEASE = @LT_RELEASE@ -LT_REVISION = @LT_REVISION@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MSGFMT = @MSGFMT@ -MSGFMT_OPTS = @MSGFMT_OPTS@ -NAMESER_COMPAT_INCLUDE = @NAMESER_COMPAT_INCLUDE@ -NETWORK_LIBS = @NETWORK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PCRE_CFLAGS = @PCRE_CFLAGS@ -PCRE_LIBS = @PCRE_LIBS@ -PCRE_REQUIRES = @PCRE_REQUIRES@ -PCRE_WARN_CFLAGS = @PCRE_WARN_CFLAGS@ -PERL = @PERL@ -PERL_PATH = @PERL_PATH@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PLATFORMDEP = @PLATFORMDEP@ -POFILES = @POFILES@ -POSUB = @POSUB@ -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -REBUILD = @REBUILD@ -SED = @SED@ -SELINUX_LIBS = @SELINUX_LIBS@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHTOOL = @SHTOOL@ -STRIP = @STRIP@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -WINDRES = @WINDRES@ -WSPIAPI_INCLUDE = @WSPIAPI_INCLUDE@ -XATTR_LIBS = @XATTR_LIBS@ -XGETTEXT = @XGETTEXT@ -XMLCATALOG = @XMLCATALOG@ -XML_CATALOG_FILE = @XML_CATALOG_FILE@ -XSLTPROC = @XSLTPROC@ -ZLIB_CFLAGS = @ZLIB_CFLAGS@ -ZLIB_LIBS = @ZLIB_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -config_h_INCLUDES = @config_h_INCLUDES@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gio_INCLUDES = @gio_INCLUDES@ -glib_INCLUDES = @glib_INCLUDES@ -gmodule_INCLUDES = @gmodule_INCLUDES@ -gobject_INCLUDES = @gobject_INCLUDES@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -installed_test_metadir = @installed_test_metadir@ -installed_testdir = @installed_testdir@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -ms_librarian = @ms_librarian@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pyexecdir = @pyexecdir@ -pythondir = @pythondir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = glib gobject gio -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/reference/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/reference/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -# This directory's subdirectories are mostly independent; you can cd -# into them and run 'make' without going through this Makefile. -# To change the values of 'make' variables: instead of editing Makefiles, -# (1) if the variable is set in 'config.status', edit 'config.status' -# (which will cause the Makefiles to be regenerated when you run 'make'); -# (2) otherwise, pass the desired values on the 'make' command line. -$(am__recursive_targets): - @fail=; \ - if $(am__make_keepgoing); then \ - failcom='fail=yes'; \ - else \ - failcom='exit 1'; \ - fi; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-recursive - -CTAGS: ctags -ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - $(am__define_uniq_tagged_files); \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" -cscopelist: cscopelist-recursive - -cscopelist-am: $(am__tagged_files) - list='$(am__tagged_files)'; \ - case "$(srcdir)" in \ - [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ - *) sdir=$(subdir)/$(srcdir) ;; \ - esac; \ - for i in $$list; do \ - if test -f "$$i"; then \ - echo "$(subdir)/$$i"; \ - else \ - echo "$$sdir/$$i"; \ - fi; \ - done >> $(top_builddir)/cscope.files - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile -installdirs: installdirs-recursive -installdirs-am: -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.MAKE: $(am__recursive_targets) install-am install-strip - -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ - check-am clean clean-generic clean-libtool cscopelist-am ctags \ - ctags-am distclean distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - installdirs-am maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-am uninstall uninstall-am - -.PRECIOUS: Makefile - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/docs/reference/gio/.gitignore b/docs/reference/gio/.gitignore new file mode 100644 index 000000000..e9e522ee3 --- /dev/null +++ b/docs/reference/gio/.gitignore @@ -0,0 +1,3 @@ +*.1 +gio-overrides.txt +tmpl diff --git a/docs/reference/gio/Makefile.in b/docs/reference/gio/Makefile.in deleted file mode 100644 index 7ad91baf4..000000000 --- a/docs/reference/gio/Makefile.in +++ /dev/null @@ -1,1134 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -*- mode: makefile -*- - -#################################### -# Everything below here is generic # -#################################### -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@ENABLE_MAN_TRUE@am__append_1 = \ -@ENABLE_MAN_TRUE@ gapplication.1 \ -@ENABLE_MAN_TRUE@ gio-querymodules.1 \ -@ENABLE_MAN_TRUE@ glib-compile-schemas.1 \ -@ENABLE_MAN_TRUE@ glib-compile-resources.1 \ -@ENABLE_MAN_TRUE@ gsettings.1 \ -@ENABLE_MAN_TRUE@ gresource.1 \ -@ENABLE_MAN_TRUE@ gdbus.1 \ -@ENABLE_MAN_TRUE@ gdbus-codegen.1 \ -@ENABLE_MAN_TRUE@ gio.1 \ -@ENABLE_MAN_TRUE@ $(NULL) - -subdir = docs/reference/gio -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4macros/attributes.m4 \ - $(top_srcdir)/m4macros/glibtests.m4 \ - $(top_srcdir)/m4macros/gtk-doc.m4 \ - $(top_srcdir)/m4macros/libtool.m4 \ - $(top_srcdir)/m4macros/ltoptions.m4 \ - $(top_srcdir)/m4macros/ltsugar.m4 \ - $(top_srcdir)/m4macros/ltversion.m4 \ - $(top_srcdir)/m4macros/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/acglib.m4 \ - $(top_srcdir)/glib/libcharset/codeset.m4 \ - $(top_srcdir)/glib/libcharset/glibc21.m4 \ - $(top_srcdir)/m4macros/glib-gettext.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = version.xml -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -man1dir = $(mandir)/man1 -am__installdirs = "$(DESTDIR)$(man1dir)" -NROFF = nroff -MANS = $(man_MANS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/version.xml.in \ - $(top_srcdir)/gtk-doc.make -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ABS_TAPSET_DIR = @ABS_TAPSET_DIR@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CARBON_LIBS = @CARBON_LIBS@ -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COCOA_LIBS = @COCOA_LIBS@ -CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ -DBUS1_CFLAGS = @DBUS1_CFLAGS@ -DBUS1_LIBS = @DBUS1_LIBS@ -DBUS_DAEMON = @DBUS_DAEMON@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DTRACE = @DTRACE@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FAM_LIBS = @FAM_LIBS@ -FGREP = @FGREP@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GIO = @GIO@ -GIO_MODULE_DIR = @GIO_MODULE_DIR@ -GLIBC21 = @GLIBC21@ -GLIB_BINARY_AGE = @GLIB_BINARY_AGE@ -GLIB_DEBUG_FLAGS = @GLIB_DEBUG_FLAGS@ -GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ -GLIB_HIDDEN_VISIBILITY_CFLAGS = @GLIB_HIDDEN_VISIBILITY_CFLAGS@ -GLIB_INTERFACE_AGE = @GLIB_INTERFACE_AGE@ -GLIB_LINK_FLAGS = @GLIB_LINK_FLAGS@ -GLIB_MAJOR_VERSION = @GLIB_MAJOR_VERSION@ -GLIB_MICRO_VERSION = @GLIB_MICRO_VERSION@ -GLIB_MINOR_VERSION = @GLIB_MINOR_VERSION@ -GLIB_RUNTIME_LIBDIR = @GLIB_RUNTIME_LIBDIR@ -GLIB_VERSION = @GLIB_VERSION@ -GLIB_WARN_CFLAGS = @GLIB_WARN_CFLAGS@ -GLIB_WIN32_STATIC_COMPILATION_DEFINE = @GLIB_WIN32_STATIC_COMPILATION_DEFINE@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ -GREP = @GREP@ -GSPAWN = @GSPAWN@ -GTHREAD_COMPILE_IMPL_DEFINES = @GTHREAD_COMPILE_IMPL_DEFINES@ -GTKDOC_CHECK = @GTKDOC_CHECK@ -GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ -GTKDOC_MKPDF = @GTKDOC_MKPDF@ -GTKDOC_REBASE = @GTKDOC_REBASE@ -G_LIBS_EXTRA = @G_LIBS_EXTRA@ -G_MODULE_BROKEN_RTLD_GLOBAL = @G_MODULE_BROKEN_RTLD_GLOBAL@ -G_MODULE_HAVE_DLERROR = @G_MODULE_HAVE_DLERROR@ -G_MODULE_IMPL = @G_MODULE_IMPL@ -G_MODULE_LDFLAGS = @G_MODULE_LDFLAGS@ -G_MODULE_LIBS = @G_MODULE_LIBS@ -G_MODULE_LIBS_EXTRA = @G_MODULE_LIBS_EXTRA@ -G_MODULE_NEED_USCORE = @G_MODULE_NEED_USCORE@ -G_MODULE_PLUGIN_LIBS = @G_MODULE_PLUGIN_LIBS@ -G_MODULE_SUPPORTED = @G_MODULE_SUPPORTED@ -G_THREAD_CFLAGS = @G_THREAD_CFLAGS@ -G_THREAD_LIBS = @G_THREAD_LIBS@ -G_THREAD_LIBS_EXTRA = @G_THREAD_LIBS_EXTRA@ -G_THREAD_LIBS_FOR_GTHREAD = @G_THREAD_LIBS_FOR_GTHREAD@ -HTML_DIR = @HTML_DIR@ -ICONV_LIBS = @ICONV_LIBS@ -INDENT = @INDENT@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLLIBS = @INTLLIBS@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBELF_CFLAGS = @LIBELF_CFLAGS@ -LIBELF_LIBS = @LIBELF_LIBS@ -LIBFFI_CFLAGS = @LIBFFI_CFLAGS@ -LIBFFI_LIBS = @LIBFFI_LIBS@ -LIBMOUNT_CFLAGS = @LIBMOUNT_CFLAGS@ -LIBMOUNT_LIBS = @LIBMOUNT_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_EXE_MACHINE_FLAG = @LIB_EXE_MACHINE_FLAG@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LTP = @LTP@ -LTP_GENHTML = @LTP_GENHTML@ -LT_AGE = @LT_AGE@ -LT_CURRENT = @LT_CURRENT@ -LT_CURRENT_MINUS_AGE = @LT_CURRENT_MINUS_AGE@ -LT_RELEASE = @LT_RELEASE@ -LT_REVISION = @LT_REVISION@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MSGFMT = @MSGFMT@ -MSGFMT_OPTS = @MSGFMT_OPTS@ -NAMESER_COMPAT_INCLUDE = @NAMESER_COMPAT_INCLUDE@ -NETWORK_LIBS = @NETWORK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PCRE_CFLAGS = @PCRE_CFLAGS@ -PCRE_LIBS = @PCRE_LIBS@ -PCRE_REQUIRES = @PCRE_REQUIRES@ -PCRE_WARN_CFLAGS = @PCRE_WARN_CFLAGS@ -PERL = @PERL@ -PERL_PATH = @PERL_PATH@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PLATFORMDEP = @PLATFORMDEP@ -POFILES = @POFILES@ -POSUB = @POSUB@ -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -REBUILD = @REBUILD@ -SED = @SED@ -SELINUX_LIBS = @SELINUX_LIBS@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHTOOL = @SHTOOL@ -STRIP = @STRIP@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -WINDRES = @WINDRES@ -WSPIAPI_INCLUDE = @WSPIAPI_INCLUDE@ -XATTR_LIBS = @XATTR_LIBS@ -XGETTEXT = @XGETTEXT@ -XMLCATALOG = @XMLCATALOG@ -XML_CATALOG_FILE = @XML_CATALOG_FILE@ -XSLTPROC = @XSLTPROC@ -ZLIB_CFLAGS = @ZLIB_CFLAGS@ -ZLIB_LIBS = @ZLIB_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -config_h_INCLUDES = @config_h_INCLUDES@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gio_INCLUDES = @gio_INCLUDES@ -glib_INCLUDES = @glib_INCLUDES@ -gmodule_INCLUDES = @gmodule_INCLUDES@ -gobject_INCLUDES = @gobject_INCLUDES@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -installed_test_metadir = @installed_test_metadir@ -installed_testdir = @installed_testdir@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -ms_librarian = @ms_librarian@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pyexecdir = @pyexecdir@ -pythondir = @pythondir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -NULL = - -# The name of the module. -DOC_MODULE = gio - -# The top-level SGML file. -DOC_MAIN_SGML_FILE = gio-docs.xml - -# Extra options to supply to gtkdoc-scan -SCAN_OPTIONS = --deprecated-guards="G_DISABLE_DEPRECATED" \ - --ignore-decorators="G_GNUC_WARN_UNUSED_RESULT" - - -# The directory containing the source code. Relative to $(srcdir) -DOC_SOURCE_DIR = $(top_srcdir)/gio $(top_builddir)/gio -HFILE_GLOB = \ - $(top_srcdir)/gio/*.h \ - $(top_builddir)/gio/gioenumtypes.h - -CFILE_GLOB = $(top_srcdir)/gio/*.c -IGNORE_HFILES = \ - fam \ - fen \ - gdbus-2.0 \ - gvdb \ - inotify \ - kqueue \ - libasyncns \ - tests \ - win32 \ - xdgmime \ - gappinfoprivate.h \ - gapplicationimpl.h \ - gasynchelper.h \ - gcontenttypeprivate.h \ - gcontextspecificgroup.h \ - gcredentialsprivate.h \ - gdbus-daemon-generated.h \ - gdbusactiongroup-private.h \ - gdbusauth.h \ - gdbusauthmechanismanon.h \ - gdbusauthmechanismexternal.h \ - gdbusauthmechanism.h \ - gdbusauthmechanismsha1.h \ - gdbusdaemon.h \ - gdbusprivate.h \ - gdelayedsettingsbackend.h \ - gdummyfile.h \ - gdummyproxyresolver.h \ - gdummytlsbackend.h \ - gfileattribute-priv.h \ - gfileinfo-priv.h \ - ghttpproxy.h \ - gio_trace.h \ - giomodule-priv.h \ - gioprivate.h \ - giowin32-priv.h \ - glocaldirectorymonitor.h \ - glocalfileenumerator.h \ - glocalfile.h \ - glocalfileinfo.h \ - glocalfileinputstream.h \ - glocalfileiostream.h \ - glocalfilemonitor.h \ - glocalfileoutputstream.h \ - glocalvfs.h \ - gmountprivate.h \ - gnativevolumemonitor.h \ - gnetworkingprivate.h \ - gnetworkmonitorbase.h \ - gnetworkmonitornetlink.h \ - gnetworkmonitornm.h \ - gnotificationbackend.h \ - gnotification-private.h \ - gpollfilemonitor.h \ - gregistrysettingsbackend.h \ - gresourcefile.h \ - gsettingsbackendinternal.h \ - gsettings-mapping.h \ - gsettingsschema-internal.h \ - gsocketinputstream.h \ - gsocketoutputstream.h \ - gsocks4aproxy.h \ - gsocks4proxy.h \ - gsocks5proxy.h \ - gsubprocesslauncher-private.h \ - gthreadedresolver.h \ - gunionvolumemonitor.h \ - gunixmount.h \ - gunixresolver.h \ - gunixvolume.h \ - gunixvolumemonitor.h \ - gwin32appinfo.h \ - gwin32mount.h \ - gwin32resolver.h \ - gwin32volumemonitor.h \ - thumbnail-verify.h - -MKDB_IGNORE_FILES = \ - gdbus-daemon-generated.c \ - kqueue \ - libasyncns \ - tests \ - $(NULL) - - -# CFLAGS and LDFLAGS for compiling scan program. Only needed -# if $(DOC_MODULE).types is non-empty. -AM_CPPFLAGS = \ - $(gio_INCLUDES) \ - $(GLIB_DEBUG_FLAGS) - -GTKDOC_LIBS = \ - $(top_builddir)/glib/libglib-2.0.la \ - $(top_builddir)/gobject/libgobject-2.0.la \ - $(top_builddir)/gmodule/libgmodule-2.0.la \ - $(top_builddir)/gio/libgio-2.0.la \ - $(NULL) - - -# Extra options to supply to gtkdoc-mkdb -MKDB_OPTIONS = --output-format=xml --name-space=g \ - --ignore-files='$(MKDB_IGNORE_FILES)' - - -# Images to copy into HTML directory -HTML_IMAGES = \ - gvfs-overview.png \ - menu-example.png \ - menu-model.png - -content_files = \ - version.xml \ - overview.xml \ - migrating-posix.xml \ - migrating-gnome-vfs.xml \ - migrating-gconf.xml \ - migrating-gdbus.xml \ - gio-querymodules.xml \ - glib-compile-schemas.xml\ - glib-compile-resources.xml \ - gapplication.xml \ - gsettings.xml \ - gresource.xml \ - gdbus.xml \ - gdbus-codegen.xml \ - gio.xml \ - $(NULL) - -expand_content_files = \ - overview.xml \ - migrating-posix.xml \ - migrating-gnome-vfs.xml \ - migrating-gconf.xml \ - migrating-gdbus.xml \ - gdbus-codegen.xml \ - $(NULL) - -extra_files = \ - version.xml.in \ - gvfs-overview.odg - - -# Extra options to supply to gtkdoc-fixref -FIXXREF_OPTIONS = --extra-dir=$(srcdir)/../glib/html --extra-dir=$(srcdir)/../gobject/html -@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = -@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute - -# We set GPATH here; this gives us semantics for GNU make -# which are more like other make's VPATH, when it comes to -# whether a source that is a target of one rule is then -# searched for in VPATH/GPATH. -# -GPATH = $(srcdir) -TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) -SETUP_FILES = \ - $(content_files) \ - $(expand_content_files) \ - $(DOC_MAIN_SGML_FILE) \ - $(DOC_MODULE)-sections.txt \ - $(DOC_MODULE)-overrides.txt - -EXTRA_DIST = $(HTML_IMAGES) $(SETUP_FILES) version.xml.in $(man_MANS) -DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \ - html-build.stamp pdf-build.stamp \ - sgml.stamp html.stamp pdf.stamp - -SCANOBJ_FILES = \ - $(DOC_MODULE).args \ - $(DOC_MODULE).hierarchy \ - $(DOC_MODULE).interfaces \ - $(DOC_MODULE).prerequisites \ - $(DOC_MODULE).signals - -REPORT_FILES = \ - $(DOC_MODULE)-undocumented.txt \ - $(DOC_MODULE)-undeclared.txt \ - $(DOC_MODULE)-unused.txt - -CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) \ - gtkdoc-check.test $(man_MANS) -@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = -@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp -@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = -@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp - -#### setup #### -GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_$(V)) -GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_SETUP_0 = @echo " DOC Preparing build"; - -#### scan #### -GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_$(V)) -GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_SCAN_0 = @echo " DOC Scanning header files"; -GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_$(V)) -GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_INTROSPECT_0 = @echo " DOC Introspecting gobjects"; - -#### xml #### -GTK_DOC_V_XML = $(GTK_DOC_V_XML_$(V)) -GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_XML_0 = @echo " DOC Building XML"; - -#### html #### -GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_$(V)) -GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_HTML_0 = @echo " DOC Building HTML"; -GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_$(V)) -GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_XREF_0 = @echo " DOC Fixing cross-references"; - -#### pdf #### -GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_$(V)) -GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_PDF_0 = @echo " DOC Building PDF"; -man_MANS = $(am__append_1) -@ENABLE_MAN_TRUE@XSLTPROC_FLAGS = \ -@ENABLE_MAN_TRUE@ --nonet \ -@ENABLE_MAN_TRUE@ --stringparam man.output.quietly 1 \ -@ENABLE_MAN_TRUE@ --stringparam funcsynopsis.style ansi \ -@ENABLE_MAN_TRUE@ --stringparam man.th.extra1.suppress 1 \ -@ENABLE_MAN_TRUE@ --stringparam man.authors.section.enabled 0 \ -@ENABLE_MAN_TRUE@ --stringparam man.copyright.section.enabled 0 - -all: all-am - -.SUFFIXES: -.SUFFIXES: .1 .xml -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/reference/gio/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/reference/gio/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; -$(top_srcdir)/gtk-doc.make $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -version.xml: $(top_builddir)/config.status $(srcdir)/version.xml.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - @list1=''; \ - list2='$(man_MANS)'; \ - test -n "$(man1dir)" \ - && test -n "`echo $$list1$$list2`" \ - || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ - { for i in $$list1; do echo "$$i"; done; \ - if test -n "$$list2"; then \ - for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.1[a-z]*$$/p'; \ - fi; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am -check: check-am -@ENABLE_GTK_DOC_FALSE@all-local: -all-am: Makefile $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-local mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-local - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-data-local install-man - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic \ - maintainer-clean-local - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-local uninstall-man - -uninstall-man: uninstall-man1 - -.MAKE: install-am install-strip - -.PHONY: all all-am all-local check check-am clean clean-generic \ - clean-libtool clean-local cscopelist-am ctags-am dist-hook \ - distclean distclean-generic distclean-libtool distclean-local \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-data-local \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-man1 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - maintainer-clean-local mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ - uninstall-am uninstall-local uninstall-man uninstall-man1 - -.PRECIOUS: Makefile - - -gtkdoc-check.test: Makefile - $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ - echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ - chmod +x $@ - -all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) -.PHONY: all-gtk-doc - -@ENABLE_GTK_DOC_TRUE@all-local: all-gtk-doc - -docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) - -$(REPORT_FILES): sgml-build.stamp - -setup-build.stamp: - -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ - if test "x$$files" != "x" ; then \ - for file in $$files ; do \ - destdir=`dirname $(abs_builddir)/$$file`; \ - test -d "$$destdir" || mkdir -p "$$destdir"; \ - test -f $(abs_srcdir)/$$file && \ - cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ - done; \ - fi; \ - fi - $(AM_V_at)touch setup-build.stamp - -scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) - $(GTK_DOC_V_SCAN)_source_dir='' ; \ - for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) - $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ - scanobj_options=""; \ - gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$$?" = "0"; then \ - if test "x$(V)" = "x1"; then \ - scanobj_options="--verbose"; \ - fi; \ - fi; \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ - gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ - else \ - for i in $(SCANOBJ_FILES) ; do \ - test -f $$i || touch $$i ; \ - done \ - fi - $(AM_V_at)touch scan-build.stamp - -$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp - @true - -sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent - $(GTK_DOC_V_XML)_source_dir='' ; \ - for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) - $(AM_V_at)touch sgml-build.stamp - -sgml.stamp: sgml-build.stamp - @true - -xml/gtkdocentities.ent: Makefile - $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ - echo ""; \ - echo ""; \ - echo ""; \ - echo ""; \ - echo ""; \ - echo ""; \ - echo ""; \ - ) > $@ - -html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) - $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ - mkhtml_options=""; \ - gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$$?" = "0"; then \ - if test "x$(V)" = "x1"; then \ - mkhtml_options="$$mkhtml_options --verbose"; \ - fi; \ - fi; \ - gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ - if test "$$?" = "0"; then \ - mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ - fi; \ - cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - -@test "x$(HTML_IMAGES)" = "x" || \ - for file in $(HTML_IMAGES) ; do \ - test -f $(abs_srcdir)/$$file && cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ - test -f $(abs_builddir)/$$file && cp $(abs_builddir)/$$file $(abs_builddir)/html; \ - done; - $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) - $(AM_V_at)touch html-build.stamp - -pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) - $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ - mkpdf_options=""; \ - gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$$?" = "0"; then \ - if test "x$(V)" = "x1"; then \ - mkpdf_options="$$mkpdf_options --verbose"; \ - fi; \ - fi; \ - if test "x$(HTML_IMAGES)" != "x"; then \ - for img in $(HTML_IMAGES); do \ - part=`dirname $$img`; \ - echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ - if test $$? != 0; then \ - mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ - fi; \ - done; \ - fi; \ - gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) - $(AM_V_at)touch pdf-build.stamp - -############## - -clean-local: - @rm -f *~ *.bak - @rm -rf .libs - @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ - rm -f $(DOC_MODULE).types; \ - fi - @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ - rm -f $(DOC_MODULE)-sections.txt; \ - fi - -distclean-local: - @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ - $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt - @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ - fi - -maintainer-clean-local: - @rm -rf xml html - -install-data-local: - @installfiles=`echo $(builddir)/html/*`; \ - if test "$$installfiles" = '$(builddir)/html/*'; \ - then echo 1>&2 'Nothing to install' ; \ - else \ - if test -n "$(DOC_MODULE_VERSION)"; then \ - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ - else \ - installdir="$(DESTDIR)$(TARGET_DIR)"; \ - fi; \ - $(mkinstalldirs) $${installdir} ; \ - for i in $$installfiles; do \ - echo ' $(INSTALL_DATA) '$$i ; \ - $(INSTALL_DATA) $$i $${installdir}; \ - done; \ - if test -n "$(DOC_MODULE_VERSION)"; then \ - mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ - $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ - fi; \ - $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ - fi - -uninstall-local: - @if test -n "$(DOC_MODULE_VERSION)"; then \ - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ - else \ - installdir="$(DESTDIR)$(TARGET_DIR)"; \ - fi; \ - rm -rf $${installdir} - -# -# Require gtk-doc when making dist -# -@HAVE_GTK_DOC_TRUE@dist-check-gtkdoc: docs -@HAVE_GTK_DOC_FALSE@dist-check-gtkdoc: -@HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc is needed to run 'make dist'. ***" -@HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc was not found when 'configure' ran. ***" -@HAVE_GTK_DOC_FALSE@ @echo "*** please install gtk-doc and rerun 'configure'. ***" -@HAVE_GTK_DOC_FALSE@ @false - -dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local - @mkdir $(distdir)/html - @cp ./html/* $(distdir)/html - @-cp ./$(DOC_MODULE).pdf $(distdir)/ - @-cp ./$(DOC_MODULE).types $(distdir)/ - @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ - @cd $(distdir) && rm -f $(DISTCLEANFILES) - @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html - -.PHONY : dist-hook-local docs - -@ENABLE_MAN_TRUE@.xml.1: -@ENABLE_MAN_TRUE@ $(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< - -CLEANFILES ?= - -dist-hook-local: all-local - -gio-docs-clean: clean - cd $(srcdir) && rm -rf xml html - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/docs/reference/gio/gapplication.1 b/docs/reference/gio/gapplication.1 deleted file mode 100644 index fe422b2ca..000000000 --- a/docs/reference/gio/gapplication.1 +++ /dev/null @@ -1,293 +0,0 @@ -'\" t -.\" Title: gapplication -.\" Author: Ryan Lortie -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 06/22/2017 -.\" Manual: User Commands -.\" Source: GIO -.\" Language: English -.\" -.TH "GAPPLICATION" "1" "" "GIO" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -gapplication \- D\-Bus application launcher -.SH "SYNOPSIS" -.HP \w'\fBgapplication\fR\ 'u -\fBgapplication\fR help [\fICOMMAND\fR] -.HP \w'\fBgapplication\fR\ 'u -\fBgapplication\fR version -.HP \w'\fBgapplication\fR\ 'u -\fBgapplication\fR list\-apps -.HP \w'\fBgapplication\fR\ 'u -\fBgapplication\fR launch \fIAPPID\fR -.HP \w'\fBgapplication\fR\ 'u -\fBgapplication\fR launch \fIAPPID\fR [\fIFILE\fR...] -.HP \w'\fBgapplication\fR\ 'u -\fBgapplication\fR list\-actions \fIAPPID\fR -.HP \w'\fBgapplication\fR\ 'u -\fBgapplication\fR action \fIAPPID\fR \fIACTION\fR [\fIPARAMETER\fR] -.SH "DESCRIPTION" -.PP -\fBgapplication\fR -is a commandline implementation of the client\-side of the -org\&.freedesktop\&.Application -interface as specified by the freedesktop\&.org Desktop Entry Specification\&. -.PP -\fBgapplication\fR -can be used to start applications that have -\fIDBusActivatable\fR -set to -true -in their -\&.desktop -files and can be used to send messages to already\-running instances of other applications\&. -.PP -It is possible for applications to refer to -\fBgapplication\fR -in the -\fIExec\fR -line of their -\&.desktop -file to maintain backwards compatibility with implementations that do not directly support -\fIDBusActivatable\fR\&. -.PP -\fBgapplication\fR -ships as part of -GLib\&. -.SH "COMMANDS" -.SS "Global commands" -.PP -\fBhelp\fR [\fICOMMAND\fR] -.RS 4 -Displays a short synopsis of the available commands or provides detailed help on a specific command\&. -.RE -.PP -\fBversion\fR -.RS 4 -Prints the GLib version whence -\fBgapplication\fR -came\&. -.RE -.PP -\fBlist\-apps\fR -.RS 4 -Prints a list of all application IDs that are known to support D\-Bus activation\&. This list is generated by scanning -\&.desktop -files as per the current -\fBXDG_DATA_DIRS\fR\&. -.RE -.PP -\fBlaunch\fR \fIAPPID\fR [\fIFILE\fR...] -.RS 4 -Launches an application\&. -.sp -The first parameter is the application ID in the familiar "reverse DNS" style (eg: \*(Aqorg\&.gnome\&.app\*(Aq) without the -\&.desktop -suffix\&. -.sp -Optionally, if additional parameters are given, they are treated as the names of files to open and may be filenames or URIs\&. If no files are given then the application is simply activated\&. -.RE -.PP -\fBlist\-actions\fR \fIAPPID\fR -.RS 4 -List the actions declared in the application\*(Aqs -\&.desktop -file\&. The parameter is the application ID, as above\&. -.RE -.PP -\fBaction\fR \fIAPPID\fR \fIACTION\fR [\fIPARAMETER\fR] -.RS 4 -Invokes the named action (in the same way as would occur when activating an action specified in the -\&.desktop -file)\&. -.sp -The application ID (as above) is the first parameter\&. The action name follows\&. -.sp -Optionally, following the action name can be one parameter, in GVariant format, given as a single argument\&. Make sure to use sufficient quoting\&. -.RE -.SH "EXAMPLES" -.SS "From the commandline" -.PP -Launching an application: -.sp -.if n \{\ -.RS 4 -.\} -.nf - gapplication launch org\&.example\&.fooview - -.fi -.if n \{\ -.RE -.\} -.PP -Opening a file with an application: -.sp -.if n \{\ -.RS 4 -.\} -.nf - gapplication launch org\&.example\&.fooview ~/file\&.foo - -.fi -.if n \{\ -.RE -.\} -.PP -Opening many files with an application: -.sp -.if n \{\ -.RS 4 -.\} -.nf - gapplication launch org\&.example\&.fooview ~/foos/*\&.foo - -.fi -.if n \{\ -.RE -.\} -.PP -Invoking an action on an application: -.sp -.if n \{\ -.RS 4 -.\} -.nf - gapplication action org\&.example\&.fooview create - -.fi -.if n \{\ -.RE -.\} -.PP -Invoking an action on an application, with an action: -.sp -.if n \{\ -.RS 4 -.\} -.nf - gapplication action org\&.example\&.fooview show\-item \*(Aq"item_id_828739"\*(Aq - -.fi -.if n \{\ -.RE -.\} -.SS "From the \fIExec\fR lines of a \&.desktop file" -.PP -The commandline interface of -\fBgapplication\fR -was designed so that it could be used directly from the -\fIExec\fR -line of a -\&.desktop -file\&. -.PP -You might want to do this to allow for backwards compatibility with implementations of the specification that do not understand how to do D\-Bus activation, without having to install a separate utility program\&. -.PP -Consider the following example: -.sp -.if n \{\ -.RS 4 -.\} -.nf - [Desktop Entry] - Version=1\&.1 - Type=Application - Name=Foo Viewer - DBusActivatable=true - MimeType=image/x\-foo; - Exec=gapplication launch org\&.example\&.fooview %F - Actions=gallery;create; - - [Desktop Action gallery] - Name=Browse Gallery - Exec=gapplication action org\&.example\&.fooview gallery - - [Desktop Action create] - Name=Create a new Foo! - Exec=gapplication action org\&.example\&.fooview create - -.fi -.if n \{\ -.RE -.\} -.SS "From a script" -.PP -If installing an application that supports D\-Bus activation you may still want to put a file in -/usr/bin -so that your program can be started from a terminal\&. -.PP -It is possible for this file to be a shell script\&. The script can handle arguments such as \-\-help and \-\-version directly\&. It can also parse other command line arguments and convert them to uses of -\fBgapplication\fR -to activate the application, open files, or invoke actions\&. -.PP -Here is a simplified example, as may be installed in -/usr/bin/fooview: -.sp -.if n \{\ -.RS 4 -.\} -.nf - #!/bin/sh - - case "$1" in - \-\-help) - echo "see \*(Aqman fooview\*(Aq for more information" - ;; - - \-\-version) - echo "fooview 1\&.2" - ;; - - \-\-gallery) - gapplication action org\&.example\&.fooview gallery - ;; - - \-\-create) - gapplication action org\&.example\&.fooview create - ;; - - \-*) - echo "unrecognised commandline argument" - exit 1 - ;; - - *) - gapplication launch org\&.example\&.fooview "$@" - ;; - esac - -.fi -.if n \{\ -.RE -.\} -.SH "SEE ALSO" -.PP -\m[blue]\fBDesktop Entry Specification\fR\m[]\&\s-2\u[1]\d\s+2, -\fBgdbus\fR(1), -\fBxdg-open\fR(1), -\fBdesktop-file-validate\fR(1) -.SH "NOTES" -.IP " 1." 4 -Desktop Entry Specification -.RS 4 -\%http://standards.freedesktop.org/desktop-entry-spec/latest/ -.RE diff --git a/docs/reference/gio/gdbus-codegen.1 b/docs/reference/gio/gdbus-codegen.1 deleted file mode 100644 index d88c6f491..000000000 --- a/docs/reference/gio/gdbus-codegen.1 +++ /dev/null @@ -1,780 +0,0 @@ -'\" t -.\" Title: gdbus-codegen -.\" Author: David Zeuthen -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 06/22/2017 -.\" Manual: User Commands -.\" Source: GIO -.\" Language: English -.\" -.TH "GDBUS\-CODEGEN" "1" "" "GIO" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -gdbus-codegen \- D\-Bus code and documentation generator -.SH "SYNOPSIS" -.HP \w'\fBgdbus\-codegen\fR\ 'u -\fBgdbus\-codegen\fR [\fB\-h\fR,\ \fB\-\-help\fR] [\fB\-\-interface\-prefix\fR\ \fIorg\&.project\&.Prefix\fR] [\fB\-\-generate\-c\-code\fR\ \fIOUTFILES\fR] [\fB\-\-c\-namespace\fR\ \fIYourProject\fR] [\fB\-\-c\-generate\-object\-manager\fR] [\fB\-\-c\-generate\-autocleanup\fR\ none|objects|all] [\fB\-\-output\-directory\fR\ \fIOUTDIR\fR] [\fB\-\-generate\-docbook\fR\ \fIOUTFILES\fR] [\fB\-\-xml\-files\fR\ \fIFILE\fR] [\fB\-\-annotate\fR\ \fIELEMENT\fR\ \fIKEY\fR\ \fIVALUE\fR]... FILE [FILE...] -.SH "DESCRIPTION" -.PP -\fBgdbus\-codegen\fR -is used to generate code and/or documentation for one or more D\-Bus interfaces\&. The tool reads -\m[blue]\fBD\-Bus Introspection XML\fR\m[]\&\s-2\u[1]\d\s+2 -files and generates output files\&. The tool currently supports generating C code (via -\fB\-\-generate\-c\-code\fR) and Docbook XML (via -\fB\-\-generate\-docbook\fR)\&. -.SH "GENERATING C CODE" -.PP -When generating C code, a #GInterface -\-derived type is generated for each D\-Bus interface\&. Additionally, for every generated type, -\fBFooBar\fR, two concrete instantiable types, -\fBFooBarProxy\fR -and -\fBFooBarSkeleton\fR, implementing said interface are also generated\&. The former is derived from #GDBusProxy and intended for use on the client side while the latter is derived from the #GDBusInterfaceSkeleton type making it easy to export on a #GDBusConnection either directly or via a #GDBusObjectManagerServer instance\&. -.PP -The name of each generated C type is derived from the D\-Bus interface name stripped with the prefix given with -\fB\-\-interface\-prefix\fR -and with the dots removed and initial characters capitalized\&. For example, for the D\-Bus interface -com\&.acme\&.Coyote -the name used is -ComAcmeCoyote\&. For the D\-Bus interface -org\&.project\&.Bar\&.Frobnicator -with -\fB\-\-interface\-prefix\fR -org\&.project\&., the name used is -BarFrobnicator\&. -.PP -For methods, signals and properties, if not specified, the name defaults to the name of the method, signal or property\&. -.PP -Two forms of the name are used \- the CamelCase form and the lower\-case form\&. The CamelCase form is used for the #GType and struct name, while lower\-case form is used in function names\&. The lower\-case form is calculated by converting from CamelCase to lower\-case and inserting underscores at word boundaries (using certain heuristics)\&. -.PP -If the value given by the -org\&.gtk\&.GDBus\&.C\&.Name -annotation or the -\fB\-\-c\-namespace\fR -option contains an underscore (sometimes called -\fIUgly_Case\fR), then the camel\-case name is derived by removing all underscores, and the lower\-case name is derived by lower\-casing the string\&. This is useful in some situations where abbreviations are used\&. For example, if the annotation is used on the interface -net\&.MyCorp\&.MyApp\&.iSCSITarget -with the value -iSCSI_Target -the CamelCase form is -iSCSITarget -while the lower\-case form is -iscsi_target\&. If the annotation is used on the method -EjectTheiPod -with the value -Eject_The_iPod, the lower\-case form is -eject_the_ipod\&. -.SH "GENERATING DOCBOOK DOCUMENTATION" -.PP -Each generated Docbook XML file (see the -\fB\-\-generate\-docbook\fR -option for details) is a -\m[blue]\fBRefEntry\fR\m[]\&\s-2\u[2]\d\s+2 -article describing the D\-Bus interface\&. -.SH "OPTIONS" -.PP -The following options are supported: -.PP -\fB\-h\fR, \fB\-\-help\fR -.RS 4 -Show help and exit\&. -.RE -.PP -\fB\-\-xml\-files\fR \fIFILE\fR -.RS 4 -The D\-Bus introspection XML file\&. -.RE -.PP -\fB\-\-interface\-prefix\fR \fIorg\&.project\&.Prefix\&.\fR -.RS 4 -A prefix to strip from all D\-Bus interface names when calculating the typename for the C binding and the Docbook -\m[blue]\fBsortas attribute\fR\m[]\&\s-2\u[3]\d\s+2\&. -.RE -.PP -\fB\-\-generate\-docbook\fR \fIOUTFILES\fR -.RS 4 -Generate Docbook Documentation for each D\-Bus interface and put it in -OUTFILES\-NAME\&.xml -where -NAME -is a place\-holder for the interface name, e\&.g\&. -net\&.Corp\&.FooBar -and so on\&. -.RE -.PP -\fB\-\-generate\-c\-code\fR \fIOUTFILES\fR -.RS 4 -Generate C code for all D\-Bus interfaces and put it in -OUTFILES\&.c -and -OUTFILES\&.h -including any sub\-directories\&. If you want the files to be output in a different location use -\fB\-\-output\-directory\fR -as -OUTFILES\&.h -including sub\-directories will be referenced from -OUTFILES\&.c\&. -.sp -The full paths would then be -$(OUTDIR)/$(dirname $OUTFILES)/$(basename $OUTFILES)\&.{c,h}\&. -.RE -.PP -\fB\-\-c\-namespace\fR \fIYourProject\fR -.RS 4 -The namespace to use for generated C code\&. This is expected to be in -\m[blue]\fBCamelCase\fR\m[]\&\s-2\u[4]\d\s+2 -or -\fIUgly_Case\fR -(see above)\&. -.RE -.PP -\fB\-\-c\-generate\-object\-manager\fR -.RS 4 -If this option is passed, suitable #GDBusObject, #GDBusObjectProxy, #GDBusObjectSkeleton and #GDBusObjectManagerClient subclasses are generated\&. -.RE -.PP -\fB\-\-c\-generate\-autocleanup\fR none|objects|all -.RS 4 -This option influences what types autocleanup functions are generated for\&. \*(Aqnone\*(Aq means to not generate any autocleanup functions\&. \*(Aqobjects\*(Aq means to generate them for object types, and \*(Aqall\*(Aq means to generate them for object types and interfaces\&. The default is \*(Aqobjects\*(Aq due to a corner case in backwards compatibility with a few projects, but you should likely switch your project to use \*(Aqall\*(Aq\&. This option was added in GLib 2\&.50\&. -.RE -.PP -\fB\-\-output\-directory\fR \fIOUTDIR\fR -.RS 4 -Directory to output generated source to\&. Equivalent to changing directory before generation\&. -.RE -.PP -\fB\-\-annotate\fR \fIELEMENT\fR \fIKEY\fR \fIVALUE\fR -.RS 4 -Used to inject D\-Bus annotations into the given XML files\&. It can be used with interfaces, methods, signals, properties and arguments in the following way: -.sp -.if n \{\ -.RS 4 -.\} -.nf -gdbus\-codegen \-\-c\-namespace MyApp \e - \-\-generate\-c\-code myapp\-generated \e - \-\-annotate "org\&.project\&.InterfaceName" \e - org\&.gtk\&.GDBus\&.C\&.Name MyFrobnicator \e - \-\-annotate "org\&.project\&.InterfaceName:Property" \e - bar bat \e - \-\-annotate "org\&.project\&.InterfaceName\&.Method()" \e - org\&.freedesktop\&.DBus\&.Deprecated true \e - \-\-annotate "org\&.project\&.InterfaceName\&.Method()[arg_name]" \e - snake hiss \e - \-\-annotate "org\&.project\&.InterfaceName::Signal" \e - cat meow \e - \-\-annotate "org\&.project\&.InterfaceName::Signal[arg_name]" \e - dog wuff \e - myapp\-dbus\-interfaces\&.xml -.fi -.if n \{\ -.RE -.\} -Any UTF\-8 string can be used for -\fIKEY\fR -and -\fIVALUE\fR\&. -.RE -.SH "SUPPORTED D\-BUS ANNOTATIONS" -.PP -The following D\-Bus annotations are supported by -\fBgdbus\-codegen\fR: -.PP -org\&.freedesktop\&.DBus\&.Deprecated -.RS 4 -Can be used on any -, -, - -and - -element to specify that the element is deprecated if its value is -true\&. Note that this annotation is defined in the -\m[blue]\fBD\-Bus specification\fR\m[]\&\s-2\u[1]\d\s+2 -and can only assume the values -true -and -false\&. In particular, you cannot specify the version that the element was deprecated in nor any helpful deprecation message\&. Such information should be added to the element documentation instead\&. -.sp -When generating C code, this annotation is used to add #G_GNUC_DEPRECATED to generated functions for the element\&. -.sp -When generating Docbook XML, a deprecation warning will appear along the documentation for the element\&. -.RE -.PP -org\&.gtk\&.GDBus\&.Since -.RS 4 -Can be used on any -, -, - -and - -element to specify the version (any free\-form string but compared using a version\-aware sort function) the element appeared in\&. -.sp -When generating C code, this field is used to ensure function pointer order for preserving ABI/API, see -the section called \(lqSTABILITY GUARANTEES\(rq\&. -.sp -When generating Docbook XML, the value of this tag appears in the documentation\&. -.RE -.PP -org\&.gtk\&.GDBus\&.DocString -.RS 4 -A string with Docbook content for documentation\&. This annotation can be used on -, -, -, - -and - -elements\&. -.RE -.PP -org\&.gtk\&.GDBus\&.DocString\&.Short -.RS 4 -A string with Docbook content for short/brief documentation\&. This annotation can only be used on - -elements\&. -.RE -.PP -org\&.gtk\&.GDBus\&.C\&.Name -.RS 4 -Can be used on any -, -, - -and - -element to specify the name to use when generating C code\&. The value is expected to be in -\m[blue]\fBCamelCase\fR\m[]\&\s-2\u[4]\d\s+2 -or -\fIUgly_Case\fR -(see above)\&. -.RE -.PP -org\&.gtk\&.GDBus\&.C\&.ForceGVariant -.RS 4 -If set to a non\-empty string, a #GVariant instance will be used instead of the natural C type\&. This annotation can be used on any - -and - -element\&. -.RE -.PP -org\&.gtk\&.GDBus\&.C\&.UnixFD -.RS 4 -If set to a non\-empty string, the generated code will include parameters to exchange file descriptors using the #GUnixFDList type\&. This annotation can be used on - -elements\&. -.RE -.PP -As an easier alternative to using the -org\&.gtk\&.GDBus\&.DocString -annotation, note that parser used by -\fBgdbus\-codegen\fR -parses XML comments in a way similar to -\m[blue]\fBgtk\-doc\fR\m[]\&\s-2\u[5]\d\s+2: -.sp .if n \{\ .RS 4 .\} .nf longer description\&. This is a new paragraph\&. \-\-> .fi .if n \{\ .RE .\} -.PP -Note that -@since -can be used in any inline documentation bit (e\&.g\&. for interfaces, methods, signals and properties) to set the -org\&.gtk\&.GDBus\&.Since -annotation\&. For the -org\&.gtk\&.GDBus\&.DocString -annotation (and inline comments), note that substrings of the form -#net\&.Corp\&.Bar, -net\&.Corp\&.Bar\&.FooMethod(), -#net\&.Corp\&.Bar::BarSignal -and -#net\&.Corp\&.InlineDocs:BazProperty -are all expanded to links to the respective interface, method, signal and property\&. Additionally, substrings starting with -@ -and -% -characters are rendered as -\m[blue]\fBparameter\fR\m[]\&\s-2\u[6]\d\s+2 -and -\m[blue]\fBconstant\fR\m[]\&\s-2\u[7]\d\s+2 -respectively\&. -.PP -If both XML comments and -org\&.gtk\&.GDBus\&.DocString -or -org\&.gtk\&.GDBus\&.DocString\&.Short -annotations are present, the latter wins\&. -.SH "EXAMPLE" -.PP -Consider the following D\-Bus Introspection XML\&. -.sp -.if n \{\ -.RS 4 -.\} -.nf - - - - - - - - - - - - - - - - -.fi -.if n \{\ -.RE -.\} -.PP -If -\fBgdbus\-codegen\fR -is used on this file like this: -.sp -.if n \{\ -.RS 4 -.\} -.nf -gdbus\-codegen \-\-generate\-c\-code myapp\-generated \e - \-\-c\-namespace MyApp \e - \-\-interface\-prefix net\&.corp\&.MyApp\&. \e - net\&.Corp\&.MyApp\&.Frobber\&.xml -.fi -.if n \{\ -.RE -.\} -.PP -two files called -myapp\-generated\&.[ch] -are generated\&. The files provide an abstract #GTypeInterface -\-derived type called -\fBMyAppFrobber\fR -as well as two instantiable types with the same name but suffixed with -\fBProxy\fR -and -\fBSkeleton\fR\&. The generated file, roughly, contains the following facilities: -.sp -.if n \{\ -.RS 4 -.\} -.nf -/* GType macros for the three generated types */ -#define MY_APP_TYPE_FROBBER (my_app_frobber_get_type ()) -#define MY_APP_TYPE_FROBBER_SKELETON (my_app_frobber_skeleton_get_type ()) -#define MY_APP_TYPE_FROBBER_PROXY (my_app_frobber_proxy_get_type ()) - -typedef struct _MyAppFrobber MyAppFrobber; /* Dummy typedef */ - -typedef struct -{ - GTypeInterface parent_iface; - - /* Signal handler for the ::notification signal */ - void (*notification) (MyAppFrobber *proxy, - GVariant *icon_blob, - gint height, - const gchar* const *messages); - - /* Signal handler for the ::handle\-hello\-world signal */ - gboolean (*handle_hello_world) (MyAppFrobber *proxy, - GDBusMethodInvocation *invocation, - const gchar *greeting); -} MyAppFrobberIface; - -/* Asynchronously calls HelloWorld() */ -void -my_app_frobber_call_hello_world (MyAppFrobber *proxy, - const gchar *greeting, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -gboolean -my_app_frobber_call_hello_world_finish (MyAppFrobber *proxy, - gchar **out_response, - GAsyncResult *res, - GError **error); - -/* Synchronously calls HelloWorld()\&. Blocks calling thread\&. */ -gboolean -my_app_frobber_call_hello_world_sync (MyAppFrobber *proxy, - const gchar *greeting, - gchar **out_response, - GCancellable *cancellable, - GError **error); - -/* Completes handling the HelloWorld() method call */ -void -my_app_frobber_complete_hello_world (MyAppFrobber *object, - GDBusMethodInvocation *invocation, - const gchar *response); - -/* Emits the ::notification signal / Notification() D\-Bus signal */ -void -my_app_frobber_emit_notification (MyAppFrobber *object, - GVariant *icon_blob, - gint height, - const gchar* const *messages); - -/* Gets the :verbose GObject property / Verbose D\-Bus property\&. - * Does no blocking I/O\&. - */ -gboolean my_app_frobber_get_verbose (MyAppFrobber *object); - -/* Sets the :verbose GObject property / Verbose D\-Bus property\&. - * Does no blocking I/O\&. - */ -void my_app_frobber_set_verbose (MyAppFrobber *object, - gboolean value); - -/* Gets the interface info */ -GDBusInterfaceInfo *my_app_frobber_interface_info (void); - -/* Creates a new skeleton object, ready to be exported */ -MyAppFrobber *my_app_frobber_skeleton_new (void); - -/* Client\-side proxy constructors\&. - * - * Additionally, _new_for_bus(), _new_for_bus_finish() and - * _new_for_bus_sync() proxy constructors are also generated\&. - */ -void -my_app_frobber_proxy_new (GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -MyAppFrobber * -my_app_frobber_proxy_new_finish (GAsyncResult *res, - GError **error); -MyAppFrobber * -my_app_frobber_proxy_new_sync (GDBusConnection *connection, - GDBusProxyFlags flags, - const gchar *name, - const gchar *object_path, - GCancellable *cancellable, - GError **error); -.fi -.if n \{\ -.RE -.\} -.PP -Thus, for every D\-Bus method, there will be three C functions for calling the method, one #GObject signal for handling an incoming call and one C function for completing an incoming call\&. For every D\-Bus signal, there\*(Aqs one #GObject signal and one C function for emitting it\&. For every D\-Bus property, two C functions are generated (one setter, one getter) and one #GObject property\&. The following table summarizes the generated facilities and where they are applicable: -.TS -allbox tab(:); -lB lB lB. -T{ -\ \& -T}:T{ -Client -T}:T{ -Server -T} -.T& -l l l -l l l -l l l -l l l -l l l. -T{ -Types -T}:T{ -Use \fBMyAppFrobberProxy\fR -T}:T{ -Any type implementing the \fBMyAppFrobber\fR interface -T} -T{ -Methods -T}:T{ -Use \fBm_a_f_hello_world()\fR to call\&. -T}:T{ -Receive via the \fBhandle_hello_world()\fR signal handler\&. Complete the call with \fBm_a_f_complete_hello_world()\fR -T} -T{ -Signals -T}:T{ -Connect to the \fB::notification\fR GObject signal\&. -T}:T{ -Use \fBm_a_f_emit_notification()\fR to emit signal\&. -T} -T{ -Properties (Reading) -T}:T{ -Use \fBm_a_f_get_verbose()\fR or \fI:verbose\fR\&. -T}:T{ -Implement #GObject\*(Aqs \fBget_property()\fR vfunc\&. -T} -T{ -Properties (writing) -T}:T{ -Use \fBm_a_f_set_verbose()\fR or \fI:verbose\fR\&. -T}:T{ -Implement #GObject\*(Aqs \fBset_property()\fR vfunc\&. -T} -.TE -.sp 1 -.SS "Client\-side usage" -.PP -You can use the generated proxy type with the generated constructors: -.sp -.if n \{\ -.RS 4 -.\} -.nf - MyAppFrobber *proxy; - GError *error; - - error = NULL; - proxy = my_app_frobber_proxy_new_for_bus_sync ( - G_BUS_TYPE_SESSION, - G_DBUS_PROXY_FLAGS_NONE, - "net\&.Corp\&.MyApp", /* bus name */ - "/net/Corp/MyApp/SomeFrobber", /* object */ - NULL, /* GCancellable* */ - &error); - /* do stuff with proxy */ - g_object_unref (proxy); -.fi -.if n \{\ -.RE -.\} -.PP -Instead of using the generic #GDBusProxy facilities, one can use the generated methods such as -\fBmy_app_frobber_call_hello_world()\fR -to invoke the -\fBnet\&.Corp\&.MyApp\&.Frobber\&.HelloWorld()\fR -D\-Bus method, connect to the -\fB::notification\fR -GObject signal to receive the -\fBnet\&.Corp\&.MyApp\&.Frobber::Notication\fR -D\-Bus signal and get/set the -\fInet\&.Corp\&.MyApp\&.Frobber:Verbose\fR -D\-Bus Property using either the GObject property -\fI:verbose\fR -or the -\fBmy_app_get_verbose()\fR -and -\fBmy_app_set_verbose()\fR -methods\&. Use the standard #GObject::notify signal to listen to property changes\&. -.PP -Note that all property access is via #GDBusProxy -\*(Aqs property cache so no I/O is ever done when reading properties\&. Also note that setting a property will cause the -\m[blue]\fBorg\&.freedesktop\&.DBus\&.Properties\&.Set\fR\m[]\&\s-2\u[8]\d\s+2 -method to be called on the remote object\&. This call, however, is asynchronous so setting a property won\*(Aqt block\&. Further, the change is delayed and no error checking is possible\&. -.SS "Server\-side usage" -.PP -The generated -\fBMyAppFrobber\fR -interface is designed so it is easy to implement it in a #GObject subclass\&. For example, to handle -\fBHelloWorld()\fR -method invocations, set the vfunc for -\fBhandle_hello_hello_world()\fR -in the -\fBMyAppFrobberIface\fR -structure\&. Similary, to handle the -\fInet\&.Corp\&.MyApp\&.Frobber:Verbose\fR -property override the -\fI:verbose\fR -#GObject property from the subclass\&. To emit a signal, use e\&.g\&. -\fBmy_app_emit_signal()\fR -or g_signal_emit_by_name()\&. -.PP -Instead of subclassing, it is often easier to use the generated -\fBMyAppFrobberSkeleton\fR -subclass\&. To handle incoming method calls, use -\fBg_signal_connect()\fR -with the -\fB::handle\-*\fR -signals and instead of overriding #GObject -\*(Aqs -\fBget_property()\fR -and -\fBset_property()\fR -vfuncs, use g_object_get() and g_object_set() or the generated property getters and setters (the generated class has an internal property bag implementation)\&. -.sp -.if n \{\ -.RS 4 -.\} -.nf -static gboolean -on_handle_hello_world (MyAppFrobber *interface, - GDBusMethodInvocation *invocation, - const gchar *greeting, - gpointer user_data) -{ - if (g_strcmp0 (greeting, "Boo") != 0) - { - gchar *response; - response = g_strdup_printf ("Word! You said `%s\*(Aq\&.", greeting); - my_app_complete_hello_world (interface, invocation, response); - g_free (response); - } - else - { - g_dbus_method_invocation_return_error (invocation, - MY_APP_ERROR, - MY_APP_ERROR_NO_WHINING, - "Hey, %s, there will be no whining!", - g_dbus_method_invocation_get_sender (invocation)); - } - return TRUE; -} - - [\&.\&.\&.] - - interface = my_app_frobber_skeleton_new (); - my_app_frobber_set_verbose (interface, TRUE); - - g_signal_connect (interface, - "handle\-hello\-world", - G_CALLBACK (on_handle_hello_world), - some_user_data); - - [\&.\&.\&.] - - error = NULL; - if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (interface), - connection, - "/path/of/dbus_object", - &error)) - { - /* handle error */ - } -.fi -.if n \{\ -.RE -.\} -.PP -To facilitate atomic changesets (multiple properties changing at the same time), #GObject::notify signals are queued up when received\&. The queue is drained in an idle handler (which is called from the -thread\-default main loop -of the thread where the skeleton object was contructed) and will cause emissions of the -\m[blue]\fBorg\&.freedesktop\&.DBus\&.Properties::PropertiesChanged\fR\m[]\&\s-2\u[8]\d\s+2 -signal with all the properties that have changed\&. Use g_dbus_interface_skeleton_flush() or g_dbus_object_skeleton_flush() to empty the queue immediately\&. Use g_object_freeze_notify() and g_object_thaw_notify() for atomic changesets if on a different thread\&. -.SH "C TYPE MAPPING" -.PP -Scalar types (type\-strings -\*(Aqb\*(Aq, -\*(Aqy\*(Aq, -\*(Aqn\*(Aq, -\*(Aqq\*(Aq, -\*(Aqi\*(Aq, -\*(Aqu\*(Aq, -\*(Aqx\*(Aq, -\*(Aqt\*(Aq -and -\*(Aqd\*(Aq) ), strings (type\-strings -\*(Aqs\*(Aq, -\*(Aqay\*(Aq, -\*(Aqo\*(Aq -and -\*(Aqg\*(Aq) and arrays of string (type\-strings -\*(Aqas\*(Aq, -\*(Aqao\*(Aq -and -\*(Aqaay\*(Aq) are mapped to the natural types, e\&.g\&. #gboolean, #gdouble, #gint, -gchar*, -gchar** -and so on\&. Everything else is mapped to the #GVariant type\&. -.PP -This automatic mapping can be turned off by using the annotation -org\&.gtk\&.GDBus\&.C\&.ForceGVariant -\- if used then a #GVariant is always exchanged instead of the corresponding native C type\&. This annotation may be convenient to use when using bytestrings (type\-string -\*(Aqay\*(Aq) for data that could have embedded NUL bytes\&. -.SH "STABILITY GUARANTEES" -.PP -The generated C functions are guaranteed to not change their ABI that is, if a method, signal or property does not change its signature in the introspection XML, the generated C functions will not change its C ABI either\&. The ABI of the generated instance and class structures will be preserved as well\&. -.PP -The ABI of the generated #GType -s will be preserved only if the -org\&.gtk\&.GDBus\&.Since -annotation is used judiciously \(em this is because the VTable for the #GInterface relies on functions pointers for signal handlers\&. Specifically, if a D\-Bus method, property or signal or is added to a D\-Bus interface, then ABI of the generated #GInterface type is preserved if, and only if, each added method, property signal is annotated with they -org\&.gtk\&.GDBus\&.Since -annotation using a greater version number than previous versions\&. -.PP -The generated C code currently happens to be annotated with -\m[blue]\fBgtk\-doc\fR\m[]\&\s-2\u[5]\d\s+2 -/ -\m[blue]\fBGObject Introspection\fR\m[]\&\s-2\u[9]\d\s+2 -comments / annotations\&. The layout and contents might change in the future so no guarantees about e\&.g\&. -SECTION -usage etc\&. is given\&. -.PP -While the generated Docbook for D\-Bus interfaces isn\*(Aqt expected to change, no guarantees are given at this point\&. -.PP -It is important to note that the generated code should not be checked into revision control systems, nor it should be included in distributed source archives\&. -.SH "BUGS" -.PP -Please send bug reports to either the distribution bug tracker or the upstream bug tracker at -\m[blue]\fBhttps://bugzilla\&.gnome\&.org/enter_bug\&.cgi?product=glib\fR\m[]\&. -.SH "SEE ALSO" -.PP -\fBgdbus\fR(1) -.SH "NOTES" -.IP " 1." 4 -D-Bus Introspection XML -.RS 4 -\%http://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format -.RE -.IP " 2." 4 -RefEntry -.RS 4 -\%http://www.docbook.org/tdg/en/html/refentry.html -.RE -.IP " 3." 4 -sortas attribute -.RS 4 -\%http://www.docbook.org/tdg/en/html/primary.html -.RE -.IP " 4." 4 -CamelCase -.RS 4 -\%http://en.wikipedia.org/wiki/CamelCase -.RE -.IP " 5." 4 -gtk-doc -.RS 4 -\%http://www.gtk.org/gtk-doc/ -.RE -.IP " 6." 4 -parameter -.RS 4 -\%http://www.docbook.org/tdg/en/html/parameter.html -.RE -.IP " 7." 4 -constant -.RS 4 -\%http://www.docbook.org/tdg/en/html/constant.html -.RE -.IP " 8." 4 -org.freedesktop.DBus.Properties.Set -.RS 4 -\%http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties -.RE -.IP " 9." 4 -GObject Introspection -.RS 4 -\%https://wiki.gnome.org/Projects/GObjectIntrospection -.RE diff --git a/docs/reference/gio/gdbus.1 b/docs/reference/gio/gdbus.1 deleted file mode 100644 index 41644a4bc..000000000 --- a/docs/reference/gio/gdbus.1 +++ /dev/null @@ -1,324 +0,0 @@ -'\" t -.\" Title: gdbus -.\" Author: David Zeuthen -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 06/22/2017 -.\" Manual: User Commands -.\" Source: GIO -.\" Language: English -.\" -.TH "GDBUS" "1" "" "GIO" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -gdbus \- Tool for working with D\-Bus objects -.SH "SYNOPSIS" -.HP \w'\fBgdbus\fR\ 'u -\fBgdbus\fR introspect [\-\-system | \-\-session | \-\-address\ \fIaddress\fR] \-\-dest\ \fIbus_name\fR \-\-object\-path\ \fI/path/to/object\fR [\-\-xml] [\-\-recurse] [\-\-only\-properties] -.HP \w'\fBgdbus\fR\ 'u -\fBgdbus\fR monitor [\-\-system | \-\-session | \-\-address\ \fIaddress\fR] \-\-dest\ \fIbus_name\fR [\-\-object\-path\ \fI/path/to/object\fR] -.HP \w'\fBgdbus\fR\ 'u -\fBgdbus\fR call [\-\-system | \-\-session | \-\-address\ \fIaddress\fR] \-\-dest\ \fIbus_name\fR \-\-object\-path\ \fI/path/to/object\fR \-\-method\ \fIorg\&.project\&.InterfaceName\&.MethodName\fR [\-\-timeout\ \fIseconds\fR] ARG1 ARG2... -.HP \w'\fBgdbus\fR\ 'u -\fBgdbus\fR emit [\-\-system | \-\-session | \-\-address\ \fIaddress\fR] \-\-object\-path\ \fI/path/to/object\fR \-\-signal\ \fIorg\&.project\&.InterfaceName\&.SignalName\fR [\-\-dest\ \fIunique_bus_name\fR] ARG1 ARG2... -.HP \w'\fBgdbus\fR\ 'u -\fBgdbus\fR help -.SH "DESCRIPTION" -.PP -\fBgdbus\fR -is a simple tool for working with D\-Bus objects\&. -.SH "COMMANDS" -.PP -\fBintrospect\fR -.RS 4 -Prints out interfaces and property values for a remote object\&. For this to work, the owner of the object needs to implement the -org\&.freedesktop\&.DBus\&.Introspectable -interface\&. If the -\fB\-\-xml\fR -option is used, the returned introspection XML is printed, otherwise a parsed pretty representation is printed\&. The -\fB\-\-recurse\fR -option can be used to introspect children (and their children and so on) and the -\fB\-\-only\-properties\fR -option can be used to only print the interfaces with properties\&. -.RE -.PP -\fBmonitor\fR -.RS 4 -Monitors one or all objects owned by the owner of -\fIbus_name\fR\&. -.RE -.PP -\fBcall\fR -.RS 4 -Invokes a method on a remote object\&. Each argument to pass to the method must be specified as a serialized -\fBGVariant\fR -except that strings do not need explicit quotes\&. The return values are printed out as serialized -\fBGVariant\fR -values\&. -.RE -.PP -\fBemit\fR -.RS 4 -Emits a signal\&. Each argument to include in the signal must be specified as a serialized -\fBGVariant\fR -except that strings do not need explicit quotes\&. -.RE -.PP -\fBhelp\fR -.RS 4 -Prints help and exit\&. -.RE -.SH "BASH COMPLETION" -.PP -\fBgdbus\fR -ships with a bash completion script to complete commands, destinations, bus names, object paths and interface/method names\&. -.SH "EXAMPLES" - - This shows how to introspect an object \- note that the value of each - property is displayed: -.sp -.if n \{\ -.RS 4 -.\} -.nf -$ gdbus introspect \-\-system \e - \-\-dest org\&.freedesktop\&.NetworkManager \e - \-\-object\-path /org/freedesktop/NetworkManager/Devices/0 -node /org/freedesktop/NetworkManager/Devices/0 { - interface org\&.freedesktop\&.DBus\&.Introspectable { - methods: - Introspect(out s data); - }; - interface org\&.freedesktop\&.DBus\&.Properties { - methods: - Get(in s interface, - in s propname, - out v value); - Set(in s interface, - in s propname, - in v value); - GetAll(in s interface, - out a{sv} props); - }; - interface org\&.freedesktop\&.NetworkManager\&.Device\&.Wired { - signals: - PropertiesChanged(a{sv} arg_0); - properties: - readonly b Carrier = false; - readonly u Speed = 0; - readonly s HwAddress = \*(Aq00:1D:72:88:BE:97\*(Aq; - }; - interface org\&.freedesktop\&.NetworkManager\&.Device { - methods: - Disconnect(); - signals: - StateChanged(u arg_0, - u arg_1, - u arg_2); - properties: - readonly u DeviceType = 1; - readonly b Managed = true; - readwrite o Ip6Config = \*(Aq/\*(Aq; - readwrite o Dhcp4Config = \*(Aq/\*(Aq; - readwrite o Ip4Config = \*(Aq/\*(Aq; - readonly u State = 2; - readwrite u Ip4Address = 0; - readonly u Capabilities = 3; - readonly s Driver = \*(Aqe1000e\*(Aq; - readwrite s Interface = \*(Aqeth0\*(Aq; - readonly s Udi = \*(Aq/sys/devices/pci0000:00/0000:00:19\&.0/net/eth0\*(Aq; - }; -}; -.fi -.if n \{\ -.RE -.\} -.PP -The -\fB\-\-recurse\fR -and -\fB\-\-only\-properties\fR -options can be useful when wanting to inspect all objects owned by a particular process: -.sp -.if n \{\ -.RS 4 -.\} -.nf -$ gdbus introspect \-\-system \-\-dest org\&.freedesktop\&.UPower \-\-object\-path / \-\-recurse \-\-only\-properties -node / { - node /org { - node /org/freedesktop { - node /org/freedesktop/UPower { - interface org\&.freedesktop\&.UPower { - properties: - readonly b IsDocked = true; - readonly b LidForceSleep = false; - readonly b LidIsPresent = false; - readonly b LidIsClosed = false; - readonly b OnLowBattery = false; - readonly b OnBattery = false; - readonly b CanHibernate = true; - readonly b CanSuspend = true; - readonly s DaemonVersion = \*(Aq0\&.9\&.10\*(Aq; - }; - node /org/freedesktop/UPower/Policy { - }; - node /org/freedesktop/UPower/Wakeups { - interface org\&.freedesktop\&.UPower\&.Wakeups { - properties: - readonly b HasCapability = true; - }; - }; - }; - }; - }; -}; -.fi -.if n \{\ -.RE -.\} -.PP -In a similar fashion, the -\fBintrospect\fR -command can be used to learn details about the -Notify -method: -.sp -.if n \{\ -.RS 4 -.\} -.nf -[\&.\&.\&.] - interface org\&.freedesktop\&.Notifications { - methods: - GetServerInformation(out s return_name, - out s return_vendor, - out s return_version, - out s return_spec_version); - GetCapabilities(out as return_caps); - CloseNotification(in u id); - Notify(in s app_name, - in u id, - in s icon, - in s summary, - in s body, - in as actions, - in a{sv} hints, - in i timeout, - out u return_id); - }; -[\&.\&.\&.] -.fi -.if n \{\ -.RE -.\} -.PP -With this information, it\*(Aqs easy to use the -\fBcall\fR -command to display a notification -.sp -.if n \{\ -.RS 4 -.\} -.nf -$ gdbus call \-\-session \e - \-\-dest org\&.freedesktop\&.Notifications \e - \-\-object\-path /org/freedesktop/Notifications \e - \-\-method org\&.freedesktop\&.Notifications\&.Notify \e - my_app_name \e - 42 \e - gtk\-dialog\-info \e - "The Summary" \e - "Here\*(Aqs the body of the notification" \e - [] \e - {} \e - 5000 -(uint32 12,) -.fi -.if n \{\ -.RE -.\} -.PP -Monitoring all objects on a service: -.sp -.if n \{\ -.RS 4 -.\} -.nf -$ gdbus monitor \-\-system \-\-dest org\&.freedesktop\&.ConsoleKit -Monitoring signals from all objects owned by org\&.freedesktop\&.ConsoleKit -The name org\&.freedesktop\&.ConsoleKit is owned by :1\&.15 -/org/freedesktop/ConsoleKit/Session2: org\&.freedesktop\&.ConsoleKit\&.Session\&.ActiveChanged (false,) -/org/freedesktop/ConsoleKit/Seat1: org\&.freedesktop\&.ConsoleKit\&.Seat\&.ActiveSessionChanged (\*(Aq\*(Aq,) -/org/freedesktop/ConsoleKit/Session2: org\&.freedesktop\&.ConsoleKit\&.Session\&.ActiveChanged (true,) -/org/freedesktop/ConsoleKit/Seat1: org\&.freedesktop\&.ConsoleKit\&.Seat\&.ActiveSessionChanged (\*(Aq/org/freedesktop/ConsoleKit/Session2\*(Aq,) -.fi -.if n \{\ -.RE -.\} -.PP -Monitoring a single object on a service: -.sp -.if n \{\ -.RS 4 -.\} -.nf -$ gdbus monitor \-\-system \-\-dest org\&.freedesktop\&.NetworkManager \-\-object\-path /org/freedesktop/NetworkManager/AccessPoint/4141 -Monitoring signals on object /org/freedesktop/NetworkManager/AccessPoint/4141 owned by org\&.freedesktop\&.NetworkManager -The name org\&.freedesktop\&.NetworkManager is owned by :1\&.5 -/org/freedesktop/NetworkManager/AccessPoint/4141: org\&.freedesktop\&.NetworkManager\&.AccessPoint\&.PropertiesChanged ({\*(AqStrength\*(Aq: },) -/org/freedesktop/NetworkManager/AccessPoint/4141: org\&.freedesktop\&.NetworkManager\&.AccessPoint\&.PropertiesChanged ({\*(AqStrength\*(Aq: },) -/org/freedesktop/NetworkManager/AccessPoint/4141: org\&.freedesktop\&.NetworkManager\&.AccessPoint\&.PropertiesChanged ({\*(AqStrength\*(Aq: },) -/org/freedesktop/NetworkManager/AccessPoint/4141: org\&.freedesktop\&.NetworkManager\&.AccessPoint\&.PropertiesChanged ({\*(AqStrength\*(Aq: },) -.fi -.if n \{\ -.RE -.\} -.PP -Emitting a signal: -.sp -.if n \{\ -.RS 4 -.\} -.nf -$ gdbus emit \-\-session \-\-object\-path /foo \-\-signal org\&.bar\&.Foo "[\*(Aqfoo\*(Aq, \*(Aqbar\*(Aq, \*(Aqbaz\*(Aq]" -.fi -.if n \{\ -.RE -.\} -.PP -Emitting a signal to a specific process: -.sp -.if n \{\ -.RS 4 -.\} -.nf -$ gdbus emit \-\-session \-\-object\-path /bar \-\-signal org\&.bar\&.Bar someString \-\-dest :1\&.42 -.fi -.if n \{\ -.RE -.\} -.SH "BUGS" -.PP -Please send bug reports to either the distribution bug tracker or the upstream bug tracker at -\m[blue]\fB\%https://bugzilla.gnome.org/enter_bug.cgi?product=glib\fR\m[]\&. -.SH "SEE ALSO" -.PP -\fBdbus-send\fR(1) diff --git a/docs/reference/gio/gdbus.xml b/docs/reference/gio/gdbus.xml index 81682d921..efcec33fe 100644 --- a/docs/reference/gio/gdbus.xml +++ b/docs/reference/gio/gdbus.xml @@ -91,6 +91,20 @@ ARG1 ARG2 + + gdbus + wait + + --system + --session + --address address + + --activate bus_name + + --timeout seconds + + bus_name + gdbus help @@ -147,6 +161,15 @@ not need explicit quotes. + + + + Waits until bus_name is owned by some + process on the bus. If the is specified, + that bus name will be auto-started first. It may be the same as the + bus name being waited for, or different. + + @@ -337,6 +360,38 @@ $ gdbus emit --session --object-path /foo --signal org.bar.Foo "['foo', 'bar', ' $ gdbus emit --session --object-path /bar --signal org.bar.Bar someString --dest :1.42 + + Waiting for a well-known name to be owned on the bus; this will + not auto-start the service: + + +$ gdbus wait --session org.bar.SomeName + + + + Auto-starting then waiting for a well-known name to be owned on the bus: + + +$ gdbus wait --session --activate org.bar.SomeName + + + + Auto-starting a different service, then waiting for a well-known name to be + owned on the bus. This is useful in situations where + SomeName is not directly activatable: + + +$ gdbus wait --session --activate org.bar.PrerequisiteName org.bar.SomeName + + + + Waiting for a well-known name and giving up after 30 seconds. By default, + the timeout is disabled; or set to 0 to disable it: + + +$ gdbus wait --session --timeout 30 org.bar.SomeName + + diff --git a/docs/reference/gio/gio-overrides.txt b/docs/reference/gio/gio-overrides.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs/reference/gio/gio-querymodules.1 b/docs/reference/gio/gio-querymodules.1 deleted file mode 100644 index f6ec0aca1..000000000 --- a/docs/reference/gio/gio-querymodules.1 +++ /dev/null @@ -1,44 +0,0 @@ -'\" t -.\" Title: gio-querymodules -.\" Author: Alexander Larsson -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 06/22/2017 -.\" Manual: User Commands -.\" Source: GIO -.\" Language: English -.\" -.TH "GIO\-QUERYMODULES" "1" "" "GIO" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -gio-querymodules \- GIO module cache creation -.SH "SYNOPSIS" -.HP \w'\fBgio\-querymodules\fR\ 'u -\fBgio\-querymodules\fR {DIRECTORY...} -.SH "DESCRIPTION" -.PP -\fBgio\-querymodules\fR -creates a -giomodule\&.cache -file in the listed directories\&. This file lists the implemented extension points for each module that has been found\&. It is used by GIO at runtime to avoid opening all modules just to find out which extension points they are implementing\&. -.PP -GIO modules are usually installed in the -gio/modules -subdirectory of libdir\&. diff --git a/docs/reference/gio/gio-sections.txt b/docs/reference/gio/gio-sections.txt index dddb1d848..c21d71ee3 100644 --- a/docs/reference/gio/gio-sections.txt +++ b/docs/reference/gio/gio-sections.txt @@ -1537,6 +1537,7 @@ GUnixMountEntry GUnixMountMonitor g_unix_mount_free g_unix_mount_compare +g_unix_mount_copy g_unix_mount_get_mount_path g_unix_mount_get_device_path g_unix_mount_get_fs_type @@ -1549,6 +1550,7 @@ g_unix_mount_guess_can_eject g_unix_mount_guess_should_display g_unix_mount_point_free g_unix_mount_point_compare +g_unix_mount_point_copy g_unix_mount_point_get_mount_path g_unix_mount_point_get_device_path g_unix_mount_point_get_fs_type @@ -1576,8 +1578,12 @@ G_IS_UNIX_MOUNT_MONITOR G_TYPE_UNIX_MOUNT_MONITOR G_UNIX_MOUNT_MONITOR_CLASS G_IS_UNIX_MOUNT_MONITOR_CLASS +G_TYPE_UNIX_MOUNT_ENTRY +G_TYPE_UNIX_MOUNT_POINT g_unix_mount_monitor_get_type +g_unix_mount_entry_get_type +g_unix_mount_point_get_type
diff --git a/docs/reference/gio/gio.1 b/docs/reference/gio/gio.1 deleted file mode 100644 index 60c4f5487..000000000 --- a/docs/reference/gio/gio.1 +++ /dev/null @@ -1,583 +0,0 @@ -'\" t -.\" Title: gio -.\" Author: Matthias Clasen -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 06/22/2017 -.\" Manual: User Commands -.\" Source: GIO -.\" Language: English -.\" -.TH "GIO" "1" "" "GIO" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -gio \- GIO commandline tool -.SH "SYNOPSIS" -.HP \w'\fBgio\fR\ 'u -\fBgio\fR help [\fICOMMAND\fR] -.HP \w'\fBgio\fR\ 'u -\fBgio\fR version -.HP \w'\fBgio\fR\ 'u -\fBgio\fR cat \fILOCATION\fR... -.HP \w'\fBgio\fR\ 'u -\fBgio\fR copy [\fIOPTION\fR...] \fISOURCE\fR... \fIDESTINATION\fR -.HP \w'\fBgio\fR\ 'u -\fBgio\fR info [\fIOPTION\fR...] \fILOCATION\fR... -.HP \w'\fBgio\fR\ 'u -\fBgio\fR list [\fIOPTION\fR...] [\fILOCATION\fR...] -.HP \w'\fBgio\fR\ 'u -\fBgio\fR mime \fIMIMETYPE\fR [\fIHANDLER\fR] -.HP \w'\fBgio\fR\ 'u -\fBgio\fR mkdir [\fIOPTION\fR...] \fILOCATION\fR... -.HP \w'\fBgio\fR\ 'u -\fBgio\fR monitor [\fIOPTION\fR...] [\fILOCATION\fR...] -.HP \w'\fBgio\fR\ 'u -\fBgio\fR mount [\fIOPTION\fR...] [\fILOCATION\fR...] -.HP \w'\fBgio\fR\ 'u -\fBgio\fR move [\fIOPTION\fR...] \fISOURCE\fR... \fIDESTINATION\fR -.HP \w'\fBgio\fR\ 'u -\fBgio\fR open \fILOCATION\fR... -.HP \w'\fBgio\fR\ 'u -\fBgio\fR rename \fILOCATION\fR \fINAME\fR -.HP \w'\fBgio\fR\ 'u -\fBgio\fR remove [\fIOPTION\fR...] \fILOCATION\fR... -.HP \w'\fBgio\fR\ 'u -\fBgio\fR save [\fIOPTION\fR...] \fIDESTINATION\fR -.HP \w'\fBgio\fR\ 'u -\fBgio\fR set [\fIOPTION\fR...] \fILOCATION\fR \fIATTRIBUTE\fR \fIVALUE\fR... -.HP \w'\fBgio\fR\ 'u -\fBgio\fR trash [\fIOPTION\fR...] [\fILOCATION\fR...] -.HP \w'\fBgio\fR\ 'u -\fBgio\fR tree [\fIOPTION\fR...] [\fILOCATION\fR...] -.SH "DESCRIPTION" -.PP -\fBgio\fR -is a utility that makes many of the GIO features available from the commandline\&. In doing so, it provides commands that are similar to traditional utilities, but let you use GIO locations instead of local files: for example you can use something like -smb://server/resource/file\&.txt -as location\&. -.SH "COMMANDS" -.PP -\fBhelp\fR [\fICOMMAND\fR] -.RS 4 -Displays a short synopsis of the available commands or provides detailed help on a specific command\&. -.RE -.PP -\fBversion\fR -.RS 4 -Prints the GLib version to which -\fBgio\fR -belongs\&. -.RE -.PP -\fBcat\fR \fILOCATION\fR... -.RS 4 -Concatenates the given files and prints them to the standard output\&. -.sp -The cat command works just like the traditional cat utility\&. -.sp -Note: just pipe through cat if you need its formatting options like \-n, \-T or other\&. -.RE -.PP -\fBcopy\fR [\fIOPTION\fR...] \fISOURCE\fR... \fIDESTINATION\fR -.RS 4 -Copies one or more files from -\fISOURCE\fR -to -\fIDESTINATION\fR\&. If more than one source is specified, the destination must be a directory\&. -.sp -The copy command is similar to the traditional cp utility\&. -.sp -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBOptions\fR -.RS 4 -.PP -\fB\-T\fR, \fB\-\-no\-target\-directory\fR -.RS 4 -Don\*(Aqt copy into -\fIDESTINATION\fR -even if it is a directory\&. -.RE -.PP -\fB\-p\fR, \fB\-\-progress\fR -.RS 4 -Show progress\&. -.RE -.PP -\fB\-i\fR, \fB\-\-interactive\fR -.RS 4 -Prompt for confirmation before overwriting files\&. -.RE -.PP -\fB\-\-preserve\fR -.RS 4 -Preserve all attributes of copied files\&. -.RE -.PP -\fB\-b\fR, \fB\-\-backup\fR -.RS 4 -Create backups of existing destination files\&. -.RE -.PP -\fB\-P\fR, \fB\-\-no\-dereference\fR -.RS 4 -Never follow symbolic links\&. -.RE -.RE -.RE -.PP -\fBinfo\fR [\fIOPTION\fR...] \fILOCATION\fR... -.RS 4 -Shows information about the given locations\&. -.sp -The info command is similar to the traditional ls utility\&. -.sp -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBOptions\fR -.RS 4 -.PP -\fB\-w\fR, \fB\-\-query\-writable\fR -.RS 4 -List writable attributes\&. -.RE -.PP -\fB\-f\fR, \fB\-\-filesystem\fR -.RS 4 -Show information about the filesystem that the given locations reside on\&. -.RE -.PP -\fB\-a\fR \fB\-\-attributes=\fR\fB\fIATTRIBUTES\fR\fR -.RS 4 -The attributes to get\&. -.sp -Attributes can be specified with their GIO name, e\&.g\&. standard::icon, or just by namespace, e\&.g\&. unix, or by \*(Aq*\*(Aq, which matches all attributes\&. Several attributes or groups of attributes can be specified, separated by comma\&. -.sp -By default, all attributes are listed\&. -.RE -.PP -\fB\-n\fR, \fB\-\-nofollow\-symlinks\fR -.RS 4 -Don\*(Aqt follow symbolic links\&. -.RE -.RE -.RE -.PP -\fBlist\fR [\fIOPTION\fR...] [\fILOCATION\fR...] -.RS 4 -Lists the contents of the given locations\&. If no location is given, the contents of the current directory are shown\&. -.sp -The list command is similar to the traditional ls utility\&. -.sp -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBOptions\fR -.RS 4 -.PP -\fB\-a\fR \fB\-\-attributes=\fR\fB\fIATTRIBUTES\fR\fR -.RS 4 -The attributes to get\&. -.sp -Attributes can be specified with their GIO name, e\&.g\&. standard::icon, or just by namespace, e\&.g\&. unix, or by \*(Aq*\*(Aq, which matches all attributes\&. Several attributes or groups of attributes can be specified, separated by comma\&. -.sp -By default, all attributes are listed\&. -.RE -.PP -\fB\-h\fR, \fB\-\-hidden\fR -.RS 4 -Show hidden files\&. -.RE -.PP -\fB\-l\fR, \fB\-\-long\fR -.RS 4 -Use a long listing format\&. -.RE -.PP -\fB\-n\fR, \fB\-\-nofollow\-symlinks\fR -.RS 4 -Don\*(Aqt follow symbolic links\&. -.RE -.PP -\fB\-u\fR, \fB\-\-print\-uris\fR -.RS 4 -Print full URIs\&. -.RE -.RE -.RE -.PP -\fBmime\fR \fIMIMETYPE\fR [\fIHANDLER\fR] -.RS 4 -If no handler is given, the mime command lists the registered and recommended applications for the mimetype\&. If a handler is given, it is set as the default handler for the mimetype\&. -.sp -Handlers must be specified by their desktop file name, including the extension\&. Example: org\&.gnome\&.gedit\&.desktop\&. -.RE -.PP -\fBmkdir\fR [\fIOPTION\fR...] \fILOCATION\fR... -.RS 4 -Creates directories\&. -.sp -The mkdir command is similar to the traditional mkdir utility\&. -.sp -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBOptions\fR -.RS 4 -.PP -\fB\-p\fR, \fB\-\-parent\fR -.RS 4 -Create parent directories when necessary\&. -.RE -.RE -.RE -.PP -\fBmonitor\fR [\fIOPTION\fR...] [\fILOCATION\fR...] -.RS 4 -Monitors files or directories for changes, such as creation deletion, content and attribute changes, and mount and unmount operations affecting the monitored locations\&. -.sp -The monitor command uses the GIO file monitoring APIs to do its job\&. GIO has different implementations for different platforms\&. The most common implementation on Linux uses inotify\&. -.sp -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBOptions\fR -.RS 4 -.PP -\fB\-d\fR, \fB\-\-dir=\fR\fB\fILOCATION\fR\fR -.RS 4 -Monitor the given location as a directory\&. Normally, the file type is used to determine whether to monitor a file or directory\&. -.RE -.PP -\fB\-f\fR, \fB\-\-file=\fR\fB\fILOCATION\fR\fR -.RS 4 -Monitor the given location as a file\&. Normally, the file type is used to determine whether to monitor a file or directory\&. -.RE -.PP -\fB\-D\fR, \fB\-\-direct=\fR\fB\fILOCATION\fR\fR -.RS 4 -Monitor the file directly\&. This allows to capture changes made via hardlinks\&. -.RE -.PP -\fB\-s\fR, \fB\-\-silent=\fR\fB\fILOCATION\fR\fR -.RS 4 -Monitor the file directly, but don\*(Aqt report changes\&. -.RE -.PP -\fB\-n\fR, \fB\-\-no\-moves\fR -.RS 4 -Report moves and renames as simple deleted/created events\&. -.RE -.PP -\fB\-m\fR, \fB\-\-mounts\fR -.RS 4 -Watch for mount events\&. -.RE -.RE -.RE -.PP -\fBmount\fR [\fIOPTION\fR...] [\fILOCATION\fR...] -.RS 4 -Provides commandline access to various aspects of GIOs mounting functionality\&. -.sp -Mounting refers to the traditional concept of arranging multiple file systems and devices in a single tree, rooted at /\&. Classical mounting happens in the kernel and is controlle by the mount utility\&. GIO expands this concept by introducing mount daemons that can make file systems available to GIO applications without kernel involvement\&. -.sp -GIO mounts can require authentication, and the mount command may ask for user IDs, passwords, and so on, when required\&. -.sp -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBOptions\fR -.RS 4 -.PP -\fB\-m\fR, \fB\-\-mountable\fR -.RS 4 -Mount as mountable\&. -.RE -.PP -\fB\-d\fR, \fB\-\-device=\fR\fB\fIDEVICE\fR\fR -.RS 4 -Mount volume with device file\&. -.RE -.PP -\fB\-u\fR, \fB\-\-unmount\fR -.RS 4 -Unmount the location\&. -.RE -.PP -\fB\-e\fR, \fB\-\-eject\fR -.RS 4 -Eject the location\&. -.RE -.PP -\fB\-s\fR, \fB\-\-unmount\-scheme=\fR\fB\fISCHEME\fR\fR -.RS 4 -Unmount all mounts with the given scheme\&. -.RE -.PP -\fB\-f\fR, \fB\-\-force\fR -.RS 4 -Ignore outstanding file operations when unmounting or ejecting\&. -.RE -.PP -\fB\-a\fR, \fB\-\-anonymous\fR -.RS 4 -Use an anonymous user when authenticating\&. -.RE -.PP -\fB\-l\fR, \fB\-\-list\fR -.RS 4 -List all GIO mounts\&. -.RE -.PP -\fB\-o\fR, \fB\-\-monitor\fR -.RS 4 -Monitor mount\-related events\&. -.RE -.PP -\fB\-i\fR, \fB\-\-detail\fR -.RS 4 -Show extra information\&. -.RE -.RE -.RE -.PP -\fBmove\fR [\fIOPTION\fR...] \fISOURCE\fR... \fIDESTINATION\fR -.RS 4 -Moves one or more files from -\fISOURCE\fR -to -\fIDESTINATION\fR\&. If more than one source is specified, the destination must be a directory\&. -.sp -The move command is similar to the traditional mv utility\&. -.RE -.PP -\fBopen\fR \fILOCATION\fR... -.RS 4 -Opens files with the default application that is registered to handle files of this type\&. -.sp -GIO obtains this information from the shared\-mime\-info database, with per\-user overrides stored in -\fB$XDG_DATA_HOME\fR/applications/mimeapps\&.list\&. -.sp -The mime command can be used to change the default handler for a mimetype\&. -.RE -.PP -\fBrename\fR \fILOCATION\fR \fINAME\fR -.RS 4 -Renames a file\&. -.sp -The rename command is similar to the traditional rename utility\&. -.RE -.PP -\fBremove\fR [\fIOPTION\fR...] \fILOCATION\fR... -.RS 4 -Deletes each given file\&. -.sp -This command removes files irreversibly\&. If you want a reversible way to remove files, see the trash command\&. -.sp -Note that not all URI schemes that are supported by GIO may allow deletion of files\&. -.sp -The remove command is similar to the traditional rm utility\&. -.sp -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBOptions\fR -.RS 4 -.PP -\fB\-f\fR, \fB\-\-force\fR -.RS 4 -Ignore non\-existent and non\-deletable files\&. -.RE -.RE -.RE -.PP -\fBsave\fR [\fIOPTION\fR...] \fIDESTINATION\fR -.RS 4 -Reads from standard input and saves the data to the given location\&. -.sp -This is similar to just redirecting output to a file using traditional shell syntax, but the save command allows saving to location that GIO can write to\&. -.sp -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBOptions\fR -.RS 4 -.PP -\fB\-b\fR, \fB\-\-backup\fR -.RS 4 -Backup existing destination files\&. -.RE -.PP -\fB\-c\fR, \fB\-\-create\fR -.RS 4 -Only create the destination if it doesn\*(Aqt exist yet\&. -.RE -.PP -\fB\-a\fR, \fB\-\-append\fR -.RS 4 -Append to the end of the file\&. -.RE -.PP -\fB\-p\fR, \fB\-\-private\fR -.RS 4 -When creating, restrict access to the current user\&. -.RE -.PP -\fB\-u\fR, \fB\-\-unlink\fR -.RS 4 -When replacing, replace as if the destination did not exist\&. -.RE -.PP -\fB\-v\fR, \fB\-\-print\-etag\fR -.RS 4 -Print the new etag in the end\&. -.RE -.PP -\fB\-e\fR, \fB\-\-etag=\fR\fB\fIETAG\fR\fR -.RS 4 -The etag of the file that is overwritten\&. -.RE -.RE -.RE -.PP -\fBset\fR \fILOCATION\fR \fIATTRIBUTE\fR \fIVALUE\fR... -.RS 4 -Allows to set a file attribute on a file\&. -.sp -File attributes can be specified with their GIO name, e\&.g standard::icon\&. Note that not all GIO file attributes are writable\&. Use the \-\-query\-writable option of the info command to list writable file attributes\&. -.sp -If the -\fITYPE\fR -is unset, -\fIVALUE\fR -does not have to be specified\&. If the type is stringv, multiple values can be given\&. -.sp -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBOptions\fR -.RS 4 -.PP -\fB\-t\fR, \fB\-\-type=\fR\fB\fITYPE\fR\fR -.RS 4 -Specifies the type of the attribute\&. Supported types are string, stringv, bytestring, boolean, uint32, int32, uint64, int64 and unset\&. -.sp -If the type is not specified, string is assumed\&. -.RE -.PP -\fB\-n\fR, \fB\-\-nofollow\-symlinks\fR -.RS 4 -Don\*(Aqt follow symbolic links\&. -.RE -.RE -.RE -.PP -\fBtrash\fR [\fIOPTION\fR...] [\fILOCATION\fR...] -.RS 4 -Sends files or directories to the "Trashcan"\&. This can be a different folder depending on where the file is located, and not all file systems support this concept\&. In the common case that the file lives inside a users home directory, the trash folder is -\fB$XDG_DATA_HOME\fR/Trash\&. -.sp -Note that moving files to the trash does not free up space on the file system until the "Trashcan" is emptied\&. If you are interested in deleting a file irreversibly, see the remove command\&. -.sp -Inspecting and emptying the "Trashcan" is normally supported by graphical file managers such as nautilus, but you can also see the trash with the command: gio list trash://\&. -.sp -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBOptions\fR -.RS 4 -.PP -\fB\-f\fR, \fB\-\-force\fR -.RS 4 -Ignore non\-existent and non\-deletable files\&. -.RE -.PP -\fB\-\-empty\fR -.RS 4 -Empty the trash\&. -.RE -.RE -.RE -.PP -\fBtree\fR [\fIOPTION\fR...] [\fILOCATION\fR...] -.RS 4 -Lists the contents of the given locations recursively, in a tree\-like format\&. If no location is given, it defaults to the current directory\&. -.sp -The tree command is similar to the traditional tree utility\&. -.sp -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -.ps +1 -\fBOptions\fR -.RS 4 -.PP -\fB\-h\fR, \fB\-\-hidden\fR -.RS 4 -Show hidden files\&. -.RE -.PP -\fB\-h\fR, \fB\-\-hidden\fR -.RS 4 -Show hidden files\&. -.RE -.PP -\fB\-l\fR, \fB\-\-follow\-symlinks\fR -.RS 4 -Follow symbolic links\&. -.RE -.RE -.RE -.SH "EXIT STATUS" -.PP -On success 0 is returned, a non\-zero failure code otherwise\&. -.SH "SEE ALSO" -.PP -\fBcat\fR(1), -\fBcp\fR(1), -\fBls\fR(1), -\fBmkdir\fR(1), -\fBmv\fR(1), -\fBrm\fR(1), -\fBtree\fR(1)\&. diff --git a/docs/reference/gio/gio.types b/docs/reference/gio/gio.types index fdb7a8d11..8ab7d918f 100644 --- a/docs/reference/gio/gio.types +++ b/docs/reference/gio/gio.types @@ -144,7 +144,9 @@ g_unix_credentials_message_get_type g_unix_fd_list_get_type g_unix_fd_message_get_type g_unix_input_stream_get_type +g_unix_mount_entry_get_type g_unix_mount_monitor_get_type +g_unix_mount_point_get_type g_unix_output_stream_get_type g_unix_socket_address_get_type g_vfs_get_type diff --git a/docs/reference/gio/glib-compile-resources.1 b/docs/reference/gio/glib-compile-resources.1 deleted file mode 100644 index ef40c64d8..000000000 --- a/docs/reference/gio/glib-compile-resources.1 +++ /dev/null @@ -1,193 +0,0 @@ -'\" t -.\" Title: glib-compile-resources -.\" Author: Alexander Larsson -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 06/22/2017 -.\" Manual: User Commands -.\" Source: GIO -.\" Language: English -.\" -.TH "GLIB\-COMPILE\-RESOU" "1" "" "GIO" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -glib-compile-resources \- GLib resource compiler -.SH "SYNOPSIS" -.HP \w'\fBglib\-compile\-resources\fR\ 'u -\fBglib\-compile\-resources\fR [OPTION...] {FILE} -.SH "DESCRIPTION" -.PP -\fBglib\-compile\-resources\fR -reads the resource description from -\fIFILE\fR -and the files that it references and creates a binary resource bundle that is suitable for use with the -\fBGResource\fR -API\&. The resulting bundle is then written out as\-is, or as C source for linking into an application\&. -.PP -The XML resource files normally have the filename extension -\&.gresource\&.xml\&. For a detailed description of the XML file format, see the -\fBGResource\fR -documentation\&. -.SH "OPTIONS" -.PP -\fB\-h\fR, \fB\-\-help\fR -.RS 4 -Print help and exit -.RE -.PP -\fB\-\-version\fR -.RS 4 -Print program version and exit -.RE -.PP -\fB\-\-target=\fR\fB\fITARGET\fR\fR -.RS 4 -Store the compiled resources in the file -\fITARGET\fR\&. If not specified a filename based on the -\fIFILE\fR -basename is used\&. -.RE -.PP -\fB\-\-sourcedir=\fR\fB\fIDIRECTORY\fR\fR -.RS 4 -The files referenced in -\fIFILE\fR -are loaded from this directory\&. If not specified, the current directory is used\&. -.RE -.PP -\fB\-\-generate\fR -.RS 4 -Write the output file in the format selected for by its filename extension: -.PP -\&.c -.RS 4 -C source -.RE -.PP -\&.h -.RS 4 -C header -.RE -.PP -\&.gresource -.RS 4 -resource bundle -.RE -.sp -.RE -.PP -\fB\-\-generate\-source\fR -.RS 4 -Instead of a writing the resource bundle in binary form create a C source file that contains the resource bundle\&. This can then be compiled into an application for easy access\&. -.RE -.PP -\fB\-\-generate\-header\fR -.RS 4 -Generate a header file for use with C code generated by -\fB\-\-generate\-source\fR\&. -.RE -.PP -\fB\-\-generate\-dependencies\fR -.RS 4 -Prints the list of files that the resource bundle references to standard output\&. This can be used to track dependencies in the build system\&. For example, the following make rule would mark -\fItest\&.gresource\fR -as depending on all the files that -\fItest\&.gresource\&.xml\fR -includes, so that is is automatically rebuilt if any of them change: -.sp -.if n \{\ -.RS 4 -.\} -.nf -test\&.gresource: test\&.gresource\&.xml $(shell $(GLIB_COMPILE_RESOURCES) \-\-generate\-dependencies test\&.gresource\&.xml) -.fi -.if n \{\ -.RE -.\} -.sp -Note that this may or may not be portable to non\-GNU -\fBmake\fR\&. -.sp -Also see -\fB\-\-dependency\-file\fR\&. -.RE -.PP -\fB\-\-c\-name\fR -.RS 4 -Specify the prefix used for the C identifiers in the code generated by -\fB\-\-generate\-source\fR -and -\fB\-\-generate\-header\fR\&. -.RE -.PP -\fB\-\-manual\-register\fR -.RS 4 -By default code generated by -\fB\-\-generate\-source\fR -uses automatic initialization of the resource\&. This works on most systems by using the compiler support for constructors\&. However, some (uncommon) compilers may not support this, you can then specify -\fB\-\-manual\-register\fR, which will generate custom register and unregister functions that your code can manually call at initialization and uninitialization time\&. -.RE -.PP -\fB\-\-internal\fR -.RS 4 -By default code generated by -\fB\-\-generate\-source\fR -declares all initialization functions as -\fBextern\fR\&. So they are exported unless this is prevented by a link script or other means\&. Since libraries usually want to use the functions only internally it can be more useful to declare them as -G_GNUC_INTERNAL -which is what -\fB\-\-internal\fR -does\&. -.RE -.PP -\fB\-\-dependency\-file=\fR\fB\fIFILE\fR\fR -.RS 4 -Write dependencies in the same style as gcc \-M \-MF to the given file\&. If -\fBFILE\fR -is \-, the dependencies are written to the standard output\&. Unlike -\fB\-\-generate\-dependencies\fR, this option can be combined with other -\fB\-\-generate\fR -options to generate dependencies as a side\-effect of generating sources\&. -.RE -.PP -\fB\-\-generate\-phony\-targets\fR -.RS 4 -When creating a dependency file with -\fB\-\-dependency\-file\fR -include phony targets in the same style as gcc \-MP\&. This would typically be used with -make\&. -.RE -.SH "ENVIRONMENT" -.PP -\fBXMLLINT\fR -.RS 4 -The full path to the xmllint executable\&. This is used to preprocess resources with the -xml\-stripblanks -preprocessing option\&. If this environment variable is not set, xmllint is searched in the -\fBPATH\fR\&. -.RE -.PP -\fBGDK_PIXBUF_PIXDATA\fR -.RS 4 -The full path to the gdk\-pixbuf\-pixdata executable\&. This is used to preprocess resources with the -to\-pixdata -preprocessing option\&. If this environment variable is not set, gdk\-pixbuf\-pixdata is searched in the -\fBPATH\fR\&. -.RE diff --git a/docs/reference/gio/glib-compile-schemas.1 b/docs/reference/gio/glib-compile-schemas.1 deleted file mode 100644 index b36f1261c..000000000 --- a/docs/reference/gio/glib-compile-schemas.1 +++ /dev/null @@ -1,101 +0,0 @@ -'\" t -.\" Title: glib-compile-schemas -.\" Author: Ryan Lortie -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 06/22/2017 -.\" Manual: User Commands -.\" Source: GIO -.\" Language: English -.\" -.TH "GLIB\-COMPILE\-SCHEM" "1" "" "GIO" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -glib-compile-schemas \- GSettings schema compiler -.SH "SYNOPSIS" -.HP \w'\fBglib\-compile\-schemas\fR\ 'u -\fBglib\-compile\-schemas\fR [OPTION...] {DIRECTORY} -.SH "DESCRIPTION" -.PP -\fBglib\-compile\-schemas\fR -compiles all the GSettings XML schema files in -\fIDIRECTORY\fR -into a binary file with the name -gschemas\&.compiled -that can be used by -\fBGSettings\fR\&. The XML schema files must have the filename extension -\&.gschema\&.xml\&. For a detailed description of the XML file format, see the -\fBGSettings\fR -documentation\&. -.PP -At runtime, GSettings looks for schemas in the -glib\-2\&.0/schemas -subdirectories of all directories specified in the -\fBXDG_DATA_DIRS\fR -environment variable\&. The usual location to install schema files is -/usr/share/glib\-2\&.0/schemas\&. -.PP -In addition to schema files, glib\-compile\-schemas reads \*(Aqvendor override\*(Aq files, which are key files that can override default values for keys in the schemas\&. The group names in the key files are the schema id, and the values are written in serialized GVariant form\&. Vendor override files must have the filename extension -\&.gschema\&.override\&. -.PP -By convention, vendor override files begin with -nn_ -where -nn -is a number from 00 to 99\&. Higher numbered files have higher priority (eg: if the same override is made in a file numbered 10 and then again in a file numbered 20, the override from 20 will take precedence)\&. -.SH "OPTIONS" -.PP -\fB\-h\fR, \fB\-\-help\fR -.RS 4 -Print help and exit -.RE -.PP -\fB\-\-version\fR -.RS 4 -Print program version and exit -.RE -.PP -\fB\-\-targetdir=\fR\fB\fITARGET\fR\fR -.RS 4 -Store -gschemas\&.compiled -in the -\fITARGET\fR -directory instead of -\fIDIRECTORY\fR\&. -.RE -.PP -\fB\-\-strict\fR -.RS 4 -Abort on any errors in schemas\&. Without this option, faulty schema files are simply omitted from the resulting compiled schema\&. -.RE -.PP -\fB\-\-dry\-run\fR -.RS 4 -Don\*(Aqt write -gschemas\&.compiled\&. This option can be used to check -\&.gschema\&.xml -sources for errors\&. -.RE -.PP -\fB\-\-allow\-any\-name\fR -.RS 4 -Do not enforce restrictions on key names\&. Note that this option is purely to facility the transition from GConf, and will be removed at some time in the future\&. -.RE diff --git a/docs/reference/gio/gresource.1 b/docs/reference/gio/gresource.1 deleted file mode 100644 index bc6441e3a..000000000 --- a/docs/reference/gio/gresource.1 +++ /dev/null @@ -1,95 +0,0 @@ -'\" t -.\" Title: gresource -.\" Author: Matthias Clasen -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 06/22/2017 -.\" Manual: User Commands -.\" Source: GIO -.\" Language: English -.\" -.TH "GRESOURCE" "1" "" "GIO" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -gresource \- GResource tool -.SH "SYNOPSIS" -.HP \w'\fBgresource\fR\ 'u -\fBgresource\fR [\-\-section\ \fISECTION\fR] list \fIFILE\fR [\fIPATH\fR] -.HP \w'\fBgresource\fR\ 'u -\fBgresource\fR [\-\-section\ \fISECTION\fR] details \fIFILE\fR [\fIPATH\fR] -.HP \w'\fBgresource\fR\ 'u -\fBgresource\fR [\-\-section\ \fISECTION\fR] extract \fIFILE\fR \fIPATH\fR -.HP \w'\fBgresource\fR\ 'u -\fBgresource\fR sections \fIFILE\fR -.HP \w'\fBgresource\fR\ 'u -\fBgresource\fR help [\fICOMMAND\fR] -.SH "DESCRIPTION" -.PP -\fBgresource\fR -offers a simple commandline interface to -\fBGResource\fR\&. It lets you list and extract resources that have been compiled into a resource file or included in an elf file (a binary or a shared library)\&. -.PP -The file to operate on is specified by the -\fIFILE\fR -argument\&. -.PP -If an elf file includes multiple sections with resources, it is possible to select which one to operate on with the -\-\-section -option\&. Use the -sections -command to find available sections\&. -.SH "COMMANDS" -.PP -\fBlist\fR -.RS 4 -Lists resources\&. If -\fISECTION\fR -is given, only list resourcs in this section\&. If -\fIPATH\fR -is given, only list matching resources\&. -.RE -.PP -\fBdetails\fR -.RS 4 -Lists resources with details\&. If -\fISECTION\fR -is given, only list resources in this section\&. If -\fIPATH\fR -is given, only list matching resources\&. Details include the section, size and compression of each resource\&. -.RE -.PP -\fBextract\fR -.RS 4 -Extracts the resource named by -\fIPATH\fR -to stdout\&. Note that resources may contain binary data\&. -.RE -.PP -\fBsections\fR -.RS 4 -Lists sections containing resources\&. This is only interesting if -\fIFILE\fR -is an elf file\&. -.RE -.PP -\fBhelp\fR -.RS 4 -Prints help and exits\&. -.RE diff --git a/docs/reference/gio/gsettings.1 b/docs/reference/gio/gsettings.1 deleted file mode 100644 index 2512c14ae..000000000 --- a/docs/reference/gio/gsettings.1 +++ /dev/null @@ -1,175 +0,0 @@ -'\" t -.\" Title: gsettings -.\" Author: Ryan Lortie -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 06/22/2017 -.\" Manual: User Commands -.\" Source: GIO -.\" Language: English -.\" -.TH "GSETTINGS" "1" "" "GIO" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -gsettings \- GSettings configuration tool -.SH "SYNOPSIS" -.HP \w'\fBgsettings\fR\ 'u -\fBgsettings\fR get \fISCHEMA\fR\ [:\fIPATH\fR] \fIKEY\fR -.HP \w'\fBgsettings\fR\ 'u -\fBgsettings\fR monitor \fISCHEMA\fR\ [:\fIPATH\fR] [\fIKEY\fR] -.HP \w'\fBgsettings\fR\ 'u -\fBgsettings\fR writable \fISCHEMA\fR\ [:\fIPATH\fR] \fIKEY\fR -.HP \w'\fBgsettings\fR\ 'u -\fBgsettings\fR range \fISCHEMA\fR\ [:\fIPATH\fR] \fIKEY\fR -.HP \w'\fBgsettings\fR\ 'u -\fBgsettings\fR describe \fISCHEMA\fR\ [:\fIPATH\fR] \fIKEY\fR -.HP \w'\fBgsettings\fR\ 'u -\fBgsettings\fR set \fISCHEMA\fR\ [:\fIPATH\fR] \fIKEY\fR \fIVALUE\fR -.HP \w'\fBgsettings\fR\ 'u -\fBgsettings\fR reset \fISCHEMA\fR\ [:\fIPATH\fR] \fIKEY\fR -.HP \w'\fBgsettings\fR\ 'u -\fBgsettings\fR reset\-recursively \fISCHEMA\fR\ [:\fIPATH\fR] -.HP \w'\fBgsettings\fR\ 'u -\fBgsettings\fR list\-schemas -.HP \w'\fBgsettings\fR\ 'u -\fBgsettings\fR list\-relocatable\-schemas -.HP \w'\fBgsettings\fR\ 'u -\fBgsettings\fR list\-keys \fISCHEMA\fR\ [:\fIPATH\fR] -.HP \w'\fBgsettings\fR\ 'u -\fBgsettings\fR list\-children \fISCHEMA\fR\ [:\fIPATH\fR] -.HP \w'\fBgsettings\fR\ 'u -\fBgsettings\fR list\-recursively [\fISCHEMA\fR\ [:\fIPATH\fR]] -.HP \w'\fBgsettings\fR\ 'u -\fBgsettings\fR help [\fICOMMAND\fR] -.SH "DESCRIPTION" -.PP -\fBgsettings\fR -offers a simple commandline interface to -\fBGSettings\fR\&. It lets you get, set or monitor an individual key for changes\&. -.PP -The -\fISCHEMA\fR -and -\fIKEY\fR -arguments are required for most commands to specify the schema id and the name of the key to operate on\&. The schema id may optionally have a :\fIPATH\fR -suffix\&. Specifying the path is only needed if the schema does not have a fixed path\&. -.PP -When setting a key, you also need specify a -\fIVALUE\fR -The format for the value is that of a serialized -\fBGVariant\fR, so e\&.g\&. a string must include explicit quotes: "\*(Aqfoo\*(Aq"\&. This format is also used when printing out values\&. -.PP -Note that gsettings needs a D\-Bus session bus connection to write changes to the dconf database\&. -.SH "COMMANDS" -.PP -\fBget\fR -.RS 4 -Gets the value of -\fIKEY\fR\&. The value is printed out as a serialised -\fBGVariant\fR\&. -.RE -.PP -\fBmonitor\fR -.RS 4 -Monitors -\fIKEY\fR -for changes and prints the changed values\&. If no -\fIKEY\fR -is specified, all keys in the schema are monitored\&. Monitoring will continue until the process is terminated\&. -.RE -.PP -\fBwritable\fR -.RS 4 -Finds out whether -\fIKEY\fR -is writable\&. -.RE -.PP -\fBrange\fR -.RS 4 -Queries the range of valid values for -\fIKEY\fR\&. -.RE -.PP -\fBdescribe\fR -.RS 4 -Queries the description of valid values for -\fIKEY\fR\&. -.RE -.PP -\fBset\fR -.RS 4 -Sets the value of -\fIKEY\fR -to -\fIVALUE\fR\&. The value is specified as a serialised -\fBGVariant\fR\&. -.RE -.PP -\fBreset\fR -.RS 4 -Resets -\fIKEY\fR -to its default value\&. -.RE -.PP -\fBreset\-recursively\fR -.RS 4 -Reset all keys under the given -\fISCHEMA\fR\&. -.RE -.PP -\fBlist\-schemas\fR -.RS 4 -Lists the installed, non\-relocatable schemas\&. See -\fBlist\-relocatable\-schemas\fR -if you are interested in relocatable schemas\&. -.RE -.PP -\fBlist\-relocatable\-schemas\fR -.RS 4 -Lists the installed, relocatable schemas\&. See -\fBlist\-schemas\fR -if you are interested in non\-relocatable schemas\&. -.RE -.PP -\fBlist\-keys\fR -.RS 4 -Lists the keys in -\fISCHEMA\fR\&. -.RE -.PP -\fBlist\-children\fR -.RS 4 -Lists the children of -\fISCHEMA\fR\&. -.RE -.PP -\fBlist\-recursively\fR -.RS 4 -Lists keys and values, recursively\&. If no -\fISCHEMA\fR -is given, list keys in all schemas\&. -.RE -.PP -\fBhelp\fR -.RS 4 -Prints help and exits\&. -.RE diff --git a/docs/reference/gio/gvfs-overview.odg b/docs/reference/gio/gvfs-overview.odg new file mode 100644 index 000000000..ca2bb8d66 Binary files /dev/null and b/docs/reference/gio/gvfs-overview.odg differ diff --git a/docs/reference/gio/html/GAction.html b/docs/reference/gio/html/GAction.html deleted file mode 100644 index ee41ba18a..000000000 --- a/docs/reference/gio/html/GAction.html +++ /dev/null @@ -1,822 +0,0 @@ - - - - -GAction: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GAction

-

GAction — An action interface

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -g_action_name_is_valid () -
const gchar * - -g_action_get_name () -
const GVariantType * - -g_action_get_parameter_type () -
const GVariantType * - -g_action_get_state_type () -
-GVariant * - -g_action_get_state_hint () -
-gboolean - -g_action_get_enabled () -
-GVariant * - -g_action_get_state () -
-void - -g_action_change_state () -
-void - -g_action_activate () -
-gboolean - -g_action_parse_detailed_name () -
-gchar * - -g_action_print_detailed_name () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
gbooleanenabledRead
-gchar *nameRead
-GVariantType *parameter-typeRead
-GVariant *stateRead
-GVariantType *state-typeRead
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GAction
structGActionInterface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GAction
-
-
-
-

Prerequisites

-

-GAction requires - GObject.

-
-
-

Known Implementations

-

-GAction is implemented by - GPropertyAction and GSimpleAction.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GAction represents a single named action.

-

The main interface to an action is that it can be activated with -g_action_activate(). This results in the 'activate' signal being -emitted. An activation has a GVariant parameter (which may be -NULL). The correct type for the parameter is determined by a static -parameter type (which is given at construction time).

-

An action may optionally have a state, in which case the state may be -set with g_action_change_state(). This call takes a GVariant. The -correct type for the state is determined by a static state type -(which is given at construction time).

-

The state may have a hint associated with it, specifying its valid -range.

-

GAction is merely the interface to the concept of an action, as -described above. Various implementations of actions exist, including -GSimpleAction.

-

In all cases, the implementing class is responsible for storing the -name of the action, the parameter type, the enabled state, the -optional state type and the state and emitting the appropriate -signals when these change. The implementor is responsible for filtering -calls to g_action_activate() and g_action_change_state() for type -safety and for the state being enabled.

-

Probably the only useful thing to do with a GAction is to put it -inside of a GSimpleActionGroup.

-
-
-

Functions

-
-

g_action_name_is_valid ()

-
gboolean
-g_action_name_is_valid (const gchar *action_name);
-

Checks if action_name - is valid.

-

action_name - is valid if it consists only of alphanumeric characters, -plus '-' and '.'. The empty string is not a valid action name.

-

It is an error to call this function with a non-utf8 action_name -. -action_name - must not be NULL.

-
-

Parameters

-
----- - - - - - -

action_name

an potential action name

 
-
-
-

Returns

-

TRUE if action_name -is valid

-
-

Since: 2.38

-
-
-
-

g_action_get_name ()

-
const gchar *
-g_action_get_name (GAction *action);
-

Queries the name of action -.

-
-

Parameters

-
----- - - - - - -

action

a GAction

 
-
-
-

Returns

-

the name of the action

-
-

Since: 2.28

-
-
-
-

g_action_get_parameter_type ()

-
const GVariantType *
-g_action_get_parameter_type (GAction *action);
-

Queries the type of the parameter that must be given when activating -action -.

-

When activating the action using g_action_activate(), the GVariant -given to that function must be of the type returned by this function.

-

In the case that this function returns NULL, you must not give any -GVariant, but NULL instead.

-
-

Parameters

-
----- - - - - - -

action

a GAction

 
-
-
-

Returns

-

the parameter type.

-

[nullable]

-
-

Since: 2.28

-
-
-
-

g_action_get_state_type ()

-
const GVariantType *
-g_action_get_state_type (GAction *action);
-

Queries the type of the state of action -.

-

If the action is stateful (e.g. created with -g_simple_action_new_stateful()) then this function returns the -GVariantType of the state. This is the type of the initial value -given as the state. All calls to g_action_change_state() must give a -GVariant of this type and g_action_get_state() will return a -GVariant of the same type.

-

If the action is not stateful (e.g. created with g_simple_action_new()) -then this function will return NULL. In that case, g_action_get_state() -will return NULL and you must not call g_action_change_state().

-
-

Parameters

-
----- - - - - - -

action

a GAction

 
-
-
-

Returns

-

the state type, if the action is stateful.

-

[nullable]

-
-

Since: 2.28

-
-
-
-

g_action_get_state_hint ()

-
GVariant *
-g_action_get_state_hint (GAction *action);
-

Requests a hint about the valid range of values for the state of -action -.

-

If NULL is returned it either means that the action is not stateful -or that there is no hint about the valid range of values for the -state of the action.

-

If a GVariant array is returned then each item in the array is a -possible value for the state. If a GVariant pair (ie: two-tuple) is -returned then the tuple specifies the inclusive lower and upper bound -of valid values for the state.

-

In any case, the information is merely a hint. It may be possible to -have a state value outside of the hinted range and setting a value -within the range may fail.

-

The return value (if non-NULL) should be freed with -g_variant_unref() when it is no longer required.

-
-

Parameters

-
----- - - - - - -

action

a GAction

 
-
-
-

Returns

-

the state range hint.

-

[nullable][transfer full]

-
-

Since: 2.28

-
-
-
-

g_action_get_enabled ()

-
gboolean
-g_action_get_enabled (GAction *action);
-

Checks if action - is currently enabled.

-

An action must be enabled in order to be activated or in order to -have its state changed from outside callers.

-
-

Parameters

-
----- - - - - - -

action

a GAction

 
-
-
-

Returns

-

whether the action is enabled

-
-

Since: 2.28

-
-
-
-

g_action_get_state ()

-
GVariant *
-g_action_get_state (GAction *action);
-

Queries the current state of action -.

-

If the action is not stateful then NULL will be returned. If the -action is stateful then the type of the return value is the type -given by g_action_get_state_type().

-

The return value (if non-NULL) should be freed with -g_variant_unref() when it is no longer required.

-
-

Parameters

-
----- - - - - - -

action

a GAction

 
-
-
-

Returns

-

the current state of the action.

-

[transfer full]

-
-

Since: 2.28

-
-
-
-

g_action_change_state ()

-
void
-g_action_change_state (GAction *action,
-                       GVariant *value);
-

Request for the state of action - to be changed to value -.

-

The action must be stateful and value - must be of the correct type. -See g_action_get_state_type().

-

This call merely requests a change. The action may refuse to change -its state or may change its state to something other than value -. -See g_action_get_state_hint().

-

If the value - GVariant is floating, it is consumed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

action

a GAction

 

value

the new state

 
-
-

Since: 2.30

-
-
-
-

g_action_activate ()

-
void
-g_action_activate (GAction *action,
-                   GVariant *parameter);
-

Activates the action.

-

parameter - must be the correct type of parameter for the action (ie: -the parameter type given at construction time). If the parameter -type was NULL then parameter - must also be NULL.

-

If the parameter - GVariant is floating, it is consumed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

action

a GAction

 

parameter

the parameter to the activation.

[nullable]
-
-

Since: 2.28

-
-
-
-

g_action_parse_detailed_name ()

-
gboolean
-g_action_parse_detailed_name (const gchar *detailed_name,
-                              gchar **action_name,
-                              GVariant **target_value,
-                              GError **error);
-

Parses a detailed action name into its separate name and target -components.

-

Detailed action names can have three formats.

-

The first format is used to represent an action name with no target -value and consists of just an action name containing no whitespace -nor the characters ':', '(' or ')'. For example: "app.action".

-

The second format is used to represent an action with a target value -that is a non-empty string consisting only of alphanumerics, plus '-' -and '.'. In that case, the action name and target value are -separated by a double colon ("::"). For example: -"app.action::target".

-

The third format is used to represent an action with any type of -target value, including strings. The target value follows the action -name, surrounded in parens. For example: "app.action(42)". The -target value is parsed using g_variant_parse(). If a tuple-typed -value is desired, it must be specified in the same way, resulting in -two sets of parens, for example: "app.action((1,2,3))". A string -target can be specified this way as well: "app.action('target')". -For strings, this third format must be used if * target value is -empty or contains characters other than alphanumerics, '-' and '.'.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

detailed_name

a detailed action name

 

action_name

the action name.

[out]

target_value

the target value, or NULL for no target.

[out]

error

a pointer to a NULL GError, or NULL

 
-
-
-

Returns

-

TRUE if successful, else FALSE with error -set

-
-

Since: 2.38

-
-
-
-

g_action_print_detailed_name ()

-
gchar *
-g_action_print_detailed_name (const gchar *action_name,
-                              GVariant *target_value);
-

Formats a detailed action name from action_name - and target_value -.

-

It is an error to call this function with an invalid action name.

-

This function is the opposite of g_action_parse_detailed_name(). -It will produce a string that can be parsed back to the action_name - -and target_value - by that function.

-

See that function for the types of strings that will be printed by -this function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

action_name

a valid action name

 

target_value

a GVariant target value, or NULL.

[nullable]
-
-
-

Returns

-

a detailed format string

-
-

Since: 2.38

-
-
-
-

Types and Values

-
-

GAction

-
typedef struct _GAction GAction;
-

GAction is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

struct GActionInterface

-
struct GActionInterface {
-  GTypeInterface g_iface;
-
-  /* virtual functions */
-  const gchar *        (* get_name)             (GAction  *action);
-  const GVariantType * (* get_parameter_type)   (GAction  *action);
-  const GVariantType * (* get_state_type)       (GAction  *action);
-  GVariant *           (* get_state_hint)       (GAction  *action);
-
-  gboolean             (* get_enabled)          (GAction  *action);
-  GVariant *           (* get_state)            (GAction  *action);
-
-  void                 (* change_state)         (GAction  *action,
-                                                 GVariant *value);
-  void                 (* activate)             (GAction  *action,
-                                                 GVariant *parameter);
-};
-
-

The virtual function table for GAction.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

get_name ()

the virtual function pointer for g_action_get_name()

 

get_parameter_type ()

the virtual function pointer for g_action_get_parameter_type()

 

get_state_type ()

the virtual function pointer for g_action_get_state_type()

 

get_state_hint ()

the virtual function pointer for g_action_get_state_hint()

 

get_enabled ()

the virtual function pointer for g_action_get_enabled()

 

get_state ()

the virtual function pointer for g_action_get_state()

 

change_state ()

the virtual function pointer for g_action_change_state()

 

activate ()

the virtual function pointer for g_action_activate(). Note that GAction does not have an -'activate' signal but that implementations of it may have one.

 
-
-

Since: 2.28

-
-
-
-

Property Details

-
-

The “enabled” property

-
  “enabled”                  gboolean
-

If action - is currently enabled.

-

If the action is disabled then calls to g_action_activate() and -g_action_change_state() have no effect.

-

Flags: Read

-

Default value: TRUE

-

Since: 2.28

-
-
-
-

The “name” property

-
  “name”                     gchar *
-

The name of the action. This is mostly meaningful for identifying -the action once it has been added to a GActionGroup. It is immutable.

-

Flags: Read

-

Default value: NULL

-

Since: 2.28

-
-
-
-

The “parameter-type” property

-
  “parameter-type”           GVariantType *
-

The type of the parameter that must be given when activating the -action. This is immutable, and may be NULL if no parameter is needed when -activating the action.

-

Flags: Read

-

Since: 2.28

-
-
-
-

The “state” property

-
  “state”                    GVariant *
-

The state of the action, or NULL if the action is stateless.

-

Flags: Read

-

Allowed values: GVariant<*>

-

Default value: NULL

-

Since: 2.28

-
-
-
-

The “state-type” property

-
  “state-type”               GVariantType *
-

The GVariantType of the state that the action has, or NULL if the -action is stateless. This is immutable.

-

Flags: Read

-

Since: 2.28

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GActionGroup.html b/docs/reference/gio/html/GActionGroup.html deleted file mode 100644 index 3121050b5..000000000 --- a/docs/reference/gio/html/GActionGroup.html +++ /dev/null @@ -1,1234 +0,0 @@ - - - - -GActionGroup: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GActionGroup

-

GActionGroup — A group of actions

-
-
-

Functions

- -
-
-

Signals

- -
-
-

Types and Values

-
---- - - - - - - - - - - -
 GActionGroup
structGActionGroupInterface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GActionGroup
-
-
-
-

Prerequisites

-

-GActionGroup requires - GObject.

-
-
-

Known Derived Interfaces

-

-GActionGroup is required by - GRemoteActionGroup.

-
-
-

Known Implementations

-

-GActionGroup is implemented by - GApplication, GDBusActionGroup and GSimpleActionGroup.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GActionGroup represents a group of actions. Actions can be used to -expose functionality in a structured way, either from one part of a -program to another, or to the outside world. Action groups are often -used together with a GMenuModel that provides additional -representation data for displaying the actions to the user, e.g. in -a menu.

-

The main way to interact with the actions in a GActionGroup is to -activate them with g_action_group_activate_action(). Activating an -action may require a GVariant parameter. The required type of the -parameter can be inquired with g_action_group_get_action_parameter_type(). -Actions may be disabled, see g_action_group_get_action_enabled(). -Activating a disabled action has no effect.

-

Actions may optionally have a state in the form of a GVariant. The -current state of an action can be inquired with -g_action_group_get_action_state(). Activating a stateful action may -change its state, but it is also possible to set the state by calling -g_action_group_change_action_state().

-

As typical example, consider a text editing application which has an -option to change the current font to 'bold'. A good way to represent -this would be a stateful action, with a boolean state. Activating the -action would toggle the state.

-

Each action in the group has a unique name (which is a string). All -method calls, except g_action_group_list_actions() take the name of -an action as an argument.

-

The GActionGroup API is meant to be the 'public' API to the action -group. The calls here are exactly the interaction that 'external -forces' (eg: UI, incoming D-Bus messages, etc.) are supposed to have -with actions. 'Internal' APIs (ie: ones meant only to be accessed by -the action group implementation) are found on subclasses. This is -why you will find - for example - g_action_group_get_action_enabled() -but not an equivalent set() call.

-

Signals are emitted on the action group in response to state changes -on individual actions.

-

Implementations of GActionGroup should provide implementations for -the virtual functions g_action_group_list_actions() and -g_action_group_query_action(). The other virtual functions should -not be implemented - their "wrappers" are actually implemented with -calls to g_action_group_query_action().

-
-
-

Functions

-
-

g_action_group_list_actions ()

-
gchar **
-g_action_group_list_actions (GActionGroup *action_group);
-

Lists the actions contained within action_group -.

-

The caller is responsible for freeing the list with g_strfreev() when -it is no longer required.

-
-

Parameters

-
----- - - - - - -

action_group

a GActionGroup

 
-
-
-

Returns

-

a NULL-terminated array of the names of the -actions in the group.

-

[transfer full]

-
-

Since: 2.28

-
-
-
-

g_action_group_query_action ()

-
gboolean
-g_action_group_query_action (GActionGroup *action_group,
-                             const gchar *action_name,
-                             gboolean *enabled,
-                             const GVariantType **parameter_type,
-                             const GVariantType **state_type,
-                             GVariant **state_hint,
-                             GVariant **state);
-

Queries all aspects of the named action within an action_group -.

-

This function acquires the information available from -g_action_group_has_action(), g_action_group_get_action_enabled(), -g_action_group_get_action_parameter_type(), -g_action_group_get_action_state_type(), -g_action_group_get_action_state_hint() and -g_action_group_get_action_state() with a single function call.

-

This provides two main benefits.

-

The first is the improvement in efficiency that comes with not having -to perform repeated lookups of the action in order to discover -different things about it. The second is that implementing -GActionGroup can now be done by only overriding this one virtual -function.

-

The interface provides a default implementation of this function that -calls the individual functions, as required, to fetch the -information. The interface also provides default implementations of -those functions that call this function. All implementations, -therefore, must override either this function or all of the others.

-

If the action exists, TRUE is returned and any of the requested -fields (as indicated by having a non-NULL reference passed in) are -filled. If the action doesn't exist, FALSE is returned and the -fields may or may not have been modified.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

action_group

a GActionGroup

 

action_name

the name of an action in the group

 

enabled

if the action is presently enabled.

[out]

parameter_type

the parameter type, or NULL if none needed.

[out][optional]

state_type

the state type, or NULL if stateless.

[out][optional]

state_hint

the state hint, or NULL if none.

[out][optional]

state

the current state, or NULL if stateless.

[out][optional]
-
-
-

Returns

-

TRUE if the action exists, else FALSE

-
-

Since: 2.32

-
-
-
-

g_action_group_has_action ()

-
gboolean
-g_action_group_has_action (GActionGroup *action_group,
-                           const gchar *action_name);
-

Checks if the named action exists within action_group -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

action_group

a GActionGroup

 

action_name

the name of the action to check for

 
-
-
-

Returns

-

whether the named action exists

-
-

Since: 2.28

-
-
-
-

g_action_group_get_action_enabled ()

-
gboolean
-g_action_group_get_action_enabled (GActionGroup *action_group,
-                                   const gchar *action_name);
-

Checks if the named action within action_group - is currently enabled.

-

An action must be enabled in order to be activated or in order to -have its state changed from outside callers.

-
-

Parameters

-
----- - - - - - - - - - - - - -

action_group

a GActionGroup

 

action_name

the name of the action to query

 
-
-
-

Returns

-

whether or not the action is currently enabled

-
-

Since: 2.28

-
-
-
-

g_action_group_get_action_parameter_type ()

-
const GVariantType *
-g_action_group_get_action_parameter_type
-                               (GActionGroup *action_group,
-                                const gchar *action_name);
-

Queries the type of the parameter that must be given when activating -the named action within action_group -.

-

When activating the action using g_action_group_activate_action(), -the GVariant given to that function must be of the type returned -by this function.

-

In the case that this function returns NULL, you must not give any -GVariant, but NULL instead.

-

The parameter type of a particular action will never change but it is -possible for an action to be removed and for a new action to be added -with the same name but a different parameter type.

-
-

Parameters

-
----- - - - - - - - - - - - - -

action_group

a GActionGroup

 

action_name

the name of the action to query

 
-
-
-

Returns

-

the parameter type.

-

[nullable]

-
-

Since: 2.28

-
-
-
-

g_action_group_get_action_state_type ()

-
const GVariantType *
-g_action_group_get_action_state_type (GActionGroup *action_group,
-                                      const gchar *action_name);
-

Queries the type of the state of the named action within -action_group -.

-

If the action is stateful then this function returns the -GVariantType of the state. All calls to -g_action_group_change_action_state() must give a GVariant of this -type and g_action_group_get_action_state() will return a GVariant -of the same type.

-

If the action is not stateful then this function will return NULL. -In that case, g_action_group_get_action_state() will return NULL -and you must not call g_action_group_change_action_state().

-

The state type of a particular action will never change but it is -possible for an action to be removed and for a new action to be added -with the same name but a different state type.

-
-

Parameters

-
----- - - - - - - - - - - - - -

action_group

a GActionGroup

 

action_name

the name of the action to query

 
-
-
-

Returns

-

the state type, if the action is stateful.

-

[nullable]

-
-

Since: 2.28

-
-
-
-

g_action_group_get_action_state_hint ()

-
GVariant *
-g_action_group_get_action_state_hint (GActionGroup *action_group,
-                                      const gchar *action_name);
-

Requests a hint about the valid range of values for the state of the -named action within action_group -.

-

If NULL is returned it either means that the action is not stateful -or that there is no hint about the valid range of values for the -state of the action.

-

If a GVariant array is returned then each item in the array is a -possible value for the state. If a GVariant pair (ie: two-tuple) is -returned then the tuple specifies the inclusive lower and upper bound -of valid values for the state.

-

In any case, the information is merely a hint. It may be possible to -have a state value outside of the hinted range and setting a value -within the range may fail.

-

The return value (if non-NULL) should be freed with -g_variant_unref() when it is no longer required.

-
-

Parameters

-
----- - - - - - - - - - - - - -

action_group

a GActionGroup

 

action_name

the name of the action to query

 
-
-
-

Returns

-

the state range hint.

-

[nullable][transfer full]

-
-

Since: 2.28

-
-
-
-

g_action_group_get_action_state ()

-
GVariant *
-g_action_group_get_action_state (GActionGroup *action_group,
-                                 const gchar *action_name);
-

Queries the current state of the named action within action_group -.

-

If the action is not stateful then NULL will be returned. If the -action is stateful then the type of the return value is the type -given by g_action_group_get_action_state_type().

-

The return value (if non-NULL) should be freed with -g_variant_unref() when it is no longer required.

-
-

Parameters

-
----- - - - - - - - - - - - - -

action_group

a GActionGroup

 

action_name

the name of the action to query

 
-
-
-

Returns

-

the current state of the action.

-

[nullable]

-
-

Since: 2.28

-
-
-
-

g_action_group_change_action_state ()

-
void
-g_action_group_change_action_state (GActionGroup *action_group,
-                                    const gchar *action_name,
-                                    GVariant *value);
-

Request for the state of the named action within action_group - to be -changed to value -.

-

The action must be stateful and value - must be of the correct type. -See g_action_group_get_action_state_type().

-

This call merely requests a change. The action may refuse to change -its state or may change its state to something other than value -. -See g_action_group_get_action_state_hint().

-

If the value - GVariant is floating, it is consumed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

action_group

a GActionGroup

 

action_name

the name of the action to request the change on

 

value

the new state

 
-
-

Since: 2.28

-
-
-
-

g_action_group_activate_action ()

-
void
-g_action_group_activate_action (GActionGroup *action_group,
-                                const gchar *action_name,
-                                GVariant *parameter);
-

Activate the named action within action_group -.

-

If the action is expecting a parameter, then the correct type of -parameter must be given as parameter -. If the action is expecting no -parameters then parameter - must be NULL. See -g_action_group_get_action_parameter_type().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

action_group

a GActionGroup

 

action_name

the name of the action to activate

 

parameter

parameters to the activation.

[nullable]
-
-

Since: 2.28

-
-
-
-

g_action_group_action_added ()

-
void
-g_action_group_action_added (GActionGroup *action_group,
-                             const gchar *action_name);
-

Emits the “action-added” signal on action_group -.

-

This function should only be called by GActionGroup implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - -

action_group

a GActionGroup

 

action_name

the name of an action in the group

 
-
-

Since: 2.28

-
-
-
-

g_action_group_action_removed ()

-
void
-g_action_group_action_removed (GActionGroup *action_group,
-                               const gchar *action_name);
-

Emits the “action-removed” signal on action_group -.

-

This function should only be called by GActionGroup implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - -

action_group

a GActionGroup

 

action_name

the name of an action in the group

 
-
-

Since: 2.28

-
-
-
-

g_action_group_action_enabled_changed ()

-
void
-g_action_group_action_enabled_changed (GActionGroup *action_group,
-                                       const gchar *action_name,
-                                       gboolean enabled);
-

Emits the “action-enabled-changed” signal on action_group -.

-

This function should only be called by GActionGroup implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

action_group

a GActionGroup

 

action_name

the name of an action in the group

 

enabled

whether or not the action is now enabled

 
-
-

Since: 2.28

-
-
-
-

g_action_group_action_state_changed ()

-
void
-g_action_group_action_state_changed (GActionGroup *action_group,
-                                     const gchar *action_name,
-                                     GVariant *state);
-

Emits the “action-state-changed” signal on action_group -.

-

This function should only be called by GActionGroup implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

action_group

a GActionGroup

 

action_name

the name of an action in the group

 

state

the new state of the named action

 
-
-

Since: 2.28

-
-
-
-

Types and Values

-
-

GActionGroup

-
typedef struct _GActionGroup GActionGroup;
-

GActionGroup is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

struct GActionGroupInterface

-
struct GActionGroupInterface {
-  GTypeInterface g_iface;
-
-  /* virtual functions */
-  gboolean              (* has_action)                 (GActionGroup  *action_group,
-                                                        const gchar   *action_name);
-
-  gchar **              (* list_actions)               (GActionGroup  *action_group);
-
-  gboolean              (* get_action_enabled)         (GActionGroup  *action_group,
-                                                        const gchar   *action_name);
-
-  const GVariantType *  (* get_action_parameter_type)  (GActionGroup  *action_group,
-                                                        const gchar   *action_name);
-
-  const GVariantType *  (* get_action_state_type)      (GActionGroup  *action_group,
-                                                        const gchar   *action_name);
-
-  GVariant *            (* get_action_state_hint)      (GActionGroup  *action_group,
-                                                        const gchar   *action_name);
-
-  GVariant *            (* get_action_state)           (GActionGroup  *action_group,
-                                                        const gchar   *action_name);
-
-  void                  (* change_action_state)        (GActionGroup  *action_group,
-                                                        const gchar   *action_name,
-                                                        GVariant      *value);
-
-  void                  (* activate_action)            (GActionGroup  *action_group,
-                                                        const gchar   *action_name,
-                                                        GVariant      *parameter);
-
-  /* signals */
-  void                  (* action_added)               (GActionGroup  *action_group,
-                                                        const gchar   *action_name);
-  void                  (* action_removed)             (GActionGroup  *action_group,
-                                                        const gchar   *action_name);
-  void                  (* action_enabled_changed)     (GActionGroup  *action_group,
-                                                        const gchar   *action_name,
-                                                        gboolean       enabled);
-  void                  (* action_state_changed)       (GActionGroup   *action_group,
-                                                        const gchar    *action_name,
-                                                        GVariant       *state);
-
-  /* more virtual functions */
-  gboolean              (* query_action)               (GActionGroup        *action_group,
-                                                        const gchar         *action_name,
-                                                        gboolean            *enabled,
-                                                        const GVariantType **parameter_type,
-                                                        const GVariantType **state_type,
-                                                        GVariant           **state_hint,
-                                                        GVariant           **state);
-};
-
-

The virtual function table for GActionGroup.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

has_action ()

the virtual function pointer for g_action_group_has_action()

 

list_actions ()

the virtual function pointer for g_action_group_list_actions()

 

get_action_enabled ()

the virtual function pointer for g_action_group_get_action_enabled()

 

get_action_parameter_type ()

the virtual function pointer for g_action_group_get_action_parameter_type()

 

get_action_state_type ()

the virtual function pointer for g_action_group_get_action_state_type()

 

get_action_state_hint ()

the virtual function pointer for g_action_group_get_action_state_hint()

 

get_action_state ()

the virtual function pointer for g_action_group_get_action_state()

 

change_action_state ()

the virtual function pointer for g_action_group_change_action_state()

 

activate_action ()

the virtual function pointer for g_action_group_activate_action()

 

action_added ()

the class closure for the “action-added” signal

 

action_removed ()

the class closure for the “action-removed” signal

 

action_enabled_changed ()

the class closure for the “action-enabled-changed” signal

 

action_state_changed ()

the class closure for the “action-enabled-changed” signal

 

query_action ()

the virtual function pointer for g_action_group_query_action()

 
-
-

Since: 2.28

-
-
-
-

Signal Details

-
-

The “action-added” signal

-
void
-user_function (GActionGroup *action_group,
-               gchar        *action_name,
-               gpointer      user_data)
-

Signals that a new action was just added to the group. -This signal is emitted after the action has been added -and is now visible.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

action_group

the GActionGroup that changed

 

action_name

the name of the action in action_group -

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Has Details

-

Since: 2.28

-
-
-
-

The “action-enabled-changed” signal

-
void
-user_function (GActionGroup *action_group,
-               gchar        *action_name,
-               gboolean      enabled,
-               gpointer      user_data)
-

Signals that the enabled status of the named action has changed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

action_group

the GActionGroup that changed

 

action_name

the name of the action in action_group -

 

enabled

whether the action is enabled or not

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Has Details

-

Since: 2.28

-
-
-
-

The “action-removed” signal

-
void
-user_function (GActionGroup *action_group,
-               gchar        *action_name,
-               gpointer      user_data)
-

Signals that an action is just about to be removed from the group. -This signal is emitted before the action is removed, so the action -is still visible and can be queried from the signal handler.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

action_group

the GActionGroup that changed

 

action_name

the name of the action in action_group -

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Has Details

-

Since: 2.28

-
-
-
-

The “action-state-changed” signal

-
void
-user_function (GActionGroup *action_group,
-               gchar        *action_name,
-               GVariant     *value,
-               gpointer      user_data)
-

Signals that the state of the named action has changed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

action_group

the GActionGroup that changed

 

action_name

the name of the action in action_group -

 

value

the new value of the state

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Has Details

-

Since: 2.28

-
-
-
-

See Also

-

GAction

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GActionMap.html b/docs/reference/gio/html/GActionMap.html deleted file mode 100644 index 3834c2e54..000000000 --- a/docs/reference/gio/html/GActionMap.html +++ /dev/null @@ -1,503 +0,0 @@ - - - - -GActionMap: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GActionMap

-

GActionMap — Interface for action containers

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
-GAction * - -g_action_map_lookup_action () -
-void - -g_action_map_add_action_entries () -
-void - -g_action_map_add_action () -
-void - -g_action_map_remove_action () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
 GActionMap
structGActionMapInterface
structGActionEntry
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GActionMap
-
-
-
-

Prerequisites

-

-GActionMap requires - GObject.

-
-
-

Known Implementations

-

-GActionMap is implemented by - GApplication and GSimpleActionGroup.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

The GActionMap interface is implemented by GActionGroup -implementations that operate by containing a number of -named GAction instances, such as GSimpleActionGroup.

-

One useful application of this interface is to map the -names of actions from various action groups to unique, -prefixed names (e.g. by prepending "app." or "win."). -This is the motivation for the 'Map' part of the interface -name.

-
-
-

Functions

-
-

g_action_map_lookup_action ()

-
GAction *
-g_action_map_lookup_action (GActionMap *action_map,
-                            const gchar *action_name);
-

Looks up the action with the name action_name - in action_map -.

-

If no such action exists, returns NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

action_map

a GActionMap

 

action_name

the name of an action

 
-
-
-

Returns

-

a GAction, or NULL.

-

[transfer none]

-
-

Since: 2.32

-
-
-
-

g_action_map_add_action_entries ()

-
void
-g_action_map_add_action_entries (GActionMap *action_map,
-                                 const GActionEntry *entries,
-                                 gint n_entries,
-                                 gpointer user_data);
-

A convenience function for creating multiple GSimpleAction instances -and adding them to a GActionMap.

-

Each action is constructed as per one GActionEntry.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
static void
-activate_quit (GSimpleAction *simple,
-               GVariant      *parameter,
-               gpointer       user_data)
-{
-  exit (0);
-}
-
-static void
-activate_print_string (GSimpleAction *simple,
-                       GVariant      *parameter,
-                       gpointer       user_data)
-{
-  g_print ("%s\n", g_variant_get_string (parameter, NULL));
-}
-
-static GActionGroup *
-create_action_group (void)
-{
-  const GActionEntry entries[] = {
-    { "quit",         activate_quit              },
-    { "print-string", activate_print_string, "s" }
-  };
-  GSimpleActionGroup *group;
-
-  group = g_simple_action_group_new ();
-  g_action_map_add_action_entries (G_ACTION_MAP (group), entries, G_N_ELEMENTS (entries), NULL);
-
-  return G_ACTION_GROUP (group);
-}
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

action_map

a GActionMap

 

entries

a pointer to -the first item in an array of GActionEntry structs.

[array length=n_entries][element-type GActionEntry]

n_entries

the length of entries -, or -1 if entries -is NULL-terminated

 

user_data

the user data for signal connections

 
-
-

Since: 2.32

-
-
-
-

g_action_map_add_action ()

-
void
-g_action_map_add_action (GActionMap *action_map,
-                         GAction *action);
-

Adds an action to the action_map -.

-

If the action map already contains an action with the same name -as action - then the old action is dropped from the action map.

-

The action map takes its own reference on action -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

action_map

a GActionMap

 

action

a GAction

 
-
-

Since: 2.32

-
-
-
-

g_action_map_remove_action ()

-
void
-g_action_map_remove_action (GActionMap *action_map,
-                            const gchar *action_name);
-

Removes the named action from the action map.

-

If no action of this name is in the map then nothing happens.

-
-

Parameters

-
----- - - - - - - - - - - - - -

action_map

a GActionMap

 

action_name

the name of the action

 
-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

GActionMap

-
typedef struct _GActionMap GActionMap;
-

GActionMap is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

struct GActionMapInterface

-
struct GActionMapInterface {
-  GTypeInterface g_iface;
-
-  GAction * (* lookup_action) (GActionMap  *action_map,
-                               const gchar *action_name);
-  void      (* add_action)    (GActionMap  *action_map,
-                               GAction     *action);
-  void      (* remove_action) (GActionMap  *action_map,
-                               const gchar *action_name);
-};
-
-

The virtual function table for GActionMap.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

lookup_action ()

the virtual function pointer for g_action_map_lookup_action()

 

add_action ()

the virtual function pointer for g_action_map_add_action()

 

remove_action ()

the virtual function pointer for g_action_map_remove_action()

 
-
-

Since: 2.32

-
-
-
-

struct GActionEntry

-
struct GActionEntry {
-  const gchar *name;
-
-  void (* activate) (GSimpleAction *action,
-                     GVariant      *parameter,
-                     gpointer       user_data);
-
-  const gchar *parameter_type;
-
-  const gchar *state;
-
-  void (* change_state) (GSimpleAction *action,
-                         GVariant      *value,
-                         gpointer       user_data);
-};
-
-

This struct defines a single action. It is for use with -g_action_map_add_action_entries().

-

The order of the items in the structure are intended to reflect -frequency of use. It is permissible to use an incomplete initialiser -in order to leave some of the later values as NULL. All values -after name - are optional. Additional optional fields may be added in -the future.

-

See g_action_map_add_action_entries() for an example.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

const gchar *name;

the name of the action

 

activate ()

the callback to connect to the "activate" signal of the -action. Since GLib 2.40, this can be NULL for stateful -actions, in which case the default handler is used. For -boolean-stated actions with no parameter, this is a -toggle. For other state types (and parameter type equal -to the state type) this will be a function that -just calls change_state -(which you should provide).

 

const gchar *parameter_type;

the type of the parameter that must be passed to the -activate function for this action, given as a single -GVariant type string (or NULL for no parameter)

 

const gchar *state;

the initial state for this action, given in -GVariant text format. The state is parsed -with no extra type information, so type tags must be added to -the string if they are necessary. Stateless actions should -give NULL here.

 

change_state ()

the callback to connect to the "change-state" signal -of the action. All stateful actions should provide a -handler here; stateless actions should not.

 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GAppInfo.html b/docs/reference/gio/html/GAppInfo.html deleted file mode 100644 index 03bfa2d8a..000000000 --- a/docs/reference/gio/html/GAppInfo.html +++ /dev/null @@ -1,2310 +0,0 @@ - - - - -GAppInfo: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GAppInfo

-

GAppInfo — Application information and launch contexts

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GAppInfo * - -g_app_info_create_from_commandline () -
-GAppInfo * - -g_app_info_dup () -
-gboolean - -g_app_info_equal () -
const char * - -g_app_info_get_id () -
const char * - -g_app_info_get_name () -
const char * - -g_app_info_get_display_name () -
const char * - -g_app_info_get_description () -
const char * - -g_app_info_get_executable () -
const char * - -g_app_info_get_commandline () -
-GIcon * - -g_app_info_get_icon () -
-gboolean - -g_app_info_launch () -
-gboolean - -g_app_info_supports_files () -
-gboolean - -g_app_info_supports_uris () -
-gboolean - -g_app_info_launch_uris () -
-gboolean - -g_app_info_should_show () -
-gboolean - -g_app_info_can_delete () -
-gboolean - -g_app_info_delete () -
-void - -g_app_info_reset_type_associations () -
-gboolean - -g_app_info_set_as_default_for_type () -
-gboolean - -g_app_info_set_as_default_for_extension () -
-gboolean - -g_app_info_set_as_last_used_for_type () -
-gboolean - -g_app_info_add_supports_type () -
-gboolean - -g_app_info_can_remove_supports_type () -
-gboolean - -g_app_info_remove_supports_type () -
const char ** - -g_app_info_get_supported_types () -
-GList * - -g_app_info_get_all () -
-GList * - -g_app_info_get_all_for_type () -
-GAppInfo * - -g_app_info_get_default_for_type () -
-GAppInfo * - -g_app_info_get_default_for_uri_scheme () -
-GList * - -g_app_info_get_fallback_for_type () -
-GList * - -g_app_info_get_recommended_for_type () -
-gboolean - -g_app_info_launch_default_for_uri () -
-void - -g_app_info_launch_default_for_uri_async () -
-gboolean - -g_app_info_launch_default_for_uri_finish () -
-void - -g_app_launch_context_setenv () -
-void - -g_app_launch_context_unsetenv () -
-char ** - -g_app_launch_context_get_environment () -
-char * - -g_app_launch_context_get_display () -
-char * - -g_app_launch_context_get_startup_notify_id () -
-void - -g_app_launch_context_launch_failed () -
-GAppLaunchContext * - -g_app_launch_context_new () -
-
-
-

Signals

-
----- - - - - - - - - - - - - -
voidlaunch-failedRun Last
voidlaunchedRun Last
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
enumGAppInfoCreateFlags
 GAppInfo
structGAppInfoIface
 GAppLaunchContext
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GAppInfo
-    GObject
-    ╰── GAppLaunchContext
-
-
-
-

Prerequisites

-

-GAppInfo requires - GObject.

-
-
-

Known Implementations

-

-GAppInfo is implemented by - GDesktopAppInfo.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GAppInfo and GAppLaunchContext are used for describing and launching -applications installed on the system.

-

As of GLib 2.20, URIs will always be converted to POSIX paths -(using g_file_get_path()) when using g_app_info_launch() even if -the application requested an URI and not a POSIX path. For example -for an desktop-file based application with Exec key totem -%U and a single URI, sftp://foo/file.avi, then -/home/user/.gvfs/sftp on foo/file.avi will be passed. This will -only work if a set of suitable GIO extensions (such as gvfs 2.26 -compiled with FUSE support), is available and operational; if this -is not the case, the URI will be passed unmodified to the application. -Some URIs, such as mailto:, of course cannot be mapped to a POSIX -path (in gvfs there's no FUSE mount for it); such URIs will be -passed unmodified to the application.

-

Specifically for gvfs 2.26 and later, the POSIX URI will be mapped -back to the GIO URI in the GFile constructors (since gvfs -implements the GVfs extension point). As such, if the application -needs to examine the URI, it needs to use g_file_get_uri() or -similar on GFile. In other words, an application cannot assume -that the URI passed to e.g. g_file_new_for_commandline_arg() is -equal to the result of g_file_get_uri(). The following snippet -illustrates this:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
GFile *f;
-char *uri;
-
-file = g_file_new_for_commandline_arg (uri_from_commandline);
-
-uri = g_file_get_uri (file);
-strcmp (uri, uri_from_commandline) == 0;
-g_free (uri);
-
-if (g_file_has_uri_scheme (file, "cdda"))
-  {
-    // do something special with uri
-  }
-g_object_unref (file);
-
- -

-

This code will work when both cdda://sr0/Track 1.wav and -/home/user/.gvfs/cdda on sr0/Track 1.wav is passed to the -application. It should be noted that it's generally not safe -for applications to rely on the format of a particular URIs. -Different launcher applications (e.g. file managers) may have -different ideas of what a given URI means.

-
-
-

Functions

-
-

g_app_info_create_from_commandline ()

-
GAppInfo *
-g_app_info_create_from_commandline (const char *commandline,
-                                    const char *application_name,
-                                    GAppInfoCreateFlags flags,
-                                    GError **error);
-

Creates a new GAppInfo from the given information.

-

Note that for commandline -, the quoting rules of the Exec key of the -freedesktop.org Desktop Entry Specification -are applied. For example, if the commandline - contains -percent-encoded URIs, the percent-character must be doubled in order to prevent it from -being swallowed by Exec key unquoting. See the specification for exact quoting rules.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

commandline

the commandline to use

 

application_name

the application name, or NULL to use commandline -.

[nullable]

flags

flags that can specify details of the created GAppInfo

 

error

a GError location to store the error occurring, NULL to ignore.

 
-
-
-

Returns

-

new GAppInfo for given command.

-

[transfer full]

-
-
-
-
-

g_app_info_dup ()

-
GAppInfo *
-g_app_info_dup (GAppInfo *appinfo);
-

Creates a duplicate of a GAppInfo.

-
-

Parameters

-
----- - - - - - -

appinfo

a GAppInfo.

 
-
-
-

Returns

-

a duplicate of appinfo -.

-

[transfer full]

-
-
-
-
-

g_app_info_equal ()

-
gboolean
-g_app_info_equal (GAppInfo *appinfo1,
-                  GAppInfo *appinfo2);
-

Checks if two GAppInfos are equal.

-

Note that the check <em>may not</em> compare each individual field, and -only does an identity check. In case detecting changes in the contents -is needed, program code must additionally compare relevant fields.

-
-

Parameters

-
----- - - - - - - - - - - - - -

appinfo1

the first GAppInfo.

 

appinfo2

the second GAppInfo.

 
-
-
-

Returns

-

TRUE if appinfo1 -is equal to appinfo2 -. FALSE otherwise.

-
-
-
-
-

g_app_info_get_id ()

-
const char *
-g_app_info_get_id (GAppInfo *appinfo);
-

Gets the ID of an application. An id is a string that -identifies the application. The exact format of the id is -platform dependent. For instance, on Unix this is the -desktop file id from the xdg menu specification.

-

Note that the returned ID may be NULL, depending on how -the appinfo - has been constructed.

-
-

Parameters

-
----- - - - - - -

appinfo

a GAppInfo.

 
-
-
-

Returns

-

a string containing the application's ID.

-
-
-
-
-

g_app_info_get_name ()

-
const char *
-g_app_info_get_name (GAppInfo *appinfo);
-

Gets the installed name of the application.

-
-

Parameters

-
----- - - - - - -

appinfo

a GAppInfo.

 
-
-
-

Returns

-

the name of the application for appinfo -.

-
-
-
-
-

g_app_info_get_display_name ()

-
const char *
-g_app_info_get_display_name (GAppInfo *appinfo);
-

Gets the display name of the application. The display name is often more -descriptive to the user than the name itself.

-
-

Parameters

-
----- - - - - - -

appinfo

a GAppInfo.

 
-
-
-

Returns

-

the display name of the application for appinfo -, or the name if -no display name is available.

-
-

Since: 2.24

-
-
-
-

g_app_info_get_description ()

-
const char *
-g_app_info_get_description (GAppInfo *appinfo);
-

Gets a human-readable description of an installed application.

-
-

Parameters

-
----- - - - - - -

appinfo

a GAppInfo.

 
-
-
-

Returns

-

a string containing a description of the -application appinfo -, or NULL if none.

-
-
-
-
-

g_app_info_get_executable ()

-
const char *
-g_app_info_get_executable (GAppInfo *appinfo);
-

Gets the executable's name for the installed application.

-
-

Parameters

-
----- - - - - - -

appinfo

a GAppInfo

 
-
-
-

Returns

-

a string containing the appinfo -'s application -binaries name.

-

[type filename]

-
-
-
-
-

g_app_info_get_commandline ()

-
const char *
-g_app_info_get_commandline (GAppInfo *appinfo);
-

Gets the commandline with which the application will be -started.

-
-

Parameters

-
----- - - - - - -

appinfo

a GAppInfo

 
-
-
-

Returns

-

a string containing the appinfo -'s commandline, -or NULL if this information is not available.

-

[type filename]

-
-

Since: 2.20

-
-
-
-

g_app_info_get_icon ()

-
GIcon *
-g_app_info_get_icon (GAppInfo *appinfo);
-

Gets the icon for the application.

-
-

Parameters

-
----- - - - - - -

appinfo

a GAppInfo.

 
-
-
-

Returns

-

the default GIcon for appinfo -or NULL -if there is no default icon.

-

[transfer none]

-
-
-
-
-

g_app_info_launch ()

-
gboolean
-g_app_info_launch (GAppInfo *appinfo,
-                   GList *files,
-                   GAppLaunchContext *launch_context,
-                   GError **error);
-

Launches the application. Passes files - to the launched application -as arguments, using the optional launch_context - to get information -about the details of the launcher (like what screen it is on). -On error, error - will be set accordingly.

-

To launch the application without arguments pass a NULL files - list.

-

Note that even if the launch is successful the application launched -can fail to start if it runs into problems during startup. There is -no way to detect this.

-

Some URIs can be changed when passed through a GFile (for instance -unsupported URIs with strange formats like mailto:), so if you have -a textual URI you want to pass in as argument, consider using -g_app_info_launch_uris() instead.

-

The launched application inherits the environment of the launching -process, but it can be modified with g_app_launch_context_setenv() -and g_app_launch_context_unsetenv().

-

On UNIX, this function sets the GIO_LAUNCHED_DESKTOP_FILE -environment variable with the path of the launched desktop file and -GIO_LAUNCHED_DESKTOP_FILE_PID to the process id of the launched -process. This can be used to ignore GIO_LAUNCHED_DESKTOP_FILE, -should it be inherited by further processes. The DISPLAY and -DESKTOP_STARTUP_ID environment variables are also set, based -on information provided in launch_context -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

appinfo

a GAppInfo

 

files

a GList of GFile objects.

[nullable][element-type GFile]

launch_context

a GAppLaunchContext or NULL.

[nullable]

error

a GError

 
-
-
-

Returns

-

TRUE on successful launch, FALSE otherwise.

-
-
-
-
-

g_app_info_supports_files ()

-
gboolean
-g_app_info_supports_files (GAppInfo *appinfo);
-

Checks if the application accepts files as arguments.

-
-

Parameters

-
----- - - - - - -

appinfo

a GAppInfo.

 
-
-
-

Returns

-

TRUE if the appinfo -supports files.

-
-
-
-
-

g_app_info_supports_uris ()

-
gboolean
-g_app_info_supports_uris (GAppInfo *appinfo);
-

Checks if the application supports reading files and directories from URIs.

-
-

Parameters

-
----- - - - - - -

appinfo

a GAppInfo.

 
-
-
-

Returns

-

TRUE if the appinfo -supports URIs.

-
-
-
-
-

g_app_info_launch_uris ()

-
gboolean
-g_app_info_launch_uris (GAppInfo *appinfo,
-                        GList *uris,
-                        GAppLaunchContext *launch_context,
-                        GError **error);
-

Launches the application. This passes the uris - to the launched application -as arguments, using the optional launch_context - to get information -about the details of the launcher (like what screen it is on). -On error, error - will be set accordingly.

-

To launch the application without arguments pass a NULL uris - list.

-

Note that even if the launch is successful the application launched -can fail to start if it runs into problems during startup. There is -no way to detect this.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

appinfo

a GAppInfo

 

uris

a GList containing URIs to launch.

[nullable][element-type utf8]

launch_context

a GAppLaunchContext or NULL.

[nullable]

error

a GError

 
-
-
-

Returns

-

TRUE on successful launch, FALSE otherwise.

-
-
-
-
-

g_app_info_should_show ()

-
gboolean
-g_app_info_should_show (GAppInfo *appinfo);
-

Checks if the application info should be shown in menus that -list available applications.

-
-

Parameters

-
----- - - - - - -

appinfo

a GAppInfo.

 
-
-
-

Returns

-

TRUE if the appinfo -should be shown, FALSE otherwise.

-
-
-
-
-

g_app_info_can_delete ()

-
gboolean
-g_app_info_can_delete (GAppInfo *appinfo);
-

Obtains the information whether the GAppInfo can be deleted. -See g_app_info_delete().

-
-

Parameters

-
----- - - - - - -

appinfo

a GAppInfo

 
-
-
-

Returns

-

TRUE if appinfo -can be deleted

-
-

Since: 2.20

-
-
-
-

g_app_info_delete ()

-
gboolean
-g_app_info_delete (GAppInfo *appinfo);
-

Tries to delete a GAppInfo.

-

On some platforms, there may be a difference between user-defined -GAppInfos which can be deleted, and system-wide ones which cannot. -See g_app_info_can_delete().

-

Virtual: do_delete

-
-

Parameters

-
----- - - - - - -

appinfo

a GAppInfo

 
-
-
-

Returns

-

TRUE if appinfo -has been deleted

-
-

Since: 2.20

-
-
-
-

g_app_info_reset_type_associations ()

-
void
-g_app_info_reset_type_associations (const char *content_type);
-

Removes all changes to the type associations done by -g_app_info_set_as_default_for_type(), -g_app_info_set_as_default_for_extension(), -g_app_info_add_supports_type() or -g_app_info_remove_supports_type().

-
-

Parameters

-
----- - - - - - -

content_type

a content type

 
-
-

Since: 2.20

-
-
-
-

g_app_info_set_as_default_for_type ()

-
gboolean
-g_app_info_set_as_default_for_type (GAppInfo *appinfo,
-                                    const char *content_type,
-                                    GError **error);
-

Sets the application as the default handler for a given type.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

appinfo

a GAppInfo.

 

content_type

the content type.

 

error

a GError.

 
-
-
-

Returns

-

TRUE on success, FALSE on error.

-
-
-
-
-

g_app_info_set_as_default_for_extension ()

-
gboolean
-g_app_info_set_as_default_for_extension
-                               (GAppInfo *appinfo,
-                                const char *extension,
-                                GError **error);
-

Sets the application as the default handler for the given file extension.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

appinfo

a GAppInfo.

 

extension

a string containing the file extension -(without the dot).

[type filename]

error

a GError.

 
-
-
-

Returns

-

TRUE on success, FALSE on error.

-
-
-
-
-

g_app_info_set_as_last_used_for_type ()

-
gboolean
-g_app_info_set_as_last_used_for_type (GAppInfo *appinfo,
-                                      const char *content_type,
-                                      GError **error);
-

Sets the application as the last used application for a given type. -This will make the application appear as first in the list returned -by g_app_info_get_recommended_for_type(), regardless of the default -application for that content type.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

appinfo

a GAppInfo.

 

content_type

the content type.

 

error

a GError.

 
-
-
-

Returns

-

TRUE on success, FALSE on error.

-
-
-
-
-

g_app_info_add_supports_type ()

-
gboolean
-g_app_info_add_supports_type (GAppInfo *appinfo,
-                              const char *content_type,
-                              GError **error);
-

Adds a content type to the application information to indicate the -application is capable of opening files with the given content type.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

appinfo

a GAppInfo.

 

content_type

a string.

 

error

a GError.

 
-
-
-

Returns

-

TRUE on success, FALSE on error.

-
-
-
-
-

g_app_info_can_remove_supports_type ()

-
gboolean
-g_app_info_can_remove_supports_type (GAppInfo *appinfo);
-

Checks if a supported content type can be removed from an application.

-
-

Parameters

-
----- - - - - - -

appinfo

a GAppInfo.

 
-
-
-

Returns

-

TRUE if it is possible to remove supported -content types from a given appinfo -, FALSE if not.

-
-
-
-
-

g_app_info_remove_supports_type ()

-
gboolean
-g_app_info_remove_supports_type (GAppInfo *appinfo,
-                                 const char *content_type,
-                                 GError **error);
-

Removes a supported type from an application, if possible.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

appinfo

a GAppInfo.

 

content_type

a string.

 

error

a GError.

 
-
-
-

Returns

-

TRUE on success, FALSE on error.

-
-
-
-
-

g_app_info_get_supported_types ()

-
const char **
-g_app_info_get_supported_types (GAppInfo *appinfo);
-

Retrieves the list of content types that app_info - claims to support. -If this information is not provided by the environment, this function -will return NULL. -This function does not take in consideration associations added with -g_app_info_add_supports_type(), but only those exported directly by -the application.

-
-

Parameters

-
----- - - - - - -

appinfo

a GAppInfo that can handle files

 
-
-
-

Returns

-

a list of content types.

-

[transfer none][array zero-terminated=1][element-type utf8]

-
-

Since: 2.34

-
-
-
-

g_app_info_get_all ()

-
GList *
-g_app_info_get_all (void);
-

Gets a list of all of the applications currently registered -on this system.

-

For desktop files, this includes applications that have -NoDisplay=true set or are excluded from display by means -of OnlyShowIn or NotShowIn. See g_app_info_should_show(). -The returned list does not include applications which have -the Hidden key set.

-
-

Returns

-

a newly allocated GList of references to GAppInfos.

-

[element-type GAppInfo][transfer full]

-
-
-
-
-

g_app_info_get_all_for_type ()

-
GList *
-g_app_info_get_all_for_type (const char *content_type);
-

Gets a list of all GAppInfos for a given content type, -including the recommended and fallback GAppInfos. See -g_app_info_get_recommended_for_type() and -g_app_info_get_fallback_for_type().

-
-

Parameters

-
----- - - - - - -

content_type

the content type to find a GAppInfo for

 
-
-
-

Returns

-

GList of GAppInfos -for given content_type -or NULL on error.

-

[element-type GAppInfo][transfer full]

-
-
-
-
-

g_app_info_get_default_for_type ()

-
GAppInfo *
-g_app_info_get_default_for_type (const char *content_type,
-                                 gboolean must_support_uris);
-

Gets the default GAppInfo for a given content type.

-
-

Parameters

-
----- - - - - - - - - - - - - -

content_type

the content type to find a GAppInfo for

 

must_support_uris

if TRUE, the GAppInfo is expected to -support URIs

 
-
-
-

Returns

-

GAppInfo for given content_type -or -NULL on error.

-

[transfer full]

-
-
-
-
-

g_app_info_get_default_for_uri_scheme ()

-
GAppInfo *
-g_app_info_get_default_for_uri_scheme (const char *uri_scheme);
-

Gets the default application for handling URIs with -the given URI scheme. A URI scheme is the initial part -of the URI, up to but not including the ':', e.g. "http", -"ftp" or "sip".

-
-

Parameters

-
----- - - - - - -

uri_scheme

a string containing a URI scheme.

 
-
-
-

Returns

-

GAppInfo for given uri_scheme -or NULL on error.

-

[transfer full]

-
-
-
-
-

g_app_info_get_fallback_for_type ()

-
GList *
-g_app_info_get_fallback_for_type (const gchar *content_type);
-

Gets a list of fallback GAppInfos for a given content type, i.e. -those applications which claim to support the given content type -by MIME type subclassing and not directly.

-
-

Parameters

-
----- - - - - - -

content_type

the content type to find a GAppInfo for

 
-
-
-

Returns

-

GList of GAppInfos -for given content_type -or NULL on error.

-

[element-type GAppInfo][transfer full]

-
-

Since: 2.28

-
-
-
-

g_app_info_get_recommended_for_type ()

-
GList *
-g_app_info_get_recommended_for_type (const gchar *content_type);
-

Gets a list of recommended GAppInfos for a given content type, i.e. -those applications which claim to support the given content type exactly, -and not by MIME type subclassing. -Note that the first application of the list is the last used one, i.e. -the last one for which g_app_info_set_as_last_used_for_type() has been -called.

-
-

Parameters

-
----- - - - - - -

content_type

the content type to find a GAppInfo for

 
-
-
-

Returns

-

GList of GAppInfos -for given content_type -or NULL on error.

-

[element-type GAppInfo][transfer full]

-
-

Since: 2.28

-
-
-
-

g_app_info_launch_default_for_uri ()

-
gboolean
-g_app_info_launch_default_for_uri (const char *uri,
-                                   GAppLaunchContext *launch_context,
-                                   GError **error);
-

Utility function that launches the default application -registered to handle the specified uri. Synchronous I/O -is done on the uri to detect the type of the file if -required.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

uri

the uri to show

 

launch_context

an optional GAppLaunchContext.

[nullable]

error

return location for an error, or NULL.

[nullable]
-
-
-

Returns

-

TRUE on success, FALSE on error.

-
-
-
-
-

g_app_info_launch_default_for_uri_async ()

-
void
-g_app_info_launch_default_for_uri_async
-                               (const char *uri,
-                                GAppLaunchContext *launch_context,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

Async version of g_app_info_launch_default_for_uri().

-

This version is useful if you are interested in receiving -error information in the case where the application is -sandboxed and the portal may present an application chooser -dialog to the user.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

uri

the uri to show

 

context

an optional GAppLaunchContext -cancellable: (nullable): a GCancellable.

[nullable]

callback

a GASyncReadyCallback to call when the request is done.

[nullable]

user_data

data to pass to callback -.

[nullable]
-
-

Since: 2.50

-
-
-
-

g_app_info_launch_default_for_uri_finish ()

-
gboolean
-g_app_info_launch_default_for_uri_finish
-                               (GAsyncResult *result,
-                                GError **error);
-

Finishes an asynchronous launch-default-for-uri operation.

-
-

Parameters

-
----- - - - - - - - - - - - - -

result

a GAsyncResult

 

error

return location for an error, or NULL.

[nullable]
-
-
-

Returns

-

TRUE if the launch was successful, FALSE if error -is set

-
-

Since: 2.50

-
-
-
-

g_app_launch_context_setenv ()

-
void
-g_app_launch_context_setenv (GAppLaunchContext *context,
-                             const char *variable,
-                             const char *value);
-

Arranges for variable - to be set to value - in the child's -environment when context - is used to launch an application.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

context

a GAppLaunchContext

 

variable

the environment variable to set

 

value

the value for to set the variable to.

 
-
-

Since: 2.32

-
-
-
-

g_app_launch_context_unsetenv ()

-
void
-g_app_launch_context_unsetenv (GAppLaunchContext *context,
-                               const char *variable);
-

Arranges for variable - to be unset in the child's environment -when context - is used to launch an application.

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GAppLaunchContext

 

variable

the environment variable to remove

 
-
-

Since: 2.32

-
-
-
-

g_app_launch_context_get_environment ()

-
char **
-g_app_launch_context_get_environment (GAppLaunchContext *context);
-

Gets the complete environment variable list to be passed to -the child process when context - is used to launch an application. -This is a NULL-terminated array of strings, where each string has -the form KEY=VALUE.

-
-

Parameters

-
----- - - - - - -

context

a GAppLaunchContext

 
-
-
-

Returns

-

the -child's environment.

-

[array zero-terminated=1][transfer full]

-
-

Since: 2.32

-
-
-
-

g_app_launch_context_get_display ()

-
char *
-g_app_launch_context_get_display (GAppLaunchContext *context,
-                                  GAppInfo *info,
-                                  GList *files);
-

Gets the display string for the context -. This is used to ensure new -applications are started on the same display as the launching -application, by setting the DISPLAY environment variable.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

context

a GAppLaunchContext

 

info

a GAppInfo

 

files

a GList of GFile objects.

[element-type GFile]
-
-
-

Returns

-

a display string for the display.

-
-
-
-
-

g_app_launch_context_get_startup_notify_id ()

-
char *
-g_app_launch_context_get_startup_notify_id
-                               (GAppLaunchContext *context,
-                                GAppInfo *info,
-                                GList *files);
-

Initiates startup notification for the application and returns the -DESKTOP_STARTUP_ID for the launched operation, if supported.

-

Startup notification IDs are defined in the -[FreeDesktop.Org Startup Notifications standard](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt").

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

context

a GAppLaunchContext

 

info

a GAppInfo

 

files

a GList of of GFile objects.

[element-type GFile]
-
-
-

Returns

-

a startup notification ID for the application, or NULL if -not supported.

-
-
-
-
-

g_app_launch_context_launch_failed ()

-
void
-g_app_launch_context_launch_failed (GAppLaunchContext *context,
-                                    const char *startup_notify_id);
-

Called when an application has failed to launch, so that it can cancel -the application startup notification started in g_app_launch_context_get_startup_notify_id().

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GAppLaunchContext.

 

startup_notify_id

the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().

 
-
-
-
-
-

g_app_launch_context_new ()

-
GAppLaunchContext *
-g_app_launch_context_new (void);
-

Creates a new application launch context. This is not normally used, -instead you instantiate a subclass of this, such as GdkAppLaunchContext.

-
-

Returns

-

a GAppLaunchContext.

-
-
-
-
-

Types and Values

-
-

enum GAppInfoCreateFlags

-

Flags used when creating a GAppInfo.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_APP_INFO_CREATE_NONE

-

No flags.

-
 

G_APP_INFO_CREATE_NEEDS_TERMINAL

-

Application opens in a terminal window.

-
 

G_APP_INFO_CREATE_SUPPORTS_URIS

-

Application supports URI arguments.

-
 

G_APP_INFO_CREATE_SUPPORTS_STARTUP_NOTIFICATION

-

Application supports startup notification. Since 2.26

-
 
-
-
-
-
-

GAppInfo

-
typedef struct _GAppInfo GAppInfo;
-

Information about an installed application and methods to launch -it (with file arguments).

-
-
-
-

struct GAppInfoIface

-
struct GAppInfoIface {
-  GTypeInterface g_iface;
-
-  /* Virtual Table */
-
-  GAppInfo *   (* dup)                          (GAppInfo           *appinfo);
-  gboolean     (* equal)                        (GAppInfo           *appinfo1,
-                                                 GAppInfo           *appinfo2);
-  const char * (* get_id)                       (GAppInfo           *appinfo);
-  const char * (* get_name)                     (GAppInfo           *appinfo);
-  const char * (* get_description)              (GAppInfo           *appinfo);
-  const char * (* get_executable)               (GAppInfo           *appinfo);
-  GIcon *      (* get_icon)                     (GAppInfo           *appinfo);
-  gboolean     (* launch)                       (GAppInfo           *appinfo,
-                                                 GList              *files,
-                                                 GAppLaunchContext  *launch_context,
-                                                 GError            **error);
-  gboolean     (* supports_uris)                (GAppInfo           *appinfo);
-  gboolean     (* supports_files)               (GAppInfo           *appinfo);
-  gboolean     (* launch_uris)                  (GAppInfo           *appinfo,
-                                                 GList              *uris,
-                                                 GAppLaunchContext  *launch_context,
-                                                 GError            **error);
-  gboolean     (* should_show)                  (GAppInfo           *appinfo);
-
-  /* For changing associations */
-  gboolean     (* set_as_default_for_type)      (GAppInfo           *appinfo,
-                                                 const char         *content_type,
-                                                 GError            **error);
-  gboolean     (* set_as_default_for_extension) (GAppInfo           *appinfo,
-                                                 const char         *extension,
-                                                 GError            **error);
-  gboolean     (* add_supports_type)            (GAppInfo           *appinfo,
-                                                 const char         *content_type,
-                                                 GError            **error);
-  gboolean     (* can_remove_supports_type)     (GAppInfo           *appinfo);
-  gboolean     (* remove_supports_type)         (GAppInfo           *appinfo,
-                                                 const char         *content_type,
-                                                 GError            **error);
-  gboolean     (* can_delete)                   (GAppInfo           *appinfo);
-  gboolean     (* do_delete)                    (GAppInfo           *appinfo);
-  const char * (* get_commandline)              (GAppInfo           *appinfo);
-  const char * (* get_display_name)             (GAppInfo           *appinfo);
-  gboolean     (* set_as_last_used_for_type)    (GAppInfo           *appinfo,
-                                                 const char         *content_type,
-                                                 GError            **error);
-  const char ** (* get_supported_types)         (GAppInfo           *appinfo);
-};
-
-

Application Information interface, for operating system portability.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

dup ()

Copies a GAppInfo.

 

equal ()

Checks two GAppInfos for equality.

 

get_id ()

Gets a string identifier for a GAppInfo.

 

get_name ()

Gets the name of the application for a GAppInfo.

 

get_description ()

Gets a short description for the application described by the GAppInfo.

 

get_executable ()

Gets the executable name for the GAppInfo.

 

get_icon ()

Gets the GIcon for the GAppInfo.

 

launch ()

Launches an application specified by the GAppInfo.

 

supports_uris ()

Indicates whether the application specified supports launching URIs.

 

supports_files ()

Indicates whether the application specified accepts filename arguments.

 

launch_uris ()

Launches an application with a list of URIs.

 

should_show ()

Returns whether an application should be shown (e.g. when getting a list of installed applications). -FreeDesktop.Org Startup Notification Specification.

 

set_as_default_for_type ()

Sets an application as default for a given content type.

 

set_as_default_for_extension ()

Sets an application as default for a given file extension.

 

add_supports_type ()

Adds to the GAppInfo information about supported file types.

 

can_remove_supports_type ()

Checks for support for removing supported file types from a GAppInfo.

 

remove_supports_type ()

Removes a supported application type from a GAppInfo.

 

can_delete ()

Checks if a GAppInfo can be deleted. Since 2.20

 

do_delete ()

Deletes a GAppInfo. Since 2.20

 

get_commandline ()

Gets the commandline for the GAppInfo. Since 2.20

 

get_display_name ()

Gets the display name for the GAppInfo. Since 2.24

 

set_as_last_used_for_type ()

Sets the application as the last used. See g_app_info_set_as_last_used_for_type().

 

get_supported_types ()

Retrieves the list of content types that app_info -claims to support.

 
-
-
-
-
-

GAppLaunchContext

-
typedef struct _GAppLaunchContext GAppLaunchContext;
-

Integrating the launch with the launching application. This is used to -handle for instance startup notification and launching the new application -on the same screen as the launching window.

-
-
-
-

Signal Details

-
-

The “launch-failed” signal

-
void
-user_function (GAppLaunchContext *context,
-               gchar             *startup_notify_id,
-               gpointer           user_data)
-

The ::launch-failed signal is emitted when a GAppInfo launch -fails. The startup notification id is provided, so that the launcher -can cancel the startup notification.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

context

the object emitting the signal

 

startup_notify_id

the startup notification id for the failed launch

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.36

-
-
-
-

The “launched” signal

-
void
-user_function (GAppLaunchContext *context,
-               GAppInfo          *info,
-               GVariant          *platform_data,
-               gpointer           user_data)
-

The ::launched signal is emitted when a GAppInfo is successfully -launched. The platform_data - is an GVariant dictionary mapping -strings to variants (ie a{sv}), which contains additional, -platform-specific data about this launch. On UNIX, at least the -"pid" and "startup-notification-id" keys will be present.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

context

the object emitting the signal

 

info

the GAppInfo that was just launched

 

platform_data

additional platform-specific data for this launch

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.36

-
-
-
-

See Also

-

GAppInfoMonitor

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GAppInfoMonitor.html b/docs/reference/gio/html/GAppInfoMonitor.html deleted file mode 100644 index a33093132..000000000 --- a/docs/reference/gio/html/GAppInfoMonitor.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - -GAppInfoMonitor: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GAppInfoMonitor

-

GAppInfoMonitor — Monitor application information for changes

-
-
-

Functions

-
---- - - - - -
-GAppInfoMonitor * - -g_app_info_monitor_get () -
-
-
-

Signals

-
----- - - - - - -
voidchangedRun First
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GAppInfoMonitor
-
-
-
-

Description

-

GAppInfoMonitor is a very simple object used for monitoring the app -info database for changes (ie: newly installed or removed -applications).

-

Call g_app_info_monitor_get() to get a GAppInfoMonitor and connect -to the "changed" signal.

-

In the usual case, applications should try to make note of the change -(doing things like invalidating caches) but not act on it. In -particular, applications should avoid making calls to GAppInfo APIs -in response to the change signal, deferring these until the time that -the data is actually required. The exception to this case is when -application information is actually being displayed on the screen -(eg: during a search or when the list of all applications is shown). -The reason for this is that changes to the list of installed -applications often come in groups (like during system updates) and -rescanning the list on every change is pointless and expensive.

-
-
-

Functions

-
-

g_app_info_monitor_get ()

-
GAppInfoMonitor *
-g_app_info_monitor_get (void);
-

Gets the GAppInfoMonitor for the current thread-default main -context.

-

The GAppInfoMonitor will emit a "changed" signal in the -thread-default main context whenever the list of installed -applications (as reported by g_app_info_get_all()) may have changed.

-

You must only call g_object_unref() on the return value from under -the same main context as you created it.

-
-

Returns

-

a reference to a GAppInfoMonitor.

-

[transfer full]

-
-

Since: 2.40

-
-
-
-

Types and Values

-
-
-

Signal Details

-
-

The “changed” signal

-
void
-user_function (GAppInfoMonitor *arg0,
-               gpointer         user_data)
-

Signal emitted when the app info database for changes (ie: newly installed -or removed applications).

-
-

Parameters

-
----- - - - - - -

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run First

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GApplication.html b/docs/reference/gio/html/GApplication.html deleted file mode 100644 index fb5de3f59..000000000 --- a/docs/reference/gio/html/GApplication.html +++ /dev/null @@ -1,2616 +0,0 @@ - - - - -GApplication: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GApplication

-

GApplication — Core application class

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -g_application_id_is_valid () -
-GApplication * - -g_application_new () -
const gchar * - -g_application_get_application_id () -
-void - -g_application_set_application_id () -
-guint - -g_application_get_inactivity_timeout () -
-void - -g_application_set_inactivity_timeout () -
-GApplicationFlags - -g_application_get_flags () -
-void - -g_application_set_flags () -
const gchar * - -g_application_get_resource_base_path () -
-void - -g_application_set_resource_base_path () -
-GDBusConnection * - -g_application_get_dbus_connection () -
const gchar * - -g_application_get_dbus_object_path () -
-void - -g_application_set_action_group () -
-gboolean - -g_application_get_is_registered () -
-gboolean - -g_application_get_is_remote () -
-gboolean - -g_application_register () -
-void - -g_application_hold () -
-void - -g_application_release () -
-void - -g_application_quit () -
-void - -g_application_activate () -
-void - -g_application_open () -
-void - -g_application_send_notification () -
-void - -g_application_withdraw_notification () -
-int - -g_application_run () -
-void - -g_application_add_main_option_entries () -
-void - -g_application_add_main_option () -
-void - -g_application_add_option_group () -
-void - -g_application_set_default () -
-GApplication * - -g_application_get_default () -
-void - -g_application_mark_busy () -
-void - -g_application_unmark_busy () -
-gboolean - -g_application_get_is_busy () -
-void - -g_application_bind_busy_property () -
-void - -g_application_unbind_busy_property () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GActionGroup *action-groupWrite
-gchar *application-idRead / Write / Construct
GApplicationFlagsflagsRead / Write
guintinactivity-timeoutRead / Write
gbooleanis-busyRead
gbooleanis-registeredRead
gbooleanis-remoteRead
-gchar *resource-base-pathRead / Write
-
-
-

Signals

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
voidactivateRun Last
gintcommand-lineRun Last
ginthandle-local-optionsRun Last
voidopenRun Last
voidshutdownRun Last
voidstartupRun First
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
 GApplication
structGApplicationClass
enumGApplicationFlags
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GApplication
-
-
-
-

Implemented Interfaces

-

-GApplication implements - GActionGroup and GActionMap.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A GApplication is the foundation of an application. It wraps some -low-level platform-specific services and is intended to act as the -foundation for higher-level application classes such as -GtkApplication or MxApplication. In general, you should not use -this class outside of a higher level framework.

-

GApplication provides convenient life cycle management by maintaining -a "use count" for the primary application instance. The use count can -be changed using g_application_hold() and g_application_release(). If -it drops to zero, the application exits. Higher-level classes such as -GtkApplication employ the use count to ensure that the application -stays alive as long as it has any opened windows.

-

Another feature that GApplication (optionally) provides is process -uniqueness. Applications can make use of this functionality by -providing a unique application ID. If given, only one application -with this ID can be running at a time per session. The session -concept is platform-dependent, but corresponds roughly to a graphical -desktop login. When your application is launched again, its -arguments are passed through platform communication to the already -running program. The already running instance of the program is -called the "primary instance"; for non-unique applications this is -the always the current instance. On Linux, the D-Bus session bus -is used for communication.

-

The use of GApplication differs from some other commonly-used -uniqueness libraries (such as libunique) in important ways. The -application is not expected to manually register itself and check -if it is the primary instance. Instead, the main() function of a -GApplication should do very little more than instantiating the -application instance, possibly connecting signal handlers, then -calling g_application_run(). All checks for uniqueness are done -internally. If the application is the primary instance then the -startup signal is emitted and the mainloop runs. If the application -is not the primary instance then a signal is sent to the primary -instance and g_application_run() promptly returns. See the code -examples below.

-

If used, the expected form of an application identifier is very close -to that of of a -D-Bus bus name. -Examples include: "com.example.MyApp", "org.example.internal-apps.Calculator". -For details on valid application identifiers, see g_application_id_is_valid().

-

On Linux, the application identifier is claimed as a well-known bus name -on the user's session bus. This means that the uniqueness of your -application is scoped to the current session. It also means that your -application may provide additional services (through registration of other -object paths) at that bus name. The registration of these object paths -should be done with the shared GDBus session bus. Note that due to the -internal architecture of GDBus, method calls can be dispatched at any time -(even if a main loop is not running). For this reason, you must ensure that -any object paths that you wish to register are registered before GApplication -attempts to acquire the bus name of your application (which happens in -g_application_register()). Unfortunately, this means that you cannot use -g_application_get_is_remote() to decide if you want to register object paths.

-

GApplication also implements the GActionGroup and GActionMap -interfaces and lets you easily export actions by adding them with -g_action_map_add_action(). When invoking an action by calling -g_action_group_activate_action() on the application, it is always -invoked in the primary instance. The actions are also exported on -the session bus, and GIO provides the GDBusActionGroup wrapper to -conveniently access them remotely. GIO provides a GDBusMenuModel wrapper -for remote access to exported GMenuModels.

-

There is a number of different entry points into a GApplication:

-
    -
  • via 'Activate' (i.e. just starting the application)

  • -
  • via 'Open' (i.e. opening some files)

  • -
  • by handling a command-line

  • -
  • via activating an action

  • -
-

The “startup” signal lets you handle the application -initialization for all of these in a single place.

-

Regardless of which of these entry points is used to start the -application, GApplication passes some "platform data from the -launching instance to the primary instance, in the form of a -GVariant dictionary mapping strings to variants. To use platform -data, override the before_emit - or after_emit - virtual functions -in your GApplication subclass. When dealing with -GApplicationCommandLine objects, the platform data is -directly available via g_application_command_line_get_cwd(), -g_application_command_line_get_environ() and -g_application_command_line_get_platform_data().

-

As the name indicates, the platform data may vary depending on the -operating system, but it always includes the current directory (key -"cwd"), and optionally the environment (ie the set of environment -variables and their values) of the calling process (key "environ"). -The environment is only added to the platform data if the -G_APPLICATION_SEND_ENVIRONMENT flag is set. GApplication subclasses -can add their own platform data by overriding the add_platform_data - -virtual function. For instance, GtkApplication adds startup notification -data in this way.

-

To parse commandline arguments you may handle the -“command-line” signal or override the local_command_line() -vfunc, to parse them in either the primary instance or the local instance, -respectively.

-

For an example of opening files with a GApplication, see -gapplication-example-open.c.

-

For an example of using actions with GApplication, see -gapplication-example-actions.c.

-

For an example of using extra D-Bus hooks with GApplication, see -gapplication-example-dbushooks.c.

-
-
-

Functions

-
-

g_application_id_is_valid ()

-
gboolean
-g_application_id_is_valid (const gchar *application_id);
-

Checks if application_id - is a valid application identifier.

-

A valid ID is required for calls to g_application_new() and -g_application_set_application_id().

-

For convenience, the restrictions on application identifiers are -reproduced here:

-
    -
  • Application identifiers must contain only the ASCII characters -"A-Z[0-9]_-." and must not begin with a digit.

  • -
  • Application identifiers must contain at least one '.' (period) -character (and thus at least three elements).

  • -
  • Application identifiers must not begin or end with a '.' (period) -character.

  • -
  • Application identifiers must not contain consecutive '.' (period) -characters.

  • -
  • Application identifiers must not exceed 255 characters.

  • -
-
-

Parameters

-
----- - - - - - -

application_id

a potential application identifier

 
-
-
-

Returns

-

TRUE if application_id -is valid

-
-
-
-
-

g_application_new ()

-
GApplication *
-g_application_new (const gchar *application_id,
-                   GApplicationFlags flags);
-

Creates a new GApplication instance.

-

If non-NULL, the application id must be valid. See -g_application_id_is_valid().

-

If no application ID is given then some features of GApplication -(most notably application uniqueness) will be disabled.

-
-

Parameters

-
----- - - - - - - - - - - - - -

application_id

the application id.

[nullable]

flags

the application flags

 
-
-
-

Returns

-

a new GApplication instance

-
-
-
-
-

g_application_get_application_id ()

-
const gchar *
-g_application_get_application_id (GApplication *application);
-

Gets the unique identifier for application -.

-
-

Parameters

-
----- - - - - - -

application

a GApplication

 
-
-
-

Returns

-

the identifier for application -, owned by application -

-
-

Since: 2.28

-
-
-
-

g_application_set_application_id ()

-
void
-g_application_set_application_id (GApplication *application,
-                                  const gchar *application_id);
-

Sets the unique identifier for application -.

-

The application id can only be modified if application - has not yet -been registered.

-

If non-NULL, the application id must be valid. See -g_application_id_is_valid().

-
-

Parameters

-
----- - - - - - - - - - - - - -

application

a GApplication

 

application_id

the identifier for application -.

[nullable]
-
-

Since: 2.28

-
-
-
-

g_application_get_inactivity_timeout ()

-
guint
-g_application_get_inactivity_timeout (GApplication *application);
-

Gets the current inactivity timeout for the application.

-

This is the amount of time (in milliseconds) after the last call to -g_application_release() before the application stops running.

-
-

Parameters

-
----- - - - - - -

application

a GApplication

 
-
-
-

Returns

-

the timeout, in milliseconds

-
-

Since: 2.28

-
-
-
-

g_application_set_inactivity_timeout ()

-
void
-g_application_set_inactivity_timeout (GApplication *application,
-                                      guint inactivity_timeout);
-

Sets the current inactivity timeout for the application.

-

This is the amount of time (in milliseconds) after the last call to -g_application_release() before the application stops running.

-

This call has no side effects of its own. The value set here is only -used for next time g_application_release() drops the use count to -zero. Any timeouts currently in progress are not impacted.

-
-

Parameters

-
----- - - - - - - - - - - - - -

application

a GApplication

 

inactivity_timeout

the timeout, in milliseconds

 
-
-

Since: 2.28

-
-
-
-

g_application_get_flags ()

-
GApplicationFlags
-g_application_get_flags (GApplication *application);
-

Gets the flags for application -.

-

See GApplicationFlags.

-
-

Parameters

-
----- - - - - - -

application

a GApplication

 
-
-
-

Returns

-

the flags for application -

-
-

Since: 2.28

-
-
-
-

g_application_set_flags ()

-
void
-g_application_set_flags (GApplication *application,
-                         GApplicationFlags flags);
-

Sets the flags for application -.

-

The flags can only be modified if application - has not yet been -registered.

-

See GApplicationFlags.

-
-

Parameters

-
----- - - - - - - - - - - - - -

application

a GApplication

 

flags

the flags for application -

 
-
-

Since: 2.28

-
-
-
-

g_application_get_resource_base_path ()

-
const gchar *
-g_application_get_resource_base_path (GApplication *application);
-

Gets the resource base path of application -.

-

See g_application_set_resource_base_path() for more information.

-
-

Parameters

-
----- - - - - - -

application

a GApplication

 
-
-
-

Returns

-

the base resource path, if one is set.

-

[nullable]

-
-

Since: 2.42

-
-
-
-

g_application_set_resource_base_path ()

-
void
-g_application_set_resource_base_path (GApplication *application,
-                                      const gchar *resource_path);
-

Sets (or unsets) the base resource path of application -.

-

The path is used to automatically load various application -resources such as menu layouts and action descriptions. -The various types of resources will be found at fixed names relative -to the given base path.

-

By default, the resource base path is determined from the application -ID by prefixing '/' and replacing each '.' with '/'. This is done at -the time that the GApplication object is constructed. Changes to -the application ID after that point will not have an impact on the -resource base path.

-

As an example, if the application has an ID of "org.example.app" then -the default resource base path will be "/org/example/app". If this -is a GtkApplication (and you have not manually changed the path) -then Gtk will then search for the menus of the application at -"/org/example/app/gtk/menus.ui".

-

See GResource for more information about adding resources to your -application.

-

You can disable automatic resource loading functionality by setting -the path to NULL.

-

Changing the resource base path once the application is running is -not recommended. The point at which the resource path is consulted -for forming paths for various purposes is unspecified. When writing -a sub-class of GApplication you should either set the -“resource-base-path” property at construction time, or call -this function during the instance initialization. Alternatively, you -can call this function in the GApplicationClass.startup virtual function, -before chaining up to the parent implementation.

-
-

Parameters

-
----- - - - - - - - - - - - - -

application

a GApplication

 

resource_path

the resource path to use.

[nullable]
-
-

Since: 2.42

-
-
-
-

g_application_get_dbus_connection ()

-
GDBusConnection *
-g_application_get_dbus_connection (GApplication *application);
-

Gets the GDBusConnection being used by the application, or NULL.

-

If GApplication is using its D-Bus backend then this function will -return the GDBusConnection being used for uniqueness and -communication with the desktop environment and other instances of the -application.

-

If GApplication is not using D-Bus then this function will return -NULL. This includes the situation where the D-Bus backend would -normally be in use but we were unable to connect to the bus.

-

This function must not be called before the application has been -registered. See g_application_get_is_registered().

-
-

Parameters

-
----- - - - - - -

application

a GApplication

 
-
-
-

Returns

-

a GDBusConnection, or NULL.

-

[transfer none]

-
-

Since: 2.34

-
-
-
-

g_application_get_dbus_object_path ()

-
const gchar *
-g_application_get_dbus_object_path (GApplication *application);
-

Gets the D-Bus object path being used by the application, or NULL.

-

If GApplication is using its D-Bus backend then this function will -return the D-Bus object path that GApplication is using. If the -application is the primary instance then there is an object published -at this path. If the application is not the primary instance then -the result of this function is undefined.

-

If GApplication is not using D-Bus then this function will return -NULL. This includes the situation where the D-Bus backend would -normally be in use but we were unable to connect to the bus.

-

This function must not be called before the application has been -registered. See g_application_get_is_registered().

-
-

Parameters

-
----- - - - - - -

application

a GApplication

 
-
-
-

Returns

-

the object path, or NULL

-
-

Since: 2.34

-
-
-
-

g_application_set_action_group ()

-
void
-g_application_set_action_group (GApplication *application,
-                                GActionGroup *action_group);
-
-

g_application_set_action_group has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use the GActionMap interface instead. Never ever -mix use of this API with use of GActionMap on the same application - -or things will go very badly wrong. This function is known to -introduce buggy behaviour (ie: signals not emitted on changes to the -action group), so you should really use GActionMap instead.

-
-

This used to be how actions were associated with a GApplication. -Now there is GActionMap for that.

-
-

Parameters

-
----- - - - - - - - - - - - - -

application

a GApplication

 

action_group

a GActionGroup, or NULL.

[nullable]
-
-

Since: 2.28

-
-
-
-

g_application_get_is_registered ()

-
gboolean
-g_application_get_is_registered (GApplication *application);
-

Checks if application - is registered.

-

An application is registered if g_application_register() has been -successfully called.

-
-

Parameters

-
----- - - - - - -

application

a GApplication

 
-
-
-

Returns

-

TRUE if application -is registered

-
-

Since: 2.28

-
-
-
-

g_application_get_is_remote ()

-
gboolean
-g_application_get_is_remote (GApplication *application);
-

Checks if application - is remote.

-

If application - is remote then it means that another instance of -application already exists (the 'primary' instance). Calls to -perform actions on application - will result in the actions being -performed by the primary instance.

-

The value of this property cannot be accessed before -g_application_register() has been called. See -g_application_get_is_registered().

-
-

Parameters

-
----- - - - - - -

application

a GApplication

 
-
-
-

Returns

-

TRUE if application -is remote

-
-

Since: 2.28

-
-
-
-

g_application_register ()

-
gboolean
-g_application_register (GApplication *application,
-                        GCancellable *cancellable,
-                        GError **error);
-

Attempts registration of the application.

-

This is the point at which the application discovers if it is the -primary instance or merely acting as a remote for an already-existing -primary instance. This is implemented by attempting to acquire the -application identifier as a unique bus name on the session bus using -GDBus.

-

If there is no application ID or if G_APPLICATION_NON_UNIQUE was -given, then this process will always become the primary instance.

-

Due to the internal architecture of GDBus, method calls can be -dispatched at any time (even if a main loop is not running). For -this reason, you must ensure that any object paths that you wish to -register are registered before calling this function.

-

If the application has already been registered then TRUE is -returned with no work performed.

-

The “startup” signal is emitted if registration succeeds -and application - is the primary instance (including the non-unique -case).

-

In the event of an error (such as cancellable - being cancelled, or a -failure to connect to the session bus), FALSE is returned and error - -is set appropriately.

-

Note: the return value of this function is not an indicator that this -instance is or is not the primary instance of the application. See -g_application_get_is_remote() for that.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

application

a GApplication

 

cancellable

a GCancellable, or NULL.

[nullable]

error

a pointer to a NULL GError, or NULL

 
-
-
-

Returns

-

TRUE if registration succeeded

-
-

Since: 2.28

-
-
-
-

g_application_hold ()

-
void
-g_application_hold (GApplication *application);
-

Increases the use count of application -.

-

Use this function to indicate that the application has a reason to -continue to run. For example, g_application_hold() is called by GTK+ -when a toplevel window is on the screen.

-

To cancel the hold, call g_application_release().

-
-

Parameters

-
----- - - - - - -

application

a GApplication

 
-
-
-
-
-

g_application_release ()

-
void
-g_application_release (GApplication *application);
-

Decrease the use count of application -.

-

When the use count reaches zero, the application will stop running.

-

Never call this function except to cancel the effect of a previous -call to g_application_hold().

-
-

Parameters

-
----- - - - - - -

application

a GApplication

 
-
-
-
-
-

g_application_quit ()

-
void
-g_application_quit (GApplication *application);
-

Immediately quits the application.

-

Upon return to the mainloop, g_application_run() will return, -calling only the 'shutdown' function before doing so.

-

The hold count is ignored.

-

The result of calling g_application_run() again after it returns is -unspecified.

-
-

Parameters

-
----- - - - - - -

application

a GApplication

 
-
-

Since: 2.32

-
-
-
-

g_application_activate ()

-
void
-g_application_activate (GApplication *application);
-

Activates the application.

-

In essence, this results in the “activate” signal being -emitted in the primary instance.

-

The application must be registered before calling this function.

-
-

Parameters

-
----- - - - - - -

application

a GApplication

 
-
-

Since: 2.28

-
-
-
-

g_application_open ()

-
void
-g_application_open (GApplication *application,
-                    GFile **files,
-                    gint n_files,
-                    const gchar *hint);
-

Opens the given files.

-

In essence, this results in the “open” signal being emitted -in the primary instance.

-

n_files - must be greater than zero.

-

hint - is simply passed through to the ::open signal. It is -intended to be used by applications that have multiple modes for -opening files (eg: "view" vs "edit", etc). Unless you have a need -for this functionality, you should use "".

-

The application must be registered before calling this function -and it must have the G_APPLICATION_HANDLES_OPEN flag set.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

application

a GApplication

 

files

an array of GFiles to open.

[array length=n_files]

n_files

the length of the files -array

 

hint

a hint (or ""), but never NULL

 
-
-

Since: 2.28

-
-
-
-

g_application_send_notification ()

-
void
-g_application_send_notification (GApplication *application,
-                                 const gchar *id,
-                                 GNotification *notification);
-

Sends a notification on behalf of application - to the desktop shell. -There is no guarantee that the notification is displayed immediately, -or even at all.

-

Notifications may persist after the application exits. It will be -D-Bus-activated when the notification or one of its actions is -activated.

-

Modifying notification - after this call has no effect. However, the -object can be reused for a later call to this function.

-

id - may be any string that uniquely identifies the event for the -application. It does not need to be in any special format. For -example, "new-message" might be appropriate for a notification about -new messages.

-

If a previous notification was sent with the same id -, it will be -replaced with notification - and shown again as if it was a new -notification. This works even for notifications sent from a previous -execution of the application, as long as id - is the same string.

-

id - may be NULL, but it is impossible to replace or withdraw -notifications without an id.

-

If notification - is no longer relevant, it can be withdrawn with -g_application_withdraw_notification().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

application

a GApplication

 

id

id of the notification, or NULL.

[nullable]

notification

the GNotification to send

 
-
-

Since: 2.40

-
-
-
-

g_application_withdraw_notification ()

-
void
-g_application_withdraw_notification (GApplication *application,
-                                     const gchar *id);
-

Withdraws a notification that was sent with -g_application_send_notification().

-

This call does nothing if a notification with id - doesn't exist or -the notification was never sent.

-

This function works even for notifications sent in previous -executions of this application, as long id - is the same as it was for -the sent notification.

-

Note that notifications are dismissed when the user clicks on one -of the buttons in a notification or triggers its default action, so -there is no need to explicitly withdraw the notification in that case.

-
-

Parameters

-
----- - - - - - - - - - - - - -

application

a GApplication

 

id

id of a previously sent notification

 
-
-

Since: 2.40

-
-
-
-

g_application_run ()

-
int
-g_application_run (GApplication *application,
-                   int argc,
-                   char **argv);
-

Runs the application.

-

This function is intended to be run from main() and its return value -is intended to be returned by main(). Although you are expected to pass -the argc -, argv - parameters from main() to this function, it is possible -to pass NULL if argv - is not available or commandline handling is not -required. Note that on Windows, argc - and argv - are ignored, and -g_win32_get_command_line() is called internally (for proper support -of Unicode commandline arguments).

-

GApplication will attempt to parse the commandline arguments. You -can add commandline flags to the list of recognised options by way of -g_application_add_main_option_entries(). After this, the -“handle-local-options” signal is emitted, from which the -application can inspect the values of its GOptionEntrys.

-

“handle-local-options” is a good place to handle options -such as --version, where an immediate reply from the local process is -desired (instead of communicating with an already-running instance). -A “handle-local-options” handler can stop further processing -by returning a non-negative value, which then becomes the exit status of -the process.

-

What happens next depends on the flags: if -G_APPLICATION_HANDLES_COMMAND_LINE was specified then the remaining -commandline arguments are sent to the primary instance, where a -“command-line” signal is emitted. Otherwise, the -remaining commandline arguments are assumed to be a list of files. -If there are no files listed, the application is activated via the -“activate” signal. If there are one or more files, and -G_APPLICATION_HANDLES_OPEN was specified then the files are opened -via the “open” signal.

-

If you are interested in doing more complicated local handling of the -commandline then you should implement your own GApplication subclass -and override local_command_line(). In this case, you most likely want -to return TRUE from your local_command_line() implementation to -suppress the default handling. See -gapplication-example-cmdline2.c -for an example.

-

If, after the above is done, the use count of the application is zero -then the exit status is returned immediately. If the use count is -non-zero then the default main context is iterated until the use count -falls to zero, at which point 0 is returned.

-

If the G_APPLICATION_IS_SERVICE flag is set, then the service will -run for as much as 10 seconds with a use count of zero while waiting -for the message that caused the activation to arrive. After that, -if the use count falls to zero the application will exit immediately, -except in the case that g_application_set_inactivity_timeout() is in -use.

-

This function sets the prgname (g_set_prgname()), if not already set, -to the basename of argv[0].

-

Much like g_main_loop_run(), this function will acquire the main context -for the duration that the application is running.

-

Since 2.40, applications that are not explicitly flagged as services -or launchers (ie: neither G_APPLICATION_IS_SERVICE or -G_APPLICATION_IS_LAUNCHER are given as flags) will check (from the -default handler for local_command_line) if "--gapplication-service" -was given in the command line. If this flag is present then normal -commandline processing is interrupted and the -G_APPLICATION_IS_SERVICE flag is set. This provides a "compromise" -solution whereby running an application directly from the commandline -will invoke it in the normal way (which can be useful for debugging) -while still allowing applications to be D-Bus activated in service -mode. The D-Bus service file should invoke the executable with -"--gapplication-service" as the sole commandline argument. This -approach is suitable for use by most graphical applications but -should not be used from applications like editors that need precise -control over when processes invoked via the commandline will exit and -what their exit status will be.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

application

a GApplication

 

argc

the argc from main() (or 0 if argv -is NULL)

 

argv

the argv from main(), or NULL.

[array length=argc][nullable]
-
-
-

Returns

-

the exit status

-
-

Since: 2.28

-
-
-
-

g_application_add_main_option_entries ()

-
void
-g_application_add_main_option_entries (GApplication *application,
-                                       const GOptionEntry *entries);
-

Adds main option entries to be handled by application -.

-

This function is comparable to g_option_context_add_main_entries().

-

After the commandline arguments are parsed, the -“handle-local-options” signal will be emitted. At this -point, the application can inspect the values pointed to by arg_data - -in the given GOptionEntrys.

-

Unlike GOptionContext, GApplication supports giving a NULL -arg_data - for a non-callback GOptionEntry. This results in the -argument in question being packed into a GVariantDict which is also -passed to “handle-local-options”, where it can be -inspected and modified. If G_APPLICATION_HANDLES_COMMAND_LINE is -set, then the resulting dictionary is sent to the primary instance, -where g_application_command_line_get_options_dict() will return it. -This "packing" is done according to the type of the argument -- -booleans for normal flags, strings for strings, bytestrings for -filenames, etc. The packing only occurs if the flag is given (ie: we -do not pack a "false" GVariant in the case that a flag is missing).

-

In general, it is recommended that all commandline arguments are -parsed locally. The options dictionary should then be used to -transmit the result of the parsing to the primary instance, where -g_variant_dict_lookup() can be used. For local options, it is -possible to either use arg_data - in the usual way, or to consult (and -potentially remove) the option from the options dictionary.

-

This function is new in GLib 2.40. Before then, the only real choice -was to send all of the commandline arguments (options and all) to the -primary instance for handling. GApplication ignored them completely -on the local side. Calling this function "opts in" to the new -behaviour, and in particular, means that unrecognised options will be -treated as errors. Unrecognised options have never been ignored when -G_APPLICATION_HANDLES_COMMAND_LINE is unset.

-

If “handle-local-options” needs to see the list of -filenames, then the use of G_OPTION_REMAINING is recommended. If -arg_data - is NULL then G_OPTION_REMAINING can be used as a key into -the options dictionary. If you do use G_OPTION_REMAINING then you -need to handle these arguments for yourself because once they are -consumed, they will no longer be visible to the default handling -(which treats them as filenames to be opened).

-

It is important to use the proper GVariant format when retrieving -the options with g_variant_dict_lookup():

-
-
-

Parameters

-
----- - - - - - - - - - - - - -

application

a GApplication

 

entries

(array zero-terminated=1) (element-type GOptionEntry) a -NULL-terminated list of GOptionEntrys

 
-
-

Since: 2.40

-
-
-
-

g_application_add_main_option ()

-
void
-g_application_add_main_option (GApplication *application,
-                               const char *long_name,
-                               char short_name,
-                               GOptionFlags flags,
-                               GOptionArg arg,
-                               const char *description,
-                               const char *arg_description);
-

Add an option to be handled by application -.

-

Calling this function is the equivalent of calling -g_application_add_main_option_entries() with a single GOptionEntry -that has its arg_data member set to NULL.

-

The parsed arguments will be packed into a GVariantDict which -is passed to “handle-local-options”. If -G_APPLICATION_HANDLES_COMMAND_LINE is set, then it will also -be sent to the primary instance. See -g_application_add_main_option_entries() for more details.

-

See GOptionEntry for more documentation of the arguments.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

application

the GApplication

 

long_name

the long name of an option used to specify it in a commandline

 

short_name

the short name of an option

 

flags

flags from GOptionFlags

 

arg

the type of the option, as a GOptionArg

 

description

the description for the option in --help output

 

arg_description

the placeholder to use for the extra argument -parsed by the option in --help output.

[nullable]
-
-

Since: 2.42

-
-
-
-

g_application_add_option_group ()

-
void
-g_application_add_option_group (GApplication *application,
-                                GOptionGroup *group);
-

Adds a GOptionGroup to the commandline handling of application -.

-

This function is comparable to g_option_context_add_group().

-

Unlike g_application_add_main_option_entries(), this function does -not deal with NULL arg_data - and never transmits options to the -primary instance.

-

The reason for that is because, by the time the options arrive at the -primary instance, it is typically too late to do anything with them. -Taking the GTK option group as an example: GTK will already have been -initialised by the time the “command-line” handler runs. -In the case that this is not the first-running instance of the -application, the existing instance may already have been running for -a very long time.

-

This means that the options from GOptionGroup are only really usable -in the case that the instance of the application being run is the -first instance. Passing options like --display= or --gdk-debug= -on future runs will have no effect on the existing primary instance.

-

Calling this function will cause the options in the supplied option -group to be parsed, but it does not cause you to be "opted in" to the -new functionality whereby unrecognised options are rejected even if -G_APPLICATION_HANDLES_COMMAND_LINE was given.

-
-

Parameters

-
----- - - - - - - - - - - - - -

application

the GApplication

 

group

a GOptionGroup.

[transfer full]
-
-

Since: 2.40

-
-
-
-

g_application_set_default ()

-
void
-g_application_set_default (GApplication *application);
-

Sets or unsets the default application for the process, as returned -by g_application_get_default().

-

This function does not take its own reference on application -. If -application - is destroyed then the default application will revert -back to NULL.

-
-

Parameters

-
----- - - - - - -

application

the application to set as default, or NULL.

[nullable]
-
-

Since: 2.32

-
-
-
-

g_application_get_default ()

-
GApplication *
-g_application_get_default (void);
-

Returns the default GApplication instance for this process.

-

Normally there is only one GApplication per process and it becomes -the default when it is created. You can exercise more control over -this by using g_application_set_default().

-

If there is no default application then NULL is returned.

-
-

Returns

-

the default application for this process, or NULL.

-

[transfer none]

-
-

Since: 2.32

-
-
-
-

g_application_mark_busy ()

-
void
-g_application_mark_busy (GApplication *application);
-

Increases the busy count of application -.

-

Use this function to indicate that the application is busy, for instance -while a long running operation is pending.

-

The busy state will be exposed to other processes, so a session shell will -use that information to indicate the state to the user (e.g. with a -spinner).

-

To cancel the busy indication, use g_application_unmark_busy().

-
-

Parameters

-
----- - - - - - -

application

a GApplication

 
-
-

Since: 2.38

-
-
-
-

g_application_unmark_busy ()

-
void
-g_application_unmark_busy (GApplication *application);
-

Decreases the busy count of application -.

-

When the busy count reaches zero, the new state will be propagated -to other processes.

-

This function must only be called to cancel the effect of a previous -call to g_application_mark_busy().

-
-

Parameters

-
----- - - - - - -

application

a GApplication

 
-
-

Since: 2.38

-
-
-
-

g_application_get_is_busy ()

-
gboolean
-g_application_get_is_busy (GApplication *application);
-

Gets the application's current busy state, as set through -g_application_mark_busy() or g_application_bind_busy_property().

-
-

Parameters

-
----- - - - - - -

application

a GApplication

 
-
-
-

Returns

-

TRUE if application -is currenty marked as busy

-
-

Since: 2.44

-
-
-
-

g_application_bind_busy_property ()

-
void
-g_application_bind_busy_property (GApplication *application,
-                                  gpointer object,
-                                  const gchar *property);
-

Marks application - as busy (see g_application_mark_busy()) while -property - on object - is TRUE.

-

The binding holds a reference to application - while it is active, but -not to object -. Instead, the binding is destroyed when object - is -finalized.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

application

a GApplication

 

object

a GObject.

[type GObject.Object]

property

the name of a boolean property of object -

 
-
-

Since: 2.44

-
-
-
-

g_application_unbind_busy_property ()

-
void
-g_application_unbind_busy_property (GApplication *application,
-                                    gpointer object,
-                                    const gchar *property);
-

Destroys a binding between property - and the busy state of -application - that was previously created with -g_application_bind_busy_property().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

application

a GApplication

 

object

a GObject.

[type GObject.Object]

property

the name of a boolean property of object -

 
-
-

Since: 2.44

-
-
-
-

Types and Values

-
-

GApplication

-
typedef struct _GApplication GApplication;
-

GApplication is an opaque data structure and can only be accessed -using the following functions.

-

Since: 2.28

-
-
-
-

struct GApplicationClass

-
struct GApplicationClass {
-  /* signals */
-  void                      (* startup)             (GApplication              *application);
-
-  void                      (* activate)            (GApplication              *application);
-
-  void                      (* open)                (GApplication              *application,
-                                                     GFile                    **files,
-                                                     gint                       n_files,
-                                                     const gchar               *hint);
-
-  int                       (* command_line)        (GApplication              *application,
-                                                     GApplicationCommandLine   *command_line);
-
-  /* vfuncs */
-
-  /**
-   * GApplicationClass::local_command_line:
-   * @application: a #GApplication
-   * @arguments: (inout) (array zero-terminated=1): array of command line arguments
-   * @exit_status: (out): exit status to fill after processing the command line.
-   *
-   * This virtual function is always invoked in the local instance. It
-   * gets passed a pointer to a %NULL-terminated copy of @argv and is
-   * expected to remove arguments that it handled (shifting up remaining
-   * arguments).
-   *
-   * The last argument to local_command_line() is a pointer to the @status
-   * variable which can used to set the exit status that is returned from
-   * g_application_run().
-   *
-   * See g_application_run() for more details on #GApplication startup.
-   *
-   * Returns: %TRUE if the commandline has been completely handled
-   */
-  gboolean                  (* local_command_line)  (GApplication              *application,
-                                                     gchar                   ***arguments,
-                                                     int                       *exit_status);
-
-  void                      (* before_emit)         (GApplication              *application,
-                                                     GVariant                  *platform_data);
-  void                      (* after_emit)          (GApplication              *application,
-                                                     GVariant                  *platform_data);
-  void                      (* add_platform_data)   (GApplication              *application,
-                                                     GVariantBuilder           *builder);
-  void                      (* quit_mainloop)       (GApplication              *application);
-  void                      (* run_mainloop)        (GApplication              *application);
-  void                      (* shutdown)            (GApplication              *application);
-
-  gboolean                  (* dbus_register)       (GApplication              *application,
-                                                     GDBusConnection           *connection,
-                                                     const gchar               *object_path,
-                                                     GError                   **error);
-  void                      (* dbus_unregister)     (GApplication              *application,
-                                                     GDBusConnection           *connection,
-                                                     const gchar               *object_path);
-  gint                      (* handle_local_options)(GApplication              *application,
-                                                     GVariantDict              *options);
-};
-
-

Virtual function table for GApplication.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

startup ()

invoked on the primary instance immediately after registration

 

activate ()

invoked on the primary instance when an activation occurs

 

open ()

invoked on the primary instance when there are files to open

 

command_line ()

invoked on the primary instance when a command-line is -not handled locally

 

local_command_line ()

invoked (locally). The virtual function has the chance -to inspect (and possibly replace) command line arguments. See -g_application_run() for more information. Also see the -“handle-local-options” signal, which is a simpler -alternative to handling some commandline options locally

 

before_emit ()

invoked on the primary instance before 'activate', 'open', -'command-line' or any action invocation, gets the 'platform data' from -the calling instance

 

after_emit ()

invoked on the primary instance after 'activate', 'open', -'command-line' or any action invocation, gets the 'platform data' from -the calling instance

 

add_platform_data ()

invoked (locally) to add 'platform data' to be sent to -the primary instance when activating, opening or invoking actions

 

quit_mainloop ()

Used to be invoked on the primary instance when the use -count of the application drops to zero (and after any inactivity -timeout, if requested). Not used anymore since 2.32

 

run_mainloop ()

Used to be invoked on the primary instance from -g_application_run() if the use-count is non-zero. Since 2.32, -GApplication is iterating the main context directly and is not -using run_mainloop -anymore

 

shutdown ()

invoked only on the registered primary instance immediately -after the main loop terminates

 

dbus_register ()

invoked locally during registration, if the application is -using its D-Bus backend. You can use this to export extra objects on the -bus, that need to exist before the application tries to own the bus name. -The function is passed the GDBusConnection to to session bus, and the -object path that GApplication will use to export is D-Bus API. -If this function returns TRUE, registration will proceed; otherwise -registration will abort. Since: 2.34

 

dbus_unregister ()

invoked locally during unregistration, if the application -is using its D-Bus backend. Use this to undo anything done by the

 

handle_local_options ()

invoked locally after the parsing of the commandline -options has occurred. Since: 2.40

 
-
-

Since: 2.28

-
-
-
-

enum GApplicationFlags

-

Flags used to define the behaviour of a GApplication.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_APPLICATION_FLAGS_NONE

-

Default

-
 

G_APPLICATION_IS_SERVICE

-

Run as a service. In this mode, registration - fails if the service is already running, and the application - will initially wait up to 10 seconds for an initial activation - message to arrive.

-
 

G_APPLICATION_IS_LAUNCHER

-

Don't try to become the primary instance.

-
 

G_APPLICATION_HANDLES_OPEN

-

This application handles opening files (in - the primary instance). Note that this flag only affects the default - implementation of local_command_line(), and has no effect if - G_APPLICATION_HANDLES_COMMAND_LINE is given. - See g_application_run() for details.

-
 

G_APPLICATION_HANDLES_COMMAND_LINE

-

This application handles command line - arguments (in the primary instance). Note that this flag only affect - the default implementation of local_command_line(). - See g_application_run() for details.

-
 

G_APPLICATION_SEND_ENVIRONMENT

-

Send the environment of the - launching process to the primary instance. Set this flag if your - application is expected to behave differently depending on certain - environment variables. For instance, an editor might be expected - to use the GIT_COMMITTER_NAME environment variable - when editing a git commit message. The environment is available - to the “command-line” signal handler, via - g_application_command_line_getenv().

-
 

G_APPLICATION_NON_UNIQUE

-

Make no attempts to do any of the typical - single-instance application negotiation, even if the application - ID is given. The application neither attempts to become the - owner of the application ID nor does it check if an existing - owner already exists. Everything occurs in the local process. - Since: 2.30.

-
 

G_APPLICATION_CAN_OVERRIDE_APP_ID

-

Allow users to override the - application ID from the command line with --gapplication-app-id. - Since: 2.48

-
 
-
-

Since: 2.28

-
-
-
-

Property Details

-
-

The “action-group” property

-
  “action-group”             GActionGroup *
-

The group of actions that the application exports.

-

Flags: Write

-
-
-
-

The “application-id” property

-
  “application-id”           gchar *
-

The unique identifier for the application.

-

Flags: Read / Write / Construct

-

Default value: NULL

-
-
-
-

The “flags” property

-
  “flags”                    GApplicationFlags
-

Flags specifying the behaviour of the application.

-

Flags: Read / Write

-
-
-
-

The “inactivity-timeout” property

-
  “inactivity-timeout”       guint
-

Time (ms) to stay alive after becoming idle.

-

Flags: Read / Write

-

Default value: 0

-
-
-
-

The “is-busy” property

-
  “is-busy”                  gboolean
-

Whether the application is currently marked as busy through -g_application_mark_busy() or g_application_bind_busy_property().

-

Flags: Read

-

Default value: FALSE

-

Since: 2.44

-
-
-
-

The “is-registered” property

-
  “is-registered”            gboolean
-

If g_application_register() has been called.

-

Flags: Read

-

Default value: FALSE

-
-
-
-

The “is-remote” property

-
  “is-remote”                gboolean
-

If this application instance is remote.

-

Flags: Read

-

Default value: FALSE

-
-
-
-

The “resource-base-path” property

-
  “resource-base-path”       gchar *
-

The base resource path for the application.

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

Signal Details

-
-

The “activate” signal

-
void
-user_function (GApplication *application,
-               gpointer      user_data)
-

The ::activate signal is emitted on the primary instance when an -activation occurs. See g_application_activate().

-
-

Parameters

-
----- - - - - - - - - - - - - -

application

the application

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “command-line” signal

-
gint
-user_function (GApplication            *application,
-               GApplicationCommandLine *command_line,
-               gpointer                 user_data)
-

The ::command-line signal is emitted on the primary instance when -a commandline is not handled locally. See g_application_run() and -the GApplicationCommandLine documentation for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

application

the application

 

command_line

a GApplicationCommandLine representing the -passed commandline

 

user_data

user data set when the signal handler was connected.

 
-
-
-

Returns

-

An integer that is set as the exit status for the calling -process. See g_application_command_line_set_exit_status().

-
-

Flags: Run Last

-
-
-
-

The “handle-local-options” signal

-
gint
-user_function (GApplication *application,
-               GVariantDict *options,
-               gpointer      user_data)
-

The ::handle-local-options signal is emitted on the local instance -after the parsing of the commandline options has occurred.

-

You can add options to be recognised during commandline option -parsing using g_application_add_main_option_entries() and -g_application_add_option_group().

-

Signal handlers can inspect options - (along with values pointed to -from the arg_data - of an installed GOptionEntrys) in order to -decide to perform certain actions, including direct local handling -(which may be useful for options like --version).

-

In the event that the application is marked -G_APPLICATION_HANDLES_COMMAND_LINE the "normal processing" will -send the options - dictionary to the primary instance where it can be -read with g_application_command_line_get_options_dict(). The signal -handler can modify the dictionary before returning, and the -modified dictionary will be sent.

-

In the event that G_APPLICATION_HANDLES_COMMAND_LINE is not set, -"normal processing" will treat the remaining uncollected command -line arguments as filenames or URIs. If there are no arguments, -the application is activated by g_application_activate(). One or -more arguments results in a call to g_application_open().

-

If you want to handle the local commandline arguments for yourself -by converting them to calls to g_application_open() or -g_action_group_activate_action() then you must be sure to register -the application first. You should probably not call -g_application_activate() for yourself, however: just return -1 and -allow the default handler to do it for you. This will ensure that -the --gapplication-service switch works properly (i.e. no activation -in that case).

-

Note that this signal is emitted from the default implementation of -local_command_line(). If you override that function and don't -chain up then this signal will never be emitted.

-

You can override local_command_line() if you need more powerful -capabilities than what is provided here, but this should not -normally be required.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

application

the application

 

options

the options dictionary

 

user_data

user data set when the signal handler was connected.

 
-
-
-

Returns

-

an exit code. If you have handled your options and want -to exit the process, return a non-negative option, 0 for success, -and a positive value for failure. To continue, return -1 to let -the default option processing continue.

-
-

Flags: Run Last

-

Since: 2.40

-
-
-
-

The “open” signal

-
void
-user_function (GApplication *application,
-               gpointer      files,
-               gint          n_files,
-               gchar        *hint,
-               gpointer      user_data)
-

The ::open signal is emitted on the primary instance when there are -files to open. See g_application_open() for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

application

the application

 

files

an array of GFiles.

[array length=n_files][element-type GFile]

n_files

the length of files -

 

hint

a hint provided by the calling instance

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “shutdown” signal

-
void
-user_function (GApplication *application,
-               gpointer      user_data)
-

The ::shutdown signal is emitted only on the registered primary instance -immediately after the main loop terminates.

-
-

Parameters

-
----- - - - - - - - - - - - - -

application

the application

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “startup” signal

-
void
-user_function (GApplication *application,
-               gpointer      user_data)
-

The ::startup signal is emitted on the primary instance immediately -after registration. See g_application_register().

-
-

Parameters

-
----- - - - - - - - - - - - - -

application

the application

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run First

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GApplicationCommandLine.html b/docs/reference/gio/html/GApplicationCommandLine.html deleted file mode 100644 index 537319c19..000000000 --- a/docs/reference/gio/html/GApplicationCommandLine.html +++ /dev/null @@ -1,1052 +0,0 @@ - - - - -GApplicationCommandLine: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GApplicationCommandLine

-

GApplicationCommandLine — A command-line invocation of an application

-
- -
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - -
-GVariant *argumentsWrite / Construct Only
gbooleanis-remoteRead
-GVariant *optionsWrite / Construct Only
-GVariant *platform-dataWrite / Construct Only
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GApplicationCommandLine
structGApplicationCommandLineClass
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GApplicationCommandLine
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GApplicationCommandLine represents a command-line invocation of -an application. It is created by GApplication and emitted -in the “command-line” signal and virtual function.

-

The class contains the list of arguments that the program was invoked -with. It is also possible to query if the commandline invocation was -local (ie: the current process is running in direct response to the -invocation) or remote (ie: some other process forwarded the -commandline to this process).

-

The GApplicationCommandLine object can provide the argc - and argv - -parameters for use with the GOptionContext command-line parsing API, -with the g_application_command_line_get_arguments() function. See -gapplication-example-cmdline3.c -for an example.

-

The exit status of the originally-invoked process may be set and -messages can be printed to stdout or stderr of that process. The -lifecycle of the originally-invoked process is tied to the lifecycle -of this object (ie: the process exits when the last reference is -dropped).

-

The main use for GApplicationCommandLine (and the -“command-line” signal) is 'Emacs server' like use cases: -You can set the EDITOR environment variable to have e.g. git use -your favourite editor to edit commit messages, and if you already -have an instance of the editor running, the editing will happen -in the running instance, instead of opening a new one. An important -aspect of this use case is that the process that gets started by git -does not return until the editing is done.

-

Normally, the commandline is completely handled in the -“command-line” handler. The launching instance exits -once the signal handler in the primary instance has returned, and -the return value of the signal handler becomes the exit status -of the launching instance.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
static int
-command_line (GApplication            *application,
-              GApplicationCommandLine *cmdline)
-{
-  gchar **argv;
-  gint argc;
-  gint i;
-
-  argv = g_application_command_line_get_arguments (cmdline, &argc);
-
-  g_application_command_line_print (cmdline,
-                                    "This text is written back\n"
-                                    "to stdout of the caller\n");
-
-  for (i = 0; i < argc; i++)
-    g_print ("argument %d: %s\n", i, argv[i]);
-
-  g_strfreev (argv);
-
-  return 0;
-}
-
- -

-The complete example can be found here: -gapplication-example-cmdline.c

-

In more complicated cases, the handling of the comandline can be -split between the launcher and the primary instance.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
static gboolean
- test_local_cmdline (GApplication   *application,
-                     gchar        ***arguments,
-                     gint           *exit_status)
-{
-  gint i, j;
-  gchar **argv;
-
-  argv = *arguments;
-
-  i = 1;
-  while (argv[i])
-    {
-      if (g_str_has_prefix (argv[i], "--local-"))
-        {
-          g_print ("handling argument %s locally\n", argv[i]);
-          g_free (argv[i]);
-          for (j = i; argv[j]; j++)
-            argv[j] = argv[j + 1];
-        }
-      else
-        {
-          g_print ("not handling argument %s locally\n", argv[i]);
-          i++;
-        }
-    }
-
-  *exit_status = 0;
-
-  return FALSE;
-}
-
-static void
-test_application_class_init (TestApplicationClass *class)
-{
-  G_APPLICATION_CLASS (class)->local_command_line = test_local_cmdline;
-
-  ...
-}
-
- -

-In this example of split commandline handling, options that start -with --local- are handled locally, all other options are passed -to the “command-line” handler which runs in the primary -instance.

-

The complete example can be found here: -gapplication-example-cmdline2.c

-

If handling the commandline requires a lot of work, it may -be better to defer it.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
static gboolean
-my_cmdline_handler (gpointer data)
-{
-  GApplicationCommandLine *cmdline = data;
-
-  // do the heavy lifting in an idle
-
-  g_application_command_line_set_exit_status (cmdline, 0);
-  g_object_unref (cmdline); // this releases the application
-
-  return G_SOURCE_REMOVE;
-}
-
-static int
-command_line (GApplication            *application,
-              GApplicationCommandLine *cmdline)
-{
-  // keep the application running until we are done with this commandline
-  g_application_hold (application);
-
-  g_object_set_data_full (G_OBJECT (cmdline),
-                          "application", application,
-                          (GDestroyNotify)g_application_release);
-
-  g_object_ref (cmdline);
-  g_idle_add (my_cmdline_handler, cmdline);
-
-  return 0;
-}
-
- -

-In this example the commandline is not completely handled before -the “command-line” handler returns. Instead, we keep -a reference to the GApplicationCommandLine object and handle it -later (in this example, in an idle). Note that it is necessary to -hold the application until you are done with the commandline.

-

The complete example can be found here: -gapplication-example-cmdline3.c

-
-
-

Functions

-
-

g_application_command_line_get_arguments ()

-
gchar **
-g_application_command_line_get_arguments
-                               (GApplicationCommandLine *cmdline,
-                                int *argc);
-

Gets the list of arguments that was passed on the command line.

-

The strings in the array may contain non-UTF-8 data on UNIX (such as -filenames or arguments given in the system locale) but are always in -UTF-8 on Windows.

-

If you wish to use the return value with GOptionContext, you must -use g_option_context_parse_strv().

-

The return value is NULL-terminated and should be freed using -g_strfreev().

-
-

Parameters

-
----- - - - - - - - - - - - - -

cmdline

a GApplicationCommandLine

 

argc

the length of the arguments array, or NULL.

[out][optional]
-
-
-

Returns

-

the string array -containing the arguments (the argv).

-

[array length=argc][transfer full]

-
-

Since: 2.28

-
-
-
-

g_application_command_line_get_cwd ()

-
const gchar *
-g_application_command_line_get_cwd (GApplicationCommandLine *cmdline);
-

Gets the working directory of the command line invocation. -The string may contain non-utf8 data.

-

It is possible that the remote application did not send a working -directory, so this may be NULL.

-

The return value should not be modified or freed and is valid for as -long as cmdline - exists.

-
-

Parameters

-
----- - - - - - -

cmdline

a GApplicationCommandLine

 
-
-
-

Returns

-

the current directory, or NULL.

-

[nullable][type filename]

-
-

Since: 2.28

-
-
-
-

g_application_command_line_get_environ ()

-
const gchar * const *
-g_application_command_line_get_environ
-                               (GApplicationCommandLine *cmdline);
-

Gets the contents of the 'environ' variable of the command line -invocation, as would be returned by g_get_environ(), ie as a -NULL-terminated list of strings in the form 'NAME=VALUE'. -The strings may contain non-utf8 data.

-

The remote application usually does not send an environment. Use -G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag -set it is possible that the environment is still not available (due -to invocation messages from other applications).

-

The return value should not be modified or freed and is valid for as -long as cmdline - exists.

-

See g_application_command_line_getenv() if you are only interested -in the value of a single environment variable.

-
-

Parameters

-
----- - - - - - -

cmdline

a GApplicationCommandLine

 
-
-
-

Returns

-

the environment -strings, or NULL if they were not sent.

-

[array zero-terminated=1][transfer none]

-
-

Since: 2.28

-
-
-
-

g_application_command_line_get_options_dict ()

-
GVariantDict *
-g_application_command_line_get_options_dict
-                               (GApplicationCommandLine *cmdline);
-

Gets the options there were passed to g_application_command_line().

-

If you did not override local_command_line() then these are the same -options that were parsed according to the GOptionEntrys added to the -application with g_application_add_main_option_entries() and possibly -modified from your GApplication::handle-local-options handler.

-

If no options were sent then an empty dictionary is returned so that -you don't need to check for NULL.

-
-

Parameters

-
----- - - - - - -

cmdline

a GApplicationCommandLine

 
-
-
-

Returns

-

a GVariantDict with the options.

-

[transfer none]

-
-

Since: 2.40

-
-
-
-

g_application_command_line_get_stdin ()

-
GInputStream *
-g_application_command_line_get_stdin (GApplicationCommandLine *cmdline);
-

Gets the stdin of the invoking process.

-

The GInputStream can be used to read data passed to the standard -input of the invoking process. -This doesn't work on all platforms. Presently, it is only available -on UNIX when using a DBus daemon capable of passing file descriptors. -If stdin is not available then NULL will be returned. In the -future, support may be expanded to other platforms.

-

You must only call this function once per commandline invocation.

-
-

Parameters

-
----- - - - - - -

cmdline

a GApplicationCommandLine

 
-
-
-

Returns

-

a GInputStream for stdin.

-

[transfer full]

-
-

Since: 2.34

-
-
-
-

g_application_command_line_create_file_for_arg ()

-
GFile *
-g_application_command_line_create_file_for_arg
-                               (GApplicationCommandLine *cmdline,
-                                const gchar *arg);
-

Creates a GFile corresponding to a filename that was given as part -of the invocation of cmdline -.

-

This differs from g_file_new_for_commandline_arg() in that it -resolves relative pathnames using the current working directory of -the invoking process rather than the local process.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cmdline

a GApplicationCommandLine

 

arg

an argument from cmdline -

 
-
-
-

Returns

-

a new GFile.

-

[transfer full]

-
-

Since: 2.36

-
-
-
-

g_application_command_line_getenv ()

-
const gchar *
-g_application_command_line_getenv (GApplicationCommandLine *cmdline,
-                                   const gchar *name);
-

Gets the value of a particular environment variable of the command -line invocation, as would be returned by g_getenv(). The strings may -contain non-utf8 data.

-

The remote application usually does not send an environment. Use -G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag -set it is possible that the environment is still not available (due -to invocation messages from other applications).

-

The return value should not be modified or freed and is valid for as -long as cmdline - exists.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cmdline

a GApplicationCommandLine

 

name

the environment variable to get

 
-
-
-

Returns

-

the value of the variable, or NULL if unset or unsent

-
-

Since: 2.28

-
-
-
-

g_application_command_line_get_is_remote ()

-
gboolean
-g_application_command_line_get_is_remote
-                               (GApplicationCommandLine *cmdline);
-

Determines if cmdline - represents a remote invocation.

-
-

Parameters

-
----- - - - - - -

cmdline

a GApplicationCommandLine

 
-
-
-

Returns

-

TRUE if the invocation was remote

-
-

Since: 2.28

-
-
-
-

g_application_command_line_get_platform_data ()

-
GVariant *
-g_application_command_line_get_platform_data
-                               (GApplicationCommandLine *cmdline);
-

Gets the platform data associated with the invocation of cmdline -.

-

This is a GVariant dictionary containing information about the -context in which the invocation occurred. It typically contains -information like the current working directory and the startup -notification ID.

-

For local invocation, it will be NULL.

-
-

Parameters

-
----- - - - - - -

cmdline

GApplicationCommandLine

 
-
-
-

Returns

-

the platform data, or NULL.

-

[nullable]

-
-

Since: 2.28

-
-
-
-

g_application_command_line_set_exit_status ()

-
void
-g_application_command_line_set_exit_status
-                               (GApplicationCommandLine *cmdline,
-                                int exit_status);
-

Sets the exit status that will be used when the invoking process -exits.

-

The return value of the “command-line” signal is -passed to this function when the handler returns. This is the usual -way of setting the exit status.

-

In the event that you want the remote invocation to continue running -and want to decide on the exit status in the future, you can use this -call. For the case of a remote invocation, the remote process will -typically exit when the last reference is dropped on cmdline -. The -exit status of the remote process will be equal to the last value -that was set with this function.

-

In the case that the commandline invocation is local, the situation -is slightly more complicated. If the commandline invocation results -in the mainloop running (ie: because the use-count of the application -increased to a non-zero value) then the application is considered to -have been 'successful' in a certain sense, and the exit status is -always zero. If the application use count is zero, though, the exit -status of the local GApplicationCommandLine is used.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cmdline

a GApplicationCommandLine

 

exit_status

the exit status

 
-
-

Since: 2.28

-
-
-
-

g_application_command_line_get_exit_status ()

-
int
-g_application_command_line_get_exit_status
-                               (GApplicationCommandLine *cmdline);
-

Gets the exit status of cmdline -. See -g_application_command_line_set_exit_status() for more information.

-
-

Parameters

-
----- - - - - - -

cmdline

a GApplicationCommandLine

 
-
-
-

Returns

-

the exit status

-
-

Since: 2.28

-
-
-
-

g_application_command_line_print ()

-
void
-g_application_command_line_print (GApplicationCommandLine *cmdline,
-                                  const gchar *format,
-                                  ...);
-

Formats a message and prints it using the stdout print handler in the -invoking process.

-

If cmdline - is a local invocation then this is exactly equivalent to -g_print(). If cmdline - is remote then this is equivalent to calling -g_print() in the invoking process.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cmdline

a GApplicationCommandLine

 

format

a printf-style format string

 

...

arguments, as per format -

 
-
-

Since: 2.28

-
-
-
-

g_application_command_line_printerr ()

-
void
-g_application_command_line_printerr (GApplicationCommandLine *cmdline,
-                                     const gchar *format,
-                                     ...);
-

Formats a message and prints it using the stderr print handler in the -invoking process.

-

If cmdline - is a local invocation then this is exactly equivalent to -g_printerr(). If cmdline - is remote then this is equivalent to -calling g_printerr() in the invoking process.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cmdline

a GApplicationCommandLine

 

format

a printf-style format string

 

...

arguments, as per format -

 
-
-

Since: 2.28

-
-
-
-

Types and Values

-
-

GApplicationCommandLine

-
typedef struct _GApplicationCommandLine GApplicationCommandLine;
-

GApplicationCommandLine is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

struct GApplicationCommandLineClass

-
struct GApplicationCommandLineClass {
-};
-
-

The GApplicationCommandLineClass -contains private data only.

-

Since: 2.28

-
-
-
-

Property Details

-
-

The “arguments” property

-
  “arguments”                GVariant *
-

The commandline that caused this ::command-line signal emission.

-

Flags: Write / Construct Only

-

Allowed values: GVariant<aay>

-

Default value: NULL

-
-
-
-

The “is-remote” property

-
  “is-remote”                gboolean
-

TRUE if this is a remote commandline.

-

Flags: Read

-

Default value: FALSE

-
-
-
-

The “options” property

-
  “options”                  GVariant *
-

The options sent along with the commandline.

-

Flags: Write / Construct Only

-

Allowed values: GVariant<a{sv}>

-

Default value: NULL

-
-
-
-

The “platform-data” property

-
  “platform-data”            GVariant *
-

Platform-specific data for the commandline.

-

Flags: Write / Construct Only

-

Allowed values: GVariant<a{sv}>

-

Default value: NULL

-
-
-
-

See Also

-

GApplication

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GAsyncInitable.html b/docs/reference/gio/html/GAsyncInitable.html deleted file mode 100644 index a4bb783e8..000000000 --- a/docs/reference/gio/html/GAsyncInitable.html +++ /dev/null @@ -1,762 +0,0 @@ - - - - -GAsyncInitable: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GAsyncInitable

-

GAsyncInitable — Asynchronously failable object initialization interface

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -g_async_initable_init_async () -
-gboolean - -g_async_initable_init_finish () -
-void - -g_async_initable_new_async () -
-GObject * - -g_async_initable_new_finish () -
-void - -g_async_initable_new_valist_async () -
-void - -g_async_initable_newv_async () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GAsyncInitable
structGAsyncInitableIface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GAsyncInitable
-
-
-
-

Prerequisites

-

-GAsyncInitable requires - GObject.

-
-
-

Known Implementations

-

-GAsyncInitable is implemented by - GDBusConnection, GDBusObjectManagerClient and GDBusProxy.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

This is the asynchronous version of GInitable; it behaves the same -in all ways except that initialization is asynchronous. For more details -see the descriptions on GInitable.

-

A class may implement both the GInitable and GAsyncInitable interfaces.

-

Users of objects implementing this are not intended to use the interface -method directly; instead it will be used automatically in various ways. -For C applications you generally just call g_async_initable_new_async() -directly, or indirectly via a foo_thing_new_async() wrapper. This will call -g_async_initable_init_async() under the cover, calling back with NULL and -a set GError on failure.

-

A typical implementation might look something like this:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
enum {
-   NOT_INITIALIZED,
-   INITIALIZING,
-   INITIALIZED
-};
-
-static void
-_foo_ready_cb (Foo *self)
-{
-  GList *l;
-
-  self->priv->state = INITIALIZED;
-
-  for (l = self->priv->init_results; l != NULL; l = l->next)
-    {
-      GTask *task = l->data;
-
-      if (self->priv->success)
-        g_task_return_boolean (task, TRUE);
-      else
-        g_task_return_new_error (task, ...);
-      g_object_unref (task);
-    }
-
-  g_list_free (self->priv->init_results);
-  self->priv->init_results = NULL;
-}
-
-static void
-foo_init_async (GAsyncInitable       *initable,
-                int                   io_priority,
-                GCancellable         *cancellable,
-                GAsyncReadyCallback   callback,
-                gpointer              user_data)
-{
-  Foo *self = FOO (initable);
-  GTask *task;
-
-  task = g_task_new (initable, cancellable, callback, user_data);
-
-  switch (self->priv->state)
-    {
-      case NOT_INITIALIZED:
-        _foo_get_ready (self);
-        self->priv->init_results = g_list_append (self->priv->init_results,
-                                                  task);
-        self->priv->state = INITIALIZING;
-        break;
-      case INITIALIZING:
-        self->priv->init_results = g_list_append (self->priv->init_results,
-                                                  task);
-        break;
-      case INITIALIZED:
-        if (!self->priv->success)
-          g_task_return_new_error (task, ...);
-        else
-          g_task_return_boolean (task, TRUE);
-        g_object_unref (task);
-        break;
-    }
-}
-
-static gboolean
-foo_init_finish (GAsyncInitable       *initable,
-                 GAsyncResult         *result,
-                 GError              **error)
-{
-  g_return_val_if_fail (g_task_is_valid (result, initable), FALSE);
-
-  return g_task_propagate_boolean (G_TASK (result), error);
-}
-
-static void
-foo_async_initable_iface_init (gpointer g_iface,
-                               gpointer data)
-{
-  GAsyncInitableIface *iface = g_iface;
-
-  iface->init_async = foo_init_async;
-  iface->init_finish = foo_init_finish;
-}
-
- -

-
-
-

Functions

-
-

g_async_initable_init_async ()

-
void
-g_async_initable_init_async (GAsyncInitable *initable,
-                             int io_priority,
-                             GCancellable *cancellable,
-                             GAsyncReadyCallback callback,
-                             gpointer user_data);
-

Starts asynchronous initialization of the object implementing the -interface. This must be done before any real use of the object after -initial construction. If the object also implements GInitable you can -optionally call g_initable_init() instead.

-

When the initialization is finished, callback - will be called. You can -then call g_async_initable_init_finish() to get the result of the -initialization.

-

Implementations may also support cancellation. If cancellable - is not -NULL, then initialization can be cancelled by triggering the cancellable -object from another thread. If the operation was cancelled, the error -G_IO_ERROR_CANCELLED will be returned. If cancellable - is not NULL, and -the object doesn't support cancellable initialization, the error -G_IO_ERROR_NOT_SUPPORTED will be returned.

-

As with GInitable, if the object is not initialized, or initialization -returns with an error, then all operations on the object except -g_object_ref() and g_object_unref() are considered to be invalid, and -have undefined behaviour. They will often fail with g_critical() or -g_warning(), but this must not be relied on.

-

Implementations of this method must be idempotent: i.e. multiple calls -to this function with the same argument should return the same results. -Only the first call initializes the object; further calls return the result -of the first call. This is so that it's safe to implement the singleton -pattern in the GObject constructor function.

-

For classes that also support the GInitable interface, the default -implementation of this method will run the g_initable_init() function -in a thread, so if you want to support asynchronous initialization via -threads, just implement the GAsyncInitable interface without overriding -any interface methods.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

initable

a GAsyncInitable.

 

io_priority

the I/O priority of the operation

 

cancellable

optional GCancellable object, NULL to ignore.

 

callback

a GAsyncReadyCallback to call when the request is satisfied

 

user_data

the data to pass to callback function

 
-
-

Since: 2.22

-
-
-
-

g_async_initable_init_finish ()

-
gboolean
-g_async_initable_init_finish (GAsyncInitable *initable,
-                              GAsyncResult *res,
-                              GError **error);
-

Finishes asynchronous initialization and returns the result. -See g_async_initable_init_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

initable

a GAsyncInitable.

 

res

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE if successful. If an error has occurred, this function -will return FALSE and set error -appropriately if present.

-
-

Since: 2.22

-
-
-
-

g_async_initable_new_async ()

-
void
-g_async_initable_new_async (GType object_type,
-                            int io_priority,
-                            GCancellable *cancellable,
-                            GAsyncReadyCallback callback,
-                            gpointer user_data,
-                            const gchar *first_property_name,
-                            ...);
-

Helper function for constructing GAsyncInitable object. This is -similar to g_object_new() but also initializes the object asynchronously.

-

When the initialization is finished, callback - will be called. You can -then call g_async_initable_new_finish() to get the new object and check -for any errors.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

object_type

a GType supporting GAsyncInitable.

 

io_priority

the I/O priority of the operation

 

cancellable

optional GCancellable object, NULL to ignore.

 

callback

a GAsyncReadyCallback to call when the initialization is -finished

 

user_data

the data to pass to callback function

 

first_property_name

the name of the first property, or NULL if no -properties.

[nullable]

...

the value of the first property, followed by other property -value pairs, and ended by NULL.

 
-
-

Since: 2.22

-
-
-
-

g_async_initable_new_finish ()

-
GObject *
-g_async_initable_new_finish (GAsyncInitable *initable,
-                             GAsyncResult *res,
-                             GError **error);
-

Finishes the async construction for the various g_async_initable_new -calls, returning the created object or NULL on error.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

initable

the GAsyncInitable from the callback

 

res

the GAsyncResult from the callback

 

error

return location for errors, or NULL to ignore

 
-
-
-

Returns

-

a newly created GObject, -or NULL on error. Free with g_object_unref().

-

[type GObject.Object][transfer full]

-
-

Since: 2.22

-
-
-
-

g_async_initable_new_valist_async ()

-
void
-g_async_initable_new_valist_async (GType object_type,
-                                   const gchar *first_property_name,
-                                   va_list var_args,
-                                   int io_priority,
-                                   GCancellable *cancellable,
-                                   GAsyncReadyCallback callback,
-                                   gpointer user_data);
-

Helper function for constructing GAsyncInitable object. This is -similar to g_object_new_valist() but also initializes the object -asynchronously.

-

When the initialization is finished, callback - will be called. You can -then call g_async_initable_new_finish() to get the new object and check -for any errors.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

object_type

a GType supporting GAsyncInitable.

 

first_property_name

the name of the first property, followed by -the value, and other property value pairs, and ended by NULL.

 

var_args

The var args list generated from first_property_name -.

 

io_priority

the I/O priority of the operation

 

cancellable

optional GCancellable object, NULL to ignore.

 

callback

a GAsyncReadyCallback to call when the initialization is -finished

 

user_data

the data to pass to callback function

 
-
-

Since: 2.22

-
-
-
-

g_async_initable_newv_async ()

-
void
-g_async_initable_newv_async (GType object_type,
-                             guint n_parameters,
-                             GParameter *parameters,
-                             int io_priority,
-                             GCancellable *cancellable,
-                             GAsyncReadyCallback callback,
-                             gpointer user_data);
-

Helper function for constructing GAsyncInitable object. This is -similar to g_object_newv() but also initializes the object asynchronously.

-

When the initialization is finished, callback - will be called. You can -then call g_async_initable_new_finish() to get the new object and check -for any errors.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

object_type

a GType supporting GAsyncInitable.

 

n_parameters

the number of parameters in parameters -

 

parameters

the parameters to use to construct the object

 

io_priority

the I/O priority of the operation

 

cancellable

optional GCancellable object, NULL to ignore.

 

callback

a GAsyncReadyCallback to call when the initialization is -finished

 

user_data

the data to pass to callback function

 
-
-

Since: 2.22

-
-
-
-

Types and Values

-
-

GAsyncInitable

-
typedef struct _GAsyncInitable GAsyncInitable;
-

Interface for asynchronously initializable objects.

-

Since: 2.22

-
-
-
-

struct GAsyncInitableIface

-
struct GAsyncInitableIface {
-  GTypeInterface g_iface;
-
-  /* Virtual Table */
-
-  void     (* init_async)  (GAsyncInitable      *initable,
-			    int                  io_priority,
-			    GCancellable        *cancellable,
-			    GAsyncReadyCallback  callback,
-			    gpointer             user_data);
-  gboolean (* init_finish) (GAsyncInitable      *initable,
-			    GAsyncResult        *res,
-			    GError             **error);
-};
-
-

Provides an interface for asynchronous initializing object such that -initialization may fail.

-
-

Members

-
----- - - - - - - - - - - - - -

init_async ()

Starts initialization of the object.

 

init_finish ()

Finishes initialization of the object.

 
-
-

Since: 2.22

-
-
-
-

See Also

-

GInitable

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GAsyncResult.html b/docs/reference/gio/html/GAsyncResult.html deleted file mode 100644 index d058907bc..000000000 --- a/docs/reference/gio/html/GAsyncResult.html +++ /dev/null @@ -1,503 +0,0 @@ - - - - -GAsyncResult: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GAsyncResult

-

GAsyncResult — Asynchronous Function Results

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - -
-void - -(*GAsyncReadyCallback) () -
-gpointer - -g_async_result_get_user_data () -
-GObject * - -g_async_result_get_source_object () -
-gboolean - -g_async_result_is_tagged () -
-gboolean - -g_async_result_legacy_propagate_error () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GAsyncResult
structGAsyncResultIface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GAsyncResult
-
-
-
-

Prerequisites

-

-GAsyncResult requires - GObject.

-
-
-

Known Implementations

-

-GAsyncResult is implemented by - GSimpleAsyncResult and GTask.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Provides a base class for implementing asynchronous function results.

-

Asynchronous operations are broken up into two separate operations -which are chained together by a GAsyncReadyCallback. To begin -an asynchronous operation, provide a GAsyncReadyCallback to the -asynchronous function. This callback will be triggered when the -operation has completed, and will be passed a GAsyncResult instance -filled with the details of the operation's success or failure, the -object the asynchronous function was started for and any error codes -returned. The asynchronous callback function is then expected to call -the corresponding "_finish()" function, passing the object the -function was called for, the GAsyncResult instance, and (optionally) -an error - to grab any error conditions that may have occurred.

-

The "_finish()" function for an operation takes the generic result -(of type GAsyncResult) and returns the specific result that the -operation in question yields (e.g. a GFileEnumerator for a -"enumerate children" operation). If the result or error status of the -operation is not needed, there is no need to call the "_finish()" -function; GIO will take care of cleaning up the result and error -information after the GAsyncReadyCallback returns. You can pass -NULL for the GAsyncReadyCallback if you don't need to take any -action at all after the operation completes. Applications may also -take a reference to the GAsyncResult and call "_finish()" later; -however, the "_finish()" function may be called at most once.

-

Example of a typical asynchronous operation flow:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
void _theoretical_frobnitz_async (Theoretical         *t,
-                                  GCancellable        *c,
-                                  GAsyncReadyCallback  cb,
-                                  gpointer             u);
-
-gboolean _theoretical_frobnitz_finish (Theoretical   *t,
-                                       GAsyncResult  *res,
-                                       GError       **e);
-
-static void
-frobnitz_result_func (GObject      *source_object,
-		 GAsyncResult *res,
-		 gpointer      user_data)
-{
-  gboolean success = FALSE;
-
-  success = _theoretical_frobnitz_finish (source_object, res, NULL);
-
-  if (success)
-    g_printf ("Hurray!\n");
-  else
-    g_printf ("Uh oh!\n");
-
-  ...
-
-}
-
-int main (int argc, void *argv[])
-{
-   ...
-
-   _theoretical_frobnitz_async (theoretical_data,
-                                NULL,
-                                frobnitz_result_func,
-                                NULL);
-
-   ...
-}
-
- -

-

The callback for an asynchronous operation is called only once, and is -always called, even in the case of a cancelled operation. On cancellation -the result is a G_IO_ERROR_CANCELLED error.

-
-

I/O Priority

-

Many I/O-related asynchronous operations have a priority parameter, -which is used in certain cases to determine the order in which -operations are executed. They are not used to determine system-wide -I/O scheduling. Priorities are integers, with lower numbers indicating -higher priority. It is recommended to choose priorities between -G_PRIORITY_LOW and G_PRIORITY_HIGH, with G_PRIORITY_DEFAULT -as a default.

-
-
-
-

Functions

-
-

GAsyncReadyCallback ()

-
void
-(*GAsyncReadyCallback) (GObject *source_object,
-                        GAsyncResult *res,
-                        gpointer user_data);
-

Type definition for a function that will be called back when an asynchronous -operation within GIO has been completed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

source_object

the object the asynchronous operation was started with.

 

res

a GAsyncResult.

 

user_data

user data passed to the callback.

 
-
-
-
-
-

g_async_result_get_user_data ()

-
gpointer
-g_async_result_get_user_data (GAsyncResult *res);
-

Gets the user data from a GAsyncResult.

-
-

Parameters

-
----- - - - - - -

res

a GAsyncResult.

 
-
-
-

Returns

-

the user data for res -.

-

[transfer full]

-
-
-
-
-

g_async_result_get_source_object ()

-
GObject *
-g_async_result_get_source_object (GAsyncResult *res);
-

Gets the source object from a GAsyncResult.

-
-

Parameters

-
----- - - - - - -

res

a GAsyncResult

 
-
-
-

Returns

-

a new reference to the source object for the res -, -or NULL if there is none.

-

[transfer full]

-
-
-
-
-

g_async_result_is_tagged ()

-
gboolean
-g_async_result_is_tagged (GAsyncResult *res,
-                          gpointer source_tag);
-

Checks if res - has the given source_tag - (generally a function -pointer indicating the function res - was created by).

-
-

Parameters

-
----- - - - - - - - - - - - - -

res

a GAsyncResult

 

source_tag

an application-defined tag

 
-
-
-

Returns

-

TRUE if res -has the indicated source_tag -, FALSE if -not.

-
-

Since: 2.34

-
-
-
-

g_async_result_legacy_propagate_error ()

-
gboolean
-g_async_result_legacy_propagate_error (GAsyncResult *res,
-                                       GError **error);
-

If res - is a GSimpleAsyncResult, this is equivalent to -g_simple_async_result_propagate_error(). Otherwise it returns -FALSE.

-

This can be used for legacy error handling in async *_finish() -wrapper functions that traditionally handled GSimpleAsyncResult -error returns themselves rather than calling into the virtual method. -This should not be used in new code; GAsyncResult errors that are -set by virtual methods should also be extracted by virtual methods, -to enable subclasses to chain up correctly.

-
-

Parameters

-
----- - - - - - - - - - - - - -

res

a GAsyncResult

 

error

a location to propagate the error to.

[out]
-
-
-

Returns

-

TRUE if error -is has been filled in with an error from -res -, FALSE if not.

-
-

Since: 2.34

-
-
-
-

Types and Values

-
-

GAsyncResult

-
typedef struct _GAsyncResult GAsyncResult;
-

Holds results information for an asynchronous operation, -usually passed directly to a asynchronous _finish() operation.

-
-
-
-

struct GAsyncResultIface

-
struct GAsyncResultIface {
-  GTypeInterface g_iface;
-
-  /* Virtual Table */
-
-  gpointer  (* get_user_data)     (GAsyncResult *res);
-  GObject * (* get_source_object) (GAsyncResult *res);
-
-  gboolean  (* is_tagged)         (GAsyncResult *res,
-				   gpointer      source_tag);
-};
-
-

Interface definition for GAsyncResult.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

get_user_data ()

Gets the user data passed to the callback.

 

get_source_object ()

Gets the source object that issued the asynchronous operation.

 

is_tagged ()

Checks if a result is tagged with a particular source.

 
-
-
-
-
-

See Also

-

GTask

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GBufferedInputStream.html b/docs/reference/gio/html/GBufferedInputStream.html deleted file mode 100644 index 7fc53d8d1..000000000 --- a/docs/reference/gio/html/GBufferedInputStream.html +++ /dev/null @@ -1,696 +0,0 @@ - - - - -GBufferedInputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GBufferedInputStream

-

GBufferedInputStream — Buffered Input Stream

-
- -
-

Properties

-
----- - - - - - -
guintbuffer-sizeRead / Write / Construct
-
-
-

Types and Values

-
---- - - - - -
 GBufferedInputStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GInputStream
-        ╰── GFilterInputStream
-            ╰── GBufferedInputStream
-                ╰── GDataInputStream
-
-
-
-

Implemented Interfaces

-

-GBufferedInputStream implements - GSeekable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Buffered input stream implements GFilterInputStream and provides -for buffered reads.

-

By default, GBufferedInputStream's buffer size is set at 4 kilobytes.

-

To create a buffered input stream, use g_buffered_input_stream_new(), -or g_buffered_input_stream_new_sized() to specify the buffer's size at -construction.

-

To get the size of a buffer within a buffered input stream, use -g_buffered_input_stream_get_buffer_size(). To change the size of a -buffered input stream's buffer, use -g_buffered_input_stream_set_buffer_size(). Note that the buffer's size -cannot be reduced below the size of the data within the buffer.

-
-
-

Functions

-
-

g_buffered_input_stream_new ()

-
GInputStream *
-g_buffered_input_stream_new (GInputStream *base_stream);
-

Creates a new GInputStream from the given base_stream -, with -a buffer set to the default size (4 kilobytes).

-
-

Parameters

-
----- - - - - - -

base_stream

a GInputStream

 
-
-
-

Returns

-

a GInputStream for the given base_stream -.

-
-
-
-
-

g_buffered_input_stream_new_sized ()

-
GInputStream *
-g_buffered_input_stream_new_sized (GInputStream *base_stream,
-                                   gsize size);
-

Creates a new GBufferedInputStream from the given base_stream -, -with a buffer set to size -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

base_stream

a GInputStream

 

size

a gsize

 
-
-
-

Returns

-

a GInputStream.

-
-
-
-
-

g_buffered_input_stream_get_buffer_size ()

-
gsize
-g_buffered_input_stream_get_buffer_size
-                               (GBufferedInputStream *stream);
-

Gets the size of the input buffer.

-
-

Parameters

-
----- - - - - - -

stream

a GBufferedInputStream

 
-
-
-

Returns

-

the current buffer size.

-
-
-
-
-

g_buffered_input_stream_set_buffer_size ()

-
void
-g_buffered_input_stream_set_buffer_size
-                               (GBufferedInputStream *stream,
-                                gsize size);
-

Sets the size of the internal buffer of stream - to size -, or to the -size of the contents of the buffer. The buffer can never be resized -smaller than its current contents.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GBufferedInputStream

 

size

a gsize

 
-
-
-
-
-

g_buffered_input_stream_get_available ()

-
gsize
-g_buffered_input_stream_get_available (GBufferedInputStream *stream);
-

Gets the size of the available data within the stream.

-
-

Parameters

-
----- - - - - - -

stream

GBufferedInputStream

 
-
-
-

Returns

-

size of the available stream.

-
-
-
-
-

g_buffered_input_stream_peek_buffer ()

-
const void *
-g_buffered_input_stream_peek_buffer (GBufferedInputStream *stream,
-                                     gsize *count);
-

Returns the buffer with the currently available bytes. The returned -buffer must not be modified and will become invalid when reading from -the stream or filling the buffer.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GBufferedInputStream

 

count

a gsize to get the number of bytes available in the buffer.

[out]
-
-
-

Returns

-

read-only buffer.

-

[array length=count][element-type guint8][transfer none]

-
-
-
-
-

g_buffered_input_stream_peek ()

-
gsize
-g_buffered_input_stream_peek (GBufferedInputStream *stream,
-                              void *buffer,
-                              gsize offset,
-                              gsize count);
-

Peeks in the buffer, copying data of size count - into buffer -, -offset offset - bytes.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GBufferedInputStream

 

buffer

a pointer to -an allocated chunk of memory.

[array length=count][element-type guint8]

offset

a gsize

 

count

a gsize

 
-
-
-

Returns

-

a gsize of the number of bytes peeked, or -1 on error.

-
-
-
-
-

g_buffered_input_stream_fill ()

-
gssize
-g_buffered_input_stream_fill (GBufferedInputStream *stream,
-                              gssize count,
-                              GCancellable *cancellable,
-                              GError **error);
-

Tries to read count - bytes from the stream into the buffer. -Will block during this read.

-

If count - is zero, returns zero and does nothing. A value of count - -larger than G_MAXSSIZE will cause a G_IO_ERROR_INVALID_ARGUMENT error.

-

On success, the number of bytes read into the buffer is returned. -It is not an error if this is not the same as the requested size, as it -can happen e.g. near the end of a file. Zero is returned on end of file -(or if count - is zero), but never otherwise.

-

If count - is -1 then the attempted read size is equal to the number of -bytes that are required to fill the buffer.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an -operation was partially finished when the operation was cancelled the -partial result will be returned, without an error.

-

On error -1 is returned and error - is set accordingly.

-

For the asynchronous, non-blocking, version of this function, see -g_buffered_input_stream_fill_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GBufferedInputStream

 

count

the number of bytes that will be read from the stream

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

the number of bytes read into stream -'s buffer, up to count -, -or -1 on error.

-
-
-
-
-

g_buffered_input_stream_fill_async ()

-
void
-g_buffered_input_stream_fill_async (GBufferedInputStream *stream,
-                                    gssize count,
-                                    int io_priority,
-                                    GCancellable *cancellable,
-                                    GAsyncReadyCallback callback,
-                                    gpointer user_data);
-

Reads data into stream -'s buffer asynchronously, up to count - size. -io_priority - can be used to prioritize reads. For the synchronous -version of this function, see g_buffered_input_stream_fill().

-

If count - is -1 then the attempted read size is equal to the number -of bytes that are required to fill the buffer.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GBufferedInputStream

 

count

the number of bytes that will be read from the stream

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

a gpointer.

[closure]
-
-
-
-
-

g_buffered_input_stream_fill_finish ()

-
gssize
-g_buffered_input_stream_fill_finish (GBufferedInputStream *stream,
-                                     GAsyncResult *result,
-                                     GError **error);
-

Finishes an asynchronous read.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GBufferedInputStream

 

result

a GAsyncResult

 

error

a GError

 
-
-
-

Returns

-

a gssize of the read stream, or -1 on an error.

-
-
-
-
-

g_buffered_input_stream_read_byte ()

-
int
-g_buffered_input_stream_read_byte (GBufferedInputStream *stream,
-                                   GCancellable *cancellable,
-                                   GError **error);
-

Tries to read a single byte from the stream or the buffer. Will block -during this read.

-

On success, the byte read from the stream is returned. On end of stream --1 is returned but it's not an exceptional error and error - is not set.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an -operation was partially finished when the operation was cancelled the -partial result will be returned, without an error.

-

On error -1 is returned and error - is set accordingly.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GBufferedInputStream

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

the byte read from the stream -, or -1 on end of stream or error.

-
-
-
-
-

Types and Values

-
-

GBufferedInputStream

-
typedef struct _GBufferedInputStream GBufferedInputStream;
-

Implements GFilterInputStream with a sized input buffer.

-
-
-
-

Property Details

-
-

The “buffer-size” property

-
  “buffer-size”              guint
-

The size of the backend buffer.

-

Flags: Read / Write / Construct

-

Allowed values: >= 1

-

Default value: 4096

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GBufferedOutputStream.html b/docs/reference/gio/html/GBufferedOutputStream.html deleted file mode 100644 index c10fa1d14..000000000 --- a/docs/reference/gio/html/GBufferedOutputStream.html +++ /dev/null @@ -1,388 +0,0 @@ - - - - -GBufferedOutputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GBufferedOutputStream

-

GBufferedOutputStream — Buffered Output Stream

-
- -
-

Properties

-
----- - - - - - - - - - - - - -
gbooleanauto-growRead / Write
guintbuffer-sizeRead / Write / Construct
-
-
-

Types and Values

-
---- - - - - -
 GBufferedOutputStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GOutputStream
-        ╰── GFilterOutputStream
-            ╰── GBufferedOutputStream
-
-
-
-

Implemented Interfaces

-

-GBufferedOutputStream implements - GSeekable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Buffered output stream implements GFilterOutputStream and provides -for buffered writes.

-

By default, GBufferedOutputStream's buffer size is set at 4 kilobytes.

-

To create a buffered output stream, use g_buffered_output_stream_new(), -or g_buffered_output_stream_new_sized() to specify the buffer's size -at construction.

-

To get the size of a buffer within a buffered input stream, use -g_buffered_output_stream_get_buffer_size(). To change the size of a -buffered output stream's buffer, use -g_buffered_output_stream_set_buffer_size(). Note that the buffer's -size cannot be reduced below the size of the data within the buffer.

-
-
-

Functions

-
-

g_buffered_output_stream_new ()

-
GOutputStream *
-g_buffered_output_stream_new (GOutputStream *base_stream);
-

Creates a new buffered output stream for a base stream.

-
-

Parameters

-
----- - - - - - -

base_stream

a GOutputStream.

 
-
-
-

Returns

-

a GOutputStream for the given base_stream -.

-
-
-
-
-

g_buffered_output_stream_new_sized ()

-
GOutputStream *
-g_buffered_output_stream_new_sized (GOutputStream *base_stream,
-                                    gsize size);
-

Creates a new buffered output stream with a given buffer size.

-
-

Parameters

-
----- - - - - - - - - - - - - -

base_stream

a GOutputStream.

 

size

a gsize.

 
-
-
-

Returns

-

a GOutputStream with an internal buffer set to size -.

-
-
-
-
-

g_buffered_output_stream_get_buffer_size ()

-
gsize
-g_buffered_output_stream_get_buffer_size
-                               (GBufferedOutputStream *stream);
-

Gets the size of the buffer in the stream -.

-
-

Parameters

-
----- - - - - - -

stream

a GBufferedOutputStream.

 
-
-
-

Returns

-

the current size of the buffer.

-
-
-
-
-

g_buffered_output_stream_set_buffer_size ()

-
void
-g_buffered_output_stream_set_buffer_size
-                               (GBufferedOutputStream *stream,
-                                gsize size);
-

Sets the size of the internal buffer to size -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GBufferedOutputStream.

 

size

a gsize.

 
-
-
-
-
-

g_buffered_output_stream_get_auto_grow ()

-
gboolean
-g_buffered_output_stream_get_auto_grow
-                               (GBufferedOutputStream *stream);
-

Checks if the buffer automatically grows as data is added.

-
-

Parameters

-
----- - - - - - -

stream

a GBufferedOutputStream.

 
-
-
-

Returns

-

TRUE if the stream -'s buffer automatically grows, -FALSE otherwise.

-
-
-
-
-

g_buffered_output_stream_set_auto_grow ()

-
void
-g_buffered_output_stream_set_auto_grow
-                               (GBufferedOutputStream *stream,
-                                gboolean auto_grow);
-

Sets whether or not the stream -'s buffer should automatically grow. -If auto_grow - is true, then each write will just make the buffer -larger, and you must manually flush the buffer to actually write out -the data to the underlying stream.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GBufferedOutputStream.

 

auto_grow

a gboolean.

 
-
-
-
-
-

Types and Values

-
-

GBufferedOutputStream

-
typedef struct _GBufferedOutputStream GBufferedOutputStream;
-

An implementation of GFilterOutputStream with a sized buffer.

-
-
-
-

Property Details

-
-

The “auto-grow” property

-
  “auto-grow”                gboolean
-

Whether the buffer should automatically grow.

-

Flags: Read / Write

-

Default value: FALSE

-
-
-
-

The “buffer-size” property

-
  “buffer-size”              guint
-

The size of the backend buffer.

-

Flags: Read / Write / Construct

-

Allowed values: >= 1

-

Default value: 4096

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GBytesIcon.html b/docs/reference/gio/html/GBytesIcon.html deleted file mode 100644 index 1ba806964..000000000 --- a/docs/reference/gio/html/GBytesIcon.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - -GBytesIcon: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GBytesIcon

-

GBytesIcon — An icon stored in memory as a GBytes

-
-
-

Functions

-
---- - - - - - - - - - - -
-GIcon * - -g_bytes_icon_new () -
-GBytes * - -g_bytes_icon_get_bytes () -
-
-
-

Properties

-
----- - - - - - -
-GBytes *bytesRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GBytesIcon
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GBytesIcon
-
-
-
-

Implemented Interfaces

-

-GBytesIcon implements - GIcon and GLoadableIcon.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GBytesIcon specifies an image held in memory in a common format (usually -png) to be used as icon.

-
-
-

Functions

-
-

g_bytes_icon_new ()

-
GIcon *
-g_bytes_icon_new (GBytes *bytes);
-

Creates a new icon for a bytes.

-
-

Parameters

-
----- - - - - - -

bytes

a GBytes.

 
-
-
-

Returns

-

a GIcon for the given -bytes -, or NULL on error.

-

[transfer full][type GBytesIcon]

-
-

Since: 2.38

-
-
-
-

g_bytes_icon_get_bytes ()

-
GBytes *
-g_bytes_icon_get_bytes (GBytesIcon *icon);
-

Gets the GBytes associated with the given icon -.

-
-

Parameters

-
----- - - - - - -

icon

a GIcon.

 
-
-
-

Returns

-

a GBytes, or NULL.

-

[transfer none]

-
-

Since: 2.38

-
-
-
-

Types and Values

-
-

GBytesIcon

-
typedef struct _GBytesIcon GBytesIcon;
-

Gets an icon for a GBytes. Implements GLoadableIcon.

-
-
-
-

Property Details

-
-

The “bytes” property

-
  “bytes”                    GBytes *
-

The bytes containing the icon.

-

Flags: Read / Write / Construct Only

-
-
-
-

See Also

-

GIcon, GLoadableIcon, GBytes

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GCancellable.html b/docs/reference/gio/html/GCancellable.html deleted file mode 100644 index b7b1387e6..000000000 --- a/docs/reference/gio/html/GCancellable.html +++ /dev/null @@ -1,857 +0,0 @@ - - - - -GCancellable: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GCancellable

-

GCancellable — Thread-safe Operation Cancellation Stack

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GCancellable * - -g_cancellable_new () -
-gboolean - -g_cancellable_is_cancelled () -
-gboolean - -g_cancellable_set_error_if_cancelled () -
-int - -g_cancellable_get_fd () -
-gboolean - -g_cancellable_make_pollfd () -
-void - -g_cancellable_release_fd () -
-GSource * - -g_cancellable_source_new () -
-gboolean - -(*GCancellableSourceFunc) () -
-GCancellable * - -g_cancellable_get_current () -
-void - -g_cancellable_pop_current () -
-void - -g_cancellable_push_current () -
-void - -g_cancellable_reset () -
-gulong - -g_cancellable_connect () -
-void - -g_cancellable_disconnect () -
-void - -g_cancellable_cancel () -
-
-
-

Signals

-
----- - - - - - -
voidcancelledRun Last
-
-
-

Types and Values

-
---- - - - - -
 GCancellable
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GCancellable
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GCancellable is a thread-safe operation cancellation stack used -throughout GIO to allow for cancellation of synchronous and -asynchronous operations.

-
-
-

Functions

-
-

g_cancellable_new ()

-
GCancellable *
-g_cancellable_new (void);
-

Creates a new GCancellable object.

-

Applications that want to start one or more operations -that should be cancellable should create a GCancellable -and pass it to the operations.

-

One GCancellable can be used in multiple consecutive -operations or in multiple concurrent operations.

-
-

Returns

-

a GCancellable.

-
-
-
-
-

g_cancellable_is_cancelled ()

-
gboolean
-g_cancellable_is_cancelled (GCancellable *cancellable);
-

Checks if a cancellable job has been cancelled.

-
-

Parameters

-
----- - - - - - -

cancellable

a GCancellable or NULL.

[nullable]
-
-
-

Returns

-

TRUE if cancellable -is cancelled, -FALSE if called with NULL or if item is not cancelled.

-
-
-
-
-

g_cancellable_set_error_if_cancelled ()

-
gboolean
-g_cancellable_set_error_if_cancelled (GCancellable *cancellable,
-                                      GError **error);
-

If the cancellable - is cancelled, sets the error to notify -that the operation was cancelled.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cancellable

a GCancellable or NULL.

[nullable]

error

GError to append error state to

 
-
-
-

Returns

-

TRUE if cancellable -was cancelled, FALSE if it was not

-
-
-
-
-

g_cancellable_get_fd ()

-
int
-g_cancellable_get_fd (GCancellable *cancellable);
-

Gets the file descriptor for a cancellable job. This can be used to -implement cancellable operations on Unix systems. The returned fd will -turn readable when cancellable - is cancelled.

-

You are not supposed to read from the fd yourself, just check for -readable status. Reading to unset the readable status is done -with g_cancellable_reset().

-

After a successful return from this function, you should use -g_cancellable_release_fd() to free up resources allocated for -the returned file descriptor.

-

See also g_cancellable_make_pollfd().

-
-

Parameters

-
----- - - - - - -

cancellable

a GCancellable.

 
-
-
-

Returns

-

A valid file descriptor. -1 if the file descriptor -is not supported, or on errors.

-
-
-
-
-

g_cancellable_make_pollfd ()

-
gboolean
-g_cancellable_make_pollfd (GCancellable *cancellable,
-                           GPollFD *pollfd);
-

Creates a GPollFD corresponding to cancellable -; this can be passed -to g_poll() and used to poll for cancellation. This is useful both -for unix systems without a native poll and for portability to -windows.

-

When this function returns TRUE, you should use -g_cancellable_release_fd() to free up resources allocated for the -pollfd -. After a FALSE return, do not call g_cancellable_release_fd().

-

If this function returns FALSE, either no cancellable - was given or -resource limits prevent this function from allocating the necessary -structures for polling. (On Linux, you will likely have reached -the maximum number of file descriptors.) The suggested way to handle -these cases is to ignore the cancellable -.

-

You are not supposed to read from the fd yourself, just check for -readable status. Reading to unset the readable status is done -with g_cancellable_reset().

-
-

Parameters

-
----- - - - - - - - - - - - - -

cancellable

a GCancellable or NULL.

[nullable]

pollfd

a pointer to a GPollFD

 
-
-
-

Returns

-

TRUE if pollfd -was successfully initialized, FALSE on -failure to prepare the cancellable.

-
-

Since: 2.22

-
-
-
-

g_cancellable_release_fd ()

-
void
-g_cancellable_release_fd (GCancellable *cancellable);
-

Releases a resources previously allocated by g_cancellable_get_fd() -or g_cancellable_make_pollfd().

-

For compatibility reasons with older releases, calling this function -is not strictly required, the resources will be automatically freed -when the cancellable - is finalized. However, the cancellable - will -block scarce file descriptors until it is finalized if this function -is not called. This can cause the application to run out of file -descriptors when many GCancellables are used at the same time.

-
-

Parameters

-
----- - - - - - -

cancellable

a GCancellable

 
-
-

Since: 2.22

-
-
-
-

g_cancellable_source_new ()

-
GSource *
-g_cancellable_source_new (GCancellable *cancellable);
-

Creates a source that triggers if cancellable - is cancelled and -calls its callback of type GCancellableSourceFunc. This is -primarily useful for attaching to another (non-cancellable) source -with g_source_add_child_source() to add cancellability to it.

-

For convenience, you can call this with a NULL GCancellable, -in which case the source will never trigger.

-

The new GSource will hold a reference to the GCancellable.

-

[skip]

-
-

Parameters

-
----- - - - - - -

cancellable

a GCancellable, or NULL.

[nullable]
-
-
-

Returns

-

the new GSource.

-

[transfer full]

-
-

Since: 2.28

-
-
-
-

GCancellableSourceFunc ()

-
gboolean
-(*GCancellableSourceFunc) (GCancellable *cancellable,
-                           gpointer user_data);
-

This is the function type of the callback used for the GSource -returned by g_cancellable_source_new().

-
-

Parameters

-
----- - - - - - - - - - - - - -

cancellable

the GCancellable

 

user_data

data passed in by the user.

 
-
-
-

Returns

-

it should return FALSE if the source should be removed.

-
-

Since: 2.28

-
-
-
-

g_cancellable_get_current ()

-
GCancellable *
-g_cancellable_get_current (void);
-

Gets the top cancellable from the stack.

-
-

Returns

-

a GCancellable from the top -of the stack, or NULL if the stack is empty.

-

[nullable][transfer none]

-
-
-
-
-

g_cancellable_pop_current ()

-
void
-g_cancellable_pop_current (GCancellable *cancellable);
-

Pops cancellable - off the cancellable stack (verifying that cancellable - -is on the top of the stack).

-
-

Parameters

-
----- - - - - - -

cancellable

a GCancellable object

 
-
-
-
-
-

g_cancellable_push_current ()

-
void
-g_cancellable_push_current (GCancellable *cancellable);
-

Pushes cancellable - onto the cancellable stack. The current -cancellable can then be received using g_cancellable_get_current().

-

This is useful when implementing cancellable operations in -code that does not allow you to pass down the cancellable object.

-

This is typically called automatically by e.g. GFile operations, -so you rarely have to call this yourself.

-
-

Parameters

-
----- - - - - - -

cancellable

a GCancellable object

 
-
-
-
-
-

g_cancellable_reset ()

-
void
-g_cancellable_reset (GCancellable *cancellable);
-

Resets cancellable - to its uncancelled state.

-

If cancellable is currently in use by any cancellable operation -then the behavior of this function is undefined.

-

Note that it is generally not a good idea to reuse an existing -cancellable for more operations after it has been cancelled once, -as this function might tempt you to do. The recommended practice -is to drop the reference to a cancellable after cancelling it, -and let it die with the outstanding async operations. You should -create a fresh cancellable for further async operations.

-
-

Parameters

-
----- - - - - - -

cancellable

a GCancellable object.

 
-
-
-
-
-

g_cancellable_connect ()

-
gulong
-g_cancellable_connect (GCancellable *cancellable,
-                       GCallback callback,
-                       gpointer data,
-                       GDestroyNotify data_destroy_func);
-

Convenience function to connect to the “cancelled” -signal. Also handles the race condition that may happen -if the cancellable is cancelled right before connecting.

-

callback - is called at most once, either directly at the -time of the connect if cancellable - is already cancelled, -or when cancellable - is cancelled in some thread.

-

data_destroy_func - will be called when the handler is -disconnected, or immediately if the cancellable is already -cancelled.

-

See “cancelled” for details on how to use this.

-

Since GLib 2.40, the lock protecting cancellable - is not held when -callback - is invoked. This lifts a restriction in place for -earlier GLib versions which now makes it easier to write cleanup -code that unconditionally invokes e.g. g_cancellable_cancel().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

cancellable

A GCancellable.

 

callback

The GCallback to connect.

 

data

Data to pass to callback -.

 

data_destroy_func

Free function for data -or NULL.

[nullable]
-
-
-

Returns

-

The id of the signal handler or 0 if cancellable -has already -been cancelled.

-
-

Since: 2.22

-
-
-
-

g_cancellable_disconnect ()

-
void
-g_cancellable_disconnect (GCancellable *cancellable,
-                          gulong handler_id);
-

Disconnects a handler from a cancellable instance similar to -g_signal_handler_disconnect(). Additionally, in the event that a -signal handler is currently running, this call will block until the -handler has finished. Calling this function from a -“cancelled” signal handler will therefore result in a -deadlock.

-

This avoids a race condition where a thread cancels at the -same time as the cancellable operation is finished and the -signal handler is removed. See “cancelled” for -details on how to use this.

-

If cancellable - is NULL or handler_id - is 0 this function does -nothing.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cancellable

A GCancellable or NULL.

[nullable]

handler_id

Handler id of the handler to be disconnected, or 0.

 
-
-

Since: 2.22

-
-
-
-

g_cancellable_cancel ()

-
void
-g_cancellable_cancel (GCancellable *cancellable);
-

Will set cancellable - to cancelled, and will emit the -“cancelled” signal. (However, see the warning about -race conditions in the documentation for that signal if you are -planning to connect to it.)

-

This function is thread-safe. In other words, you can safely call -it from a thread other than the one running the operation that was -passed the cancellable -.

-

If cancellable - is NULL, this function returns immediately for convenience.

-

The convention within GIO is that cancelling an asynchronous -operation causes it to complete asynchronously. That is, if you -cancel the operation from the same thread in which it is running, -then the operation's GAsyncReadyCallback will not be invoked until -the application returns to the main loop.

-
-

Parameters

-
----- - - - - - -

cancellable

a GCancellable object.

[nullable]
-
-
-
-
-

Types and Values

-
-

GCancellable

-
typedef struct _GCancellable GCancellable;
-

Allows actions to be cancelled.

-
-
-
-

Signal Details

-
-

The “cancelled” signal

-
void
-user_function (GCancellable *cancellable,
-               gpointer      user_data)
-

Emitted when the operation has been cancelled.

-

Can be used by implementations of cancellable operations. If the -operation is cancelled from another thread, the signal will be -emitted in the thread that cancelled the operation, not the -thread that is running the operation.

-

Note that disconnecting from this signal (or any signal) in a -multi-threaded program is prone to race conditions. For instance -it is possible that a signal handler may be invoked even after -a call to g_signal_handler_disconnect() for that handler has -already returned.

-

There is also a problem when cancellation happens right before -connecting to the signal. If this happens the signal will -unexpectedly not be emitted, and checking before connecting to -the signal leaves a race condition where this is still happening.

-

In order to make it safe and easy to connect handlers there -are two helper functions: g_cancellable_connect() and -g_cancellable_disconnect() which protect against problems -like this.

-

An example of how to us this:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
// Make sure we don't do unnecessary work if already cancelled
-if (g_cancellable_set_error_if_cancelled (cancellable, error))
-  return;
-
-// Set up all the data needed to be able to handle cancellation
-// of the operation
-my_data = my_data_new (...);
-
-id = 0;
-if (cancellable)
-  id = g_cancellable_connect (cancellable,
-			      G_CALLBACK (cancelled_handler)
-			      data, NULL);
-
-// cancellable operation here...
-
-g_cancellable_disconnect (cancellable, id);
-
-// cancelled_handler is never called after this, it is now safe
-// to free the data
-my_data_free (my_data);
-
- -

-

Note that the cancelled signal is emitted in the thread that -the user cancelled from, which may be the main thread. So, the -cancellable signal should not do something that can block.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cancellable

a GCancellable.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GCharsetConverter.html b/docs/reference/gio/html/GCharsetConverter.html deleted file mode 100644 index f4b37b70f..000000000 --- a/docs/reference/gio/html/GCharsetConverter.html +++ /dev/null @@ -1,313 +0,0 @@ - - - - -GCharsetConverter: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GCharsetConverter

-

GCharsetConverter — Convert between charsets

-
-
-

Functions

- -
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - -
-gchar *from-charsetRead / Write / Construct Only
-gchar *to-charsetRead / Write / Construct Only
gbooleanuse-fallbackRead / Write / Construct
-
-
-

Types and Values

-
---- - - - - -
 GCharsetConverter
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GCharsetConverter
-
-
-
-

Implemented Interfaces

-

-GCharsetConverter implements - GConverter and GInitable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GCharsetConverter is an implementation of GConverter based on -GIConv.

-
-
-

Functions

-
-

g_charset_converter_new ()

-
GCharsetConverter *
-g_charset_converter_new (const gchar *to_charset,
-                         const gchar *from_charset,
-                         GError **error);
-

Creates a new GCharsetConverter.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

to_charset

destination charset

 

from_charset

source charset

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

a new GCharsetConverter or NULL on error.

-
-

Since: 2.24

-
-
-
-

g_charset_converter_set_use_fallback ()

-
void
-g_charset_converter_set_use_fallback (GCharsetConverter *converter,
-                                      gboolean use_fallback);
-

Sets the “use-fallback” property.

-
-

Parameters

-
----- - - - - - - - - - - - - -

converter

a GCharsetConverter

 

use_fallback

TRUE to use fallbacks

 
-
-

Since: 2.24

-
-
-
-

g_charset_converter_get_use_fallback ()

-
gboolean
-g_charset_converter_get_use_fallback (GCharsetConverter *converter);
-

Gets the “use-fallback” property.

-
-

Parameters

-
----- - - - - - -

converter

a GCharsetConverter

 
-
-
-

Returns

-

TRUE if fallbacks are used by converter -

-
-

Since: 2.24

-
-
-
-

g_charset_converter_get_num_fallbacks ()

-
guint
-g_charset_converter_get_num_fallbacks (GCharsetConverter *converter);
-

Gets the number of fallbacks that converter - has applied so far.

-
-

Parameters

-
----- - - - - - -

converter

a GCharsetConverter

 
-
-
-

Returns

-

the number of fallbacks that converter -has applied

-
-

Since: 2.24

-
-
-
-

Types and Values

-
-

GCharsetConverter

-
typedef struct _GCharsetConverter GCharsetConverter;
-

Conversions between character sets.

-
-
-
-

Property Details

-
-

The “from-charset” property

-
  “from-charset”             gchar *
-

The character encoding to convert from.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
-

The “to-charset” property

-
  “to-charset”               gchar *
-

The character encoding to convert to.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
-

The “use-fallback” property

-
  “use-fallback”             gboolean
-

Use fallback (of form \<hexval>) for invalid bytes.

-

Flags: Read / Write / Construct

-

Default value: FALSE

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GConverter.html b/docs/reference/gio/html/GConverter.html deleted file mode 100644 index bfac8dac6..000000000 --- a/docs/reference/gio/html/GConverter.html +++ /dev/null @@ -1,461 +0,0 @@ - - - - -GConverter: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GConverter

-

GConverter — Data conversion interface

-
-
-

Functions

-
---- - - - - - - - - - - -
-GConverterResult - -g_converter_convert () -
-void - -g_converter_reset () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
 GConverter
structGConverterIface
enumGConverterResult
enumGConverterFlags
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GConverter
-
-
-
-

Prerequisites

-

-GConverter requires - GObject.

-
-
-

Known Implementations

-

-GConverter is implemented by - GCharsetConverter, GZlibCompressor and GZlibDecompressor.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GConverter is implemented by objects that convert -binary data in various ways. The conversion can be -stateful and may fail at any place.

-

Some example conversions are: character set conversion, -compression, decompression and regular expression -replace.

-
-
-

Functions

-
-

g_converter_convert ()

-
GConverterResult
-g_converter_convert (GConverter *converter,
-                     const void *inbuf,
-                     gsize inbuf_size,
-                     void *outbuf,
-                     gsize outbuf_size,
-                     GConverterFlags flags,
-                     gsize *bytes_read,
-                     gsize *bytes_written,
-                     GError **error);
-

This is the main operation used when converting data. It is to be called -multiple times in a loop, and each time it will do some work, i.e. -producing some output (in outbuf -) or consuming some input (from inbuf -) or -both. If its not possible to do any work an error is returned.

-

Note that a single call may not consume all input (or any input at all). -Also a call may produce output even if given no input, due to state stored -in the converter producing output.

-

If any data was either produced or consumed, and then an error happens, then -only the successful conversion is reported and the error is returned on the -next call.

-

A full conversion loop involves calling this method repeatedly, each time -giving it new input and space output space. When there is no more input -data after the data in inbuf -, the flag G_CONVERTER_INPUT_AT_END must be set. -The loop will be (unless some error happens) returning G_CONVERTER_CONVERTED -each time until all data is consumed and all output is produced, then -G_CONVERTER_FINISHED is returned instead. Note, that G_CONVERTER_FINISHED -may be returned even if G_CONVERTER_INPUT_AT_END is not set, for instance -in a decompression converter where the end of data is detectable from the -data (and there might even be other data after the end of the compressed data).

-

When some data has successfully been converted bytes_read - and is set to -the number of bytes read from inbuf -, and bytes_written - is set to indicate -how many bytes was written to outbuf -. If there are more data to output -or consume (i.e. unless the G_CONVERTER_INPUT_AT_END is specified) then -G_CONVERTER_CONVERTED is returned, and if no more data is to be output -then G_CONVERTER_FINISHED is returned.

-

On error G_CONVERTER_ERROR is returned and error - is set accordingly. -Some errors need special handling:

-

G_IO_ERROR_NO_SPACE is returned if there is not enough space -to write the resulting converted data, the application should -call the function again with a larger outbuf - to continue.

-

G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough -input to fully determine what the conversion should produce, -and the G_CONVERTER_INPUT_AT_END flag is not set. This happens for -example with an incomplete multibyte sequence when converting text, -or when a regexp matches up to the end of the input (and may match -further input). It may also happen when inbuf_size - is zero and -there is no more data to produce.

-

When this happens the application should read more input and then -call the function again. If further input shows that there is no -more data call the function again with the same data but with -the G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion -to finish as e.g. in the regexp match case (or, to fail again with -G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the -input is actually partial).

-

After g_converter_convert() has returned G_CONVERTER_FINISHED the -converter object is in an invalid state where its not allowed -to call g_converter_convert() anymore. At this time you can only -free the object or call g_converter_reset() to reset it to the -initial state.

-

If the flag G_CONVERTER_FLUSH is set then conversion is modified -to try to write out all internal state to the output. The application -has to call the function multiple times with the flag set, and when -the available input has been consumed and all internal state has -been produced then G_CONVERTER_FLUSHED (or G_CONVERTER_FINISHED if -really at the end) is returned instead of G_CONVERTER_CONVERTED. -This is somewhat similar to what happens at the end of the input stream, -but done in the middle of the data.

-

This has different meanings for different conversions. For instance -in a compression converter it would mean that we flush all the -compression state into output such that if you uncompress the -compressed data you get back all the input data. Doing this may -make the final file larger due to padding though. Another example -is a regexp conversion, where if you at the end of the flushed data -have a match, but there is also a potential longer match. In the -non-flushed case we would ask for more input, but when flushing we -treat this as the end of input and do the match.

-

Flushing is not always possible (like if a charset converter flushes -at a partial multibyte sequence). Converters are supposed to try -to produce as much output as possible and then return an error -(typically G_IO_ERROR_PARTIAL_INPUT).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

converter

a GConverter.

 

inbuf

the buffer -containing the data to convert.

[array length=inbuf_size][element-type guint8]

inbuf_size

the number of bytes in inbuf -

 

outbuf

a buffer to write -converted data in.

[element-type guint8][array length=outbuf_size]

outbuf_size

the number of bytes in outbuf -, must be at least one

 

flags

a GConverterFlags controlling the conversion details

 

bytes_read

will be set to the number of bytes read from inbuf -on success.

[out]

bytes_written

will be set to the number of bytes written to outbuf -on success.

[out]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

a GConverterResult, G_CONVERTER_ERROR on error.

-
-

Since: 2.24

-
-
-
-

g_converter_reset ()

-
void
-g_converter_reset (GConverter *converter);
-

Resets all internal state in the converter, making it behave -as if it was just created. If the converter has any internal -state that would produce output then that output is lost.

-
-

Parameters

-
----- - - - - - -

converter

a GConverter.

 
-
-

Since: 2.24

-
-
-
-

Types and Values

-
-

GConverter

-
typedef struct _GConverter GConverter;
-

Seek object for streaming operations.

-

Since: 2.24

-
-
-
-

struct GConverterIface

-
struct GConverterIface {
-  GTypeInterface g_iface;
-
-  /* Virtual Table */
-
-  GConverterResult (* convert) (GConverter *converter,
-				const void *inbuf,
-				gsize       inbuf_size,
-				void       *outbuf,
-				gsize       outbuf_size,
-				GConverterFlags flags,
-				gsize      *bytes_read,
-				gsize      *bytes_written,
-				GError    **error);
-  void  (* reset)   (GConverter *converter);
-};
-
-

Provides an interface for converting data from one type -to another type. The conversion can be stateful -and may fail at any place.

-
-

Members

-
----- - - - - - - - - - - - - -

convert ()

Converts data.

 

reset ()

Reverts the internal state of the converter to its initial state.

 
-
-

Since: 2.24

-
-
-
-

enum GConverterResult

-

Results returned from g_converter_convert().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_CONVERTER_ERROR

-

There was an error during conversion.

-
 

G_CONVERTER_CONVERTED

-

Some data was consumed or produced

-
 

G_CONVERTER_FINISHED

-

The conversion is finished

-
 

G_CONVERTER_FLUSHED

-

Flushing is finished

-
 
-
-

Since: 2.24

-
-
-
-

enum GConverterFlags

-

Flags used when calling a g_converter_convert().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_CONVERTER_NO_FLAGS

-

No flags.

-
 

G_CONVERTER_INPUT_AT_END

-

At end of input data

-
 

G_CONVERTER_FLUSH

-

Flush data

-
 
-
-

Since: 2.24

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GCredentials.html b/docs/reference/gio/html/GCredentials.html deleted file mode 100644 index a56aede1c..000000000 --- a/docs/reference/gio/html/GCredentials.html +++ /dev/null @@ -1,557 +0,0 @@ - - - - -GCredentials: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GCredentials

-

GCredentials — An object containing credentials

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GCredentials * - -g_credentials_new () -
-gchar * - -g_credentials_to_string () -
-gpointer - -g_credentials_get_native () -
-void - -g_credentials_set_native () -
-gboolean - -g_credentials_is_same_user () -
-uid_t - -g_credentials_get_unix_user () -
-gboolean - -g_credentials_set_unix_user () -
-pid_t - -g_credentials_get_unix_pid () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GCredentials
enumGCredentialsType
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GCredentials
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

The GCredentials type is a reference-counted wrapper for native -credentials. This information is typically used for identifying, -authenticating and authorizing other processes.

-

Some operating systems supports looking up the credentials of the -remote peer of a communication endpoint - see e.g. -g_socket_get_credentials().

-

Some operating systems supports securely sending and receiving -credentials over a Unix Domain Socket, see -GUnixCredentialsMessage, g_unix_connection_send_credentials() and -g_unix_connection_receive_credentials() for details.

-

On Linux, the native credential type is a struct ucred - see the -unix(7) man page for details. This corresponds to -G_CREDENTIALS_TYPE_LINUX_UCRED.

-

On FreeBSD, Debian GNU/kFreeBSD, and GNU/Hurd, the native -credential type is a struct cmsgcred. This corresponds -to G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED.

-

On NetBSD, the native credential type is a struct unpcbid. -This corresponds to G_CREDENTIALS_TYPE_NETBSD_UNPCBID.

-

On OpenBSD, the native credential type is a struct sockpeercred. -This corresponds to G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED.

-

On Solaris (including OpenSolaris and its derivatives), the native -credential type is a ucred_t. This corresponds to -G_CREDENTIALS_TYPE_SOLARIS_UCRED.

-
-
-

Functions

-
-

g_credentials_new ()

-
GCredentials *
-g_credentials_new (void);
-

Creates a new GCredentials object with credentials matching the -the current process.

-
-

Returns

-

A GCredentials. Free with g_object_unref().

-
-

Since: 2.26

-
-
-
-

g_credentials_to_string ()

-
gchar *
-g_credentials_to_string (GCredentials *credentials);
-

Creates a human-readable textual representation of credentials - -that can be used in logging and debug messages. The format of the -returned string may change in future GLib release.

-
-

Parameters

-
----- - - - - - -

credentials

A GCredentials object.

 
-
-
-

Returns

-

A string that should be freed with g_free().

-
-

Since: 2.26

-
-
-
-

g_credentials_get_native ()

-
gpointer
-g_credentials_get_native (GCredentials *credentials,
-                          GCredentialsType native_type);
-

Gets a pointer to native credentials of type native_type - from -credentials -.

-

It is a programming error (which will cause an warning to be -logged) to use this method if there is no GCredentials support for -the OS or if native_type - isn't supported by the OS.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

credentials

A GCredentials.

 

native_type

The type of native credentials to get.

 
-
-
-

Returns

-

The pointer to native credentials or NULL if the -operation there is no GCredentials support for the OS or if -native_type -isn't supported by the OS. Do not free the returned -data, it is owned by credentials -.

-
-

Since: 2.26

-
-
-
-

g_credentials_set_native ()

-
void
-g_credentials_set_native (GCredentials *credentials,
-                          GCredentialsType native_type,
-                          gpointer native);
-

Copies the native credentials of type native_type - from native - -into credentials -.

-

It is a programming error (which will cause an warning to be -logged) to use this method if there is no GCredentials support for -the OS or if native_type - isn't supported by the OS.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

credentials

A GCredentials.

 

native_type

The type of native credentials to set.

 

native

A pointer to native credentials.

[not nullable]
-
-

Since: 2.26

-
-
-
-

g_credentials_is_same_user ()

-
gboolean
-g_credentials_is_same_user (GCredentials *credentials,
-                            GCredentials *other_credentials,
-                            GError **error);
-

Checks if credentials - and other_credentials - is the same user.

-

This operation can fail if GCredentials is not supported on the -the OS.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

credentials

A GCredentials.

 

other_credentials

A GCredentials.

 

error

Return location for error or NULL.

 
-
-
-

Returns

-

TRUE if credentials -and other_credentials -has the same -user, FALSE otherwise or if error -is set.

-
-

Since: 2.26

-
-
-
-

g_credentials_get_unix_user ()

-
uid_t
-g_credentials_get_unix_user (GCredentials *credentials,
-                             GError **error);
-

Tries to get the UNIX user identifier from credentials -. This -method is only available on UNIX platforms.

-

This operation can fail if GCredentials is not supported on the -OS or if the native credentials type does not contain information -about the UNIX user.

-
-

Parameters

-
----- - - - - - - - - - - - - -

credentials

A GCredentials

 

error

Return location for error or NULL.

 
-
-
-

Returns

-

The UNIX user identifier or -1 if error -is set.

-
-

Since: 2.26

-
-
-
-

g_credentials_set_unix_user ()

-
gboolean
-g_credentials_set_unix_user (GCredentials *credentials,
-                             uid_t uid,
-                             GError **error);
-

Tries to set the UNIX user identifier on credentials -. This method -is only available on UNIX platforms.

-

This operation can fail if GCredentials is not supported on the -OS or if the native credentials type does not contain information -about the UNIX user. It can also fail if the OS does not allow the -use of "spoofed" credentials.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

credentials

A GCredentials.

 

uid

The UNIX user identifier to set.

 

error

Return location for error or NULL.

 
-
-
-

Returns

-

TRUE if uid -was set, FALSE if error is set.

-
-

Since: 2.26

-
-
-
-

g_credentials_get_unix_pid ()

-
pid_t
-g_credentials_get_unix_pid (GCredentials *credentials,
-                            GError **error);
-

Tries to get the UNIX process identifier from credentials -. This -method is only available on UNIX platforms.

-

This operation can fail if GCredentials is not supported on the -OS or if the native credentials type does not contain information -about the UNIX process ID.

-
-

Parameters

-
----- - - - - - - - - - - - - -

credentials

A GCredentials

 

error

Return location for error or NULL.

 
-
-
-

Returns

-

The UNIX process ID, or -1 if error -is set.

-
-

Since: 2.36

-
-
-
-

Types and Values

-
-

GCredentials

-
typedef struct _GCredentials GCredentials;
-

The GCredentials structure contains only private data and -should only be accessed using the provided API.

-

Since: 2.26

-
-
-
-

enum GCredentialsType

-

Enumeration describing different kinds of native credential types.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_CREDENTIALS_TYPE_INVALID

-

Indicates an invalid native credential type.

-
 

G_CREDENTIALS_TYPE_LINUX_UCRED

-

The native credentials type is a struct ucred.

-
 

G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED

-

The native credentials type is a struct cmsgcred.

-
 

G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED

-

The native credentials type is a struct sockpeercred. Added in 2.30.

-
 

G_CREDENTIALS_TYPE_SOLARIS_UCRED

-

The native credentials type is a ucred_t. Added in 2.40.

-
 

G_CREDENTIALS_TYPE_NETBSD_UNPCBID

-

The native credentials type is a struct unpcbid.

-
 
-
-

Since: 2.26

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDBusActionGroup.html b/docs/reference/gio/html/GDBusActionGroup.html deleted file mode 100644 index 2bcd22020..000000000 --- a/docs/reference/gio/html/GDBusActionGroup.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - -GDBusActionGroup: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusActionGroup

-

GDBusActionGroup — A D-Bus GActionGroup implementation

-
-
-

Functions

-
---- - - - - -
-GDBusActionGroup * - -g_dbus_action_group_get () -
-
-
-

Types and Values

-
---- - - - - -
 GDBusActionGroup
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GDBusActionGroup
-
-
-
-

Implemented Interfaces

-

-GDBusActionGroup implements - GActionGroup and GRemoteActionGroup.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GDBusActionGroup is an implementation of the GActionGroup -interface that can be used as a proxy for an action group -that is exported over D-Bus with g_dbus_connection_export_action_group().

-
-
-

Functions

-
-

g_dbus_action_group_get ()

-
GDBusActionGroup *
-g_dbus_action_group_get (GDBusConnection *connection,
-                         const gchar *bus_name,
-                         const gchar *object_path);
-

Obtains a GDBusActionGroup for the action group which is exported at -the given bus_name - and object_path -.

-

The thread default main context is taken at the time of this call. -All signals on the menu model (and any linked models) are reported -with respect to this context. All calls on the returned menu model -(and linked models) must also originate from this same context, with -the thread default main context unchanged.

-

This call is non-blocking. The returned action group may or may not -already be filled in. The correct thing to do is connect the signals -for the action group to monitor for changes and then to call -g_action_group_list_actions() to get the initial list.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

A GDBusConnection

 

bus_name

the bus name which exports the action group

 

object_path

the object path at which the action group is exported

 
-
-
-

Returns

-

a GDBusActionGroup.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

GDBusActionGroup

-
typedef struct _GDBusActionGroup GDBusActionGroup;
-

GDBusActionGroup is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

See Also

-

GActionGroup exporter

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDBusAuthObserver.html b/docs/reference/gio/html/GDBusAuthObserver.html deleted file mode 100644 index 4c7ca3ba8..000000000 --- a/docs/reference/gio/html/GDBusAuthObserver.html +++ /dev/null @@ -1,384 +0,0 @@ - - - - -GDBusAuthObserver: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusAuthObserver

-

GDBusAuthObserver — Object used for authenticating connections

-
- - -
-

Types and Values

-
---- - - - - -
 GDBusAuthObserver
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GDBusAuthObserver
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

The GDBusAuthObserver type provides a mechanism for participating -in how a GDBusServer (or a GDBusConnection) authenticates remote -peers. Simply instantiate a GDBusAuthObserver and connect to the -signals you are interested in. Note that new signals may be added -in the future

-
-

Controlling Authentication

-

For example, if you only want to allow D-Bus connections from -processes owned by the same uid as the server, you would use a -signal handler like the following:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
static gboolean
-on_authorize_authenticated_peer (GDBusAuthObserver *observer,
-                                 GIOStream         *stream,
-                                 GCredentials      *credentials,
-                                 gpointer           user_data)
-{
-  gboolean authorized;
-
-  authorized = FALSE;
-  if (credentials != NULL)
-    {
-      GCredentials *own_credentials;
-      own_credentials = g_credentials_new ();
-      if (g_credentials_is_same_user (credentials, own_credentials, NULL))
-        authorized = TRUE;
-      g_object_unref (own_credentials);
-    }
-
-  return authorized;
-}
-
- -

-
-
-
-

Functions

-
-

g_dbus_auth_observer_new ()

-
GDBusAuthObserver *
-g_dbus_auth_observer_new (void);
-

Creates a new GDBusAuthObserver object.

-
-

Returns

-

A GDBusAuthObserver. Free with g_object_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_auth_observer_authorize_authenticated_peer ()

-
gboolean
-g_dbus_auth_observer_authorize_authenticated_peer
-                               (GDBusAuthObserver *observer,
-                                GIOStream *stream,
-                                GCredentials *credentials);
-

Emits the “authorize-authenticated-peer” signal on observer -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

observer

A GDBusAuthObserver.

 

stream

A GIOStream for the GDBusConnection.

 

credentials

Credentials received from the peer or NULL.

[nullable]
-
-
-

Returns

-

TRUE if the peer is authorized, FALSE if not.

-
-

Since: 2.26

-
-
-
-

g_dbus_auth_observer_allow_mechanism ()

-
gboolean
-g_dbus_auth_observer_allow_mechanism (GDBusAuthObserver *observer,
-                                      const gchar *mechanism);
-

Emits the “allow-mechanism” signal on observer -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

observer

A GDBusAuthObserver.

 

mechanism

The name of the mechanism, e.g. DBUS_COOKIE_SHA1.

 
-
-
-

Returns

-

TRUE if mechanism -can be used to authenticate the other peer, FALSE if not.

-
-

Since: 2.34

-
-
-
-

Types and Values

-
-

GDBusAuthObserver

-
typedef struct _GDBusAuthObserver GDBusAuthObserver;
-

The GDBusAuthObserver structure contains only private data and -should only be accessed using the provided API.

-

Since: 2.26

-
-
-
-

Signal Details

-
-

The “allow-mechanism” signal

-
gboolean
-user_function (GDBusAuthObserver *observer,
-               gchar             *mechanism,
-               gpointer           user_data)
-

Emitted to check if mechanism - is allowed to be used.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

observer

The GDBusAuthObserver emitting the signal.

 

mechanism

The name of the mechanism, e.g. DBUS_COOKIE_SHA1.

 

user_data

user data set when the signal handler was connected.

 
-
-
-

Returns

-

TRUE if mechanism -can be used to authenticate the other peer, FALSE if not.

-
-

Flags: Run Last

-

Since: 2.34

-
-
-
-

The “authorize-authenticated-peer” signal

-
gboolean
-user_function (GDBusAuthObserver *observer,
-               GIOStream         *stream,
-               GCredentials      *credentials,
-               gpointer           user_data)
-

Emitted to check if a peer that is successfully authenticated -is authorized.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

observer

The GDBusAuthObserver emitting the signal.

 

stream

A GIOStream for the GDBusConnection.

 

credentials

Credentials received from the peer or NULL.

[nullable]

user_data

user data set when the signal handler was connected.

 
-
-
-

Returns

-

TRUE if the peer is authorized, FALSE if not.

-
-

Flags: Run Last

-

Since: 2.26

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDBusConnection.html b/docs/reference/gio/html/GDBusConnection.html deleted file mode 100644 index 40ab4c7e7..000000000 --- a/docs/reference/gio/html/GDBusConnection.html +++ /dev/null @@ -1,4774 +0,0 @@ - - - - -GDBusConnection: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusConnection

-

GDBusConnection — D-Bus Connections

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -g_bus_get () -
-GDBusConnection * - -g_bus_get_finish () -
-GDBusConnection * - -g_bus_get_sync () -
-void - -g_dbus_connection_new () -
-GDBusConnection * - -g_dbus_connection_new_finish () -
-GDBusConnection * - -g_dbus_connection_new_sync () -
-void - -g_dbus_connection_new_for_address () -
-GDBusConnection * - -g_dbus_connection_new_for_address_finish () -
-GDBusConnection * - -g_dbus_connection_new_for_address_sync () -
-void - -g_dbus_connection_start_message_processing () -
-void - -g_dbus_connection_close () -
-gboolean - -g_dbus_connection_close_finish () -
-gboolean - -g_dbus_connection_close_sync () -
-gboolean - -g_dbus_connection_is_closed () -
-void - -g_dbus_connection_flush () -
-gboolean - -g_dbus_connection_flush_finish () -
-gboolean - -g_dbus_connection_flush_sync () -
-gboolean - -g_dbus_connection_get_exit_on_close () -
-void - -g_dbus_connection_set_exit_on_close () -
-GIOStream * - -g_dbus_connection_get_stream () -
const gchar * - -g_dbus_connection_get_guid () -
const gchar * - -g_dbus_connection_get_unique_name () -
-GDBusCapabilityFlags - -g_dbus_connection_get_capabilities () -
-GCredentials * - -g_dbus_connection_get_peer_credentials () -
-guint32 - -g_dbus_connection_get_last_serial () -
-void - -g_dbus_connection_call () -
-GVariant * - -g_dbus_connection_call_finish () -
-GVariant * - -g_dbus_connection_call_sync () -
-void - -g_dbus_connection_call_with_unix_fd_list () -
-GVariant * - -g_dbus_connection_call_with_unix_fd_list_finish () -
-GVariant * - -g_dbus_connection_call_with_unix_fd_list_sync () -
-gboolean - -g_dbus_connection_emit_signal () -
-void - -(*GDBusSignalCallback) () -
-guint - -g_dbus_connection_signal_subscribe () -
-void - -g_dbus_connection_signal_unsubscribe () -
-gboolean - -g_dbus_connection_send_message () -
-void - -g_dbus_connection_send_message_with_reply () -
-GDBusMessage * - -g_dbus_connection_send_message_with_reply_finish () -
-GDBusMessage * - -g_dbus_connection_send_message_with_reply_sync () -
-GDBusMessage * - -(*GDBusMessageFilterFunction) () -
-guint - -g_dbus_connection_add_filter () -
-void - -g_dbus_connection_remove_filter () -
-void - -(*GDBusInterfaceMethodCallFunc) () -
-GVariant * - -(*GDBusInterfaceGetPropertyFunc) () -
-gboolean - -(*GDBusInterfaceSetPropertyFunc) () -
-guint - -g_dbus_connection_register_object () -
-gboolean - -g_dbus_connection_unregister_object () -
-guint - -g_dbus_connection_register_object_with_closures () -
-gchar ** - -(*GDBusSubtreeEnumerateFunc) () -
-GDBusInterfaceInfo ** - -(*GDBusSubtreeIntrospectFunc) () -
const GDBusInterfaceVTable * - -(*GDBusSubtreeDispatchFunc) () -
-guint - -g_dbus_connection_register_subtree () -
-gboolean - -g_dbus_connection_unregister_subtree () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gchar *addressWrite / Construct Only
-GDBusAuthObserver *authentication-observerWrite / Construct Only
GDBusCapabilityFlagscapabilitiesRead
gbooleanclosedRead
gbooleanexit-on-closeRead / Write
GDBusConnectionFlagsflagsWrite / Construct Only
-gchar *guidRead / Write / Construct Only
-GIOStream *streamRead / Write / Construct Only
-gchar *unique-nameRead
-
-
-

Signals

-
----- - - - - - -
voidclosedRun Last
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
enumGBusType
 GDBusConnection
enumGDBusConnectionFlags
enumGDBusCapabilityFlags
enumGDBusCallFlags
enumGDBusSignalFlags
enumGDBusSendMessageFlags
 GDBusInterfaceVTable
 GDBusSubtreeVTable
enumGDBusSubtreeFlags
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GDBusConnection
-
-
-
-

Implemented Interfaces

-

-GDBusConnection implements - GInitable and GAsyncInitable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

The GDBusConnection type is used for D-Bus connections to remote -peers such as a message buses. It is a low-level API that offers a -lot of flexibility. For instance, it lets you establish a connection -over any transport that can by represented as an GIOStream.

-

This class is rarely used directly in D-Bus clients. If you are writing -a D-Bus client, it is often easier to use the g_bus_own_name(), -g_bus_watch_name() or g_dbus_proxy_new_for_bus() APIs.

-

As an exception to the usual GLib rule that a particular object must not -be used by two threads at the same time, GDBusConnection's methods may be -called from any thread. This is so that g_bus_get() and g_bus_get_sync() -can safely return the same GDBusConnection when called from any thread.

-

Most of the ways to obtain a GDBusConnection automatically initialize it -(i.e. connect to D-Bus): for instance, g_dbus_connection_new() and -g_bus_get(), and the synchronous versions of those methods, give you an -initialized connection. Language bindings for GIO should use -g_initable_new() or g_async_initable_new_async(), which also initialize the -connection.

-

If you construct an uninitialized GDBusConnection, such as via -g_object_new(), you must initialize it via g_initable_init() or -g_async_initable_init_async() before using its methods or properties. -Calling methods or accessing properties on a GDBusConnection that has not -completed initialization successfully is considered to be invalid, and leads -to undefined behaviour. In particular, if initialization fails with a -GError, the only valid thing you can do with that GDBusConnection is to -free it with g_object_unref().

-
-

An example D-Bus server

-

Here is an example for a D-Bus server: -gdbus-example-server.c

-
-
-

An example for exporting a subtree

-

Here is an example for exporting a subtree: -gdbus-example-subtree.c

-
-
-

An example for file descriptor passing

-

Here is an example for passing UNIX file descriptors: -gdbus-unix-fd-client.c

-
-
-

An example for exporting a GObject

-

Here is an example for exporting a GObject: -gdbus-example-export.c

-
-
-
-

Functions

-
-

g_bus_get ()

-
void
-g_bus_get (GBusType bus_type,
-           GCancellable *cancellable,
-           GAsyncReadyCallback callback,
-           gpointer user_data);
-

Asynchronously connects to the message bus specified by bus_type -.

-

When the operation is finished, callback - will be invoked. You can -then call g_bus_get_finish() to get the result of the operation.

-

This is a asynchronous failable function. See g_bus_get_sync() for -the synchronous version.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

bus_type

a GBusType

 

cancellable

a GCancellable or NULL.

[nullable]

callback

a GAsyncReadyCallback to call when the request is satisfied

 

user_data

the data to pass to callback -

 
-
-

Since: 2.26

-
-
-
-

g_bus_get_finish ()

-
GDBusConnection *
-g_bus_get_finish (GAsyncResult *res,
-                  GError **error);
-

Finishes an operation started with g_bus_get().

-

The returned object is a singleton, that is, shared with other -callers of g_bus_get() and g_bus_get_sync() for bus_type -. In the -event that you need a private message bus connection, use -g_dbus_address_get_for_bus_sync() and -g_dbus_connection_new_for_address().

-

Note that the returned GDBusConnection object will (usually) have -the “exit-on-close” property set to TRUE.

-
-

Parameters

-
----- - - - - - - - - - - - - -

res

a GAsyncResult obtained from the GAsyncReadyCallback passed -to g_bus_get()

 

error

return location for error or NULL

 
-
-
-

Returns

-

a GDBusConnection or NULL if error -is set. -Free with g_object_unref().

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_bus_get_sync ()

-
GDBusConnection *
-g_bus_get_sync (GBusType bus_type,
-                GCancellable *cancellable,
-                GError **error);
-

Synchronously connects to the message bus specified by bus_type -. -Note that the returned object may shared with other callers, -e.g. if two separate parts of a process calls this function with -the same bus_type -, they will share the same object.

-

This is a synchronous failable function. See g_bus_get() and -g_bus_get_finish() for the asynchronous version.

-

The returned object is a singleton, that is, shared with other -callers of g_bus_get() and g_bus_get_sync() for bus_type -. In the -event that you need a private message bus connection, use -g_dbus_address_get_for_bus_sync() and -g_dbus_connection_new_for_address().

-

Note that the returned GDBusConnection object will (usually) have -the “exit-on-close” property set to TRUE.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bus_type

a GBusType

 

cancellable

a GCancellable or NULL.

[nullable]

error

return location for error or NULL

 
-
-
-

Returns

-

a GDBusConnection or NULL if error -is set. -Free with g_object_unref().

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_new ()

-
void
-g_dbus_connection_new (GIOStream *stream,
-                       const gchar *guid,
-                       GDBusConnectionFlags flags,
-                       GDBusAuthObserver *observer,
-                       GCancellable *cancellable,
-                       GAsyncReadyCallback callback,
-                       gpointer user_data);
-

Asynchronously sets up a D-Bus connection for exchanging D-Bus messages -with the end represented by stream -.

-

If stream - is a GSocketConnection, then the corresponding GSocket -will be put into non-blocking mode.

-

The D-Bus connection will interact with stream - from a worker thread. -As a result, the caller should not interact with stream - after this -method has been called, except by calling g_object_unref() on it.

-

If observer - is not NULL it may be used to control the -authentication process.

-

When the operation is finished, callback - will be invoked. You can -then call g_dbus_connection_new_finish() to get the result of the -operation.

-

This is a asynchronous failable constructor. See -g_dbus_connection_new_sync() for the synchronous -version.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GIOStream

 

guid

the GUID to use if a authenticating as a server or NULL.

[nullable]

flags

flags describing how to make the connection

 

observer

a GDBusAuthObserver or NULL.

[nullable]

cancellable

a GCancellable or NULL.

[nullable]

callback

a GAsyncReadyCallback to call when the request is satisfied

 

user_data

the data to pass to callback -

 
-
-

Since: 2.26

-
-
-
-

g_dbus_connection_new_finish ()

-
GDBusConnection *
-g_dbus_connection_new_finish (GAsyncResult *res,
-                              GError **error);
-

Finishes an operation started with g_dbus_connection_new().

-
-

Parameters

-
----- - - - - - - - - - - - - -

res

a GAsyncResult obtained from the GAsyncReadyCallback -passed to g_dbus_connection_new().

 

error

return location for error or NULL

 
-
-
-

Returns

-

a GDBusConnection or NULL if error -is set. Free -with g_object_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_new_sync ()

-
GDBusConnection *
-g_dbus_connection_new_sync (GIOStream *stream,
-                            const gchar *guid,
-                            GDBusConnectionFlags flags,
-                            GDBusAuthObserver *observer,
-                            GCancellable *cancellable,
-                            GError **error);
-

Synchronously sets up a D-Bus connection for exchanging D-Bus messages -with the end represented by stream -.

-

If stream - is a GSocketConnection, then the corresponding GSocket -will be put into non-blocking mode.

-

The D-Bus connection will interact with stream - from a worker thread. -As a result, the caller should not interact with stream - after this -method has been called, except by calling g_object_unref() on it.

-

If observer - is not NULL it may be used to control the -authentication process.

-

This is a synchronous failable constructor. See -g_dbus_connection_new() for the asynchronous version.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GIOStream

 

guid

the GUID to use if a authenticating as a server or NULL.

[nullable]

flags

flags describing how to make the connection

 

observer

a GDBusAuthObserver or NULL.

[nullable]

cancellable

a GCancellable or NULL.

[nullable]

error

return location for error or NULL

 
-
-
-

Returns

-

a GDBusConnection or NULL if error -is set. Free with g_object_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_new_for_address ()

-
void
-g_dbus_connection_new_for_address (const gchar *address,
-                                   GDBusConnectionFlags flags,
-                                   GDBusAuthObserver *observer,
-                                   GCancellable *cancellable,
-                                   GAsyncReadyCallback callback,
-                                   gpointer user_data);
-

Asynchronously connects and sets up a D-Bus client connection for -exchanging D-Bus messages with an endpoint specified by address - -which must be in the -D-Bus address format.

-

This constructor can only be used to initiate client-side -connections - use g_dbus_connection_new() if you need to act as the -server. In particular, flags - cannot contain the -G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or -G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.

-

When the operation is finished, callback - will be invoked. You can -then call g_dbus_connection_new_finish() to get the result of the -operation.

-

If observer - is not NULL it may be used to control the -authentication process.

-

This is a asynchronous failable constructor. See -g_dbus_connection_new_for_address_sync() for the synchronous -version.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

address

a D-Bus address

 

flags

flags describing how to make the connection

 

observer

a GDBusAuthObserver or NULL.

[nullable]

cancellable

a GCancellable or NULL.

[nullable]

callback

a GAsyncReadyCallback to call when the request is satisfied

 

user_data

the data to pass to callback -

 
-
-

Since: 2.26

-
-
-
-

g_dbus_connection_new_for_address_finish ()

-
GDBusConnection *
-g_dbus_connection_new_for_address_finish
-                               (GAsyncResult *res,
-                                GError **error);
-

Finishes an operation started with g_dbus_connection_new_for_address().

-
-

Parameters

-
----- - - - - - - - - - - - - -

res

a GAsyncResult obtained from the GAsyncReadyCallback passed -to g_dbus_connection_new()

 

error

return location for error or NULL

 
-
-
-

Returns

-

a GDBusConnection or NULL if error -is set. Free with -g_object_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_new_for_address_sync ()

-
GDBusConnection *
-g_dbus_connection_new_for_address_sync
-                               (const gchar *address,
-                                GDBusConnectionFlags flags,
-                                GDBusAuthObserver *observer,
-                                GCancellable *cancellable,
-                                GError **error);
-

Synchronously connects and sets up a D-Bus client connection for -exchanging D-Bus messages with an endpoint specified by address - -which must be in the -D-Bus address format.

-

This constructor can only be used to initiate client-side -connections - use g_dbus_connection_new_sync() if you need to act -as the server. In particular, flags - cannot contain the -G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or -G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags.

-

This is a synchronous failable constructor. See -g_dbus_connection_new_for_address() for the asynchronous version.

-

If observer - is not NULL it may be used to control the -authentication process.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

address

a D-Bus address

 

flags

flags describing how to make the connection

 

observer

a GDBusAuthObserver or NULL.

[nullable]

cancellable

a GCancellable or NULL.

[nullable]

error

return location for error or NULL

 
-
-
-

Returns

-

a GDBusConnection or NULL if error -is set. Free with -g_object_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_start_message_processing ()

-
void
-g_dbus_connection_start_message_processing
-                               (GDBusConnection *connection);
-

If connection - was created with -G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method -starts processing messages. Does nothing on if connection - wasn't -created with this flag or if the method has already been called.

-
-

Parameters

-
----- - - - - - -

connection

a GDBusConnection

 
-
-

Since: 2.26

-
-
-
-

g_dbus_connection_close ()

-
void
-g_dbus_connection_close (GDBusConnection *connection,
-                         GCancellable *cancellable,
-                         GAsyncReadyCallback callback,
-                         gpointer user_data);
-

Closes connection -. Note that this never causes the process to -exit (this might only happen if the other end of a shared message -bus connection disconnects, see “exit-on-close”).

-

Once the connection is closed, operations such as sending a message -will return with the error G_IO_ERROR_CLOSED. Closing a connection -will not automatically flush the connection so queued messages may -be lost. Use g_dbus_connection_flush() if you need such guarantees.

-

If connection - is already closed, this method fails with -G_IO_ERROR_CLOSED.

-

When connection - has been closed, the “closed” -signal is emitted in the -thread-default main context -of the thread that connection - was constructed in.

-

This is an asynchronous method. When the operation is finished, -callback - will be invoked in the -thread-default main context -of the thread you are calling this method from. You can -then call g_dbus_connection_close_finish() to get the result of the -operation. See g_dbus_connection_close_sync() for the synchronous -version.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

cancellable

a GCancellable or NULL.

[nullable]

callback

a GAsyncReadyCallback to call when the request is -satisfied or NULL if you don't care about the result.

[nullable]

user_data

The data to pass to callback -

 
-
-

Since: 2.26

-
-
-
-

g_dbus_connection_close_finish ()

-
gboolean
-g_dbus_connection_close_finish (GDBusConnection *connection,
-                                GAsyncResult *res,
-                                GError **error);
-

Finishes an operation started with g_dbus_connection_close().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

res

a GAsyncResult obtained from the GAsyncReadyCallback passed -to g_dbus_connection_close()

 

error

return location for error or NULL

 
-
-
-

Returns

-

TRUE if the operation succeeded, FALSE if error -is set

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_close_sync ()

-
gboolean
-g_dbus_connection_close_sync (GDBusConnection *connection,
-                              GCancellable *cancellable,
-                              GError **error);
-

Synchronously closees connection -. The calling thread is blocked -until this is done. See g_dbus_connection_close() for the -asynchronous version of this method and more details about what it -does.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

cancellable

a GCancellable or NULL.

[nullable]

error

return location for error or NULL

 
-
-
-

Returns

-

TRUE if the operation succeeded, FALSE if error -is set

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_is_closed ()

-
gboolean
-g_dbus_connection_is_closed (GDBusConnection *connection);
-

Gets whether connection - is closed.

-
-

Parameters

-
----- - - - - - -

connection

a GDBusConnection

 
-
-
-

Returns

-

TRUE if the connection is closed, FALSE otherwise

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_flush ()

-
void
-g_dbus_connection_flush (GDBusConnection *connection,
-                         GCancellable *cancellable,
-                         GAsyncReadyCallback callback,
-                         gpointer user_data);
-

Asynchronously flushes connection -, that is, writes all queued -outgoing message to the transport and then flushes the transport -(using g_output_stream_flush_async()). This is useful in programs -that wants to emit a D-Bus signal and then exit immediately. Without -flushing the connection, there is no guaranteed that the message has -been sent to the networking buffers in the OS kernel.

-

This is an asynchronous method. When the operation is finished, -callback - will be invoked in the -thread-default main context -of the thread you are calling this method from. You can -then call g_dbus_connection_flush_finish() to get the result of the -operation. See g_dbus_connection_flush_sync() for the synchronous -version.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

cancellable

a GCancellable or NULL.

[nullable]

callback

a GAsyncReadyCallback to call when the -request is satisfied or NULL if you don't care about the result.

[nullable]

user_data

The data to pass to callback -

 
-
-

Since: 2.26

-
-
-
-

g_dbus_connection_flush_finish ()

-
gboolean
-g_dbus_connection_flush_finish (GDBusConnection *connection,
-                                GAsyncResult *res,
-                                GError **error);
-

Finishes an operation started with g_dbus_connection_flush().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

res

a GAsyncResult obtained from the GAsyncReadyCallback passed -to g_dbus_connection_flush()

 

error

return location for error or NULL

 
-
-
-

Returns

-

TRUE if the operation succeeded, FALSE if error -is set

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_flush_sync ()

-
gboolean
-g_dbus_connection_flush_sync (GDBusConnection *connection,
-                              GCancellable *cancellable,
-                              GError **error);
-

Synchronously flushes connection -. The calling thread is blocked -until this is done. See g_dbus_connection_flush() for the -asynchronous version of this method and more details about what it -does.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

cancellable

a GCancellable or NULL.

[nullable]

error

return location for error or NULL

 
-
-
-

Returns

-

TRUE if the operation succeeded, FALSE if error -is set

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_get_exit_on_close ()

-
gboolean
-g_dbus_connection_get_exit_on_close (GDBusConnection *connection);
-

Gets whether the process is terminated when connection - is -closed by the remote peer. See -“exit-on-close” for more details.

-
-

Parameters

-
----- - - - - - -

connection

a GDBusConnection

 
-
-
-

Returns

-

whether the process is terminated when connection -is -closed by the remote peer

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_set_exit_on_close ()

-
void
-g_dbus_connection_set_exit_on_close (GDBusConnection *connection,
-                                     gboolean exit_on_close);
-

Sets whether the process should be terminated when connection - is -closed by the remote peer. See “exit-on-close” for -more details.

-

Note that this function should be used with care. Most modern UNIX -desktops tie the notion of a user session the session bus, and expect -all of a users applications to quit when their bus connection goes away. -If you are setting exit_on_close - to FALSE for the shared session -bus connection, you should make sure that your application exits -when the user session ends.

-
-

Parameters

-
----- - - - - - - - - - - - - -

connection

a GDBusConnection

 

exit_on_close

whether the process should be terminated -when connection -is closed by the remote peer

 
-
-

Since: 2.26

-
-
-
-

g_dbus_connection_get_stream ()

-
GIOStream *
-g_dbus_connection_get_stream (GDBusConnection *connection);
-

Gets the underlying stream used for IO.

-

While the GDBusConnection is active, it will interact with this -stream from a worker thread, so it is not safe to interact with -the stream directly.

-
-

Parameters

-
----- - - - - - -

connection

a GDBusConnection

 
-
-
-

Returns

-

the stream used for IO.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_get_guid ()

-
const gchar *
-g_dbus_connection_get_guid (GDBusConnection *connection);
-

The GUID of the peer performing the role of server when -authenticating. See “guid” for more details.

-
-

Parameters

-
----- - - - - - -

connection

a GDBusConnection

 
-
-
-

Returns

-

The GUID. Do not free this string, it is owned by -connection -.

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_get_unique_name ()

-
const gchar *
-g_dbus_connection_get_unique_name (GDBusConnection *connection);
-

Gets the unique name of connection - as assigned by the message -bus. This can also be used to figure out if connection - is a -message bus connection.

-
-

Parameters

-
----- - - - - - -

connection

a GDBusConnection

 
-
-
-

Returns

-

the unique name or NULL if connection -is not a message -bus connection. Do not free this string, it is owned by -connection -.

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_get_capabilities ()

-
GDBusCapabilityFlags
-g_dbus_connection_get_capabilities (GDBusConnection *connection);
-

Gets the capabilities negotiated with the remote peer

-
-

Parameters

-
----- - - - - - -

connection

a GDBusConnection

 
-
-
-

Returns

-

zero or more flags from the GDBusCapabilityFlags enumeration

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_get_peer_credentials ()

-
GCredentials *
-g_dbus_connection_get_peer_credentials
-                               (GDBusConnection *connection);
-

Gets the credentials of the authenticated peer. This will always -return NULL unless connection - acted as a server -(e.g. G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed) -when set up and the client passed credentials as part of the -authentication process.

-

In a message bus setup, the message bus is always the server and -each application is a client. So this method will always return -NULL for message bus clients.

-
-

Parameters

-
----- - - - - - -

connection

a GDBusConnection

 
-
-
-

Returns

-

a GCredentials or NULL if not -available. Do not free this object, it is owned by connection -.

-

[transfer none][nullable]

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_get_last_serial ()

-
guint32
-g_dbus_connection_get_last_serial (GDBusConnection *connection);
-

Retrieves the last serial number assigned to a GDBusMessage on -the current thread. This includes messages sent via both low-level -API such as g_dbus_connection_send_message() as well as -high-level API such as g_dbus_connection_emit_signal(), -g_dbus_connection_call() or g_dbus_proxy_call().

-
-

Parameters

-
----- - - - - - -

connection

a GDBusConnection

 
-
-
-

Returns

-

the last used serial or zero when no message has been sent -within the current thread

-
-

Since: 2.34

-
-
-
-

g_dbus_connection_call ()

-
void
-g_dbus_connection_call (GDBusConnection *connection,
-                        const gchar *bus_name,
-                        const gchar *object_path,
-                        const gchar *interface_name,
-                        const gchar *method_name,
-                        GVariant *parameters,
-                        const GVariantType *reply_type,
-                        GDBusCallFlags flags,
-                        gint timeout_msec,
-                        GCancellable *cancellable,
-                        GAsyncReadyCallback callback,
-                        gpointer user_data);
-

Asynchronously invokes the method_name - method on the -interface_name - D-Bus interface on the remote object at -object_path - owned by bus_name -.

-

If connection - is closed then the operation will fail with -G_IO_ERROR_CLOSED. If cancellable - is canceled, the operation will -fail with G_IO_ERROR_CANCELLED. If parameters - contains a value -not compatible with the D-Bus protocol, the operation fails with -G_IO_ERROR_INVALID_ARGUMENT.

-

If reply_type - is non-NULL then the reply will be checked for having this type and an -error will be raised if it does not match. Said another way, if you give a reply_type - -then any non-NULL return value will be of this type.

-

If the parameters - GVariant is floating, it is consumed. This allows -convenient 'inline' use of g_variant_new(), e.g.:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
g_dbus_connection_call (connection,
-                        "org.freedesktop.StringThings",
-                        "/org/freedesktop/StringThings",
-                        "org.freedesktop.StringThings",
-                        "TwoStrings",
-                        g_variant_new ("(ss)",
-                                       "Thing One",
-                                       "Thing Two"),
-                        NULL,
-                        G_DBUS_CALL_FLAGS_NONE,
-                        -1,
-                        NULL,
-                        (GAsyncReadyCallback) two_strings_done,
-                        NULL);
-
- -

-

This is an asynchronous method. When the operation is finished, -callback - will be invoked in the -thread-default main context -of the thread you are calling this method from. You can then call -g_dbus_connection_call_finish() to get the result of the operation. -See g_dbus_connection_call_sync() for the synchronous version of this -function.

-

If callback - is NULL then the D-Bus method call message will be sent with -the G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

bus_name

a unique or well-known bus name or NULL if -connection -is not a message bus connection.

[nullable]

object_path

path of remote object

 

interface_name

D-Bus interface to invoke method on

 

method_name

the name of the method to invoke

 

parameters

a GVariant tuple with parameters for the method -or NULL if not passing parameters.

[nullable]

reply_type

the expected type of the reply, or NULL.

[nullable]

flags

flags from the GDBusCallFlags enumeration

 

timeout_msec

the timeout in milliseconds, -1 to use the default -timeout or G_MAXINT for no timeout

 

cancellable

a GCancellable or NULL.

[nullable]

callback

a GAsyncReadyCallback to call when the request -is satisfied or NULL if you don't care about the result of the -method invocation.

[nullable]

user_data

the data to pass to callback -

 
-
-

Since: 2.26

-
-
-
-

g_dbus_connection_call_finish ()

-
GVariant *
-g_dbus_connection_call_finish (GDBusConnection *connection,
-                               GAsyncResult *res,
-                               GError **error);
-

Finishes an operation started with g_dbus_connection_call().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

res

a GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_connection_call()

 

error

return location for error or NULL

 
-
-
-

Returns

-

NULL if error -is set. Otherwise a GVariant tuple with -return values. Free with g_variant_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_call_sync ()

-
GVariant *
-g_dbus_connection_call_sync (GDBusConnection *connection,
-                             const gchar *bus_name,
-                             const gchar *object_path,
-                             const gchar *interface_name,
-                             const gchar *method_name,
-                             GVariant *parameters,
-                             const GVariantType *reply_type,
-                             GDBusCallFlags flags,
-                             gint timeout_msec,
-                             GCancellable *cancellable,
-                             GError **error);
-

Synchronously invokes the method_name - method on the -interface_name - D-Bus interface on the remote object at -object_path - owned by bus_name -.

-

If connection - is closed then the operation will fail with -G_IO_ERROR_CLOSED. If cancellable - is canceled, the -operation will fail with G_IO_ERROR_CANCELLED. If parameters - -contains a value not compatible with the D-Bus protocol, the operation -fails with G_IO_ERROR_INVALID_ARGUMENT.

-

If reply_type - is non-NULL then the reply will be checked for having -this type and an error will be raised if it does not match. Said -another way, if you give a reply_type - then any non-NULL return -value will be of this type.

-

If the parameters - GVariant is floating, it is consumed. -This allows convenient 'inline' use of g_variant_new(), e.g.:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
g_dbus_connection_call_sync (connection,
-                             "org.freedesktop.StringThings",
-                             "/org/freedesktop/StringThings",
-                             "org.freedesktop.StringThings",
-                             "TwoStrings",
-                             g_variant_new ("(ss)",
-                                            "Thing One",
-                                            "Thing Two"),
-                             NULL,
-                             G_DBUS_CALL_FLAGS_NONE,
-                             -1,
-                             NULL,
-                             &error);
-
- -

-

The calling thread is blocked until a reply is received. See -g_dbus_connection_call() for the asynchronous version of -this method.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

bus_name

a unique or well-known bus name or NULL if -connection -is not a message bus connection.

[nullable]

object_path

path of remote object

 

interface_name

D-Bus interface to invoke method on

 

method_name

the name of the method to invoke

 

parameters

a GVariant tuple with parameters for the method -or NULL if not passing parameters.

[nullable]

reply_type

the expected type of the reply, or NULL.

[nullable]

flags

flags from the GDBusCallFlags enumeration

 

timeout_msec

the timeout in milliseconds, -1 to use the default -timeout or G_MAXINT for no timeout

 

cancellable

a GCancellable or NULL.

[nullable]

error

return location for error or NULL

 
-
-
-

Returns

-

NULL if error -is set. Otherwise a GVariant tuple with -return values. Free with g_variant_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_call_with_unix_fd_list ()

-
void
-g_dbus_connection_call_with_unix_fd_list
-                               (GDBusConnection *connection,
-                                const gchar *bus_name,
-                                const gchar *object_path,
-                                const gchar *interface_name,
-                                const gchar *method_name,
-                                GVariant *parameters,
-                                const GVariantType *reply_type,
-                                GDBusCallFlags flags,
-                                gint timeout_msec,
-                                GUnixFDList *fd_list,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

Like g_dbus_connection_call() but also takes a GUnixFDList object.

-

This method is only available on UNIX.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

bus_name

a unique or well-known bus name or NULL if -connection -is not a message bus connection.

[nullable]

object_path

path of remote object

 

interface_name

D-Bus interface to invoke method on

 

method_name

the name of the method to invoke

 

parameters

a GVariant tuple with parameters for the method -or NULL if not passing parameters.

[nullable]

reply_type

the expected type of the reply, or NULL.

[nullable]

flags

flags from the GDBusCallFlags enumeration

 

timeout_msec

the timeout in milliseconds, -1 to use the default -timeout or G_MAXINT for no timeout

 

fd_list

a GUnixFDList or NULL.

[nullable]

cancellable

a GCancellable or NULL.

[nullable]

callback

a GAsyncReadyCallback to call when the request is -satisfied or NULL if you don't * care about the result of the -method invocation.

[nullable]

user_data

The data to pass to callback -.

 
-
-

Since: 2.30

-
-
-
-

g_dbus_connection_call_with_unix_fd_list_finish ()

-
GVariant *
-g_dbus_connection_call_with_unix_fd_list_finish
-                               (GDBusConnection *connection,
-                                GUnixFDList **out_fd_list,
-                                GAsyncResult *res,
-                                GError **error);
-

Finishes an operation started with g_dbus_connection_call_with_unix_fd_list().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

out_fd_list

return location for a GUnixFDList or NULL.

[out][optional]

res

a GAsyncResult obtained from the GAsyncReadyCallback passed to -g_dbus_connection_call_with_unix_fd_list()

 

error

return location for error or NULL

 
-
-
-

Returns

-

NULL if error -is set. Otherwise a GVariant tuple with -return values. Free with g_variant_unref().

-
-

Since: 2.30

-
-
-
-

g_dbus_connection_call_with_unix_fd_list_sync ()

-
GVariant *
-g_dbus_connection_call_with_unix_fd_list_sync
-                               (GDBusConnection *connection,
-                                const gchar *bus_name,
-                                const gchar *object_path,
-                                const gchar *interface_name,
-                                const gchar *method_name,
-                                GVariant *parameters,
-                                const GVariantType *reply_type,
-                                GDBusCallFlags flags,
-                                gint timeout_msec,
-                                GUnixFDList *fd_list,
-                                GUnixFDList **out_fd_list,
-                                GCancellable *cancellable,
-                                GError **error);
-

Like g_dbus_connection_call_sync() but also takes and returns GUnixFDList objects.

-

This method is only available on UNIX.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

bus_name

a unique or well-known bus name or NULL -if connection -is not a message bus connection.

[nullable]

object_path

path of remote object

 

interface_name

D-Bus interface to invoke method on

 

method_name

the name of the method to invoke

 

parameters

a GVariant tuple with parameters for -the method or NULL if not passing parameters.

[nullable]

reply_type

the expected type of the reply, or NULL.

[nullable]

flags

flags from the GDBusCallFlags enumeration

 

timeout_msec

the timeout in milliseconds, -1 to use the default -timeout or G_MAXINT for no timeout

 

fd_list

a GUnixFDList or NULL.

[nullable]

out_fd_list

return location for a GUnixFDList or NULL.

[out][optional]

cancellable

a GCancellable or NULL.

[nullable]

error

return location for error or NULL

 
-
-
-

Returns

-

NULL if error -is set. Otherwise a GVariant tuple with -return values. Free with g_variant_unref().

-
-

Since: 2.30

-
-
-
-

g_dbus_connection_emit_signal ()

-
gboolean
-g_dbus_connection_emit_signal (GDBusConnection *connection,
-                               const gchar *destination_bus_name,
-                               const gchar *object_path,
-                               const gchar *interface_name,
-                               const gchar *signal_name,
-                               GVariant *parameters,
-                               GError **error);
-

Emits a signal.

-

If the parameters GVariant is floating, it is consumed.

-

This can only fail if parameters - is not compatible with the D-Bus protocol.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

destination_bus_name

the unique bus name for the destination -for the signal or NULL to emit to all listeners.

[nullable]

object_path

path of remote object

 

interface_name

D-Bus interface to emit a signal on

 

signal_name

the name of the signal to emit

 

parameters

a GVariant tuple with parameters for the signal -or NULL if not passing parameters.

[nullable]

error

Return location for error or NULL

 
-
-
-

Returns

-

TRUE unless error -is set

-
-

Since: 2.26

-
-
-
-

GDBusSignalCallback ()

-
void
-(*GDBusSignalCallback) (GDBusConnection *connection,
-                        const gchar *sender_name,
-                        const gchar *object_path,
-                        const gchar *interface_name,
-                        const gchar *signal_name,
-                        GVariant *parameters,
-                        gpointer user_data);
-

Signature for callback function used in g_dbus_connection_signal_subscribe().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

A GDBusConnection.

 

sender_name

The unique bus name of the sender of the signal.

 

object_path

The object path that the signal was emitted on.

 

interface_name

The name of the interface.

 

signal_name

The name of the signal.

 

parameters

A GVariant tuple with parameters for the signal.

 

user_data

User data passed when subscribing to the signal.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_connection_signal_subscribe ()

-
guint
-g_dbus_connection_signal_subscribe (GDBusConnection *connection,
-                                    const gchar *sender,
-                                    const gchar *interface_name,
-                                    const gchar *member,
-                                    const gchar *object_path,
-                                    const gchar *arg0,
-                                    GDBusSignalFlags flags,
-                                    GDBusSignalCallback callback,
-                                    gpointer user_data,
-                                    GDestroyNotify user_data_free_func);
-

Subscribes to signals on connection - and invokes callback - with a whenever -the signal is received. Note that callback - will be invoked in the -thread-default main context -of the thread you are calling this method from.

-

If connection - is not a message bus connection, sender - must be -NULL.

-

If sender - is a well-known name note that callback - is invoked with -the unique name for the owner of sender -, not the well-known name -as one would expect. This is because the message bus rewrites the -name. As such, to avoid certain race conditions, users should be -tracking the name owner of the well-known name and use that when -processing the received signal.

-

If one of G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE or -G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH are given, arg0 - is -interpreted as part of a namespace or path. The first argument -of a signal is matched against that part as specified by D-Bus.

-

If user_data_free_func - is non-NULL, it will be called (in the -thread-default main context of the thread you are calling this -method from) at some point after user_data - is no longer -needed. (It is not guaranteed to be called synchronously when the -signal is unsubscribed from, and may be called after connection - -has been destroyed.)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

sender

sender name to match on (unique or well-known name) -or NULL to listen from all senders.

[nullable]

interface_name

D-Bus interface name to match on or NULL to -match on all interfaces.

[nullable]

member

D-Bus signal name to match on or NULL to match on -all signals.

[nullable]

object_path

object path to match on or NULL to match on -all object paths.

[nullable]

arg0

contents of first string argument to match on or NULL -to match on all kinds of arguments.

[nullable]

flags

GDBusSignalFlags describing how arg0 is used in subscribing to the -signal

 

callback

callback to invoke when there is a signal matching the requested data

 

user_data

user data to pass to callback -

 

user_data_free_func

function to free user_data -with when -subscription is removed or NULL.

[nullable]
-
-
-

Returns

-

a subscription identifier that can be used with g_dbus_connection_signal_unsubscribe()

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_signal_unsubscribe ()

-
void
-g_dbus_connection_signal_unsubscribe (GDBusConnection *connection,
-                                      guint subscription_id);
-

Unsubscribes from signals.

-
-

Parameters

-
----- - - - - - - - - - - - - -

connection

a GDBusConnection

 

subscription_id

a subscription id obtained from -g_dbus_connection_signal_subscribe()

 
-
-

Since: 2.26

-
-
-
-

g_dbus_connection_send_message ()

-
gboolean
-g_dbus_connection_send_message (GDBusConnection *connection,
-                                GDBusMessage *message,
-                                GDBusSendMessageFlags flags,
-                                volatile guint32 *out_serial,
-                                GError **error);
-

Asynchronously sends message - to the peer represented by connection -.

-

Unless flags - contain the -G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number -will be assigned by connection - and set on message - via -g_dbus_message_set_serial(). If out_serial - is not NULL, then the -serial number used will be written to this location prior to -submitting the message to the underlying transport.

-

If connection - is closed then the operation will fail with -G_IO_ERROR_CLOSED. If message - is not well-formed, -the operation fails with G_IO_ERROR_INVALID_ARGUMENT.

-

See this server and client -for an example of how to use this low-level API to send and receive -UNIX file descriptors.

-

Note that message - must be unlocked, unless flags - contain the -G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

message

a GDBusMessage

 

flags

flags affecting how the message is sent

 

out_serial

return location for serial number assigned -to message -when sending it or NULL.

[out][optional]

error

Return location for error or NULL

 
-
-
-

Returns

-

TRUE if the message was well-formed and queued for -transmission, FALSE if error -is set

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_send_message_with_reply ()

-
void
-g_dbus_connection_send_message_with_reply
-                               (GDBusConnection *connection,
-                                GDBusMessage *message,
-                                GDBusSendMessageFlags flags,
-                                gint timeout_msec,
-                                volatile guint32 *out_serial,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

Asynchronously sends message - to the peer represented by connection -.

-

Unless flags - contain the -G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number -will be assigned by connection - and set on message - via -g_dbus_message_set_serial(). If out_serial - is not NULL, then the -serial number used will be written to this location prior to -submitting the message to the underlying transport.

-

If connection - is closed then the operation will fail with -G_IO_ERROR_CLOSED. If cancellable - is canceled, the operation will -fail with G_IO_ERROR_CANCELLED. If message - is not well-formed, -the operation fails with G_IO_ERROR_INVALID_ARGUMENT.

-

This is an asynchronous method. When the operation is finished, callback - -will be invoked in the -thread-default main context -of the thread you are calling this method from. You can then call -g_dbus_connection_send_message_with_reply_finish() to get the result of the operation. -See g_dbus_connection_send_message_with_reply_sync() for the synchronous version.

-

Note that message - must be unlocked, unless flags - contain the -G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.

-

See this server and client -for an example of how to use this low-level API to send and receive -UNIX file descriptors.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

message

a GDBusMessage

 

flags

flags affecting how the message is sent

 

timeout_msec

the timeout in milliseconds, -1 to use the default -timeout or G_MAXINT for no timeout

 

out_serial

return location for serial number assigned -to message -when sending it or NULL.

[out][optional]

cancellable

a GCancellable or NULL.

[nullable]

callback

a GAsyncReadyCallback to call when the request -is satisfied or NULL if you don't care about the result.

[nullable]

user_data

The data to pass to callback -

 
-
-

Since: 2.26

-
-
-
-

g_dbus_connection_send_message_with_reply_finish ()

-
GDBusMessage *
-g_dbus_connection_send_message_with_reply_finish
-                               (GDBusConnection *connection,
-                                GAsyncResult *res,
-                                GError **error);
-

Finishes an operation started with g_dbus_connection_send_message_with_reply().

-

Note that error - is only set if a local in-process error -occurred. That is to say that the returned GDBusMessage object may -be of type G_DBUS_MESSAGE_TYPE_ERROR. Use -g_dbus_message_to_gerror() to transcode this to a GError.

-

See this server and client -for an example of how to use this low-level API to send and receive -UNIX file descriptors.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

res

a GAsyncResult obtained from the GAsyncReadyCallback passed to -g_dbus_connection_send_message_with_reply()

 

error

teturn location for error or NULL

 
-
-
-

Returns

-

a locked GDBusMessage or NULL if error -is set.

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_send_message_with_reply_sync ()

-
GDBusMessage *
-g_dbus_connection_send_message_with_reply_sync
-                               (GDBusConnection *connection,
-                                GDBusMessage *message,
-                                GDBusSendMessageFlags flags,
-                                gint timeout_msec,
-                                volatile guint32 *out_serial,
-                                GCancellable *cancellable,
-                                GError **error);
-

Synchronously sends message - to the peer represented by connection - -and blocks the calling thread until a reply is received or the -timeout is reached. See g_dbus_connection_send_message_with_reply() -for the asynchronous version of this method.

-

Unless flags - contain the -G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number -will be assigned by connection - and set on message - via -g_dbus_message_set_serial(). If out_serial - is not NULL, then the -serial number used will be written to this location prior to -submitting the message to the underlying transport.

-

If connection - is closed then the operation will fail with -G_IO_ERROR_CLOSED. If cancellable - is canceled, the operation will -fail with G_IO_ERROR_CANCELLED. If message - is not well-formed, -the operation fails with G_IO_ERROR_INVALID_ARGUMENT.

-

Note that error - is only set if a local in-process error -occurred. That is to say that the returned GDBusMessage object may -be of type G_DBUS_MESSAGE_TYPE_ERROR. Use -g_dbus_message_to_gerror() to transcode this to a GError.

-

See this server and client -for an example of how to use this low-level API to send and receive -UNIX file descriptors.

-

Note that message - must be unlocked, unless flags - contain the -G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

message

a GDBusMessage

 

flags

flags affecting how the message is sent.

 

timeout_msec

the timeout in milliseconds, -1 to use the default -timeout or G_MAXINT for no timeout

 

out_serial

return location for serial number -assigned to message -when sending it or NULL.

[out][optional]

cancellable

a GCancellable or NULL.

[nullable]

error

return location for error or NULL

 
-
-
-

Returns

-

a locked GDBusMessage that is the reply -to message -or NULL if error -is set.

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

GDBusMessageFilterFunction ()

-
GDBusMessage *
-(*GDBusMessageFilterFunction) (GDBusConnection *connection,
-                               GDBusMessage *message,
-                               gboolean incoming,
-                               gpointer user_data);
-

Signature for function used in g_dbus_connection_add_filter().

-

A filter function is passed a GDBusMessage and expected to return -a GDBusMessage too. Passive filter functions that don't modify the -message can simply return the message - object:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
static GDBusMessage *
-passive_filter (GDBusConnection *connection
-                GDBusMessage    *message,
-                gboolean         incoming,
-                gpointer         user_data)
-{
-  /<!-- -->* inspect @message *<!-- -->/
-  return message;
-}
-
- -

-Filter functions that wants to drop a message can simply return NULL:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
static GDBusMessage *
-drop_filter (GDBusConnection *connection
-             GDBusMessage    *message,
-             gboolean         incoming,
-             gpointer         user_data)
-{
-  if (should_drop_message)
-    {
-      g_object_unref (message);
-      message = NULL;
-    }
-  return message;
-}
-
- -

-Finally, a filter function may modify a message by copying it:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
static GDBusMessage *
-modifying_filter (GDBusConnection *connection
-                  GDBusMessage    *message,
-                  gboolean         incoming,
-                  gpointer         user_data)
-{
-  GDBusMessage *copy;
-  GError *error;
-
-  error = NULL;
-  copy = g_dbus_message_copy (message, &error);
-  /<!-- -->* handle @error being is set *<!-- -->/
-  g_object_unref (message);
-
-  /<!-- -->* modify @copy *<!-- -->/
-
-  return copy;
-}
-
- -

-If the returned GDBusMessage is different from message - and cannot -be sent on connection - (it could use features, such as file -descriptors, not compatible with connection -), then a warning is -logged to standard error. Applications can -check this ahead of time using g_dbus_message_to_blob() passing a -GDBusCapabilityFlags value obtained from connection -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

connection

A GDBusConnection.

[transfer none]

message

A locked GDBusMessage that the filter function takes ownership of.

[transfer full]

incoming

TRUE if it is a message received from the other peer, FALSE if it is -a message to be sent to the other peer.

 

user_data

User data passed when adding the filter.

 
-
-
-

Returns

-

A GDBusMessage that will be freed with -g_object_unref() or NULL to drop the message. Passive filter -functions can simply return the passed message -object.

-

[transfer full][nullable]

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_add_filter ()

-
guint
-g_dbus_connection_add_filter (GDBusConnection *connection,
-                              GDBusMessageFilterFunction filter_function,
-                              gpointer user_data,
-                              GDestroyNotify user_data_free_func);
-

Adds a message filter. Filters are handlers that are run on all -incoming and outgoing messages, prior to standard dispatch. Filters -are run in the order that they were added. The same handler can be -added as a filter more than once, in which case it will be run more -than once. Filters added during a filter callback won't be run on -the message being processed. Filter functions are allowed to modify -and even drop messages.

-

Note that filters are run in a dedicated message handling thread so -they can't block and, generally, can't do anything but signal a -worker thread. Also note that filters are rarely needed - use API -such as g_dbus_connection_send_message_with_reply(), -g_dbus_connection_signal_subscribe() or g_dbus_connection_call() instead.

-

If a filter consumes an incoming message the message is not -dispatched anywhere else - not even the standard dispatch machinery -(that API such as g_dbus_connection_signal_subscribe() and -g_dbus_connection_send_message_with_reply() relies on) will see the -message. Similary, if a filter consumes an outgoing message, the -message will not be sent to the other peer.

-

If user_data_free_func - is non-NULL, it will be called (in the -thread-default main context of the thread you are calling this -method from) at some point after user_data - is no longer -needed. (It is not guaranteed to be called synchronously when the -filter is removed, and may be called after connection - has been -destroyed.)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

filter_function

a filter function

 

user_data

user data to pass to filter_function -

 

user_data_free_func

function to free user_data -with when filter -is removed or NULL

 
-
-
-

Returns

-

a filter identifier that can be used with -g_dbus_connection_remove_filter()

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_remove_filter ()

-
void
-g_dbus_connection_remove_filter (GDBusConnection *connection,
-                                 guint filter_id);
-

Removes a filter.

-

Note that since filters run in a different thread, there is a race -condition where it is possible that the filter will be running even -after calling g_dbus_connection_remove_filter(), so you cannot just -free data that the filter might be using. Instead, you should pass -a GDestroyNotify to g_dbus_connection_add_filter(), which will be -called when it is guaranteed that the data is no longer needed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

connection

a GDBusConnection

 

filter_id

an identifier obtained from g_dbus_connection_add_filter()

 
-
-

Since: 2.26

-
-
-
-

GDBusInterfaceMethodCallFunc ()

-
void
-(*GDBusInterfaceMethodCallFunc) (GDBusConnection *connection,
-                                 const gchar *sender,
-                                 const gchar *object_path,
-                                 const gchar *interface_name,
-                                 const gchar *method_name,
-                                 GVariant *parameters,
-                                 GDBusMethodInvocation *invocation,
-                                 gpointer user_data);
-

The type of the method_call - function in GDBusInterfaceVTable.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

A GDBusConnection.

 

sender

The unique bus name of the remote caller.

 

object_path

The object path that the method was invoked on.

 

interface_name

The D-Bus interface name the method was invoked on.

 

method_name

The name of the method that was invoked.

 

parameters

A GVariant tuple with parameters.

 

invocation

A GDBusMethodInvocation object that must be used to return a value or error.

[transfer full]

user_data

The user_data -gpointer passed to g_dbus_connection_register_object().

 
-
-

Since: 2.26

-
-
-
-

GDBusInterfaceGetPropertyFunc ()

-
GVariant *
-(*GDBusInterfaceGetPropertyFunc) (GDBusConnection *connection,
-                                  const gchar *sender,
-                                  const gchar *object_path,
-                                  const gchar *interface_name,
-                                  const gchar *property_name,
-                                  GError **error,
-                                  gpointer user_data);
-

The type of the get_property - function in GDBusInterfaceVTable.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

A GDBusConnection.

 

sender

The unique bus name of the remote caller.

 

object_path

The object path that the method was invoked on.

 

interface_name

The D-Bus interface name for the property.

 

property_name

The name of the property to get the value of.

 

error

Return location for error.

 

user_data

The user_data -gpointer passed to g_dbus_connection_register_object().

 
-
-
-

Returns

-

A GVariant with the value for property_name -or NULL if -error -is set. If the returned GVariant is floating, it is -consumed - otherwise its reference count is decreased by one.

-
-

Since: 2.26

-
-
-
-

GDBusInterfaceSetPropertyFunc ()

-
gboolean
-(*GDBusInterfaceSetPropertyFunc) (GDBusConnection *connection,
-                                  const gchar *sender,
-                                  const gchar *object_path,
-                                  const gchar *interface_name,
-                                  const gchar *property_name,
-                                  GVariant *value,
-                                  GError **error,
-                                  gpointer user_data);
-

The type of the set_property - function in GDBusInterfaceVTable.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

A GDBusConnection.

 

sender

The unique bus name of the remote caller.

 

object_path

The object path that the method was invoked on.

 

interface_name

The D-Bus interface name for the property.

 

property_name

The name of the property to get the value of.

 

value

The value to set the property to.

 

error

Return location for error.

 

user_data

The user_data -gpointer passed to g_dbus_connection_register_object().

 
-
-
-

Returns

-

TRUE if the property was set to value -, FALSE if error -is set.

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_register_object ()

-
guint
-g_dbus_connection_register_object (GDBusConnection *connection,
-                                   const gchar *object_path,
-                                   GDBusInterfaceInfo *interface_info,
-                                   const GDBusInterfaceVTable *vtable,
-                                   gpointer user_data,
-                                   GDestroyNotify user_data_free_func,
-                                   GError **error);
-

Registers callbacks for exported objects at object_path - with the -D-Bus interface that is described in interface_info -.

-

Calls to functions in vtable - (and user_data_free_func -) will happen -in the -thread-default main context -of the thread you are calling this method from.

-

Note that all GVariant values passed to functions in vtable - will match -the signature given in interface_info - - if a remote caller passes -incorrect values, the org.freedesktop.DBus.Error.InvalidArgs -is returned to the remote caller.

-

Additionally, if the remote caller attempts to invoke methods or -access properties not mentioned in interface_info - the -org.freedesktop.DBus.Error.UnknownMethod resp. -org.freedesktop.DBus.Error.InvalidArgs errors -are returned to the caller.

-

It is considered a programming error if the -GDBusInterfaceGetPropertyFunc function in vtable - returns a -GVariant of incorrect type.

-

If an existing callback is already registered at object_path - and -interface_name -, then error - is set to G_IO_ERROR_EXISTS.

-

GDBus automatically implements the standard D-Bus interfaces -org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable -and org.freedesktop.Peer, so you don't have to implement those for the -objects you export. You can implement org.freedesktop.DBus.Properties -yourself, e.g. to handle getting and setting of properties asynchronously.

-

Note that the reference count on interface_info - will be -incremented by 1 (unless allocated statically, e.g. if the -reference count is -1, see g_dbus_interface_info_ref()) for as long -as the object is exported. Also note that vtable - will be copied.

-

See this server for an example of how to use this method.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

object_path

the object path to register at

 

interface_info

introspection data for the interface

 

vtable

a GDBusInterfaceVTable to call into or NULL.

[nullable]

user_data

data to pass to functions in vtable -.

[nullable]

user_data_free_func

function to call when the object path is unregistered

 

error

return location for error or NULL

 
-
-
-

Returns

-

0 if error -is set, otherwise a registration id (never 0) -that can be used with g_dbus_connection_unregister_object()

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_unregister_object ()

-
gboolean
-g_dbus_connection_unregister_object (GDBusConnection *connection,
-                                     guint registration_id);
-

Unregisters an object.

-
-

Parameters

-
----- - - - - - - - - - - - - -

connection

a GDBusConnection

 

registration_id

a registration id obtained from -g_dbus_connection_register_object()

 
-
-
-

Returns

-

TRUE if the object was unregistered, FALSE otherwise

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_register_object_with_closures ()

-
guint
-g_dbus_connection_register_object_with_closures
-                               (GDBusConnection *connection,
-                                const gchar *object_path,
-                                GDBusInterfaceInfo *interface_info,
-                                GClosure *method_call_closure,
-                                GClosure *get_property_closure,
-                                GClosure *set_property_closure,
-                                GError **error);
-

Version of g_dbus_connection_register_object() using closures instead of a -GDBusInterfaceVTable for easier binding in other languages.

-

[rename-to g_dbus_connection_register_object]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

A GDBusConnection.

 

object_path

The object path to register at.

 

interface_info

Introspection data for the interface.

 

method_call_closure

GClosure for handling incoming method calls.

[nullable]

get_property_closure

GClosure for getting a property.

[nullable]

set_property_closure

GClosure for setting a property.

[nullable]

error

Return location for error or NULL.

 
-
-
-

Returns

-

0 if error -is set, otherwise a registration id (never 0) -that can be used with g_dbus_connection_unregister_object() .

-
-

Since: 2.46

-
-
-
-

GDBusSubtreeEnumerateFunc ()

-
gchar **
-(*GDBusSubtreeEnumerateFunc) (GDBusConnection *connection,
-                              const gchar *sender,
-                              const gchar *object_path,
-                              gpointer user_data);
-

The type of the enumerate - function in GDBusSubtreeVTable.

-

This function is called when generating introspection data and also -when preparing to dispatch incoming messages in the event that the -G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not -specified (ie: to verify that the object path is valid).

-

Hierarchies are not supported; the items that you return should not -contain the '/' character.

-

The return value will be freed with g_strfreev().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

connection

A GDBusConnection.

 

sender

The unique bus name of the remote caller.

 

object_path

The object path that was registered with g_dbus_connection_register_subtree().

 

user_data

The user_data -gpointer passed to g_dbus_connection_register_subtree().

 
-
-
-

Returns

-

A newly allocated array of strings for node names that are children of object_path -.

-
-

Since: 2.26

-
-
-
-

GDBusSubtreeIntrospectFunc ()

-
GDBusInterfaceInfo **
-(*GDBusSubtreeIntrospectFunc) (GDBusConnection *connection,
-                               const gchar *sender,
-                               const gchar *object_path,
-                               const gchar *node,
-                               gpointer user_data);
-

The type of the introspect - function in GDBusSubtreeVTable.

-

Subtrees are flat. node -, if non-NULL, is always exactly one -segment of the object path (ie: it never contains a slash).

-

This function should return NULL to indicate that there is no object -at this node.

-

If this function returns non-NULL, the return value is expected to -be a NULL-terminated array of pointers to GDBusInterfaceInfo -structures describing the interfaces implemented by node -. This -array will have g_dbus_interface_info_unref() called on each item -before being freed with g_free().

-

The difference between returning NULL and an array containing zero -items is that the standard DBus interfaces will returned to the -remote introspector in the empty array case, but not in the NULL -case.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

A GDBusConnection.

 

sender

The unique bus name of the remote caller.

 

object_path

The object path that was registered with g_dbus_connection_register_subtree().

 

node

A node that is a child of object_path -(relative to object_path -) or NULL for the root of the subtree.

 

user_data

The user_data -gpointer passed to g_dbus_connection_register_subtree().

 
-
-
-

Returns

-

A NULL-terminated array of pointers to GDBusInterfaceInfo, or NULL.

-
-

Since: 2.26

-
-
-
-

GDBusSubtreeDispatchFunc ()

-
const GDBusInterfaceVTable *
-(*GDBusSubtreeDispatchFunc) (GDBusConnection *connection,
-                             const gchar *sender,
-                             const gchar *object_path,
-                             const gchar *interface_name,
-                             const gchar *node,
-                             gpointer *out_user_data,
-                             gpointer user_data);
-

The type of the dispatch - function in GDBusSubtreeVTable.

-

Subtrees are flat. node -, if non-NULL, is always exactly one -segment of the object path (ie: it never contains a slash).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

A GDBusConnection.

 

sender

The unique bus name of the remote caller.

 

object_path

The object path that was registered with g_dbus_connection_register_subtree().

 

interface_name

The D-Bus interface name that the method call or property access is for.

 

node

A node that is a child of object_path -(relative to object_path -) or NULL for the root of the subtree.

 

out_user_data

Return location for user data to pass to functions in the returned GDBusInterfaceVTable (never NULL).

[nullable][not optional]

user_data

The user_data -gpointer passed to g_dbus_connection_register_subtree().

 
-
-
-

Returns

-

A GDBusInterfaceVTable or NULL if you don't want to handle the methods.

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_register_subtree ()

-
guint
-g_dbus_connection_register_subtree (GDBusConnection *connection,
-                                    const gchar *object_path,
-                                    const GDBusSubtreeVTable *vtable,
-                                    GDBusSubtreeFlags flags,
-                                    gpointer user_data,
-                                    GDestroyNotify user_data_free_func,
-                                    GError **error);
-

Registers a whole subtree of dynamic objects.

-

The enumerate - and introspection - functions in vtable - are used to -convey, to remote callers, what nodes exist in the subtree rooted -by object_path -.

-

When handling remote calls into any node in the subtree, first the -enumerate - function is used to check if the node exists. If the node exists -or the G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set -the introspection - function is used to check if the node supports the -requested method. If so, the dispatch - function is used to determine -where to dispatch the call. The collected GDBusInterfaceVTable and -gpointer will be used to call into the interface vtable for processing -the request.

-

All calls into user-provided code will be invoked in the -thread-default main context -of the thread you are calling this method from.

-

If an existing subtree is already registered at object_path - or -then error - is set to G_IO_ERROR_EXISTS.

-

Note that it is valid to register regular objects (using -g_dbus_connection_register_object()) in a subtree registered with -g_dbus_connection_register_subtree() - if so, the subtree handler -is tried as the last resort. One way to think about a subtree -handler is to consider it a fallback handler for object paths not -registered via g_dbus_connection_register_object() or other bindings.

-

Note that vtable - will be copied so you cannot change it after -registration.

-

See this server for an example of how to use -this method.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

object_path

the object path to register the subtree at

 

vtable

a GDBusSubtreeVTable to enumerate, introspect and -dispatch nodes in the subtree

 

flags

flags used to fine tune the behavior of the subtree

 

user_data

data to pass to functions in vtable -

 

user_data_free_func

function to call when the subtree is unregistered

 

error

return location for error or NULL

 
-
-
-

Returns

-

0 if error -is set, otherwise a subtree registration id (never 0) -that can be used with g_dbus_connection_unregister_subtree() .

-
-

Since: 2.26

-
-
-
-

g_dbus_connection_unregister_subtree ()

-
gboolean
-g_dbus_connection_unregister_subtree (GDBusConnection *connection,
-                                      guint registration_id);
-

Unregisters a subtree.

-
-

Parameters

-
----- - - - - - - - - - - - - -

connection

a GDBusConnection

 

registration_id

a subtree registration id obtained from -g_dbus_connection_register_subtree()

 
-
-
-

Returns

-

TRUE if the subtree was unregistered, FALSE otherwise

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

enum GBusType

-

An enumeration for well-known message buses.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_BUS_TYPE_STARTER

-

An alias for the message bus that activated the process, if any.

-
 

G_BUS_TYPE_NONE

-

Not a message bus.

-
 

G_BUS_TYPE_SYSTEM

-

The system-wide message bus.

-
 

G_BUS_TYPE_SESSION

-

The login session message bus.

-
 
-
-

Since: 2.26

-
-
-
-

GDBusConnection

-
typedef struct _GDBusConnection GDBusConnection;
-

The GDBusConnection structure contains only private data and -should only be accessed using the provided API.

-

Since: 2.26

-
-
-
-

enum GDBusConnectionFlags

-

Flags used when creating a new GDBusConnection.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_DBUS_CONNECTION_FLAGS_NONE

-

No flags set.

-
 

G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT

-

Perform authentication against server.

-
 

G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER

-

Perform authentication against client.

-
 

G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS

-

When -authenticating as a server, allow the anonymous authentication -method.

-
 

G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION

-

Pass this flag if connecting to a peer that is a -message bus. This means that the Hello() method will be invoked as part of the connection setup.

-
 

G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING

-

If set, processing of D-Bus messages is -delayed until g_dbus_connection_start_message_processing() is called.

-
 
-
-

Since: 2.26

-
-
-
-

enum GDBusCapabilityFlags

-

Capabilities negotiated with the remote peer.

-
-

Members

-
----- - - - - - - - - - - - - -

G_DBUS_CAPABILITY_FLAGS_NONE

-

No flags set.

-
 

G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING

-

The connection -supports exchanging UNIX file descriptors with the remote peer.

-
 
-
-

Since: 2.26

-
-
-
-

enum GDBusCallFlags

-

Flags used in g_dbus_connection_call() and similar APIs.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_DBUS_CALL_FLAGS_NONE

-

No flags set.

-
 

G_DBUS_CALL_FLAGS_NO_AUTO_START

-

The bus must not launch -an owner for the destination name in response to this method -invocation.

-
 

G_DBUS_CALL_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION

-

the caller is prepared to -wait for interactive authorization. Since 2.46.

-
 
-
-

Since: 2.26

-
-
-
-

enum GDBusSignalFlags

-

Flags used when subscribing to signals via g_dbus_connection_signal_subscribe().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_DBUS_SIGNAL_FLAGS_NONE

-

No flags set.

-
 

G_DBUS_SIGNAL_FLAGS_NO_MATCH_RULE

-

Don't actually send the AddMatch -D-Bus call for this signal subscription. This gives you more control -over which match rules you add (but you must add them manually).

-
 

G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE

-

Match first arguments that -contain a bus or interface name with the given namespace.

-
 

G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH

-

Match first arguments that -contain an object path that is either equivalent to the given path, -or one of the paths is a subpath of the other.

-
 
-
-

Since: 2.26

-
-
-
-

enum GDBusSendMessageFlags

-

Flags used when sending GDBusMessages on a GDBusConnection.

-
-

Members

-
----- - - - - - - - - - - - - -

G_DBUS_SEND_MESSAGE_FLAGS_NONE

-

No flags set.

-
 

G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL

-

Do not automatically -assign a serial number from the GDBusConnection object when -sending a message.

-
 
-
-

Since: 2.26

-
-
-
-

GDBusInterfaceVTable

-
typedef struct {
-  GDBusInterfaceMethodCallFunc  method_call;
-  GDBusInterfaceGetPropertyFunc get_property;
-  GDBusInterfaceSetPropertyFunc set_property;
-} GDBusInterfaceVTable;
-
-

Virtual table for handling properties and method calls for a D-Bus -interface.

-

Since 2.38, if you want to handle getting/setting D-Bus properties -asynchronously, give NULL as your get_property() or set_property() -function. The D-Bus call will be directed to your method_call - function, -with the provided interface_name - set to "org.freedesktop.DBus.Properties".

-

Ownership of the GDBusMethodInvocation object passed to the -method_call() function is transferred to your handler; you must -call one of the methods of GDBusMethodInvocation to return a reply -(possibly empty), or an error. These functions also take ownership -of the passed-in invocation object, so unless the invocation -object has otherwise been referenced, it will be then be freed. -Calling one of these functions may be done within your -method_call() implementation but it also can be done at a later -point to handle the method asynchronously.

-

The usual checks on the validity of the calls is performed. For -Get calls, an error is automatically returned if the property does -not exist or the permissions do not allow access. The same checks are -performed for Set calls, and the provided value is also checked for -being the correct type.

-

For both Get and Set calls, the GDBusMethodInvocation -passed to the method_call - handler can be queried with -g_dbus_method_invocation_get_property_info() to get a pointer -to the GDBusPropertyInfo of the property.

-

If you have readable properties specified in your interface info, -you must ensure that you either provide a non-NULL get_property() - -function or provide implementations of both the Get and GetAll -methods on org.freedesktop.DBus.Properties interface in your method_call - -function. Note that the required return type of the Get call is -(v), not the type of the property. GetAll expects a return value -of type a{sv}.

-

If you have writable properties specified in your interface info, -you must ensure that you either provide a non-NULL set_property() - -function or provide an implementation of the Set call. If implementing -the call, you must return the value of type G_VARIANT_TYPE_UNIT.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

GDBusInterfaceMethodCallFunc method_call;

Function for handling incoming method calls.

 

GDBusInterfaceGetPropertyFunc get_property;

Function for getting a property.

 

GDBusInterfaceSetPropertyFunc set_property;

Function for setting a property.

 
-
-

Since: 2.26

-
-
-
-

GDBusSubtreeVTable

-
typedef struct {
-  GDBusSubtreeEnumerateFunc  enumerate;
-  GDBusSubtreeIntrospectFunc introspect;
-  GDBusSubtreeDispatchFunc   dispatch;
-} GDBusSubtreeVTable;
-
-

Virtual table for handling subtrees registered with g_dbus_connection_register_subtree().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

GDBusSubtreeEnumerateFunc enumerate;

Function for enumerating child nodes.

 

GDBusSubtreeIntrospectFunc introspect;

Function for introspecting a child node.

 

GDBusSubtreeDispatchFunc dispatch;

Function for dispatching a remote call on a child node.

 
-
-

Since: 2.26

-
-
-
-

enum GDBusSubtreeFlags

-

Flags passed to g_dbus_connection_register_subtree().

-
-

Members

-
----- - - - - - - - - - - - - -

G_DBUS_SUBTREE_FLAGS_NONE

-

No flags set.

-
 

G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES

-

Method calls to objects not in the enumerated range - will still be dispatched. This is useful if you want - to dynamically spawn objects in the subtree.

-
 
-
-

Since: 2.26

-
-
-
-

Property Details

-
-

The “address” property

-
  “address”                  gchar *
-

A D-Bus address specifying potential endpoints that can be used -when establishing the connection.

-

Flags: Write / Construct Only

-

Default value: NULL

-

Since: 2.26

-
-
-
-

The “authentication-observer” property

-
  “authentication-observer”  GDBusAuthObserver *
-

A GDBusAuthObserver object to assist in the authentication process or NULL.

-

Flags: Write / Construct Only

-

Since: 2.26

-
-
-
-

The “capabilities” property

-
  “capabilities”             GDBusCapabilityFlags
-

Flags from the GDBusCapabilityFlags enumeration -representing connection features negotiated with the other peer.

-

Flags: Read

-

Since: 2.26

-
-
-
-

The “closed” property

-
  “closed”                   gboolean
-

A boolean specifying whether the connection has been closed.

-

Flags: Read

-

Default value: FALSE

-

Since: 2.26

-
-
-
-

The “exit-on-close” property

-
  “exit-on-close”            gboolean
-

A boolean specifying whether the process will be terminated (by -calling raise(SIGTERM)) if the connection is closed by the -remote peer.

-

Note that GDBusConnection objects returned by g_bus_get_finish() -and g_bus_get_sync() will (usually) have this property set to TRUE.

-

Flags: Read / Write

-

Default value: FALSE

-

Since: 2.26

-
-
-
-

The “flags” property

-
  “flags”                    GDBusConnectionFlags
-

Flags from the GDBusConnectionFlags enumeration.

-

Flags: Write / Construct Only

-

Since: 2.26

-
-
-
-

The “guid” property

-
  “guid”                     gchar *
-

The GUID of the peer performing the role of server when -authenticating.

-

If you are constructing a GDBusConnection and pass -G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER in the -“flags” property then you MUST also set this -property to a valid guid.

-

If you are constructing a GDBusConnection and pass -G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the -“flags” property you will be able to read the GUID -of the other peer here after the connection has been successfully -initialized.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.26

-
-
-
-

The “stream” property

-
  “stream”                   GIOStream *
-

The underlying GIOStream used for I/O.

-

If this is passed on construction and is a GSocketConnection, -then the corresponding GSocket will be put into non-blocking mode.

-

While the GDBusConnection is active, it will interact with this -stream from a worker thread, so it is not safe to interact with -the stream directly.

-

Flags: Read / Write / Construct Only

-

Since: 2.26

-
-
-
-

The “unique-name” property

-
  “unique-name”              gchar *
-

The unique name as assigned by the message bus or NULL if the -connection is not open or not a message bus connection.

-

Flags: Read

-

Default value: NULL

-

Since: 2.26

-
-
-
-

Signal Details

-
-

The “closed” signal

-
void
-user_function (GDBusConnection *connection,
-               gboolean         remote_peer_vanished,
-               GError          *error,
-               gpointer         user_data)
-

Emitted when the connection is closed.

-

The cause of this event can be

-
    -
  • If g_dbus_connection_close() is called. In this case -remote_peer_vanished - is set to FALSE and error - is NULL.

  • -
  • If the remote peer closes the connection. In this case -remote_peer_vanished - is set to TRUE and error - is set.

  • -
  • If the remote peer sends invalid or malformed data. In this -case remote_peer_vanished - is set to FALSE and error - is set.

  • -
-

Upon receiving this signal, you should give up your reference to -connection -. You are guaranteed that this signal is emitted only -once.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

connection

the GDBusConnection emitting the signal

 

remote_peer_vanished

TRUE if connection -is closed because the -remote peer closed its end of the connection

 

error

a GError with more details about the event or NULL.

[nullable]

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.26

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDBusInterface.html b/docs/reference/gio/html/GDBusInterface.html deleted file mode 100644 index f47d7e91a..000000000 --- a/docs/reference/gio/html/GDBusInterface.html +++ /dev/null @@ -1,330 +0,0 @@ - - - - -GDBusInterface: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusInterface

-

GDBusInterface — Base type for D-Bus interfaces

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
-GDBusInterfaceInfo * - -g_dbus_interface_get_info () -
-GDBusObject * - -g_dbus_interface_get_object () -
-GDBusObject * - -g_dbus_interface_dup_object () -
-void - -g_dbus_interface_set_object () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GDBusInterface
structGDBusInterfaceIface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GDBusInterface
-
-
-
-

Prerequisites

-

-GDBusInterface requires - GObject.

-
-
-

Known Implementations

-

-GDBusInterface is implemented by - GDBusInterfaceSkeleton and GDBusProxy.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

The GDBusInterface type is the base type for D-Bus interfaces both -on the service side (see GDBusInterfaceSkeleton) and client side -(see GDBusProxy).

-
-
-

Functions

-
-

g_dbus_interface_get_info ()

-
GDBusInterfaceInfo *
-g_dbus_interface_get_info (GDBusInterface *interface_);
-

Gets D-Bus introspection information for the D-Bus interface -implemented by interface_ -.

-
-

Parameters

-
----- - - - - - -

interface_

An exported D-Bus interface.

 
-
-
-

Returns

-

A GDBusInterfaceInfo. Do not free.

-

[transfer none]

-
-

Since: 2.30

-
-
-
-

g_dbus_interface_get_object ()

-
GDBusObject *
-g_dbus_interface_get_object (GDBusInterface *interface_);
-

Gets the GDBusObject that interface_ - belongs to, if any.

-

It is not safe to use the returned object if interface_ - or -the returned object is being used from other threads. See -g_dbus_interface_dup_object() for a thread-safe alternative.

-

[skip]

-
-

Parameters

-
----- - - - - - -

interface_

An exported D-Bus interface

 
-
-
-

Returns

-

A GDBusObject or NULL. The returned -reference belongs to interface_ -and should not be freed.

-

[transfer none]

-
-

Since: 2.30

-
-
-
-

g_dbus_interface_dup_object ()

-
GDBusObject *
-g_dbus_interface_dup_object (GDBusInterface *interface_);
-

Gets the GDBusObject that interface_ - belongs to, if any.

-

[rename-to g_dbus_interface_get_object]

-
-

Parameters

-
----- - - - - - -

interface_

An exported D-Bus interface.

 
-
-
-

Returns

-

A GDBusObject or NULL. The returned -reference should be freed with g_object_unref().

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_dbus_interface_set_object ()

-
void
-g_dbus_interface_set_object (GDBusInterface *interface_,
-                             GDBusObject *object);
-

Sets the GDBusObject for interface_ - to object -.

-

Note that interface_ - will hold a weak reference to object -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

interface_

An exported D-Bus interface.

 

object

A GDBusObject or NULL.

[nullable]
-
-

Since: 2.30

-
-
-
-

Types and Values

-
-

GDBusInterface

-
typedef struct _GDBusInterface GDBusInterface;
-

Base type for D-Bus interfaces.

-

Since: 2.30

-
-
-
-

struct GDBusInterfaceIface

-
struct GDBusInterfaceIface {
-  GTypeInterface parent_iface;
-
-  /* Virtual Functions */
-  GDBusInterfaceInfo   *(*get_info)   (GDBusInterface      *interface_);
-  GDBusObject          *(*get_object) (GDBusInterface      *interface_);
-  void                  (*set_object) (GDBusInterface      *interface_,
-                                       GDBusObject         *object);
-  GDBusObject          *(*dup_object) (GDBusInterface      *interface_);
-};
-
-

Base type for D-Bus interfaces.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

GTypeInterface parent_iface;

The parent interface.

 

get_info ()

Returns a GDBusInterfaceInfo. See g_dbus_interface_get_info().

 

get_object ()

Gets the enclosing GDBusObject. See g_dbus_interface_get_object().

 

set_object ()

Sets the enclosing GDBusObject. See g_dbus_interface_set_object().

 

dup_object ()

Gets a reference to the enclosing GDBusObject. See g_dbus_interface_dup_object(). Added in 2.32.

 
-
-

Since: 2.30

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDBusInterfaceSkeleton.html b/docs/reference/gio/html/GDBusInterfaceSkeleton.html deleted file mode 100644 index bad3ff706..000000000 --- a/docs/reference/gio/html/GDBusInterfaceSkeleton.html +++ /dev/null @@ -1,869 +0,0 @@ - - - - -GDBusInterfaceSkeleton: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusInterfaceSkeleton

-

GDBusInterfaceSkeleton — Service-side D-Bus interface

-
- -
-

Properties

-
----- - - - - - -
GDBusInterfaceSkeletonFlagsg-flagsRead / Write
-
-
-

Signals

- -
-
-

Types and Values

- -
-
-

Object Hierarchy

-
    GObject
-    ╰── GDBusInterfaceSkeleton
-
-
-
-

Implemented Interfaces

-

-GDBusInterfaceSkeleton implements - GDBusInterface.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Abstract base class for D-Bus interfaces on the service side.

-
-
-

Functions

-
-

g_dbus_interface_skeleton_flush ()

-
void
-g_dbus_interface_skeleton_flush (GDBusInterfaceSkeleton *interface_);
-

If interface_ - has outstanding changes, request for these changes to be -emitted immediately.

-

For example, an exported D-Bus interface may queue up property -changes and emit the -`org.freedesktop.DBus.Properties::Propert`` -signal later (e.g. in an idle handler). This technique is useful -for collapsing multiple property changes into one.

-
-

Parameters

-
----- - - - - - -

interface_

A GDBusInterfaceSkeleton.

 
-
-

Since: 2.30

-
-
-
-

g_dbus_interface_skeleton_get_info ()

-
GDBusInterfaceInfo *
-g_dbus_interface_skeleton_get_info (GDBusInterfaceSkeleton *interface_);
-

Gets D-Bus introspection information for the D-Bus interface -implemented by interface_ -.

-
-

Parameters

-
----- - - - - - -

interface_

A GDBusInterfaceSkeleton.

 
-
-
-

Returns

-

A GDBusInterfaceInfo (never NULL). Do not free.

-

[transfer none]

-
-

Since: 2.30

-
-
-
-

g_dbus_interface_skeleton_get_vtable ()

-
GDBusInterfaceVTable *
-g_dbus_interface_skeleton_get_vtable (GDBusInterfaceSkeleton *interface_);
-

Gets the interface vtable for the D-Bus interface implemented by -interface_ -. The returned function pointers should expect interface_ - -itself to be passed as user_data -.

-

[skip]

-
-

Parameters

-
----- - - - - - -

interface_

A GDBusInterfaceSkeleton.

 
-
-
-

Returns

-

A GDBusInterfaceVTable (never NULL).

-
-

Since: 2.30

-
-
-
-

g_dbus_interface_skeleton_get_properties ()

-
GVariant *
-g_dbus_interface_skeleton_get_properties
-                               (GDBusInterfaceSkeleton *interface_);
-

Gets all D-Bus properties for interface_ -.

-
-

Parameters

-
----- - - - - - -

interface_

A GDBusInterfaceSkeleton.

 
-
-
-

Returns

-

A GVariant of type -'a{sv}'. -Free with g_variant_unref().

-

[transfer full]

-
-

Since: 2.30

-
-
-
-

g_dbus_interface_skeleton_export ()

-
gboolean
-g_dbus_interface_skeleton_export (GDBusInterfaceSkeleton *interface_,
-                                  GDBusConnection *connection,
-                                  const gchar *object_path,
-                                  GError **error);
-

Exports interface_ - at object_path - on connection -.

-

This can be called multiple times to export the same interface_ - -onto multiple connections however the object_path - provided must be -the same for all connections.

-

Use g_dbus_interface_skeleton_unexport() to unexport the object.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

interface_

The D-Bus interface to export.

 

connection

A GDBusConnection to export interface_ -on.

 

object_path

The path to export the interface at.

 

error

Return location for error or NULL.

 
-
-
-

Returns

-

TRUE if the interface was exported on connection -, otherwise FALSE with -error -set.

-
-

Since: 2.30

-
-
-
-

g_dbus_interface_skeleton_unexport ()

-
void
-g_dbus_interface_skeleton_unexport (GDBusInterfaceSkeleton *interface_);
-

Stops exporting interface_ - on all connections it is exported on.

-

To unexport interface_ - from only a single connection, use -g_dbus_interface_skeleton_unexport_from_connection()

-
-

Parameters

-
----- - - - - - -

interface_

A GDBusInterfaceSkeleton.

 
-
-

Since: 2.30

-
-
-
-

g_dbus_interface_skeleton_unexport_from_connection ()

-
void
-g_dbus_interface_skeleton_unexport_from_connection
-                               (GDBusInterfaceSkeleton *interface_,
-                                GDBusConnection *connection);
-

Stops exporting interface_ - on connection -.

-

To stop exporting on all connections the interface is exported on, -use g_dbus_interface_skeleton_unexport().

-
-

Parameters

-
----- - - - - - - - - - - - - -

interface_

A GDBusInterfaceSkeleton.

 

connection

A GDBusConnection.

 
-
-

Since: 2.32

-
-
-
-

g_dbus_interface_skeleton_get_connection ()

-
GDBusConnection *
-g_dbus_interface_skeleton_get_connection
-                               (GDBusInterfaceSkeleton *interface_);
-

Gets the first connection that interface_ - is exported on, if any.

-
-

Parameters

-
----- - - - - - -

interface_

A GDBusInterfaceSkeleton.

 
-
-
-

Returns

-

A GDBusConnection or NULL if interface_ -is -not exported anywhere. Do not free, the object belongs to interface_ -.

-

[transfer none]

-
-

Since: 2.30

-
-
-
-

g_dbus_interface_skeleton_get_connections ()

-
GList *
-g_dbus_interface_skeleton_get_connections
-                               (GDBusInterfaceSkeleton *interface_);
-

Gets a list of the connections that interface_ - is exported on.

-
-

Parameters

-
----- - - - - - -

interface_

A GDBusInterfaceSkeleton.

 
-
-
-

Returns

-

A list of -all the connections that interface_ -is exported on. The returned -list should be freed with g_list_free() after each element has -been freed with g_object_unref().

-

[element-type GDBusConnection][transfer full]

-
-

Since: 2.32

-
-
-
-

g_dbus_interface_skeleton_has_connection ()

-
gboolean
-g_dbus_interface_skeleton_has_connection
-                               (GDBusInterfaceSkeleton *interface_,
-                                GDBusConnection *connection);
-

Checks if interface_ - is exported on connection -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

interface_

A GDBusInterfaceSkeleton.

 

connection

A GDBusConnection.

 
-
-
-

Returns

-

TRUE if interface_ -is exported on connection -, FALSE otherwise.

-
-

Since: 2.32

-
-
-
-

g_dbus_interface_skeleton_get_object_path ()

-
const gchar *
-g_dbus_interface_skeleton_get_object_path
-                               (GDBusInterfaceSkeleton *interface_);
-

Gets the object path that interface_ - is exported on, if any.

-
-

Parameters

-
----- - - - - - -

interface_

A GDBusInterfaceSkeleton.

 
-
-
-

Returns

-

A string owned by interface_ -or NULL if interface_ -is not exported -anywhere. Do not free, the string belongs to interface_ -.

-
-

Since: 2.30

-
-
-
-

g_dbus_interface_skeleton_get_flags ()

-
GDBusInterfaceSkeletonFlags
-g_dbus_interface_skeleton_get_flags (GDBusInterfaceSkeleton *interface_);
-

Gets the GDBusInterfaceSkeletonFlags that describes what the behavior -of interface_ -

-
-

Parameters

-
----- - - - - - -

interface_

A GDBusInterfaceSkeleton.

 
-
-
-

Returns

-

One or more flags from the GDBusInterfaceSkeletonFlags enumeration.

-
-

Since: 2.30

-
-
-
-

g_dbus_interface_skeleton_set_flags ()

-
void
-g_dbus_interface_skeleton_set_flags (GDBusInterfaceSkeleton *interface_,
-                                     GDBusInterfaceSkeletonFlags flags);
-

Sets flags describing what the behavior of skeleton - should be.

-
-

Parameters

-
----- - - - - - - - - - - - - -

interface_

A GDBusInterfaceSkeleton.

 

flags

Flags from the GDBusInterfaceSkeletonFlags enumeration.

 
-
-

Since: 2.30

-
-
-
-

Types and Values

-
-

GDBusInterfaceSkeleton

-
typedef struct _GDBusInterfaceSkeleton GDBusInterfaceSkeleton;
-

The GDBusInterfaceSkeleton structure contains private data and should -only be accessed using the provided API.

-

Since: 2.30

-
-
-
-

struct GDBusInterfaceSkeletonClass

-
struct GDBusInterfaceSkeletonClass {
-  GObjectClass parent_class;
-
-  /* Virtual Functions */
-  GDBusInterfaceInfo   *(*get_info)       (GDBusInterfaceSkeleton  *interface_);
-  GDBusInterfaceVTable *(*get_vtable)     (GDBusInterfaceSkeleton  *interface_);
-  GVariant             *(*get_properties) (GDBusInterfaceSkeleton  *interface_);
-  void                  (*flush)          (GDBusInterfaceSkeleton  *interface_);
-
-
-  /* Signals */
-  gboolean (*g_authorize_method) (GDBusInterfaceSkeleton  *interface_,
-                                  GDBusMethodInvocation   *invocation);
-};
-
-

Class structure for GDBusInterfaceSkeleton.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

get_info ()

Returns a GDBusInterfaceInfo. See g_dbus_interface_skeleton_get_info() for details.

 

get_vtable ()

Returns a GDBusInterfaceVTable. See g_dbus_interface_skeleton_get_vtable() for details.

 

get_properties ()

Returns a GVariant with all properties. See g_dbus_interface_skeleton_get_properties().

 

flush ()

Emits outstanding changes, if any. See g_dbus_interface_skeleton_flush().

 

g_authorize_method ()

Signal class handler for the “g-authorize-method” signal.

 
-
-

Since: 2.30

-
-
-
-

enum GDBusInterfaceSkeletonFlags

-

Flags describing the behavior of a GDBusInterfaceSkeleton instance.

-
-

Members

-
----- - - - - - - - - - - - - -

G_DBUS_INTERFACE_SKELETON_FLAGS_NONE

-

No flags set.

-
 

G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD

-

Each method invocation is handled in - a thread dedicated to the invocation. This means that the method implementation can use blocking IO - without blocking any other part of the process. It also means that the method implementation must - use locking to access data structures used by other threads.

-
 
-
-

Since: 2.30

-
-
-
-

Property Details

-
-

The “g-flags” property

-
  “g-flags”                  GDBusInterfaceSkeletonFlags
-

Flags from the GDBusInterfaceSkeletonFlags enumeration.

-

Flags: Read / Write

-

Since: 2.30

-
-
-
-

Signal Details

-
-

The “g-authorize-method” signal

-
gboolean
-user_function (GDBusInterfaceSkeleton *interface,
-               GDBusMethodInvocation  *invocation,
-               gpointer                user_data)
-

Emitted when a method is invoked by a remote caller and used to -determine if the method call is authorized.

-

Note that this signal is emitted in a thread dedicated to -handling the method call so handlers are allowed to perform -blocking IO. This means that it is appropriate to call e.g. -polkit_authority_check_authorization_sync() -with the -POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION -flag set.

-

If FALSE is returned then no further handlers are run and the -signal handler must take a reference to invocation - and finish -handling the call (e.g. return an error via -g_dbus_method_invocation_return_error()).

-

Otherwise, if TRUE is returned, signal emission continues. If no -handlers return FALSE, then the method is dispatched. If -interface - has an enclosing GDBusObjectSkeleton, then the -“authorize-method” signal handlers run before -the handlers for this signal.

-

The default class handler just returns TRUE.

-

Please note that the common case is optimized: if no signals -handlers are connected and the default class handler isn't -overridden (for both interface - and the enclosing -GDBusObjectSkeleton, if any) and “g-flags” does -not have the -G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD -flags set, no dedicated thread is ever used and the call will be -handled in the same thread as the object that interface - belongs -to was exported in.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

interface

The GDBusInterfaceSkeleton emitting the signal.

 

invocation

A GDBusMethodInvocation.

 

user_data

user data set when the signal handler was connected.

 
-
-
-

Returns

-

TRUE if the call is authorized, FALSE otherwise.

-
-

Flags: Run Last

-

Since: 2.30

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDBusMenuModel.html b/docs/reference/gio/html/GDBusMenuModel.html deleted file mode 100644 index 7b7e1ccf3..000000000 --- a/docs/reference/gio/html/GDBusMenuModel.html +++ /dev/null @@ -1,153 +0,0 @@ - - - - -GDBusMenuModel: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusMenuModel

-

GDBusMenuModel — A D-Bus GMenuModel implementation

-
-
-

Functions

-
---- - - - - -
-GDBusMenuModel * - -g_dbus_menu_model_get () -
-
-
-

Types and Values

-
---- - - - - -
 GDBusMenuModel
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GMenuModel
-        ╰── GDBusMenuModel
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GDBusMenuModel is an implementation of GMenuModel that can be used -as a proxy for a menu model that is exported over D-Bus with -g_dbus_connection_export_menu_model().

-
-
-

Functions

-
-

g_dbus_menu_model_get ()

-
GDBusMenuModel *
-g_dbus_menu_model_get (GDBusConnection *connection,
-                       const gchar *bus_name,
-                       const gchar *object_path);
-

Obtains a GDBusMenuModel for the menu model which is exported -at the given bus_name - and object_path -.

-

The thread default main context is taken at the time of this call. -All signals on the menu model (and any linked models) are reported -with respect to this context. All calls on the returned menu model -(and linked models) must also originate from this same context, with -the thread default main context unchanged.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

bus_name

the bus name which exports the menu model

 

object_path

the object path at which the menu model is exported

 
-
-
-

Returns

-

a GDBusMenuModel object. Free with -g_object_unref().

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

GDBusMenuModel

-
typedef struct _GDBusMenuModel GDBusMenuModel;
-

GDBusMenuModel is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

See Also

-

GMenuModel Exporter

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDBusMessage.html b/docs/reference/gio/html/GDBusMessage.html deleted file mode 100644 index 0f538deb0..000000000 --- a/docs/reference/gio/html/GDBusMessage.html +++ /dev/null @@ -1,2469 +0,0 @@ - - - - -GDBusMessage: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusMessage

-

GDBusMessage — D-Bus Message

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GDBusMessage * - -g_dbus_message_new () -
-GDBusMessage * - -g_dbus_message_new_signal () -
-GDBusMessage * - -g_dbus_message_new_method_call () -
-GDBusMessage * - -g_dbus_message_new_method_reply () -
-GDBusMessage * - -g_dbus_message_new_method_error () -
-GDBusMessage * - -g_dbus_message_new_method_error_valist () -
-GDBusMessage * - -g_dbus_message_new_method_error_literal () -
-gchar * - -g_dbus_message_print () -
-gboolean - -g_dbus_message_get_locked () -
-void - -g_dbus_message_lock () -
-GDBusMessage * - -g_dbus_message_copy () -
-GDBusMessageByteOrder - -g_dbus_message_get_byte_order () -
-void - -g_dbus_message_set_byte_order () -
-GDBusMessageType - -g_dbus_message_get_message_type () -
-void - -g_dbus_message_set_message_type () -
-guint32 - -g_dbus_message_get_serial () -
-void - -g_dbus_message_set_serial () -
-GDBusMessageFlags - -g_dbus_message_get_flags () -
-void - -g_dbus_message_set_flags () -
-GVariant * - -g_dbus_message_get_body () -
-void - -g_dbus_message_set_body () -
-GUnixFDList * - -g_dbus_message_get_unix_fd_list () -
-void - -g_dbus_message_set_unix_fd_list () -
-guint32 - -g_dbus_message_get_num_unix_fds () -
-void - -g_dbus_message_set_num_unix_fds () -
-guchar * - -g_dbus_message_get_header_fields () -
-GVariant * - -g_dbus_message_get_header () -
-void - -g_dbus_message_set_header () -
const gchar * - -g_dbus_message_get_destination () -
-void - -g_dbus_message_set_destination () -
const gchar * - -g_dbus_message_get_error_name () -
-void - -g_dbus_message_set_error_name () -
const gchar * - -g_dbus_message_get_interface () -
-void - -g_dbus_message_set_interface () -
const gchar * - -g_dbus_message_get_member () -
-void - -g_dbus_message_set_member () -
const gchar * - -g_dbus_message_get_path () -
-void - -g_dbus_message_set_path () -
-guint32 - -g_dbus_message_get_reply_serial () -
-void - -g_dbus_message_set_reply_serial () -
const gchar * - -g_dbus_message_get_sender () -
-void - -g_dbus_message_set_sender () -
const gchar * - -g_dbus_message_get_signature () -
-void - -g_dbus_message_set_signature () -
const gchar * - -g_dbus_message_get_arg0 () -
-guchar * - -g_dbus_message_to_blob () -
-gssize - -g_dbus_message_bytes_needed () -
-GDBusMessage * - -g_dbus_message_new_from_blob () -
-gboolean - -g_dbus_message_to_gerror () -
-
-
-

Properties

-
----- - - - - - -
gbooleanlockedRead
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - -
 GDBusMessage
enumGDBusMessageType
enumGDBusMessageFlags
enumGDBusMessageHeaderField
enumGDBusMessageByteOrder
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GDBusMessage
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A type for representing D-Bus messages that can be sent or received -on a GDBusConnection.

-
-
-

Functions

-
-

g_dbus_message_new ()

-
GDBusMessage *
-g_dbus_message_new (void);
-

Creates a new empty GDBusMessage.

-
-

Returns

-

A GDBusMessage. Free with g_object_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_message_new_signal ()

-
GDBusMessage *
-g_dbus_message_new_signal (const gchar *path,
-                           const gchar *interface_,
-                           const gchar *signal);
-

Creates a new GDBusMessage for a signal emission.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

path

A valid object path.

 

interface_

A valid D-Bus interface name.

 

signal

A valid signal name.

 
-
-
-

Returns

-

A GDBusMessage. Free with g_object_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_message_new_method_call ()

-
GDBusMessage *
-g_dbus_message_new_method_call (const gchar *name,
-                                const gchar *path,
-                                const gchar *interface_,
-                                const gchar *method);
-

Creates a new GDBusMessage for a method call.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

name

A valid D-Bus name or NULL.

[nullable]

path

A valid object path.

 

interface_

A valid D-Bus interface name or NULL.

[nullable]

method

A valid method name.

 
-
-
-

Returns

-

A GDBusMessage. Free with g_object_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_message_new_method_reply ()

-
GDBusMessage *
-g_dbus_message_new_method_reply (GDBusMessage *method_call_message);
-

Creates a new GDBusMessage that is a reply to method_call_message -.

-
-

Parameters

-
----- - - - - - -

method_call_message

A message of type G_DBUS_MESSAGE_TYPE_METHOD_CALL to -create a reply message to.

 
-
-
-

Returns

-

GDBusMessage. Free with g_object_unref().

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_dbus_message_new_method_error ()

-
GDBusMessage *
-g_dbus_message_new_method_error (GDBusMessage *method_call_message,
-                                 const gchar *error_name,
-                                 const gchar *error_message_format,
-                                 ...);
-

Creates a new GDBusMessage that is an error reply to method_call_message -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

method_call_message

A message of type G_DBUS_MESSAGE_TYPE_METHOD_CALL to -create a reply message to.

 

error_name

A valid D-Bus error name.

 

error_message_format

The D-Bus error message in a printf() format.

 

...

Arguments for error_message_format -.

 
-
-
-

Returns

-

A GDBusMessage. Free with g_object_unref().

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_dbus_message_new_method_error_valist ()

-
GDBusMessage *
-g_dbus_message_new_method_error_valist
-                               (GDBusMessage *method_call_message,
-                                const gchar *error_name,
-                                const gchar *error_message_format,
-                                va_list var_args);
-

Like g_dbus_message_new_method_error() but intended for language bindings.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

method_call_message

A message of type G_DBUS_MESSAGE_TYPE_METHOD_CALL to -create a reply message to.

 

error_name

A valid D-Bus error name.

 

error_message_format

The D-Bus error message in a printf() format.

 

var_args

Arguments for error_message_format -.

 
-
-
-

Returns

-

A GDBusMessage. Free with g_object_unref().

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_dbus_message_new_method_error_literal ()

-
GDBusMessage *
-g_dbus_message_new_method_error_literal
-                               (GDBusMessage *method_call_message,
-                                const gchar *error_name,
-                                const gchar *error_message);
-

Creates a new GDBusMessage that is an error reply to method_call_message -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

method_call_message

A message of type G_DBUS_MESSAGE_TYPE_METHOD_CALL to -create a reply message to.

 

error_name

A valid D-Bus error name.

 

error_message

The D-Bus error message.

 
-
-
-

Returns

-

A GDBusMessage. Free with g_object_unref().

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_dbus_message_print ()

-
gchar *
-g_dbus_message_print (GDBusMessage *message,
-                      guint indent);
-

Produces a human-readable multi-line description of message -.

-

The contents of the description has no ABI guarantees, the contents -and formatting is subject to change at any time. Typical output -looks something like this:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
Type:    method-call
-Flags:   none
-Version: 0
-Serial:  4
-Headers:
-  path -> objectpath '/org/gtk/GDBus/TestObject'
-  interface -> 'org.gtk.GDBus.TestInterface'
-  member -> 'GimmeStdout'
-  destination -> ':1.146'
-Body: ()
-UNIX File Descriptors:
-  (none)
-
- -

-or

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
Type:    method-return
-Flags:   no-reply-expected
-Version: 0
-Serial:  477
-Headers:
-  reply-serial -> uint32 4
-  destination -> ':1.159'
-  sender -> ':1.146'
-  num-unix-fds -> uint32 1
-Body: ()
-UNIX File Descriptors:
-  fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

indent

Indentation level.

 
-
-
-

Returns

-

A string that should be freed with g_free().

-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_locked ()

-
gboolean
-g_dbus_message_get_locked (GDBusMessage *message);
-

Checks whether message - is locked. To monitor changes to this -value, conncet to the “notify” signal to listen for changes -on the “locked” property.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

TRUE if message -is locked, FALSE otherwise.

-
-

Since: 2.26

-
-
-
-

g_dbus_message_lock ()

-
void
-g_dbus_message_lock (GDBusMessage *message);
-

If message - is locked, does nothing. Otherwise locks the message.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_message_copy ()

-
GDBusMessage *
-g_dbus_message_copy (GDBusMessage *message,
-                     GError **error);
-

Copies message -. The copy is a deep copy and the returned -GDBusMessage is completely identical except that it is guaranteed -to not be locked.

-

This operation can fail if e.g. message - contains file descriptors -and the per-process or system-wide open files limit is reached.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

error

Return location for error or NULL.

 
-
-
-

Returns

-

A new GDBusMessage or NULL if error -is set. -Free with g_object_unref().

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_byte_order ()

-
GDBusMessageByteOrder
-g_dbus_message_get_byte_order (GDBusMessage *message);
-

Gets the byte order of message -.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

The byte order.

-
-
-
-
-

g_dbus_message_set_byte_order ()

-
void
-g_dbus_message_set_byte_order (GDBusMessage *message,
-                               GDBusMessageByteOrder byte_order);
-

Sets the byte order of message -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

byte_order

The byte order.

 
-
-
-
-
-

g_dbus_message_get_message_type ()

-
GDBusMessageType
-g_dbus_message_get_message_type (GDBusMessage *message);
-

Gets the type of message -.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

A 8-bit unsigned integer (typically a value from the GDBusMessageType enumeration).

-
-

Since: 2.26

-
-
-
-

g_dbus_message_set_message_type ()

-
void
-g_dbus_message_set_message_type (GDBusMessage *message,
-                                 GDBusMessageType type);
-

Sets message - to be of type -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

type

A 8-bit unsigned integer (typically a value from the GDBusMessageType enumeration).

 
-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_serial ()

-
guint32
-g_dbus_message_get_serial (GDBusMessage *message);
-

Gets the serial for message -.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

A guint32.

-
-

Since: 2.26

-
-
-
-

g_dbus_message_set_serial ()

-
void
-g_dbus_message_set_serial (GDBusMessage *message,
-                           guint32 serial);
-

Sets the serial for message -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

serial

A guint32.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_flags ()

-
GDBusMessageFlags
-g_dbus_message_get_flags (GDBusMessage *message);
-

Gets the flags for message -.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

Flags that are set (typically values from the GDBusMessageFlags enumeration bitwise ORed together).

-
-

Since: 2.26

-
-
-
-

g_dbus_message_set_flags ()

-
void
-g_dbus_message_set_flags (GDBusMessage *message,
-                          GDBusMessageFlags flags);
-

Sets the flags to set on message -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

flags

Flags for message -that are set (typically values from the GDBusMessageFlags -enumeration bitwise ORed together).

 
-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_body ()

-
GVariant *
-g_dbus_message_get_body (GDBusMessage *message);
-

Gets the body of a message.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

A GVariant or NULL if the body is -empty. Do not free, it is owned by message -.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_dbus_message_set_body ()

-
void
-g_dbus_message_set_body (GDBusMessage *message,
-                         GVariant *body);
-

Sets the body message -. As a side-effect the -G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the -type string of body - (or cleared if body - is NULL).

-

If body - is floating, message - assumes ownership of body -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

body

Either NULL or a GVariant that is a tuple.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_unix_fd_list ()

-
GUnixFDList *
-g_dbus_message_get_unix_fd_list (GDBusMessage *message);
-

Gets the UNIX file descriptors associated with message -, if any.

-

This method is only available on UNIX.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

A GUnixFDList or NULL if no file descriptors are -associated. Do not free, this object is owned by message -.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_dbus_message_set_unix_fd_list ()

-
void
-g_dbus_message_set_unix_fd_list (GDBusMessage *message,
-                                 GUnixFDList *fd_list);
-

Sets the UNIX file descriptors associated with message -. As a -side-effect the G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header -field is set to the number of fds in fd_list - (or cleared if -fd_list - is NULL).

-

This method is only available on UNIX.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

fd_list

A GUnixFDList or NULL.

[nullable]
-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_num_unix_fds ()

-
guint32
-g_dbus_message_get_num_unix_fds (GDBusMessage *message);
-

Convenience getter for the G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

The value.

-
-

Since: 2.26

-
-
-
-

g_dbus_message_set_num_unix_fds ()

-
void
-g_dbus_message_set_num_unix_fds (GDBusMessage *message,
-                                 guint32 value);
-

Convenience setter for the G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

value

The value to set.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_header_fields ()

-
guchar *
-g_dbus_message_get_header_fields (GDBusMessage *message);
-

Gets an array of all header fields on message - that are set.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

An array of header fields -terminated by G_DBUS_MESSAGE_HEADER_FIELD_INVALID. Each element -is a guchar. Free with g_free().

-

[array zero-terminated=1]

-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_header ()

-
GVariant *
-g_dbus_message_get_header (GDBusMessage *message,
-                           GDBusMessageHeaderField header_field);
-

Gets a header field on message -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

header_field

A 8-bit unsigned integer (typically a value from the GDBusMessageHeaderField enumeration)

 
-
-
-

Returns

-

A GVariant with the value if the header was found, NULL -otherwise. Do not free, it is owned by message -.

-
-

Since: 2.26

-
-
-
-

g_dbus_message_set_header ()

-
void
-g_dbus_message_set_header (GDBusMessage *message,
-                           GDBusMessageHeaderField header_field,
-                           GVariant *value);
-

Sets a header field on message -.

-

If value - is floating, message - assumes ownership of value -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

message

A GDBusMessage.

 

header_field

A 8-bit unsigned integer (typically a value from the GDBusMessageHeaderField enumeration)

 

value

A GVariant to set the header field or NULL to clear the header field.

[nullable]
-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_destination ()

-
const gchar *
-g_dbus_message_get_destination (GDBusMessage *message);
-

Convenience getter for the G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

The value.

-
-

Since: 2.26

-
-
-
-

g_dbus_message_set_destination ()

-
void
-g_dbus_message_set_destination (GDBusMessage *message,
-                                const gchar *value);
-

Convenience setter for the G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

value

The value to set.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_error_name ()

-
const gchar *
-g_dbus_message_get_error_name (GDBusMessage *message);
-

Convenience getter for the G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

The value.

-
-

Since: 2.26

-
-
-
-

g_dbus_message_set_error_name ()

-
void
-g_dbus_message_set_error_name (GDBusMessage *message,
-                               const gchar *value);
-

Convenience setter for the G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

value

The value to set.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_interface ()

-
const gchar *
-g_dbus_message_get_interface (GDBusMessage *message);
-

Convenience getter for the G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

The value.

-
-

Since: 2.26

-
-
-
-

g_dbus_message_set_interface ()

-
void
-g_dbus_message_set_interface (GDBusMessage *message,
-                              const gchar *value);
-

Convenience setter for the G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

value

The value to set.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_member ()

-
const gchar *
-g_dbus_message_get_member (GDBusMessage *message);
-

Convenience getter for the G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

The value.

-
-

Since: 2.26

-
-
-
-

g_dbus_message_set_member ()

-
void
-g_dbus_message_set_member (GDBusMessage *message,
-                           const gchar *value);
-

Convenience setter for the G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

value

The value to set.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_path ()

-
const gchar *
-g_dbus_message_get_path (GDBusMessage *message);
-

Convenience getter for the G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

The value.

-
-

Since: 2.26

-
-
-
-

g_dbus_message_set_path ()

-
void
-g_dbus_message_set_path (GDBusMessage *message,
-                         const gchar *value);
-

Convenience setter for the G_DBUS_MESSAGE_HEADER_FIELD_PATH header field.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

value

The value to set.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_reply_serial ()

-
guint32
-g_dbus_message_get_reply_serial (GDBusMessage *message);
-

Convenience getter for the G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

The value.

-
-

Since: 2.26

-
-
-
-

g_dbus_message_set_reply_serial ()

-
void
-g_dbus_message_set_reply_serial (GDBusMessage *message,
-                                 guint32 value);
-

Convenience setter for the G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

value

The value to set.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_sender ()

-
const gchar *
-g_dbus_message_get_sender (GDBusMessage *message);
-

Convenience getter for the G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

The value.

-
-

Since: 2.26

-
-
-
-

g_dbus_message_set_sender ()

-
void
-g_dbus_message_set_sender (GDBusMessage *message,
-                           const gchar *value);
-

Convenience setter for the G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

value

The value to set.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_signature ()

-
const gchar *
-g_dbus_message_get_signature (GDBusMessage *message);
-

Convenience getter for the G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

The value.

-
-

Since: 2.26

-
-
-
-

g_dbus_message_set_signature ()

-
void
-g_dbus_message_set_signature (GDBusMessage *message,
-                              const gchar *value);
-

Convenience setter for the G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

value

The value to set.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_message_get_arg0 ()

-
const gchar *
-g_dbus_message_get_arg0 (GDBusMessage *message);
-

Convenience to get the first item in the body of message -.

-
-

Parameters

-
----- - - - - - -

message

A GDBusMessage.

 
-
-
-

Returns

-

The string item or NULL if the first item in the body of -message -is not a string.

-
-

Since: 2.26

-
-
-
-

g_dbus_message_to_blob ()

-
guchar *
-g_dbus_message_to_blob (GDBusMessage *message,
-                        gsize *out_size,
-                        GDBusCapabilityFlags capabilities,
-                        GError **error);
-

Serializes message - to a blob. The byte order returned by -g_dbus_message_get_byte_order() will be used.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

message

A GDBusMessage.

 

out_size

Return location for size of generated blob.

 

capabilities

A GDBusCapabilityFlags describing what protocol features are supported.

 

error

Return location for error.

 
-
-
-

Returns

-

A pointer to a -valid binary D-Bus message of out_size -bytes generated by message -or NULL if error -is set. Free with g_free().

-

[array length=out_size][transfer full]

-
-

Since: 2.26

-
-
-
-

g_dbus_message_bytes_needed ()

-
gssize
-g_dbus_message_bytes_needed (guchar *blob,
-                             gsize blob_len,
-                             GError **error);
-

Utility function to calculate how many bytes are needed to -completely deserialize the D-Bus message stored at blob -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

blob

A blob represent a binary D-Bus message.

[array length=blob_len][element-type guint8]

blob_len

The length of blob -(must be at least 16).

 

error

Return location for error or NULL.

 
-
-
-

Returns

-

Number of bytes needed or -1 if error -is set (e.g. if -blob -contains invalid data or not enough data is available to -determine the size).

-
-

Since: 2.26

-
-
-
-

g_dbus_message_new_from_blob ()

-
GDBusMessage *
-g_dbus_message_new_from_blob (guchar *blob,
-                              gsize blob_len,
-                              GDBusCapabilityFlags capabilities,
-                              GError **error);
-

Creates a new GDBusMessage from the data stored at blob -. The byte -order that the message was in can be retrieved using -g_dbus_message_get_byte_order().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

blob

A blob represent a binary D-Bus message.

[array length=blob_len][element-type guint8]

blob_len

The length of blob -.

 

capabilities

A GDBusCapabilityFlags describing what protocol features are supported.

 

error

Return location for error or NULL.

 
-
-
-

Returns

-

A new GDBusMessage or NULL if error -is set. Free with -g_object_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_message_to_gerror ()

-
gboolean
-g_dbus_message_to_gerror (GDBusMessage *message,
-                          GError **error);
-

If message - is not of type G_DBUS_MESSAGE_TYPE_ERROR does -nothing and returns FALSE.

-

Otherwise this method encodes the error in message - as a GError -using g_dbus_error_set_dbus_error() using the information in the -G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of message - as -well as the first string item in message -'s body.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

A GDBusMessage.

 

error

The GError to set.

 
-
-
-

Returns

-

TRUE if error -was set, FALSE otherwise.

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GDBusMessage

-
typedef struct _GDBusMessage GDBusMessage;
-

The GDBusMessage structure contains only private data and should -only be accessed using the provided API.

-

Since: 2.26

-
-
-
-

enum GDBusMessageType

-

Message types used in GDBusMessage.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_DBUS_MESSAGE_TYPE_INVALID

-

Message is of invalid type.

-
 

G_DBUS_MESSAGE_TYPE_METHOD_CALL

-

Method call.

-
 

G_DBUS_MESSAGE_TYPE_METHOD_RETURN

-

Method reply.

-
 

G_DBUS_MESSAGE_TYPE_ERROR

-

Error reply.

-
 

G_DBUS_MESSAGE_TYPE_SIGNAL

-

Signal emission.

-
 
-
-

Since: 2.26

-
-
-
-

enum GDBusMessageFlags

-

Message flags used in GDBusMessage.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_DBUS_MESSAGE_FLAGS_NONE

-

No flags set.

-
 

G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED

-

A reply is not expected.

-
 

G_DBUS_MESSAGE_FLAGS_NO_AUTO_START

-

The bus must not launch an -owner for the destination name in response to this message.

-
 

G_DBUS_MESSAGE_FLAGS_ALLOW_INTERACTIVE_AUTHORIZATION

-

If set on a method -call, this flag means that the caller is prepared to wait for interactive -authorization. Since 2.46.

-
 
-
-

Since: 2.26

-
-
-
-

enum GDBusMessageHeaderField

-

Header fields used in GDBusMessage.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_DBUS_MESSAGE_HEADER_FIELD_INVALID

-

Not a valid header field.

-
 

G_DBUS_MESSAGE_HEADER_FIELD_PATH

-

The object path.

-
 

G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE

-

The interface name.

-
 

G_DBUS_MESSAGE_HEADER_FIELD_MEMBER

-

The method or signal name.

-
 

G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME

-

The name of the error that occurred.

-
 

G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL

-

The serial number the message is a reply to.

-
 

G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION

-

The name the message is intended for.

-
 

G_DBUS_MESSAGE_HEADER_FIELD_SENDER

-

Unique name of the sender of the message (filled in by the bus).

-
 

G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE

-

The signature of the message body.

-
 

G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS

-

The number of UNIX file descriptors that accompany the message.

-
 
-
-

Since: 2.26

-
-
-
-

enum GDBusMessageByteOrder

-

Enumeration used to describe the byte order of a D-Bus message.

-
-

Members

-
----- - - - - - - - - - - - - -

G_DBUS_MESSAGE_BYTE_ORDER_BIG_ENDIAN

-

The byte order is big endian.

-
 

G_DBUS_MESSAGE_BYTE_ORDER_LITTLE_ENDIAN

-

The byte order is little endian.

-
 
-
-

Since: 2.26

-
-
-
-

Property Details

-
-

The “locked” property

-
  “locked”                   gboolean
-

Whether the message is locked.

-

Flags: Read

-

Default value: FALSE

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDBusMethodInvocation.html b/docs/reference/gio/html/GDBusMethodInvocation.html deleted file mode 100644 index 02fb5c53a..000000000 --- a/docs/reference/gio/html/GDBusMethodInvocation.html +++ /dev/null @@ -1,972 +0,0 @@ - - - - -GDBusMethodInvocation: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusMethodInvocation

-

GDBusMethodInvocation — Object for handling remote calls

-
- -
-

Types and Values

-
---- - - - - -
 GDBusMethodInvocation
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GDBusMethodInvocation
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Instances of the GDBusMethodInvocation class are used when -handling D-Bus method calls. It provides a way to asynchronously -return results and errors.

-

The normal way to obtain a GDBusMethodInvocation object is to receive -it as an argument to the handle_method_call() function in a -GDBusInterfaceVTable that was passed to g_dbus_connection_register_object().

-
-
-

Functions

-
-

g_dbus_method_invocation_get_sender ()

-
const gchar *
-g_dbus_method_invocation_get_sender (GDBusMethodInvocation *invocation);
-

Gets the bus name that invoked the method.

-
-

Parameters

-
----- - - - - - -

invocation

A GDBusMethodInvocation.

 
-
-
-

Returns

-

A string. Do not free, it is owned by invocation -.

-
-

Since: 2.26

-
-
-
-

g_dbus_method_invocation_get_object_path ()

-
const gchar *
-g_dbus_method_invocation_get_object_path
-                               (GDBusMethodInvocation *invocation);
-

Gets the object path the method was invoked on.

-
-

Parameters

-
----- - - - - - -

invocation

A GDBusMethodInvocation.

 
-
-
-

Returns

-

A string. Do not free, it is owned by invocation -.

-
-

Since: 2.26

-
-
-
-

g_dbus_method_invocation_get_interface_name ()

-
const gchar *
-g_dbus_method_invocation_get_interface_name
-                               (GDBusMethodInvocation *invocation);
-

Gets the name of the D-Bus interface the method was invoked on.

-

If this method call is a property Get, Set or GetAll call that has -been redirected to the method call handler then -"org.freedesktop.DBus.Properties" will be returned. See -GDBusInterfaceVTable for more information.

-
-

Parameters

-
----- - - - - - -

invocation

A GDBusMethodInvocation.

 
-
-
-

Returns

-

A string. Do not free, it is owned by invocation -.

-
-

Since: 2.26

-
-
-
-

g_dbus_method_invocation_get_method_name ()

-
const gchar *
-g_dbus_method_invocation_get_method_name
-                               (GDBusMethodInvocation *invocation);
-

Gets the name of the method that was invoked.

-
-

Parameters

-
----- - - - - - -

invocation

A GDBusMethodInvocation.

 
-
-
-

Returns

-

A string. Do not free, it is owned by invocation -.

-
-

Since: 2.26

-
-
-
-

g_dbus_method_invocation_get_method_info ()

-
const GDBusMethodInfo *
-g_dbus_method_invocation_get_method_info
-                               (GDBusMethodInvocation *invocation);
-

Gets information about the method call, if any.

-

If this method invocation is a property Get, Set or GetAll call that -has been redirected to the method call handler then NULL will be -returned. See g_dbus_method_invocation_get_property_info() and -GDBusInterfaceVTable for more information.

-
-

Parameters

-
----- - - - - - -

invocation

A GDBusMethodInvocation.

 
-
-
-

Returns

-

A GDBusMethodInfo or NULL. Do not free, it is owned by invocation -.

-
-

Since: 2.26

-
-
-
-

g_dbus_method_invocation_get_property_info ()

-
const GDBusPropertyInfo *
-g_dbus_method_invocation_get_property_info
-                               (GDBusMethodInvocation *invocation);
-

Gets information about the property that this method call is for, if -any.

-

This will only be set in the case of an invocation in response to a -property Get or Set call that has been directed to the method call -handler for an object on account of its property_get() or -property_set() vtable pointers being unset.

-

See GDBusInterfaceVTable for more information.

-

If the call was GetAll, NULL will be returned.

-
-

Parameters

-
----- - - - - - -

invocation

A GDBusMethodInvocation

 
-
-
-

Returns

-

a GDBusPropertyInfo or NULL.

-

[transfer none]

-
-

Since: 2.38

-
-
-
-

g_dbus_method_invocation_get_connection ()

-
GDBusConnection *
-g_dbus_method_invocation_get_connection
-                               (GDBusMethodInvocation *invocation);
-

Gets the GDBusConnection the method was invoked on.

-
-

Parameters

-
----- - - - - - -

invocation

A GDBusMethodInvocation.

 
-
-
-

Returns

-

A GDBusConnection. Do not free, it is owned by invocation -.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_dbus_method_invocation_get_message ()

-
GDBusMessage *
-g_dbus_method_invocation_get_message (GDBusMethodInvocation *invocation);
-

Gets the GDBusMessage for the method invocation. This is useful if -you need to use low-level protocol features, such as UNIX file -descriptor passing, that cannot be properly expressed in the -GVariant API.

-

See this server and client -for an example of how to use this low-level API to send and receive -UNIX file descriptors.

-
-

Parameters

-
----- - - - - - -

invocation

A GDBusMethodInvocation.

 
-
-
-

Returns

-

GDBusMessage. Do not free, it is owned by invocation -.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_dbus_method_invocation_get_parameters ()

-
GVariant *
-g_dbus_method_invocation_get_parameters
-                               (GDBusMethodInvocation *invocation);
-

Gets the parameters of the method invocation. If there are no input -parameters then this will return a GVariant with 0 children rather than NULL.

-
-

Parameters

-
----- - - - - - -

invocation

A GDBusMethodInvocation.

 
-
-
-

Returns

-

A GVariant tuple. Do not unref this because it is owned by invocation -.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_dbus_method_invocation_get_user_data ()

-
gpointer
-g_dbus_method_invocation_get_user_data
-                               (GDBusMethodInvocation *invocation);
-

Gets the user_data - gpointer passed to g_dbus_connection_register_object().

-

[skip]

-
-

Parameters

-
----- - - - - - -

invocation

A GDBusMethodInvocation.

 
-
-
-

Returns

-

A gpointer.

-
-

Since: 2.26

-
-
-
-

g_dbus_method_invocation_return_value ()

-
void
-g_dbus_method_invocation_return_value (GDBusMethodInvocation *invocation,
-                                       GVariant *parameters);
-

Finishes handling a D-Bus method call by returning parameters -. -If the parameters - GVariant is floating, it is consumed.

-

It is an error if parameters - is not of the right format: it must be a tuple -containing the out-parameters of the D-Bus method. Even if the method has a -single out-parameter, it must be contained in a tuple. If the method has no -out-parameters, parameters - may be NULL or an empty tuple.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
GDBusMethodInvocation *invocation = some_invocation;
-g_autofree gchar *result_string = NULL;
-g_autoptr (GError) error = NULL;
-
-result_string = calculate_result (&error);
-
-if (error != NULL)
-  g_dbus_method_invocation_return_gerror (invocation, error);
-else
-  g_dbus_method_invocation_return_value (invocation,
-                                         g_variant_new ("(s)", result_string));
-
-/<!-- -->* Do not free @invocation here; returning a value does that *<!-- -->/
-
- -

-

This method will take ownership of invocation -. See -GDBusInterfaceVTable for more information about the ownership of -invocation -.

-

Since 2.48, if the method call requested for a reply not to be sent -then this call will sink parameters - and free invocation -, but -otherwise do nothing (as per the recommendations of the D-Bus -specification).

-
-

Parameters

-
----- - - - - - - - - - - - - -

invocation

A GDBusMethodInvocation.

[transfer full]

parameters

A GVariant tuple with out parameters for the method or NULL if not passing any parameters.

[nullable]
-
-

Since: 2.26

-
-
-
-

g_dbus_method_invocation_return_error ()

-
void
-g_dbus_method_invocation_return_error (GDBusMethodInvocation *invocation,
-                                       GQuark domain,
-                                       gint code,
-                                       const gchar *format,
-                                       ...);
-

Finishes handling a D-Bus method call by returning an error.

-

See g_dbus_error_encode_gerror() for details about what error name -will be returned on the wire. In a nutshell, if the given error is -registered using g_dbus_error_register_error() the name given -during registration is used. Otherwise, a name of the form -org.gtk.GDBus.UnmappedGError.Quark... is used. This provides -transparent mapping of GError between applications using GDBus.

-

If you are writing an application intended to be portable, -always register errors with g_dbus_error_register_error() -or use g_dbus_method_invocation_return_dbus_error().

-

This method will take ownership of invocation -. See -GDBusInterfaceVTable for more information about the ownership of -invocation -.

-

Since 2.48, if the method call requested for a reply not to be sent -then this call will free invocation - but otherwise do nothing (as per -the recommendations of the D-Bus specification).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

invocation

A GDBusMethodInvocation.

[transfer full]

domain

A GQuark for the GError error domain.

 

code

The error code.

 

format

printf()-style format.

 

...

Parameters for format -.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_method_invocation_return_error_valist ()

-
void
-g_dbus_method_invocation_return_error_valist
-                               (GDBusMethodInvocation *invocation,
-                                GQuark domain,
-                                gint code,
-                                const gchar *format,
-                                va_list var_args);
-

Like g_dbus_method_invocation_return_error() but intended for -language bindings.

-

This method will take ownership of invocation -. See -GDBusInterfaceVTable for more information about the ownership of -invocation -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

invocation

A GDBusMethodInvocation.

[transfer full]

domain

A GQuark for the GError error domain.

 

code

The error code.

 

format

printf()-style format.

 

var_args

va_list of parameters for format -.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_method_invocation_return_error_literal ()

-
void
-g_dbus_method_invocation_return_error_literal
-                               (GDBusMethodInvocation *invocation,
-                                GQuark domain,
-                                gint code,
-                                const gchar *message);
-

Like g_dbus_method_invocation_return_error() but without printf()-style formatting.

-

This method will take ownership of invocation -. See -GDBusInterfaceVTable for more information about the ownership of -invocation -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

invocation

A GDBusMethodInvocation.

[transfer full]

domain

A GQuark for the GError error domain.

 

code

The error code.

 

message

The error message.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_method_invocation_return_gerror ()

-
void
-g_dbus_method_invocation_return_gerror
-                               (GDBusMethodInvocation *invocation,
-                                const GError *error);
-

Like g_dbus_method_invocation_return_error() but takes a GError -instead of the error domain, error code and message.

-

This method will take ownership of invocation -. See -GDBusInterfaceVTable for more information about the ownership of -invocation -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

invocation

A GDBusMethodInvocation.

[transfer full]

error

A GError.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_method_invocation_return_dbus_error ()

-
void
-g_dbus_method_invocation_return_dbus_error
-                               (GDBusMethodInvocation *invocation,
-                                const gchar *error_name,
-                                const gchar *error_message);
-

Finishes handling a D-Bus method call by returning an error.

-

This method will take ownership of invocation -. See -GDBusInterfaceVTable for more information about the ownership of -invocation -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

invocation

A GDBusMethodInvocation.

[transfer full]

error_name

A valid D-Bus error name.

 

error_message

A valid D-Bus error message.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_method_invocation_take_error ()

-
void
-g_dbus_method_invocation_take_error (GDBusMethodInvocation *invocation,
-                                     GError *error);
-

Like g_dbus_method_invocation_return_gerror() but takes ownership -of error - so the caller does not need to free it.

-

This method will take ownership of invocation -. See -GDBusInterfaceVTable for more information about the ownership of -invocation -.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

invocation

A GDBusMethodInvocation.

[transfer full]

error

A GError.

[transfer full]
-
-

Since: 2.30

-
-
-
-

g_dbus_method_invocation_return_value_with_unix_fd_list ()

-
void
-g_dbus_method_invocation_return_value_with_unix_fd_list
-                               (GDBusMethodInvocation *invocation,
-                                GVariant *parameters,
-                                GUnixFDList *fd_list);
-

Like g_dbus_method_invocation_return_value() but also takes a GUnixFDList.

-

This method is only available on UNIX.

-

This method will take ownership of invocation -. See -GDBusInterfaceVTable for more information about the ownership of -invocation -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

invocation

A GDBusMethodInvocation.

[transfer full]

parameters

A GVariant tuple with out parameters for the method or NULL if not passing any parameters.

[nullable]

fd_list

A GUnixFDList or NULL.

[nullable]
-
-

Since: 2.30

-
-
-
-

Types and Values

-
-

GDBusMethodInvocation

-
typedef struct _GDBusMethodInvocation GDBusMethodInvocation;
-

The GDBusMethodInvocation structure contains only private data and -should only be accessed using the provided API.

-

Since: 2.26

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDBusObject.html b/docs/reference/gio/html/GDBusObject.html deleted file mode 100644 index c23286d29..000000000 --- a/docs/reference/gio/html/GDBusObject.html +++ /dev/null @@ -1,403 +0,0 @@ - - - - -GDBusObject: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusObject

-

GDBusObject — Base type for D-Bus objects

-
-
-

Functions

-
---- - - - - - - - - - - - - - - -
const gchar * - -g_dbus_object_get_object_path () -
-GList * - -g_dbus_object_get_interfaces () -
-GDBusInterface * - -g_dbus_object_get_interface () -
-
-
-

Signals

-
----- - - - - - - - - - - - - -
voidinterface-addedRun Last
voidinterface-removedRun Last
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GDBusObject
structGDBusObjectIface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GDBusObject
-
-
-
-

Prerequisites

-

-GDBusObject requires - GObject.

-
-
-

Known Implementations

-

-GDBusObject is implemented by - GDBusObjectProxy and GDBusObjectSkeleton.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

The GDBusObject type is the base type for D-Bus objects on both -the service side (see GDBusObjectSkeleton) and the client side -(see GDBusObjectProxy). It is essentially just a container of -interfaces.

-
-
-

Functions

-
-

g_dbus_object_get_object_path ()

-
const gchar *
-g_dbus_object_get_object_path (GDBusObject *object);
-

Gets the object path for object -.

-
-

Parameters

-
----- - - - - - -

object

A GDBusObject.

 
-
-
-

Returns

-

A string owned by object -. Do not free.

-
-

Since: 2.30

-
-
-
-

g_dbus_object_get_interfaces ()

-
GList *
-g_dbus_object_get_interfaces (GDBusObject *object);
-

Gets the D-Bus interfaces associated with object -.

-
-

Parameters

-
----- - - - - - -

object

A GDBusObject.

 
-
-
-

Returns

-

(element-type GDBusInterface) (transfer full) : A list of GDBusInterface instances. -The returned list must be freed by g_list_free() after each element has been freed -with g_object_unref().

-
-

Since: 2.30

-
-
-
-

g_dbus_object_get_interface ()

-
GDBusInterface *
-g_dbus_object_get_interface (GDBusObject *object,
-                             const gchar *interface_name);
-

Gets the D-Bus interface with name interface_name - associated with -object -, if any.

-
-

Parameters

-
----- - - - - - - - - - - - - -

object

A GDBusObject.

 

interface_name

A D-Bus interface name.

 
-
-
-

Returns

-

NULL if not found, otherwise a -GDBusInterface that must be freed with g_object_unref().

-

[transfer full]

-
-

Since: 2.30

-
-
-
-

Types and Values

-
-

GDBusObject

-
typedef struct _GDBusObject GDBusObject;
-

GDBusObject is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

struct GDBusObjectIface

-
struct GDBusObjectIface {
-  GTypeInterface parent_iface;
-
-  /* Virtual Functions */
-  const gchar     *(*get_object_path) (GDBusObject  *object);
-  GList           *(*get_interfaces)  (GDBusObject  *object);
-  GDBusInterface  *(*get_interface)   (GDBusObject  *object,
-                                       const gchar  *interface_name);
-
-  /* Signals */
-  void (*interface_added)   (GDBusObject     *object,
-                             GDBusInterface  *interface_);
-  void (*interface_removed) (GDBusObject     *object,
-                             GDBusInterface  *interface_);
-};
-
-

Base object type for D-Bus objects.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

GTypeInterface parent_iface;

The parent interface.

 

get_object_path ()

Returns the object path. See g_dbus_object_get_object_path().

 

get_interfaces ()

Returns all interfaces. See g_dbus_object_get_interfaces().

 

get_interface ()

Returns an interface by name. See g_dbus_object_get_interface().

 

interface_added ()

Signal handler for the “interface-added” signal.

 

interface_removed ()

Signal handler for the “interface-removed” signal.

 
-
-

Since: 2.30

-
-
-
-

Signal Details

-
-

The “interface-added” signal

-
void
-user_function (GDBusObject    *object,
-               GDBusInterface *interface,
-               gpointer        user_data)
-

Emitted when interface - is added to object -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

The GDBusObject emitting the signal.

 

interface

The GDBusInterface that was added.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.30

-
-
-
-

The “interface-removed” signal

-
void
-user_function (GDBusObject    *object,
-               GDBusInterface *interface,
-               gpointer        user_data)
-

Emitted when interface - is removed from object -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

The GDBusObject emitting the signal.

 

interface

The GDBusInterface that was removed.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.30

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDBusObjectManager.html b/docs/reference/gio/html/GDBusObjectManager.html deleted file mode 100644 index 78bcbb880..000000000 --- a/docs/reference/gio/html/GDBusObjectManager.html +++ /dev/null @@ -1,592 +0,0 @@ - - - - -GDBusObjectManager: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusObjectManager

-

GDBusObjectManager — Base type for D-Bus object managers

-
-
-

Functions

- -
-
-

Signals

-
----- - - - - - - - - - - - - - - - - - - - - - - -
voidinterface-addedRun Last
voidinterface-removedRun Last
voidobject-addedRun Last
voidobject-removedRun Last
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GDBusObjectManager
structGDBusObjectManagerIface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GDBusObjectManager
-
-
-
-

Prerequisites

-

-GDBusObjectManager requires - GObject.

-
-
-

Known Implementations

-

-GDBusObjectManager is implemented by - GDBusObjectManagerClient and GDBusObjectManagerServer.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

The GDBusObjectManager type is the base type for service- and -client-side implementations of the standardized -org.freedesktop.DBus.ObjectManager -interface.

-

See GDBusObjectManagerClient for the client-side implementation -and GDBusObjectManagerServer for the service-side implementation.

-
-
-

Functions

-
-

g_dbus_object_manager_get_object_path ()

-
const gchar *
-g_dbus_object_manager_get_object_path (GDBusObjectManager *manager);
-

Gets the object path that manager - is for.

-
-

Parameters

-
----- - - - - - -

manager

A GDBusObjectManager.

 
-
-
-

Returns

-

A string owned by manager -. Do not free.

-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_get_objects ()

-
GList *
-g_dbus_object_manager_get_objects (GDBusObjectManager *manager);
-

Gets all GDBusObject objects known to manager -.

-
-

Parameters

-
----- - - - - - -

manager

A GDBusObjectManager.

 
-
-
-

Returns

-

A list of -GDBusObject objects. The returned list should be freed with -g_list_free() after each element has been freed with -g_object_unref().

-

[transfer full][element-type GDBusObject]

-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_get_object ()

-
GDBusObject *
-g_dbus_object_manager_get_object (GDBusObjectManager *manager,
-                                  const gchar *object_path);
-

Gets the GDBusObjectProxy at object_path -, if any.

-
-

Parameters

-
----- - - - - - - - - - - - - -

manager

A GDBusObjectManager.

 

object_path

Object path to lookup.

 
-
-
-

Returns

-

A GDBusObject or NULL. Free with -g_object_unref().

-

[transfer full]

-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_get_interface ()

-
GDBusInterface *
-g_dbus_object_manager_get_interface (GDBusObjectManager *manager,
-                                     const gchar *object_path,
-                                     const gchar *interface_name);
-

Gets the interface proxy for interface_name - at object_path -, if -any.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

manager

A GDBusObjectManager.

 

object_path

Object path to lookup.

 

interface_name

D-Bus interface name to lookup.

 
-
-
-

Returns

-

A GDBusInterface instance or NULL. Free -with g_object_unref().

-

[transfer full]

-
-

Since: 2.30

-
-
-
-

Types and Values

-
-

GDBusObjectManager

-
typedef struct _GDBusObjectManager GDBusObjectManager;
-

GDBusObjectManager is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

struct GDBusObjectManagerIface

-
struct GDBusObjectManagerIface {
-  GTypeInterface parent_iface;
-
-  /* Virtual Functions */
-  const gchar     *(*get_object_path) (GDBusObjectManager    *manager);
-  GList           *(*get_objects)     (GDBusObjectManager    *manager);
-  GDBusObject     *(*get_object)      (GDBusObjectManager    *manager,
-                                       const gchar           *object_path);
-  GDBusInterface  *(*get_interface)   (GDBusObjectManager    *manager,
-                                       const gchar           *object_path,
-                                       const gchar           *interface_name);
-
-  /* Signals */
-  void    (*object_added)                 (GDBusObjectManager   *manager,
-                                           GDBusObject          *object);
-  void    (*object_removed)               (GDBusObjectManager   *manager,
-                                           GDBusObject          *object);
-
-  void    (*interface_added)              (GDBusObjectManager   *manager,
-                                           GDBusObject          *object,
-                                           GDBusInterface       *interface_);
-  void    (*interface_removed)            (GDBusObjectManager   *manager,
-                                           GDBusObject          *object,
-                                           GDBusInterface       *interface_);
-};
-
-

Base type for D-Bus object managers.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

GTypeInterface parent_iface;

The parent interface.

 

get_object_path ()

Virtual function for g_dbus_object_manager_get_object_path().

 

get_objects ()

Virtual function for g_dbus_object_manager_get_objects().

 

get_object ()

Virtual function for g_dbus_object_manager_get_object().

 

get_interface ()

Virtual function for g_dbus_object_manager_get_interface().

 

object_added ()

Signal handler for the “object-added” signal.

 

object_removed ()

Signal handler for the “object-removed” signal.

 

interface_added ()

Signal handler for the “interface-added” signal.

 

interface_removed ()

Signal handler for the “interface-removed” signal.

 
-
-

Since: 2.30

-
-
-
-

Signal Details

-
-

The “interface-added” signal

-
void
-user_function (GDBusObjectManager *manager,
-               GDBusObject        *object,
-               GDBusInterface     *interface,
-               gpointer            user_data)
-

Emitted when interface - is added to object -.

-

This signal exists purely as a convenience to avoid having to -connect signals to all objects managed by manager -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

manager

The GDBusObjectManager emitting the signal.

 

object

The GDBusObject on which an interface was added.

 

interface

The GDBusInterface that was added.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.30

-
-
-
-

The “interface-removed” signal

-
void
-user_function (GDBusObjectManager *manager,
-               GDBusObject        *object,
-               GDBusInterface     *interface,
-               gpointer            user_data)
-

Emitted when interface - has been removed from object -.

-

This signal exists purely as a convenience to avoid having to -connect signals to all objects managed by manager -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

manager

The GDBusObjectManager emitting the signal.

 

object

The GDBusObject on which an interface was removed.

 

interface

The GDBusInterface that was removed.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.30

-
-
-
-

The “object-added” signal

-
void
-user_function (GDBusObjectManager *manager,
-               GDBusObject        *object,
-               gpointer            user_data)
-

Emitted when object - is added to manager -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

manager

The GDBusObjectManager emitting the signal.

 

object

The GDBusObject that was added.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.30

-
-
-
-

The “object-removed” signal

-
void
-user_function (GDBusObjectManager *manager,
-               GDBusObject        *object,
-               gpointer            user_data)
-

Emitted when object - is removed from manager -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

manager

The GDBusObjectManager emitting the signal.

 

object

The GDBusObject that was removed.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.30

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDBusObjectManagerClient.html b/docs/reference/gio/html/GDBusObjectManagerClient.html deleted file mode 100644 index 9dc5fb945..000000000 --- a/docs/reference/gio/html/GDBusObjectManagerClient.html +++ /dev/null @@ -1,1270 +0,0 @@ - - - - -GDBusObjectManagerClient: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusObjectManagerClient

-

GDBusObjectManagerClient — Client-side object manager

-
- -
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GBusTypebus-typeWrite / Construct Only
-GDBusConnection *connectionRead / Write / Construct Only
GDBusObjectManagerClientFlagsflagsRead / Write / Construct Only
gpointerget-proxy-type-destroy-notifyRead / Write / Construct Only
gpointerget-proxy-type-funcRead / Write / Construct Only
gpointerget-proxy-type-user-dataRead / Write / Construct Only
-gchar *nameRead / Write / Construct Only
-gchar *name-ownerRead
-gchar *object-pathRead / Write / Construct Only
-
-
-

Signals

- -
-
-

Types and Values

- -
-
-

Object Hierarchy

-
    GObject
-    ╰── GDBusObjectManagerClient
-
-
-
-

Implemented Interfaces

-

-GDBusObjectManagerClient implements - GInitable, GAsyncInitable and GDBusObjectManager.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GDBusObjectManagerClient is used to create, monitor and delete object -proxies for remote objects exported by a GDBusObjectManagerServer (or any -code implementing the -org.freedesktop.DBus.ObjectManager -interface).

-

Once an instance of this type has been created, you can connect to -the “object-added” and -“object-removed” signals and inspect the -GDBusObjectProxy objects returned by -g_dbus_object_manager_get_objects().

-

If the name for a GDBusObjectManagerClient is not owned by anyone at -object construction time, the default behavior is to request the -message bus to launch an owner for the name. This behavior can be -disabled using the G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START -flag. It's also worth noting that this only works if the name of -interest is activatable in the first place. E.g. in some cases it -is not possible to launch an owner for the requested name. In this -case, GDBusObjectManagerClient object construction still succeeds but -there will be no object proxies -(e.g. g_dbus_object_manager_get_objects() returns the empty list) and -the “name-owner” property is NULL.

-

The owner of the requested name can come and go (for example -consider a system service being restarted) – GDBusObjectManagerClient -handles this case too; simply connect to the “notify” -signal to watch for changes on the “name-owner” -property. When the name owner vanishes, the behavior is that -“name-owner” is set to NULL (this includes -emission of the “notify” signal) and then -“object-removed” signals are synthesized -for all currently existing object proxies. Since -“name-owner” is NULL when this happens, you can -use this information to disambiguate a synthesized signal from a -genuine signal caused by object removal on the remote -GDBusObjectManager. Similarly, when a new name owner appears, -“object-added” signals are synthesized -while “name-owner” is still NULL. Only when all -object proxies have been added, the “name-owner” -is set to the new name owner (this includes emission of the -“notify” signal). Furthermore, you are guaranteed that -“name-owner” will alternate between a name owner -(e.g. :1.42) and NULL even in the case where -the name of interest is atomically replaced

-

Ultimately, GDBusObjectManagerClient is used to obtain GDBusProxy -instances. All signals (including the -org.freedesktop.DBus.Properties::PropertiesChanged signal) -delivered to GDBusProxy instances are guaranteed to originate -from the name owner. This guarantee along with the behavior -described above, means that certain race conditions including the -"half the proxy is from the old owner and the other half is from -the new owner" problem cannot happen.

-

To avoid having the application connect to signals on the returned -GDBusObjectProxy and GDBusProxy objects, the -“interface-added”, -“interface-removed”, -“g-properties-changed” and -“g-signal” signals -are also emitted on the GDBusObjectManagerClient instance managing these -objects. The signals emitted are -“interface-added”, -“interface-removed”, -“interface-proxy-properties-changed” and -“interface-proxy-signal”.

-

Note that all callbacks and signals are emitted in the -thread-default main context -that the GDBusObjectManagerClient object was constructed -in. Additionally, the GDBusObjectProxy and GDBusProxy objects -originating from the GDBusObjectManagerClient object will be created in -the same context and, consequently, will deliver signals in the -same main loop.

-
-
-

Functions

-
-

GDBusProxyTypeFunc ()

-
GType
-(*GDBusProxyTypeFunc) (GDBusObjectManagerClient *manager,
-                       const gchar *object_path,
-                       const gchar *interface_name,
-                       gpointer user_data);
-

Function signature for a function used to determine the GType to -use for an interface proxy (if interface_name - is not NULL) or -object proxy (if interface_name - is NULL).

-

This function is called in the -thread-default main loop -that manager - was constructed in.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

manager

A GDBusObjectManagerClient.

 

object_path

The object path of the remote object.

 

interface_name

The interface name of the remote object or NULL if a GDBusObjectProxy GType is requested.

[nullable]

user_data

User data.

 
-
-
-

Returns

-

A GType to use for the remote object. The returned type -must be a GDBusProxy or GDBusObjectProxy -derived -type.

-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_client_new ()

-
void
-g_dbus_object_manager_client_new (GDBusConnection *connection,
-                                  GDBusObjectManagerClientFlags flags,
-                                  const gchar *name,
-                                  const gchar *object_path,
-                                  GDBusProxyTypeFunc get_proxy_type_func,
-                                  gpointer get_proxy_type_user_data,
-                                  GDestroyNotify get_proxy_type_destroy_notify,
-                                  GCancellable *cancellable,
-                                  GAsyncReadyCallback callback,
-                                  gpointer user_data);
-

Asynchronously creates a new GDBusObjectManagerClient object.

-

This is an asynchronous failable constructor. When the result is -ready, callback - will be invoked in the -thread-default main context -of the thread you are calling this method from. You can -then call g_dbus_object_manager_client_new_finish() to get the result. See -g_dbus_object_manager_client_new_sync() for the synchronous version.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

A GDBusConnection.

 

flags

Zero or more flags from the GDBusObjectManagerClientFlags enumeration.

 

name

The owner of the control object (unique or well-known name).

 

object_path

The object path of the control object.

 

get_proxy_type_func

A GDBusProxyTypeFunc function or NULL to always construct GDBusProxy proxies.

[nullable]

get_proxy_type_user_data

User data to pass to get_proxy_type_func -.

 

get_proxy_type_destroy_notify

Free function for get_proxy_type_user_data -or NULL.

[nullable]

cancellable

A GCancellable or NULL.

[nullable]

callback

A GAsyncReadyCallback to call when the request is satisfied.

 

user_data

The data to pass to callback -.

 
-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_client_new_finish ()

-
GDBusObjectManager *
-g_dbus_object_manager_client_new_finish
-                               (GAsyncResult *res,
-                                GError **error);
-

Finishes an operation started with g_dbus_object_manager_client_new().

-
-

Parameters

-
----- - - - - - - - - - - - - -

res

A GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_object_manager_client_new().

 

error

Return location for error or NULL.

 
-
-
-

Returns

-

A -GDBusObjectManagerClient object or NULL if error -is set. Free -with g_object_unref().

-

[transfer full][type GDBusObjectManagerClient]

-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_client_new_sync ()

-
GDBusObjectManager *
-g_dbus_object_manager_client_new_sync (GDBusConnection *connection,
-                                       GDBusObjectManagerClientFlags flags,
-                                       const gchar *name,
-                                       const gchar *object_path,
-                                       GDBusProxyTypeFunc get_proxy_type_func,
-                                       gpointer get_proxy_type_user_data,
-                                       GDestroyNotify get_proxy_type_destroy_notify,
-                                       GCancellable *cancellable,
-                                       GError **error);
-

Creates a new GDBusObjectManagerClient object.

-

This is a synchronous failable constructor - the calling thread is -blocked until a reply is received. See g_dbus_object_manager_client_new() -for the asynchronous version.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

A GDBusConnection.

 

flags

Zero or more flags from the GDBusObjectManagerClientFlags enumeration.

 

name

The owner of the control object (unique or well-known name), or NULL when not using a message bus connection.

[nullable]

object_path

The object path of the control object.

 

get_proxy_type_func

A GDBusProxyTypeFunc function or NULL to always construct GDBusProxy proxies.

[nullable]

get_proxy_type_user_data

User data to pass to get_proxy_type_func -.

 

get_proxy_type_destroy_notify

Free function for get_proxy_type_user_data -or NULL.

[nullable]

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL.

 
-
-
-

Returns

-

A -GDBusObjectManagerClient object or NULL if error -is set. Free -with g_object_unref().

-

[transfer full][type GDBusObjectManagerClient]

-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_client_new_for_bus ()

-
void
-g_dbus_object_manager_client_new_for_bus
-                               (GBusType bus_type,
-                                GDBusObjectManagerClientFlags flags,
-                                const gchar *name,
-                                const gchar *object_path,
-                                GDBusProxyTypeFunc get_proxy_type_func,
-                                gpointer get_proxy_type_user_data,
-                                GDestroyNotify get_proxy_type_destroy_notify,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

Like g_dbus_object_manager_client_new() but takes a GBusType instead of a -GDBusConnection.

-

This is an asynchronous failable constructor. When the result is -ready, callback - will be invoked in the -thread-default main loop -of the thread you are calling this method from. You can -then call g_dbus_object_manager_client_new_for_bus_finish() to get the result. See -g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

bus_type

A GBusType.

 

flags

Zero or more flags from the GDBusObjectManagerClientFlags enumeration.

 

name

The owner of the control object (unique or well-known name).

 

object_path

The object path of the control object.

 

get_proxy_type_func

A GDBusProxyTypeFunc function or NULL to always construct GDBusProxy proxies.

[nullable]

get_proxy_type_user_data

User data to pass to get_proxy_type_func -.

 

get_proxy_type_destroy_notify

Free function for get_proxy_type_user_data -or NULL.

[nullable]

cancellable

A GCancellable or NULL.

[nullable]

callback

A GAsyncReadyCallback to call when the request is satisfied.

 

user_data

The data to pass to callback -.

 
-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_client_new_for_bus_finish ()

-
GDBusObjectManager *
-g_dbus_object_manager_client_new_for_bus_finish
-                               (GAsyncResult *res,
-                                GError **error);
-

Finishes an operation started with g_dbus_object_manager_client_new_for_bus().

-
-

Parameters

-
----- - - - - - - - - - - - - -

res

A GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_object_manager_client_new_for_bus().

 

error

Return location for error or NULL.

 
-
-
-

Returns

-

A -GDBusObjectManagerClient object or NULL if error -is set. Free -with g_object_unref().

-

[transfer full][type GDBusObjectManagerClient]

-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_client_new_for_bus_sync ()

-
GDBusObjectManager *
-g_dbus_object_manager_client_new_for_bus_sync
-                               (GBusType bus_type,
-                                GDBusObjectManagerClientFlags flags,
-                                const gchar *name,
-                                const gchar *object_path,
-                                GDBusProxyTypeFunc get_proxy_type_func,
-                                gpointer get_proxy_type_user_data,
-                                GDestroyNotify get_proxy_type_destroy_notify,
-                                GCancellable *cancellable,
-                                GError **error);
-

Like g_dbus_object_manager_client_new_sync() but takes a GBusType instead -of a GDBusConnection.

-

This is a synchronous failable constructor - the calling thread is -blocked until a reply is received. See g_dbus_object_manager_client_new_for_bus() -for the asynchronous version.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

bus_type

A GBusType.

 

flags

Zero or more flags from the GDBusObjectManagerClientFlags enumeration.

 

name

The owner of the control object (unique or well-known name).

 

object_path

The object path of the control object.

 

get_proxy_type_func

A GDBusProxyTypeFunc function or NULL to always construct GDBusProxy proxies.

[nullable]

get_proxy_type_user_data

User data to pass to get_proxy_type_func -.

 

get_proxy_type_destroy_notify

Free function for get_proxy_type_user_data -or NULL.

[nullable]

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL.

 
-
-
-

Returns

-

A -GDBusObjectManagerClient object or NULL if error -is set. Free -with g_object_unref().

-

[transfer full][type GDBusObjectManagerClient]

-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_client_get_connection ()

-
GDBusConnection *
-g_dbus_object_manager_client_get_connection
-                               (GDBusObjectManagerClient *manager);
-

Gets the GDBusConnection used by manager -.

-
-

Parameters

-
----- - - - - - -

manager

A GDBusObjectManagerClient

 
-
-
-

Returns

-

A GDBusConnection object. Do not free, -the object belongs to manager -.

-

[transfer none]

-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_client_get_flags ()

-
GDBusObjectManagerClientFlags
-g_dbus_object_manager_client_get_flags
-                               (GDBusObjectManagerClient *manager);
-

Gets the flags that manager - was constructed with.

-
-

Parameters

-
----- - - - - - -

manager

A GDBusObjectManagerClient

 
-
-
-

Returns

-

Zero of more flags from the GDBusObjectManagerClientFlags -enumeration.

-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_client_get_name ()

-
const gchar *
-g_dbus_object_manager_client_get_name (GDBusObjectManagerClient *manager);
-

Gets the name that manager - is for, or NULL if not a message bus -connection.

-
-

Parameters

-
----- - - - - - -

manager

A GDBusObjectManagerClient

 
-
-
-

Returns

-

A unique or well-known name. Do not free, the string -belongs to manager -.

-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_client_get_name_owner ()

-
gchar *
-g_dbus_object_manager_client_get_name_owner
-                               (GDBusObjectManagerClient *manager);
-

The unique name that owns the name that manager - is for or NULL if -no-one currently owns that name. You can connect to the -“notify” signal to track changes to the -“name-owner” property.

-
-

Parameters

-
----- - - - - - -

manager

A GDBusObjectManagerClient.

 
-
-
-

Returns

-

The name owner or NULL if no name owner -exists. Free with g_free().

-

[nullable]

-
-

Since: 2.30

-
-
-
-

Types and Values

-
-

GDBusObjectManagerClient

-
typedef struct _GDBusObjectManagerClient GDBusObjectManagerClient;
-

The GDBusObjectManagerClient structure contains private data and should -only be accessed using the provided API.

-

Since: 2.30

-
-
-
-

struct GDBusObjectManagerClientClass

-
struct GDBusObjectManagerClientClass {
-  GObjectClass parent_class;
-
-  /* signals */
-  void    (*interface_proxy_signal)             (GDBusObjectManagerClient *manager,
-                                                 GDBusObjectProxy         *object_proxy,
-                                                 GDBusProxy               *interface_proxy,
-                                                 const gchar              *sender_name,
-                                                 const gchar              *signal_name,
-                                                 GVariant                 *parameters);
-
-  void    (*interface_proxy_properties_changed) (GDBusObjectManagerClient   *manager,
-                                                 GDBusObjectProxy           *object_proxy,
-                                                 GDBusProxy                 *interface_proxy,
-                                                 GVariant                   *changed_properties,
-                                                 const gchar* const         *invalidated_properties);
-};
-
-

Class structure for GDBusObjectManagerClient.

-
-

Members

-
----- - - - - - - - - - - - - -

interface_proxy_signal ()

Signal class handler for the “interface-proxy-signal” signal.

 

interface_proxy_properties_changed ()

Signal class handler for the “interface-proxy-properties-changed” signal.

 
-
-

Since: 2.30

-
-
-
-

enum GDBusObjectManagerClientFlags

-

Flags used when constructing a GDBusObjectManagerClient.

-
-

Members

-
----- - - - - - - - - - - - - -

G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE

-

No flags set.

-
 

G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START

-

If not set and the - manager is for a well-known name, then request the bus to launch - an owner for the name if no-one owns the name. This flag can only - be used in managers for well-known names.

-
 
-
-

Since: 2.30

-
-
-
-

Property Details

-
-

The “bus-type” property

-
  “bus-type”                 GBusType
-

If this property is not G_BUS_TYPE_NONE, then -“connection” must be NULL and will be set to the -GDBusConnection obtained by calling g_bus_get() with the value -of this property.

-

Flags: Write / Construct Only

-

Default value: G_BUS_TYPE_NONE

-

Since: 2.30

-
-
-
-

The “connection” property

-
  “connection”               GDBusConnection *
-

The GDBusConnection to use.

-

Flags: Read / Write / Construct Only

-

Since: 2.30

-
-
-
-

The “flags” property

-
  “flags”                    GDBusObjectManagerClientFlags
-

Flags from the GDBusObjectManagerClientFlags enumeration.

-

Flags: Read / Write / Construct Only

-

Since: 2.30

-
-
-
-

The “get-proxy-type-destroy-notify” property

-
  “get-proxy-type-destroy-notify” gpointer
-

A GDestroyNotify for the gpointer user_data in “get-proxy-type-user-data”.

-

Flags: Read / Write / Construct Only

-

Since: 2.30

-
-
-
-

The “get-proxy-type-func” property

-
  “get-proxy-type-func”      gpointer
-

The GDBusProxyTypeFunc to use when determining what GType to -use for interface proxies or NULL.

-

Flags: Read / Write / Construct Only

-

Since: 2.30

-
-
-
-

The “get-proxy-type-user-data” property

-
  “get-proxy-type-user-data” gpointer
-

The gpointer user_data to pass to “get-proxy-type-func”.

-

Flags: Read / Write / Construct Only

-

Since: 2.30

-
-
-
-

The “name” property

-
  “name”                     gchar *
-

The well-known name or unique name that the manager is for.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.30

-
-
-
-

The “name-owner” property

-
  “name-owner”               gchar *
-

The unique name that owns “name” or NULL if -no-one is currently owning the name. Connect to the -“notify” signal to track changes to this property.

-

Flags: Read

-

Default value: NULL

-

Since: 2.30

-
-
-
-

The “object-path” property

-
  “object-path”              gchar *
-

The object path the manager is for.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.30

-
-
-
-

Signal Details

-
-

The “interface-proxy-properties-changed” signal

-
void
-user_function (GDBusObjectManagerClient *manager,
-               GDBusObjectProxy         *object_proxy,
-               GDBusProxy               *interface_proxy,
-               GVariant                 *changed_properties,
-               GStrv                     invalidated_properties,
-               gpointer                  user_data)
-

Emitted when one or more D-Bus properties on proxy changes. The -local cache has already been updated when this signal fires. Note -that both changed_properties - and invalidated_properties - are -guaranteed to never be NULL (either may be empty though).

-

This signal exists purely as a convenience to avoid having to -connect signals to all interface proxies managed by manager -.

-

This signal is emitted in the -thread-default main context -that manager - was constructed in.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

manager

The GDBusObjectManagerClient emitting the signal.

 

object_proxy

The GDBusObjectProxy on which an interface has properties that are changing.

 

interface_proxy

The GDBusProxy that has properties that are changing.

 

changed_properties

A GVariant containing the properties that changed.

 

invalidated_properties

A NULL terminated array of properties that was invalidated.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.30

-
-
-
-

The “interface-proxy-signal” signal

-
void
-user_function (GDBusObjectManagerClient *manager,
-               GDBusObjectProxy         *object_proxy,
-               GDBusProxy               *interface_proxy,
-               gchar                    *sender_name,
-               gchar                    *signal_name,
-               GVariant                 *parameters,
-               gpointer                  user_data)
-

Emitted when a D-Bus signal is received on interface_proxy -.

-

This signal exists purely as a convenience to avoid having to -connect signals to all interface proxies managed by manager -.

-

This signal is emitted in the -thread-default main context -that manager - was constructed in.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

manager

The GDBusObjectManagerClient emitting the signal.

 

object_proxy

The GDBusObjectProxy on which an interface is emitting a D-Bus signal.

 

interface_proxy

The GDBusProxy that is emitting a D-Bus signal.

 

sender_name

The sender of the signal or NULL if the connection is not a bus connection.

 

signal_name

The signal name.

 

parameters

A GVariant tuple with parameters for the signal.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.30

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDBusObjectManagerServer.html b/docs/reference/gio/html/GDBusObjectManagerServer.html deleted file mode 100644 index eeb15d9d8..000000000 --- a/docs/reference/gio/html/GDBusObjectManagerServer.html +++ /dev/null @@ -1,504 +0,0 @@ - - - - -GDBusObjectManagerServer: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusObjectManagerServer

-

GDBusObjectManagerServer — Service-side object manager

-
- -
-

Properties

-
----- - - - - - - - - - - - - -
-GDBusConnection *connectionRead / Write
-gchar *object-pathRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GDBusObjectManagerServer
structGDBusObjectManagerServerClass
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GDBusObjectManagerServer
-
-
-
-

Implemented Interfaces

-

-GDBusObjectManagerServer implements - GDBusObjectManager.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GDBusObjectManagerServer is used to export GDBusObject instances using -the standardized -org.freedesktop.DBus.ObjectManager -interface. For example, remote D-Bus clients can get all objects -and properties in a single call. Additionally, any change in the -object hierarchy is broadcast using signals. This means that D-Bus -clients can keep caches up to date by only listening to D-Bus -signals.

-

The recommended path to export an object manager at is the path form of the -well-known name of a D-Bus service, or below. For example, if a D-Bus service -is available at the well-known name net.example.ExampleService1, the object -manager should typically be exported at /net/example/ExampleService1, or -below (to allow for multiple object managers in a service).

-

It is supported, but not recommended, to export an object manager at the root -path, /.

-

See GDBusObjectManagerClient for the client-side code that is -intended to be used with GDBusObjectManagerServer or any D-Bus -object implementing the org.freedesktop.DBus.ObjectManager -interface.

-
-
-

Functions

-
-

g_dbus_object_manager_server_new ()

-
GDBusObjectManagerServer *
-g_dbus_object_manager_server_new (const gchar *object_path);
-

Creates a new GDBusObjectManagerServer object.

-

The returned server isn't yet exported on any connection. To do so, -use g_dbus_object_manager_server_set_connection(). Normally you -want to export all of your objects before doing so to avoid -InterfacesAdded -signals being emitted.

-
-

Parameters

-
----- - - - - - -

object_path

The object path to export the manager object at.

 
-
-
-

Returns

-

A GDBusObjectManagerServer object. Free with g_object_unref().

-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_server_get_connection ()

-
GDBusConnection *
-g_dbus_object_manager_server_get_connection
-                               (GDBusObjectManagerServer *manager);
-

Gets the GDBusConnection used by manager -.

-
-

Parameters

-
----- - - - - - -

manager

A GDBusObjectManagerServer

 
-
-
-

Returns

-

A GDBusConnection object or NULL if -manager -isn't exported on a connection. The returned object should -be freed with g_object_unref().

-

[transfer full]

-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_server_set_connection ()

-
void
-g_dbus_object_manager_server_set_connection
-                               (GDBusObjectManagerServer *manager,
-                                GDBusConnection *connection);
-

Exports all objects managed by manager - on connection -. If -connection - is NULL, stops exporting objects.

-
-

Parameters

-
----- - - - - - - - - - - - - -

manager

A GDBusObjectManagerServer.

 

connection

A GDBusConnection or NULL.

[nullable]
-
-
-
-
-

g_dbus_object_manager_server_export ()

-
void
-g_dbus_object_manager_server_export (GDBusObjectManagerServer *manager,
-                                     GDBusObjectSkeleton *object);
-

Exports object - on manager -.

-

If there is already a GDBusObject exported at the object path, -then the old object is removed.

-

The object path for object - must be in the hierarchy rooted by the -object path for manager -.

-

Note that manager - will take a reference on object - for as long as -it is exported.

-
-

Parameters

-
----- - - - - - - - - - - - - -

manager

A GDBusObjectManagerServer.

 

object

A GDBusObjectSkeleton.

 
-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_server_export_uniquely ()

-
void
-g_dbus_object_manager_server_export_uniquely
-                               (GDBusObjectManagerServer *manager,
-                                GDBusObjectSkeleton *object);
-

Like g_dbus_object_manager_server_export() but appends a string of -the form _N (with N being a natural number) to object -'s object path -if an object with the given path already exists. As such, the -“g-object-path” property of object - may be modified.

-
-

Parameters

-
----- - - - - - - - - - - - - -

manager

A GDBusObjectManagerServer.

 

object

An object.

 
-
-

Since: 2.30

-
-
-
-

g_dbus_object_manager_server_is_exported ()

-
gboolean
-g_dbus_object_manager_server_is_exported
-                               (GDBusObjectManagerServer *manager,
-                                GDBusObjectSkeleton *object);
-

Returns whether object - is currently exported on manager -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

manager

A GDBusObjectManagerServer.

 

object

An object.

 
-
-
-

Returns

-

TRUE if object -is exported

-
-

Since: 2.34

-
-
-
-

g_dbus_object_manager_server_unexport ()

-
gboolean
-g_dbus_object_manager_server_unexport (GDBusObjectManagerServer *manager,
-                                       const gchar *object_path);
-

If manager - has an object at path -, removes the object. Otherwise -does nothing.

-

Note that object_path - must be in the hierarchy rooted by the -object path for manager -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

manager

A GDBusObjectManagerServer.

 

object_path

An object path.

 
-
-
-

Returns

-

TRUE if object at object_path -was removed, FALSE otherwise.

-
-

Since: 2.30

-
-
-
-

Types and Values

-
-

GDBusObjectManagerServer

-
typedef struct _GDBusObjectManagerServer GDBusObjectManagerServer;
-

The GDBusObjectManagerServer structure contains private data and should -only be accessed using the provided API.

-

Since: 2.30

-
-
-
-

struct GDBusObjectManagerServerClass

-
struct GDBusObjectManagerServerClass {
-  GObjectClass parent_class;
-};
-
-

Class structure for GDBusObjectManagerServer.

-
-

Members

-
----- - -
-
-

Since: 2.30

-
-
-
-

Property Details

-
-

The “connection” property

-
  “connection”               GDBusConnection *
-

The GDBusConnection to export objects on.

-

Flags: Read / Write

-

Since: 2.30

-
-
-
-

The “object-path” property

-
  “object-path”              gchar *
-

The object path to register the manager object at.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.30

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDBusObjectProxy.html b/docs/reference/gio/html/GDBusObjectProxy.html deleted file mode 100644 index 54a70e8a3..000000000 --- a/docs/reference/gio/html/GDBusObjectProxy.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - -GDBusObjectProxy: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusObjectProxy

-

GDBusObjectProxy — Client-side D-Bus object

-
-
-

Functions

- -
-
-

Properties

-
----- - - - - - - - - - - - - -
-GDBusConnection *g-connectionRead / Write / Construct Only
-gchar *g-object-pathRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GDBusObjectProxy
structGDBusObjectProxyClass
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GDBusObjectProxy
-
-
-
-

Implemented Interfaces

-

-GDBusObjectProxy implements - GDBusObject.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A GDBusObjectProxy is an object used to represent a remote object -with one or more D-Bus interfaces. Normally, you don't instantiate -a GDBusObjectProxy yourself - typically GDBusObjectManagerClient -is used to obtain it.

-
-
-

Functions

-
-

g_dbus_object_proxy_new ()

-
GDBusObjectProxy *
-g_dbus_object_proxy_new (GDBusConnection *connection,
-                         const gchar *object_path);
-

Creates a new GDBusObjectProxy for the given connection and -object path.

-
-

Parameters

-
----- - - - - - - - - - - - - -

connection

a GDBusConnection

 

object_path

the object path

 
-
-
-

Returns

-

a new GDBusObjectProxy

-
-

Since: 2.30

-
-
-
-

g_dbus_object_proxy_get_connection ()

-
GDBusConnection *
-g_dbus_object_proxy_get_connection (GDBusObjectProxy *proxy);
-

Gets the connection that proxy - is for.

-
-

Parameters

-
----- - - - - - -

proxy

a GDBusObjectProxy

 
-
-
-

Returns

-

A GDBusConnection. Do not free, the -object is owned by proxy -.

-

[transfer none]

-
-

Since: 2.30

-
-
-
-

Types and Values

-
-

GDBusObjectProxy

-
typedef struct _GDBusObjectProxy GDBusObjectProxy;
-

The GDBusObjectProxy structure contains private data and should -only be accessed using the provided API.

-

Since: 2.30

-
-
-
-

struct GDBusObjectProxyClass

-
struct GDBusObjectProxyClass {
-  GObjectClass parent_class;
-};
-
-

Class structure for GDBusObjectProxy.

-
-

Members

-
----- - -
-
-

Since: 2.30

-
-
-
-

Property Details

-
-

The “g-connection” property

-
  “g-connection”             GDBusConnection *
-

The connection of the proxy.

-

Flags: Read / Write / Construct Only

-

Since: 2.30

-
-
-
-

The “g-object-path” property

-
  “g-object-path”            gchar *
-

The object path of the proxy.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.30

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDBusObjectSkeleton.html b/docs/reference/gio/html/GDBusObjectSkeleton.html deleted file mode 100644 index b515635f7..000000000 --- a/docs/reference/gio/html/GDBusObjectSkeleton.html +++ /dev/null @@ -1,481 +0,0 @@ - - - - -GDBusObjectSkeleton: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusObjectSkeleton

-

GDBusObjectSkeleton — Service-side D-Bus object

-
-
-

Functions

- -
-
-

Properties

-
----- - - - - - -
-gchar *g-object-pathRead / Write / Construct
-
-
-

Signals

- -
-
-

Types and Values

-
---- - - - - - - - - - - -
 GDBusObjectSkeleton
structGDBusObjectSkeletonClass
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GDBusObjectSkeleton
-
-
-
-

Implemented Interfaces

-

-GDBusObjectSkeleton implements - GDBusObject.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A GDBusObjectSkeleton instance is essentially a group of D-Bus -interfaces. The set of exported interfaces on the object may be -dynamic and change at runtime.

-

This type is intended to be used with GDBusObjectManager.

-
-
-

Functions

-
-

g_dbus_object_skeleton_new ()

-
GDBusObjectSkeleton *
-g_dbus_object_skeleton_new (const gchar *object_path);
-

Creates a new GDBusObjectSkeleton.

-
-

Parameters

-
----- - - - - - -

object_path

An object path.

 
-
-
-

Returns

-

A GDBusObjectSkeleton. Free with g_object_unref().

-
-

Since: 2.30

-
-
-
-

g_dbus_object_skeleton_flush ()

-
void
-g_dbus_object_skeleton_flush (GDBusObjectSkeleton *object);
-

This method simply calls g_dbus_interface_skeleton_flush() on all -interfaces belonging to object -. See that method for when flushing -is useful.

-
-

Parameters

-
----- - - - - - -

object

A GDBusObjectSkeleton.

 
-
-

Since: 2.30

-
-
-
-

g_dbus_object_skeleton_add_interface ()

-
void
-g_dbus_object_skeleton_add_interface (GDBusObjectSkeleton *object,
-                                      GDBusInterfaceSkeleton *interface_);
-

Adds interface_ - to object -.

-

If object - already contains a GDBusInterfaceSkeleton with the same -interface name, it is removed before interface_ - is added.

-

Note that object - takes its own reference on interface_ - and holds -it until removed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

object

A GDBusObjectSkeleton.

 

interface_

A GDBusInterfaceSkeleton.

 
-
-

Since: 2.30

-
-
-
-

g_dbus_object_skeleton_remove_interface ()

-
void
-g_dbus_object_skeleton_remove_interface
-                               (GDBusObjectSkeleton *object,
-                                GDBusInterfaceSkeleton *interface_);
-

Removes interface_ - from object -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

object

A GDBusObjectSkeleton.

 

interface_

A GDBusInterfaceSkeleton.

 
-
-

Since: 2.30

-
-
-
-

g_dbus_object_skeleton_remove_interface_by_name ()

-
void
-g_dbus_object_skeleton_remove_interface_by_name
-                               (GDBusObjectSkeleton *object,
-                                const gchar *interface_name);
-

Removes the GDBusInterface with interface_name - from object -.

-

If no D-Bus interface of the given interface exists, this function -does nothing.

-
-

Parameters

-
----- - - - - - - - - - - - - -

object

A GDBusObjectSkeleton.

 

interface_name

A D-Bus interface name.

 
-
-

Since: 2.30

-
-
-
-

g_dbus_object_skeleton_set_object_path ()

-
void
-g_dbus_object_skeleton_set_object_path
-                               (GDBusObjectSkeleton *object,
-                                const gchar *object_path);
-

Sets the object path for object -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

object

A GDBusObjectSkeleton.

 

object_path

A valid D-Bus object path.

 
-
-

Since: 2.30

-
-
-
-

Types and Values

-
-

GDBusObjectSkeleton

-
typedef struct _GDBusObjectSkeleton GDBusObjectSkeleton;
-

The GDBusObjectSkeleton structure contains private data and should only be -accessed using the provided API.

-

Since: 2.30

-
-
-
-

struct GDBusObjectSkeletonClass

-
struct GDBusObjectSkeletonClass {
-  GObjectClass parent_class;
-
-  /* Signals */
-  gboolean (*authorize_method) (GDBusObjectSkeleton       *object,
-                                GDBusInterfaceSkeleton    *interface_,
-                                GDBusMethodInvocation *invocation);
-};
-
-

Class structure for GDBusObjectSkeleton.

-
-

Members

-
----- - - - - - -

authorize_method ()

Signal class handler for the “authorize-method” signal.

 
-
-

Since: 2.30

-
-
-
-

Property Details

-
-

The “g-object-path” property

-
  “g-object-path”            gchar *
-

The object path where the object is exported.

-

Flags: Read / Write / Construct

-

Default value: NULL

-

Since: 2.30

-
-
-
-

Signal Details

-
-

The “authorize-method” signal

-
gboolean
-user_function (GDBusObjectSkeleton    *object,
-               GDBusInterfaceSkeleton *interface,
-               GDBusMethodInvocation  *invocation,
-               gpointer                user_data)
-

Emitted when a method is invoked by a remote caller and used to -determine if the method call is authorized.

-

This signal is like GDBusInterfaceSkeleton's -“g-authorize-method” signal, -except that it is for the enclosing object.

-

The default class handler just returns TRUE.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

object

The GDBusObjectSkeleton emitting the signal.

 

interface

The GDBusInterfaceSkeleton that invocation -is for.

 

invocation

A GDBusMethodInvocation.

 

user_data

user data set when the signal handler was connected.

 
-
-
-

Returns

-

TRUE if the call is authorized, FALSE otherwise.

-
-

Flags: Run Last

-

Since: 2.30

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDBusProxy.html b/docs/reference/gio/html/GDBusProxy.html deleted file mode 100644 index 92c11ca36..000000000 --- a/docs/reference/gio/html/GDBusProxy.html +++ /dev/null @@ -1,2151 +0,0 @@ - - - - -GDBusProxy: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusProxy

-

GDBusProxy — Client-side D-Bus interface proxy

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -g_dbus_proxy_new () -
-GDBusProxy * - -g_dbus_proxy_new_finish () -
-GDBusProxy * - -g_dbus_proxy_new_sync () -
-void - -g_dbus_proxy_new_for_bus () -
-GDBusProxy * - -g_dbus_proxy_new_for_bus_finish () -
-GDBusProxy * - -g_dbus_proxy_new_for_bus_sync () -
-GDBusProxyFlags - -g_dbus_proxy_get_flags () -
-GDBusConnection * - -g_dbus_proxy_get_connection () -
const gchar * - -g_dbus_proxy_get_name () -
-gchar * - -g_dbus_proxy_get_name_owner () -
const gchar * - -g_dbus_proxy_get_object_path () -
const gchar * - -g_dbus_proxy_get_interface_name () -
-gint - -g_dbus_proxy_get_default_timeout () -
-void - -g_dbus_proxy_set_default_timeout () -
-GVariant * - -g_dbus_proxy_get_cached_property () -
-void - -g_dbus_proxy_set_cached_property () -
-gchar ** - -g_dbus_proxy_get_cached_property_names () -
-void - -g_dbus_proxy_set_interface_info () -
-GDBusInterfaceInfo * - -g_dbus_proxy_get_interface_info () -
-void - -g_dbus_proxy_call () -
-GVariant * - -g_dbus_proxy_call_finish () -
-GVariant * - -g_dbus_proxy_call_sync () -
-void - -g_dbus_proxy_call_with_unix_fd_list () -
-GVariant * - -g_dbus_proxy_call_with_unix_fd_list_finish () -
-GVariant * - -g_dbus_proxy_call_with_unix_fd_list_sync () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GBusTypeg-bus-typeWrite / Construct Only
-GDBusConnection *g-connectionRead / Write / Construct Only
gintg-default-timeoutRead / Write / Construct
GDBusProxyFlagsg-flagsRead / Write / Construct Only
-GDBusInterfaceInfo *g-interface-infoRead / Write
-gchar *g-interface-nameRead / Write / Construct Only
-gchar *g-nameRead / Write / Construct Only
-gchar *g-name-ownerRead
-gchar *g-object-pathRead / Write / Construct Only
-
-
-

Signals

-
----- - - - - - - - - - - - - -
voidg-properties-changedRun Last
voidg-signalRun Last
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
enumGDBusProxyFlags
 GDBusProxy
structGDBusProxyClass
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GDBusProxy
-
-
-
-

Implemented Interfaces

-

-GDBusProxy implements - GDBusInterface, GInitable and GAsyncInitable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GDBusProxy is a base class used for proxies to access a D-Bus -interface on a remote object. A GDBusProxy can be constructed for -both well-known and unique names.

-

By default, GDBusProxy will cache all properties (and listen to -changes) of the remote object, and proxy all signals that gets -emitted. This behaviour can be changed by passing suitable -GDBusProxyFlags when the proxy is created. If the proxy is for a -well-known name, the property cache is flushed when the name owner -vanishes and reloaded when a name owner appears.

-

If a GDBusProxy is used for a well-known name, the owner of the -name is tracked and can be read from -“g-name-owner”. Connect to the “notify” signal to -get notified of changes. Additionally, only signals and property -changes emitted from the current name owner are considered and -calls are always sent to the current name owner. This avoids a -number of race conditions when the name is lost by one owner and -claimed by another. However, if no name owner currently exists, -then calls will be sent to the well-known name which may result in -the message bus launching an owner (unless -G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set).

-

The generic “g-properties-changed” and -“g-signal” signals are not very convenient to work with. -Therefore, the recommended way of working with proxies is to subclass -GDBusProxy, and have more natural properties and signals in your derived -class. This example shows how this can -easily be done using the gdbus-codegen tool.

-

A GDBusProxy instance can be used from multiple threads but note -that all signals (e.g. “g-signal”, “g-properties-changed” -and “notify”) are emitted in the -thread-default main context -of the thread where the instance was constructed.

-

An example using a proxy for a well-known name can be found in -gdbus-example-watch-proxy.c

-
-
-

Functions

-
-

g_dbus_proxy_new ()

-
void
-g_dbus_proxy_new (GDBusConnection *connection,
-                  GDBusProxyFlags flags,
-                  GDBusInterfaceInfo *info,
-                  const gchar *name,
-                  const gchar *object_path,
-                  const gchar *interface_name,
-                  GCancellable *cancellable,
-                  GAsyncReadyCallback callback,
-                  gpointer user_data);
-

Creates a proxy for accessing interface_name - on the remote object -at object_path - owned by name - at connection - and asynchronously -loads D-Bus properties unless the -G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to -the “g-properties-changed” signal to get notified about -property changes.

-

If the G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up -match rules for signals. Connect to the “g-signal” signal -to handle signals from the remote object.

-

If name - is a well-known name and the -G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START and G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION -flags aren't set and no name owner currently exists, the message bus -will be requested to launch a name owner for the name.

-

This is a failable asynchronous constructor - when the proxy is -ready, callback - will be invoked and you can use -g_dbus_proxy_new_finish() to get the result.

-

See g_dbus_proxy_new_sync() and for a synchronous version of this constructor.

-

GDBusProxy is used in this example.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

A GDBusConnection.

 

flags

Flags used when constructing the proxy.

 

info

A GDBusInterfaceInfo specifying the minimal interface that proxy -conforms to or NULL.

[nullable]

name

A bus name (well-known or unique) or NULL if connection -is not a message bus connection.

[nullable]

object_path

An object path.

 

interface_name

A D-Bus interface name.

 

cancellable

A GCancellable or NULL.

[nullable]

callback

Callback function to invoke when the proxy is ready.

 

user_data

User data to pass to callback -.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_new_finish ()

-
GDBusProxy *
-g_dbus_proxy_new_finish (GAsyncResult *res,
-                         GError **error);
-

Finishes creating a GDBusProxy.

-
-

Parameters

-
----- - - - - - - - - - - - - -

res

A GAsyncResult obtained from the GAsyncReadyCallback function passed to g_dbus_proxy_new().

 

error

Return location for error or NULL.

 
-
-
-

Returns

-

A GDBusProxy or NULL if error -is set. Free with g_object_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_new_sync ()

-
GDBusProxy *
-g_dbus_proxy_new_sync (GDBusConnection *connection,
-                       GDBusProxyFlags flags,
-                       GDBusInterfaceInfo *info,
-                       const gchar *name,
-                       const gchar *object_path,
-                       const gchar *interface_name,
-                       GCancellable *cancellable,
-                       GError **error);
-

Creates a proxy for accessing interface_name - on the remote object -at object_path - owned by name - at connection - and synchronously -loads D-Bus properties unless the -G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used.

-

If the G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up -match rules for signals. Connect to the “g-signal” signal -to handle signals from the remote object.

-

If name - is a well-known name and the -G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START and G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION -flags aren't set and no name owner currently exists, the message bus -will be requested to launch a name owner for the name.

-

This is a synchronous failable constructor. See g_dbus_proxy_new() -and g_dbus_proxy_new_finish() for the asynchronous version.

-

GDBusProxy is used in this example.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

A GDBusConnection.

 

flags

Flags used when constructing the proxy.

 

info

A GDBusInterfaceInfo specifying the minimal interface that proxy -conforms to or NULL.

[nullable]

name

A bus name (well-known or unique) or NULL if connection -is not a message bus connection.

[nullable]

object_path

An object path.

 

interface_name

A D-Bus interface name.

 

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL.

[nullable]
-
-
-

Returns

-

A GDBusProxy or NULL if error is set. Free with g_object_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_new_for_bus ()

-
void
-g_dbus_proxy_new_for_bus (GBusType bus_type,
-                          GDBusProxyFlags flags,
-                          GDBusInterfaceInfo *info,
-                          const gchar *name,
-                          const gchar *object_path,
-                          const gchar *interface_name,
-                          GCancellable *cancellable,
-                          GAsyncReadyCallback callback,
-                          gpointer user_data);
-

Like g_dbus_proxy_new() but takes a GBusType instead of a GDBusConnection.

-

GDBusProxy is used in this example.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

bus_type

A GBusType.

 

flags

Flags used when constructing the proxy.

 

info

A GDBusInterfaceInfo specifying the minimal interface that proxy -conforms to or NULL.

[nullable]

name

A bus name (well-known or unique).

 

object_path

An object path.

 

interface_name

A D-Bus interface name.

 

cancellable

A GCancellable or NULL.

[nullable]

callback

Callback function to invoke when the proxy is ready.

 

user_data

User data to pass to callback -.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_new_for_bus_finish ()

-
GDBusProxy *
-g_dbus_proxy_new_for_bus_finish (GAsyncResult *res,
-                                 GError **error);
-

Finishes creating a GDBusProxy.

-
-

Parameters

-
----- - - - - - - - - - - - - -

res

A GAsyncResult obtained from the GAsyncReadyCallback function passed to g_dbus_proxy_new_for_bus().

 

error

Return location for error or NULL.

 
-
-
-

Returns

-

A GDBusProxy or NULL if error -is set. Free with g_object_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_new_for_bus_sync ()

-
GDBusProxy *
-g_dbus_proxy_new_for_bus_sync (GBusType bus_type,
-                               GDBusProxyFlags flags,
-                               GDBusInterfaceInfo *info,
-                               const gchar *name,
-                               const gchar *object_path,
-                               const gchar *interface_name,
-                               GCancellable *cancellable,
-                               GError **error);
-

Like g_dbus_proxy_new_sync() but takes a GBusType instead of a GDBusConnection.

-

GDBusProxy is used in this example.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

bus_type

A GBusType.

 

flags

Flags used when constructing the proxy.

 

info

A GDBusInterfaceInfo specifying the minimal interface -that proxy -conforms to or NULL.

[nullable]

name

A bus name (well-known or unique).

 

object_path

An object path.

 

interface_name

A D-Bus interface name.

 

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL.

 
-
-
-

Returns

-

A GDBusProxy or NULL if error is set. Free with g_object_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_get_flags ()

-
GDBusProxyFlags
-g_dbus_proxy_get_flags (GDBusProxy *proxy);
-

Gets the flags that proxy - was constructed with.

-
-

Parameters

-
----- - - - - - -

proxy

A GDBusProxy.

 
-
-
-

Returns

-

Flags from the GDBusProxyFlags enumeration.

-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_get_connection ()

-
GDBusConnection *
-g_dbus_proxy_get_connection (GDBusProxy *proxy);
-

Gets the connection proxy - is for.

-
-

Parameters

-
----- - - - - - -

proxy

A GDBusProxy.

 
-
-
-

Returns

-

A GDBusConnection owned by proxy -. Do not free.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_get_name ()

-
const gchar *
-g_dbus_proxy_get_name (GDBusProxy *proxy);
-

Gets the name that proxy - was constructed for.

-
-

Parameters

-
----- - - - - - -

proxy

A GDBusProxy.

 
-
-
-

Returns

-

A string owned by proxy -. Do not free.

-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_get_name_owner ()

-
gchar *
-g_dbus_proxy_get_name_owner (GDBusProxy *proxy);
-

The unique name that owns the name that proxy - is for or NULL if -no-one currently owns that name. You may connect to the -“notify” signal to track changes to the -“g-name-owner” property.

-
-

Parameters

-
----- - - - - - -

proxy

A GDBusProxy.

 
-
-
-

Returns

-

The name owner or NULL if no name owner exists. Free with g_free().

-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_get_object_path ()

-
const gchar *
-g_dbus_proxy_get_object_path (GDBusProxy *proxy);
-

Gets the object path proxy - is for.

-
-

Parameters

-
----- - - - - - -

proxy

A GDBusProxy.

 
-
-
-

Returns

-

A string owned by proxy -. Do not free.

-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_get_interface_name ()

-
const gchar *
-g_dbus_proxy_get_interface_name (GDBusProxy *proxy);
-

Gets the D-Bus interface name proxy - is for.

-
-

Parameters

-
----- - - - - - -

proxy

A GDBusProxy.

 
-
-
-

Returns

-

A string owned by proxy -. Do not free.

-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_get_default_timeout ()

-
gint
-g_dbus_proxy_get_default_timeout (GDBusProxy *proxy);
-

Gets the timeout to use if -1 (specifying default timeout) is -passed as timeout_msec - in the g_dbus_proxy_call() and -g_dbus_proxy_call_sync() functions.

-

See the “g-default-timeout” property for more details.

-
-

Parameters

-
----- - - - - - -

proxy

A GDBusProxy.

 
-
-
-

Returns

-

Timeout to use for proxy -.

-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_set_default_timeout ()

-
void
-g_dbus_proxy_set_default_timeout (GDBusProxy *proxy,
-                                  gint timeout_msec);
-

Sets the timeout to use if -1 (specifying default timeout) is -passed as timeout_msec - in the g_dbus_proxy_call() and -g_dbus_proxy_call_sync() functions.

-

See the “g-default-timeout” property for more details.

-
-

Parameters

-
----- - - - - - - - - - - - - -

proxy

A GDBusProxy.

 

timeout_msec

Timeout in milliseconds.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_get_cached_property ()

-
GVariant *
-g_dbus_proxy_get_cached_property (GDBusProxy *proxy,
-                                  const gchar *property_name);
-

Looks up the value for a property from the cache. This call does no -blocking IO.

-

If proxy - has an expected interface (see -“g-interface-info”) and property_name - is referenced by -it, then value - is checked against the type of the property.

-
-

Parameters

-
----- - - - - - - - - - - - - -

proxy

A GDBusProxy.

 

property_name

Property name.

 
-
-
-

Returns

-

A reference to the GVariant instance that holds the value -for property_name -or NULL if the value is not in the cache. The -returned reference must be freed with g_variant_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_set_cached_property ()

-
void
-g_dbus_proxy_set_cached_property (GDBusProxy *proxy,
-                                  const gchar *property_name,
-                                  GVariant *value);
-

If value - is not NULL, sets the cached value for the property with -name property_name - to the value in value -.

-

If value - is NULL, then the cached value is removed from the -property cache.

-

If proxy - has an expected interface (see -“g-interface-info”) and property_name - is referenced by -it, then value - is checked against the type of the property.

-

If the value - GVariant is floating, it is consumed. This allows -convenient 'inline' use of g_variant_new(), e.g.

-
- - - - - - - -
1
-2
-3
-4
-5
g_dbus_proxy_set_cached_property (proxy,
-                                  "SomeProperty",
-                                  g_variant_new ("(si)",
-                                                "A String",
-                                                42));
-
- -

-

Normally you will not need to use this method since proxy - -is tracking changes using the -org.freedesktop.DBus.Properties.PropertiesChanged -D-Bus signal. However, for performance reasons an object may -decide to not use this signal for some properties and instead -use a proprietary out-of-band mechanism to transmit changes.

-

As a concrete example, consider an object with a property -ChatroomParticipants which is an array of strings. Instead of -transmitting the same (long) array every time the property changes, -it is more efficient to only transmit the delta using e.g. signals -ChatroomParticipantJoined(String name) and -ChatroomParticipantParted(String name).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

proxy

A GDBusProxy

 

property_name

Property name.

 

value

Value for the property or NULL to remove it from the cache.

[nullable]
-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_get_cached_property_names ()

-
gchar **
-g_dbus_proxy_get_cached_property_names
-                               (GDBusProxy *proxy);
-

Gets the names of all cached properties on proxy -.

-
-

Parameters

-
----- - - - - - -

proxy

A GDBusProxy.

 
-
-
-

Returns

-

A NULL-terminated array of strings or NULL if -proxy -has no cached properties. Free the returned array with -g_strfreev().

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_set_interface_info ()

-
void
-g_dbus_proxy_set_interface_info (GDBusProxy *proxy,
-                                 GDBusInterfaceInfo *info);
-

Ensure that interactions with proxy - conform to the given -interface. See the “g-interface-info” property for more -details.

-
-

Parameters

-
----- - - - - - - - - - - - - -

proxy

A GDBusProxy

 

info

Minimum interface this proxy conforms to or NULL to unset.

[nullable]
-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_get_interface_info ()

-
GDBusInterfaceInfo *
-g_dbus_proxy_get_interface_info (GDBusProxy *proxy);
-

Returns the GDBusInterfaceInfo, if any, specifying the interface -that proxy - conforms to. See the “g-interface-info” -property for more details.

-
-

Parameters

-
----- - - - - - -

proxy

A GDBusProxy

 
-
-
-

Returns

-

A GDBusInterfaceInfo or NULL. Do not unref the returned -object, it is owned by proxy -.

-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_call ()

-
void
-g_dbus_proxy_call (GDBusProxy *proxy,
-                   const gchar *method_name,
-                   GVariant *parameters,
-                   GDBusCallFlags flags,
-                   gint timeout_msec,
-                   GCancellable *cancellable,
-                   GAsyncReadyCallback callback,
-                   gpointer user_data);
-

Asynchronously invokes the method_name - method on proxy -.

-

If method_name - contains any dots, then name - is split into interface and -method name parts. This allows using proxy - for invoking methods on -other interfaces.

-

If the GDBusConnection associated with proxy - is closed then -the operation will fail with G_IO_ERROR_CLOSED. If -cancellable - is canceled, the operation will fail with -G_IO_ERROR_CANCELLED. If parameters - contains a value not -compatible with the D-Bus protocol, the operation fails with -G_IO_ERROR_INVALID_ARGUMENT.

-

If the parameters - GVariant is floating, it is consumed. This allows -convenient 'inline' use of g_variant_new(), e.g.:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
g_dbus_proxy_call (proxy,
-                   "TwoStrings",
-                   g_variant_new ("(ss)",
-                                  "Thing One",
-                                  "Thing Two"),
-                   G_DBUS_CALL_FLAGS_NONE,
-                   -1,
-                   NULL,
-                   (GAsyncReadyCallback) two_strings_done,
-                   &data);
-
- -

-

If proxy - has an expected interface (see -“g-interface-info”) and method_name - is referenced by it, -then the return value is checked against the return type.

-

This is an asynchronous method. When the operation is finished, -callback - will be invoked in the -thread-default main context -of the thread you are calling this method from. -You can then call g_dbus_proxy_call_finish() to get the result of -the operation. See g_dbus_proxy_call_sync() for the synchronous -version of this method.

-

If callback - is NULL then the D-Bus method call message will be sent with -the G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

proxy

A GDBusProxy.

 

method_name

Name of method to invoke.

 

parameters

A GVariant tuple with parameters for the signal or NULL if not passing parameters.

[nullable]

flags

Flags from the GDBusCallFlags enumeration.

 

timeout_msec

The timeout in milliseconds (with G_MAXINT meaning -"infinite") or -1 to use the proxy default timeout.

 

cancellable

A GCancellable or NULL.

[nullable]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL if you don't -care about the result of the method invocation.

[nullable]

user_data

The data to pass to callback -.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_call_finish ()

-
GVariant *
-g_dbus_proxy_call_finish (GDBusProxy *proxy,
-                          GAsyncResult *res,
-                          GError **error);
-

Finishes an operation started with g_dbus_proxy_call().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

proxy

A GDBusProxy.

 

res

A GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_proxy_call().

 

error

Return location for error or NULL.

 
-
-
-

Returns

-

NULL if error -is set. Otherwise a GVariant tuple with -return values. Free with g_variant_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_call_sync ()

-
GVariant *
-g_dbus_proxy_call_sync (GDBusProxy *proxy,
-                        const gchar *method_name,
-                        GVariant *parameters,
-                        GDBusCallFlags flags,
-                        gint timeout_msec,
-                        GCancellable *cancellable,
-                        GError **error);
-

Synchronously invokes the method_name - method on proxy -.

-

If method_name - contains any dots, then name - is split into interface and -method name parts. This allows using proxy - for invoking methods on -other interfaces.

-

If the GDBusConnection associated with proxy - is disconnected then -the operation will fail with G_IO_ERROR_CLOSED. If -cancellable - is canceled, the operation will fail with -G_IO_ERROR_CANCELLED. If parameters - contains a value not -compatible with the D-Bus protocol, the operation fails with -G_IO_ERROR_INVALID_ARGUMENT.

-

If the parameters - GVariant is floating, it is consumed. This allows -convenient 'inline' use of g_variant_new(), e.g.:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
g_dbus_proxy_call_sync (proxy,
-                        "TwoStrings",
-                        g_variant_new ("(ss)",
-                                       "Thing One",
-                                       "Thing Two"),
-                        G_DBUS_CALL_FLAGS_NONE,
-                        -1,
-                        NULL,
-                        &error);
-
- -

-

The calling thread is blocked until a reply is received. See -g_dbus_proxy_call() for the asynchronous version of this -method.

-

If proxy - has an expected interface (see -“g-interface-info”) and method_name - is referenced by it, -then the return value is checked against the return type.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

proxy

A GDBusProxy.

 

method_name

Name of method to invoke.

 

parameters

A GVariant tuple with parameters for the signal -or NULL if not passing parameters.

[nullable]

flags

Flags from the GDBusCallFlags enumeration.

 

timeout_msec

The timeout in milliseconds (with G_MAXINT meaning -"infinite") or -1 to use the proxy default timeout.

 

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL.

 
-
-
-

Returns

-

NULL if error -is set. Otherwise a GVariant tuple with -return values. Free with g_variant_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_proxy_call_with_unix_fd_list ()

-
void
-g_dbus_proxy_call_with_unix_fd_list (GDBusProxy *proxy,
-                                     const gchar *method_name,
-                                     GVariant *parameters,
-                                     GDBusCallFlags flags,
-                                     gint timeout_msec,
-                                     GUnixFDList *fd_list,
-                                     GCancellable *cancellable,
-                                     GAsyncReadyCallback callback,
-                                     gpointer user_data);
-

Like g_dbus_proxy_call() but also takes a GUnixFDList object.

-

This method is only available on UNIX.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

proxy

A GDBusProxy.

 

method_name

Name of method to invoke.

 

parameters

A GVariant tuple with parameters for the signal or NULL if not passing parameters.

[nullable]

flags

Flags from the GDBusCallFlags enumeration.

 

timeout_msec

The timeout in milliseconds (with G_MAXINT meaning -"infinite") or -1 to use the proxy default timeout.

 

fd_list

A GUnixFDList or NULL.

[nullable]

cancellable

A GCancellable or NULL.

[nullable]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL if you don't -care about the result of the method invocation.

[nullable]

user_data

The data to pass to callback -.

 
-
-

Since: 2.30

-
-
-
-

g_dbus_proxy_call_with_unix_fd_list_finish ()

-
GVariant *
-g_dbus_proxy_call_with_unix_fd_list_finish
-                               (GDBusProxy *proxy,
-                                GUnixFDList **out_fd_list,
-                                GAsyncResult *res,
-                                GError **error);
-

Finishes an operation started with g_dbus_proxy_call_with_unix_fd_list().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

proxy

A GDBusProxy.

 

out_fd_list

Return location for a GUnixFDList or NULL.

[out][optional]

res

A GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_proxy_call_with_unix_fd_list().

 

error

Return location for error or NULL.

 
-
-
-

Returns

-

NULL if error -is set. Otherwise a GVariant tuple with -return values. Free with g_variant_unref().

-
-

Since: 2.30

-
-
-
-

g_dbus_proxy_call_with_unix_fd_list_sync ()

-
GVariant *
-g_dbus_proxy_call_with_unix_fd_list_sync
-                               (GDBusProxy *proxy,
-                                const gchar *method_name,
-                                GVariant *parameters,
-                                GDBusCallFlags flags,
-                                gint timeout_msec,
-                                GUnixFDList *fd_list,
-                                GUnixFDList **out_fd_list,
-                                GCancellable *cancellable,
-                                GError **error);
-

Like g_dbus_proxy_call_sync() but also takes and returns GUnixFDList objects.

-

This method is only available on UNIX.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

proxy

A GDBusProxy.

 

method_name

Name of method to invoke.

 

parameters

A GVariant tuple with parameters for the signal -or NULL if not passing parameters.

[nullable]

flags

Flags from the GDBusCallFlags enumeration.

 

timeout_msec

The timeout in milliseconds (with G_MAXINT meaning -"infinite") or -1 to use the proxy default timeout.

 

fd_list

A GUnixFDList or NULL.

[nullable]

out_fd_list

Return location for a GUnixFDList or NULL.

[out][optional]

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL.

 
-
-
-

Returns

-

NULL if error -is set. Otherwise a GVariant tuple with -return values. Free with g_variant_unref().

-
-

Since: 2.30

-
-
-
-

Types and Values

-
-

enum GDBusProxyFlags

-

Flags used when constructing an instance of a GDBusProxy derived class.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_DBUS_PROXY_FLAGS_NONE

-

No flags set.

-
 

G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES

-

Don't load properties.

-
 

G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS

-

Don't connect to signals on the remote object.

-
 

G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START

-

If the proxy is for a well-known name, -do not ask the bus to launch an owner during proxy initialization or a method call. -This flag is only meaningful in proxies for well-known names.

-
 

G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES

-

If set, the property value for any __invalidated property__ will be (asynchronously) retrieved upon receiving the PropertiesChanged D-Bus signal and the property will not cause emission of the “g-properties-changed” signal. When the value is received the “g-properties-changed” signal is emitted for the property along with the retrieved value. Since 2.32.

-
 

G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION

-

If the proxy is for a well-known name, -do not ask the bus to launch an owner during proxy initialization, but allow it to be -autostarted by a method call. This flag is only meaningful in proxies for well-known names, -and only if G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is not also specified.

-
 
-
-

Since: 2.26

-
-
-
-

GDBusProxy

-
typedef struct _GDBusProxy GDBusProxy;
-

The GDBusProxy structure contains only private data and -should only be accessed using the provided API.

-

Since: 2.26

-
-
-
-

struct GDBusProxyClass

-
struct GDBusProxyClass {
-  /* Signals */
-  void (*g_properties_changed) (GDBusProxy          *proxy,
-                                GVariant            *changed_properties,
-                                const gchar* const  *invalidated_properties);
-  void (*g_signal)             (GDBusProxy          *proxy,
-                                const gchar         *sender_name,
-                                const gchar         *signal_name,
-                                GVariant            *parameters);
-};
-
-

Class structure for GDBusProxy.

-
-

Members

-
----- - - - - - - - - - - - - -

g_properties_changed ()

Signal class handler for the “g-properties-changed” signal.

 

g_signal ()

Signal class handler for the “g-signal” signal.

 
-
-

Since: 2.26

-
-
-
-

Property Details

-
-

The “g-bus-type” property

-
  “g-bus-type”               GBusType
-

If this property is not G_BUS_TYPE_NONE, then -“g-connection” must be NULL and will be set to the -GDBusConnection obtained by calling g_bus_get() with the value -of this property.

-

Flags: Write / Construct Only

-

Default value: G_BUS_TYPE_NONE

-

Since: 2.26

-
-
-
-

The “g-connection” property

-
  “g-connection”             GDBusConnection *
-

The GDBusConnection the proxy is for.

-

Flags: Read / Write / Construct Only

-

Since: 2.26

-
-
-
-

The “g-default-timeout” property

-
  “g-default-timeout”        gint
-

The timeout to use if -1 (specifying default timeout) is passed -as timeout_msec - in the g_dbus_proxy_call() and -g_dbus_proxy_call_sync() functions.

-

This allows applications to set a proxy-wide timeout for all -remote method invocations on the proxy. If this property is -1, -the default timeout (typically 25 seconds) is used. If set to -G_MAXINT, then no timeout is used.

-

Flags: Read / Write / Construct

-

Allowed values: >= -1

-

Default value: -1

-

Since: 2.26

-
-
-
-

The “g-flags” property

-
  “g-flags”                  GDBusProxyFlags
-

Flags from the GDBusProxyFlags enumeration.

-

Flags: Read / Write / Construct Only

-

Since: 2.26

-
-
-
-

The “g-interface-info” property

-
  “g-interface-info”         GDBusInterfaceInfo *
-

Ensure that interactions with this proxy conform to the given -interface. This is mainly to ensure that malformed data received -from the other peer is ignored. The given GDBusInterfaceInfo is -said to be the "expected interface".

-

The checks performed are:

-
-

Note that these checks are never done on methods, signals and -properties that are not referenced in the given -GDBusInterfaceInfo, since extending a D-Bus interface on the -service-side is not considered an ABI break.

-

Flags: Read / Write

-

Since: 2.26

-
-
-
-

The “g-interface-name” property

-
  “g-interface-name”         gchar *
-

The D-Bus interface name the proxy is for.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.26

-
-
-
-

The “g-name” property

-
  “g-name”                   gchar *
-

The well-known or unique name that the proxy is for.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.26

-
-
-
-

The “g-name-owner” property

-
  “g-name-owner”             gchar *
-

The unique name that owns “g-name” or NULL if no-one -currently owns that name. You may connect to “notify” signal to -track changes to this property.

-

Flags: Read

-

Default value: NULL

-

Since: 2.26

-
-
-
-

The “g-object-path” property

-
  “g-object-path”            gchar *
-

The object path the proxy is for.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.26

-
-
-
-

Signal Details

-
-

The “g-properties-changed” signal

-
void
-user_function (GDBusProxy *proxy,
-               GVariant   *changed_properties,
-               GStrv       invalidated_properties,
-               gpointer    user_data)
-

Emitted when one or more D-Bus properties on proxy - changes. The -local cache has already been updated when this signal fires. Note -that both changed_properties - and invalidated_properties - are -guaranteed to never be NULL (either may be empty though).

-

If the proxy has the flag -G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES set, then -invalidated_properties - will always be empty.

-

This signal corresponds to the -PropertiesChanged D-Bus signal on the -org.freedesktop.DBus.Properties interface.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

proxy

The GDBusProxy emitting the signal.

 

changed_properties

A GVariant containing the properties that changed

 

invalidated_properties

A NULL terminated array of properties that was invalidated

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.26

-
-
-
-

The “g-signal” signal

-
void
-user_function (GDBusProxy *proxy,
-               gchar      *sender_name,
-               gchar      *signal_name,
-               GVariant   *parameters,
-               gpointer    user_data)
-

Emitted when a signal from the remote object and interface that proxy - is for, has been received.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

proxy

The GDBusProxy emitting the signal.

 

sender_name

The sender of the signal or NULL if the connection is not a bus connection.

[nullable]

signal_name

The name of the signal.

 

parameters

A GVariant tuple with parameters for the signal.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.26

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDBusServer.html b/docs/reference/gio/html/GDBusServer.html deleted file mode 100644 index 2ca77eb53..000000000 --- a/docs/reference/gio/html/GDBusServer.html +++ /dev/null @@ -1,627 +0,0 @@ - - - - -GDBusServer: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusServer

-

GDBusServer — Helper for accepting connections

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GDBusServer * - -g_dbus_server_new_sync () -
-void - -g_dbus_server_start () -
-void - -g_dbus_server_stop () -
-gboolean - -g_dbus_server_is_active () -
const gchar * - -g_dbus_server_get_guid () -
-GDBusServerFlags - -g_dbus_server_get_flags () -
const gchar * - -g_dbus_server_get_client_address () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
gbooleanactiveRead
-gchar *addressRead / Write / Construct Only
-GDBusAuthObserver *authentication-observerRead / Write / Construct Only
-gchar *client-addressRead
GDBusServerFlagsflagsRead / Write / Construct Only
-gchar *guidRead / Write / Construct Only
-
-
-

Signals

- -
-
-

Types and Values

-
---- - - - - - - - - - - -
 GDBusServer
enumGDBusServerFlags
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GDBusServer
-
-
-
-

Implemented Interfaces

-

-GDBusServer implements - GInitable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GDBusServer is a helper for listening to and accepting D-Bus -connections. This can be used to create a new D-Bus server, allowing two -peers to use the D-Bus protocol for their own specialized communication. -A server instance provided in this way will not perform message routing or -implement the org.freedesktop.DBus interface.

-

To just export an object on a well-known name on a message bus, such as the -session or system bus, you should instead use g_bus_own_name().

-

An example of peer-to-peer communication with G-DBus can be found -in gdbus-example-peer.c.

-
-
-

Functions

-
-

g_dbus_server_new_sync ()

-
GDBusServer *
-g_dbus_server_new_sync (const gchar *address,
-                        GDBusServerFlags flags,
-                        const gchar *guid,
-                        GDBusAuthObserver *observer,
-                        GCancellable *cancellable,
-                        GError **error);
-

Creates a new D-Bus server that listens on the first address in -address - that works.

-

Once constructed, you can use g_dbus_server_get_client_address() to -get a D-Bus address string that clients can use to connect.

-

Connect to the “new-connection” signal to handle -incoming connections.

-

The returned GDBusServer isn't active - you have to start it with -g_dbus_server_start().

-

GDBusServer is used in this example.

-

This is a synchronous failable constructor. See -g_dbus_server_new() for the asynchronous version.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

address

A D-Bus address.

 

flags

Flags from the GDBusServerFlags enumeration.

 

guid

A D-Bus GUID.

 

observer

A GDBusAuthObserver or NULL.

[nullable]

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for server or NULL.

 
-
-
-

Returns

-

A GDBusServer or NULL if error -is set. Free with -g_object_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_server_start ()

-
void
-g_dbus_server_start (GDBusServer *server);
-

Starts server -.

-
-

Parameters

-
----- - - - - - -

server

A GDBusServer.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_server_stop ()

-
void
-g_dbus_server_stop (GDBusServer *server);
-

Stops server -.

-
-

Parameters

-
----- - - - - - -

server

A GDBusServer.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_server_is_active ()

-
gboolean
-g_dbus_server_is_active (GDBusServer *server);
-

Gets whether server - is active.

-
-

Parameters

-
----- - - - - - -

server

A GDBusServer.

 
-
-
-

Returns

-

TRUE if server is active, FALSE otherwise.

-
-

Since: 2.26

-
-
-
-

g_dbus_server_get_guid ()

-
const gchar *
-g_dbus_server_get_guid (GDBusServer *server);
-

Gets the GUID for server -.

-
-

Parameters

-
----- - - - - - -

server

A GDBusServer.

 
-
-
-

Returns

-

A D-Bus GUID. Do not free this string, it is owned by server -.

-
-

Since: 2.26

-
-
-
-

g_dbus_server_get_flags ()

-
GDBusServerFlags
-g_dbus_server_get_flags (GDBusServer *server);
-

Gets the flags for server -.

-
-

Parameters

-
----- - - - - - -

server

A GDBusServer.

 
-
-
-

Returns

-

A set of flags from the GDBusServerFlags enumeration.

-
-

Since: 2.26

-
-
-
-

g_dbus_server_get_client_address ()

-
const gchar *
-g_dbus_server_get_client_address (GDBusServer *server);
-

Gets a -D-Bus address -string that can be used by clients to connect to server -.

-
-

Parameters

-
----- - - - - - -

server

A GDBusServer.

 
-
-
-

Returns

-

A D-Bus address string. Do not free, the string is owned -by server -.

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GDBusServer

-
typedef struct _GDBusServer GDBusServer;
-

The GDBusServer structure contains only private data and -should only be accessed using the provided API.

-

Since: 2.26

-
-
-
-

enum GDBusServerFlags

-

Flags used when creating a GDBusServer.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_DBUS_SERVER_FLAGS_NONE

-

No flags set.

-
 

G_DBUS_SERVER_FLAGS_RUN_IN_THREAD

-

All “new-connection” -signals will run in separated dedicated threads (see signal for -details).

-
 

G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS

-

Allow the anonymous -authentication method.

-
 
-
-

Since: 2.26

-
-
-
-

Property Details

-
-

The “active” property

-
  “active”                   gboolean
-

Whether the server is currently active.

-

Flags: Read

-

Default value: FALSE

-

Since: 2.26

-
-
-
-

The “address” property

-
  “address”                  gchar *
-

The D-Bus address to listen on.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.26

-
-
-
-

The “authentication-observer” property

-
  “authentication-observer”  GDBusAuthObserver *
-

A GDBusAuthObserver object to assist in the authentication process or NULL.

-

Flags: Read / Write / Construct Only

-

Since: 2.26

-
-
-
-

The “client-address” property

-
  “client-address”           gchar *
-

The D-Bus address that clients can use.

-

Flags: Read

-

Default value: NULL

-

Since: 2.26

-
-
-
-

The “flags” property

-
  “flags”                    GDBusServerFlags
-

Flags from the GDBusServerFlags enumeration.

-

Flags: Read / Write / Construct Only

-

Since: 2.26

-
-
-
-

The “guid” property

-
  “guid”                     gchar *
-

The guid of the server.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.26

-
-
-
-

Signal Details

-
-

The “new-connection” signal

-
gboolean
-user_function (GDBusServer     *server,
-               GDBusConnection *connection,
-               gpointer         user_data)
-

Emitted when a new authenticated connection has been made. Use -g_dbus_connection_get_peer_credentials() to figure out what -identity (if any), was authenticated.

-

If you want to accept the connection, take a reference to the -connection - object and return TRUE. When you are done with the -connection call g_dbus_connection_close() and give up your -reference. Note that the other peer may disconnect at any time - -a typical thing to do when accepting a connection is to listen to -the “closed” signal.

-

If “flags” contains G_DBUS_SERVER_FLAGS_RUN_IN_THREAD -then the signal is emitted in a new thread dedicated to the -connection. Otherwise the signal is emitted in the -thread-default main context -of the thread that server - was constructed in.

-

You are guaranteed that signal handlers for this signal runs -before incoming messages on connection - are processed. This means -that it's suitable to call g_dbus_connection_register_object() or -similar from the signal handler.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

server

The GDBusServer emitting the signal.

 

connection

A GDBusConnection for the new connection.

 

user_data

user data set when the signal handler was connected.

 
-
-
-

Returns

-

TRUE to claim connection -, FALSE to let other handlers -run.

-
-

Flags: Run Last

-

Since: 2.26

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDataInputStream.html b/docs/reference/gio/html/GDataInputStream.html deleted file mode 100644 index 8c8aca375..000000000 --- a/docs/reference/gio/html/GDataInputStream.html +++ /dev/null @@ -1,1584 +0,0 @@ - - - - -GDataInputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDataInputStream

-

GDataInputStream — Data Input Stream

-
- -
-

Properties

-
----- - - - - - - - - - - - - -
GDataStreamByteOrderbyte-orderRead / Write
GDataStreamNewlineTypenewline-typeRead / Write
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
 GDataInputStream
enumGDataStreamByteOrder
enumGDataStreamNewlineType
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GInputStream
-        ╰── GFilterInputStream
-            ╰── GBufferedInputStream
-                ╰── GDataInputStream
-
-
-
-

Implemented Interfaces

-

-GDataInputStream implements - GSeekable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Data input stream implements GInputStream and includes functions for -reading structured data directly from a binary input stream.

-
-
-

Functions

-
-

g_data_input_stream_new ()

-
GDataInputStream *
-g_data_input_stream_new (GInputStream *base_stream);
-

Creates a new data input stream for the base_stream -.

-
-

Parameters

-
----- - - - - - -

base_stream

a GInputStream.

 
-
-
-

Returns

-

a new GDataInputStream.

-
-
-
-
-

g_data_input_stream_set_byte_order ()

-
void
-g_data_input_stream_set_byte_order (GDataInputStream *stream,
-                                    GDataStreamByteOrder order);
-

This function sets the byte order for the given stream -. All subsequent -reads from the stream - will be read in the given order -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a given GDataInputStream.

 

order

a GDataStreamByteOrder to set.

 
-
-
-
-
-

g_data_input_stream_get_byte_order ()

-
GDataStreamByteOrder
-g_data_input_stream_get_byte_order (GDataInputStream *stream);
-

Gets the byte order for the data input stream.

-
-

Parameters

-
----- - - - - - -

stream

a given GDataInputStream.

 
-
-
-

Returns

-

the stream -'s current GDataStreamByteOrder.

-
-
-
-
-

g_data_input_stream_set_newline_type ()

-
void
-g_data_input_stream_set_newline_type (GDataInputStream *stream,
-                                      GDataStreamNewlineType type);
-

Sets the newline type for the stream -.

-

Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read -chunk ends in "CR" we must read an additional byte to know if this is "CR" or -"CR LF", and this might block if there is no more data available.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GDataInputStream.

 

type

the type of new line return as GDataStreamNewlineType.

 
-
-
-
-
-

g_data_input_stream_get_newline_type ()

-
GDataStreamNewlineType
-g_data_input_stream_get_newline_type (GDataInputStream *stream);
-

Gets the current newline type for the stream -.

-
-

Parameters

-
----- - - - - - -

stream

a given GDataInputStream.

 
-
-
-

Returns

-

GDataStreamNewlineType for the given stream -.

-
-
-
-
-

g_data_input_stream_read_byte ()

-
guchar
-g_data_input_stream_read_byte (GDataInputStream *stream,
-                               GCancellable *cancellable,
-                               GError **error);
-

Reads an unsigned 8-bit/1-byte value from stream -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a given GDataInputStream.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

GError for error reporting.

 
-
-
-

Returns

-

an unsigned 8-bit/1-byte value read from the stream -or 0 -if an error occurred.

-
-
-
-
-

g_data_input_stream_read_int16 ()

-
gint16
-g_data_input_stream_read_int16 (GDataInputStream *stream,
-                                GCancellable *cancellable,
-                                GError **error);
-

Reads a 16-bit/2-byte value from stream -.

-

In order to get the correct byte order for this read operation, -see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a given GDataInputStream.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

GError for error reporting.

 
-
-
-

Returns

-

a signed 16-bit/2-byte value read from stream -or 0 if -an error occurred.

-
-
-
-
-

g_data_input_stream_read_uint16 ()

-
guint16
-g_data_input_stream_read_uint16 (GDataInputStream *stream,
-                                 GCancellable *cancellable,
-                                 GError **error);
-

Reads an unsigned 16-bit/2-byte value from stream -.

-

In order to get the correct byte order for this read operation, -see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a given GDataInputStream.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

GError for error reporting.

 
-
-
-

Returns

-

an unsigned 16-bit/2-byte value read from the stream -or 0 if -an error occurred.

-
-
-
-
-

g_data_input_stream_read_int32 ()

-
gint32
-g_data_input_stream_read_int32 (GDataInputStream *stream,
-                                GCancellable *cancellable,
-                                GError **error);
-

Reads a signed 32-bit/4-byte value from stream -.

-

In order to get the correct byte order for this read operation, -see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a given GDataInputStream.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

GError for error reporting.

 
-
-
-

Returns

-

a signed 32-bit/4-byte value read from the stream -or 0 if -an error occurred.

-
-
-
-
-

g_data_input_stream_read_uint32 ()

-
guint32
-g_data_input_stream_read_uint32 (GDataInputStream *stream,
-                                 GCancellable *cancellable,
-                                 GError **error);
-

Reads an unsigned 32-bit/4-byte value from stream -.

-

In order to get the correct byte order for this read operation, -see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a given GDataInputStream.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

GError for error reporting.

 
-
-
-

Returns

-

an unsigned 32-bit/4-byte value read from the stream -or 0 if -an error occurred.

-
-
-
-
-

g_data_input_stream_read_int64 ()

-
gint64
-g_data_input_stream_read_int64 (GDataInputStream *stream,
-                                GCancellable *cancellable,
-                                GError **error);
-

Reads a 64-bit/8-byte value from stream -.

-

In order to get the correct byte order for this read operation, -see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order().

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a given GDataInputStream.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

GError for error reporting.

 
-
-
-

Returns

-

a signed 64-bit/8-byte value read from stream -or 0 if -an error occurred.

-
-
-
-
-

g_data_input_stream_read_uint64 ()

-
guint64
-g_data_input_stream_read_uint64 (GDataInputStream *stream,
-                                 GCancellable *cancellable,
-                                 GError **error);
-

Reads an unsigned 64-bit/8-byte value from stream -.

-

In order to get the correct byte order for this read operation, -see g_data_input_stream_get_byte_order().

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a given GDataInputStream.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

GError for error reporting.

 
-
-
-

Returns

-

an unsigned 64-bit/8-byte read from stream -or 0 if -an error occurred.

-
-
-
-
-

g_data_input_stream_read_line ()

-
char *
-g_data_input_stream_read_line (GDataInputStream *stream,
-                               gsize *length,
-                               GCancellable *cancellable,
-                               GError **error);
-

Reads a line from the data input stream. Note that no encoding -checks or conversion is performed; the input is not guaranteed to -be UTF-8, and may in fact have embedded NUL characters.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a given GDataInputStream.

 

length

a gsize to get the length of the data read in.

[out]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

GError for error reporting.

 
-
-
-

Returns

-

a NUL terminated byte array with the line that was read in -(without the newlines). Set length -to a gsize to get the length -of the read line. On an error, it will return NULL and error -will be set. If there's no content to read, it will still return -NULL, but error -won't be set.

-

[nullable][transfer full][array zero-terminated=1][element-type guint8]

-
-
-
-
-

g_data_input_stream_read_line_utf8 ()

-
char *
-g_data_input_stream_read_line_utf8 (GDataInputStream *stream,
-                                    gsize *length,
-                                    GCancellable *cancellable,
-                                    GError **error);
-

Reads a UTF-8 encoded line from the data input stream.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a given GDataInputStream.

 

length

a gsize to get the length of the data read in.

[out]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

GError for error reporting.

 
-
-
-

Returns

-

a NUL terminated UTF-8 string -with the line that was read in (without the newlines). Set -length -to a gsize to get the length of the read line. On an -error, it will return NULL and error -will be set. For UTF-8 -conversion errors, the set error domain is G_CONVERT_ERROR. If -there's no content to read, it will still return NULL, but error -won't be set.

-

[nullable][transfer full]

-
-

Since: 2.30

-
-
-
-

g_data_input_stream_read_line_async ()

-
void
-g_data_input_stream_read_line_async (GDataInputStream *stream,
-                                     gint io_priority,
-                                     GCancellable *cancellable,
-                                     GAsyncReadyCallback callback,
-                                     gpointer user_data);
-

The asynchronous version of g_data_input_stream_read_line(). It is -an error to have two outstanding calls to this function.

-

When the operation is finished, callback - will be called. You -can then call g_data_input_stream_read_line_finish() to get -the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a given GDataInputStream.

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

callback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-

Since: 2.20

-
-
-
-

g_data_input_stream_read_line_finish ()

-
char *
-g_data_input_stream_read_line_finish (GDataInputStream *stream,
-                                      GAsyncResult *result,
-                                      gsize *length,
-                                      GError **error);
-

Finish an asynchronous call started by -g_data_input_stream_read_line_async(). Note the warning about -string encoding in g_data_input_stream_read_line() applies here as -well.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a given GDataInputStream.

 

result

the GAsyncResult that was provided to the callback.

 

length

a gsize to get the length of the data read in.

[out]

error

GError for error reporting.

 
-
-
-

Returns

-

a NUL-terminated byte array with the line that was read in -(without the newlines). Set length -to a gsize to get the length -of the read line. On an error, it will return NULL and error -will be set. If there's no content to read, it will still return -NULL, but error -won't be set.

-

[nullable][transfer full][array zero-terminated=1][element-type guint8]

-
-

Since: 2.20

-
-
-
-

g_data_input_stream_read_line_finish_utf8 ()

-
char *
-g_data_input_stream_read_line_finish_utf8
-                               (GDataInputStream *stream,
-                                GAsyncResult *result,
-                                gsize *length,
-                                GError **error);
-

Finish an asynchronous call started by -g_data_input_stream_read_line_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a given GDataInputStream.

 

result

the GAsyncResult that was provided to the callback.

 

length

a gsize to get the length of the data read in.

[out]

error

GError for error reporting.

 
-
-
-

Returns

-

a string with the line that -was read in (without the newlines). Set length -to a gsize to -get the length of the read line. On an error, it will return -NULL and error -will be set. For UTF-8 conversion errors, the set -error domain is G_CONVERT_ERROR. If there's no content to read, -it will still return NULL, but error -won't be set.

-

[nullable][transfer full]

-
-

Since: 2.30

-
-
-
-

g_data_input_stream_read_upto ()

-
char *
-g_data_input_stream_read_upto (GDataInputStream *stream,
-                               const gchar *stop_chars,
-                               gssize stop_chars_len,
-                               gsize *length,
-                               GCancellable *cancellable,
-                               GError **error);
-

Reads a string from the data input stream, up to the first -occurrence of any of the stop characters.

-

In contrast to g_data_input_stream_read_until(), this function -does not consume the stop character. You have to use -g_data_input_stream_read_byte() to get it before calling -g_data_input_stream_read_upto() again.

-

Note that stop_chars - may contain '\0' if stop_chars_len - is -specified.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GDataInputStream

 

stop_chars

characters to terminate the read

 

stop_chars_len

length of stop_chars -. May be -1 if stop_chars -is -nul-terminated

 

length

a gsize to get the length of the data read in.

[out]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

GError for error reporting

 
-
-
-

Returns

-

a string with the data that was read -before encountering any of the stop characters. Set length -to -a gsize to get the length of the string. This function will -return NULL on an error.

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_data_input_stream_read_upto_async ()

-
void
-g_data_input_stream_read_upto_async (GDataInputStream *stream,
-                                     const gchar *stop_chars,
-                                     gssize stop_chars_len,
-                                     gint io_priority,
-                                     GCancellable *cancellable,
-                                     GAsyncReadyCallback callback,
-                                     gpointer user_data);
-

The asynchronous version of g_data_input_stream_read_upto(). -It is an error to have two outstanding calls to this function.

-

In contrast to g_data_input_stream_read_until(), this function -does not consume the stop character. You have to use -g_data_input_stream_read_byte() to get it before calling -g_data_input_stream_read_upto() again.

-

Note that stop_chars - may contain '\0' if stop_chars_len - is -specified.

-

When the operation is finished, callback - will be called. You -can then call g_data_input_stream_read_upto_finish() to get -the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GDataInputStream

 

stop_chars

characters to terminate the read

 

stop_chars_len

length of stop_chars -. May be -1 if stop_chars -is -nul-terminated

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

callback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-

Since: 2.26

-
-
-
-

g_data_input_stream_read_upto_finish ()

-
char *
-g_data_input_stream_read_upto_finish (GDataInputStream *stream,
-                                      GAsyncResult *result,
-                                      gsize *length,
-                                      GError **error);
-

Finish an asynchronous call started by -g_data_input_stream_read_upto_async().

-

Note that this function does not consume the stop character. You -have to use g_data_input_stream_read_byte() to get it before calling -g_data_input_stream_read_upto_async() again.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GDataInputStream

 

result

the GAsyncResult that was provided to the callback

 

length

a gsize to get the length of the data read in.

[out]

error

GError for error reporting

 
-
-
-

Returns

-

a string with the data that was read -before encountering any of the stop characters. Set length -to -a gsize to get the length of the string. This function will -return NULL on an error.

-

[transfer full]

-
-

Since: 2.24

-
-
-
-

g_data_input_stream_read_until ()

-
char *
-g_data_input_stream_read_until (GDataInputStream *stream,
-                                const gchar *stop_chars,
-                                gsize *length,
-                                GCancellable *cancellable,
-                                GError **error);
-

Reads a string from the data input stream, up to the first -occurrence of any of the stop characters.

-

Note that, in contrast to g_data_input_stream_read_until_async(), -this function consumes the stop character that it finds.

-

Don't use this function in new code. Its functionality is -inconsistent with g_data_input_stream_read_until_async(). Both -functions will be marked as deprecated in a future release. Use -g_data_input_stream_read_upto() instead, but note that that function -does not consume the stop character.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a given GDataInputStream.

 

stop_chars

characters to terminate the read.

 

length

a gsize to get the length of the data read in.

[out]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

GError for error reporting.

 
-
-
-

Returns

-

a string with the data that was read -before encountering any of the stop characters. Set length -to -a gsize to get the length of the string. This function will -return NULL on an error.

-

[transfer full]

-
-
-
-
-

g_data_input_stream_read_until_async ()

-
void
-g_data_input_stream_read_until_async (GDataInputStream *stream,
-                                      const gchar *stop_chars,
-                                      gint io_priority,
-                                      GCancellable *cancellable,
-                                      GAsyncReadyCallback callback,
-                                      gpointer user_data);
-

The asynchronous version of g_data_input_stream_read_until(). -It is an error to have two outstanding calls to this function.

-

Note that, in contrast to g_data_input_stream_read_until(), -this function does not consume the stop character that it finds. You -must read it for yourself.

-

When the operation is finished, callback - will be called. You -can then call g_data_input_stream_read_until_finish() to get -the result of the operation.

-

Don't use this function in new code. Its functionality is -inconsistent with g_data_input_stream_read_until(). Both functions -will be marked as deprecated in a future release. Use -g_data_input_stream_read_upto_async() instead.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a given GDataInputStream.

 

stop_chars

characters to terminate the read.

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

callback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-

Since: 2.20

-
-
-
-

g_data_input_stream_read_until_finish ()

-
char *
-g_data_input_stream_read_until_finish (GDataInputStream *stream,
-                                       GAsyncResult *result,
-                                       gsize *length,
-                                       GError **error);
-

Finish an asynchronous call started by -g_data_input_stream_read_until_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a given GDataInputStream.

 

result

the GAsyncResult that was provided to the callback.

 

length

a gsize to get the length of the data read in.

[out]

error

GError for error reporting.

 
-
-
-

Returns

-

a string with the data that was read -before encountering any of the stop characters. Set length -to -a gsize to get the length of the string. This function will -return NULL on an error.

-

[transfer full]

-
-

Since: 2.20

-
-
-
-

Types and Values

-
-

GDataInputStream

-
typedef struct _GDataInputStream GDataInputStream;
-

An implementation of GBufferedInputStream that allows for high-level -data manipulation of arbitrary data (including binary operations).

-
-
-
-

enum GDataStreamByteOrder

-

GDataStreamByteOrder is used to ensure proper endianness of streaming data sources -across various machine architectures.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN

-

Selects Big Endian byte order.

-
 

G_DATA_STREAM_BYTE_ORDER_LITTLE_ENDIAN

-

Selects Little Endian byte order.

-
 

G_DATA_STREAM_BYTE_ORDER_HOST_ENDIAN

-

Selects endianness based on host machine's architecture.

-
 
-
-
-
-
-

enum GDataStreamNewlineType

-

GDataStreamNewlineType is used when checking for or setting the line endings for a given file.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_DATA_STREAM_NEWLINE_TYPE_LF

-

Selects "LF" line endings, common on most modern UNIX platforms.

-
 

G_DATA_STREAM_NEWLINE_TYPE_CR

-

Selects "CR" line endings.

-
 

G_DATA_STREAM_NEWLINE_TYPE_CR_LF

-

Selects "CR, LF" line ending, common on Microsoft Windows.

-
 

G_DATA_STREAM_NEWLINE_TYPE_ANY

-

Automatically try to handle any line ending type.

-
 
-
-
-
-
-

Property Details

-
-

The “byte-order” property

-
  “byte-order”               GDataStreamByteOrder
-

The byte order.

-

Flags: Read / Write

-

Default value: G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN

-
-
-
-

The “newline-type” property

-
  “newline-type”             GDataStreamNewlineType
-

The accepted types of line ending.

-

Flags: Read / Write

-

Default value: G_DATA_STREAM_NEWLINE_TYPE_LF

-
-
-
-

See Also

-

GInputStream

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDataOutputStream.html b/docs/reference/gio/html/GDataOutputStream.html deleted file mode 100644 index 00c41a36f..000000000 --- a/docs/reference/gio/html/GDataOutputStream.html +++ /dev/null @@ -1,688 +0,0 @@ - - - - -GDataOutputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDataOutputStream

-

GDataOutputStream — Data Output Stream

-
- -
-

Properties

-
----- - - - - - -
GDataStreamByteOrderbyte-orderRead / Write
-
-
-

Types and Values

-
---- - - - - -
structGDataOutputStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GOutputStream
-        ╰── GFilterOutputStream
-            ╰── GDataOutputStream
-
-
-
-

Implemented Interfaces

-

-GDataOutputStream implements - GSeekable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Data output stream implements GOutputStream and includes functions for -writing data directly to an output stream.

-
-
-

Functions

-
-

g_data_output_stream_new ()

-
GDataOutputStream *
-g_data_output_stream_new (GOutputStream *base_stream);
-

Creates a new data output stream for base_stream -.

-
-

Parameters

-
----- - - - - - -

base_stream

a GOutputStream.

 
-
-
-

Returns

-

GDataOutputStream.

-
-
-
-
-

g_data_output_stream_set_byte_order ()

-
void
-g_data_output_stream_set_byte_order (GDataOutputStream *stream,
-                                     GDataStreamByteOrder order);
-

Sets the byte order of the data output stream to order -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GDataOutputStream.

 

order

a GDataStreamByteOrder.

 
-
-
-
-
-

g_data_output_stream_get_byte_order ()

-
GDataStreamByteOrder
-g_data_output_stream_get_byte_order (GDataOutputStream *stream);
-

Gets the byte order for the stream.

-
-

Parameters

-
----- - - - - - -

stream

a GDataOutputStream.

 
-
-
-

Returns

-

the GDataStreamByteOrder for the stream -.

-
-
-
-
-

g_data_output_stream_put_byte ()

-
gboolean
-g_data_output_stream_put_byte (GDataOutputStream *stream,
-                               guchar data,
-                               GCancellable *cancellable,
-                               GError **error);
-

Puts a byte into the output stream.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GDataOutputStream.

 

data

a guchar.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

a GError, NULL to ignore.

 
-
-
-

Returns

-

TRUE if data -was successfully added to the stream -.

-
-
-
-
-

g_data_output_stream_put_int16 ()

-
gboolean
-g_data_output_stream_put_int16 (GDataOutputStream *stream,
-                                gint16 data,
-                                GCancellable *cancellable,
-                                GError **error);
-

Puts a signed 16-bit integer into the output stream.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GDataOutputStream.

 

data

a gint16.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

a GError, NULL to ignore.

 
-
-
-

Returns

-

TRUE if data -was successfully added to the stream -.

-
-
-
-
-

g_data_output_stream_put_uint16 ()

-
gboolean
-g_data_output_stream_put_uint16 (GDataOutputStream *stream,
-                                 guint16 data,
-                                 GCancellable *cancellable,
-                                 GError **error);
-

Puts an unsigned 16-bit integer into the output stream.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GDataOutputStream.

 

data

a guint16.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

a GError, NULL to ignore.

 
-
-
-

Returns

-

TRUE if data -was successfully added to the stream -.

-
-
-
-
-

g_data_output_stream_put_int32 ()

-
gboolean
-g_data_output_stream_put_int32 (GDataOutputStream *stream,
-                                gint32 data,
-                                GCancellable *cancellable,
-                                GError **error);
-

Puts a signed 32-bit integer into the output stream.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GDataOutputStream.

 

data

a gint32.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

a GError, NULL to ignore.

 
-
-
-

Returns

-

TRUE if data -was successfully added to the stream -.

-
-
-
-
-

g_data_output_stream_put_uint32 ()

-
gboolean
-g_data_output_stream_put_uint32 (GDataOutputStream *stream,
-                                 guint32 data,
-                                 GCancellable *cancellable,
-                                 GError **error);
-

Puts an unsigned 32-bit integer into the stream.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GDataOutputStream.

 

data

a guint32.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

a GError, NULL to ignore.

 
-
-
-

Returns

-

TRUE if data -was successfully added to the stream -.

-
-
-
-
-

g_data_output_stream_put_int64 ()

-
gboolean
-g_data_output_stream_put_int64 (GDataOutputStream *stream,
-                                gint64 data,
-                                GCancellable *cancellable,
-                                GError **error);
-

Puts a signed 64-bit integer into the stream.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GDataOutputStream.

 

data

a gint64.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

a GError, NULL to ignore.

 
-
-
-

Returns

-

TRUE if data -was successfully added to the stream -.

-
-
-
-
-

g_data_output_stream_put_uint64 ()

-
gboolean
-g_data_output_stream_put_uint64 (GDataOutputStream *stream,
-                                 guint64 data,
-                                 GCancellable *cancellable,
-                                 GError **error);
-

Puts an unsigned 64-bit integer into the stream.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GDataOutputStream.

 

data

a guint64.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

a GError, NULL to ignore.

 
-
-
-

Returns

-

TRUE if data -was successfully added to the stream -.

-
-
-
-
-

g_data_output_stream_put_string ()

-
gboolean
-g_data_output_stream_put_string (GDataOutputStream *stream,
-                                 const char *str,
-                                 GCancellable *cancellable,
-                                 GError **error);
-

Puts a string into the output stream.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GDataOutputStream.

 

str

a string.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

a GError, NULL to ignore.

 
-
-
-

Returns

-

TRUE if string -was successfully added to the stream -.

-
-
-
-
-

Types and Values

-
-

struct GDataOutputStream

-
struct GDataOutputStream;
-

An implementation of GBufferedOutputStream that allows for high-level -data manipulation of arbitrary data (including binary operations).

-
-
-
-

Property Details

-
-

The “byte-order” property

-
  “byte-order”               GDataStreamByteOrder
-

Determines the byte ordering that is used when writing - -multi-byte entities (such as integers) to the stream.

-

Flags: Read / Write

-

Default value: G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN

-
-
-
-

See Also

-

GOutputStream

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDatagramBased.html b/docs/reference/gio/html/GDatagramBased.html deleted file mode 100644 index 25cdf404d..000000000 --- a/docs/reference/gio/html/GDatagramBased.html +++ /dev/null @@ -1,762 +0,0 @@ - - - - -GDatagramBased: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDatagramBased

-

GDatagramBased — Low-level datagram communications interface

-
-
-

Functions

- -
-
-

Types and Values

-
---- - - - - - - - - - - -
 GDatagramBased
structGDatagramBasedInterface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GDatagramBased
-
-
-
-

Prerequisites

-

-GDatagramBased requires - GObject.

-
-
-

Known Derived Interfaces

-

-GDatagramBased is required by - GDtlsClientConnection, GDtlsConnection and GDtlsServerConnection.

-
-
-

Known Implementations

-

-GDatagramBased is implemented by - GSocket.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A GDatagramBased is a networking interface for representing datagram-based -communications. It is a more or less direct mapping of the core parts of the -BSD socket API in a portable GObject interface. It is implemented by -GSocket, which wraps the UNIX socket API on UNIX and winsock2 on Windows.

-

GDatagramBased is entirely platform independent, and is intended to be used -alongside higher-level networking APIs such as GIOStream.

-

It uses vectored scatter/gather I/O by default, allowing for many messages -to be sent or received in a single call. Where possible, implementations of -the interface should take advantage of vectored I/O to minimise processing -or system calls. For example, GSocket uses recvmmsg() and sendmmsg() where -possible. Callers should take advantage of scatter/gather I/O (the use of -multiple buffers per message) to avoid unnecessary copying of data to -assemble or disassemble a message.

-

Each GDatagramBased operation has a timeout parameter which may be negative -for blocking behaviour, zero for non-blocking behaviour, or positive for -timeout behaviour. A blocking operation blocks until finished or there is an -error. A non-blocking operation will return immediately with a -G_IO_ERROR_WOULD_BLOCK error if it cannot make progress. A timeout operation -will block until the operation is complete or the timeout expires; if the -timeout expires it will return what progress it made, or -G_IO_ERROR_TIMED_OUT if no progress was made. To know when a call would -successfully run you can call g_datagram_based_condition_check() or -g_datagram_based_condition_wait(). You can also use -g_datagram_based_create_source() and attach it to a GMainContext to get -callbacks when I/O is possible.

-

When running a non-blocking operation applications should always be able to -handle getting a G_IO_ERROR_WOULD_BLOCK error even when some other function -said that I/O was possible. This can easily happen in case of a race -condition in the application, but it can also happen for other reasons. For -instance, on Windows a socket is always seen as writable until a write -returns G_IO_ERROR_WOULD_BLOCK.

-

As with GSocket, GDatagramBaseds can be either connection oriented (for -example, SCTP) or connectionless (for example, UDP). GDatagramBaseds must be -datagram-based, not stream-based. The interface does not cover connection -establishment — use methods on the underlying type to establish a connection -before sending and receiving data through the GDatagramBased API. For -connectionless socket types the target/source address is specified or -received in each I/O operation.

-

Like most other APIs in GLib, GDatagramBased is not inherently thread safe. -To use a GDatagramBased concurrently from multiple threads, you must -implement your own locking.

-
-
-

Functions

-
-

GDatagramBasedSourceFunc ()

-
gboolean
-(*GDatagramBasedSourceFunc) (GDatagramBased *datagram_based,
-                             GIOCondition condition,
-                             gpointer user_data);
-

This is the function type of the callback used for the GSource -returned by g_datagram_based_create_source().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

datagram_based

the GDatagramBased

 

condition

the current condition at the source fired

 

user_data

data passed in by the user

 
-
-
-

Returns

-

G_SOURCE_REMOVE if the source should be removed, -G_SOURCE_CONTINUE otherwise

-
-

Since: 2.48

-
-
-
-

g_datagram_based_receive_messages ()

-
gint
-g_datagram_based_receive_messages (GDatagramBased *datagram_based,
-                                   GInputMessage *messages,
-                                   guint num_messages,
-                                   gint flags,
-                                   gint64 timeout,
-                                   GCancellable *cancellable,
-                                   GError **error);
-

Receive one or more data messages from datagram_based - in one go.

-

messages - must point to an array of GInputMessage structs and -num_messages - must be the length of this array. Each GInputMessage -contains a pointer to an array of GInputVector structs describing the -buffers that the data received in each message will be written to.

-

flags - modify how all messages are received. The commonly available -arguments for this are available in the GSocketMsgFlags enum, but the -values there are the same as the system values, and the flags -are passed in as-is, so you can pass in system-specific flags too. These -flags affect the overall receive operation. Flags affecting individual -messages are returned in GInputMessage.flags.

-

The other members of GInputMessage are treated as described in its -documentation.

-

If timeout - is negative the call will block until num_messages - have been -received, the connection is closed remotely (EOS), cancellable - is cancelled, -or an error occurs.

-

If timeout - is 0 the call will return up to num_messages - without blocking, -or G_IO_ERROR_WOULD_BLOCK if no messages are queued in the operating system -to be received.

-

If timeout - is positive the call will block on the same conditions as if -timeout - were negative. If the timeout is reached -before any messages are received, G_IO_ERROR_TIMED_OUT is returned, -otherwise it will return the number of messages received before timing out. -(Note: This is effectively the behaviour of MSG_WAITFORONE with -recvmmsg().)

-

To be notified when messages are available, wait for the G_IO_IN condition. -Note though that you may still receive G_IO_ERROR_WOULD_BLOCK from -g_datagram_based_receive_messages() even if you were previously notified of a -G_IO_IN condition.

-

If the remote peer closes the connection, any messages queued in the -underlying receive buffer will be returned, and subsequent calls to -g_datagram_based_receive_messages() will return 0 (with no error set).

-

If the connection is shut down or closed (by calling g_socket_close() or -g_socket_shutdown() with shutdown_read - set, if it’s a GSocket, for -example), all calls to this function will return G_IO_ERROR_CLOSED.

-

On error -1 is returned and error - is set accordingly. An error will only -be returned if zero messages could be received; otherwise the number of -messages successfully received before the error will be returned. If -cancellable - is cancelled, G_IO_ERROR_CANCELLED is returned as with any -other error.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

datagram_based

a GDatagramBased

 

messages

an array of GInputMessage structs.

[array length=num_messages]

num_messages

the number of elements in messages -

 

flags

an int containing GSocketMsgFlags flags for the overall operation

 

timeout

the maximum time (in microseconds) to wait, 0 to not block, or -1 -to block indefinitely

 

cancellable

a GCancellable.

[nullable]

error

return location for a GError

 
-
-
-

Returns

-

number of messages received, or -1 on error. Note that the number -of messages received may be smaller than num_messages -if timeout -is -zero or positive, if the peer closed the connection, or if num_messages -was larger than UIO_MAXIOV (1024), in which case the caller may re-try -to receive the remaining messages.

-
-

Since: 2.48

-
-
-
-

g_datagram_based_send_messages ()

-
gint
-g_datagram_based_send_messages (GDatagramBased *datagram_based,
-                                GOutputMessage *messages,
-                                guint num_messages,
-                                gint flags,
-                                gint64 timeout,
-                                GCancellable *cancellable,
-                                GError **error);
-

Send one or more data messages from datagram_based - in one go.

-

messages - must point to an array of GOutputMessage structs and -num_messages - must be the length of this array. Each GOutputMessage -contains an address to send the data to, and a pointer to an array of -GOutputVector structs to describe the buffers that the data to be sent -for each message will be gathered from.

-

flags - modify how the message is sent. The commonly available arguments -for this are available in the GSocketMsgFlags enum, but the -values there are the same as the system values, and the flags -are passed in as-is, so you can pass in system-specific flags too.

-

The other members of GOutputMessage are treated as described in its -documentation.

-

If timeout - is negative the call will block until num_messages - have been -sent, cancellable - is cancelled, or an error occurs.

-

If timeout - is 0 the call will send up to num_messages - without blocking, -or will return G_IO_ERROR_WOULD_BLOCK if there is no space to send messages.

-

If timeout - is positive the call will block on the same conditions as if -timeout - were negative. If the timeout is reached before any messages are -sent, G_IO_ERROR_TIMED_OUT is returned, otherwise it will return the number -of messages sent before timing out.

-

To be notified when messages can be sent, wait for the G_IO_OUT condition. -Note though that you may still receive G_IO_ERROR_WOULD_BLOCK from -g_datagram_based_send_messages() even if you were previously notified of a -G_IO_OUT condition. (On Windows in particular, this is very common due to -the way the underlying APIs work.)

-

If the connection is shut down or closed (by calling g_socket_close() or -g_socket_shutdown() with shutdown_write - set, if it’s a GSocket, for -example), all calls to this function will return G_IO_ERROR_CLOSED.

-

On error -1 is returned and error - is set accordingly. An error will only -be returned if zero messages could be sent; otherwise the number of messages -successfully sent before the error will be returned. If cancellable - is -cancelled, G_IO_ERROR_CANCELLED is returned as with any other error.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

datagram_based

a GDatagramBased

 

messages

an array of GOutputMessage structs.

[array length=num_messages]

num_messages

the number of elements in messages -

 

flags

an int containing GSocketMsgFlags flags

 

timeout

the maximum time (in microseconds) to wait, 0 to not block, or -1 -to block indefinitely

 

cancellable

a GCancellable.

[nullable]

error

return location for a GError

 
-
-
-

Returns

-

number of messages sent, or -1 on error. Note that the number of -messages sent may be smaller than num_messages -if timeout -is zero -or positive, or if num_messages -was larger than UIO_MAXIOV (1024), in -which case the caller may re-try to send the remaining messages.

-
-

Since: 2.48

-
-
-
-

g_datagram_based_create_source ()

-
GSource *
-g_datagram_based_create_source (GDatagramBased *datagram_based,
-                                GIOCondition condition,
-                                GCancellable *cancellable);
-

Creates a GSource that can be attached to a GMainContext to monitor for -the availability of the specified condition - on the GDatagramBased. The -GSource keeps a reference to the datagram_based -.

-

The callback on the source is of the GDatagramBasedSourceFunc type.

-

It is meaningless to specify G_IO_ERR or G_IO_HUP in condition -; these -conditions will always be reported in the callback if they are true.

-

If non-NULL, cancellable - can be used to cancel the source, which will -cause the source to trigger, reporting the current condition (which is -likely 0 unless cancellation happened at the same time as a condition -change). You can check for this in the callback using -g_cancellable_is_cancelled().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

datagram_based

a GDatagramBased

 

condition

a GIOCondition mask to monitor

 

cancellable

a GCancellable.

[nullable]
-
-
-

Returns

-

a newly allocated GSource.

-

[transfer full]

-
-

Since: 2.48

-
-
-
-

g_datagram_based_condition_check ()

-
GIOCondition
-g_datagram_based_condition_check (GDatagramBased *datagram_based,
-                                  GIOCondition condition);
-

Checks on the readiness of datagram_based - to perform operations. The -operations specified in condition - are checked for and masked against the -currently-satisfied conditions on datagram_based -. The result is returned.

-

G_IO_IN will be set in the return value if data is available to read with -g_datagram_based_receive_messages(), or if the connection is closed remotely -(EOS); and if the datagram_based has not been closed locally using some -implementation-specific method (such as g_socket_close() or -g_socket_shutdown() with shutdown_read - set, if it’s a GSocket).

-

If the connection is shut down or closed (by calling g_socket_close() or -g_socket_shutdown() with shutdown_read - set, if it’s a GSocket, for -example), all calls to this function will return G_IO_ERROR_CLOSED.

-

G_IO_OUT will be set if it is expected that at least one byte can be sent -using g_datagram_based_send_messages() without blocking. It will not be set -if the datagram_based has been closed locally.

-

G_IO_HUP will be set if the connection has been closed locally.

-

G_IO_ERR will be set if there was an asynchronous error in transmitting data -previously enqueued using g_datagram_based_send_messages().

-

Note that on Windows, it is possible for an operation to return -G_IO_ERROR_WOULD_BLOCK even immediately after -g_datagram_based_condition_check() has claimed that the GDatagramBased is -ready for writing. Rather than calling g_datagram_based_condition_check() and -then writing to the GDatagramBased if it succeeds, it is generally better to -simply try writing right away, and try again later if the initial attempt -returns G_IO_ERROR_WOULD_BLOCK.

-

It is meaningless to specify G_IO_ERR or G_IO_HUP in condition -; these -conditions will always be set in the output if they are true. Apart from -these flags, the output is guaranteed to be masked by condition -.

-

This call never blocks.

-
-

Parameters

-
----- - - - - - - - - - - - - -

datagram_based

a GDatagramBased

 

condition

a GIOCondition mask to check

 
-
-
-

Returns

-

the GIOCondition mask of the current state

-
-

Since: 2.48

-
-
-
-

g_datagram_based_condition_wait ()

-
gboolean
-g_datagram_based_condition_wait (GDatagramBased *datagram_based,
-                                 GIOCondition condition,
-                                 gint64 timeout,
-                                 GCancellable *cancellable,
-                                 GError **error);
-

Waits for up to timeout - microseconds for condition to become true on -datagram_based -. If the condition is met, TRUE is returned.

-

If cancellable - is cancelled before the condition is met, or if timeout - is -reached before the condition is met, then FALSE is returned and error - is -set appropriately (G_IO_ERROR_CANCELLED or G_IO_ERROR_TIMED_OUT).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

datagram_based

a GDatagramBased

 

condition

a GIOCondition mask to wait for

 

timeout

the maximum time (in microseconds) to wait, 0 to not block, or -1 -to block indefinitely

 

cancellable

a GCancellable.

[nullable]

error

return location for a GError

 
-
-
-

Returns

-

TRUE if the condition was met, FALSE otherwise

-
-

Since: 2.48

-
-
-
-

Types and Values

-
-

GDatagramBased

-
typedef struct _GDatagramBased GDatagramBased;
-

Interface for socket-like objects with datagram semantics.

-

Since: 2.48

-
-
-
-

struct GDatagramBasedInterface

-
struct GDatagramBasedInterface {
-  GTypeInterface g_iface;
-
-  /* Virtual table */
-  gint          (*receive_messages)     (GDatagramBased       *datagram_based,
-                                         GInputMessage        *messages,
-                                         guint                 num_messages,
-                                         gint                  flags,
-                                         gint64                timeout,
-                                         GCancellable         *cancellable,
-                                         GError              **error);
-  gint          (*send_messages)        (GDatagramBased       *datagram_based,
-                                         GOutputMessage       *messages,
-                                         guint                 num_messages,
-                                         gint                  flags,
-                                         gint64                timeout,
-                                         GCancellable         *cancellable,
-                                         GError              **error);
-
-  GSource      *(*create_source)        (GDatagramBased       *datagram_based,
-                                         GIOCondition          condition,
-                                         GCancellable         *cancellable);
-  GIOCondition  (*condition_check)      (GDatagramBased       *datagram_based,
-                                         GIOCondition          condition);
-  gboolean      (*condition_wait)       (GDatagramBased       *datagram_based,
-                                         GIOCondition          condition,
-                                         gint64                timeout,
-                                         GCancellable         *cancellable,
-                                         GError              **error);
-};
-
-

Provides an interface for socket-like objects which have datagram semantics, -following the Berkeley sockets API. The interface methods are thin wrappers -around the corresponding virtual methods, and no pre-processing of inputs is -implemented — so implementations of this API must handle all functionality -documented in the interface methods.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

receive_messages ()

Virtual method for g_datagram_based_receive_messages().

 

send_messages ()

Virtual method for g_datagram_based_send_messages().

 

create_source ()

Virtual method for g_datagram_based_create_source().

 

condition_check ()

Virtual method for g_datagram_based_condition_check().

 

condition_wait ()

Virtual method for -g_datagram_based_condition_wait().

 
-
-

Since: 2.48

-
-
-
-

See Also

-

GSocket, <gnetworking.h>

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDrive.html b/docs/reference/gio/html/GDrive.html deleted file mode 100644 index cd966b8aa..000000000 --- a/docs/reference/gio/html/GDrive.html +++ /dev/null @@ -1,1892 +0,0 @@ - - - - -GDrive: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDrive

-

GDrive — Drive management

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-char * - -g_drive_get_name () -
-GIcon * - -g_drive_get_icon () -
-GIcon * - -g_drive_get_symbolic_icon () -
-gboolean - -g_drive_has_volumes () -
-GList * - -g_drive_get_volumes () -
-gboolean - -g_drive_can_eject () -
-GDriveStartStopType - -g_drive_get_start_stop_type () -
-gboolean - -g_drive_can_start () -
-gboolean - -g_drive_can_start_degraded () -
-gboolean - -g_drive_can_stop () -
-gboolean - -g_drive_can_poll_for_media () -
-void - -g_drive_poll_for_media () -
-gboolean - -g_drive_poll_for_media_finish () -
-gboolean - -g_drive_has_media () -
-gboolean - -g_drive_is_media_check_automatic () -
-gboolean - -g_drive_is_removable () -
-gboolean - -g_drive_is_media_removable () -
-void - -g_drive_eject () -
-gboolean - -g_drive_eject_finish () -
-void - -g_drive_eject_with_operation () -
-gboolean - -g_drive_eject_with_operation_finish () -
-void - -g_drive_start () -
-gboolean - -g_drive_start_finish () -
-void - -g_drive_stop () -
-gboolean - -g_drive_stop_finish () -
-char ** - -g_drive_enumerate_identifiers () -
-char * - -g_drive_get_identifier () -
const gchar * - -g_drive_get_sort_key () -
-
-
-

Signals

-
----- - - - - - - - - - - - - - - - - - - - - - - -
voidchangedRun Last
voiddisconnectedRun Last
voideject-buttonRun Last
voidstop-buttonRun Last
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
 GDrive
structGDriveIface
enumGDriveStartFlags
enumGDriveStartStopType
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GDrive
-
-
-
-

Prerequisites

-

-GDrive requires - GObject.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GDrive - this represent a piece of hardware connected to the machine. -It's generally only created for removable hardware or hardware with -removable media.

-

GDrive is a container class for GVolume objects that stem from -the same piece of media. As such, GDrive abstracts a drive with -(or without) removable media and provides operations for querying -whether media is available, determining whether media change is -automatically detected and ejecting the media.

-

If the GDrive reports that media isn't automatically detected, one -can poll for media; typically one should not do this periodically -as a poll for media operation is potententially expensive and may -spin up the drive creating noise.

-

GDrive supports starting and stopping drives with authentication -support for the former. This can be used to support a diverse set -of use cases including connecting/disconnecting iSCSI devices, -powering down external disk enclosures and starting/stopping -multi-disk devices such as RAID devices. Note that the actual -semantics and side-effects of starting/stopping a GDrive may vary -according to implementation. To choose the correct verbs in e.g. a -file manager, use g_drive_get_start_stop_type().

-

For porting from GnomeVFS note that there is no equivalent of -GDrive in that API.

-
-
-

Functions

-
-

g_drive_get_name ()

-
char *
-g_drive_get_name (GDrive *drive);
-

Gets the name of drive -.

-
-

Parameters

-
----- - - - - - -

drive

a GDrive.

 
-
-
-

Returns

-

a string containing drive -'s name. The returned -string should be freed when no longer needed.

-
-
-
-
-

g_drive_get_icon ()

-
GIcon *
-g_drive_get_icon (GDrive *drive);
-

Gets the icon for drive -.

-
-

Parameters

-
----- - - - - - -

drive

a GDrive.

 
-
-
-

Returns

-

GIcon for the drive -. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_drive_get_symbolic_icon ()

-
GIcon *
-g_drive_get_symbolic_icon (GDrive *drive);
-

Gets the icon for drive -.

-
-

Parameters

-
----- - - - - - -

drive

a GDrive.

 
-
-
-

Returns

-

symbolic GIcon for the drive -. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.34

-
-
-
-

g_drive_has_volumes ()

-
gboolean
-g_drive_has_volumes (GDrive *drive);
-

Check if drive - has any mountable volumes.

-
-

Parameters

-
----- - - - - - -

drive

a GDrive.

 
-
-
-

Returns

-

TRUE if the drive -contains volumes, FALSE otherwise.

-
-
-
-
-

g_drive_get_volumes ()

-
GList *
-g_drive_get_volumes (GDrive *drive);
-

Get a list of mountable volumes for drive -.

-

The returned list should be freed with g_list_free(), after -its elements have been unreffed with g_object_unref().

-
-

Parameters

-
----- - - - - - -

drive

a GDrive.

 
-
-
-

Returns

-

GList containing any GVolume objects on the given drive -.

-

[element-type GVolume][transfer full]

-
-
-
-
-

g_drive_can_eject ()

-
gboolean
-g_drive_can_eject (GDrive *drive);
-

Checks if a drive can be ejected.

-
-

Parameters

-
----- - - - - - -

drive

a GDrive.

 
-
-
-

Returns

-

TRUE if the drive -can be ejected, FALSE otherwise.

-
-
-
-
-

g_drive_get_start_stop_type ()

-
GDriveStartStopType
-g_drive_get_start_stop_type (GDrive *drive);
-

Gets a hint about how a drive can be started/stopped.

-
-

Parameters

-
----- - - - - - -

drive

a GDrive.

 
-
-
-

Returns

-

A value from the GDriveStartStopType enumeration.

-
-

Since: 2.22

-
-
-
-

g_drive_can_start ()

-
gboolean
-g_drive_can_start (GDrive *drive);
-

Checks if a drive can be started.

-
-

Parameters

-
----- - - - - - -

drive

a GDrive.

 
-
-
-

Returns

-

TRUE if the drive -can be started, FALSE otherwise.

-
-

Since: 2.22

-
-
-
-

g_drive_can_start_degraded ()

-
gboolean
-g_drive_can_start_degraded (GDrive *drive);
-

Checks if a drive can be started degraded.

-
-

Parameters

-
----- - - - - - -

drive

a GDrive.

 
-
-
-

Returns

-

TRUE if the drive -can be started degraded, FALSE otherwise.

-
-

Since: 2.22

-
-
-
-

g_drive_can_stop ()

-
gboolean
-g_drive_can_stop (GDrive *drive);
-

Checks if a drive can be stopped.

-
-

Parameters

-
----- - - - - - -

drive

a GDrive.

 
-
-
-

Returns

-

TRUE if the drive -can be stopped, FALSE otherwise.

-
-

Since: 2.22

-
-
-
-

g_drive_can_poll_for_media ()

-
gboolean
-g_drive_can_poll_for_media (GDrive *drive);
-

Checks if a drive can be polled for media changes.

-
-

Parameters

-
----- - - - - - -

drive

a GDrive.

 
-
-
-

Returns

-

TRUE if the drive -can be polled for media changes, -FALSE otherwise.

-
-
-
-
-

g_drive_poll_for_media ()

-
void
-g_drive_poll_for_media (GDrive *drive,
-                        GCancellable *cancellable,
-                        GAsyncReadyCallback callback,
-                        gpointer user_data);
-

Asynchronously polls drive - to see if media has been inserted or removed.

-

When the operation is finished, callback - will be called. -You can then call g_drive_poll_for_media_finish() to obtain the -result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

drive

a GDrive.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback, or NULL.

[nullable]

user_data

user data to pass to callback -

 
-
-
-
-
-

g_drive_poll_for_media_finish ()

-
gboolean
-g_drive_poll_for_media_finish (GDrive *drive,
-                               GAsyncResult *result,
-                               GError **error);
-

Finishes an operation started with g_drive_poll_for_media() on a drive.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

drive

a GDrive.

 

result

a GAsyncResult.

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the drive has been poll_for_mediaed successfully, -FALSE otherwise.

-
-
-
-
-

g_drive_has_media ()

-
gboolean
-g_drive_has_media (GDrive *drive);
-

Checks if the drive - has media. Note that the OS may not be polling -the drive for media changes; see g_drive_is_media_check_automatic() -for more details.

-
-

Parameters

-
----- - - - - - -

drive

a GDrive.

 
-
-
-

Returns

-

TRUE if drive -has media, FALSE otherwise.

-
-
-
-
-

g_drive_is_media_check_automatic ()

-
gboolean
-g_drive_is_media_check_automatic (GDrive *drive);
-

Checks if drive - is capabable of automatically detecting media changes.

-
-

Parameters

-
----- - - - - - -

drive

a GDrive.

 
-
-
-

Returns

-

TRUE if the drive -is capabable of automatically detecting -media changes, FALSE otherwise.

-
-
-
-
-

g_drive_is_removable ()

-
gboolean
-g_drive_is_removable (GDrive *drive);
-

Checks if the GDrive and/or its media is considered removable by the user. -See g_drive_is_media_removable().

-
-

Parameters

-
----- - - - - - -

drive

a GDrive.

 
-
-
-

Returns

-

TRUE if drive -and/or its media is considered removable, FALSE otherwise.

-
-

Since: 2.50

-
-
-
-

g_drive_is_media_removable ()

-
gboolean
-g_drive_is_media_removable (GDrive *drive);
-

Checks if the drive - supports removable media.

-
-

Parameters

-
----- - - - - - -

drive

a GDrive.

 
-
-
-

Returns

-

TRUE if drive -supports removable media, FALSE otherwise.

-
-
-
-
-

g_drive_eject ()

-
void
-g_drive_eject (GDrive *drive,
-               GMountUnmountFlags flags,
-               GCancellable *cancellable,
-               GAsyncReadyCallback callback,
-               gpointer user_data);
-
-

g_drive_eject has been deprecated since version 2.22 and should not be used in newly-written code.

-

Use g_drive_eject_with_operation() instead.

-
-

Asynchronously ejects a drive.

-

When the operation is finished, callback - will be called. -You can then call g_drive_eject_finish() to obtain the -result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

drive

a GDrive.

 

flags

flags affecting the unmount if required for eject

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback, or NULL.

[nullable]

user_data

user data to pass to callback -

 
-
-
-
-
-

g_drive_eject_finish ()

-
gboolean
-g_drive_eject_finish (GDrive *drive,
-                      GAsyncResult *result,
-                      GError **error);
-
-

g_drive_eject_finish has been deprecated since version 2.22 and should not be used in newly-written code.

-

Use g_drive_eject_with_operation_finish() instead.

-
-

Finishes ejecting a drive.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

drive

a GDrive.

 

result

a GAsyncResult.

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the drive has been ejected successfully, -FALSE otherwise.

-
-
-
-
-

g_drive_eject_with_operation ()

-
void
-g_drive_eject_with_operation (GDrive *drive,
-                              GMountUnmountFlags flags,
-                              GMountOperation *mount_operation,
-                              GCancellable *cancellable,
-                              GAsyncReadyCallback callback,
-                              gpointer user_data);
-

Ejects a drive. This is an asynchronous operation, and is -finished by calling g_drive_eject_with_operation_finish() with the drive - -and GAsyncResult data returned in the callback -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

drive

a GDrive.

 

flags

flags affecting the unmount if required for eject

 

mount_operation

a GMountOperation or NULL to avoid -user interaction.

[nullable]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback, or NULL.

[nullable]

user_data

user data passed to callback -.

 
-
-

Since: 2.22

-
-
-
-

g_drive_eject_with_operation_finish ()

-
gboolean
-g_drive_eject_with_operation_finish (GDrive *drive,
-                                     GAsyncResult *result,
-                                     GError **error);
-

Finishes ejecting a drive. If any errors occurred during the operation, -error - will be set to contain the errors and FALSE will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

drive

a GDrive.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE if the drive was successfully ejected. FALSE otherwise.

-
-

Since: 2.22

-
-
-
-

g_drive_start ()

-
void
-g_drive_start (GDrive *drive,
-               GDriveStartFlags flags,
-               GMountOperation *mount_operation,
-               GCancellable *cancellable,
-               GAsyncReadyCallback callback,
-               gpointer user_data);
-

Asynchronously starts a drive.

-

When the operation is finished, callback - will be called. -You can then call g_drive_start_finish() to obtain the -result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

drive

a GDrive.

 

flags

flags affecting the start operation.

 

mount_operation

a GMountOperation or NULL to avoid -user interaction.

[nullable]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback, or NULL.

[nullable]

user_data

user data to pass to callback -

 
-
-

Since: 2.22

-
-
-
-

g_drive_start_finish ()

-
gboolean
-g_drive_start_finish (GDrive *drive,
-                      GAsyncResult *result,
-                      GError **error);
-

Finishes starting a drive.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

drive

a GDrive.

 

result

a GAsyncResult.

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the drive has been started successfully, -FALSE otherwise.

-
-

Since: 2.22

-
-
-
-

g_drive_stop ()

-
void
-g_drive_stop (GDrive *drive,
-              GMountUnmountFlags flags,
-              GMountOperation *mount_operation,
-              GCancellable *cancellable,
-              GAsyncReadyCallback callback,
-              gpointer user_data);
-

Asynchronously stops a drive.

-

When the operation is finished, callback - will be called. -You can then call g_drive_stop_finish() to obtain the -result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

drive

a GDrive.

 

flags

flags affecting the unmount if required for stopping.

 

mount_operation

a GMountOperation or NULL to avoid -user interaction.

[nullable]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback, or NULL.

[nullable]

user_data

user data to pass to callback -

 
-
-

Since: 2.22

-
-
-
-

g_drive_stop_finish ()

-
gboolean
-g_drive_stop_finish (GDrive *drive,
-                     GAsyncResult *result,
-                     GError **error);
-

Finishes stopping a drive.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

drive

a GDrive.

 

result

a GAsyncResult.

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the drive has been stopped successfully, -FALSE otherwise.

-
-

Since: 2.22

-
-
-
-

g_drive_enumerate_identifiers ()

-
char **
-g_drive_enumerate_identifiers (GDrive *drive);
-

Gets the kinds of identifiers that drive - has. -Use g_drive_get_identifier() to obtain the identifiers -themselves.

-
-

Parameters

-
----- - - - - - -

drive

a GDrive

 
-
-
-

Returns

-

a NULL-terminated -array of strings containing kinds of identifiers. Use g_strfreev() -to free.

-

[transfer full][array zero-terminated=1]

-
-
-
-
-

g_drive_get_identifier ()

-
char *
-g_drive_get_identifier (GDrive *drive,
-                        const char *kind);
-

Gets the identifier of the given kind for drive -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

drive

a GDrive

 

kind

the kind of identifier to return

 
-
-
-

Returns

-

a newly allocated string containing the -requested identfier, or NULL if the GDrive -doesn't have this kind of identifier.

-
-
-
-
-

g_drive_get_sort_key ()

-
const gchar *
-g_drive_get_sort_key (GDrive *drive);
-

Gets the sort key for drive -, if any.

-
-

Parameters

-
----- - - - - - -

drive

A GDrive.

 
-
-
-

Returns

-

Sorting key for drive -or NULL if no such key is available.

-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

GDrive

-
typedef struct _GDrive GDrive;
-

Opaque drive object.

-
-
-
-

struct GDriveIface

-
struct GDriveIface {
-  GTypeInterface g_iface;
-
-  /* signals */
-  void     (* changed)                  (GDrive              *drive);
-  void     (* disconnected)             (GDrive              *drive);
-  void     (* eject_button)             (GDrive              *drive);
-
-  /* Virtual Table */
-  char *   (* get_name)                 (GDrive              *drive);
-  GIcon *  (* get_icon)                 (GDrive              *drive);
-  gboolean (* has_volumes)              (GDrive              *drive);
-  GList *  (* get_volumes)              (GDrive              *drive);
-  gboolean (* is_media_removable)       (GDrive              *drive);
-  gboolean (* has_media)                (GDrive              *drive);
-  gboolean (* is_media_check_automatic) (GDrive              *drive);
-  gboolean (* can_eject)                (GDrive              *drive);
-  gboolean (* can_poll_for_media)       (GDrive              *drive);
-  void     (* eject)                    (GDrive              *drive,
-                                         GMountUnmountFlags   flags,
-                                         GCancellable        *cancellable,
-                                         GAsyncReadyCallback  callback,
-                                         gpointer             user_data);
-  gboolean (* eject_finish)             (GDrive              *drive,
-                                         GAsyncResult        *result,
-                                         GError             **error);
-  void     (* poll_for_media)           (GDrive              *drive,
-                                         GCancellable        *cancellable,
-                                         GAsyncReadyCallback  callback,
-                                         gpointer             user_data);
-  gboolean (* poll_for_media_finish)    (GDrive              *drive,
-                                         GAsyncResult        *result,
-                                         GError             **error);
-
-  char *   (* get_identifier)           (GDrive              *drive,
-                                         const char          *kind);
-  char **  (* enumerate_identifiers)    (GDrive              *drive);
-
-  GDriveStartStopType (* get_start_stop_type) (GDrive        *drive);
-
-  gboolean (* can_start)                (GDrive              *drive);
-  gboolean (* can_start_degraded)       (GDrive              *drive);
-  void     (* start)                    (GDrive              *drive,
-                                         GDriveStartFlags     flags,
-                                         GMountOperation     *mount_operation,
-                                         GCancellable        *cancellable,
-                                         GAsyncReadyCallback  callback,
-                                         gpointer             user_data);
-  gboolean (* start_finish)             (GDrive              *drive,
-                                         GAsyncResult        *result,
-                                         GError             **error);
-
-  gboolean (* can_stop)                 (GDrive              *drive);
-  void     (* stop)                     (GDrive              *drive,
-                                         GMountUnmountFlags   flags,
-                                         GMountOperation     *mount_operation,
-                                         GCancellable        *cancellable,
-                                         GAsyncReadyCallback  callback,
-                                         gpointer             user_data);
-  gboolean (* stop_finish)              (GDrive              *drive,
-                                         GAsyncResult        *result,
-                                         GError             **error);
-  /* signal, not VFunc */
-  void     (* stop_button)              (GDrive              *drive);
-
-  void        (* eject_with_operation)      (GDrive              *drive,
-                                             GMountUnmountFlags   flags,
-                                             GMountOperation     *mount_operation,
-                                             GCancellable        *cancellable,
-                                             GAsyncReadyCallback  callback,
-                                             gpointer             user_data);
-  gboolean    (* eject_with_operation_finish) (GDrive            *drive,
-                                             GAsyncResult        *result,
-                                             GError             **error);
-
-  const gchar * (* get_sort_key)        (GDrive              *drive);
-  GIcon *       (* get_symbolic_icon)   (GDrive              *drive);
-  gboolean      (* is_removable)        (GDrive              *drive);
-};
-
-

Interface for creating GDrive implementations.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

changed ()

Signal emitted when the drive is changed.

 

disconnected ()

The removed signal that is emitted when the GDrive have been disconnected. If the recipient is holding references to the object they should release them so the object can be finalized.

 

eject_button ()

Signal emitted when the physical eject button (if any) of a drive have been pressed.

 

get_name ()

Returns the name for the given GDrive.

 

get_icon ()

Returns a GIcon for the given GDrive.

 

has_volumes ()

Returns TRUE if the GDrive has mountable volumes.

 

get_volumes ()

Returns a list GList of GVolume for the GDrive.

 

is_media_removable ()

Returns TRUE if the GDrive supports removal and insertion of media.

 

has_media ()

Returns TRUE if the GDrive has media inserted.

 

is_media_check_automatic ()

Returns TRUE if the GDrive is capabable of automatically detecting media changes.

 

can_eject ()

Returns TRUE if the GDrive can eject media.

 

can_poll_for_media ()

Returns TRUE if the GDrive is capable of manually polling for media change.

 

eject ()

Ejects a GDrive.

 

eject_finish ()

Finishes an eject operation.

 

poll_for_media ()

Poll for media insertion/removal on a GDrive.

 

poll_for_media_finish ()

Finishes a media poll operation.

 

get_identifier ()

Returns the identifier of the given kind, or NULL if -the GDrive doesn't have one.

 

enumerate_identifiers ()

Returns an array strings listing the kinds -of identifiers which the GDrive has.

 

get_start_stop_type ()

Gets a GDriveStartStopType with details about starting/stopping the drive. Since 2.22.

 

can_start ()

Returns TRUE if a GDrive can be started. Since 2.22.

 

can_start_degraded ()

Returns TRUE if a GDrive can be started degraded. Since 2.22.

 

start ()

Starts a GDrive. Since 2.22.

 

start_finish ()

Finishes a start operation. Since 2.22.

 

can_stop ()

Returns TRUE if a GDrive can be stopped. Since 2.22.

 

stop ()

Stops a GDrive. Since 2.22.

 

stop_finish ()

Finishes a stop operation. Since 2.22.

 

stop_button ()

Signal emitted when the physical stop button (if any) of a drive have been pressed. Since 2.22.

 

eject_with_operation ()

Starts ejecting a GDrive using a GMountOperation. Since 2.22.

 

eject_with_operation_finish ()

Finishes an eject operation using a GMountOperation. Since 2.22.

 

get_sort_key ()

Gets a key used for sorting GDrive instances or NULL if no such key exists. Since 2.32.

 

get_symbolic_icon ()

Returns a symbolic GIcon for the given GDrive. Since 2.34.

 

is_removable ()

Returns TRUE if the GDrive and/or its media is considered removable by the user. Since 2.50.

 
-
-
-
-
-

enum GDriveStartFlags

-

Flags used when starting a drive.

-
-

Members

-
----- - - - - - -

G_DRIVE_START_NONE

-

No flags set.

-
 
-
-

Since: 2.22

-
-
-
-

enum GDriveStartStopType

-

Enumeration describing how a drive can be started/stopped.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_DRIVE_START_STOP_TYPE_UNKNOWN

-

Unknown or drive doesn't support - start/stop.

-
 

G_DRIVE_START_STOP_TYPE_SHUTDOWN

-

The stop method will physically - shut down the drive and e.g. power down the port the drive is - attached to.

-
 

G_DRIVE_START_STOP_TYPE_NETWORK

-

The start/stop methods are used - for connecting/disconnect to the drive over the network.

-
 

G_DRIVE_START_STOP_TYPE_MULTIDISK

-

The start/stop methods will - assemble/disassemble a virtual drive from several physical - drives.

-
 

G_DRIVE_START_STOP_TYPE_PASSWORD

-

The start/stop methods will - unlock/lock the disk (for example using the ATA <quote>SECURITY - UNLOCK DEVICE</quote> command)

-
 
-
-

Since: 2.22

-
-
-
-

Signal Details

-
-

The “changed” signal

-
void
-user_function (GDrive  *drive,
-               gpointer user_data)
-

Emitted when the drive's state has changed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

drive

a GDrive.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “disconnected” signal

-
void
-user_function (GDrive  *drive,
-               gpointer user_data)
-

This signal is emitted when the GDrive have been -disconnected. If the recipient is holding references to the -object they should release them so the object can be -finalized.

-
-

Parameters

-
----- - - - - - - - - - - - - -

drive

a GDrive.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “eject-button” signal

-
void
-user_function (GDrive  *drive,
-               gpointer user_data)
-

Emitted when the physical eject button (if any) of a drive has -been pressed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

drive

a GDrive.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “stop-button” signal

-
void
-user_function (GDrive  *drive,
-               gpointer user_data)
-

Emitted when the physical stop button (if any) of a drive has -been pressed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

drive

a GDrive.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.22

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDtlsClientConnection.html b/docs/reference/gio/html/GDtlsClientConnection.html deleted file mode 100644 index 19c08ad62..000000000 --- a/docs/reference/gio/html/GDtlsClientConnection.html +++ /dev/null @@ -1,464 +0,0 @@ - - - - -GDtlsClientConnection: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDtlsClientConnection

-

GDtlsClientConnection — DTLS client-side connection

-
- -
-

Properties

-
----- - - - - - - - - - - - - - - - - - -
gpointeraccepted-casRead
-GSocketConnectable *server-identityRead / Write / Construct
GTlsCertificateFlagsvalidation-flagsRead / Write / Construct
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GDtlsClientConnection
structGDtlsClientConnectionInterface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GDtlsClientConnection
-
-
-
-

Prerequisites

-

-GDtlsClientConnection requires - GDtlsConnection, GDatagramBased and GObject.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GDtlsClientConnection is the client-side subclass of -GDtlsConnection, representing a client-side DTLS connection.

-
-
-

Functions

-
-

g_dtls_client_connection_new ()

-
GDatagramBased *
-g_dtls_client_connection_new (GDatagramBased *base_socket,
-                              GSocketConnectable *server_identity,
-                              GError **error);
-

Creates a new GDtlsClientConnection wrapping base_socket - which is -assumed to communicate with the server identified by server_identity -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

base_socket

the GDatagramBased to wrap

 

server_identity

the expected identity of the server.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

the new -GDtlsClientConnection, or NULL on error.

-

[transfer full][type GDtlsClientConnection]

-
-

Since: 2.48

-
-
-
-

g_dtls_client_connection_set_server_identity ()

-
void
-g_dtls_client_connection_set_server_identity
-                               (GDtlsClientConnection *conn,
-                                GSocketConnectable *identity);
-

Sets conn -'s expected server identity, which is used both to tell -servers on virtual hosts which certificate to present, and also -to let conn - know what name to look for in the certificate when -performing G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled.

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

the GDtlsClientConnection

 

identity

a GSocketConnectable describing the expected server identity

 
-
-

Since: 2.48

-
-
-
-

g_dtls_client_connection_get_server_identity ()

-
GSocketConnectable *
-g_dtls_client_connection_get_server_identity
-                               (GDtlsClientConnection *conn);
-

Gets conn -'s expected server identity

-
-

Parameters

-
----- - - - - - -

conn

the GDtlsClientConnection

 
-
-
-

Returns

-

a GSocketConnectable describing the -expected server identity, or NULL if the expected identity is not -known.

-

[transfer none]

-
-

Since: 2.48

-
-
-
-

g_dtls_client_connection_set_validation_flags ()

-
void
-g_dtls_client_connection_set_validation_flags
-                               (GDtlsClientConnection *conn,
-                                GTlsCertificateFlags flags);
-

Sets conn -'s validation flags, to override the default set of -checks performed when validating a server certificate. By default, -G_TLS_CERTIFICATE_VALIDATE_ALL is used.

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

the GDtlsClientConnection

 

flags

the GTlsCertificateFlags to use

 
-
-

Since: 2.48

-
-
-
-

g_dtls_client_connection_get_validation_flags ()

-
GTlsCertificateFlags
-g_dtls_client_connection_get_validation_flags
-                               (GDtlsClientConnection *conn);
-

Gets conn -'s validation flags

-
-

Parameters

-
----- - - - - - -

conn

the GDtlsClientConnection

 
-
-
-

Returns

-

the validation flags

-
-

Since: 2.48

-
-
-
-

g_dtls_client_connection_get_accepted_cas ()

-
GList *
-g_dtls_client_connection_get_accepted_cas
-                               (GDtlsClientConnection *conn);
-

Gets the list of distinguished names of the Certificate Authorities -that the server will accept certificates from. This will be set -during the TLS handshake if the server requests a certificate. -Otherwise, it will be NULL.

-

Each item in the list is a GByteArray which contains the complete -subject DN of the certificate authority.

-
-

Parameters

-
----- - - - - - -

conn

the GDtlsClientConnection

 
-
-
-

Returns

-

the list of -CA DNs. You should unref each element with g_byte_array_unref() and then -the free the list with g_list_free().

-

[element-type GByteArray][transfer full]

-
-

Since: 2.48

-
-
-
-

Types and Values

-
-

GDtlsClientConnection

-
typedef struct _GDtlsClientConnection GDtlsClientConnection;
-

Abstract base class for the backend-specific client connection -type.

-

Since: 2.48

-
-
-
-

struct GDtlsClientConnectionInterface

-
struct GDtlsClientConnectionInterface {
-  GTypeInterface g_iface;
-};
-
-

vtable for a GDtlsClientConnection implementation.

-
-

Members

-
----- - -
-
-

Since: 2.48

-
-
-
-

Property Details

-
-

The “accepted-cas” property

-
  “accepted-cas”             gpointer
-

A list of the distinguished names of the Certificate Authorities -that the server will accept client certificates signed by. If the -server requests a client certificate during the handshake, then -this property will be set after the handshake completes.

-

Each item in the list is a GByteArray which contains the complete -subject DN of the certificate authority.

-

[element-type GLib.ByteArray]

-

Flags: Read

-

Since: 2.48

-
-
-
-

The “server-identity” property

-
  “server-identity”          GSocketConnectable *
-

A GSocketConnectable describing the identity of the server that -is expected on the other end of the connection.

-

If the G_TLS_CERTIFICATE_BAD_IDENTITY flag is set in -“validation-flags”, this object will be used -to determine the expected identify of the remote end of the -connection; if “server-identity” is not set, -or does not match the identity presented by the server, then the -G_TLS_CERTIFICATE_BAD_IDENTITY validation will fail.

-

In addition to its use in verifying the server certificate, -this is also used to give a hint to the server about what -certificate we expect, which is useful for servers that serve -virtual hosts.

-

Flags: Read / Write / Construct

-

Since: 2.48

-
-
-
-

The “validation-flags” property

-
  “validation-flags”         GTlsCertificateFlags
-

What steps to perform when validating a certificate received from -a server. Server certificates that fail to validate in all of the -ways indicated here will be rejected unless the application -overrides the default via “accept-certificate”.

-

Flags: Read / Write / Construct

-

Default value: G_TLS_CERTIFICATE_UNKNOWN_CA | G_TLS_CERTIFICATE_BAD_IDENTITY | G_TLS_CERTIFICATE_NOT_ACTIVATED | G_TLS_CERTIFICATE_EXPIRED | G_TLS_CERTIFICATE_REVOKED | G_TLS_CERTIFICATE_INSECURE | G_TLS_CERTIFICATE_GENERIC_ERROR

-

Since: 2.48

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDtlsConnection.html b/docs/reference/gio/html/GDtlsConnection.html deleted file mode 100644 index 8601fc720..000000000 --- a/docs/reference/gio/html/GDtlsConnection.html +++ /dev/null @@ -1,1521 +0,0 @@ - - - - -GDtlsConnection: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDtlsConnection

-

GDtlsConnection — DTLS connection type

-
- -
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GDatagramBased *base-socketRead / Write / Construct Only
-GTlsCertificate *certificateRead / Write
-GTlsDatabase *databaseRead / Write
-GTlsInteraction *interactionRead / Write
-GTlsCertificate *peer-certificateRead
GTlsCertificateFlagspeer-certificate-errorsRead
GTlsRehandshakeModerehandshake-modeRead / Write / Construct
gbooleanrequire-close-notifyRead / Write / Construct
-
-
-

Signals

- -
-
-

Types and Values

-
---- - - - - -
 GDtlsConnection
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GDtlsConnection
-
-
-
-

Prerequisites

-

-GDtlsConnection requires - GDatagramBased and GObject.

-
-
-

Known Derived Interfaces

-

-GDtlsConnection is required by - GDtlsClientConnection and GDtlsServerConnection.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GDtlsConnection is the base DTLS connection class type, which wraps -a GDatagramBased and provides DTLS encryption on top of it. Its -subclasses, GDtlsClientConnection and GDtlsServerConnection, -implement client-side and server-side DTLS, respectively.

-

For TLS support, see GTlsConnection.

-

As DTLS is datagram based, GDtlsConnection implements GDatagramBased, -presenting a datagram-socket-like API for the encrypted connection. This -operates over a base datagram connection, which is also a GDatagramBased -(“base-socket”).

-

To close a DTLS connection, use g_dtls_connection_close().

-

Neither GDtlsServerConnection or GDtlsClientConnection set the peer address -on their base GDatagramBased if it is a GSocket — it is up to the caller to -do that if they wish. If they do not, and g_socket_close() is called on the -base socket, the GDtlsConnection will not raise a G_IO_ERROR_NOT_CONNECTED -error on further I/O.

-
-
-

Functions

-
-

g_dtls_connection_set_certificate ()

-
void
-g_dtls_connection_set_certificate (GDtlsConnection *conn,
-                                   GTlsCertificate *certificate);
-

This sets the certificate that conn - will present to its peer -during the TLS handshake. For a GDtlsServerConnection, it is -mandatory to set this, and that will normally be done at construct -time.

-

For a GDtlsClientConnection, this is optional. If a handshake fails -with G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server -requires a certificate, and if you try connecting again, you should -call this method first. You can call -g_dtls_client_connection_get_accepted_cas() on the failed connection -to get a list of Certificate Authorities that the server will -accept certificates from.

-

(It is also possible that a server will allow the connection with -or without a certificate; in that case, if you don't provide a -certificate, you can tell that the server requested one by the fact -that g_dtls_client_connection_get_accepted_cas() will return -non-NULL.)

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

a GDtlsConnection

 

certificate

the certificate to use for conn -

 
-
-

Since: 2.48

-
-
-
-

g_dtls_connection_get_certificate ()

-
GTlsCertificate *
-g_dtls_connection_get_certificate (GDtlsConnection *conn);
-

Gets conn -'s certificate, as set by -g_dtls_connection_set_certificate().

-
-

Parameters

-
----- - - - - - -

conn

a GDtlsConnection

 
-
-
-

Returns

-

conn -'s certificate, or NULL.

-

[transfer none]

-
-

Since: 2.48

-
-
-
-

g_dtls_connection_get_peer_certificate ()

-
GTlsCertificate *
-g_dtls_connection_get_peer_certificate
-                               (GDtlsConnection *conn);
-

Gets conn -'s peer's certificate after the handshake has completed. -(It is not set during the emission of -“accept-certificate”.)

-
-

Parameters

-
----- - - - - - -

conn

a GDtlsConnection

 
-
-
-

Returns

-

conn -'s peer's certificate, or NULL.

-

[transfer none]

-
-

Since: 2.48

-
-
-
-

g_dtls_connection_get_peer_certificate_errors ()

-
GTlsCertificateFlags
-g_dtls_connection_get_peer_certificate_errors
-                               (GDtlsConnection *conn);
-

Gets the errors associated with validating conn -'s peer's -certificate, after the handshake has completed. (It is not set -during the emission of “accept-certificate”.)

-
-

Parameters

-
----- - - - - - -

conn

a GDtlsConnection

 
-
-
-

Returns

-

conn -'s peer's certificate errors

-
-

Since: 2.48

-
-
-
-

g_dtls_connection_set_require_close_notify ()

-
void
-g_dtls_connection_set_require_close_notify
-                               (GDtlsConnection *conn,
-                                gboolean require_close_notify);
-

Sets whether or not conn - expects a proper TLS close notification -before the connection is closed. If this is TRUE (the default), -then conn - will expect to receive a TLS close notification from its -peer before the connection is closed, and will return a -G_TLS_ERROR_EOF error if the connection is closed without proper -notification (since this may indicate a network error, or -man-in-the-middle attack).

-

In some protocols, the application will know whether or not the -connection was closed cleanly based on application-level data -(because the application-level data includes a length field, or is -somehow self-delimiting); in this case, the close notify is -redundant and may be omitted. You -can use g_dtls_connection_set_require_close_notify() to tell conn - -to allow an "unannounced" connection close, in which case the close -will show up as a 0-length read, as in a non-TLS -GDatagramBased, and it is up to the application to check that -the data has been fully received.

-

Note that this only affects the behavior when the peer closes the -connection; when the application calls g_dtls_connection_close_async() on -conn - itself, this will send a close notification regardless of the -setting of this property. If you explicitly want to do an unclean -close, you can close conn -'s “base-socket” rather -than closing conn - itself.

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

a GDtlsConnection

 

require_close_notify

whether or not to require close notification

 
-
-

Since: 2.48

-
-
-
-

g_dtls_connection_get_require_close_notify ()

-
gboolean
-g_dtls_connection_get_require_close_notify
-                               (GDtlsConnection *conn);
-

Tests whether or not conn - expects a proper TLS close notification -when the connection is closed. See -g_dtls_connection_set_require_close_notify() for details.

-
-

Parameters

-
----- - - - - - -

conn

a GDtlsConnection

 
-
-
-

Returns

-

TRUE if conn -requires a proper TLS close notification.

-
-

Since: 2.48

-
-
-
-

g_dtls_connection_set_rehandshake_mode ()

-
void
-g_dtls_connection_set_rehandshake_mode
-                               (GDtlsConnection *conn,
-                                GTlsRehandshakeMode mode);
-

Sets how conn - behaves with respect to rehandshaking requests.

-

G_TLS_REHANDSHAKE_NEVER means that it will never agree to -rehandshake after the initial handshake is complete. (For a client, -this means it will refuse rehandshake requests from the server, and -for a server, this means it will close the connection with an error -if the client attempts to rehandshake.)

-

G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a -rehandshake only if the other end of the connection supports the -TLS renegotiation_info extension. This is the default behavior, -but means that rehandshaking will not work against older -implementations that do not support that extension.

-

G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow -rehandshaking even without the renegotiation_info extension. On -the server side in particular, this is not recommended, since it -leaves the server open to certain attacks. However, this mode is -necessary if you need to allow renegotiation with older client -software.

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

a GDtlsConnection

 

mode

the rehandshaking mode

 
-
-

Since: 2.48

-
-
-
-

g_dtls_connection_get_rehandshake_mode ()

-
GTlsRehandshakeMode
-g_dtls_connection_get_rehandshake_mode
-                               (GDtlsConnection *conn);
-

Gets conn - rehandshaking mode. See -g_dtls_connection_set_rehandshake_mode() for details.

-
-

Parameters

-
----- - - - - - -

conn

a GDtlsConnection

 
-
-
-

Returns

-

conn -'s rehandshaking mode

-
-

Since: 2.48

-
-
-
-

g_dtls_connection_get_database ()

-
GTlsDatabase *
-g_dtls_connection_get_database (GDtlsConnection *conn);
-

Gets the certificate database that conn - uses to verify -peer certificates. See g_dtls_connection_set_database().

-
-

Parameters

-
----- - - - - - -

conn

a GDtlsConnection

 
-
-
-

Returns

-

the certificate database that conn -uses or NULL.

-

[transfer none]

-
-

Since: 2.48

-
-
-
-

g_dtls_connection_set_database ()

-
void
-g_dtls_connection_set_database (GDtlsConnection *conn,
-                                GTlsDatabase *database);
-

Sets the certificate database that is used to verify peer certificates. -This is set to the default database by default. See -g_dtls_backend_get_default_database(). If set to NULL, then -peer certificate validation will always set the -G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning -“accept-certificate” will always be emitted on -client-side connections, unless that bit is not set in -“validation-flags”).

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

a GDtlsConnection

 

database

a GTlsDatabase

 
-
-

Since: 2.48

-
-
-
-

g_dtls_connection_get_interaction ()

-
GTlsInteraction *
-g_dtls_connection_get_interaction (GDtlsConnection *conn);
-

Get the object that will be used to interact with the user. It will be used -for things like prompting the user for passwords. If NULL is returned, then -no user interaction will occur for this connection.

-
-

Parameters

-
----- - - - - - -

conn

a connection

 
-
-
-

Returns

-

The interaction object.

-

[transfer none]

-
-

Since: 2.48

-
-
-
-

g_dtls_connection_set_interaction ()

-
void
-g_dtls_connection_set_interaction (GDtlsConnection *conn,
-                                   GTlsInteraction *interaction);
-

Set the object that will be used to interact with the user. It will be used -for things like prompting the user for passwords.

-

The interaction - argument will normally be a derived subclass of -GTlsInteraction. NULL can also be provided if no user interaction -should occur for this connection.

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

a connection

 

interaction

an interaction object, or NULL.

[nullable]
-
-

Since: 2.48

-
-
-
-

g_dtls_connection_handshake ()

-
gboolean
-g_dtls_connection_handshake (GDtlsConnection *conn,
-                             GCancellable *cancellable,
-                             GError **error);
-

Attempts a TLS handshake on conn -.

-

On the client side, it is never necessary to call this method; -although the connection needs to perform a handshake after -connecting (or after sending a "STARTTLS"-type command) and may -need to rehandshake later if the server requests it, -GDtlsConnection will handle this for you automatically when you try -to send or receive data on the connection. However, you can call -g_dtls_connection_handshake() manually if you want to know for sure -whether the initial handshake succeeded or failed (as opposed to -just immediately trying to write to conn -, in which -case if it fails, it may not be possible to tell if it failed -before or after completing the handshake).

-

Likewise, on the server side, although a handshake is necessary at -the beginning of the communication, you do not need to call this -function explicitly unless you want clearer error reporting. -However, you may call g_dtls_connection_handshake() later on to -renegotiate parameters (encryption methods, etc) with the client.

-

“accept_certificate” may be emitted during the -handshake.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

conn

a GDtlsConnection

 

cancellable

a GCancellable, or NULL.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

success or failure

-
-

Since: 2.48

-
-
-
-

g_dtls_connection_handshake_async ()

-
void
-g_dtls_connection_handshake_async (GDtlsConnection *conn,
-                                   int io_priority,
-                                   GCancellable *cancellable,
-                                   GAsyncReadyCallback callback,
-                                   gpointer user_data);
-

Asynchronously performs a TLS handshake on conn -. See -g_dtls_connection_handshake() for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

conn

a GDtlsConnection

 

io_priority

the I/O priority of the request

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

callback to call when the handshake is complete

 

user_data

the data to pass to the callback function

 
-
-

Since: 2.48

-
-
-
-

g_dtls_connection_handshake_finish ()

-
gboolean
-g_dtls_connection_handshake_finish (GDtlsConnection *conn,
-                                    GAsyncResult *result,
-                                    GError **error);
-

Finish an asynchronous TLS handshake operation. See -g_dtls_connection_handshake() for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

conn

a GDtlsConnection

 

result

a GAsyncResult.

 

error

a GError pointer, or NULL

 
-
-
-

Returns

-

TRUE on success, FALSE on failure, in which -case error -will be set.

-
-

Since: 2.48

-
-
-
-

g_dtls_connection_shutdown ()

-
gboolean
-g_dtls_connection_shutdown (GDtlsConnection *conn,
-                            gboolean shutdown_read,
-                            gboolean shutdown_write,
-                            GCancellable *cancellable,
-                            GError **error);
-

Shut down part or all of a DTLS connection.

-

If shutdown_read - is TRUE then the receiving side of the connection is shut -down, and further reading is disallowed. Subsequent calls to -g_datagram_based_receive_messages() will return G_IO_ERROR_CLOSED.

-

If shutdown_write - is TRUE then the sending side of the connection is shut -down, and further writing is disallowed. Subsequent calls to -g_datagram_based_send_messages() will return G_IO_ERROR_CLOSED.

-

It is allowed for both shutdown_read - and shutdown_write - to be TRUE — this -is equivalent to calling g_dtls_connection_close().

-

If cancellable - is cancelled, the GDtlsConnection may be left -partially-closed and any pending untransmitted data may be lost. Call -g_dtls_connection_shutdown() again to complete closing the GDtlsConnection.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

conn

a GDtlsConnection

 

shutdown_read

TRUE to stop reception of incoming datagrams

 

shutdown_write

TRUE to stop sending outgoing datagrams

 

cancellable

a GCancellable, or NULL.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE on success, FALSE otherwise

-
-

Since: 2.48

-
-
-
-

g_dtls_connection_shutdown_async ()

-
void
-g_dtls_connection_shutdown_async (GDtlsConnection *conn,
-                                  gboolean shutdown_read,
-                                  gboolean shutdown_write,
-                                  int io_priority,
-                                  GCancellable *cancellable,
-                                  GAsyncReadyCallback callback,
-                                  gpointer user_data);
-

Asynchronously shut down part or all of the DTLS connection. See -g_dtls_connection_shutdown() for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

conn

a GDtlsConnection

 

shutdown_read

TRUE to stop reception of incoming datagrams

 

shutdown_write

TRUE to stop sending outgoing datagrams

 

io_priority

the I/O priority of the request

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

callback to call when the shutdown operation is complete

 

user_data

the data to pass to the callback function

 
-
-

Since: 2.48

-
-
-
-

g_dtls_connection_shutdown_finish ()

-
gboolean
-g_dtls_connection_shutdown_finish (GDtlsConnection *conn,
-                                   GAsyncResult *result,
-                                   GError **error);
-

Finish an asynchronous TLS shutdown operation. See -g_dtls_connection_shutdown() for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

conn

a GDtlsConnection

 

result

a GAsyncResult

 

error

a GError pointer, or NULL

 
-
-
-

Returns

-

TRUE on success, FALSE on failure, in which -case error -will be set

-
-

Since: 2.48

-
-
-
-

g_dtls_connection_close ()

-
gboolean
-g_dtls_connection_close (GDtlsConnection *conn,
-                         GCancellable *cancellable,
-                         GError **error);
-

Close the DTLS connection. This is equivalent to calling -g_dtls_connection_shutdown() to shut down both sides of the connection.

-

Closing a GDtlsConnection waits for all buffered but untransmitted data to -be sent before it completes. It then sends a close_notify DTLS alert to the -peer and may wait for a close_notify to be received from the peer. It does -not close the underlying “base-socket”; that must be closed -separately.

-

Once conn - is closed, all other operations will return G_IO_ERROR_CLOSED. -Closing a GDtlsConnection multiple times will not return an error.

-

GDtlsConnections will be automatically closed when the last reference is -dropped, but you might want to call this function to make sure resources are -released as early as possible.

-

If cancellable - is cancelled, the GDtlsConnection may be left -partially-closed and any pending untransmitted data may be lost. Call -g_dtls_connection_close() again to complete closing the GDtlsConnection.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

conn

a GDtlsConnection

 

cancellable

a GCancellable, or NULL.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE on success, FALSE otherwise

-
-

Since: 2.48

-
-
-
-

g_dtls_connection_close_async ()

-
void
-g_dtls_connection_close_async (GDtlsConnection *conn,
-                               int io_priority,
-                               GCancellable *cancellable,
-                               GAsyncReadyCallback callback,
-                               gpointer user_data);
-

Asynchronously close the DTLS connection. See g_dtls_connection_close() for -more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

conn

a GDtlsConnection

 

io_priority

the I/O priority of the request

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

callback to call when the close operation is complete

 

user_data

the data to pass to the callback function

 
-
-

Since: 2.48

-
-
-
-

g_dtls_connection_close_finish ()

-
gboolean
-g_dtls_connection_close_finish (GDtlsConnection *conn,
-                                GAsyncResult *result,
-                                GError **error);
-

Finish an asynchronous TLS close operation. See g_dtls_connection_close() -for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

conn

a GDtlsConnection

 

result

a GAsyncResult

 

error

a GError pointer, or NULL

 
-
-
-

Returns

-

TRUE on success, FALSE on failure, in which -case error -will be set

-
-

Since: 2.48

-
-
-
-

g_dtls_connection_emit_accept_certificate ()

-
gboolean
-g_dtls_connection_emit_accept_certificate
-                               (GDtlsConnection *conn,
-                                GTlsCertificate *peer_cert,
-                                GTlsCertificateFlags errors);
-

Used by GDtlsConnection implementations to emit the -“accept-certificate” signal.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

conn

a GDtlsConnection

 

peer_cert

the peer's GTlsCertificate

 

errors

the problems with peer_cert -

 
-
-
-

Returns

-

TRUE if one of the signal handlers has returned -TRUE to accept peer_cert -

-
-

Since: 2.48

-
-
-
-

Types and Values

-
-

GDtlsConnection

-
typedef struct _GDtlsConnection GDtlsConnection;
-

Abstract base class for the backend-specific GDtlsClientConnection -and GDtlsServerConnection types.

-

Since: 2.48

-
-
-
-

Property Details

-
-

The “base-socket” property

-
  “base-socket”              GDatagramBased *
-

The GDatagramBased that the connection wraps. Note that this may be any -implementation of GDatagramBased, not just a GSocket.

-

Flags: Read / Write / Construct Only

-

Since: 2.48

-
-
-
-

The “certificate” property

-
  “certificate”              GTlsCertificate *
-

The connection's certificate; see -g_dtls_connection_set_certificate().

-

Flags: Read / Write

-

Since: 2.48

-
-
-
-

The “database” property

-
  “database”                 GTlsDatabase *
-

The certificate database to use when verifying this TLS connection. -If no certificate database is set, then the default database will be -used. See g_dtls_backend_get_default_database().

-

Flags: Read / Write

-

Since: 2.48

-
-
-
-

The “interaction” property

-
  “interaction”              GTlsInteraction *
-

A GTlsInteraction object to be used when the connection or certificate -database need to interact with the user. This will be used to prompt the -user for passwords where necessary.

-

Flags: Read / Write

-

Since: 2.48

-
-
-
-

The “peer-certificate” property

-
  “peer-certificate”         GTlsCertificate *
-

The connection's peer's certificate, after the TLS handshake has -completed and the certificate has been accepted. Note in -particular that this is not yet set during the emission of -“accept-certificate”.

-

(You can watch for a “notify” signal on this property to -detect when a handshake has occurred.)

-

Flags: Read

-

Since: 2.48

-
-
-
-

The “peer-certificate-errors” property

-
  “peer-certificate-errors”  GTlsCertificateFlags
-

The errors noticed-and-ignored while verifying -“peer-certificate”. Normally this should be 0, but -it may not be if “validation-flags” is not -G_TLS_CERTIFICATE_VALIDATE_ALL, or if -“accept-certificate” overrode the default -behavior.

-

Flags: Read

-

Since: 2.48

-
-
-
-

The “rehandshake-mode” property

-
  “rehandshake-mode”         GTlsRehandshakeMode
-

The rehandshaking mode. See -g_dtls_connection_set_rehandshake_mode().

-

Flags: Read / Write / Construct

-

Default value: G_TLS_REHANDSHAKE_NEVER

-

Since: 2.48

-
-
-
-

The “require-close-notify” property

-
  “require-close-notify”     gboolean
-

Whether or not proper TLS close notification is required. -See g_dtls_connection_set_require_close_notify().

-

Flags: Read / Write / Construct

-

Default value: TRUE

-

Since: 2.48

-
-
-
-

Signal Details

-
-

The “accept-certificate” signal

-
gboolean
-user_function (GDtlsConnection     *conn,
-               GTlsCertificate     *peer_cert,
-               GTlsCertificateFlags errors,
-               gpointer             user_data)
-

Emitted during the TLS handshake after the peer certificate has -been received. You can examine peer_cert -'s certification path by -calling g_tls_certificate_get_issuer() on it.

-

For a client-side connection, peer_cert - is the server's -certificate, and the signal will only be emitted if the -certificate was not acceptable according to conn -'s -“validation_flags”. If you would like the -certificate to be accepted despite errors -, return TRUE from the -signal handler. Otherwise, if no handler accepts the certificate, -the handshake will fail with G_TLS_ERROR_BAD_CERTIFICATE.

-

For a server-side connection, peer_cert - is the certificate -presented by the client, if this was requested via the server's -“authentication_mode”. On the server side, -the signal is always emitted when the client presents a -certificate, and the certificate will only be accepted if a -handler returns TRUE.

-

Note that if this signal is emitted as part of asynchronous I/O -in the main thread, then you should not attempt to interact with -the user before returning from the signal handler. If you want to -let the user decide whether or not to accept the certificate, you -would have to return FALSE from the signal handler on the first -attempt, and then after the connection attempt returns a -G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if -the user decides to accept the certificate, remember that fact, -create a new connection, and return TRUE from the signal handler -the next time.

-

If you are doing I/O in another thread, you do not -need to worry about this, and can simply block in the signal -handler until the UI thread returns an answer.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

conn

a GDtlsConnection

 

peer_cert

the peer's GTlsCertificate

 

errors

the problems with peer_cert -.

 

user_data

user data set when the signal handler was connected.

 
-
-
-

Returns

-

TRUE to accept peer_cert -(which will also -immediately end the signal emission). FALSE to allow the signal -emission to continue, which will cause the handshake to fail if -no one else overrides it.

-
-

Flags: Run Last

-

Since: 2.48

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GDtlsServerConnection.html b/docs/reference/gio/html/GDtlsServerConnection.html deleted file mode 100644 index a5ac1bc63..000000000 --- a/docs/reference/gio/html/GDtlsServerConnection.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - -GDtlsServerConnection: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDtlsServerConnection

-

GDtlsServerConnection — DTLS server-side connection

-
-
-

Functions

-
---- - - - - -
-GDatagramBased * - -g_dtls_server_connection_new () -
-
-
-

Properties

-
----- - - - - - -
GTlsAuthenticationModeauthentication-modeRead / Write
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GDtlsServerConnection
structGDtlsServerConnectionInterface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GDtlsServerConnection
-
-
-
-

Prerequisites

-

-GDtlsServerConnection requires - GDtlsConnection, GDatagramBased and GObject.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GDtlsServerConnection is the server-side subclass of GDtlsConnection, -representing a server-side DTLS connection.

-
-
-

Functions

-
-

g_dtls_server_connection_new ()

-
GDatagramBased *
-g_dtls_server_connection_new (GDatagramBased *base_socket,
-                              GTlsCertificate *certificate,
-                              GError **error);
-

Creates a new GDtlsServerConnection wrapping base_socket -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

base_socket

the GDatagramBased to wrap

 

certificate

the default server certificate, or NULL.

[nullable]

error

GError for error reporting, or NULL to ignore

 
-
-
-

Returns

-

the new -GDtlsServerConnection, or NULL on error.

-

[transfer full][type GDtlsServerConnection]

-
-

Since: 2.48

-
-
-
-

Types and Values

-
-

GDtlsServerConnection

-
typedef struct _GDtlsServerConnection GDtlsServerConnection;
-

DTLS server-side connection. This is the server-side implementation -of a GDtlsConnection.

-

Since: 2.48

-
-
-
-

struct GDtlsServerConnectionInterface

-
struct GDtlsServerConnectionInterface {
-  GTypeInterface g_iface;
-};
-
-

vtable for a GDtlsServerConnection implementation.

-
-

Members

-
----- - -
-
-

Since: 2.48

-
-
-
-

Property Details

-
-

The “authentication-mode” property

-
  “authentication-mode”      GTlsAuthenticationMode
-

The GTlsAuthenticationMode for the server. This can be changed -before calling g_dtls_connection_handshake() if you want to -rehandshake with a different mode from the initial handshake.

-

Flags: Read / Write

-

Default value: G_TLS_AUTHENTICATION_NONE

-

Since: 2.48

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GEmblem.html b/docs/reference/gio/html/GEmblem.html deleted file mode 100644 index f89a465ac..000000000 --- a/docs/reference/gio/html/GEmblem.html +++ /dev/null @@ -1,351 +0,0 @@ - - - - -GEmblem: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GEmblem

-

GEmblem — An object for emblems

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
-GEmblem * - -g_emblem_new () -
-GEmblem * - -g_emblem_new_with_origin () -
-GIcon * - -g_emblem_get_icon () -
-GEmblemOrigin - -g_emblem_get_origin () -
-
-
-

Properties

-
----- - - - - - - - - - - - - -
-GObject *iconRead / Write / Construct Only
GEmblemOriginoriginRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GEmblem
enumGEmblemOrigin
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GEmblem
-
-
-
-

Implemented Interfaces

-

-GEmblem implements - GIcon.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GEmblem is an implementation of GIcon that supports -having an emblem, which is an icon with additional properties. -It can than be added to a GEmblemedIcon.

-

Currently, only metainformation about the emblem's origin is -supported. More may be added in the future.

-
-
-

Functions

-
-

g_emblem_new ()

-
GEmblem *
-g_emblem_new (GIcon *icon);
-

Creates a new emblem for icon -.

-
-

Parameters

-
----- - - - - - -

icon

a GIcon containing the icon.

 
-
-
-

Returns

-

a new GEmblem.

-
-

Since: 2.18

-
-
-
-

g_emblem_new_with_origin ()

-
GEmblem *
-g_emblem_new_with_origin (GIcon *icon,
-                          GEmblemOrigin origin);
-

Creates a new emblem for icon -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon

a GIcon containing the icon.

 

origin

a GEmblemOrigin enum defining the emblem's origin

 
-
-
-

Returns

-

a new GEmblem.

-
-

Since: 2.18

-
-
-
-

g_emblem_get_icon ()

-
GIcon *
-g_emblem_get_icon (GEmblem *emblem);
-

Gives back the icon from emblem -.

-
-

Parameters

-
----- - - - - - -

emblem

a GEmblem from which the icon should be extracted.

 
-
-
-

Returns

-

a GIcon. The returned object belongs to -the emblem and should not be modified or freed.

-

[transfer none]

-
-

Since: 2.18

-
-
-
-

g_emblem_get_origin ()

-
GEmblemOrigin
-g_emblem_get_origin (GEmblem *emblem);
-

Gets the origin of the emblem.

-
-

Parameters

-
----- - - - - - -

emblem

a GEmblem

 
-
-
-

Returns

-

the origin of the emblem.

-

[transfer none]

-
-

Since: 2.18

-
-
-
-

Types and Values

-
-

GEmblem

-
typedef struct _GEmblem GEmblem;
-

An object for Emblems

-
-
-
-

enum GEmblemOrigin

-

GEmblemOrigin is used to add information about the origin of the emblem -to GEmblem.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_EMBLEM_ORIGIN_UNKNOWN

-

Emblem of unknown origin

-
 

G_EMBLEM_ORIGIN_DEVICE

-

Emblem adds device-specific information

-
 

G_EMBLEM_ORIGIN_LIVEMETADATA

-

Emblem depicts live metadata, such as "readonly"

-
 

G_EMBLEM_ORIGIN_TAG

-

Emblem comes from a user-defined tag, e.g. set by nautilus (in the future)

-
 
-
-

Since: 2.18

-
-
-
-

Property Details

-
-

The “icon” property

-
  “icon”                     GObject *
-

The actual icon of the emblem.

-

Flags: Read / Write / Construct Only

-
-
-
-

The “origin” property

-
  “origin”                   GEmblemOrigin
-

Tells which origin the emblem is derived from.

-

Flags: Read / Write / Construct Only

-

Default value: G_EMBLEM_ORIGIN_UNKNOWN

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GEmblemedIcon.html b/docs/reference/gio/html/GEmblemedIcon.html deleted file mode 100644 index 976554bcf..000000000 --- a/docs/reference/gio/html/GEmblemedIcon.html +++ /dev/null @@ -1,324 +0,0 @@ - - - - -GEmblemedIcon: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GEmblemedIcon

-

GEmblemedIcon — Icon with emblems

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - -
-GIcon * - -g_emblemed_icon_new () -
-GIcon * - -g_emblemed_icon_get_icon () -
-GList * - -g_emblemed_icon_get_emblems () -
-void - -g_emblemed_icon_add_emblem () -
-void - -g_emblemed_icon_clear_emblems () -
-
-
-

Properties

-
----- - - - - - -
-GIcon *giconRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
structGEmblemedIcon
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GEmblemedIcon
-
-
-
-

Implemented Interfaces

-

-GEmblemedIcon implements - GIcon.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GEmblemedIcon is an implementation of GIcon that supports -adding an emblem to an icon. Adding multiple emblems to an -icon is ensured via g_emblemed_icon_add_emblem().

-

Note that GEmblemedIcon allows no control over the position -of the emblems. See also GEmblem for more information.

-
-
-

Functions

-
-

g_emblemed_icon_new ()

-
GIcon *
-g_emblemed_icon_new (GIcon *icon,
-                     GEmblem *emblem);
-

Creates a new emblemed icon for icon - with the emblem emblem -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon

a GIcon

 

emblem

a GEmblem, or NULL.

[nullable]
-
-
-

Returns

-

a new GIcon.

-

[transfer full][type GEmblemedIcon]

-
-

Since: 2.18

-
-
-
-

g_emblemed_icon_get_icon ()

-
GIcon *
-g_emblemed_icon_get_icon (GEmblemedIcon *emblemed);
-

Gets the main icon for emblemed -.

-
-

Parameters

-
----- - - - - - -

emblemed

a GEmblemedIcon

 
-
-
-

Returns

-

a GIcon that is owned by emblemed -.

-

[transfer none]

-
-

Since: 2.18

-
-
-
-

g_emblemed_icon_get_emblems ()

-
GList *
-g_emblemed_icon_get_emblems (GEmblemedIcon *emblemed);
-

Gets the list of emblems for the icon -.

-
-

Parameters

-
----- - - - - - -

emblemed

a GEmblemedIcon

 
-
-
-

Returns

-

a GList of -GEmblems that is owned by emblemed -.

-

[element-type Gio.Emblem][transfer none]

-
-

Since: 2.18

-
-
-
-

g_emblemed_icon_add_emblem ()

-
void
-g_emblemed_icon_add_emblem (GEmblemedIcon *emblemed,
-                            GEmblem *emblem);
-

Adds emblem - to the GList of GEmblems.

-
-

Parameters

-
----- - - - - - - - - - - - - -

emblemed

a GEmblemedIcon

 

emblem

a GEmblem

 
-
-

Since: 2.18

-
-
-
-

g_emblemed_icon_clear_emblems ()

-
void
-g_emblemed_icon_clear_emblems (GEmblemedIcon *emblemed);
-

Removes all the emblems from icon -.

-
-

Parameters

-
----- - - - - - -

emblemed

a GEmblemedIcon

 
-
-

Since: 2.28

-
-
-
-

Types and Values

-
-

struct GEmblemedIcon

-
struct GEmblemedIcon;
-

An implementation of GIcon for icons with emblems.

-
-
-
-

Property Details

-
-

The “gicon” property

-
  “gicon”                    GIcon *
-

The GIcon to attach emblems to.

-

Flags: Read / Write / Construct Only

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GFile.html b/docs/reference/gio/html/GFile.html deleted file mode 100644 index 44ccee7aa..000000000 --- a/docs/reference/gio/html/GFile.html +++ /dev/null @@ -1,9658 +0,0 @@ - - - - -GFile: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GFile

-

GFile — File and Directory Handling

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -(*GFileProgressCallback) () -
-gboolean - -(*GFileReadMoreCallback) () -
-void - -(*GFileMeasureProgressCallback) () -
-GFile * - -g_file_new_for_path () -
-GFile * - -g_file_new_for_uri () -
-GFile * - -g_file_new_for_commandline_arg () -
-GFile * - -g_file_new_for_commandline_arg_and_cwd () -
-GFile * - -g_file_new_tmp () -
-GFile * - -g_file_parse_name () -
-GFile * - -g_file_dup () -
-guint - -g_file_hash () -
-gboolean - -g_file_equal () -
-char * - -g_file_get_basename () -
-char * - -g_file_get_path () -
-char * - -g_file_get_uri () -
-char * - -g_file_get_parse_name () -
-GFile * - -g_file_get_parent () -
-gboolean - -g_file_has_parent () -
-GFile * - -g_file_get_child () -
-GFile * - -g_file_get_child_for_display_name () -
-gboolean - -g_file_has_prefix () -
-char * - -g_file_get_relative_path () -
-GFile * - -g_file_resolve_relative_path () -
-gboolean - -g_file_is_native () -
-gboolean - -g_file_has_uri_scheme () -
-char * - -g_file_get_uri_scheme () -
-GFileInputStream * - -g_file_read () -
-void - -g_file_read_async () -
-GFileInputStream * - -g_file_read_finish () -
-GFileOutputStream * - -g_file_append_to () -
-GFileOutputStream * - -g_file_create () -
-GFileOutputStream * - -g_file_replace () -
-void - -g_file_append_to_async () -
-GFileOutputStream * - -g_file_append_to_finish () -
-void - -g_file_create_async () -
-GFileOutputStream * - -g_file_create_finish () -
-void - -g_file_replace_async () -
-GFileOutputStream * - -g_file_replace_finish () -
-GFileInfo * - -g_file_query_info () -
-void - -g_file_query_info_async () -
-GFileInfo * - -g_file_query_info_finish () -
-gboolean - -g_file_query_exists () -
-GFileType - -g_file_query_file_type () -
-GFileInfo * - -g_file_query_filesystem_info () -
-void - -g_file_query_filesystem_info_async () -
-GFileInfo * - -g_file_query_filesystem_info_finish () -
-GAppInfo * - -g_file_query_default_handler () -
-gboolean - -g_file_measure_disk_usage () -
-void - -g_file_measure_disk_usage_async () -
-gboolean - -g_file_measure_disk_usage_finish () -
-GMount * - -g_file_find_enclosing_mount () -
-void - -g_file_find_enclosing_mount_async () -
-GMount * - -g_file_find_enclosing_mount_finish () -
-GFileEnumerator * - -g_file_enumerate_children () -
-void - -g_file_enumerate_children_async () -
-GFileEnumerator * - -g_file_enumerate_children_finish () -
-GFile * - -g_file_set_display_name () -
-void - -g_file_set_display_name_async () -
-GFile * - -g_file_set_display_name_finish () -
-gboolean - -g_file_delete () -
-void - -g_file_delete_async () -
-gboolean - -g_file_delete_finish () -
-gboolean - -g_file_trash () -
-void - -g_file_trash_async () -
-gboolean - -g_file_trash_finish () -
-gboolean - -g_file_copy () -
-void - -g_file_copy_async () -
-gboolean - -g_file_copy_finish () -
-gboolean - -g_file_move () -
-gboolean - -g_file_make_directory () -
-void - -g_file_make_directory_async () -
-gboolean - -g_file_make_directory_finish () -
-gboolean - -g_file_make_directory_with_parents () -
-gboolean - -g_file_make_symbolic_link () -
-GFileAttributeInfoList * - -g_file_query_settable_attributes () -
-GFileAttributeInfoList * - -g_file_query_writable_namespaces () -
-gboolean - -g_file_set_attribute () -
-gboolean - -g_file_set_attributes_from_info () -
-void - -g_file_set_attributes_async () -
-gboolean - -g_file_set_attributes_finish () -
-gboolean - -g_file_set_attribute_string () -
-gboolean - -g_file_set_attribute_byte_string () -
-gboolean - -g_file_set_attribute_uint32 () -
-gboolean - -g_file_set_attribute_int32 () -
-gboolean - -g_file_set_attribute_uint64 () -
-gboolean - -g_file_set_attribute_int64 () -
-void - -g_file_mount_mountable () -
-GFile * - -g_file_mount_mountable_finish () -
-void - -g_file_unmount_mountable () -
-gboolean - -g_file_unmount_mountable_finish () -
-void - -g_file_unmount_mountable_with_operation () -
-gboolean - -g_file_unmount_mountable_with_operation_finish () -
-void - -g_file_eject_mountable () -
-gboolean - -g_file_eject_mountable_finish () -
-void - -g_file_eject_mountable_with_operation () -
-gboolean - -g_file_eject_mountable_with_operation_finish () -
-void - -g_file_start_mountable () -
-gboolean - -g_file_start_mountable_finish () -
-void - -g_file_stop_mountable () -
-gboolean - -g_file_stop_mountable_finish () -
-void - -g_file_poll_mountable () -
-gboolean - -g_file_poll_mountable_finish () -
-void - -g_file_mount_enclosing_volume () -
-gboolean - -g_file_mount_enclosing_volume_finish () -
-GFileMonitor * - -g_file_monitor_directory () -
-GFileMonitor * - -g_file_monitor_file () -
-GFileMonitor * - -g_file_monitor () -
-gboolean - -g_file_load_contents () -
-void - -g_file_load_contents_async () -
-gboolean - -g_file_load_contents_finish () -
-void - -g_file_load_partial_contents_async () -
-gboolean - -g_file_load_partial_contents_finish () -
-gboolean - -g_file_replace_contents () -
-void - -g_file_replace_contents_async () -
-void - -g_file_replace_contents_bytes_async () -
-gboolean - -g_file_replace_contents_finish () -
-gboolean - -g_file_copy_attributes () -
-GFileIOStream * - -g_file_create_readwrite () -
-void - -g_file_create_readwrite_async () -
-GFileIOStream * - -g_file_create_readwrite_finish () -
-GFileIOStream * - -g_file_open_readwrite () -
-void - -g_file_open_readwrite_async () -
-GFileIOStream * - -g_file_open_readwrite_finish () -
-GFileIOStream * - -g_file_replace_readwrite () -
-void - -g_file_replace_readwrite_async () -
-GFileIOStream * - -g_file_replace_readwrite_finish () -
-gboolean - -g_file_supports_thread_contexts () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 GFile
structGFileIface
enumGFileQueryInfoFlags
enumGFileCreateFlags
enumGFileCopyFlags
enumGFileMonitorFlags
enumGFileMeasureFlags
enumGFilesystemPreviewType
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GFile
-
-
-
-

Prerequisites

-

-GFile requires - GObject.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GFile is a high level abstraction for manipulating files on a -virtual file system. GFiles are lightweight, immutable objects -that do no I/O upon creation. It is necessary to understand that -GFile objects do not represent files, merely an identifier for a -file. All file content I/O is implemented as streaming operations -(see GInputStream and GOutputStream).

-

To construct a GFile, you can use:

-
    -
  • g_file_new_for_path() if you have a path.

  • -
  • g_file_new_for_uri() if you have a URI.

  • -
  • g_file_new_for_commandline_arg() for a command line argument.

  • -
  • g_file_new_tmp() to create a temporary file from a template.

  • -
  • g_file_parse_name() from a UTF-8 string gotten from g_file_get_parse_name().

  • -
-

One way to think of a GFile is as an abstraction of a pathname. For -normal files the system pathname is what is stored internally, but as -GFiles are extensible it could also be something else that corresponds -to a pathname in a userspace implementation of a filesystem.

-

GFiles make up hierarchies of directories and files that correspond to -the files on a filesystem. You can move through the file system with -GFile using g_file_get_parent() to get an identifier for the parent -directory, g_file_get_child() to get a child within a directory, -g_file_resolve_relative_path() to resolve a relative path between two -GFiles. There can be multiple hierarchies, so you may not end up at -the same root if you repeatedly call g_file_get_parent() on two different -files.

-

All GFiles have a basename (get with g_file_get_basename()). These names -are byte strings that are used to identify the file on the filesystem -(relative to its parent directory) and there is no guarantees that they -have any particular charset encoding or even make any sense at all. If -you want to use filenames in a user interface you should use the display -name that you can get by requesting the -G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info(). -This is guaranteed to be in UTF-8 and can be used in a user interface. -But always store the real basename or the GFile to use to actually -access the file, because there is no way to go from a display name to -the actual name.

-

Using GFile as an identifier has the same weaknesses as using a path -in that there may be multiple aliases for the same file. For instance, -hard or soft links may cause two different GFiles to refer to the same -file. Other possible causes for aliases are: case insensitive filesystems, -short and long names on FAT/NTFS, or bind mounts in Linux. If you want to -check if two GFiles point to the same file you can query for the -G_FILE_ATTRIBUTE_ID_FILE attribute. Note that GFile does some trivial -canonicalization of pathnames passed in, so that trivial differences in -the path string used at creation (duplicated slashes, slash at end of -path, "." or ".." path segments, etc) does not create different GFiles.

-

Many GFile operations have both synchronous and asynchronous versions -to suit your application. Asynchronous versions of synchronous functions -simply have _async() appended to their function names. The asynchronous -I/O functions call a GAsyncReadyCallback which is then used to finalize -the operation, producing a GAsyncResult which is then passed to the -function's matching _finish() operation.

-

It is highly recommended to use asynchronous calls when running within a -shared main loop, such as in the main thread of an application. This avoids -I/O operations blocking other sources on the main loop from being dispatched. -Synchronous I/O operations should be performed from worker threads. See the -introduction to asynchronous programming section for -more.

-

Some GFile operations almost always take a noticeable amount of time, and -so do not have synchronous analogs. Notable cases include:

-
    -
  • g_file_mount_mountable() to mount a mountable file.

  • -
  • g_file_unmount_mountable_with_operation() to unmount a mountable file.

  • -
  • g_file_eject_mountable_with_operation() to eject a mountable file.

  • -
-
-

Entity Tags

-

One notable feature of GFiles are entity tags, or "etags" for -short. Entity tags are somewhat like a more abstract version of the -traditional mtime, and can be used to quickly determine if the file -has been modified from the version on the file system. See the -HTTP 1.1 -specification -for HTTP Etag headers, which are a very similar concept.

-
-
-
-

Functions

-
-

GFileProgressCallback ()

-
void
-(*GFileProgressCallback) (goffset current_num_bytes,
-                          goffset total_num_bytes,
-                          gpointer user_data);
-

When doing file operations that may take a while, such as moving -a file or copying a file, a progress callback is used to pass how -far along that operation is to the application.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

current_num_bytes

the current number of bytes in the operation.

 

total_num_bytes

the total number of bytes in the operation.

 

user_data

user data passed to the callback.

 
-
-
-
-
-

GFileReadMoreCallback ()

-
gboolean
-(*GFileReadMoreCallback) (const char *file_contents,
-                          goffset file_size,
-                          gpointer callback_data);
-

When loading the partial contents of a file with g_file_load_partial_contents_async(), -it may become necessary to determine if any more data from the file should be loaded. -A GFileReadMoreCallback function facilitates this by returning TRUE if more data -should be read, or FALSE otherwise.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file_contents

the data as currently read.

 

file_size

the size of the data currently read.

 

callback_data

data passed to the callback.

 
-
-
-

Returns

-

TRUE if more data should be read back. FALSE otherwise.

-
-
-
-
-

GFileMeasureProgressCallback ()

-
void
-(*GFileMeasureProgressCallback) (gboolean reporting,
-                                 guint64 current_size,
-                                 guint64 num_dirs,
-                                 guint64 num_files,
-                                 gpointer user_data);
-

This callback type is used by g_file_measure_disk_usage() to make -periodic progress reports when measuring the amount of disk spaced -used by a directory.

-

These calls are made on a best-effort basis and not all types of -GFile will support them. At the minimum, however, one call will -always be made immediately.

-

In the case that there is no support, reporting - will be set to -FALSE (and the other values undefined) and no further calls will be -made. Otherwise, the reporting - will be TRUE and the other values -all-zeros during the first (immediate) call. In this way, you can -know which type of progress UI to show without a delay.

-

For g_file_measure_disk_usage() the callback is made directly. For -g_file_measure_disk_usage_async() the callback is made via the -default main context of the calling thread (ie: the same way that the -final async result would be reported).

-

current_size - is in the same units as requested by the operation (see -G_FILE_DISK_USAGE_APPARENT_SIZE).

-

The frequency of the updates is implementation defined, but is -ideally about once every 200ms.

-

The last progress callback may or may not be equal to the final -result. Always check the async result to get the final value.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

reporting

TRUE if more reports will come

 

current_size

the current cumulative size measurement

 

num_dirs

the number of directories visited so far

 

num_files

the number of non-directory files encountered

 

user_data

the data passed to the original request for this callback

 
-
-

Since: 2.38

-
-
-
-

g_file_new_for_path ()

-
GFile *
-g_file_new_for_path (const char *path);
-

Constructs a GFile for a given path. This operation never -fails, but the returned object might not support any I/O -operation if path - is malformed.

-
-

Parameters

-
----- - - - - - -

path

a string containing a relative or absolute path. -The string must be encoded in the glib filename encoding.

[type filename]
-
-
-

Returns

-

a new GFile for the given path -. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_new_for_uri ()

-
GFile *
-g_file_new_for_uri (const char *uri);
-

Constructs a GFile for a given URI. This operation never -fails, but the returned object might not support any I/O -operation if uri - is malformed or if the uri type is -not supported.

-
-

Parameters

-
----- - - - - - -

uri

a UTF-8 string containing a URI

 
-
-
-

Returns

-

a new GFile for the given uri -. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_new_for_commandline_arg ()

-
GFile *
-g_file_new_for_commandline_arg (const char *arg);
-

Creates a GFile with the given argument from the command line. -The value of arg - can be either a URI, an absolute path or a -relative path resolved relative to the current working directory. -This operation never fails, but the returned object might not -support any I/O operation if arg - points to a malformed path.

-

Note that on Windows, this function expects its argument to be in -UTF-8 -- not the system code page. This means that you -should not use this function with string from argv as it is passed -to main(). g_win32_get_command_line() will return a UTF-8 version of -the commandline. GApplication also uses UTF-8 but -g_application_command_line_create_file_for_arg() may be more useful -for you there. It is also always possible to use this function with -GOptionContext arguments of type G_OPTION_ARG_FILENAME.

-
-

Parameters

-
----- - - - - - -

arg

a command line string

 
-
-
-

Returns

-

a new GFile. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_new_for_commandline_arg_and_cwd ()

-
GFile *
-g_file_new_for_commandline_arg_and_cwd
-                               (const gchar *arg,
-                                const gchar *cwd);
-

Creates a GFile with the given argument from the command line.

-

This function is similar to g_file_new_for_commandline_arg() except -that it allows for passing the current working directory as an -argument instead of using the current working directory of the -process.

-

This is useful if the commandline argument was given in a context -other than the invocation of the current process.

-

See also g_application_command_line_create_file_for_arg().

-
-

Parameters

-
----- - - - - - - - - - - - - -

arg

a command line string

 

cwd

the current working directory of the commandline.

[type filename]
-
-
-

Returns

-

a new GFile.

-

[transfer full]

-
-

Since: 2.36

-
-
-
-

g_file_new_tmp ()

-
GFile *
-g_file_new_tmp (const char *tmpl,
-                GFileIOStream **iostream,
-                GError **error);
-

Opens a file in the preferred directory for temporary files (as -returned by g_get_tmp_dir()) and returns a GFile and -GFileIOStream pointing to it.

-

tmpl - should be a string in the GLib file name encoding -containing a sequence of six 'X' characters, and containing no -directory components. If it is NULL, a default template is used.

-

Unlike the other GFile constructors, this will return NULL if -a temporary file could not be created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

tmpl

Template for the file -name, as in g_file_open_tmp(), or NULL for a default template.

[type filename][nullable]

iostream

on return, a GFileIOStream for the created file.

[out]

error

a GError, or NULL

 
-
-
-

Returns

-

a new GFile. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_file_parse_name ()

-
GFile *
-g_file_parse_name (const char *parse_name);
-

Constructs a GFile with the given parse_name - (i.e. something -given by g_file_get_parse_name()). This operation never fails, -but the returned object might not support any I/O operation if -the parse_name - cannot be parsed.

-
-

Parameters

-
----- - - - - - -

parse_name

a file name or path to be parsed

 
-
-
-

Returns

-

a new GFile.

-

[transfer full]

-
-
-
-
-

g_file_dup ()

-
GFile *
-g_file_dup (GFile *file);
-

Duplicates a GFile handle. This operation does not duplicate -the actual file or directory represented by the GFile; see -g_file_copy() if attempting to copy a file.

-

This call does no blocking I/O.

-
-

Parameters

-
----- - - - - - -

file

input GFile

 
-
-
-

Returns

-

a new GFile that is a duplicate -of the given GFile.

-

[transfer full]

-
-
-
-
-

g_file_hash ()

-
guint
-g_file_hash (gconstpointer file);
-

Creates a hash value for a GFile.

-

This call does no blocking I/O.

-

Virtual: hash

-
-

Parameters

-
----- - - - - - -

file

gconstpointer to a GFile.

[type GFile]
-
-
-

Returns

-

0 if file -is not a valid GFile, otherwise an -integer that can be used as hash value for the GFile. -This function is intended for easily hashing a GFile to -add to a GHashTable or similar data structure.

-
-
-
-
-

g_file_equal ()

-
gboolean
-g_file_equal (GFile *file1,
-              GFile *file2);
-

Checks if the two given GFiles refer to the same file.

-

Note that two GFiles that differ can still refer to the same -file on the filesystem due to various forms of filename -aliasing.

-

This call does no blocking I/O.

-
-

Parameters

-
----- - - - - - - - - - - - - -

file1

the first GFile

 

file2

the second GFile

 
-
-
-

Returns

-

TRUE if file1 -and file2 -are equal.

-
-
-
-
-

g_file_get_basename ()

-
char *
-g_file_get_basename (GFile *file);
-

Gets the base name (the last component of the path) for a given GFile.

-

If called for the top level of a system (such as the filesystem root -or a uri like sftp://host/) it will return a single directory separator -(and on Windows, possibly a drive letter).

-

The base name is a byte string (not UTF-8). It has no defined encoding -or rules other than it may not contain zero bytes. If you want to use -filenames in a user interface you should use the display name that you -can get by requesting the G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME -attribute with g_file_query_info().

-

This call does no blocking I/O.

-
-

Parameters

-
----- - - - - - -

file

input GFile

 
-
-
-

Returns

-

string containing the GFile's -base name, or NULL if given GFile is invalid. The returned string -should be freed with g_free() when no longer needed.

-

[type filename][nullable]

-
-
-
-
-

g_file_get_path ()

-
char *
-g_file_get_path (GFile *file);
-

Gets the local pathname for GFile, if one exists. If non-NULL, this is -guaranteed to be an absolute, canonical path. It might contain symlinks.

-

This call does no blocking I/O.

-
-

Parameters

-
----- - - - - - -

file

input GFile

 
-
-
-

Returns

-

string containing the GFile's path, -or NULL if no such path exists. The returned string should be freed -with g_free() when no longer needed.

-

[type filename][nullable]

-
-
-
-
-

g_file_get_uri ()

-
char *
-g_file_get_uri (GFile *file);
-

Gets the URI for the file -.

-

This call does no blocking I/O.

-
-

Parameters

-
----- - - - - - -

file

input GFile

 
-
-
-

Returns

-

a string containing the GFile's URI. -The returned string should be freed with g_free() -when no longer needed.

-
-
-
-
-

g_file_get_parse_name ()

-
char *
-g_file_get_parse_name (GFile *file);
-

Gets the parse name of the file -. -A parse name is a UTF-8 string that describes the -file such that one can get the GFile back using -g_file_parse_name().

-

This is generally used to show the GFile as a nice -full-pathname kind of string in a user interface, -like in a location entry.

-

For local files with names that can safely be converted -to UTF-8 the pathname is used, otherwise the IRI is used -(a form of URI that allows UTF-8 characters unescaped).

-

This call does no blocking I/O.

-
-

Parameters

-
----- - - - - - -

file

input GFile

 
-
-
-

Returns

-

a string containing the GFile's parse name. -The returned string should be freed with g_free() -when no longer needed.

-
-
-
-
-

g_file_get_parent ()

-
GFile *
-g_file_get_parent (GFile *file);
-

Gets the parent directory for the file -. -If the file - represents the root directory of the -file system, then NULL will be returned.

-

This call does no blocking I/O.

-
-

Parameters

-
----- - - - - - -

file

input GFile

 
-
-
-

Returns

-

a GFile structure to the -parent of the given GFile or NULL if there is no parent. Free -the returned object with g_object_unref().

-

[nullable][transfer full]

-
-
-
-
-

g_file_has_parent ()

-
gboolean
-g_file_has_parent (GFile *file,
-                   GFile *parent);
-

Checks if file - has a parent, and optionally, if it is parent -.

-

If parent - is NULL then this function returns TRUE if file - has any -parent at all. If parent - is non-NULL then TRUE is only returned -if file - is an immediate child of parent -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

file

input GFile

 

parent

the parent to check for, or NULL.

[nullable]
-
-
-

Returns

-

TRUE if file -is an immediate child of parent -(or any parent in -the case that parent -is NULL).

-
-

Since: 2.24

-
-
-
-

g_file_get_child ()

-
GFile *
-g_file_get_child (GFile *file,
-                  const char *name);
-

Gets a child of file - with basename equal to name -.

-

Note that the file with that specific name might not exist, but -you can still have a GFile that points to it. You can use this -for instance to create that file.

-

This call does no blocking I/O.

-
-

Parameters

-
----- - - - - - - - - - - - - -

file

input GFile

 

name

string containing the child's basename.

[type filename]
-
-
-

Returns

-

a GFile to a child specified by name -. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_get_child_for_display_name ()

-
GFile *
-g_file_get_child_for_display_name (GFile *file,
-                                   const char *display_name,
-                                   GError **error);
-

Gets the child of file - for a given display_name - (i.e. a UTF-8 -version of the name). If this function fails, it returns NULL -and error - will be set. This is very useful when constructing a -GFile for a new file and the user entered the filename in the -user interface, for instance when you select a directory and -type a filename in the file selector.

-

This call does no blocking I/O.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

display_name

string to a possible child

 

error

return location for an error

 
-
-
-

Returns

-

a GFile to the specified child, or -NULL if the display name couldn't be converted. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_has_prefix ()

-
gboolean
-g_file_has_prefix (GFile *file,
-                   GFile *prefix);
-

Checks whether file - has the prefix specified by prefix -.

-

In other words, if the names of initial elements of file -'s -pathname match prefix -. Only full pathname elements are matched, -so a path like /foo is not considered a prefix of /foobar, only -of /foo/bar.

-

A GFile is not a prefix of itself. If you want to check for -equality, use g_file_equal().

-

This call does no I/O, as it works purely on names. As such it can -sometimes return FALSE even if file - is inside a prefix - (from a -filesystem point of view), because the prefix of file - is an alias -of prefix -.

-

Virtual: prefix_matches

-
-

Parameters

-
----- - - - - - - - - - - - - -

file

input GFile

 

prefix

input GFile

 
-
-
-

Returns

-

TRUE if the files -'s parent, grandparent, etc is prefix -, -FALSE otherwise.

-
-
-
-
-

g_file_get_relative_path ()

-
char *
-g_file_get_relative_path (GFile *parent,
-                          GFile *descendant);
-

Gets the path for descendant - relative to parent -.

-

This call does no blocking I/O.

-
-

Parameters

-
----- - - - - - - - - - - - - -

parent

input GFile

 

descendant

input GFile

 
-
-
-

Returns

-

string with the relative path from -descendant -to parent -, or NULL if descendant -doesn't have parent -as -prefix. The returned string should be freed with g_free() when -no longer needed.

-

[type filename][nullable]

-
-
-
-
-

g_file_resolve_relative_path ()

-
GFile *
-g_file_resolve_relative_path (GFile *file,
-                              const char *relative_path);
-

Resolves a relative path for file - to an absolute path.

-

This call does no blocking I/O.

-
-

Parameters

-
----- - - - - - - - - - - - - -

file

input GFile

 

relative_path

a given relative path string.

[type filename]
-
-
-

Returns

-

GFile to the resolved path. -NULL if relative_path -is NULL or if file -is invalid. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_is_native ()

-
gboolean
-g_file_is_native (GFile *file);
-

Checks to see if a file is native to the platform.

-

A native file s one expressed in the platform-native filename format, -e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local, -as it might be on a locally mounted remote filesystem.

-

On some systems non-native files may be available using the native -filesystem via a userspace filesystem (FUSE), in these cases this call -will return FALSE, but g_file_get_path() will still return a native path.

-

This call does no blocking I/O.

-
-

Parameters

-
----- - - - - - -

file

input GFile

 
-
-
-

Returns

-

TRUE if file -is native

-
-
-
-
-

g_file_has_uri_scheme ()

-
gboolean
-g_file_has_uri_scheme (GFile *file,
-                       const char *uri_scheme);
-

Checks to see if a GFile has a given URI scheme.

-

This call does no blocking I/O.

-
-

Parameters

-
----- - - - - - - - - - - - - -

file

input GFile

 

uri_scheme

a string containing a URI scheme

 
-
-
-

Returns

-

TRUE if GFile's backend supports the -given URI scheme, FALSE if URI scheme is NULL, -not supported, or GFile is invalid.

-
-
-
-
-

g_file_get_uri_scheme ()

-
char *
-g_file_get_uri_scheme (GFile *file);
-

Gets the URI scheme for a GFile. -RFC 3986 decodes the scheme as:

-
- - - - - - - -
1
URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
-
- -

-Common schemes include "file", "http", "ftp", etc.

-

This call does no blocking I/O.

-
-

Parameters

-
----- - - - - - -

file

input GFile

 
-
-
-

Returns

-

a string containing the URI scheme for the given -GFile. The returned string should be freed with g_free() -when no longer needed.

-
-
-
-
-

g_file_read ()

-
GFileInputStream *
-g_file_read (GFile *file,
-             GCancellable *cancellable,
-             GError **error);
-

Opens a file for reading. The result is a GFileInputStream that -can be used to read the contents of the file.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-

If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be -returned. If the file is a directory, the G_IO_ERROR_IS_DIRECTORY -error will be returned. Other errors are possible too, and depend -on what kind of filesystem the file is on.

-

Virtual: read_fn

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

GFile to read

 

cancellable

a GCancellable.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

GFileInputStream or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_read_async ()

-
void
-g_file_read_async (GFile *file,
-                   int io_priority,
-                   GCancellable *cancellable,
-                   GAsyncReadyCallback callback,
-                   gpointer user_data);
-

Asynchronously opens file - for reading.

-

For more details, see g_file_read() which is -the synchronous version of this call.

-

When the operation is finished, callback - will be called. -You can then call g_file_read_finish() to get the result -of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_file_read_finish ()

-
GFileInputStream *
-g_file_read_finish (GFile *file,
-                    GAsyncResult *res,
-                    GError **error);
-

Finishes an asynchronous file read operation started with -g_file_read_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

res

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

a GFileInputStream or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_append_to ()

-
GFileOutputStream *
-g_file_append_to (GFile *file,
-                  GFileCreateFlags flags,
-                  GCancellable *cancellable,
-                  GError **error);
-

Gets an output stream for appending data to the file. -If the file doesn't already exist it is created.

-

By default files created are generally readable by everyone, -but if you pass G_FILE_CREATE_PRIVATE in flags - the file -will be made readable only to the current user, to the level that -is supported on the target filesystem.

-

If cancellable - is not NULL, then the operation can be cancelled -by triggering the cancellable object from another thread. If the -operation was cancelled, the error G_IO_ERROR_CANCELLED will be -returned.

-

Some file systems don't allow all file names, and may return an -G_IO_ERROR_INVALID_FILENAME error. If the file is a directory the -G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are -possible too, and depend on what kind of filesystem the file is on.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

flags

a set of GFileCreateFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

a GFileOutputStream, or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_create ()

-
GFileOutputStream *
-g_file_create (GFile *file,
-               GFileCreateFlags flags,
-               GCancellable *cancellable,
-               GError **error);
-

Creates a new file and returns an output stream for writing to it. -The file must not already exist.

-

By default files created are generally readable by everyone, -but if you pass G_FILE_CREATE_PRIVATE in flags - the file -will be made readable only to the current user, to the level -that is supported on the target filesystem.

-

If cancellable - is not NULL, then the operation can be cancelled -by triggering the cancellable object from another thread. If the -operation was cancelled, the error G_IO_ERROR_CANCELLED will be -returned.

-

If a file or directory with this name already exists the -G_IO_ERROR_EXISTS error will be returned. Some file systems don't -allow all file names, and may return an G_IO_ERROR_INVALID_FILENAME -error, and if the name is to long G_IO_ERROR_FILENAME_TOO_LONG will -be returned. Other errors are possible too, and depend on what kind -of filesystem the file is on.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

flags

a set of GFileCreateFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

a GFileOutputStream for the newly created -file, or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_replace ()

-
GFileOutputStream *
-g_file_replace (GFile *file,
-                const char *etag,
-                gboolean make_backup,
-                GFileCreateFlags flags,
-                GCancellable *cancellable,
-                GError **error);
-

Returns an output stream for overwriting the file, possibly -creating a backup copy of the file first. If the file doesn't exist, -it will be created.

-

This will try to replace the file in the safest way possible so -that any errors during the writing will not affect an already -existing copy of the file. For instance, for local files it -may write to a temporary file and then atomically rename over -the destination when the stream is closed.

-

By default files created are generally readable by everyone, -but if you pass G_FILE_CREATE_PRIVATE in flags - the file -will be made readable only to the current user, to the level that -is supported on the target filesystem.

-

If cancellable - is not NULL, then the operation can be cancelled -by triggering the cancellable object from another thread. If the -operation was cancelled, the error G_IO_ERROR_CANCELLED will be -returned.

-

If you pass in a non-NULL etag - value and file - already exists, then -this value is compared to the current entity tag of the file, and if -they differ an G_IO_ERROR_WRONG_ETAG error is returned. This -generally means that the file has been changed since you last read -it. You can get the new etag from g_file_output_stream_get_etag() -after you've finished writing and closed the GFileOutputStream. When -you load a new file you can use g_file_input_stream_query_info() to -get the etag of the file.

-

If make_backup - is TRUE, this function will attempt to make a -backup of the current file before overwriting it. If this fails -a G_IO_ERROR_CANT_CREATE_BACKUP error will be returned. If you -want to replace anyway, try again with make_backup - set to FALSE.

-

If the file is a directory the G_IO_ERROR_IS_DIRECTORY error will -be returned, and if the file is some other form of non-regular file -then a G_IO_ERROR_NOT_REGULAR_FILE error will be returned. Some -file systems don't allow all file names, and may return an -G_IO_ERROR_INVALID_FILENAME error, and if the name is to long -G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are -possible too, and depend on what kind of filesystem the file is on.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

etag

an optional entity tag -for the current GFile, or NULL to ignore.

[nullable]

make_backup

TRUE if a backup should be created

 

flags

a set of GFileCreateFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

a GFileOutputStream or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_append_to_async ()

-
void
-g_file_append_to_async (GFile *file,
-                        GFileCreateFlags flags,
-                        int io_priority,
-                        GCancellable *cancellable,
-                        GAsyncReadyCallback callback,
-                        gpointer user_data);
-

Asynchronously opens file - for appending.

-

For more details, see g_file_append_to() which is -the synchronous version of this call.

-

When the operation is finished, callback - will be called. -You can then call g_file_append_to_finish() to get the result -of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

flags

a set of GFileCreateFlags

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_file_append_to_finish ()

-
GFileOutputStream *
-g_file_append_to_finish (GFile *file,
-                         GAsyncResult *res,
-                         GError **error);
-

Finishes an asynchronous file append operation started with -g_file_append_to_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

res

GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

a valid GFileOutputStream -or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_create_async ()

-
void
-g_file_create_async (GFile *file,
-                     GFileCreateFlags flags,
-                     int io_priority,
-                     GCancellable *cancellable,
-                     GAsyncReadyCallback callback,
-                     gpointer user_data);
-

Asynchronously creates a new file and returns an output stream -for writing to it. The file must not already exist.

-

For more details, see g_file_create() which is -the synchronous version of this call.

-

When the operation is finished, callback - will be called. -You can then call g_file_create_finish() to get the result -of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

flags

a set of GFileCreateFlags

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_file_create_finish ()

-
GFileOutputStream *
-g_file_create_finish (GFile *file,
-                      GAsyncResult *res,
-                      GError **error);
-

Finishes an asynchronous file create operation started with -g_file_create_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

res

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

a GFileOutputStream or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_replace_async ()

-
void
-g_file_replace_async (GFile *file,
-                      const char *etag,
-                      gboolean make_backup,
-                      GFileCreateFlags flags,
-                      int io_priority,
-                      GCancellable *cancellable,
-                      GAsyncReadyCallback callback,
-                      gpointer user_data);
-

Asynchronously overwrites the file, replacing the contents, -possibly creating a backup copy of the file first.

-

For more details, see g_file_replace() which is -the synchronous version of this call.

-

When the operation is finished, callback - will be called. -You can then call g_file_replace_finish() to get the result -of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

etag

an entity tag for the current GFile, -or NULL to ignore.

[nullable]

make_backup

TRUE if a backup should be created

 

flags

a set of GFileCreateFlags

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_file_replace_finish ()

-
GFileOutputStream *
-g_file_replace_finish (GFile *file,
-                       GAsyncResult *res,
-                       GError **error);
-

Finishes an asynchronous file replace operation started with -g_file_replace_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

res

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

a GFileOutputStream, or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_query_info ()

-
GFileInfo *
-g_file_query_info (GFile *file,
-                   const char *attributes,
-                   GFileQueryInfoFlags flags,
-                   GCancellable *cancellable,
-                   GError **error);
-

Gets the requested information about specified file -. -The result is a GFileInfo object that contains key-value -attributes (such as the type or size of the file).

-

The attributes - value is a string that specifies the file -attributes that should be gathered. It is not an error if -it's not possible to read a particular requested attribute -from a file - it just won't be set. attributes - should be a -comma-separated list of attributes or attribute wildcards. -The wildcard "*" means all attributes, and a wildcard like -"standard::*" means all attributes in the standard namespace. -An example attribute query be "standard::*,owner::user". -The standard attributes are available as defines, like -G_FILE_ATTRIBUTE_STANDARD_NAME.

-

If cancellable - is not NULL, then the operation can be cancelled -by triggering the cancellable object from another thread. If the -operation was cancelled, the error G_IO_ERROR_CANCELLED will be -returned.

-

For symlinks, normally the information about the target of the -symlink is returned, rather than information about the symlink -itself. However if you pass G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS -in flags - the information about the symlink itself will be returned. -Also, for symlinks that point to non-existing files the information -about the symlink itself will be returned.

-

If the file does not exist, the G_IO_ERROR_NOT_FOUND error will be -returned. Other errors are possible too, and depend on what kind of -filesystem the file is on.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

attributes

an attribute query string

 

flags

a set of GFileQueryInfoFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError

 
-
-
-

Returns

-

a GFileInfo for the given file -, or NULL -on error. Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_query_info_async ()

-
void
-g_file_query_info_async (GFile *file,
-                         const char *attributes,
-                         GFileQueryInfoFlags flags,
-                         int io_priority,
-                         GCancellable *cancellable,
-                         GAsyncReadyCallback callback,
-                         gpointer user_data);
-

Asynchronously gets the requested information about specified file -. -The result is a GFileInfo object that contains key-value attributes -(such as type or size for the file).

-

For more details, see g_file_query_info() which is the synchronous -version of this call.

-

When the operation is finished, callback - will be called. You can -then call g_file_query_info_finish() to get the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

attributes

an attribute query string

 

flags

a set of GFileQueryInfoFlags

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call when the -request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_file_query_info_finish ()

-
GFileInfo *
-g_file_query_info_finish (GFile *file,
-                          GAsyncResult *res,
-                          GError **error);
-

Finishes an asynchronous file info query. -See g_file_query_info_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

res

a GAsyncResult

 

error

a GError

 
-
-
-

Returns

-

GFileInfo for given file -or NULL on error. Free the returned object with -g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_query_exists ()

-
gboolean
-g_file_query_exists (GFile *file,
-                     GCancellable *cancellable);
-

Utility function to check if a particular file exists. This is -implemented using g_file_query_info() and as such does blocking I/O.

-

Note that in many cases it is racy to first check for file existence -and then execute something based on the outcome of that, because the -file might have been created or removed in between the operations. The -general approach to handling that is to not check, but just do the -operation and handle the errors as they come.

-

As an example of race-free checking, take the case of reading a file, -and if it doesn't exist, creating it. There are two racy versions: read -it, and on error create it; and: check if it exists, if not create it. -These can both result in two processes creating the file (with perhaps -a partially written file as the result). The correct approach is to -always try to create the file with g_file_create() which will either -atomically create the file or fail with a G_IO_ERROR_EXISTS error.

-

However, in many cases an existence check is useful in a user interface, -for instance to make a menu item sensitive/insensitive, so that you don't -have to fool users that something is possible and then just show an error -dialog. If you do this, you should make sure to also handle the errors -that can happen due to races when you execute the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - -

file

input GFile

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]
-
-
-

Returns

-

TRUE if the file exists (and can be detected without error), -FALSE otherwise (or if cancelled).

-
-
-
-
-

g_file_query_file_type ()

-
GFileType
-g_file_query_file_type (GFile *file,
-                        GFileQueryInfoFlags flags,
-                        GCancellable *cancellable);
-

Utility function to inspect the GFileType of a file. This is -implemented using g_file_query_info() and as such does blocking I/O.

-

The primary use case of this method is to check if a file is -a regular file, directory, or symlink.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

flags

a set of GFileQueryInfoFlags passed to g_file_query_info()

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]
-
-
-

Returns

-

The GFileType of the file and G_FILE_TYPE_UNKNOWN -if the file does not exist

-
-

Since: 2.18

-
-
-
-

g_file_query_filesystem_info ()

-
GFileInfo *
-g_file_query_filesystem_info (GFile *file,
-                              const char *attributes,
-                              GCancellable *cancellable,
-                              GError **error);
-

Similar to g_file_query_info(), but obtains information -about the filesystem the file - is on, rather than the file itself. -For instance the amount of space available and the type of -the filesystem.

-

The attributes - value is a string that specifies the attributes -that should be gathered. It is not an error if it's not possible -to read a particular requested attribute from a file - it just -won't be set. attributes - should be a comma-separated list of -attributes or attribute wildcards. The wildcard "*" means all -attributes, and a wildcard like "filesystem::*" means all attributes -in the filesystem namespace. The standard namespace for filesystem -attributes is "filesystem". Common attributes of interest are -G_FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem -in bytes), G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available), -and G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem).

-

If cancellable - is not NULL, then the operation can be cancelled -by triggering the cancellable object from another thread. If the -operation was cancelled, the error G_IO_ERROR_CANCELLED will be -returned.

-

If the file does not exist, the G_IO_ERROR_NOT_FOUND error will -be returned. Other errors are possible too, and depend on what -kind of filesystem the file is on.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

attributes

an attribute query string

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError

 
-
-
-

Returns

-

a GFileInfo or NULL if there was an error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_query_filesystem_info_async ()

-
void
-g_file_query_filesystem_info_async (GFile *file,
-                                    const char *attributes,
-                                    int io_priority,
-                                    GCancellable *cancellable,
-                                    GAsyncReadyCallback callback,
-                                    gpointer user_data);
-

Asynchronously gets the requested information about the filesystem -that the specified file - is on. The result is a GFileInfo object -that contains key-value attributes (such as type or size for the -file).

-

For more details, see g_file_query_filesystem_info() which is the -synchronous version of this call.

-

When the operation is finished, callback - will be called. You can -then call g_file_query_info_finish() to get the result of the -operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

attributes

an attribute query string

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_file_query_filesystem_info_finish ()

-
GFileInfo *
-g_file_query_filesystem_info_finish (GFile *file,
-                                     GAsyncResult *res,
-                                     GError **error);
-

Finishes an asynchronous filesystem info query. -See g_file_query_filesystem_info_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

res

a GAsyncResult

 

error

a GError

 
-
-
-

Returns

-

GFileInfo for given file -or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_query_default_handler ()

-
GAppInfo *
-g_file_query_default_handler (GFile *file,
-                              GCancellable *cancellable,
-                              GError **error);
-

Returns the GAppInfo that is registered as the default -application to handle the file specified by file -.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

a GFile to open

 

cancellable

optional GCancellable object, NULL to ignore

 

error

a GError, or NULL

 
-
-
-

Returns

-

a GAppInfo if the handle was found, -NULL if there were errors. -When you are done with it, release it with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_measure_disk_usage ()

-
gboolean
-g_file_measure_disk_usage (GFile *file,
-                           GFileMeasureFlags flags,
-                           GCancellable *cancellable,
-                           GFileMeasureProgressCallback progress_callback,
-                           gpointer progress_data,
-                           guint64 *disk_usage,
-                           guint64 *num_dirs,
-                           guint64 *num_files,
-                           GError **error);
-

Recursively measures the disk usage of file -.

-

This is essentially an analog of the 'du' command, but it also -reports the number of directories and non-directory files encountered -(including things like symbolic links).

-

By default, errors are only reported against the toplevel file -itself. Errors found while recursing are silently ignored, unless -G_FILE_DISK_USAGE_REPORT_ALL_ERRORS is given in flags -.

-

The returned size, disk_usage -, is in bytes and should be formatted -with g_format_size() in order to get something reasonable for showing -in a user interface.

-

progress_callback - and progress_data - can be given to request -periodic progress updates while scanning. See the documentation for -GFileMeasureProgressCallback for information about when and how the -callback will be invoked.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

a GFile

 

flags

GFileMeasureFlags

 

cancellable

optional GCancellable.

[nullable]

progress_callback

a GFileMeasureProgressCallback.

[nullable]

progress_data

user_data for progress_callback -

 

disk_usage

the number of bytes of disk space used.

[out][optional]

num_dirs

the number of directories encountered.

[out][optional]

num_files

the number of non-directories encountered.

[out][optional]

error

NULL, or a pointer to a NULL GError pointer.

[nullable]
-
-
-

Returns

-

TRUE if successful, with the out parameters set. -FALSE otherwise, with error -set.

-
-

Since: 2.38

-
-
-
-

g_file_measure_disk_usage_async ()

-
void
-g_file_measure_disk_usage_async (GFile *file,
-                                 GFileMeasureFlags flags,
-                                 gint io_priority,
-                                 GCancellable *cancellable,
-                                 GFileMeasureProgressCallback progress_callback,
-                                 gpointer progress_data,
-                                 GAsyncReadyCallback callback,
-                                 gpointer user_data);
-

Recursively measures the disk usage of file -.

-

This is the asynchronous version of g_file_measure_disk_usage(). See -there for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

a GFile

 

flags

GFileMeasureFlags

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable.

[nullable]

progress_callback

a GFileMeasureProgressCallback.

[nullable]

progress_data

user_data for progress_callback -

 

callback

a GAsyncReadyCallback to call when complete.

[nullable]

user_data

the data to pass to callback function

 
-
-

Since: 2.38

-
-
-
-

g_file_measure_disk_usage_finish ()

-
gboolean
-g_file_measure_disk_usage_finish (GFile *file,
-                                  GAsyncResult *result,
-                                  guint64 *disk_usage,
-                                  guint64 *num_dirs,
-                                  guint64 *num_files,
-                                  GError **error);
-

Collects the results from an earlier call to -g_file_measure_disk_usage_async(). See g_file_measure_disk_usage() for -more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

a GFile

 

result

the GAsyncResult passed to your GAsyncReadyCallback

 

disk_usage

the number of bytes of disk space used.

[out][optional]

num_dirs

the number of directories encountered.

[out][optional]

num_files

the number of non-directories encountered.

[out][optional]

error

NULL, or a pointer to a NULL GError pointer.

[nullable]
-
-
-

Returns

-

TRUE if successful, with the out parameters set. -FALSE otherwise, with error -set.

-
-

Since: 2.38

-
-
-
-

g_file_find_enclosing_mount ()

-
GMount *
-g_file_find_enclosing_mount (GFile *file,
-                             GCancellable *cancellable,
-                             GError **error);
-

Gets a GMount for the GFile.

-

If the GFileIface for file - does not have a mount (e.g. -possibly a remote share), error - will be set to G_IO_ERROR_NOT_FOUND -and NULL will be returned.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError

 
-
-
-

Returns

-

a GMount where the file -is located -or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_find_enclosing_mount_async ()

-
void
-g_file_find_enclosing_mount_async (GFile *file,
-                                   int io_priority,
-                                   GCancellable *cancellable,
-                                   GAsyncReadyCallback callback,
-                                   gpointer user_data);
-

Asynchronously gets the mount for the file.

-

For more details, see g_file_find_enclosing_mount() which is -the synchronous version of this call.

-

When the operation is finished, callback - will be called. -You can then call g_file_find_enclosing_mount_finish() to -get the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

a GFile

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_file_find_enclosing_mount_finish ()

-
GMount *
-g_file_find_enclosing_mount_finish (GFile *file,
-                                    GAsyncResult *res,
-                                    GError **error);
-

Finishes an asynchronous find mount request. -See g_file_find_enclosing_mount_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

a GFile

 

res

a GAsyncResult

 

error

a GError

 
-
-
-

Returns

-

GMount for given file -or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_enumerate_children ()

-
GFileEnumerator *
-g_file_enumerate_children (GFile *file,
-                           const char *attributes,
-                           GFileQueryInfoFlags flags,
-                           GCancellable *cancellable,
-                           GError **error);
-

Gets the requested information about the files in a directory. -The result is a GFileEnumerator object that will give out -GFileInfo objects for all the files in the directory.

-

The attributes - value is a string that specifies the file -attributes that should be gathered. It is not an error if -it's not possible to read a particular requested attribute -from a file - it just won't be set. attributes - should -be a comma-separated list of attributes or attribute wildcards. -The wildcard "*" means all attributes, and a wildcard like -"standard::*" means all attributes in the standard namespace. -An example attribute query be "standard::*,owner::user". -The standard attributes are available as defines, like -G_FILE_ATTRIBUTE_STANDARD_NAME.

-

If cancellable - is not NULL, then the operation can be cancelled -by triggering the cancellable object from another thread. If the -operation was cancelled, the error G_IO_ERROR_CANCELLED will be -returned.

-

If the file does not exist, the G_IO_ERROR_NOT_FOUND error will -be returned. If the file is not a directory, the G_IO_ERROR_NOT_DIRECTORY -error will be returned. Other errors are possible too.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

attributes

an attribute query string

 

flags

a set of GFileQueryInfoFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

GError for error reporting

 
-
-
-

Returns

-

A GFileEnumerator if successful, -NULL on error. Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_enumerate_children_async ()

-
void
-g_file_enumerate_children_async (GFile *file,
-                                 const char *attributes,
-                                 GFileQueryInfoFlags flags,
-                                 int io_priority,
-                                 GCancellable *cancellable,
-                                 GAsyncReadyCallback callback,
-                                 gpointer user_data);
-

Asynchronously gets the requested information about the files -in a directory. The result is a GFileEnumerator object that will -give out GFileInfo objects for all the files in the directory.

-

For more details, see g_file_enumerate_children() which is -the synchronous version of this call.

-

When the operation is finished, callback - will be called. You can -then call g_file_enumerate_children_finish() to get the result of -the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

attributes

an attribute query string

 

flags

a set of GFileQueryInfoFlags

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call when the -request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_file_enumerate_children_finish ()

-
GFileEnumerator *
-g_file_enumerate_children_finish (GFile *file,
-                                  GAsyncResult *res,
-                                  GError **error);
-

Finishes an async enumerate children operation. -See g_file_enumerate_children_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

res

a GAsyncResult

 

error

a GError

 
-
-
-

Returns

-

a GFileEnumerator or NULL -if an error occurred. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_set_display_name ()

-
GFile *
-g_file_set_display_name (GFile *file,
-                         const char *display_name,
-                         GCancellable *cancellable,
-                         GError **error);
-

Renames file - to the specified display name.

-

The display name is converted from UTF-8 to the correct encoding -for the target filesystem if possible and the file - is renamed to this.

-

If you want to implement a rename operation in the user interface the -edit name (G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the -initial value in the rename widget, and then the result after editing -should be passed to g_file_set_display_name().

-

On success the resulting converted filename is returned.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

display_name

a string

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

a GFile specifying what file -was renamed to, -or NULL if there was an error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_set_display_name_async ()

-
void
-g_file_set_display_name_async (GFile *file,
-                               const char *display_name,
-                               int io_priority,
-                               GCancellable *cancellable,
-                               GAsyncReadyCallback callback,
-                               gpointer user_data);
-

Asynchronously sets the display name for a given GFile.

-

For more details, see g_file_set_display_name() which is -the synchronous version of this call.

-

When the operation is finished, callback - will be called. -You can then call g_file_set_display_name_finish() to get -the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

display_name

a string

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_file_set_display_name_finish ()

-
GFile *
-g_file_set_display_name_finish (GFile *file,
-                                GAsyncResult *res,
-                                GError **error);
-

Finishes setting a display name started with -g_file_set_display_name_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

res

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

a GFile or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_delete ()

-
gboolean
-g_file_delete (GFile *file,
-               GCancellable *cancellable,
-               GError **error);
-

Deletes a file. If the file - is a directory, it will only be -deleted if it is empty. This has the same semantics as g_unlink().

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-

Virtual: delete_file

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the file was deleted. FALSE otherwise.

-
-
-
-
-

g_file_delete_async ()

-
void
-g_file_delete_async (GFile *file,
-                     int io_priority,
-                     GCancellable *cancellable,
-                     GAsyncReadyCallback callback,
-                     gpointer user_data);
-

Asynchronously delete a file. If the file - is a directory, it will -only be deleted if it is empty. This has the same semantics as -g_unlink().

-

Virtual: delete_file_async

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied

 

user_data

the data to pass to callback function

 
-
-

Since: 2.34

-
-
-
-

g_file_delete_finish ()

-
gboolean
-g_file_delete_finish (GFile *file,
-                      GAsyncResult *result,
-                      GError **error);
-

Finishes deleting a file started with g_file_delete_async().

-

Virtual: delete_file_finish

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

result

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the file was deleted. FALSE otherwise.

-
-

Since: 2.34

-
-
-
-

g_file_trash ()

-
gboolean
-g_file_trash (GFile *file,
-              GCancellable *cancellable,
-              GError **error);
-

Sends file - to the "Trashcan", if possible. This is similar to -deleting it, but the user can recover it before emptying the trashcan. -Not all file systems support trashing, so this call can return the -G_IO_ERROR_NOT_SUPPORTED error.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-

Virtual: trash

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

GFile to send to trash

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE on successful trash, FALSE otherwise.

-
-
-
-
-

g_file_trash_async ()

-
void
-g_file_trash_async (GFile *file,
-                    int io_priority,
-                    GCancellable *cancellable,
-                    GAsyncReadyCallback callback,
-                    gpointer user_data);
-

Asynchronously sends file - to the Trash location, if possible.

-

Virtual: trash_async

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied

 

user_data

the data to pass to callback function

 
-
-

Since: 2.38

-
-
-
-

g_file_trash_finish ()

-
gboolean
-g_file_trash_finish (GFile *file,
-                     GAsyncResult *result,
-                     GError **error);
-

Finishes an asynchronous file trashing operation, started with -g_file_trash_async().

-

Virtual: trash_finish

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

result

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE on successful trash, FALSE otherwise.

-
-

Since: 2.38

-
-
-
-

g_file_copy ()

-
gboolean
-g_file_copy (GFile *source,
-             GFile *destination,
-             GFileCopyFlags flags,
-             GCancellable *cancellable,
-             GFileProgressCallback progress_callback,
-             gpointer progress_callback_data,
-             GError **error);
-

Copies the file source - to the location specified by destination -. -Can not handle recursive copies of directories.

-

If the flag G_FILE_COPY_OVERWRITE is specified an already -existing destination - file is overwritten.

-

If the flag G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks -will be copied as symlinks, otherwise the target of the -source - symlink will be copied.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-

If progress_callback - is not NULL, then the operation can be monitored -by setting this to a GFileProgressCallback function. -progress_callback_data - will be passed to this function. It is guaranteed -that this callback will be called after all data has been transferred with -the total number of bytes copied during the operation.

-

If the source - file does not exist, then the G_IO_ERROR_NOT_FOUND error -is returned, independent on the status of the destination -.

-

If G_FILE_COPY_OVERWRITE is not specified and the target exists, then -the error G_IO_ERROR_EXISTS is returned.

-

If trying to overwrite a file over a directory, the G_IO_ERROR_IS_DIRECTORY -error is returned. If trying to overwrite a directory with a directory the -G_IO_ERROR_WOULD_MERGE error is returned.

-

If the source is a directory and the target does not exist, or -G_FILE_COPY_OVERWRITE is specified and the target is a file, then the -G_IO_ERROR_WOULD_RECURSE error is returned.

-

If you are interested in copying the GFile object itself (not the on-disk -file), see g_file_dup().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

source

input GFile

 

destination

destination GFile

 

flags

set of GFileCopyFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

progress_callback

function to callback with -progress information, or NULL if progress information is not needed.

[nullable][scope call]

progress_callback_data

user data to pass to progress_callback -.

[closure]

error

GError to set on error, or NULL

 
-
-
-

Returns

-

TRUE on success, FALSE otherwise.

-
-
-
-
-

g_file_copy_async ()

-
void
-g_file_copy_async (GFile *source,
-                   GFile *destination,
-                   GFileCopyFlags flags,
-                   int io_priority,
-                   GCancellable *cancellable,
-                   GFileProgressCallback progress_callback,
-                   gpointer progress_callback_data,
-                   GAsyncReadyCallback callback,
-                   gpointer user_data);
-

Copies the file source - to the location specified by destination - -asynchronously. For details of the behaviour, see g_file_copy().

-

If progress_callback - is not NULL, then that function that will be called -just like in g_file_copy(). The callback will run in the default main context -of the thread calling g_file_copy_async() — the same context as callback - is -run in.

-

When the operation is finished, callback - will be called. You can then call -g_file_copy_finish() to get the result of the operation.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

source

input GFile

 

destination

destination GFile

 

flags

set of GFileCopyFlags

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

progress_callback

function to callback with progress -information, or NULL if progress information is not needed.

[nullable]

progress_callback_data

user data to pass to progress_callback -.

[closure]

callback

a GAsyncReadyCallback to call when the request is satisfied

 

user_data

the data to pass to callback function

 
-
-
-
-
-

g_file_copy_finish ()

-
gboolean
-g_file_copy_finish (GFile *file,
-                    GAsyncResult *res,
-                    GError **error);
-

Finishes copying the file started with g_file_copy_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

res

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

a TRUE on success, FALSE on error.

-
-
-
-
-

g_file_move ()

-
gboolean
-g_file_move (GFile *source,
-             GFile *destination,
-             GFileCopyFlags flags,
-             GCancellable *cancellable,
-             GFileProgressCallback progress_callback,
-             gpointer progress_callback_data,
-             GError **error);
-

Tries to move the file or directory source - to the location specified -by destination -. If native move operations are supported then this is -used, otherwise a copy + delete fallback is used. The native -implementation may support moving directories (for instance on moves -inside the same filesystem), but the fallback code does not.

-

If the flag G_FILE_COPY_OVERWRITE is specified an already -existing destination - file is overwritten.

-

If the flag G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks -will be copied as symlinks, otherwise the target of the -source - symlink will be copied.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-

If progress_callback - is not NULL, then the operation can be monitored -by setting this to a GFileProgressCallback function. -progress_callback_data - will be passed to this function. It is -guaranteed that this callback will be called after all data has been -transferred with the total number of bytes copied during the operation.

-

If the source - file does not exist, then the G_IO_ERROR_NOT_FOUND -error is returned, independent on the status of the destination -.

-

If G_FILE_COPY_OVERWRITE is not specified and the target exists, -then the error G_IO_ERROR_EXISTS is returned.

-

If trying to overwrite a file over a directory, the G_IO_ERROR_IS_DIRECTORY -error is returned. If trying to overwrite a directory with a directory the -G_IO_ERROR_WOULD_MERGE error is returned.

-

If the source is a directory and the target does not exist, or -G_FILE_COPY_OVERWRITE is specified and the target is a file, then -the G_IO_ERROR_WOULD_RECURSE error may be returned (if the native -move operation isn't available).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

source

GFile pointing to the source location

 

destination

GFile pointing to the destination location

 

flags

set of GFileCopyFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

progress_callback

GFileProgressCallback -function for updates.

[nullable][scope call]

progress_callback_data

gpointer to user data for -the callback function.

[closure]

error

GError for returning error conditions, or NULL

 
-
-
-

Returns

-

TRUE on successful move, FALSE otherwise.

-
-
-
-
-

g_file_make_directory ()

-
gboolean
-g_file_make_directory (GFile *file,
-                       GCancellable *cancellable,
-                       GError **error);
-

Creates a directory. Note that this will only create a child directory -of the immediate parent directory of the path or URI given by the GFile. -To recursively create directories, see g_file_make_directory_with_parents(). -This function will fail if the parent directory does not exist, setting -error - to G_IO_ERROR_NOT_FOUND. If the file system doesn't support -creating directories, this function will fail, setting error - to -G_IO_ERROR_NOT_SUPPORTED.

-

For a local GFile the newly created directory will have the default -(current) ownership and permissions of the current process.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE on successful creation, FALSE otherwise.

-
-
-
-
-

g_file_make_directory_async ()

-
void
-g_file_make_directory_async (GFile *file,
-                             int io_priority,
-                             GCancellable *cancellable,
-                             GAsyncReadyCallback callback,
-                             gpointer user_data);
-

Asynchronously creates a directory.

-

Virtual: make_directory_async

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied

 

user_data

the data to pass to callback function

 
-
-

Since: 2.38

-
-
-
-

g_file_make_directory_finish ()

-
gboolean
-g_file_make_directory_finish (GFile *file,
-                              GAsyncResult *result,
-                              GError **error);
-

Finishes an asynchronous directory creation, started with -g_file_make_directory_async().

-

Virtual: make_directory_finish

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

result

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE on successful directory creation, FALSE otherwise.

-
-

Since: 2.38

-
-
-
-

g_file_make_directory_with_parents ()

-
gboolean
-g_file_make_directory_with_parents (GFile *file,
-                                    GCancellable *cancellable,
-                                    GError **error);
-

Creates a directory and any parent directories that may not -exist similar to 'mkdir -p'. If the file system does not support -creating directories, this function will fail, setting error - to -G_IO_ERROR_NOT_SUPPORTED. If the directory itself already exists, -this function will fail setting error - to G_IO_ERROR_EXISTS, unlike -the similar g_mkdir_with_parents().

-

For a local GFile the newly created directories will have the default -(current) ownership and permissions of the current process.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if all directories have been successfully created, FALSE -otherwise.

-
-

Since: 2.18

-
-
-
-

g_file_make_symbolic_link ()

-
gboolean
-g_file_make_symbolic_link (GFile *file,
-                           const char *symlink_value,
-                           GCancellable *cancellable,
-                           GError **error);
-

Creates a symbolic link named file - which contains the string -symlink_value -.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

file

a GFile with the name of the symlink to create

 

symlink_value

a string with the path for the target -of the new symlink.

[type filename]

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError

 
-
-
-

Returns

-

TRUE on the creation of a new symlink, FALSE otherwise.

-
-
-
-
-

g_file_query_settable_attributes ()

-
GFileAttributeInfoList *
-g_file_query_settable_attributes (GFile *file,
-                                  GCancellable *cancellable,
-                                  GError **error);
-

Obtain the list of settable attributes for the file.

-

Returns the type and full attribute name of all the attributes -that can be set on this file. This doesn't mean setting it will -always succeed though, you might get an access failure, or some -specific file may not support a specific attribute.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

a GFileAttributeInfoList describing the settable attributes. -When you are done with it, release it with -g_file_attribute_info_list_unref()

-
-
-
-
-

g_file_query_writable_namespaces ()

-
GFileAttributeInfoList *
-g_file_query_writable_namespaces (GFile *file,
-                                  GCancellable *cancellable,
-                                  GError **error);
-

Obtain the list of attribute namespaces where new attributes -can be created by a user. An example of this is extended -attributes (in the "xattr" namespace).

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

a GFileAttributeInfoList describing the writable namespaces. -When you are done with it, release it with -g_file_attribute_info_list_unref()

-
-
-
-
-

g_file_set_attribute ()

-
gboolean
-g_file_set_attribute (GFile *file,
-                      const char *attribute,
-                      GFileAttributeType type,
-                      gpointer value_p,
-                      GFileQueryInfoFlags flags,
-                      GCancellable *cancellable,
-                      GError **error);
-

Sets an attribute in the file with attribute name attribute - to value -.

-

Some attributes can be unset by setting attribute - to -G_FILE_ATTRIBUTE_TYPE_INVALID and value_p - to NULL.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

attribute

a string containing the attribute's name

 

type

The type of the attribute

 

value_p

a pointer to the value (or the pointer -itself if the type is a pointer type).

[nullable]

flags

a set of GFileQueryInfoFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the attribute was set, FALSE otherwise.

-
-
-
-
-

g_file_set_attributes_from_info ()

-
gboolean
-g_file_set_attributes_from_info (GFile *file,
-                                 GFileInfo *info,
-                                 GFileQueryInfoFlags flags,
-                                 GCancellable *cancellable,
-                                 GError **error);
-

Tries to set all attributes in the GFileInfo on the target -values, not stopping on the first error.

-

If there is any error during this operation then error - will -be set to the first error. Error on particular fields are flagged -by setting the "status" field in the attribute value to -G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can -also detect further errors.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

info

a GFileInfo

 

flags

GFileQueryInfoFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

FALSE if there was any error, TRUE otherwise.

-
-
-
-
-

g_file_set_attributes_async ()

-
void
-g_file_set_attributes_async (GFile *file,
-                             GFileInfo *info,
-                             GFileQueryInfoFlags flags,
-                             int io_priority,
-                             GCancellable *cancellable,
-                             GAsyncReadyCallback callback,
-                             gpointer user_data);
-

Asynchronously sets the attributes of file - with info -.

-

For more details, see g_file_set_attributes_from_info(), -which is the synchronous version of this call.

-

When the operation is finished, callback - will be called. -You can then call g_file_set_attributes_finish() to get -the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

info

a GFileInfo

 

flags

a GFileQueryInfoFlags

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

a gpointer.

[closure]
-
-
-
-
-

g_file_set_attributes_finish ()

-
gboolean
-g_file_set_attributes_finish (GFile *file,
-                              GAsyncResult *result,
-                              GFileInfo **info,
-                              GError **error);
-

Finishes setting an attribute started in g_file_set_attributes_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

result

a GAsyncResult

 

info

a GFileInfo.

[out][transfer full]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the attributes were set correctly, FALSE otherwise.

-
-
-
-
-

g_file_set_attribute_string ()

-
gboolean
-g_file_set_attribute_string (GFile *file,
-                             const char *attribute,
-                             const char *value,
-                             GFileQueryInfoFlags flags,
-                             GCancellable *cancellable,
-                             GError **error);
-

Sets attribute - of type G_FILE_ATTRIBUTE_TYPE_STRING to value -. -If attribute - is of a different type, this operation will fail.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

attribute

a string containing the attribute's name

 

value

a string containing the attribute's value

 

flags

GFileQueryInfoFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the attribute -was successfully set, FALSE otherwise.

-
-
-
-
-

g_file_set_attribute_byte_string ()

-
gboolean
-g_file_set_attribute_byte_string (GFile *file,
-                                  const char *attribute,
-                                  const char *value,
-                                  GFileQueryInfoFlags flags,
-                                  GCancellable *cancellable,
-                                  GError **error);
-

Sets attribute - of type G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to value -. -If attribute - is of a different type, this operation will fail, -returning FALSE.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

attribute

a string containing the attribute's name

 

value

a string containing the attribute's new value

 

flags

a GFileQueryInfoFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the attribute -was successfully set to value -in the file -, FALSE otherwise.

-
-
-
-
-

g_file_set_attribute_uint32 ()

-
gboolean
-g_file_set_attribute_uint32 (GFile *file,
-                             const char *attribute,
-                             guint32 value,
-                             GFileQueryInfoFlags flags,
-                             GCancellable *cancellable,
-                             GError **error);
-

Sets attribute - of type G_FILE_ATTRIBUTE_TYPE_UINT32 to value -. -If attribute - is of a different type, this operation will fail.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

attribute

a string containing the attribute's name

 

value

a guint32 containing the attribute's new value

 

flags

a GFileQueryInfoFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the attribute -was successfully set to value -in the file -, FALSE otherwise.

-
-
-
-
-

g_file_set_attribute_int32 ()

-
gboolean
-g_file_set_attribute_int32 (GFile *file,
-                            const char *attribute,
-                            gint32 value,
-                            GFileQueryInfoFlags flags,
-                            GCancellable *cancellable,
-                            GError **error);
-

Sets attribute - of type G_FILE_ATTRIBUTE_TYPE_INT32 to value -. -If attribute - is of a different type, this operation will fail.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

attribute

a string containing the attribute's name

 

value

a gint32 containing the attribute's new value

 

flags

a GFileQueryInfoFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the attribute -was successfully set to value -in the file -, FALSE otherwise.

-
-
-
-
-

g_file_set_attribute_uint64 ()

-
gboolean
-g_file_set_attribute_uint64 (GFile *file,
-                             const char *attribute,
-                             guint64 value,
-                             GFileQueryInfoFlags flags,
-                             GCancellable *cancellable,
-                             GError **error);
-

Sets attribute - of type G_FILE_ATTRIBUTE_TYPE_UINT64 to value -. -If attribute - is of a different type, this operation will fail.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

attribute

a string containing the attribute's name

 

value

a guint64 containing the attribute's new value

 

flags

a GFileQueryInfoFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the attribute -was successfully set to value -in the file -, FALSE otherwise.

-
-
-
-
-

g_file_set_attribute_int64 ()

-
gboolean
-g_file_set_attribute_int64 (GFile *file,
-                            const char *attribute,
-                            gint64 value,
-                            GFileQueryInfoFlags flags,
-                            GCancellable *cancellable,
-                            GError **error);
-

Sets attribute - of type G_FILE_ATTRIBUTE_TYPE_INT64 to value -. -If attribute - is of a different type, this operation will fail.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

attribute

a string containing the attribute's name

 

value

a guint64 containing the attribute's new value

 

flags

a GFileQueryInfoFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the attribute -was successfully set, FALSE otherwise.

-
-
-
-
-

g_file_mount_mountable ()

-
void
-g_file_mount_mountable (GFile *file,
-                        GMountMountFlags flags,
-                        GMountOperation *mount_operation,
-                        GCancellable *cancellable,
-                        GAsyncReadyCallback callback,
-                        gpointer user_data);
-

Mounts a file of type G_FILE_TYPE_MOUNTABLE. -Using mount_operation -, you can request callbacks when, for instance, -passwords are needed during authentication.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-

When the operation is finished, callback - will be called. -You can then call g_file_mount_mountable_finish() to get -the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

flags

flags affecting the operation

 

mount_operation

a GMountOperation, -or NULL to avoid user interaction.

[nullable]

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied, or NULL.

[scope async][nullable]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_file_mount_mountable_finish ()

-
GFile *
-g_file_mount_mountable_finish (GFile *file,
-                               GAsyncResult *result,
-                               GError **error);
-

Finishes a mount operation. See g_file_mount_mountable() for details.

-

Finish an asynchronous mount operation that was started -with g_file_mount_mountable().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

result

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

a GFile or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_unmount_mountable ()

-
void
-g_file_unmount_mountable (GFile *file,
-                          GMountUnmountFlags flags,
-                          GCancellable *cancellable,
-                          GAsyncReadyCallback callback,
-                          gpointer user_data);
-
-

g_file_unmount_mountable has been deprecated since version 2.22 and should not be used in newly-written code.

-

Use g_file_unmount_mountable_with_operation() instead.

-
-

Unmounts a file of type G_FILE_TYPE_MOUNTABLE.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-

When the operation is finished, callback - will be called. -You can then call g_file_unmount_mountable_finish() to get -the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

flags

flags affecting the operation

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied, or NULL.

[scope async][nullable]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_file_unmount_mountable_finish ()

-
gboolean
-g_file_unmount_mountable_finish (GFile *file,
-                                 GAsyncResult *result,
-                                 GError **error);
-
-

g_file_unmount_mountable_finish has been deprecated since version 2.22 and should not be used in newly-written code.

-

Use g_file_unmount_mountable_with_operation_finish() - instead.

-
-

Finishes an unmount operation, see g_file_unmount_mountable() for details.

-

Finish an asynchronous unmount operation that was started -with g_file_unmount_mountable().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

result

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the operation finished successfully. -FALSE otherwise.

-
-
-
-
-

g_file_unmount_mountable_with_operation ()

-
void
-g_file_unmount_mountable_with_operation
-                               (GFile *file,
-                                GMountUnmountFlags flags,
-                                GMountOperation *mount_operation,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

Unmounts a file of type G_FILE_TYPE_MOUNTABLE.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-

When the operation is finished, callback - will be called. -You can then call g_file_unmount_mountable_finish() to get -the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

flags

flags affecting the operation

 

mount_operation

a GMountOperation, -or NULL to avoid user interaction.

[nullable]

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied, or NULL.

[scope async][nullable]

user_data

the data to pass to callback function.

[closure]
-
-

Since: 2.22

-
-
-
-

g_file_unmount_mountable_with_operation_finish ()

-
gboolean
-g_file_unmount_mountable_with_operation_finish
-                               (GFile *file,
-                                GAsyncResult *result,
-                                GError **error);
-

Finishes an unmount operation, -see g_file_unmount_mountable_with_operation() for details.

-

Finish an asynchronous unmount operation that was started -with g_file_unmount_mountable_with_operation().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

result

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the operation finished successfully. -FALSE otherwise.

-
-

Since: 2.22

-
-
-
-

g_file_eject_mountable ()

-
void
-g_file_eject_mountable (GFile *file,
-                        GMountUnmountFlags flags,
-                        GCancellable *cancellable,
-                        GAsyncReadyCallback callback,
-                        gpointer user_data);
-
-

g_file_eject_mountable has been deprecated since version 2.22 and should not be used in newly-written code.

-

Use g_file_eject_mountable_with_operation() instead.

-
-

Starts an asynchronous eject on a mountable. -When this operation has completed, callback - will be called with -user_user - data, and the operation can be finalized with -g_file_eject_mountable_finish().

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

flags

flags affecting the operation

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied, or NULL.

[scope async][nullable]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_file_eject_mountable_finish ()

-
gboolean
-g_file_eject_mountable_finish (GFile *file,
-                               GAsyncResult *result,
-                               GError **error);
-
-

g_file_eject_mountable_finish has been deprecated since version 2.22 and should not be used in newly-written code.

-

Use g_file_eject_mountable_with_operation_finish() - instead.

-
-

Finishes an asynchronous eject operation started by -g_file_eject_mountable().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

result

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the file -was ejected successfully. -FALSE otherwise.

-
-
-
-
-

g_file_eject_mountable_with_operation ()

-
void
-g_file_eject_mountable_with_operation (GFile *file,
-                                       GMountUnmountFlags flags,
-                                       GMountOperation *mount_operation,
-                                       GCancellable *cancellable,
-                                       GAsyncReadyCallback callback,
-                                       gpointer user_data);
-

Starts an asynchronous eject on a mountable. -When this operation has completed, callback - will be called with -user_user - data, and the operation can be finalized with -g_file_eject_mountable_with_operation_finish().

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

flags

flags affecting the operation

 

mount_operation

a GMountOperation, -or NULL to avoid user interaction.

[nullable]

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied, or NULL.

[scope async][nullable]

user_data

the data to pass to callback function.

[closure]
-
-

Since: 2.22

-
-
-
-

g_file_eject_mountable_with_operation_finish ()

-
gboolean
-g_file_eject_mountable_with_operation_finish
-                               (GFile *file,
-                                GAsyncResult *result,
-                                GError **error);
-

Finishes an asynchronous eject operation started by -g_file_eject_mountable_with_operation().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

result

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the file -was ejected successfully. -FALSE otherwise.

-
-

Since: 2.22

-
-
-
-

g_file_start_mountable ()

-
void
-g_file_start_mountable (GFile *file,
-                        GDriveStartFlags flags,
-                        GMountOperation *start_operation,
-                        GCancellable *cancellable,
-                        GAsyncReadyCallback callback,
-                        gpointer user_data);
-

Starts a file of type G_FILE_TYPE_MOUNTABLE. -Using start_operation -, you can request callbacks when, for instance, -passwords are needed during authentication.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-

When the operation is finished, callback - will be called. -You can then call g_file_mount_mountable_finish() to get -the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

flags

flags affecting the operation

 

start_operation

a GMountOperation, or NULL to avoid user interaction.

[nullable]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call when the request is satisfied, or NULL.

[nullable]

user_data

the data to pass to callback function

 
-
-

Since: 2.22

-
-
-
-

g_file_start_mountable_finish ()

-
gboolean
-g_file_start_mountable_finish (GFile *file,
-                               GAsyncResult *result,
-                               GError **error);
-

Finishes a start operation. See g_file_start_mountable() for details.

-

Finish an asynchronous start operation that was started -with g_file_start_mountable().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

result

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the operation finished successfully. FALSE -otherwise.

-
-

Since: 2.22

-
-
-
-

g_file_stop_mountable ()

-
void
-g_file_stop_mountable (GFile *file,
-                       GMountUnmountFlags flags,
-                       GMountOperation *mount_operation,
-                       GCancellable *cancellable,
-                       GAsyncReadyCallback callback,
-                       gpointer user_data);
-

Stops a file of type G_FILE_TYPE_MOUNTABLE.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-

When the operation is finished, callback - will be called. -You can then call g_file_stop_mountable_finish() to get -the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

flags

flags affecting the operation

 

mount_operation

a GMountOperation, -or NULL to avoid user interaction.

[nullable]

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied, or NULL.

[nullable]

user_data

the data to pass to callback function

 
-
-

Since: 2.22

-
-
-
-

g_file_stop_mountable_finish ()

-
gboolean
-g_file_stop_mountable_finish (GFile *file,
-                              GAsyncResult *result,
-                              GError **error);
-

Finishes an stop operation, see g_file_stop_mountable() for details.

-

Finish an asynchronous stop operation that was started -with g_file_stop_mountable().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

result

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the operation finished successfully. -FALSE otherwise.

-
-

Since: 2.22

-
-
-
-

g_file_poll_mountable ()

-
void
-g_file_poll_mountable (GFile *file,
-                       GCancellable *cancellable,
-                       GAsyncReadyCallback callback,
-                       gpointer user_data);
-

Polls a file of type G_FILE_TYPE_MOUNTABLE.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-

When the operation is finished, callback - will be called. -You can then call g_file_mount_mountable_finish() to get -the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

cancellable

optional GCancellable object, NULL to ignore

 

callback

a GAsyncReadyCallback to call -when the request is satisfied, or NULL.

[nullable]

user_data

the data to pass to callback function

 
-
-

Since: 2.22

-
-
-
-

g_file_poll_mountable_finish ()

-
gboolean
-g_file_poll_mountable_finish (GFile *file,
-                              GAsyncResult *result,
-                              GError **error);
-

Finishes a poll operation. See g_file_poll_mountable() for details.

-

Finish an asynchronous poll operation that was polled -with g_file_poll_mountable().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

result

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the operation finished successfully. FALSE -otherwise.

-
-

Since: 2.22

-
-
-
-

g_file_mount_enclosing_volume ()

-
void
-g_file_mount_enclosing_volume (GFile *location,
-                               GMountMountFlags flags,
-                               GMountOperation *mount_operation,
-                               GCancellable *cancellable,
-                               GAsyncReadyCallback callback,
-                               gpointer user_data);
-

Starts a mount_operation -, mounting the volume that contains -the file location -.

-

When this operation has completed, callback - will be called with -user_user - data, and the operation can be finalized with -g_file_mount_enclosing_volume_finish().

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

location

input GFile

 

flags

flags affecting the operation

 

mount_operation

a GMountOperation -or NULL to avoid user interaction.

[nullable]

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied, or NULL.

[nullable]

user_data

the data to pass to callback function

 
-
-
-
-
-

g_file_mount_enclosing_volume_finish ()

-
gboolean
-g_file_mount_enclosing_volume_finish (GFile *location,
-                                      GAsyncResult *result,
-                                      GError **error);
-

Finishes a mount operation started by g_file_mount_enclosing_volume().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

location

input GFile

 

result

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if successful. If an error has occurred, -this function will return FALSE and set error -appropriately if present.

-
-
-
-
-

g_file_monitor_directory ()

-
GFileMonitor *
-g_file_monitor_directory (GFile *file,
-                          GFileMonitorFlags flags,
-                          GCancellable *cancellable,
-                          GError **error);
-

Obtains a directory monitor for the given file. -This may fail if directory monitoring is not supported.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-

It does not make sense for flags - to contain -G_FILE_MONITOR_WATCH_HARD_LINKS, since hard links can not be made to -directories. It is not possible to monitor all the files in a -directory for changes made via hard links; if you want to do this then -you must register individual watches with g_file_monitor().

-

Virtual: monitor_dir

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

flags

a set of GFileMonitorFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

a GFileMonitor for the given file -, -or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_monitor_file ()

-
GFileMonitor *
-g_file_monitor_file (GFile *file,
-                     GFileMonitorFlags flags,
-                     GCancellable *cancellable,
-                     GError **error);
-

Obtains a file monitor for the given file. If no file notification -mechanism exists, then regular polling of the file is used.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-

If flags - contains G_FILE_MONITOR_WATCH_HARD_LINKS then the monitor -will also attempt to report changes made to the file via another -filename (ie, a hard link). Without this flag, you can only rely on -changes made through the filename contained in file - to be -reported. Using this flag may result in an increase in resource -usage, and may not have any effect depending on the GFileMonitor -backend and/or filesystem type.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

flags

a set of GFileMonitorFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

a GFileMonitor for the given file -, -or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_file_monitor ()

-
GFileMonitor *
-g_file_monitor (GFile *file,
-                GFileMonitorFlags flags,
-                GCancellable *cancellable,
-                GError **error);
-

Obtains a file or directory monitor for the given file, -depending on the type of the file.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

flags

a set of GFileMonitorFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

a GFileMonitor for the given file -, -or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.18

-
-
-
-

g_file_load_contents ()

-
gboolean
-g_file_load_contents (GFile *file,
-                      GCancellable *cancellable,
-                      char **contents,
-                      gsize *length,
-                      char **etag_out,
-                      GError **error);
-

Loads the content of the file into memory. The data is always -zero-terminated, but this is not included in the resultant length -. -The returned content - should be freed with g_free() when no longer -needed.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

cancellable

optional GCancellable object, NULL to ignore

 

contents

a location to place the contents of the file.

[out][transfer full][element-type guint8][array length=length]

length

a location to place the length of the contents of the file, -or NULL if the length is not needed.

[out][optional]

etag_out

a location to place the current entity tag for the file, -or NULL if the entity tag is not needed.

[out][optional]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the file -'s contents were successfully loaded. -FALSE if there were errors.

-
-
-
-
-

g_file_load_contents_async ()

-
void
-g_file_load_contents_async (GFile *file,
-                            GCancellable *cancellable,
-                            GAsyncReadyCallback callback,
-                            gpointer user_data);
-

Starts an asynchronous load of the file -'s contents.

-

For more details, see g_file_load_contents() which is -the synchronous version of this call.

-

When the load operation has completed, callback - will be called -with user - data. To finish the operation, call -g_file_load_contents_finish() with the GAsyncResult returned by -the callback -.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

cancellable

optional GCancellable object, NULL to ignore

 

callback

a GAsyncReadyCallback to call when the request is satisfied

 

user_data

the data to pass to callback function

 
-
-
-
-
-

g_file_load_contents_finish ()

-
gboolean
-g_file_load_contents_finish (GFile *file,
-                             GAsyncResult *res,
-                             char **contents,
-                             gsize *length,
-                             char **etag_out,
-                             GError **error);
-

Finishes an asynchronous load of the file -'s contents. -The contents are placed in contents -, and length - is set to the -size of the contents - string. The content - should be freed with -g_free() when no longer needed. If etag_out - is present, it will be -set to the new entity tag for the file -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

res

a GAsyncResult

 

contents

a location to place the contents of the file.

[out][transfer full][element-type guint8][array length=length]

length

a location to place the length of the contents of the file, -or NULL if the length is not needed.

[out][optional]

etag_out

a location to place the current entity tag for the file, -or NULL if the entity tag is not needed.

[out][optional]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the load was successful. If FALSE and error -is -present, it will be set appropriately.

-
-
-
-
-

g_file_load_partial_contents_async ()

-
void
-g_file_load_partial_contents_async (GFile *file,
-                                    GCancellable *cancellable,
-                                    GFileReadMoreCallback read_more_callback,
-                                    GAsyncReadyCallback callback,
-                                    gpointer user_data);
-

Reads the partial contents of a file. A GFileReadMoreCallback should -be used to stop reading from the file when appropriate, else this -function will behave exactly as g_file_load_contents_async(). This -operation can be finished by g_file_load_partial_contents_finish().

-

Users of this function should be aware that user_data - is passed to -both the read_more_callback - and the callback -.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

cancellable

optional GCancellable object, NULL to ignore

 

read_more_callback

a GFileReadMoreCallback to receive partial data -and to specify whether further data should be read

 

callback

a GAsyncReadyCallback to call when the request is satisfied

 

user_data

the data to pass to the callback functions

 
-
-
-
-
-

g_file_load_partial_contents_finish ()

-
gboolean
-g_file_load_partial_contents_finish (GFile *file,
-                                     GAsyncResult *res,
-                                     char **contents,
-                                     gsize *length,
-                                     char **etag_out,
-                                     GError **error);
-

Finishes an asynchronous partial load operation that was started -with g_file_load_partial_contents_async(). The data is always -zero-terminated, but this is not included in the resultant length -. -The returned content - should be freed with g_free() when no longer -needed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

res

a GAsyncResult

 

contents

a location to place the contents of the file.

[out][transfer full][element-type guint8][array length=length]

length

a location to place the length of the contents of the file, -or NULL if the length is not needed.

[out][optional]

etag_out

a location to place the current entity tag for the file, -or NULL if the entity tag is not needed.

[out][optional]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the load was successful. If FALSE and error -is -present, it will be set appropriately.

-
-
-
-
-

g_file_replace_contents ()

-
gboolean
-g_file_replace_contents (GFile *file,
-                         const char *contents,
-                         gsize length,
-                         const char *etag,
-                         gboolean make_backup,
-                         GFileCreateFlags flags,
-                         char **new_etag,
-                         GCancellable *cancellable,
-                         GError **error);
-

Replaces the contents of file - with contents - of length - bytes.

-

If etag - is specified (not NULL), any existing file must have that etag, -or the error G_IO_ERROR_WRONG_ETAG will be returned.

-

If make_backup - is TRUE, this function will attempt to make a backup -of file -. Internally, it uses g_file_replace(), so will try to replace the -file contents in the safest way possible. For example, atomic renames are -used when replacing local files’ contents.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-

The returned new_etag - can be used to verify that the file hasn't -changed the next time it is saved over.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

contents

a string containing the new contents for file -.

[element-type guint8][array length=length]

length

the length of contents -in bytes

 

etag

the old entity-tag for the document, -or NULL.

[nullable]

make_backup

TRUE if a backup should be created

 

flags

a set of GFileCreateFlags

 

new_etag

a location to a new entity tag -for the document. This should be freed with g_free() when no longer -needed, or NULL.

[out][optional]

cancellable

optional GCancellable object, NULL to ignore

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if successful. If an error has occurred, this function -will return FALSE and set error -appropriately if present.

-
-
-
-
-

g_file_replace_contents_async ()

-
void
-g_file_replace_contents_async (GFile *file,
-                               const char *contents,
-                               gsize length,
-                               const char *etag,
-                               gboolean make_backup,
-                               GFileCreateFlags flags,
-                               GCancellable *cancellable,
-                               GAsyncReadyCallback callback,
-                               gpointer user_data);
-

Starts an asynchronous replacement of file - with the given -contents - of length - bytes. etag - will replace the document's -current entity tag.

-

When this operation has completed, callback - will be called with -user_user - data, and the operation can be finalized with -g_file_replace_contents_finish().

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-

If make_backup - is TRUE, this function will attempt to -make a backup of file -.

-

Note that no copy of content - will be made, so it must stay valid -until callback - is called. See g_file_replace_contents_bytes_async() -for a GBytes version that will automatically hold a reference to the -contents (without copying) for the duration of the call.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

contents

string of contents to replace the file with.

[element-type guint8][array length=length]

length

the length of contents -in bytes

 

etag

a new entity tag for the file -, or NULL.

[nullable]

make_backup

TRUE if a backup should be created

 

flags

a set of GFileCreateFlags

 

cancellable

optional GCancellable object, NULL to ignore

 

callback

a GAsyncReadyCallback to call when the request is satisfied

 

user_data

the data to pass to callback function

 
-
-
-
-
-

g_file_replace_contents_bytes_async ()

-
void
-g_file_replace_contents_bytes_async (GFile *file,
-                                     GBytes *contents,
-                                     const char *etag,
-                                     gboolean make_backup,
-                                     GFileCreateFlags flags,
-                                     GCancellable *cancellable,
-                                     GAsyncReadyCallback callback,
-                                     gpointer user_data);
-

Same as g_file_replace_contents_async() but takes a GBytes input instead. -This function will keep a ref on contents - until the operation is done. -Unlike g_file_replace_contents_async() this allows forgetting about the -content without waiting for the callback.

-

When this operation has completed, callback - will be called with -user_user - data, and the operation can be finalized with -g_file_replace_contents_finish().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

contents

a GBytes

 

etag

a new entity tag for the file -, or NULL.

[nullable]

make_backup

TRUE if a backup should be created

 

flags

a set of GFileCreateFlags

 

cancellable

optional GCancellable object, NULL to ignore

 

callback

a GAsyncReadyCallback to call when the request is satisfied

 

user_data

the data to pass to callback function

 
-
-

Since: 2.40

-
-
-
-

g_file_replace_contents_finish ()

-
gboolean
-g_file_replace_contents_finish (GFile *file,
-                                GAsyncResult *res,
-                                char **new_etag,
-                                GError **error);
-

Finishes an asynchronous replace of the given file -. See -g_file_replace_contents_async(). Sets new_etag - to the new entity -tag for the document, if present.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

res

a GAsyncResult

 

new_etag

a location of a new entity tag -for the document. This should be freed with g_free() when it is no -longer needed, or NULL.

[out][optional]

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE on success, FALSE on failure.

-
-
-
-
-

g_file_copy_attributes ()

-
gboolean
-g_file_copy_attributes (GFile *source,
-                        GFile *destination,
-                        GFileCopyFlags flags,
-                        GCancellable *cancellable,
-                        GError **error);
-

Copies the file attributes from source - to destination -.

-

Normally only a subset of the file attributes are copied, -those that are copies in a normal file copy operation -(which for instance does not include e.g. owner). However -if G_FILE_COPY_ALL_METADATA is specified in flags -, then -all the metadata that is possible to copy is copied. This -is useful when implementing move by copy + delete source.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

source

a GFile with attributes

 

destination

a GFile to copy attributes to

 

flags

a set of GFileCopyFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

a GError, NULL to ignore

 
-
-
-

Returns

-

TRUE if the attributes were copied successfully, -FALSE otherwise.

-
-
-
-
-

g_file_create_readwrite ()

-
GFileIOStream *
-g_file_create_readwrite (GFile *file,
-                         GFileCreateFlags flags,
-                         GCancellable *cancellable,
-                         GError **error);
-

Creates a new file and returns a stream for reading and -writing to it. The file must not already exist.

-

By default files created are generally readable by everyone, -but if you pass G_FILE_CREATE_PRIVATE in flags - the file -will be made readable only to the current user, to the level -that is supported on the target filesystem.

-

If cancellable - is not NULL, then the operation can be cancelled -by triggering the cancellable object from another thread. If the -operation was cancelled, the error G_IO_ERROR_CANCELLED will be -returned.

-

If a file or directory with this name already exists, the -G_IO_ERROR_EXISTS error will be returned. Some file systems don't -allow all file names, and may return an G_IO_ERROR_INVALID_FILENAME -error, and if the name is too long, G_IO_ERROR_FILENAME_TOO_LONG -will be returned. Other errors are possible too, and depend on what -kind of filesystem the file is on.

-

Note that in many non-local file cases read and write streams are -not supported, so make sure you really need to do read and write -streaming, rather than just opening for reading or writing.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

file

a GFile

 

flags

a set of GFileCreateFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a GFileIOStream for the newly created -file, or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_file_create_readwrite_async ()

-
void
-g_file_create_readwrite_async (GFile *file,
-                               GFileCreateFlags flags,
-                               int io_priority,
-                               GCancellable *cancellable,
-                               GAsyncReadyCallback callback,
-                               gpointer user_data);
-

Asynchronously creates a new file and returns a stream -for reading and writing to it. The file must not already exist.

-

For more details, see g_file_create_readwrite() which is -the synchronous version of this call.

-

When the operation is finished, callback - will be called. -You can then call g_file_create_readwrite_finish() to get -the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

flags

a set of GFileCreateFlags

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-

Since: 2.22

-
-
-
-

g_file_create_readwrite_finish ()

-
GFileIOStream *
-g_file_create_readwrite_finish (GFile *file,
-                                GAsyncResult *res,
-                                GError **error);
-

Finishes an asynchronous file create operation started with -g_file_create_readwrite_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

res

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

a GFileIOStream or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_file_open_readwrite ()

-
GFileIOStream *
-g_file_open_readwrite (GFile *file,
-                       GCancellable *cancellable,
-                       GError **error);
-

Opens an existing file for reading and writing. The result is -a GFileIOStream that can be used to read and write the contents -of the file.

-

If cancellable - is not NULL, then the operation can be cancelled -by triggering the cancellable object from another thread. If the -operation was cancelled, the error G_IO_ERROR_CANCELLED will be -returned.

-

If the file does not exist, the G_IO_ERROR_NOT_FOUND error will -be returned. If the file is a directory, the G_IO_ERROR_IS_DIRECTORY -error will be returned. Other errors are possible too, and depend on -what kind of filesystem the file is on. Note that in many non-local -file cases read and write streams are not supported, so make sure you -really need to do read and write streaming, rather than just opening -for reading or writing.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

GFile to open

 

cancellable

a GCancellable.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

GFileIOStream or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_file_open_readwrite_async ()

-
void
-g_file_open_readwrite_async (GFile *file,
-                             int io_priority,
-                             GCancellable *cancellable,
-                             GAsyncReadyCallback callback,
-                             gpointer user_data);
-

Asynchronously opens file - for reading and writing.

-

For more details, see g_file_open_readwrite() which is -the synchronous version of this call.

-

When the operation is finished, callback - will be called. -You can then call g_file_open_readwrite_finish() to get -the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-

Since: 2.22

-
-
-
-

g_file_open_readwrite_finish ()

-
GFileIOStream *
-g_file_open_readwrite_finish (GFile *file,
-                              GAsyncResult *res,
-                              GError **error);
-

Finishes an asynchronous file read operation started with -g_file_open_readwrite_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

res

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

a GFileIOStream or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_file_replace_readwrite ()

-
GFileIOStream *
-g_file_replace_readwrite (GFile *file,
-                          const char *etag,
-                          gboolean make_backup,
-                          GFileCreateFlags flags,
-                          GCancellable *cancellable,
-                          GError **error);
-

Returns an output stream for overwriting the file in readwrite mode, -possibly creating a backup copy of the file first. If the file doesn't -exist, it will be created.

-

For details about the behaviour, see g_file_replace() which does the -same thing but returns an output stream only.

-

Note that in many non-local file cases read and write streams are not -supported, so make sure you really need to do read and write streaming, -rather than just opening for reading or writing.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

a GFile

 

etag

an optional entity tag -for the current GFile, or NULL to ignore.

[nullable]

make_backup

TRUE if a backup should be created

 

flags

a set of GFileCreateFlags

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a GFileIOStream or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_file_replace_readwrite_async ()

-
void
-g_file_replace_readwrite_async (GFile *file,
-                                const char *etag,
-                                gboolean make_backup,
-                                GFileCreateFlags flags,
-                                int io_priority,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

Asynchronously overwrites the file in read-write mode, -replacing the contents, possibly creating a backup copy -of the file first.

-

For more details, see g_file_replace_readwrite() which is -the synchronous version of this call.

-

When the operation is finished, callback - will be called. -You can then call g_file_replace_readwrite_finish() to get -the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

file

input GFile

 

etag

an entity tag for the current GFile, -or NULL to ignore.

[nullable]

make_backup

TRUE if a backup should be created

 

flags

a set of GFileCreateFlags

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, -NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call -when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-

Since: 2.22

-
-
-
-

g_file_replace_readwrite_finish ()

-
GFileIOStream *
-g_file_replace_readwrite_finish (GFile *file,
-                                 GAsyncResult *res,
-                                 GError **error);
-

Finishes an asynchronous file replace operation started with -g_file_replace_readwrite_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

input GFile

 

res

a GAsyncResult

 

error

a GError, or NULL

 
-
-
-

Returns

-

a GFileIOStream, or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_file_supports_thread_contexts ()

-
gboolean
-g_file_supports_thread_contexts (GFile *file);
-

Checks if file - supports -thread-default contexts. -If this returns FALSE, you cannot perform asynchronous operations on -file - in a thread that has a thread-default context.

-
-

Parameters

-
----- - - - - - -

file

a GFile

 
-
-
-

Returns

-

Whether or not file -supports thread-default contexts.

-
-

Since: 2.22

-
-
-
-

Types and Values

-
-

GFile

-
typedef struct _GFile GFile;
-

A handle to an object implementing the GFileIface interface. -Generally stores a location within the file system. Handles do not -necessarily represent files or directories that currently exist.

-
-
-
-

struct GFileIface

-
struct GFileIface {
-  GTypeInterface g_iface;
-
-  /* Virtual Table */
-
-  GFile *             (* dup)                         (GFile         *file);
-  guint               (* hash)                        (GFile         *file);
-  gboolean            (* equal)                       (GFile         *file1,
-                                                       GFile         *file2);
-  gboolean            (* is_native)                   (GFile         *file);
-  gboolean            (* has_uri_scheme)              (GFile         *file,
-                                                       const char    *uri_scheme);
-  char *              (* get_uri_scheme)              (GFile         *file);
-  char *              (* get_basename)                (GFile         *file);
-  char *              (* get_path)                    (GFile         *file);
-  char *              (* get_uri)                     (GFile         *file);
-  char *              (* get_parse_name)              (GFile         *file);
-  GFile *             (* get_parent)                  (GFile         *file);
-  gboolean            (* prefix_matches)              (GFile         *prefix,
-                                                       GFile         *file);
-  char *              (* get_relative_path)           (GFile         *parent,
-                                                       GFile         *descendant);
-  GFile *             (* resolve_relative_path)       (GFile        *file,
-                                                       const char   *relative_path);
-  GFile *             (* get_child_for_display_name)  (GFile        *file,
-                                                       const char   *display_name,
-                                                       GError      **error);
-
-  GFileEnumerator *   (* enumerate_children)          (GFile                *file,
-                                                       const char           *attributes,
-                                                       GFileQueryInfoFlags   flags,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* enumerate_children_async)    (GFile                *file,
-                                                       const char           *attributes,
-                                                       GFileQueryInfoFlags   flags,
-                                                       int                   io_priority,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  GFileEnumerator *   (* enumerate_children_finish)   (GFile                *file,
-                                                       GAsyncResult         *res,
-                                                       GError              **error);
-
-  GFileInfo *         (* query_info)                  (GFile                *file,
-                                                       const char           *attributes,
-                                                       GFileQueryInfoFlags   flags,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* query_info_async)            (GFile                *file,
-                                                       const char           *attributes,
-                                                       GFileQueryInfoFlags   flags,
-                                                       int                   io_priority,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  GFileInfo *         (* query_info_finish)           (GFile                *file,
-                                                       GAsyncResult         *res,
-                                                       GError              **error);
-
-  GFileInfo *         (* query_filesystem_info)       (GFile                *file,
-                                                       const char           *attributes,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* query_filesystem_info_async) (GFile                *file,
-                                                       const char           *attributes,
-                                                       int                   io_priority,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  GFileInfo *         (* query_filesystem_info_finish)(GFile                *file,
-                                                       GAsyncResult         *res,
-                                                       GError              **error);
-
-  GMount *            (* find_enclosing_mount)        (GFile                *file,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* find_enclosing_mount_async)  (GFile                *file,
-                                                       int                   io_priority,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  GMount *            (* find_enclosing_mount_finish) (GFile                *file,
-                                                       GAsyncResult         *res,
-                                                       GError              **error);
-
-  GFile *             (* set_display_name)            (GFile                *file,
-                                                       const char           *display_name,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* set_display_name_async)      (GFile                *file,
-                                                       const char           *display_name,
-                                                       int                   io_priority,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  GFile *             (* set_display_name_finish)     (GFile                *file,
-                                                       GAsyncResult         *res,
-                                                       GError              **error);
-
-  GFileAttributeInfoList * (* query_settable_attributes)    (GFile          *file,
-                                                             GCancellable   *cancellable,
-                                                             GError        **error);
-  void                (* _query_settable_attributes_async)  (void);
-  void                (* _query_settable_attributes_finish) (void);
-
-  GFileAttributeInfoList * (* query_writable_namespaces)    (GFile          *file,
-                                                             GCancellable   *cancellable,
-                                                             GError        **error);
-  void                (* _query_writable_namespaces_async)  (void);
-  void                (* _query_writable_namespaces_finish) (void);
-
-  gboolean            (* set_attribute)               (GFile                *file,
-                                                       const char           *attribute,
-                                                       GFileAttributeType    type,
-                                                       gpointer              value_p,
-                                                       GFileQueryInfoFlags   flags,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  gboolean            (* set_attributes_from_info)    (GFile                *file,
-                                                       GFileInfo            *info,
-                                                       GFileQueryInfoFlags   flags,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* set_attributes_async)        (GFile                *file,
-                                                       GFileInfo            *info,
-                                                       GFileQueryInfoFlags   flags,
-                                                       int                   io_priority,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  gboolean            (* set_attributes_finish)       (GFile                *file,
-                                                       GAsyncResult         *result,
-                                                       GFileInfo           **info,
-                                                       GError              **error);
-
-  GFileInputStream *  (* read_fn)                     (GFile                *file,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* read_async)                  (GFile                *file,
-                                                       int                   io_priority,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  GFileInputStream *  (* read_finish)                 (GFile                *file,
-                                                       GAsyncResult         *res,
-                                                       GError              **error);
-
-  GFileOutputStream * (* append_to)                   (GFile                *file,
-                                                       GFileCreateFlags      flags,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* append_to_async)             (GFile                *file,
-                                                       GFileCreateFlags      flags,
-                                                       int                   io_priority,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  GFileOutputStream * (* append_to_finish)            (GFile                *file,
-                                                       GAsyncResult         *res,
-                                                       GError              **error);
-
-  GFileOutputStream * (* create)                      (GFile                *file,
-                                                       GFileCreateFlags      flags,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* create_async)                (GFile                *file,
-                                                       GFileCreateFlags      flags,
-                                                       int                   io_priority,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  GFileOutputStream * (* create_finish)               (GFile                *file,
-                                                       GAsyncResult         *res,
-                                                       GError              **error);
-
-  GFileOutputStream * (* replace)                     (GFile                *file,
-                                                       const char           *etag,
-                                                       gboolean              make_backup,
-                                                       GFileCreateFlags      flags,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* replace_async)               (GFile                *file,
-                                                       const char           *etag,
-                                                       gboolean              make_backup,
-                                                       GFileCreateFlags      flags,
-                                                       int                   io_priority,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  GFileOutputStream * (* replace_finish)              (GFile                *file,
-                                                       GAsyncResult         *res,
-                                                       GError              **error);
-
-  gboolean            (* delete_file)                 (GFile                *file,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* delete_file_async)           (GFile                *file,
-						       int                   io_priority,
-						       GCancellable         *cancellable,
-						       GAsyncReadyCallback   callback,
-						       gpointer              user_data);
-  gboolean            (* delete_file_finish)          (GFile                *file,
-						       GAsyncResult         *result,
-						       GError              **error);
-
-  gboolean            (* trash)                       (GFile                *file,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* trash_async)                 (GFile                *file,
-						       int                   io_priority,
-						       GCancellable         *cancellable,
-						       GAsyncReadyCallback   callback,
-						       gpointer              user_data);
-  gboolean            (* trash_finish)                (GFile                *file,
-						       GAsyncResult         *result,
-						       GError              **error);
-
-  gboolean            (* make_directory)              (GFile                *file,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* make_directory_async)        (GFile                *file,
-                                                       int                   io_priority,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  gboolean            (* make_directory_finish)       (GFile                *file,
-                                                       GAsyncResult         *result,
-                                                       GError              **error);
-
-  gboolean            (* make_symbolic_link)          (GFile                *file,
-                                                       const char           *symlink_value,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* _make_symbolic_link_async)   (void);
-  void                (* _make_symbolic_link_finish)  (void);
-
-  gboolean            (* copy)                        (GFile                *source,
-                                                       GFile                *destination,
-                                                       GFileCopyFlags        flags,
-                                                       GCancellable         *cancellable,
-                                                       GFileProgressCallback progress_callback,
-                                                       gpointer              progress_callback_data,
-                                                       GError              **error);
-  void                (* copy_async)                  (GFile                *source,
-                                                       GFile                *destination,
-                                                       GFileCopyFlags        flags,
-                                                       int                   io_priority,
-                                                       GCancellable         *cancellable,
-                                                       GFileProgressCallback progress_callback,
-                                                       gpointer              progress_callback_data,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  gboolean            (* copy_finish)                 (GFile                *file,
-                                                       GAsyncResult         *res,
-                                                       GError              **error);
-
-  gboolean            (* move)                        (GFile                *source,
-                                                       GFile                *destination,
-                                                       GFileCopyFlags        flags,
-                                                       GCancellable         *cancellable,
-                                                       GFileProgressCallback progress_callback,
-                                                       gpointer              progress_callback_data,
-                                                       GError              **error);
-  void                (* _move_async)                 (void);
-  void                (* _move_finish)                (void);
-
-  void                (* mount_mountable)             (GFile                *file,
-                                                       GMountMountFlags      flags,
-                                                       GMountOperation      *mount_operation,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  GFile *             (* mount_mountable_finish)      (GFile                *file,
-                                                       GAsyncResult         *result,
-                                                       GError              **error);
-
-  void                (* unmount_mountable)           (GFile                *file,
-                                                       GMountUnmountFlags    flags,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  gboolean            (* unmount_mountable_finish)    (GFile                *file,
-                                                       GAsyncResult         *result,
-                                                       GError              **error);
-
-  void                (* eject_mountable)             (GFile                *file,
-                                                       GMountUnmountFlags    flags,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  gboolean            (* eject_mountable_finish)      (GFile                *file,
-                                                       GAsyncResult         *result,
-                                                       GError              **error);
-
-  void                (* mount_enclosing_volume)      (GFile                *location,
-                                                       GMountMountFlags      flags,
-                                                       GMountOperation      *mount_operation,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  gboolean         (* mount_enclosing_volume_finish)  (GFile                *location,
-                                                       GAsyncResult         *result,
-                                                       GError              **error);
-
-  GFileMonitor *      (* monitor_dir)                 (GFile                *file,
-                                                       GFileMonitorFlags     flags,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  GFileMonitor *      (* monitor_file)                (GFile                *file,
-                                                       GFileMonitorFlags     flags,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-
-  GFileIOStream *     (* open_readwrite)              (GFile                *file,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* open_readwrite_async)        (GFile                *file,
-                                                       int                   io_priority,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  GFileIOStream *     (* open_readwrite_finish)       (GFile                *file,
-                                                       GAsyncResult         *res,
-                                                       GError              **error);
-  GFileIOStream *     (* create_readwrite)            (GFile                *file,
-						       GFileCreateFlags      flags,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* create_readwrite_async)      (GFile                *file,
-						       GFileCreateFlags      flags,
-                                                       int                   io_priority,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  GFileIOStream *     (* create_readwrite_finish)      (GFile                *file,
-                                                       GAsyncResult         *res,
-                                                       GError              **error);
-  GFileIOStream *     (* replace_readwrite)           (GFile                *file,
-                                                       const char           *etag,
-                                                       gboolean              make_backup,
-                                                       GFileCreateFlags      flags,
-                                                       GCancellable         *cancellable,
-                                                       GError              **error);
-  void                (* replace_readwrite_async)     (GFile                *file,
-                                                       const char           *etag,
-                                                       gboolean              make_backup,
-                                                       GFileCreateFlags      flags,
-                                                       int                   io_priority,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  GFileIOStream *     (* replace_readwrite_finish)    (GFile                *file,
-                                                       GAsyncResult         *res,
-                                                       GError              **error);
-
-  void                (* start_mountable)             (GFile                *file,
-                                                       GDriveStartFlags      flags,
-                                                       GMountOperation      *start_operation,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  gboolean            (* start_mountable_finish)      (GFile                *file,
-                                                       GAsyncResult         *result,
-                                                       GError              **error);
-
-  void                (* stop_mountable)              (GFile                *file,
-                                                       GMountUnmountFlags    flags,
-                                                       GMountOperation      *mount_operation,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  gboolean            (* stop_mountable_finish)       (GFile                *file,
-                                                       GAsyncResult         *result,
-                                                       GError              **error);
-
-  gboolean            supports_thread_contexts;
-
-  void                (* unmount_mountable_with_operation) (GFile           *file,
-                                                       GMountUnmountFlags    flags,
-                                                       GMountOperation      *mount_operation,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  gboolean            (* unmount_mountable_with_operation_finish) (GFile    *file,
-                                                       GAsyncResult         *result,
-                                                       GError              **error);
-
-  void                (* eject_mountable_with_operation) (GFile             *file,
-                                                       GMountUnmountFlags    flags,
-                                                       GMountOperation      *mount_operation,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  gboolean            (* eject_mountable_with_operation_finish) (GFile      *file,
-                                                       GAsyncResult         *result,
-                                                       GError              **error);
-
-  void                (* poll_mountable)              (GFile                *file,
-                                                       GCancellable         *cancellable,
-                                                       GAsyncReadyCallback   callback,
-                                                       gpointer              user_data);
-  gboolean            (* poll_mountable_finish)       (GFile                *file,
-                                                       GAsyncResult         *result,
-                                                       GError              **error);
-
-  gboolean            (* measure_disk_usage)          (GFile                         *file,
-                                                       GFileMeasureFlags              flags,
-                                                       GCancellable                  *cancellable,
-                                                       GFileMeasureProgressCallback   progress_callback,
-                                                       gpointer                       progress_data,
-                                                       guint64                       *disk_usage,
-                                                       guint64                       *num_dirs,
-                                                       guint64                       *num_files,
-                                                       GError                       **error);
-  void                (* measure_disk_usage_async)    (GFile                         *file,
-                                                       GFileMeasureFlags              flags,
-                                                       gint                           io_priority,
-                                                       GCancellable                  *cancellable,
-                                                       GFileMeasureProgressCallback   progress_callback,
-                                                       gpointer                       progress_data,
-                                                       GAsyncReadyCallback            callback,
-                                                       gpointer                       user_data);
-  gboolean            (* measure_disk_usage_finish)   (GFile                         *file,
-                                                       GAsyncResult                  *result,
-                                                       guint64                       *disk_usage,
-                                                       guint64                       *num_dirs,
-                                                       guint64                       *num_files,
-                                                       GError                       **error);
-};
-
-

An interface for writing VFS file handles.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

dup ()

Duplicates a GFile.

 

hash ()

Creates a hash of a GFile.

 

equal ()

Checks equality of two given GFiles.

 

is_native ()

Checks to see if a file is native to the system.

 

has_uri_scheme ()

Checks to see if a GFile has a given URI scheme.

 

get_uri_scheme ()

Gets the URI scheme for a GFile.

 

get_basename ()

Gets the basename for a given GFile.

 

get_path ()

Gets the current path within a GFile.

 

get_uri ()

Gets a URI for the path within a GFile.

 

get_parse_name ()

Gets the parsed name for the GFile.

 

get_parent ()

Gets the parent directory for the GFile.

 

prefix_matches ()

Checks whether a GFile contains a specified file.

 

get_relative_path ()

Gets the path for a GFile relative to a given path.

 

resolve_relative_path ()

Resolves a relative path for a GFile to an absolute path.

 

get_child_for_display_name ()

Gets the child GFile for a given display name.

 

enumerate_children ()

Gets a GFileEnumerator with the children of a GFile.

 

enumerate_children_async ()

Asynchronously gets a GFileEnumerator with the children of a GFile.

 

enumerate_children_finish ()

Finishes asynchronously enumerating the children.

 

query_info ()

Gets the GFileInfo for a GFile.

 

query_info_async ()

Asynchronously gets the GFileInfo for a GFile.

 

query_info_finish ()

Finishes an asynchronous query info operation.

 

query_filesystem_info ()

Gets a GFileInfo for the file system GFile is on.

 

query_filesystem_info_async ()

Asynchronously gets a GFileInfo for the file system GFile is on.

 

query_filesystem_info_finish ()

Finishes asynchronously getting the file system info.

 

find_enclosing_mount ()

Gets a GMount for the GFile.

 

find_enclosing_mount_async ()

Asynchronously gets the GMount for a GFile.

 

find_enclosing_mount_finish ()

Finishes asynchronously getting the volume.

 

set_display_name ()

Sets the display name for a GFile.

 

set_display_name_async ()

Asynchronously sets a GFile's display name.

 

set_display_name_finish ()

Finishes asynchronously setting a GFile's display name.

 

query_settable_attributes ()

Returns a list of GFileAttributes that can be set.

 

_query_settable_attributes_async ()

Asynchronously gets a list of GFileAttributes that can be set.

 

_query_settable_attributes_finish ()

Finishes asynchronously querying settable attributes.

 

query_writable_namespaces ()

Returns a list of GFileAttribute namespaces that are writable.

 

_query_writable_namespaces_async ()

Asynchronously gets a list of GFileAttribute namespaces that are writable.

 

_query_writable_namespaces_finish ()

Finishes asynchronously querying the writable namespaces.

 

set_attribute ()

Sets a GFileAttribute.

 

set_attributes_from_info ()

Sets a GFileAttribute with information from a GFileInfo.

 

set_attributes_async ()

Asynchronously sets a file's attributes.

 

set_attributes_finish ()

Finishes setting a file's attributes asynchronously.

 

read_fn ()

Reads a file asynchronously.

 

read_async ()

Asynchronously reads a file.

 

read_finish ()

Finishes asynchronously reading a file.

 

append_to ()

Writes to the end of a file.

 

append_to_async ()

Asynchronously writes to the end of a file.

 

append_to_finish ()

Finishes an asynchronous file append operation.

 

create ()

Creates a new file.

 

create_async ()

Asynchronously creates a file.

 

create_finish ()

Finishes asynchronously creating a file.

 

replace ()

Replaces the contents of a file.

 

replace_async ()

Asynchronously replaces the contents of a file.

 

replace_finish ()

Finishes asynchronously replacing a file.

 

delete_file ()

Deletes a file.

 

delete_file_async ()

Asynchronously deletes a file.

 

delete_file_finish ()

Finishes an asynchronous delete.

 

trash ()

Sends a GFile to the Trash location.

 

trash_async ()

Asynchronously sends a GFile to the Trash location.

 

trash_finish ()

Finishes an asynchronous file trashing operation.

 

make_directory ()

Makes a directory.

 

make_directory_async ()

Asynchronously makes a directory.

 

make_directory_finish ()

Finishes making a directory asynchronously.

 

make_symbolic_link ()

Makes a symbolic link.

 

_make_symbolic_link_async ()

Asynchronously makes a symbolic link

 

_make_symbolic_link_finish ()

Finishes making a symbolic link asynchronously.

 

copy ()

Copies a file.

 

copy_async ()

Asynchronously copies a file.

 

copy_finish ()

Finishes an asynchronous copy operation.

 

move ()

Moves a file.

 

_move_async ()

Asynchronously moves a file.

 

_move_finish ()

Finishes an asynchronous move operation.

 

mount_mountable ()

Mounts a mountable object.

 

mount_mountable_finish ()

Finishes a mounting operation.

 

unmount_mountable ()

Unmounts a mountable object.

 

unmount_mountable_finish ()

Finishes an unmount operation.

 

eject_mountable ()

Ejects a mountable.

 

eject_mountable_finish ()

Finishes an eject operation.

 

mount_enclosing_volume ()

Mounts a specified location.

 

mount_enclosing_volume_finish ()

Finishes mounting a specified location.

 

monitor_dir ()

Creates a GFileMonitor for the location.

 

monitor_file ()

Creates a GFileMonitor for the location.

 

open_readwrite ()

Open file read/write. Since 2.22.

 

open_readwrite_async ()

Asynchronously opens file read/write. Since 2.22.

 

open_readwrite_finish ()

Finishes an asynchronous open read/write. Since 2.22.

 

create_readwrite ()

Creates file read/write. Since 2.22.

 

create_readwrite_async ()

Asynchronously creates file read/write. Since 2.22.

 

create_readwrite_finish ()

Finishes an asynchronous creates read/write. Since 2.22.

 

replace_readwrite ()

Replaces file read/write. Since 2.22.

 

replace_readwrite_async ()

Asynchronously replaces file read/write. Since 2.22.

 

replace_readwrite_finish ()

Finishes an asynchronous replace read/write. Since 2.22.

 

start_mountable ()

Starts a mountable object. Since 2.22.

 

start_mountable_finish ()

Finishes an start operation. Since 2.22.

 

stop_mountable ()

Stops a mountable. Since 2.22.

 

stop_mountable_finish ()

Finishes an stop operation. Since 2.22.

 

gboolean supports_thread_contexts;

a boolean that indicates whether the GFile implementation supports thread-default contexts. Since 2.22.

 

unmount_mountable_with_operation ()

Unmounts a mountable object using a GMountOperation. Since 2.22.

 

unmount_mountable_with_operation_finish ()

Finishes an unmount operation using a GMountOperation. Since 2.22.

 

eject_mountable_with_operation ()

Ejects a mountable object using a GMountOperation. Since 2.22.

 

eject_mountable_with_operation_finish ()

Finishes an eject operation using a GMountOperation. Since 2.22.

 

poll_mountable ()

Polls a mountable object for media changes. Since 2.22.

 

poll_mountable_finish ()

Finishes an poll operation for media changes. Since 2.22.

 

measure_disk_usage ()

Recursively measures the disk usage of file -. Since 2.38

 

measure_disk_usage_async ()

Asynchronously recursively measures the disk usage of file -. Since 2.38

 

measure_disk_usage_finish ()

Finishes an asynchronous recursive measurement of the disk usage of file -. Since 2.38

 
-
-
-
-
-

enum GFileQueryInfoFlags

-

Flags used when querying a GFileInfo.

-
-

Members

-
----- - - - - - - - - - - - - -

G_FILE_QUERY_INFO_NONE

-

No flags set.

-
 

G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS

-

Don't follow symlinks.

-
 
-
-
-
-
-

enum GFileCreateFlags

-

Flags used when an operation may create a file.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_FILE_CREATE_NONE

-

No flags set.

-
 

G_FILE_CREATE_PRIVATE

-

Create a file that can only be - accessed by the current user.

-
 

G_FILE_CREATE_REPLACE_DESTINATION

-

Replace the destination - as if it didn't exist before. Don't try to keep any old - permissions, replace instead of following links. This - is generally useful if you're doing a "copy over" - rather than a "save new version of" replace operation. - You can think of it as "unlink destination" before - writing to it, although the implementation may not - be exactly like that. Since 2.20

-
 
-
-
-
-
-

enum GFileCopyFlags

-

Flags used when copying or moving files.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_FILE_COPY_NONE

-

No flags set.

-
 

G_FILE_COPY_OVERWRITE

-

Overwrite any existing files

-
 

G_FILE_COPY_BACKUP

-

Make a backup of any existing files.

-
 

G_FILE_COPY_NOFOLLOW_SYMLINKS

-

Don't follow symlinks.

-
 

G_FILE_COPY_ALL_METADATA

-

Copy all file metadata instead of just default set used for copy (see GFileInfo).

-
 

G_FILE_COPY_NO_FALLBACK_FOR_MOVE

-

Don't use copy and delete fallback if native move not supported.

-
 

G_FILE_COPY_TARGET_DEFAULT_PERMS

-

Leaves target file with default perms, instead of setting the source file perms.

-
 
-
-
-
-
-

enum GFileMonitorFlags

-

Flags used to set what a GFileMonitor will watch for.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_FILE_MONITOR_NONE

-

No flags set.

-
 

G_FILE_MONITOR_WATCH_MOUNTS

-

Watch for mount events.

-
 

G_FILE_MONITOR_SEND_MOVED

-

Pair DELETED and CREATED events caused - by file renames (moves) and send a single G_FILE_MONITOR_EVENT_MOVED - event instead (NB: not supported on all backends; the default - behaviour -without specifying this flag- is to send single DELETED - and CREATED events). Deprecated since 2.46: use - G_FILE_MONITOR_WATCH_MOVES instead.

-
 

G_FILE_MONITOR_WATCH_HARD_LINKS

-

Watch for changes to the file made - via another hard link. Since 2.36.

-
 

G_FILE_MONITOR_WATCH_MOVES

-

Watch for rename operations on a - monitored directory. This causes G_FILE_MONITOR_EVENT_RENAMED, - G_FILE_MONITOR_EVENT_MOVED_IN and G_FILE_MONITOR_EVENT_MOVED_OUT - events to be emitted when possible. Since: 2.46.

-
 
-
-
-
-
-

enum GFileMeasureFlags

-

Flags that can be used with g_file_measure_disk_usage().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_FILE_MEASURE_NONE

-

No flags set.

-
 

G_FILE_MEASURE_REPORT_ANY_ERROR

-

Report any error encountered - while traversing the directory tree. Normally errors are only - reported for the toplevel file.

-
 

G_FILE_MEASURE_APPARENT_SIZE

-

Tally usage based on apparent file - sizes. Normally, the block-size is used, if available, as this is a - more accurate representation of disk space used. - Compare with du --apparent-size.

-
 

G_FILE_MEASURE_NO_XDEV

-

Do not cross mount point boundaries. - Compare with du -x.

-
 
-
-

Since: 2.38

-
-
-
-

enum GFilesystemPreviewType

-

Indicates a hint from the file system whether files should be -previewed in a file manager. Returned as the value of the key -G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAYS

-

Only preview files if user has explicitly requested it.

-
 

G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL

-

Preview files if user has requested preview of "local" files.

-
 

G_FILESYSTEM_PREVIEW_TYPE_NEVER

-

Never preview files.

-
 
-
-
-
-
-

See Also

-

GFileInfo, GFileEnumerator

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GFileDescriptorBased.html b/docs/reference/gio/html/GFileDescriptorBased.html deleted file mode 100644 index 7f7ba7426..000000000 --- a/docs/reference/gio/html/GFileDescriptorBased.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - -GFileDescriptorBased: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GFileDescriptorBased

-

GFileDescriptorBased — Interface for file descriptor based IO

-
-
-

Functions

-
---- - - - - -
-int - -g_file_descriptor_based_get_fd () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GFileDescriptorBased
structGFileDescriptorBasedIface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GFileDescriptorBased
-
-
-
-

Prerequisites

-

-GFileDescriptorBased requires - GObject.

-
-
-

Known Implementations

-

-GFileDescriptorBased is implemented by - GUnixInputStream and GUnixOutputStream.

-
-
-

Includes

-
#include <gio/gfiledescriptorbased.h>
-
-
-
-

Description

-

GFileDescriptorBased is implemented by streams (implementations of -GInputStream or GOutputStream) that are based on file descriptors.

-

Note that <gio/gfiledescriptorbased.h> belongs to the UNIX-specific -GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config -file when using it.

-
-
-

Functions

-
-

g_file_descriptor_based_get_fd ()

-
int
-g_file_descriptor_based_get_fd (GFileDescriptorBased *fd_based);
-

Gets the underlying file descriptor.

-
-

Parameters

-
----- - - - - - -

fd_based

a GFileDescriptorBased.

 
-
-
-

Returns

-

The file descriptor

-
-

Since: 2.24

-
-
-
-

Types and Values

-
-

GFileDescriptorBased

-
typedef struct _GFileDescriptorBased GFileDescriptorBased;
-

An interface for file descriptor based io objects.

-
-
-
-

struct GFileDescriptorBasedIface

-
struct GFileDescriptorBasedIface {
-  GTypeInterface g_iface;
-
-  /* Virtual Table */
-  int (*get_fd) (GFileDescriptorBased *fd_based);
-};
-
-

An interface for file descriptor based io objects.

-
-

Members

-
----- - - - - - -

get_fd ()

Gets the underlying file descriptor.

 
-
-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GFileEnumerator.html b/docs/reference/gio/html/GFileEnumerator.html deleted file mode 100644 index 8838fe5ba..000000000 --- a/docs/reference/gio/html/GFileEnumerator.html +++ /dev/null @@ -1,824 +0,0 @@ - - - - -GFileEnumerator: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GFileEnumerator

-

GFileEnumerator — Enumerated Files Routines

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -g_file_enumerator_iterate () -
-GFileInfo * - -g_file_enumerator_next_file () -
-gboolean - -g_file_enumerator_close () -
-void - -g_file_enumerator_next_files_async () -
-GList * - -g_file_enumerator_next_files_finish () -
-void - -g_file_enumerator_close_async () -
-gboolean - -g_file_enumerator_close_finish () -
-gboolean - -g_file_enumerator_is_closed () -
-gboolean - -g_file_enumerator_has_pending () -
-void - -g_file_enumerator_set_pending () -
-GFile * - -g_file_enumerator_get_container () -
-GFile * - -g_file_enumerator_get_child () -
-
-
-

Properties

-
----- - - - - - -
-GFile *containerWrite / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GFileEnumerator
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GFileEnumerator
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GFileEnumerator allows you to operate on a set of GFiles, -returning a GFileInfo structure for each file enumerated (e.g. -g_file_enumerate_children() will return a GFileEnumerator for each -of the children within a directory).

-

To get the next file's information from a GFileEnumerator, use -g_file_enumerator_next_file() or its asynchronous version, -g_file_enumerator_next_files_async(). Note that the asynchronous -version will return a list of GFileInfos, whereas the -synchronous will only return the next file in the enumerator.

-

The ordering of returned files is unspecified for non-Unix -platforms; for more information, see g_dir_read_name(). On Unix, -when operating on local files, returned files will be sorted by -inode number. Effectively you can assume that the ordering of -returned files will be stable between successive calls (and -applications) assuming the directory is unchanged.

-

If your application needs a specific ordering, such as by name or -modification time, you will have to implement that in your -application code.

-

To close a GFileEnumerator, use g_file_enumerator_close(), or -its asynchronous version, g_file_enumerator_close_async(). Once -a GFileEnumerator is closed, no further actions may be performed -on it, and it should be freed with g_object_unref().

-
-
-

Functions

-
-

g_file_enumerator_iterate ()

-
gboolean
-g_file_enumerator_iterate (GFileEnumerator *direnum,
-                           GFileInfo **out_info,
-                           GFile **out_child,
-                           GCancellable *cancellable,
-                           GError **error);
-

This is a version of g_file_enumerator_next_file() that's easier to -use correctly from C programs. With g_file_enumerator_next_file(), -the gboolean return value signifies "end of iteration or error", which -requires allocation of a temporary GError.

-

In contrast, with this function, a FALSE return from -g_file_enumerator_iterate() *always* means -"error". End of iteration is signaled by out_info - or out_child - being NULL.

-

Another crucial difference is that the references for out_info - and -out_child - are owned by direnum - (they are cached as hidden -properties). You must not unref them in your own code. This makes -memory management significantly easier for C code in combination -with loops.

-

Finally, this function optionally allows retrieving a GFile as -well.

-

You must specify at least one of out_info - or out_child -.

-

The code pattern for correctly using g_file_enumerator_iterate() from C -is:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
direnum = g_file_enumerate_children (file, ...);
-while (TRUE)
-  {
-    GFileInfo *info;
-    if (!g_file_enumerator_iterate (direnum, &info, NULL, cancellable, error))
-      goto out;
-    if (!info)
-      break;
-    ... do stuff with "info"; do not unref it! ...
-  }
-
-out:
-  g_object_unref (direnum); // Note: frees the last @info
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

direnum

an open GFileEnumerator

 

out_info

Output location for the next GFileInfo, or NULL.

[out][transfer none][optional]

out_child

Output location for the next GFile, or NULL.

[out][transfer none][optional]

cancellable

a GCancellable

 

error

a GError

 
-
-

Since: 2.44

-
-
-
-

g_file_enumerator_next_file ()

-
GFileInfo *
-g_file_enumerator_next_file (GFileEnumerator *enumerator,
-                             GCancellable *cancellable,
-                             GError **error);
-

Returns information for the next file in the enumerated object. -Will block until the information is available. The GFileInfo -returned from this function will contain attributes that match the -attribute string that was passed when the GFileEnumerator was created.

-

See the documentation of GFileEnumerator for information about the -order of returned files.

-

On error, returns NULL and sets error - to the error. If the -enumerator is at the end, NULL will be returned and error - will -be unset.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

enumerator

a GFileEnumerator.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

A GFileInfo or NULL on error -or end of enumerator. Free the returned object with -g_object_unref() when no longer needed.

-

[nullable][transfer full]

-
-
-
-
-

g_file_enumerator_close ()

-
gboolean
-g_file_enumerator_close (GFileEnumerator *enumerator,
-                         GCancellable *cancellable,
-                         GError **error);
-

Releases all resources used by this enumerator, making the -enumerator return G_IO_ERROR_CLOSED on all calls.

-

This will be automatically called when the last reference -is dropped, but you might want to call this function to make -sure resources are released as early as possible.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

enumerator

a GFileEnumerator.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

TRUE on success or FALSE on error.

-
-
-
-
-

g_file_enumerator_next_files_async ()

-
void
-g_file_enumerator_next_files_async (GFileEnumerator *enumerator,
-                                    int num_files,
-                                    int io_priority,
-                                    GCancellable *cancellable,
-                                    GAsyncReadyCallback callback,
-                                    gpointer user_data);
-

Request information for a number of files from the enumerator asynchronously. -When all i/o for the operation is finished the callback - will be called with -the requested information.

-

See the documentation of GFileEnumerator for information about the -order of returned files.

-

The callback can be called with less than num_files - files in case of error -or at the end of the enumerator. In case of a partial error the callback will -be called with any succeeding items and no error, and on the next request the -error will be reported. If a request is cancelled the callback will be called -with G_IO_ERROR_CANCELLED.

-

During an async request no other sync and async calls are allowed, and will -result in G_IO_ERROR_PENDING errors.

-

Any outstanding i/o request with higher priority (lower numerical value) will -be executed before an outstanding request with lower priority. Default -priority is G_PRIORITY_DEFAULT.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

enumerator

a GFileEnumerator.

 

num_files

the number of file info objects to request

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_file_enumerator_next_files_finish ()

-
GList *
-g_file_enumerator_next_files_finish (GFileEnumerator *enumerator,
-                                     GAsyncResult *result,
-                                     GError **error);
-

Finishes the asynchronous operation started with g_file_enumerator_next_files_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

enumerator

a GFileEnumerator.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

a GList of GFileInfos. You must free the list with -g_list_free() and unref the infos with g_object_unref() when you're -done with them.

-

[transfer full][element-type Gio.FileInfo]

-
-
-
-
-

g_file_enumerator_close_async ()

-
void
-g_file_enumerator_close_async (GFileEnumerator *enumerator,
-                               int io_priority,
-                               GCancellable *cancellable,
-                               GAsyncReadyCallback callback,
-                               gpointer user_data);
-

Asynchronously closes the file enumerator.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned in -g_file_enumerator_close_finish().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

enumerator

a GFileEnumerator.

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_file_enumerator_close_finish ()

-
gboolean
-g_file_enumerator_close_finish (GFileEnumerator *enumerator,
-                                GAsyncResult *result,
-                                GError **error);
-

Finishes closing a file enumerator, started from g_file_enumerator_close_async().

-

If the file enumerator was already closed when g_file_enumerator_close_async() -was called, then this function will report G_IO_ERROR_CLOSED in error -, and -return FALSE. If the file enumerator had pending operation when the close -operation was started, then this function will report G_IO_ERROR_PENDING, and -return FALSE. If cancellable - was not NULL, then the operation may have been -cancelled by triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be set, and FALSE will be -returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

enumerator

a GFileEnumerator.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE if the close operation has finished successfully.

-
-
-
-
-

g_file_enumerator_is_closed ()

-
gboolean
-g_file_enumerator_is_closed (GFileEnumerator *enumerator);
-

Checks if the file enumerator has been closed.

-
-

Parameters

-
----- - - - - - -

enumerator

a GFileEnumerator.

 
-
-
-

Returns

-

TRUE if the enumerator -is closed.

-
-
-
-
-

g_file_enumerator_has_pending ()

-
gboolean
-g_file_enumerator_has_pending (GFileEnumerator *enumerator);
-

Checks if the file enumerator has pending operations.

-
-

Parameters

-
----- - - - - - -

enumerator

a GFileEnumerator.

 
-
-
-

Returns

-

TRUE if the enumerator -has pending operations.

-
-
-
-
-

g_file_enumerator_set_pending ()

-
void
-g_file_enumerator_set_pending (GFileEnumerator *enumerator,
-                               gboolean pending);
-

Sets the file enumerator as having pending operations.

-
-

Parameters

-
----- - - - - - - - - - - - - -

enumerator

a GFileEnumerator.

 

pending

a boolean value.

 
-
-
-
-
-

g_file_enumerator_get_container ()

-
GFile *
-g_file_enumerator_get_container (GFileEnumerator *enumerator);
-

Get the GFile container which is being enumerated.

-
-

Parameters

-
----- - - - - - -

enumerator

a GFileEnumerator

 
-
-
-

Returns

-

the GFile which is being enumerated.

-

[transfer none]

-
-

Since: 2.18

-
-
-
-

g_file_enumerator_get_child ()

-
GFile *
-g_file_enumerator_get_child (GFileEnumerator *enumerator,
-                             GFileInfo *info);
-

Return a new GFile which refers to the file named by info - in the source -directory of enumerator -. This function is primarily intended to be used -inside loops with g_file_enumerator_next_file().

-

This is a convenience method that's equivalent to:

-
- - - - - - - -
1
-2
-3
gchar *name = g_file_info_get_name (info);
-GFile *child = g_file_get_child (g_file_enumerator_get_container (enumr),
-                                 name);
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

enumerator

a GFileEnumerator

 

info

a GFileInfo gotten from g_file_enumerator_next_file() -or the async equivalents.

 
-
-
-

Returns

-

a GFile for the GFileInfo passed it.

-

[transfer full]

-
-

Since: 2.36

-
-
-
-

Types and Values

-
-

GFileEnumerator

-
typedef struct _GFileEnumerator GFileEnumerator;
-

A per matched file iterator.

-
-
-
-

Property Details

-
-

The “container” property

-
  “container”                GFile *
-

The container that is being enumerated.

-

Flags: Write / Construct Only

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GFileIOStream.html b/docs/reference/gio/html/GFileIOStream.html deleted file mode 100644 index bcd45b252..000000000 --- a/docs/reference/gio/html/GFileIOStream.html +++ /dev/null @@ -1,350 +0,0 @@ - - - - -GFileIOStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GFileIOStream

-

GFileIOStream — File read and write streaming operations

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
-char * - -g_file_io_stream_get_etag () -
-GFileInfo * - -g_file_io_stream_query_info () -
-void - -g_file_io_stream_query_info_async () -
-GFileInfo * - -g_file_io_stream_query_info_finish () -
-
-
-

Types and Values

-
---- - - - - -
 GFileIOStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GIOStream
-        ╰── GFileIOStream
-
-
-
-

Implemented Interfaces

-

-GFileIOStream implements - GSeekable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GFileIOStream provides io streams that both read and write to the same -file handle.

-

GFileIOStream implements GSeekable, which allows the io -stream to jump to arbitrary positions in the file and to truncate -the file, provided the filesystem of the file supports these -operations.

-

To find the position of a file io stream, use -g_seekable_tell().

-

To find out if a file io stream supports seeking, use g_seekable_can_seek(). -To position a file io stream, use g_seekable_seek(). -To find out if a file io stream supports truncating, use -g_seekable_can_truncate(). To truncate a file io -stream, use g_seekable_truncate().

-

The default implementation of all the GFileIOStream operations -and the implementation of GSeekable just call into the same operations -on the output stream.

-
-
-

Functions

-
-

g_file_io_stream_get_etag ()

-
char *
-g_file_io_stream_get_etag (GFileIOStream *stream);
-

Gets the entity tag for the file when it has been written. -This must be called after the stream has been written -and closed, as the etag can change while writing.

-
-

Parameters

-
----- - - - - - -

stream

a GFileIOStream.

 
-
-
-

Returns

-

the entity tag for the stream.

-
-

Since: 2.22

-
-
-
-

g_file_io_stream_query_info ()

-
GFileInfo *
-g_file_io_stream_query_info (GFileIOStream *stream,
-                             const char *attributes,
-                             GCancellable *cancellable,
-                             GError **error);
-

Queries a file io stream for the given attributes -. -This function blocks while querying the stream. For the asynchronous -version of this function, see g_file_io_stream_query_info_async(). -While the stream is blocked, the stream will set the pending flag -internally, and any other operations on the stream will fail with -G_IO_ERROR_PENDING.

-

Can fail if the stream was already closed (with error - being set to -G_IO_ERROR_CLOSED), the stream has pending operations (with error - being -set to G_IO_ERROR_PENDING), or if querying info is not supported for -the stream's interface (with error - being set to G_IO_ERROR_NOT_SUPPORTED). I -all cases of failure, NULL will be returned.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be set, and NULL will -be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GFileIOStream.

 

attributes

a file attribute query string.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

a GError, NULL to ignore.

 
-
-
-

Returns

-

a GFileInfo for the stream -, or NULL on error.

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_file_io_stream_query_info_async ()

-
void
-g_file_io_stream_query_info_async (GFileIOStream *stream,
-                                   const char *attributes,
-                                   int io_priority,
-                                   GCancellable *cancellable,
-                                   GAsyncReadyCallback callback,
-                                   gpointer user_data);
-

Asynchronously queries the stream - for a GFileInfo. When completed, -callback - will be called with a GAsyncResult which can be used to -finish the operation with g_file_io_stream_query_info_finish().

-

For the synchronous version of this function, see -g_file_io_stream_query_info().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GFileIOStream.

 

attributes

a file attribute query string.

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

callback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-

Since: 2.22

-
-
-
-

g_file_io_stream_query_info_finish ()

-
GFileInfo *
-g_file_io_stream_query_info_finish (GFileIOStream *stream,
-                                    GAsyncResult *result,
-                                    GError **error);
-

Finalizes the asynchronous query started -by g_file_io_stream_query_info_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GFileIOStream.

 

result

a GAsyncResult.

 

error

a GError, NULL to ignore.

 
-
-
-

Returns

-

A GFileInfo for the finished query.

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

Types and Values

-
-

GFileIOStream

-
typedef struct _GFileIOStream GFileIOStream;
-

A subclass of GIOStream for opened files. This adds -a few file-specific operations and seeking and truncating.

-

GFileIOStream implements GSeekable.

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GFileIcon.html b/docs/reference/gio/html/GFileIcon.html deleted file mode 100644 index f71e6a894..000000000 --- a/docs/reference/gio/html/GFileIcon.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - -GFileIcon: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GFileIcon

-

GFileIcon — Icons pointing to an image file

-
-
-

Functions

-
---- - - - - - - - - - - -
-GIcon * - -g_file_icon_new () -
-GFile * - -g_file_icon_get_file () -
-
-
-

Properties

-
----- - - - - - -
-GFile *fileRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GFileIcon
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GFileIcon
-
-
-
-

Implemented Interfaces

-

-GFileIcon implements - GIcon and GLoadableIcon.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GFileIcon specifies an icon by pointing to an image file -to be used as icon.

-
-
-

Functions

-
-

g_file_icon_new ()

-
GIcon *
-g_file_icon_new (GFile *file);
-

Creates a new icon for a file.

-
-

Parameters

-
----- - - - - - -

file

a GFile.

 
-
-
-

Returns

-

a GIcon for the given -file -, or NULL on error.

-

[transfer full][type GFileIcon]

-
-
-
-
-

g_file_icon_get_file ()

-
GFile *
-g_file_icon_get_file (GFileIcon *icon);
-

Gets the GFile associated with the given icon -.

-
-

Parameters

-
----- - - - - - -

icon

a GIcon.

 
-
-
-

Returns

-

a GFile, or NULL.

-

[transfer none]

-
-
-
-
-

Types and Values

-
-

GFileIcon

-
typedef struct _GFileIcon GFileIcon;
-

Gets an icon for a GFile. Implements GLoadableIcon.

-
-
-
-

Property Details

-
-

The “file” property

-
  “file”                     GFile *
-

The file containing the icon.

-

Flags: Read / Write / Construct Only

-
-
-
-

See Also

-

GIcon, GLoadableIcon

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GFileInfo.html b/docs/reference/gio/html/GFileInfo.html deleted file mode 100644 index 39536e29b..000000000 --- a/docs/reference/gio/html/GFileInfo.html +++ /dev/null @@ -1,4274 +0,0 @@ - - - - -GFileInfo: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GFileInfo

-

GFileInfo — File Information and Attributes

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GFileInfo * - -g_file_info_new () -
-GFileInfo * - -g_file_info_dup () -
-void - -g_file_info_copy_into () -
-gboolean - -g_file_info_has_attribute () -
-gboolean - -g_file_info_has_namespace () -
-char ** - -g_file_info_list_attributes () -
-GFileAttributeType - -g_file_info_get_attribute_type () -
-void - -g_file_info_remove_attribute () -
-char * - -g_file_info_get_attribute_as_string () -
-gboolean - -g_file_info_get_attribute_data () -
-GFileAttributeStatus - -g_file_info_get_attribute_status () -
const char * - -g_file_info_get_attribute_string () -
-char ** - -g_file_info_get_attribute_stringv () -
const char * - -g_file_info_get_attribute_byte_string () -
-gboolean - -g_file_info_get_attribute_boolean () -
-guint32 - -g_file_info_get_attribute_uint32 () -
-gint32 - -g_file_info_get_attribute_int32 () -
-guint64 - -g_file_info_get_attribute_uint64 () -
-gint64 - -g_file_info_get_attribute_int64 () -
-GObject * - -g_file_info_get_attribute_object () -
-void - -g_file_info_set_attribute () -
-gboolean - -g_file_info_set_attribute_status () -
-void - -g_file_info_set_attribute_string () -
-void - -g_file_info_set_attribute_stringv () -
-void - -g_file_info_set_attribute_byte_string () -
-void - -g_file_info_set_attribute_boolean () -
-void - -g_file_info_set_attribute_uint32 () -
-void - -g_file_info_set_attribute_int32 () -
-void - -g_file_info_set_attribute_uint64 () -
-void - -g_file_info_set_attribute_int64 () -
-void - -g_file_info_set_attribute_object () -
-void - -g_file_info_clear_status () -
-GFileType - -g_file_info_get_file_type () -
-gboolean - -g_file_info_get_is_hidden () -
-gboolean - -g_file_info_get_is_backup () -
-gboolean - -g_file_info_get_is_symlink () -
const char * - -g_file_info_get_name () -
const char * - -g_file_info_get_display_name () -
const char * - -g_file_info_get_edit_name () -
-GIcon * - -g_file_info_get_icon () -
-GIcon * - -g_file_info_get_symbolic_icon () -
const char * - -g_file_info_get_content_type () -
-goffset - -g_file_info_get_size () -
-void - -g_file_info_get_modification_time () -
const char * - -g_file_info_get_symlink_target () -
const char * - -g_file_info_get_etag () -
-gint32 - -g_file_info_get_sort_order () -
-GDateTime * - -g_file_info_get_deletion_date () -
-void - -g_file_info_set_attribute_mask () -
-void - -g_file_info_unset_attribute_mask () -
-void - -g_file_info_set_file_type () -
-void - -g_file_info_set_is_hidden () -
-void - -g_file_info_set_is_symlink () -
-void - -g_file_info_set_name () -
-void - -g_file_info_set_display_name () -
-void - -g_file_info_set_edit_name () -
-void - -g_file_info_set_icon () -
-void - -g_file_info_set_symbolic_icon () -
-void - -g_file_info_set_content_type () -
-void - -g_file_info_set_size () -
-void - -g_file_info_set_modification_time () -
-void - -g_file_info_set_symlink_target () -
-void - -g_file_info_set_sort_order () -
-GFileAttributeMatcher * - -g_file_attribute_matcher_new () -
-GFileAttributeMatcher * - -g_file_attribute_matcher_ref () -
-GFileAttributeMatcher * - -g_file_attribute_matcher_subtract () -
-void - -g_file_attribute_matcher_unref () -
-gboolean - -g_file_attribute_matcher_matches () -
-gboolean - -g_file_attribute_matcher_matches_only () -
-gboolean - -g_file_attribute_matcher_enumerate_namespace () -
const char * - -g_file_attribute_matcher_enumerate_next () -
-char * - -g_file_attribute_matcher_to_string () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 GFileAttributeMatcher
enumGFileType
 GFileInfo
#defineG_FILE_ATTRIBUTE_STANDARD_TYPE
#defineG_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN
#defineG_FILE_ATTRIBUTE_STANDARD_IS_BACKUP
#defineG_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK
#defineG_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL
#defineG_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE
#defineG_FILE_ATTRIBUTE_STANDARD_NAME
#defineG_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME
#defineG_FILE_ATTRIBUTE_STANDARD_EDIT_NAME
#defineG_FILE_ATTRIBUTE_STANDARD_COPY_NAME
#defineG_FILE_ATTRIBUTE_STANDARD_DESCRIPTION
#defineG_FILE_ATTRIBUTE_STANDARD_ICON
#defineG_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON
#defineG_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE
#defineG_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE
#defineG_FILE_ATTRIBUTE_STANDARD_SIZE
#defineG_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE
#defineG_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET
#defineG_FILE_ATTRIBUTE_STANDARD_TARGET_URI
#defineG_FILE_ATTRIBUTE_STANDARD_SORT_ORDER
#defineG_FILE_ATTRIBUTE_ETAG_VALUE
#defineG_FILE_ATTRIBUTE_ID_FILE
#defineG_FILE_ATTRIBUTE_ID_FILESYSTEM
#defineG_FILE_ATTRIBUTE_ACCESS_CAN_READ
#defineG_FILE_ATTRIBUTE_ACCESS_CAN_WRITE
#defineG_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE
#defineG_FILE_ATTRIBUTE_ACCESS_CAN_DELETE
#defineG_FILE_ATTRIBUTE_ACCESS_CAN_TRASH
#defineG_FILE_ATTRIBUTE_ACCESS_CAN_RENAME
#defineG_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT
#defineG_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT
#defineG_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT
#defineG_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE
#defineG_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE
#defineG_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI
#defineG_FILE_ATTRIBUTE_MOUNTABLE_CAN_START
#defineG_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED
#defineG_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP
#defineG_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE
#defineG_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL
#defineG_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC
#defineG_FILE_ATTRIBUTE_TIME_MODIFIED
#defineG_FILE_ATTRIBUTE_TIME_MODIFIED_USEC
#defineG_FILE_ATTRIBUTE_TIME_ACCESS
#defineG_FILE_ATTRIBUTE_TIME_ACCESS_USEC
#defineG_FILE_ATTRIBUTE_TIME_CHANGED
#defineG_FILE_ATTRIBUTE_TIME_CHANGED_USEC
#defineG_FILE_ATTRIBUTE_TIME_CREATED
#defineG_FILE_ATTRIBUTE_TIME_CREATED_USEC
#defineG_FILE_ATTRIBUTE_UNIX_DEVICE
#defineG_FILE_ATTRIBUTE_UNIX_INODE
#defineG_FILE_ATTRIBUTE_UNIX_MODE
#defineG_FILE_ATTRIBUTE_UNIX_NLINK
#defineG_FILE_ATTRIBUTE_UNIX_UID
#defineG_FILE_ATTRIBUTE_UNIX_GID
#defineG_FILE_ATTRIBUTE_UNIX_RDEV
#defineG_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE
#defineG_FILE_ATTRIBUTE_UNIX_BLOCKS
#defineG_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT
#defineG_FILE_ATTRIBUTE_DOS_IS_ARCHIVE
#defineG_FILE_ATTRIBUTE_DOS_IS_SYSTEM
#defineG_FILE_ATTRIBUTE_OWNER_USER
#defineG_FILE_ATTRIBUTE_OWNER_USER_REAL
#defineG_FILE_ATTRIBUTE_OWNER_GROUP
#defineG_FILE_ATTRIBUTE_THUMBNAIL_PATH
#defineG_FILE_ATTRIBUTE_THUMBNAILING_FAILED
#defineG_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID
#defineG_FILE_ATTRIBUTE_PREVIEW_ICON
#defineG_FILE_ATTRIBUTE_FILESYSTEM_SIZE
#defineG_FILE_ATTRIBUTE_FILESYSTEM_FREE
#defineG_FILE_ATTRIBUTE_FILESYSTEM_USED
#defineG_FILE_ATTRIBUTE_FILESYSTEM_TYPE
#defineG_FILE_ATTRIBUTE_FILESYSTEM_READONLY
#defineG_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW
#defineG_FILE_ATTRIBUTE_FILESYSTEM_REMOTE
#defineG_FILE_ATTRIBUTE_GVFS_BACKEND
#defineG_FILE_ATTRIBUTE_SELINUX_CONTEXT
#defineG_FILE_ATTRIBUTE_TRASH_ITEM_COUNT
#defineG_FILE_ATTRIBUTE_TRASH_ORIG_PATH
#defineG_FILE_ATTRIBUTE_TRASH_DELETION_DATE
#defineG_FILE_ATTRIBUTE_RECENT_MODIFIED
-
-
-

Object Hierarchy

-
    GBoxed
-    ╰── GFileAttributeMatcher
-    GObject
-    ╰── GFileInfo
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Functionality for manipulating basic metadata for files. GFileInfo -implements methods for getting information that all files should -contain, and allows for manipulation of extended attributes.

-

See GFileAttribute for more information on how -GIO handles file attributes.

-

To obtain a GFileInfo for a GFile, use g_file_query_info() (or its -async variant). To obtain a GFileInfo for a file input or output -stream, use g_file_input_stream_query_info() or -g_file_output_stream_query_info() (or their async variants).

-

To change the actual attributes of a file, you should then set the -attribute in the GFileInfo and call g_file_set_attributes_from_info() -or g_file_set_attributes_async() on a GFile.

-

However, not all attributes can be changed in the file. For instance, -the actual size of a file cannot be changed via g_file_info_set_size(). -You may call g_file_query_settable_attributes() and -g_file_query_writable_namespaces() to discover the settable attributes -of a particular file at runtime.

-

GFileAttributeMatcher allows for searching through a GFileInfo for -attributes.

-
-
-

Functions

-
-

g_file_info_new ()

-
GFileInfo *
-g_file_info_new (void);
-

Creates a new file info structure.

-
-

Returns

-

a GFileInfo.

-
-
-
-
-

g_file_info_dup ()

-
GFileInfo *
-g_file_info_dup (GFileInfo *other);
-

Duplicates a file info structure.

-
-

Parameters

-
----- - - - - - -

other

a GFileInfo.

 
-
-
-

Returns

-

a duplicate GFileInfo of other -.

-

[transfer full]

-
-
-
-
-

g_file_info_copy_into ()

-
void
-g_file_info_copy_into (GFileInfo *src_info,
-                       GFileInfo *dest_info);
-

First clears all of the GFileAttribute of dest_info -, -and then copies all of the file attributes from src_info - to dest_info -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

src_info

source to copy attributes from.

 

dest_info

destination to copy attributes to.

 
-
-
-
-
-

g_file_info_has_attribute ()

-
gboolean
-g_file_info_has_attribute (GFileInfo *info,
-                           const char *attribute);
-

Checks if a file info structure has an attribute named attribute -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 
-
-
-

Returns

-

TRUE if Ginfo -has an attribute named attribute -, -FALSE otherwise.

-
-
-
-
-

g_file_info_has_namespace ()

-
gboolean
-g_file_info_has_namespace (GFileInfo *info,
-                           const char *name_space);
-

Checks if a file info structure has an attribute in the -specified name_space -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

name_space

a file attribute namespace.

 
-
-
-

Returns

-

TRUE if Ginfo -has an attribute in name_space -, -FALSE otherwise.

-
-

Since: 2.22

-
-
-
-

g_file_info_list_attributes ()

-
char **
-g_file_info_list_attributes (GFileInfo *info,
-                             const char *name_space);
-

Lists the file info structure's attributes.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

name_space

a file attribute key's namespace, or NULL to list -all attributes.

[nullable]
-
-
-

Returns

-

a -null-terminated array of strings of all of the possible attribute -types for the given name_space -, or NULL on error.

-

[nullable][array zero-terminated=1][transfer full]

-
-
-
-
-

g_file_info_get_attribute_type ()

-
GFileAttributeType
-g_file_info_get_attribute_type (GFileInfo *info,
-                                const char *attribute);
-

Gets the attribute type for an attribute key.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 
-
-
-

Returns

-

a GFileAttributeType for the given attribute -, or -G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set.

-
-
-
-
-

g_file_info_remove_attribute ()

-
void
-g_file_info_remove_attribute (GFileInfo *info,
-                              const char *attribute);
-

Removes all cases of attribute - from info - if it exists.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 
-
-
-
-
-

g_file_info_get_attribute_as_string ()

-
char *
-g_file_info_get_attribute_as_string (GFileInfo *info,
-                                     const char *attribute);
-

Gets the value of a attribute, formated as a string. -This escapes things as needed to make the string valid -utf8.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 
-
-
-

Returns

-

a UTF-8 string associated with the given attribute -. -When you're done with the string it must be freed with g_free().

-
-
-
-
-

g_file_info_get_attribute_data ()

-
gboolean
-g_file_info_get_attribute_data (GFileInfo *info,
-                                const char *attribute,
-                                GFileAttributeType *type,
-                                gpointer *value_pp,
-                                GFileAttributeStatus *status);
-

Gets the attribute type, value and status for an attribute key.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

info

a GFileInfo

 

attribute

a file attribute key

 

type

return location for the attribute type, or NULL.

[out][optional]

value_pp

return location for the -attribute value, or NULL; the attribute value will not be NULL.

[out][optional][not nullable]

status

return location for the attribute status, or NULL.

[out][optional]
-
-
-

Returns

-

TRUE if info -has an attribute named attribute -, -FALSE otherwise.

-

[transfer none]

-
-
-
-
-

g_file_info_get_attribute_status ()

-
GFileAttributeStatus
-g_file_info_get_attribute_status (GFileInfo *info,
-                                  const char *attribute);
-

Gets the attribute status for an attribute key.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo

 

attribute

a file attribute key

 
-
-
-

Returns

-

a GFileAttributeStatus for the given attribute -, or -G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid.

-
-
-
-
-

g_file_info_get_attribute_string ()

-
const char *
-g_file_info_get_attribute_string (GFileInfo *info,
-                                  const char *attribute);
-

Gets the value of a string attribute. If the attribute does -not contain a string, NULL will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 
-
-
-

Returns

-

the contents of the attribute -value as a UTF-8 string, or -NULL otherwise.

-
-
-
-
-

g_file_info_get_attribute_stringv ()

-
char **
-g_file_info_get_attribute_stringv (GFileInfo *info,
-                                   const char *attribute);
-

Gets the value of a stringv attribute. If the attribute does -not contain a stringv, NULL will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 
-
-
-

Returns

-

the contents of the attribute -value as a stringv, or -NULL otherwise. Do not free. These returned strings are UTF-8.

-

[transfer none]

-
-

Since: 2.22

-
-
-
-

g_file_info_get_attribute_byte_string ()

-
const char *
-g_file_info_get_attribute_byte_string (GFileInfo *info,
-                                       const char *attribute);
-

Gets the value of a byte string attribute. If the attribute does -not contain a byte string, NULL will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 
-
-
-

Returns

-

the contents of the attribute -value as a byte string, or -NULL otherwise.

-
-
-
-
-

g_file_info_get_attribute_boolean ()

-
gboolean
-g_file_info_get_attribute_boolean (GFileInfo *info,
-                                   const char *attribute);
-

Gets the value of a boolean attribute. If the attribute does not -contain a boolean value, FALSE will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 
-
-
-

Returns

-

the boolean value contained within the attribute.

-
-
-
-
-

g_file_info_get_attribute_uint32 ()

-
guint32
-g_file_info_get_attribute_uint32 (GFileInfo *info,
-                                  const char *attribute);
-

Gets an unsigned 32-bit integer contained within the attribute. If the -attribute does not contain an unsigned 32-bit integer, or is invalid, -0 will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 
-
-
-

Returns

-

an unsigned 32-bit integer from the attribute.

-
-
-
-
-

g_file_info_get_attribute_int32 ()

-
gint32
-g_file_info_get_attribute_int32 (GFileInfo *info,
-                                 const char *attribute);
-

Gets a signed 32-bit integer contained within the attribute. If the -attribute does not contain a signed 32-bit integer, or is invalid, -0 will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 
-
-
-

Returns

-

a signed 32-bit integer from the attribute.

-
-
-
-
-

g_file_info_get_attribute_uint64 ()

-
guint64
-g_file_info_get_attribute_uint64 (GFileInfo *info,
-                                  const char *attribute);
-

Gets a unsigned 64-bit integer contained within the attribute. If the -attribute does not contain an unsigned 64-bit integer, or is invalid, -0 will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 
-
-
-

Returns

-

a unsigned 64-bit integer from the attribute.

-
-
-
-
-

g_file_info_get_attribute_int64 ()

-
gint64
-g_file_info_get_attribute_int64 (GFileInfo *info,
-                                 const char *attribute);
-

Gets a signed 64-bit integer contained within the attribute. If the -attribute does not contain an signed 64-bit integer, or is invalid, -0 will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 
-
-
-

Returns

-

a signed 64-bit integer from the attribute.

-
-
-
-
-

g_file_info_get_attribute_object ()

-
GObject *
-g_file_info_get_attribute_object (GFileInfo *info,
-                                  const char *attribute);
-

Gets the value of a GObject attribute. If the attribute does -not contain a GObject, NULL will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 
-
-
-

Returns

-

a GObject associated with the given attribute -, or -NULL otherwise.

-

[transfer none]

-
-
-
-
-

g_file_info_set_attribute ()

-
void
-g_file_info_set_attribute (GFileInfo *info,
-                           const char *attribute,
-                           GFileAttributeType type,
-                           gpointer value_p);
-

Sets the attribute - to contain the given value, if possible. To unset the -attribute, use G_ATTRIBUTE_TYPE_INVALID for type -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 

type

a GFileAttributeType

 

value_p

pointer to the value.

[not nullable]
-
-
-
-
-

g_file_info_set_attribute_status ()

-
gboolean
-g_file_info_set_attribute_status (GFileInfo *info,
-                                  const char *attribute,
-                                  GFileAttributeStatus status);
-

Sets the attribute status for an attribute key. This is only -needed by external code that implement g_file_set_attributes_from_info() -or similar functions.

-

The attribute must exist in info - for this to work. Otherwise FALSE -is returned and info - is unchanged.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

a GFileInfo

 

attribute

a file attribute key

 

status

a GFileAttributeStatus

 
-
-
-

Returns

-

TRUE if the status was changed, FALSE if the key was not set.

-
-

Since: 2.22

-
-
-
-

g_file_info_set_attribute_string ()

-
void
-g_file_info_set_attribute_string (GFileInfo *info,
-                                  const char *attribute,
-                                  const char *attr_value);
-

Sets the attribute - to contain the given attr_value -, -if possible.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 

attr_value

a UTF-8 string.

 
-
-
-
-
-

g_file_info_set_attribute_stringv ()

-
void
-g_file_info_set_attribute_stringv (GFileInfo *info,
-                                   const char *attribute,
-                                   char **attr_value);
-

Sets the attribute - to contain the given attr_value -, -if possible.

-

Sinze: 2.22

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key

 

attr_value

a NULL terminated array of UTF-8 strings.

[array][element-type utf8]
-
-
-
-
-

g_file_info_set_attribute_byte_string ()

-
void
-g_file_info_set_attribute_byte_string (GFileInfo *info,
-                                       const char *attribute,
-                                       const char *attr_value);
-

Sets the attribute - to contain the given attr_value -, -if possible.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 

attr_value

a byte string.

 
-
-
-
-
-

g_file_info_set_attribute_boolean ()

-
void
-g_file_info_set_attribute_boolean (GFileInfo *info,
-                                   const char *attribute,
-                                   gboolean attr_value);
-

Sets the attribute - to contain the given attr_value -, -if possible.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 

attr_value

a boolean value.

 
-
-
-
-
-

g_file_info_set_attribute_uint32 ()

-
void
-g_file_info_set_attribute_uint32 (GFileInfo *info,
-                                  const char *attribute,
-                                  guint32 attr_value);
-

Sets the attribute - to contain the given attr_value -, -if possible.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 

attr_value

an unsigned 32-bit integer.

 
-
-
-
-
-

g_file_info_set_attribute_int32 ()

-
void
-g_file_info_set_attribute_int32 (GFileInfo *info,
-                                 const char *attribute,
-                                 gint32 attr_value);
-

Sets the attribute - to contain the given attr_value -, -if possible.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 

attr_value

a signed 32-bit integer

 
-
-
-
-
-

g_file_info_set_attribute_uint64 ()

-
void
-g_file_info_set_attribute_uint64 (GFileInfo *info,
-                                  const char *attribute,
-                                  guint64 attr_value);
-

Sets the attribute - to contain the given attr_value -, -if possible.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 

attr_value

an unsigned 64-bit integer.

 
-
-
-
-
-

g_file_info_set_attribute_int64 ()

-
void
-g_file_info_set_attribute_int64 (GFileInfo *info,
-                                 const char *attribute,
-                                 gint64 attr_value);
-

Sets the attribute - to contain the given attr_value -, -if possible.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

attribute name to set.

 

attr_value

int64 value to set attribute to.

 
-
-
-
-
-

g_file_info_set_attribute_object ()

-
void
-g_file_info_set_attribute_object (GFileInfo *info,
-                                  const char *attribute,
-                                  GObject *attr_value);
-

Sets the attribute - to contain the given attr_value -, -if possible.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

a GFileInfo.

 

attribute

a file attribute key.

 

attr_value

a GObject.

 
-
-
-
-
-

g_file_info_clear_status ()

-
void
-g_file_info_clear_status (GFileInfo *info);
-

Clears the status information from info -.

-
-

Parameters

-
----- - - - - - -

info

a GFileInfo.

 
-
-
-
-
-

g_file_info_get_file_type ()

-
GFileType
-g_file_info_get_file_type (GFileInfo *info);
-

Gets a file's type (whether it is a regular file, symlink, etc). -This is different from the file's content type, see g_file_info_get_content_type().

-
-

Parameters

-
----- - - - - - -

info

a GFileInfo.

 
-
-
-

Returns

-

a GFileType for the given file.

-
-
-
-
-

g_file_info_get_is_hidden ()

-
gboolean
-g_file_info_get_is_hidden (GFileInfo *info);
-

Checks if a file is hidden.

-
-

Parameters

-
----- - - - - - -

info

a GFileInfo.

 
-
-
-

Returns

-

TRUE if the file is a hidden file, FALSE otherwise.

-
-
-
-
-

g_file_info_get_is_backup ()

-
gboolean
-g_file_info_get_is_backup (GFileInfo *info);
-

Checks if a file is a backup file.

-
-

Parameters

-
----- - - - - - -

info

a GFileInfo.

 
-
-
-

Returns

-

TRUE if file is a backup file, FALSE otherwise.

-
-
-
-
-

g_file_info_get_is_symlink ()

-
gboolean
-g_file_info_get_is_symlink (GFileInfo *info);
-

Checks if a file is a symlink.

-
-

Parameters

-
----- - - - - - -

info

a GFileInfo.

 
-
-
-

Returns

-

TRUE if the given info -is a symlink.

-
-
-
-
-

g_file_info_get_name ()

-
const char *
-g_file_info_get_name (GFileInfo *info);
-

Gets the name for a file.

-
-

Parameters

-
----- - - - - - -

info

a GFileInfo.

 
-
-
-

Returns

-

a string containing the file name.

-

[type filename]

-
-
-
-
-

g_file_info_get_display_name ()

-
const char *
-g_file_info_get_display_name (GFileInfo *info);
-

Gets a display name for a file.

-
-

Parameters

-
----- - - - - - -

info

a GFileInfo.

 
-
-
-

Returns

-

a string containing the display name.

-
-
-
-
-

g_file_info_get_edit_name ()

-
const char *
-g_file_info_get_edit_name (GFileInfo *info);
-

Gets the edit name for a file.

-
-

Parameters

-
----- - - - - - -

info

a GFileInfo.

 
-
-
-

Returns

-

a string containing the edit name.

-
-
-
-
-

g_file_info_get_icon ()

-
GIcon *
-g_file_info_get_icon (GFileInfo *info);
-

Gets the icon for a file.

-
-

Parameters

-
----- - - - - - -

info

a GFileInfo.

 
-
-
-

Returns

-

GIcon for the given info -.

-

[transfer none]

-
-
-
-
-

g_file_info_get_symbolic_icon ()

-
GIcon *
-g_file_info_get_symbolic_icon (GFileInfo *info);
-

Gets the symbolic icon for a file.

-
-

Parameters

-
----- - - - - - -

info

a GFileInfo.

 
-
-
-

Returns

-

GIcon for the given info -.

-

[transfer none]

-
-

Since: 2.34

-
-
-
-

g_file_info_get_content_type ()

-
const char *
-g_file_info_get_content_type (GFileInfo *info);
-

Gets the file's content type.

-
-

Parameters

-
----- - - - - - -

info

a GFileInfo.

 
-
-
-

Returns

-

a string containing the file's content type.

-
-
-
-
-

g_file_info_get_size ()

-
goffset
-g_file_info_get_size (GFileInfo *info);
-

Gets the file's size.

-
-

Parameters

-
----- - - - - - -

info

a GFileInfo.

 
-
-
-

Returns

-

a goffset containing the file's size.

-
-
-
-
-

g_file_info_get_modification_time ()

-
void
-g_file_info_get_modification_time (GFileInfo *info,
-                                   GTimeVal *result);
-

Gets the modification time of the current info - and sets it -in result -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

result

a GTimeVal.

[out caller-allocates]
-
-
-
-
-

g_file_info_get_symlink_target ()

-
const char *
-g_file_info_get_symlink_target (GFileInfo *info);
-

Gets the symlink target for a given GFileInfo.

-
-

Parameters

-
----- - - - - - -

info

a GFileInfo.

 
-
-
-

Returns

-

a string containing the symlink target.

-
-
-
-
-

g_file_info_get_etag ()

-
const char *
-g_file_info_get_etag (GFileInfo *info);
-

Gets the entity tag for a given -GFileInfo. See G_FILE_ATTRIBUTE_ETAG_VALUE.

-
-

Parameters

-
----- - - - - - -

info

a GFileInfo.

 
-
-
-

Returns

-

a string containing the value of the "etag:value" attribute.

-
-
-
-
-

g_file_info_get_sort_order ()

-
gint32
-g_file_info_get_sort_order (GFileInfo *info);
-

Gets the value of the sort_order attribute from the GFileInfo. -See G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.

-
-

Parameters

-
----- - - - - - -

info

a GFileInfo.

 
-
-
-

Returns

-

a gint32 containing the value of the "standard::sort_order" attribute.

-
-
-
-
-

g_file_info_get_deletion_date ()

-
GDateTime *
-g_file_info_get_deletion_date (GFileInfo *info);
-

Returns the GDateTime representing the deletion date of the file, as -available in G_FILE_ATTRIBUTE_TRASH_DELETION_DATE. If the -G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, NULL is returned.

-
-

Parameters

-
----- - - - - - -

info

a GFileInfo.

 
-
-
-

Returns

-

a GDateTime, or NULL.

-
-

Since: 2.36

-
-
-
-

g_file_info_set_attribute_mask ()

-
void
-g_file_info_set_attribute_mask (GFileInfo *info,
-                                GFileAttributeMatcher *mask);
-

Sets mask - on info - to match specific attribute types.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

mask

a GFileAttributeMatcher.

 
-
-
-
-
-

g_file_info_unset_attribute_mask ()

-
void
-g_file_info_unset_attribute_mask (GFileInfo *info);
-

Unsets a mask set by g_file_info_set_attribute_mask(), if one -is set.

-
-

Parameters

-
----- - - - - - -

info

GFileInfo.

 
-
-
-
-
-

g_file_info_set_file_type ()

-
void
-g_file_info_set_file_type (GFileInfo *info,
-                           GFileType type);
-

Sets the file type in a GFileInfo to type -. -See G_FILE_ATTRIBUTE_STANDARD_TYPE.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

type

a GFileType.

 
-
-
-
-
-

g_file_info_set_is_hidden ()

-
void
-g_file_info_set_is_hidden (GFileInfo *info,
-                           gboolean is_hidden);
-

Sets the "is_hidden" attribute in a GFileInfo according to is_hidden -. -See G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

is_hidden

a gboolean.

 
-
-
-
-
-

g_file_info_set_is_symlink ()

-
void
-g_file_info_set_is_symlink (GFileInfo *info,
-                            gboolean is_symlink);
-

Sets the "is_symlink" attribute in a GFileInfo according to is_symlink -. -See G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

is_symlink

a gboolean.

 
-
-
-
-
-

g_file_info_set_name ()

-
void
-g_file_info_set_name (GFileInfo *info,
-                      const char *name);
-

Sets the name attribute for the current GFileInfo. -See G_FILE_ATTRIBUTE_STANDARD_NAME.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

name

a string containing a name.

[type filename]
-
-
-
-
-

g_file_info_set_display_name ()

-
void
-g_file_info_set_display_name (GFileInfo *info,
-                              const char *display_name);
-

Sets the display name for the current GFileInfo. -See G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

display_name

a string containing a display name.

 
-
-
-
-
-

g_file_info_set_edit_name ()

-
void
-g_file_info_set_edit_name (GFileInfo *info,
-                           const char *edit_name);
-

Sets the edit name for the current file. -See G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

edit_name

a string containing an edit name.

 
-
-
-
-
-

g_file_info_set_icon ()

-
void
-g_file_info_set_icon (GFileInfo *info,
-                      GIcon *icon);
-

Sets the icon for a given GFileInfo. -See G_FILE_ATTRIBUTE_STANDARD_ICON.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

icon

a GIcon.

 
-
-
-
-
-

g_file_info_set_symbolic_icon ()

-
void
-g_file_info_set_symbolic_icon (GFileInfo *info,
-                               GIcon *icon);
-

Sets the symbolic icon for a given GFileInfo. -See G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

icon

a GIcon.

 
-
-

Since: 2.34

-
-
-
-

g_file_info_set_content_type ()

-
void
-g_file_info_set_content_type (GFileInfo *info,
-                              const char *content_type);
-

Sets the content type attribute for a given GFileInfo. -See G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

content_type

a content type. See GContentType

 
-
-
-
-
-

g_file_info_set_size ()

-
void
-g_file_info_set_size (GFileInfo *info,
-                      goffset size);
-

Sets the G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info -to the given size.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

size

a goffset containing the file's size.

 
-
-
-
-
-

g_file_info_set_modification_time ()

-
void
-g_file_info_set_modification_time (GFileInfo *info,
-                                   GTimeVal *mtime);
-

Sets the G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file -info to the given time value.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

mtime

a GTimeVal.

 
-
-
-
-
-

g_file_info_set_symlink_target ()

-
void
-g_file_info_set_symlink_target (GFileInfo *info,
-                                const char *symlink_target);
-

Sets the G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info -to the given symlink target.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

symlink_target

a static string containing a path to a symlink target.

 
-
-
-
-
-

g_file_info_set_sort_order ()

-
void
-g_file_info_set_sort_order (GFileInfo *info,
-                            gint32 sort_order);
-

Sets the sort order attribute in the file info structure. See -G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GFileInfo.

 

sort_order

a sort order integer.

 
-
-
-
-
-

g_file_attribute_matcher_new ()

-
GFileAttributeMatcher *
-g_file_attribute_matcher_new (const char *attributes);
-

Creates a new file attribute matcher, which matches attributes -against a given string. GFileAttributeMatchers are reference -counted structures, and are created with a reference count of 1. If -the number of references falls to 0, the GFileAttributeMatcher is -automatically destroyed.

-

The attribute - string should be formatted with specific keys separated -from namespaces with a double colon. Several "namespace::key" strings may be -concatenated with a single comma (e.g. "standard::type,standard::is-hidden"). -The wildcard "*" may be used to match all keys and namespaces, or -"namespace::*" will match all keys in a given namespace.

-
-

Examples of file attribute matcher strings and results

-
    -
  • "*": matches all attributes.

  • -
  • "standard::is-hidden": matches only the key is-hidden in the -standard namespace.

  • -
  • "standard::type,unix::*": matches the type key in the standard -namespace and all keys in the unix namespace.

  • -
-
-
-

Parameters

-
----- - - - - - -

attributes

an attribute string to match.

 
-
-
-

Returns

-

a GFileAttributeMatcher

-
-
-
-
-

g_file_attribute_matcher_ref ()

-
GFileAttributeMatcher *
-g_file_attribute_matcher_ref (GFileAttributeMatcher *matcher);
-

References a file attribute matcher.

-
-

Parameters

-
----- - - - - - -

matcher

a GFileAttributeMatcher.

 
-
-
-

Returns

-

a GFileAttributeMatcher.

-
-
-
-
-

g_file_attribute_matcher_subtract ()

-
GFileAttributeMatcher *
-g_file_attribute_matcher_subtract (GFileAttributeMatcher *matcher,
-                                   GFileAttributeMatcher *subtract);
-

Subtracts all attributes of subtract - from matcher - and returns -a matcher that supports those attributes.

-

Note that currently it is not possible to remove a single -attribute when the matcher - matches the whole namespace - or remove -a namespace or attribute when the matcher matches everything. This -is a limitation of the current implementation, but may be fixed -in the future.

-
-

Parameters

-
----- - - - - - - - - - - - - -

matcher

Matcher to subtract from

 

subtract

The matcher to subtract

 
-
-
-

Returns

-

A file attribute matcher matching all attributes of -matcher -that are not matched by subtract -

-
-
-
-
-

g_file_attribute_matcher_unref ()

-
void
-g_file_attribute_matcher_unref (GFileAttributeMatcher *matcher);
-

Unreferences matcher -. If the reference count falls below 1, -the matcher - is automatically freed.

-
-

Parameters

-
----- - - - - - -

matcher

a GFileAttributeMatcher.

 
-
-
-
-
-

g_file_attribute_matcher_matches ()

-
gboolean
-g_file_attribute_matcher_matches (GFileAttributeMatcher *matcher,
-                                  const char *attribute);
-

Checks if an attribute will be matched by an attribute matcher. If -the matcher was created with the "*" matching string, this function -will always return TRUE.

-
-

Parameters

-
----- - - - - - - - - - - - - -

matcher

a GFileAttributeMatcher.

 

attribute

a file attribute key.

 
-
-
-

Returns

-

TRUE if attribute -matches matcher -. FALSE otherwise.

-
-
-
-
-

g_file_attribute_matcher_matches_only ()

-
gboolean
-g_file_attribute_matcher_matches_only (GFileAttributeMatcher *matcher,
-                                       const char *attribute);
-

Checks if a attribute matcher only matches a given attribute. Always -returns FALSE if "*" was used when creating the matcher.

-
-

Parameters

-
----- - - - - - - - - - - - - -

matcher

a GFileAttributeMatcher.

 

attribute

a file attribute key.

 
-
-
-

Returns

-

TRUE if the matcher only matches attribute -. FALSE otherwise.

-
-
-
-
-

g_file_attribute_matcher_enumerate_namespace ()

-
gboolean
-g_file_attribute_matcher_enumerate_namespace
-                               (GFileAttributeMatcher *matcher,
-                                const char *ns);
-

Checks if the matcher will match all of the keys in a given namespace. -This will always return TRUE if a wildcard character is in use (e.g. if -matcher was created with "standard::*" and ns - is "standard", or if matcher was created -using "*" and namespace is anything.)

-

TODO: this is awkwardly worded.

-
-

Parameters

-
----- - - - - - - - - - - - - -

matcher

a GFileAttributeMatcher.

 

ns

a string containing a file attribute namespace.

 
-
-
-

Returns

-

TRUE if the matcher matches all of the entries -in the given ns -, FALSE otherwise.

-
-
-
-
-

g_file_attribute_matcher_enumerate_next ()

-
const char *
-g_file_attribute_matcher_enumerate_next
-                               (GFileAttributeMatcher *matcher);
-

Gets the next matched attribute from a GFileAttributeMatcher.

-
-

Parameters

-
----- - - - - - -

matcher

a GFileAttributeMatcher.

 
-
-
-

Returns

-

a string containing the next attribute or NULL if -no more attribute exist.

-
-
-
-
-

g_file_attribute_matcher_to_string ()

-
char *
-g_file_attribute_matcher_to_string (GFileAttributeMatcher *matcher);
-

Prints what the matcher is matching against. The format will be -equal to the format passed to g_file_attribute_matcher_new(). -The output however, might not be identical, as the matcher may -decide to use a different order or omit needless parts.

-
-

Parameters

-
----- - - - - - -

matcher

a GFileAttributeMatcher.

[nullable]
-
-
-

Returns

-

a string describing the attributes the matcher matches -against or NULL if matcher -was NULL.

-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

GFileAttributeMatcher

-
typedef struct _GFileAttributeMatcher GFileAttributeMatcher;
-

Determines if a string matches a file attribute.

-
-
-
-

enum GFileType

-

Indicates the file's on-disk type.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_FILE_TYPE_UNKNOWN

-

File's type is unknown.

-
 

G_FILE_TYPE_REGULAR

-

File handle represents a regular file.

-
 

G_FILE_TYPE_DIRECTORY

-

File handle represents a directory.

-
 

G_FILE_TYPE_SYMBOLIC_LINK

-

File handle represents a symbolic link - (Unix systems).

-
 

G_FILE_TYPE_SPECIAL

-

File is a "special" file, such as a socket, fifo, - block device, or character device.

-
 

G_FILE_TYPE_SHORTCUT

-

File is a shortcut (Windows systems).

-
 

G_FILE_TYPE_MOUNTABLE

-

File is a mountable location.

-
 
-
-
-
-
-

GFileInfo

-
typedef struct _GFileInfo GFileInfo;
-

Stores information about a file system object referenced by a GFile.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_TYPE

-
#define G_FILE_ATTRIBUTE_STANDARD_TYPE "standard::type"                     /* uint32 (GFileType) */
-
-

A key in the "standard" namespace for storing file types. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT32. -The value for this key should contain a GFileType.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN

-
#define G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN "standard::is-hidden"           /* boolean */
-
-

A key in the "standard" namespace for checking if a file is hidden. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP

-
#define G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP "standard::is-backup"           /* boolean */
-
-

A key in the "standard" namespace for checking if a file is a backup file. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK

-
#define G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK "standard::is-symlink"         /* boolean */
-
-

A key in the "standard" namespace for checking if the file is a symlink. -Typically the actual type is something else, if we followed the symlink -to get the type. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL

-
#define G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL "standard::is-virtual"         /* boolean */
-
-

A key in the "standard" namespace for checking if a file is virtual. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE

-
#define G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE "standard::is-volatile"      /* boolean */
-
-

A key in the "standard" namespace for checking if a file is -volatile. This is meant for opaque, non-POSIX-like backends to -indicate that the URI is not persistent. Applications should look -at G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET for the persistent URI.

-

Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-

Since: 2.46

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_NAME

-
#define G_FILE_ATTRIBUTE_STANDARD_NAME "standard::name"                     /* byte string */
-
-

A key in the "standard" namespace for getting the name of the file. -The name is the on-disk filename which may not be in any known encoding, -and can thus not be generally displayed as is. -Use G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the -name in a user interface. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME

-
#define G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME "standard::display-name"     /* string */
-
-

A key in the "standard" namespace for getting the display name of the file. -A display name is guaranteed to be in UTF8 and can thus be displayed in -the UI. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME

-
#define G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME "standard::edit-name"           /* string */
-
-

A key in the "standard" namespace for edit name of the file. -An edit name is similar to the display name, but it is meant to be -used when you want to rename the file in the UI. The display name -might contain information you don't want in the new filename (such as -"(invalid unicode)" if the filename was in an invalid encoding).

-

Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_COPY_NAME

-
#define G_FILE_ATTRIBUTE_STANDARD_COPY_NAME "standard::copy-name"           /* string */
-
-

A key in the "standard" namespace for getting the copy name of the file. -The copy name is an optional version of the name. If available it's always -in UTF8, and corresponds directly to the original filename (only transcoded to -UTF8). This is useful if you want to copy the file to another filesystem that -might have a different encoding. If the filename is not a valid string in the -encoding selected for the filesystem it is in then the copy name will not be set.

-

Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION

-
#define G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION "standard::description"        /* string */
-
-

A key in the "standard" namespace for getting the description of the file. -The description is a utf8 string that describes the file, generally containing -the filename, but can also contain furter information. Example descriptions -could be "filename (on hostname)" for a remote file or "filename (in trash)" -for a file in the trash. This is useful for instance as the window title -when displaying a directory or for a bookmarks menu.

-

Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_ICON

-
#define G_FILE_ATTRIBUTE_STANDARD_ICON "standard::icon"                     /* object (GIcon) */
-
-

A key in the "standard" namespace for getting the icon for the file. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_OBJECT. -The value for this key should contain a GIcon.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON

-
#define G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON "standard::symbolic-icon"   /* object (GIcon) */
-
-

A key in the "standard" namespace for getting the symbolic icon for the file. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_OBJECT. -The value for this key should contain a GIcon.

-

Since: 2.34

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE

-
#define G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE "standard::content-type"     /* string */
-
-

A key in the "standard" namespace for getting the content type of the file. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING. -The value for this key should contain a valid content type.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE

-
#define G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE "standard::fast-content-type" /* string */
-
-

A key in the "standard" namespace for getting the fast content type. -The fast content type isn't as reliable as the regular one, as it -only uses the filename to guess it, but it is faster to calculate than the -regular content type. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_SIZE

-
#define G_FILE_ATTRIBUTE_STANDARD_SIZE "standard::size"                     /* uint64 */
-
-

A key in the "standard" namespace for getting the file's size (in bytes). -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT64.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE

-
#define G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE "standard::allocated-size" /* uint64 */
-
-

A key in the "standard" namespace for getting the amount of disk space -that is consumed by the file (in bytes). This will generally be larger -than the file size (due to block size overhead) but can occasionally be -smaller (for example, for sparse files). -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT64.

-

Since: 2.20

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET

-
#define G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET "standard::symlink-target" /* byte string */
-
-

A key in the "standard" namespace for getting the symlink target, if the file -is a symlink. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_TARGET_URI

-
#define G_FILE_ATTRIBUTE_STANDARD_TARGET_URI "standard::target-uri"         /* string */
-
-

A key in the "standard" namespace for getting the target URI for the file, in -the case of G_FILE_TYPE_SHORTCUT or G_FILE_TYPE_MOUNTABLE files. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING.

-
-
-
-

G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER

-
#define G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER "standard::sort-order"         /* int32  */
-
-

A key in the "standard" namespace for setting the sort order of a file. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_INT32. -An example use would be in file managers, which would use this key -to set the order files are displayed. Files with smaller sort order -should be sorted first, and files without sort order as if sort order -was zero.

-
-
-
-

G_FILE_ATTRIBUTE_ETAG_VALUE

-
#define G_FILE_ATTRIBUTE_ETAG_VALUE "etag::value"                 /* string */
-
-

A key in the "etag" namespace for getting the value of the file's -entity tag. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_STRING.

-
-
-
-

G_FILE_ATTRIBUTE_ID_FILE

-
#define G_FILE_ATTRIBUTE_ID_FILE "id::file"                     /* string */
-
-

A key in the "id" namespace for getting a file identifier. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING. -An example use would be during listing files, to avoid recursive -directory scanning.

-
-
-
-

G_FILE_ATTRIBUTE_ID_FILESYSTEM

-
#define G_FILE_ATTRIBUTE_ID_FILESYSTEM "id::filesystem"         /* string */
-
-

A key in the "id" namespace for getting the file system identifier. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING. -An example use would be during drag and drop to see if the source -and target are on the same filesystem (default to move) or not (default -to copy).

-
-
-
-

G_FILE_ATTRIBUTE_ACCESS_CAN_READ

-
#define G_FILE_ATTRIBUTE_ACCESS_CAN_READ "access::can-read"       /* boolean */
-
-

A key in the "access" namespace for getting read privileges. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. -This attribute will be TRUE if the user is able to read the file.

-
-
-
-

G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE

-
#define G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE "access::can-write"     /* boolean */
-
-

A key in the "access" namespace for getting write privileges. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. -This attribute will be TRUE if the user is able to write to the file.

-
-
-
-

G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE

-
#define G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE "access::can-execute" /* boolean */
-
-

A key in the "access" namespace for getting execution privileges. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. -This attribute will be TRUE if the user is able to execute the file.

-
-
-
-

G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE

-
#define G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE "access::can-delete"   /* boolean */
-
-

A key in the "access" namespace for checking deletion privileges. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. -This attribute will be TRUE if the user is able to delete the file.

-
-
-
-

G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH

-
#define G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH "access::can-trash"     /* boolean */
-
-

A key in the "access" namespace for checking trashing privileges. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. -This attribute will be TRUE if the user is able to move the file to -the trash.

-
-
-
-

G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME

-
#define G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME "access::can-rename"   /* boolean */
-
-

A key in the "access" namespace for checking renaming privileges. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN. -This attribute will be TRUE if the user is able to rename the file.

-
-
-
-

G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT

-
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT "mountable::can-mount"     /* boolean */
-
-

A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-
-
-
-

G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT

-
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT "mountable::can-unmount" /* boolean */
-
-

A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-
-
-
-

G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT

-
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT "mountable::can-eject"     /* boolean */
-
-

A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-
-
-
-

G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE

-
#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE "mountable::unix-device" /* uint32 */
-
-

A key in the "mountable" namespace for getting the unix device. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT32.

-
-
-
-

G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE

-
#define G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE "mountable::unix-device-file" /* string */
-
-

A key in the "mountable" namespace for getting the unix device file. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING.

-

Since: 2.22

-
-
-
-

G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI

-
#define G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI "mountable::hal-udi"         /* string */
-
-

A key in the "mountable" namespace for getting the HAL UDI for the mountable -file. Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING.

-
-
-
-

G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START

-
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START "mountable::can-start"     /* boolean */
-
-

A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-

Since: 2.22

-
-
-
-

G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED

-
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED "mountable::can-start-degraded"     /* boolean */
-
-

A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started -degraded. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-

Since: 2.22

-
-
-
-

G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP

-
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP "mountable::can-stop"      /* boolean */
-
-

A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-

Since: 2.22

-
-
-
-

G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE

-
#define G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE "mountable::start-stop-type" /* uint32 (GDriveStartStopType) */
-
-

A key in the "mountable" namespace for getting the GDriveStartStopType. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT32.

-

Since: 2.22

-
-
-
-

G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL

-
#define G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL "mountable::can-poll"      /* boolean */
-
-

A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-

Since: 2.22

-
-
-
-

G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC

-
#define G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC "mountable::is-media-check-automatic"      /* boolean */
-
-

A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) -is automatically polled for media. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-

Since: 2.22

-
-
-
-

G_FILE_ATTRIBUTE_TIME_MODIFIED

-
#define G_FILE_ATTRIBUTE_TIME_MODIFIED "time::modified"           /* uint64 */
-
-

A key in the "time" namespace for getting the time the file was last -modified. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the -file was modified, in seconds since the UNIX epoch.

-
-
-
-

G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC

-
#define G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC "time::modified-usec" /* uint32 */
-
-

A key in the "time" namespace for getting the microseconds of the time -the file was last modified. This should be used in conjunction with -G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_UINT32.

-
-
-
-

G_FILE_ATTRIBUTE_TIME_ACCESS

-
#define G_FILE_ATTRIBUTE_TIME_ACCESS "time::access"               /* uint64 */
-
-

A key in the "time" namespace for getting the time the file was last -accessed. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the -file was last accessed, in seconds since the UNIX epoch.

-
-
-
-

G_FILE_ATTRIBUTE_TIME_ACCESS_USEC

-
#define G_FILE_ATTRIBUTE_TIME_ACCESS_USEC "time::access-usec"     /* uint32 */
-
-

A key in the "time" namespace for getting the microseconds of the time -the file was last accessed. This should be used in conjunction with -G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_UINT32.

-
-
-
-

G_FILE_ATTRIBUTE_TIME_CHANGED

-
#define G_FILE_ATTRIBUTE_TIME_CHANGED "time::changed"             /* uint64 */
-
-

A key in the "time" namespace for getting the time the file was last -changed. Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT64, -and contains the time since the file was last changed, in seconds since the -UNIX epoch.

-

This corresponds to the traditional UNIX ctime.

-
-
-
-

G_FILE_ATTRIBUTE_TIME_CHANGED_USEC

-
#define G_FILE_ATTRIBUTE_TIME_CHANGED_USEC "time::changed-usec"   /* uint32 */
-
-

A key in the "time" namespace for getting the microseconds of the time -the file was last changed. This should be used in conjunction with -G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_UINT32.

-
-
-
-

G_FILE_ATTRIBUTE_TIME_CREATED

-
#define G_FILE_ATTRIBUTE_TIME_CREATED "time::created"             /* uint64 */
-
-

A key in the "time" namespace for getting the time the file was created. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT64, -and contains the time since the file was created, in seconds since the UNIX -epoch.

-

This corresponds to the NTFS ctime.

-
-
-
-

G_FILE_ATTRIBUTE_TIME_CREATED_USEC

-
#define G_FILE_ATTRIBUTE_TIME_CREATED_USEC "time::created-usec"   /* uint32 */
-
-

A key in the "time" namespace for getting the microseconds of the time -the file was created. This should be used in conjunction with -G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_UINT32.

-
-
-
-

G_FILE_ATTRIBUTE_UNIX_DEVICE

-
#define G_FILE_ATTRIBUTE_UNIX_DEVICE "unix::device"               /* uint32 */
-
-

A key in the "unix" namespace for getting the device id of the device the -file is located on (see stat() documentation). This attribute is only -available for UNIX file systems. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_UINT32.

-
-
-
-

G_FILE_ATTRIBUTE_UNIX_INODE

-
#define G_FILE_ATTRIBUTE_UNIX_INODE "unix::inode"                 /* uint64 */
-
-

A key in the "unix" namespace for getting the inode of the file. -This attribute is only available for UNIX file systems. Corresponding -GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT64.

-
-
-
-

G_FILE_ATTRIBUTE_UNIX_MODE

-
#define G_FILE_ATTRIBUTE_UNIX_MODE "unix::mode"                   /* uint32 */
-
-

A key in the "unix" namespace for getting the mode of the file -(e.g. whether the file is a regular file, symlink, etc). See lstat() -documentation. This attribute is only available for UNIX file systems. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT32.

-
-
-
-

G_FILE_ATTRIBUTE_UNIX_NLINK

-
#define G_FILE_ATTRIBUTE_UNIX_NLINK "unix::nlink"                 /* uint32 */
-
-

A key in the "unix" namespace for getting the number of hard links -for a file. See lstat() documentation. This attribute is only available -for UNIX file systems. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_UINT32.

-
-
-
-

G_FILE_ATTRIBUTE_UNIX_UID

-
#define G_FILE_ATTRIBUTE_UNIX_UID "unix::uid"                     /* uint32 */
-
-

A key in the "unix" namespace for getting the user ID for the file. -This attribute is only available for UNIX file systems. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT32.

-
-
-
-

G_FILE_ATTRIBUTE_UNIX_GID

-
#define G_FILE_ATTRIBUTE_UNIX_GID "unix::gid"                     /* uint32 */
-
-

A key in the "unix" namespace for getting the group ID for the file. -This attribute is only available for UNIX file systems. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT32.

-
-
-
-

G_FILE_ATTRIBUTE_UNIX_RDEV

-
#define G_FILE_ATTRIBUTE_UNIX_RDEV "unix::rdev"                   /* uint32 */
-
-

A key in the "unix" namespace for getting the device ID for the file -(if it is a special file). See lstat() documentation. This attribute -is only available for UNIX file systems. Corresponding GFileAttributeType -is G_FILE_ATTRIBUTE_TYPE_UINT32.

-
-
-
-

G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE

-
#define G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE "unix::block-size"       /* uint32 */
-
-

A key in the "unix" namespace for getting the block size for the file -system. This attribute is only available for UNIX file systems. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT32.

-
-
-
-

G_FILE_ATTRIBUTE_UNIX_BLOCKS

-
#define G_FILE_ATTRIBUTE_UNIX_BLOCKS "unix::blocks"               /* uint64 */
-
-

A key in the "unix" namespace for getting the number of blocks allocated -for the file. This attribute is only available for UNIX file systems. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT64.

-
-
-
-

G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT

-
#define G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT "unix::is-mountpoint" /* boolean */
-
-

A key in the "unix" namespace for checking if the file represents a -UNIX mount point. This attribute is TRUE if the file is a UNIX mount -point. This attribute is only available for UNIX file systems. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-
-
-
-

G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE

-
#define G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE "dos::is-archive"         /* boolean */
-
-

A key in the "dos" namespace for checking if the file's archive flag -is set. This attribute is TRUE if the archive flag is set. This attribute -is only available for DOS file systems. Corresponding GFileAttributeType -is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-
-
-
-

G_FILE_ATTRIBUTE_DOS_IS_SYSTEM

-
#define G_FILE_ATTRIBUTE_DOS_IS_SYSTEM "dos::is-system"           /* boolean */
-
-

A key in the "dos" namespace for checking if the file's backup flag -is set. This attribute is TRUE if the backup flag is set. This attribute -is only available for DOS file systems. Corresponding GFileAttributeType -is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-
-
-
-

G_FILE_ATTRIBUTE_OWNER_USER

-
#define G_FILE_ATTRIBUTE_OWNER_USER "owner::user"                 /* string */
-
-

A key in the "owner" namespace for getting the user name of the -file's owner. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_STRING.

-
-
-
-

G_FILE_ATTRIBUTE_OWNER_USER_REAL

-
#define G_FILE_ATTRIBUTE_OWNER_USER_REAL "owner::user-real"       /* string */
-
-

A key in the "owner" namespace for getting the real name of the -user that owns the file. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_STRING.

-
-
-
-

G_FILE_ATTRIBUTE_OWNER_GROUP

-
#define G_FILE_ATTRIBUTE_OWNER_GROUP "owner::group"               /* string */
-
-

A key in the "owner" namespace for getting the file owner's group. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING.

-
-
-
-

G_FILE_ATTRIBUTE_THUMBNAIL_PATH

-
#define G_FILE_ATTRIBUTE_THUMBNAIL_PATH "thumbnail::path"         /* bytestring */
-
-

A key in the "thumbnail" namespace for getting the path to the thumbnail -image. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.

-
-
-
-

G_FILE_ATTRIBUTE_THUMBNAILING_FAILED

-
#define G_FILE_ATTRIBUTE_THUMBNAILING_FAILED "thumbnail::failed"         /* boolean */
-
-

A key in the "thumbnail" namespace for checking if thumbnailing failed. -This attribute is TRUE if thumbnailing failed. Corresponding -GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-
-
-
-

G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID

-
#define G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID "thumbnail::is-valid"        /* boolean */
-
-

A key in the "thumbnail" namespace for checking whether the thumbnail is outdated. -This attribute is TRUE if the thumbnail is up-to-date with the file it represents, -and FALSE if the file has been modified since the thumbnail was generated.

-

If G_FILE_ATTRIBUTE_THUMBNAILING_FAILED is TRUE and this attribute is FALSE, -it indicates that thumbnailing may be attempted again and may succeed.

-

Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-

Since: 2.40

-
-
-
-

G_FILE_ATTRIBUTE_PREVIEW_ICON

-
#define G_FILE_ATTRIBUTE_PREVIEW_ICON "preview::icon"         /* object (GIcon) */
-
-

A key in the "preview" namespace for getting a GIcon that can be -used to get preview of the file. For example, it may be a low -resolution thumbnail without metadata. Corresponding -GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_OBJECT. The value -for this key should contain a GIcon.

-

Since: 2.20

-
-
-
-

G_FILE_ATTRIBUTE_FILESYSTEM_SIZE

-
#define G_FILE_ATTRIBUTE_FILESYSTEM_SIZE "filesystem::size"                       /* uint64 */
-
-

A key in the "filesystem" namespace for getting the total size (in bytes) of the file system, -used in g_file_query_filesystem_info(). Corresponding GFileAttributeType -is G_FILE_ATTRIBUTE_TYPE_UINT64.

-
-
-
-

G_FILE_ATTRIBUTE_FILESYSTEM_FREE

-
#define G_FILE_ATTRIBUTE_FILESYSTEM_FREE "filesystem::free"                       /* uint64 */
-
-

A key in the "filesystem" namespace for getting the number of bytes of free space left on the -file system. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_UINT64.

-
-
-
-

G_FILE_ATTRIBUTE_FILESYSTEM_USED

-
#define G_FILE_ATTRIBUTE_FILESYSTEM_USED "filesystem::used"                       /* uint64 */
-
-

A key in the "filesystem" namespace for getting the number of bytes of used on the -file system. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_UINT64.

-

Since: 2.32

-
-
-
-

G_FILE_ATTRIBUTE_FILESYSTEM_TYPE

-
#define G_FILE_ATTRIBUTE_FILESYSTEM_TYPE "filesystem::type"                       /* string */
-
-

A key in the "filesystem" namespace for getting the file system's type. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING.

-
-
-
-

G_FILE_ATTRIBUTE_FILESYSTEM_READONLY

-
#define G_FILE_ATTRIBUTE_FILESYSTEM_READONLY "filesystem::readonly"               /* boolean */
-
-

A key in the "filesystem" namespace for checking if the file system -is read only. Is set to TRUE if the file system is read only. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-
-
-
-

G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW

-
#define G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW "filesystem::use-preview"        /* uint32 (GFilesystemPreviewType) */
-
-

A key in the "filesystem" namespace for hinting a file manager -application whether it should preview (e.g. thumbnail) files on the -file system. The value for this key contain a -GFilesystemPreviewType.

-
-
-
-

G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE

-
#define G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE "filesystem::remote"                   /* boolean */
-
-

A key in the "filesystem" namespace for checking if the file system -is remote. Is set to TRUE if the file system is remote. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_BOOLEAN.

-
-
-
-

G_FILE_ATTRIBUTE_GVFS_BACKEND

-
#define G_FILE_ATTRIBUTE_GVFS_BACKEND "gvfs::backend"             /* string */
-
-

A key in the "gvfs" namespace that gets the name of the current -GVFS backend in use. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_STRING.

-
-
-
-

G_FILE_ATTRIBUTE_SELINUX_CONTEXT

-
#define G_FILE_ATTRIBUTE_SELINUX_CONTEXT "selinux::context"       /* string */
-
-

A key in the "selinux" namespace for getting the file's SELinux -context. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only -available if GLib has been built with SELinux support.

-
-
-
-

G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT

-
#define G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT "trash::item-count"     /* uint32 */
-
-

A key in the "trash" namespace. When requested against -trash:/// returns the number of (toplevel) items in the trash folder. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_UINT32.

-
-
-
-

G_FILE_ATTRIBUTE_TRASH_ORIG_PATH

-
#define G_FILE_ATTRIBUTE_TRASH_ORIG_PATH "trash::orig-path"     /* byte string */
-
-

A key in the "trash" namespace. When requested against -items in trash:///, will return the original path to the file before it -was trashed. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_BYTE_STRING.

-

Since: 2.24

-
-
-
-

G_FILE_ATTRIBUTE_TRASH_DELETION_DATE

-
#define G_FILE_ATTRIBUTE_TRASH_DELETION_DATE "trash::deletion-date"  /* string */
-
-

A key in the "trash" namespace. When requested against -items in trash:///, will return the date and time when the file -was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss. -Corresponding GFileAttributeType is G_FILE_ATTRIBUTE_TYPE_STRING.

-

Since: 2.24

-
-
-
-

G_FILE_ATTRIBUTE_RECENT_MODIFIED

-
#define G_FILE_ATTRIBUTE_RECENT_MODIFIED "recent::modified"          /* int64 (time_t) */
-
-

A key in the "recent" namespace for getting time, when the metadata for the -file in recent:/// was last changed. Corresponding GFileAttributeType is -G_FILE_ATTRIBUTE_TYPE_INT64.

-

Since: 2.52

-
-
-
-

See Also

-

GFile, GFileAttribute

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GFileInputStream.html b/docs/reference/gio/html/GFileInputStream.html deleted file mode 100644 index d055ca6ed..000000000 --- a/docs/reference/gio/html/GFileInputStream.html +++ /dev/null @@ -1,292 +0,0 @@ - - - - -GFileInputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GFileInputStream

-

GFileInputStream — File input streaming operations

-
-
-

Functions

-
---- - - - - - - - - - - - - - - -
-GFileInfo * - -g_file_input_stream_query_info () -
-void - -g_file_input_stream_query_info_async () -
-GFileInfo * - -g_file_input_stream_query_info_finish () -
-
-
-

Types and Values

-
---- - - - - -
 GFileInputStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GInputStream
-        ╰── GFileInputStream
-
-
-
-

Implemented Interfaces

-

-GFileInputStream implements - GSeekable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GFileInputStream provides input streams that take their -content from a file.

-

GFileInputStream implements GSeekable, which allows the input -stream to jump to arbitrary positions in the file, provided the -filesystem of the file allows it. To find the position of a file -input stream, use g_seekable_tell(). To find out if a file input -stream supports seeking, use g_seekable_can_seek(). -To position a file input stream, use g_seekable_seek().

-
-
-

Functions

-
-

g_file_input_stream_query_info ()

-
GFileInfo *
-g_file_input_stream_query_info (GFileInputStream *stream,
-                                const char *attributes,
-                                GCancellable *cancellable,
-                                GError **error);
-

Queries a file input stream the given attributes -. This function blocks -while querying the stream. For the asynchronous (non-blocking) version -of this function, see g_file_input_stream_query_info_async(). While the -stream is blocked, the stream will set the pending flag internally, and -any other operations on the stream will fail with G_IO_ERROR_PENDING.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GFileInputStream.

 

attributes

a file attribute query string.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

a GFileInfo, or NULL on error.

-

[transfer full]

-
-
-
-
-

g_file_input_stream_query_info_async ()

-
void
-g_file_input_stream_query_info_async (GFileInputStream *stream,
-                                      const char *attributes,
-                                      int io_priority,
-                                      GCancellable *cancellable,
-                                      GAsyncReadyCallback callback,
-                                      gpointer user_data);
-

Queries the stream information asynchronously. -When the operation is finished callback - will be called. -You can then call g_file_input_stream_query_info_finish() -to get the result of the operation.

-

For the synchronous version of this function, -see g_file_input_stream_query_info().

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be set

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GFileInputStream.

 

attributes

a file attribute query string.

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

callback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_file_input_stream_query_info_finish ()

-
GFileInfo *
-g_file_input_stream_query_info_finish (GFileInputStream *stream,
-                                       GAsyncResult *result,
-                                       GError **error);
-

Finishes an asynchronous info query operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GFileInputStream.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, -or NULL to ignore.

 
-
-
-

Returns

-

GFileInfo.

-

[transfer full]

-
-
-
-
-

Types and Values

-
-

GFileInputStream

-
typedef struct _GFileInputStream GFileInputStream;
-

A subclass of GInputStream for opened files. This adds -a few file-specific operations and seeking.

-

GFileInputStream implements GSeekable.

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GFileMonitor.html b/docs/reference/gio/html/GFileMonitor.html deleted file mode 100644 index fcc6226d2..000000000 --- a/docs/reference/gio/html/GFileMonitor.html +++ /dev/null @@ -1,514 +0,0 @@ - - - - -GFileMonitor: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GFileMonitor

-

GFileMonitor — File Monitor

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
-gboolean - -g_file_monitor_cancel () -
-gboolean - -g_file_monitor_is_cancelled () -
-void - -g_file_monitor_set_rate_limit () -
-void - -g_file_monitor_emit_event () -
-
-
-

Properties

-
----- - - - - - - - - - - - - -
gbooleancancelledRead
gintrate-limitRead / Write
-
-
-

Signals

-
----- - - - - - -
voidchangedRun Last
-
-
-

Types and Values

-
---- - - - - - - - - - - -
enumGFileMonitorEvent
 GFileMonitor
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GFileMonitor
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Monitors a file or directory for changes.

-

To obtain a GFileMonitor for a file or directory, use -g_file_monitor(), g_file_monitor_file(), or -g_file_monitor_directory().

-

To get informed about changes to the file or directory you are -monitoring, connect to the “changed” signal. The -signal will be emitted in the -thread-default main context -of the thread that the monitor was created in -(though if the global default main context is blocked, this may -cause notifications to be blocked even if the thread-default -context is still running).

-
-
-

Functions

-
-

g_file_monitor_cancel ()

-
gboolean
-g_file_monitor_cancel (GFileMonitor *monitor);
-

Cancels a file monitor.

-
-

Parameters

-
----- - - - - - -

monitor

a GFileMonitor.

 
-
-
-

Returns

-

always TRUE

-
-
-
-
-

g_file_monitor_is_cancelled ()

-
gboolean
-g_file_monitor_is_cancelled (GFileMonitor *monitor);
-

Returns whether the monitor is canceled.

-
-

Parameters

-
----- - - - - - -

monitor

a GFileMonitor

 
-
-
-

Returns

-

TRUE if monitor is canceled. FALSE otherwise.

-
-
-
-
-

g_file_monitor_set_rate_limit ()

-
void
-g_file_monitor_set_rate_limit (GFileMonitor *monitor,
-                               gint limit_msecs);
-

Sets the rate limit to which the monitor - will report -consecutive change events to the same file.

-
-

Parameters

-
----- - - - - - - - - - - - - -

monitor

a GFileMonitor.

 

limit_msecs

a non-negative integer with the limit in milliseconds -to poll for changes

 
-
-
-
-
-

g_file_monitor_emit_event ()

-
void
-g_file_monitor_emit_event (GFileMonitor *monitor,
-                           GFile *child,
-                           GFile *other_file,
-                           GFileMonitorEvent event_type);
-

Emits the “changed” signal if a change -has taken place. Should be called from file monitor -implementations only.

-

Implementations are responsible to call this method from the -thread-default main context of the -thread that the monitor was created in.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

monitor

a GFileMonitor.

 

child

a GFile.

 

other_file

a GFile.

 

event_type

a set of GFileMonitorEvent flags.

 
-
-
-
-
-

Types and Values

-
-

enum GFileMonitorEvent

-

Specifies what type of event a monitor event is.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_FILE_MONITOR_EVENT_CHANGED

-

a file changed.

-
 

G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT

-

a hint that this was probably the last change in a set of changes.

-
 

G_FILE_MONITOR_EVENT_DELETED

-

a file was deleted.

-
 

G_FILE_MONITOR_EVENT_CREATED

-

a file was created.

-
 

G_FILE_MONITOR_EVENT_ATTRIBUTE_CHANGED

-

a file attribute was changed.

-
 

G_FILE_MONITOR_EVENT_PRE_UNMOUNT

-

the file location will soon be unmounted.

-
 

G_FILE_MONITOR_EVENT_UNMOUNTED

-

the file location was unmounted.

-
 

G_FILE_MONITOR_EVENT_MOVED

-

the file was moved -- only sent if the - (deprecated) G_FILE_MONITOR_SEND_MOVED flag is set

-
 

G_FILE_MONITOR_EVENT_RENAMED

-

the file was renamed within the - current directory -- only sent if the G_FILE_MONITOR_WATCH_MOVES - flag is set. Since: 2.46.

-
 

G_FILE_MONITOR_EVENT_MOVED_IN

-

the file was moved into the - monitored directory from another location -- only sent if the - G_FILE_MONITOR_WATCH_MOVES flag is set. Since: 2.46.

-
 

G_FILE_MONITOR_EVENT_MOVED_OUT

-

the file was moved out of the - monitored directory to another location -- only sent if the - G_FILE_MONITOR_WATCH_MOVES flag is set. Since: 2.46

-
 
-
-
-
-
-

GFileMonitor

-
typedef struct _GFileMonitor GFileMonitor;
-

Watches for changes to a file.

-
-
-
-

Property Details

-
-

The “cancelled” property

-
  “cancelled”                gboolean
-

Whether the monitor has been cancelled.

-

Flags: Read

-

Default value: FALSE

-
-
-
-

The “rate-limit” property

-
  “rate-limit”               gint
-

The limit of the monitor to watch for changes, in milliseconds.

-

Flags: Read / Write

-

Allowed values: >= 0

-

Default value: 800

-
-
-
-

Signal Details

-
-

The “changed” signal

-
void
-user_function (GFileMonitor     *monitor,
-               GFile            *file,
-               GFile            *other_file,
-               GFileMonitorEvent event_type,
-               gpointer          user_data)
-

Emitted when file - has been changed.

-

If using G_FILE_MONITOR_WATCH_MOVES on a directory monitor, and -the information is available (and if supported by the backend), -event_type - may be G_FILE_MONITOR_EVENT_RENAMED, -G_FILE_MONITOR_EVENT_MOVED_IN or G_FILE_MONITOR_EVENT_MOVED_OUT.

-

In all cases file - will be a child of the monitored directory. For -renames, file - will be the old name and other_file - is the new -name. For "moved in" events, file - is the name of the file that -appeared and other_file - is the old name that it was moved from (in -another directory). For "moved out" events, file - is the name of -the file that used to be in this directory and other_file - is the -name of the file at its new location.

-

It makes sense to treat G_FILE_MONITOR_EVENT_MOVED_IN as -equivalent to G_FILE_MONITOR_EVENT_CREATED and -G_FILE_MONITOR_EVENT_MOVED_OUT as equivalent to -G_FILE_MONITOR_EVENT_DELETED, with extra information. -G_FILE_MONITOR_EVENT_RENAMED is equivalent to a delete/create -pair. This is exactly how the events will be reported in the case -that the G_FILE_MONITOR_WATCH_MOVES flag is not in use.

-

If using the deprecated flag G_FILE_MONITOR_SEND_MOVED flag and event_type - is -G_FILE_MONITOR_EVENT_MOVED, file - will be set to a GFile containing the -old path, and other_file - will be set to a GFile containing the new path.

-

In all the other cases, other_file - will be set to NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

monitor

a GFileMonitor.

 

file

a GFile.

 

other_file

a GFile or NULL.

[nullable]

event_type

a GFileMonitorEvent.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GFileOutputStream.html b/docs/reference/gio/html/GFileOutputStream.html deleted file mode 100644 index 0979bfdea..000000000 --- a/docs/reference/gio/html/GFileOutputStream.html +++ /dev/null @@ -1,343 +0,0 @@ - - - - -GFileOutputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GFileOutputStream

-

GFileOutputStream — File output streaming operations

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
-GFileInfo * - -g_file_output_stream_query_info () -
-void - -g_file_output_stream_query_info_async () -
-GFileInfo * - -g_file_output_stream_query_info_finish () -
-char * - -g_file_output_stream_get_etag () -
-
-
-

Types and Values

-
---- - - - - -
 GFileOutputStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GOutputStream
-        ╰── GFileOutputStream
-
-
-
-

Implemented Interfaces

-

-GFileOutputStream implements - GSeekable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GFileOutputStream provides output streams that write their -content to a file.

-

GFileOutputStream implements GSeekable, which allows the output -stream to jump to arbitrary positions in the file and to truncate -the file, provided the filesystem of the file supports these -operations.

-

To find the position of a file output stream, use g_seekable_tell(). -To find out if a file output stream supports seeking, use -g_seekable_can_seek().To position a file output stream, use -g_seekable_seek(). To find out if a file output stream supports -truncating, use g_seekable_can_truncate(). To truncate a file output -stream, use g_seekable_truncate().

-
-
-

Functions

-
-

g_file_output_stream_query_info ()

-
GFileInfo *
-g_file_output_stream_query_info (GFileOutputStream *stream,
-                                 const char *attributes,
-                                 GCancellable *cancellable,
-                                 GError **error);
-

Queries a file output stream for the given attributes -. -This function blocks while querying the stream. For the asynchronous -version of this function, see g_file_output_stream_query_info_async(). -While the stream is blocked, the stream will set the pending flag -internally, and any other operations on the stream will fail with -G_IO_ERROR_PENDING.

-

Can fail if the stream was already closed (with error - being set to -G_IO_ERROR_CLOSED), the stream has pending operations (with error - being -set to G_IO_ERROR_PENDING), or if querying info is not supported for -the stream's interface (with error - being set to G_IO_ERROR_NOT_SUPPORTED). In -all cases of failure, NULL will be returned.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be set, and NULL will -be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GFileOutputStream.

 

attributes

a file attribute query string.

 

cancellable

optional GCancellable object, NULL to ignore.

 

error

a GError, NULL to ignore.

 
-
-
-

Returns

-

a GFileInfo for the stream -, or NULL on error.

-

[transfer full]

-
-
-
-
-

g_file_output_stream_query_info_async ()

-
void
-g_file_output_stream_query_info_async (GFileOutputStream *stream,
-                                       const char *attributes,
-                                       int io_priority,
-                                       GCancellable *cancellable,
-                                       GAsyncReadyCallback callback,
-                                       gpointer user_data);
-

Asynchronously queries the stream - for a GFileInfo. When completed, -callback - will be called with a GAsyncResult which can be used to -finish the operation with g_file_output_stream_query_info_finish().

-

For the synchronous version of this function, see -g_file_output_stream_query_info().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GFileOutputStream.

 

attributes

a file attribute query string.

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, NULL to ignore.

 

callback

callback to call when the request is satisfied

 

user_data

the data to pass to callback function

 
-
-
-
-
-

g_file_output_stream_query_info_finish ()

-
GFileInfo *
-g_file_output_stream_query_info_finish
-                               (GFileOutputStream *stream,
-                                GAsyncResult *result,
-                                GError **error);
-

Finalizes the asynchronous query started -by g_file_output_stream_query_info_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GFileOutputStream.

 

result

a GAsyncResult.

 

error

a GError, NULL to ignore.

 
-
-
-

Returns

-

A GFileInfo for the finished query.

-

[transfer full]

-
-
-
-
-

g_file_output_stream_get_etag ()

-
char *
-g_file_output_stream_get_etag (GFileOutputStream *stream);
-

Gets the entity tag for the file when it has been written. -This must be called after the stream has been written -and closed, as the etag can change while writing.

-
-

Parameters

-
----- - - - - - -

stream

a GFileOutputStream.

 
-
-
-

Returns

-

the entity tag for the stream.

-
-
-
-
-

Types and Values

-
-

GFileOutputStream

-
typedef struct _GFileOutputStream GFileOutputStream;
-

A subclass of GOutputStream for opened files. This adds -a few file-specific operations and seeking and truncating.

-

GFileOutputStream implements GSeekable.

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GFilenameCompleter.html b/docs/reference/gio/html/GFilenameCompleter.html deleted file mode 100644 index 5b432c577..000000000 --- a/docs/reference/gio/html/GFilenameCompleter.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - -GFilenameCompleter: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GFilenameCompleter

-

GFilenameCompleter — Filename Completer

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
-GFilenameCompleter * - -g_filename_completer_new () -
-char * - -g_filename_completer_get_completion_suffix () -
-char ** - -g_filename_completer_get_completions () -
-void - -g_filename_completer_set_dirs_only () -
-
-
-

Signals

-
----- - - - - - -
voidgot-completion-dataRun Last
-
-
-

Types and Values

-
---- - - - - -
 GFilenameCompleter
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GFilenameCompleter
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Completes partial file and directory names given a partial string by -looking in the file system for clues. Can return a list of possible -completion strings for widget implementations.

-
-
-

Functions

-
-

g_filename_completer_new ()

-
GFilenameCompleter *
-g_filename_completer_new (void);
-

Creates a new filename completer.

-
-

Returns

-

a GFilenameCompleter.

-
-
-
-
-

g_filename_completer_get_completion_suffix ()

-
char *
-g_filename_completer_get_completion_suffix
-                               (GFilenameCompleter *completer,
-                                const char *initial_text);
-

Obtains a completion for initial_text - from completer -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

completer

the filename completer.

 

initial_text

text to be completed.

 
-
-
-

Returns

-

a completed string, or NULL if no completion exists. -This string is not owned by GIO, so remember to g_free() it -when finished.

-
-
-
-
-

g_filename_completer_get_completions ()

-
char **
-g_filename_completer_get_completions (GFilenameCompleter *completer,
-                                      const char *initial_text);
-

Gets an array of completion strings for a given initial text.

-
-

Parameters

-
----- - - - - - - - - - - - - -

completer

the filename completer.

 

initial_text

text to be completed.

 
-
-
-

Returns

-

array of strings with possible completions for initial_text -. -This array must be freed by g_strfreev() when finished.

-

[array zero-terminated=1][transfer full]

-
-
-
-
-

g_filename_completer_set_dirs_only ()

-
void
-g_filename_completer_set_dirs_only (GFilenameCompleter *completer,
-                                    gboolean dirs_only);
-

If dirs_only - is TRUE, completer - will only -complete directory names, and not file names.

-
-

Parameters

-
----- - - - - - - - - - - - - -

completer

the filename completer.

 

dirs_only

a gboolean.

 
-
-
-
-
-

Types and Values

-
-

GFilenameCompleter

-
typedef struct _GFilenameCompleter GFilenameCompleter;
-

Completes filenames based on files that exist within the file system.

-
-
-
-

Signal Details

-
-

The “got-completion-data” signal

-
void
-user_function (GFilenameCompleter *arg0,
-               gpointer            user_data)
-

Emitted when the file name completion information comes available.

-
-

Parameters

-
----- - - - - - -

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GFilterInputStream.html b/docs/reference/gio/html/GFilterInputStream.html deleted file mode 100644 index c5520dd6b..000000000 --- a/docs/reference/gio/html/GFilterInputStream.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - -GFilterInputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GFilterInputStream

-

GFilterInputStream — Filter Input Stream

-
- -
-

Properties

-
----- - - - - - - - - - - - - -
-GInputStream *base-streamRead / Write / Construct Only
gbooleanclose-base-streamRead / Write / Construct
-
-
-

Types and Values

-
---- - - - - -
 GFilterInputStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GInputStream
-        ╰── GFilterInputStream
-            ├── GBufferedInputStream
-            ╰── GConverterInputStream
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Base class for input stream implementations that perform some -kind of filtering operation on a base stream. Typical examples -of filtering operations are character set conversion, compression -and byte order flipping.

-
-
-

Functions

-
-

g_filter_input_stream_get_base_stream ()

-
GInputStream *
-g_filter_input_stream_get_base_stream (GFilterInputStream *stream);
-

Gets the base stream for the filter stream.

-
-

Parameters

-
----- - - - - - -

stream

a GFilterInputStream.

 
-
-
-

Returns

-

a GInputStream.

-

[transfer none]

-
-
-
-
-

g_filter_input_stream_get_close_base_stream ()

-
gboolean
-g_filter_input_stream_get_close_base_stream
-                               (GFilterInputStream *stream);
-

Returns whether the base stream will be closed when stream - is -closed.

-
-

Parameters

-
----- - - - - - -

stream

a GFilterInputStream.

 
-
-
-

Returns

-

TRUE if the base stream will be closed.

-
-
-
-
-

g_filter_input_stream_set_close_base_stream ()

-
void
-g_filter_input_stream_set_close_base_stream
-                               (GFilterInputStream *stream,
-                                gboolean close_base);
-

Sets whether the base stream will be closed when stream - is closed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GFilterInputStream.

 

close_base

TRUE to close the base stream.

 
-
-
-
-
-

Types and Values

-
-

GFilterInputStream

-
typedef struct _GFilterInputStream GFilterInputStream;
-

A base class for all input streams that work on an underlying stream.

-
-
-
-

Property Details

-
-

The “base-stream” property

-
  “base-stream”              GInputStream *
-

The underlying base stream on which the io ops will be done.

-

Flags: Read / Write / Construct Only

-
-
-
-

The “close-base-stream” property

-
  “close-base-stream”        gboolean
-

If the base stream should be closed when the filter stream is closed.

-

Flags: Read / Write / Construct

-

Default value: TRUE

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GFilterOutputStream.html b/docs/reference/gio/html/GFilterOutputStream.html deleted file mode 100644 index 50de5552d..000000000 --- a/docs/reference/gio/html/GFilterOutputStream.html +++ /dev/null @@ -1,249 +0,0 @@ - - - - -GFilterOutputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GFilterOutputStream

-

GFilterOutputStream — Filter Output Stream

-
- -
-

Properties

-
----- - - - - - - - - - - - - -
-GOutputStream *base-streamRead / Write / Construct Only
gbooleanclose-base-streamRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GFilterOutputStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GOutputStream
-        ╰── GFilterOutputStream
-            ├── GBufferedOutputStream
-            ├── GConverterOutputStream
-            ╰── GDataOutputStream
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Base class for output stream implementations that perform some -kind of filtering operation on a base stream. Typical examples -of filtering operations are character set conversion, compression -and byte order flipping.

-
-
-

Functions

-
-

g_filter_output_stream_get_base_stream ()

-
GOutputStream *
-g_filter_output_stream_get_base_stream
-                               (GFilterOutputStream *stream);
-

Gets the base stream for the filter stream.

-
-

Parameters

-
----- - - - - - -

stream

a GFilterOutputStream.

 
-
-
-

Returns

-

a GOutputStream.

-

[transfer none]

-
-
-
-
-

g_filter_output_stream_get_close_base_stream ()

-
gboolean
-g_filter_output_stream_get_close_base_stream
-                               (GFilterOutputStream *stream);
-

Returns whether the base stream will be closed when stream - is -closed.

-
-

Parameters

-
----- - - - - - -

stream

a GFilterOutputStream.

 
-
-
-

Returns

-

TRUE if the base stream will be closed.

-
-
-
-
-

g_filter_output_stream_set_close_base_stream ()

-
void
-g_filter_output_stream_set_close_base_stream
-                               (GFilterOutputStream *stream,
-                                gboolean close_base);
-

Sets whether the base stream will be closed when stream - is closed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GFilterOutputStream.

 

close_base

TRUE to close the base stream.

 
-
-
-
-
-

Types and Values

-
-

GFilterOutputStream

-
typedef struct _GFilterOutputStream GFilterOutputStream;
-

A base class for all output streams that work on an underlying stream.

-
-
-
-

Property Details

-
-

The “base-stream” property

-
  “base-stream”              GOutputStream *
-

The underlying base stream on which the io ops will be done.

-

Flags: Read / Write / Construct Only

-
-
-
-

The “close-base-stream” property

-
  “close-base-stream”        gboolean
-

If the base stream should be closed when the filter stream is closed.

-

Flags: Read / Write / Construct Only

-

Default value: TRUE

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GIOModule.html b/docs/reference/gio/html/GIOModule.html deleted file mode 100644 index 3fd4f2ce6..000000000 --- a/docs/reference/gio/html/GIOModule.html +++ /dev/null @@ -1,594 +0,0 @@ - - - - -GIOModule: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIOModule

-

GIOModule — Loadable GIO Modules

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GIOModule * - -g_io_module_new () -
-void - -g_io_module_scope_block () -
-void - -g_io_module_scope_free () -
-GIOModuleScope * - -g_io_module_scope_new () -
-GList * - -g_io_modules_load_all_in_directory () -
-GList * - -g_io_modules_load_all_in_directory_with_scope () -
-void - -g_io_modules_scan_all_in_directory () -
-void - -g_io_modules_scan_all_in_directory_with_scope () -
-void - -g_io_module_load () -
-void - -g_io_module_unload () -
-char ** - -g_io_module_query () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
 GIOModule
 GIOModuleScope
enumGIOModuleScopeFlags
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GTypeModule
-        ╰── GIOModule
-
-
-
-

Implemented Interfaces

-

-GIOModule implements - GTypePlugin.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Provides an interface and default functions for loading and unloading -modules. This is used internally to make GIO extensible, but can also -be used by others to implement module loading.

-
-
-

Functions

-
-

g_io_module_new ()

-
GIOModule *
-g_io_module_new (const gchar *filename);
-

Creates a new GIOModule that will load the specific -shared library when in use.

-
-

Parameters

-
----- - - - - - -

filename

filename of the shared library module.

[type filename]
-
-
-

Returns

-

a GIOModule from given filename -, -or NULL on error.

-
-
-
-
-

g_io_module_scope_block ()

-
void
-g_io_module_scope_block (GIOModuleScope *scope,
-                         const gchar *basename);
-

Block modules with the given basename - from being loaded when -this scope is used with g_io_modules_scan_all_in_directory_with_scope() -or g_io_modules_load_all_in_directory_with_scope().

-
-

Parameters

-
----- - - - - - - - - - - - - -

scope

a module loading scope

 

basename

the basename to block

 
-
-

Since: 2.30

-
-
-
-

g_io_module_scope_free ()

-
void
-g_io_module_scope_free (GIOModuleScope *scope);
-

Free a module scope.

-
-

Parameters

-
----- - - - - - -

scope

a module loading scope

 
-
-

Since: 2.30

-
-
-
-

g_io_module_scope_new ()

-
GIOModuleScope *
-g_io_module_scope_new (GIOModuleScopeFlags flags);
-

Create a new scope for loading of IO modules. A scope can be used for -blocking duplicate modules, or blocking a module you don't want to load.

-

Specify the G_IO_MODULE_SCOPE_BLOCK_DUPLICATES flag to block modules -which have the same base name as a module that has already been seen -in this scope.

-
-

Parameters

-
----- - - - - - -

flags

flags for the new scope

 
-
-
-

Returns

-

the new module scope.

-

[transfer full]

-
-

Since: 2.30

-
-
-
-

g_io_modules_load_all_in_directory ()

-
GList *
-g_io_modules_load_all_in_directory (const gchar *dirname);
-

Loads all the modules in the specified directory.

-

If don't require all modules to be initialized (and thus registering -all gtypes) then you can use g_io_modules_scan_all_in_directory() -which allows delayed/lazy loading of modules.

-
-

Parameters

-
----- - - - - - -

dirname

pathname for a directory containing modules -to load.

[type filename]
-
-
-

Returns

-

a list of GIOModules loaded -from the directory, -All the modules are loaded into memory, if you want to -unload them (enabling on-demand loading) you must call -g_type_module_unuse() on all the modules. Free the list -with g_list_free().

-

[element-type GIOModule][transfer full]

-
-
-
-
-

g_io_modules_load_all_in_directory_with_scope ()

-
GList *
-g_io_modules_load_all_in_directory_with_scope
-                               (const gchar *dirname,
-                                GIOModuleScope *scope);
-

Loads all the modules in the specified directory.

-

If don't require all modules to be initialized (and thus registering -all gtypes) then you can use g_io_modules_scan_all_in_directory() -which allows delayed/lazy loading of modules.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dirname

pathname for a directory containing modules -to load.

[type filename]

scope

a scope to use when scanning the modules.

 
-
-
-

Returns

-

a list of GIOModules loaded -from the directory, -All the modules are loaded into memory, if you want to -unload them (enabling on-demand loading) you must call -g_type_module_unuse() on all the modules. Free the list -with g_list_free().

-

[element-type GIOModule][transfer full]

-
-

Since: 2.30

-
-
-
-

g_io_modules_scan_all_in_directory ()

-
void
-g_io_modules_scan_all_in_directory (const char *dirname);
-

Scans all the modules in the specified directory, ensuring that -any extension point implemented by a module is registered.

-

This may not actually load and initialize all the types in each -module, some modules may be lazily loaded and initialized when -an extension point it implementes is used with e.g. -g_io_extension_point_get_extensions() or -g_io_extension_point_get_extension_by_name().

-

If you need to guarantee that all types are loaded in all the modules, -use g_io_modules_load_all_in_directory().

-
-

Parameters

-
----- - - - - - -

dirname

pathname for a directory containing modules -to scan.

[type filename]
-
-

Since: 2.24

-
-
-
-

g_io_modules_scan_all_in_directory_with_scope ()

-
void
-g_io_modules_scan_all_in_directory_with_scope
-                               (const gchar *dirname,
-                                GIOModuleScope *scope);
-

Scans all the modules in the specified directory, ensuring that -any extension point implemented by a module is registered.

-

This may not actually load and initialize all the types in each -module, some modules may be lazily loaded and initialized when -an extension point it implementes is used with e.g. -g_io_extension_point_get_extensions() or -g_io_extension_point_get_extension_by_name().

-

If you need to guarantee that all types are loaded in all the modules, -use g_io_modules_load_all_in_directory().

-
-

Parameters

-
----- - - - - - - - - - - - - -

dirname

pathname for a directory containing modules -to scan.

[type filename]

scope

a scope to use when scanning the modules

 
-
-

Since: 2.30

-
-
-
-

g_io_module_load ()

-
void
-g_io_module_load (GIOModule *module);
-

Required API for GIO modules to implement.

-

This function is run after the module has been loaded into GIO, -to initialize the module. Typically, this function will call -g_io_extension_point_implement().

-
-

Parameters

-
----- - - - - - -

module

a GIOModule.

 
-
-
-
-
-

g_io_module_unload ()

-
void
-g_io_module_unload (GIOModule *module);
-

Required API for GIO modules to implement.

-

This function is run when the module is being unloaded from GIO, -to finalize the module.

-
-

Parameters

-
----- - - - - - -

module

a GIOModule.

 
-
-
-
-
-

g_io_module_query ()

-
char **
-g_io_module_query (void);
-

Optional API for GIO modules to implement.

-

Should return a list of all the extension points that may be -implemented in this module.

-

This method will not be called in normal use, however it may be -called when probing existing modules and recording which extension -points that this model is used for. This means we won't have to -load and initialize this module unless its needed.

-

If this function is not implemented by the module the module will -always be loaded, initialized and then unloaded on application -startup so that it can register its extension points during init.

-

Note that a module need not actually implement all the extension -points that g_io_module_query() returns, since the exact list of -extension may depend on runtime issues. However all extension -points actually implemented must be returned by g_io_module_query() -(if defined).

-

When installing a module that implements g_io_module_query() you must -run gio-querymodules in order to build the cache files required for -lazy loading.

-
-

Returns

-

A NULL-terminated array of strings, -listing the supported extension points of the module. The array -must be suitable for freeing with g_strfreev().

-

[transfer full]

-
-

Since: 2.24

-
-
-
-

Types and Values

-
-

GIOModule

-
typedef struct _GIOModule GIOModule;
-

Opaque module base class for extending GIO.

-
-
-
-

GIOModuleScope

-
typedef struct _GIOModuleScope GIOModuleScope;
-

Represents a scope for loading IO modules. A scope can be used for blocking -duplicate modules, or blocking a module you don't want to load.

-

The scope can be used with g_io_modules_load_all_in_directory_with_scope() -or g_io_modules_scan_all_in_directory_with_scope().

-

Since: 2.30

-
-
-
-

enum GIOModuleScopeFlags

-

Flags for use with g_io_module_scope_new().

-
-

Members

-
----- - - - - - - - - - - - - -

G_IO_MODULE_SCOPE_NONE

-

No module scan flags

-
 

G_IO_MODULE_SCOPE_BLOCK_DUPLICATES

-

When using this scope to load or - scan modules, automatically block a modules which has the same base - basename as previously loaded module.

-
 
-
-

Since: 2.30

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GIOStream.html b/docs/reference/gio/html/GIOStream.html deleted file mode 100644 index 6548ddadc..000000000 --- a/docs/reference/gio/html/GIOStream.html +++ /dev/null @@ -1,785 +0,0 @@ - - - - -GIOStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIOStream

-

GIOStream — Base class for implementing read/write streams

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GInputStream * - -g_io_stream_get_input_stream () -
-GOutputStream * - -g_io_stream_get_output_stream () -
-void - -g_io_stream_splice_async () -
-gboolean - -g_io_stream_splice_finish () -
-gboolean - -g_io_stream_close () -
-void - -g_io_stream_close_async () -
-gboolean - -g_io_stream_close_finish () -
-gboolean - -g_io_stream_is_closed () -
-gboolean - -g_io_stream_has_pending () -
-gboolean - -g_io_stream_set_pending () -
-void - -g_io_stream_clear_pending () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - -
gbooleanclosedRead
-GInputStream *input-streamRead
-GOutputStream *output-streamRead
-
-
-

Types and Values

-
---- - - - - - - - - - - -
enumGIOStreamSpliceFlags
 GIOStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GIOStream
-        ├── GFileIOStream
-        ├── GSimpleIOStream
-        ├── GSocketConnection
-        ╰── GTlsConnection
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GIOStream represents an object that has both read and write streams. -Generally the two streams act as separate input and output streams, -but they share some common resources and state. For instance, for -seekable streams, both streams may use the same position.

-

Examples of GIOStream objects are GSocketConnection, which represents -a two-way network connection; and GFileIOStream, which represents a -file handle opened in read-write mode.

-

To do the actual reading and writing you need to get the substreams -with g_io_stream_get_input_stream() and g_io_stream_get_output_stream().

-

The GIOStream object owns the input and the output streams, not the other -way around, so keeping the substreams alive will not keep the GIOStream -object alive. If the GIOStream object is freed it will be closed, thus -closing the substreams, so even if the substreams stay alive they will -always return G_IO_ERROR_CLOSED for all operations.

-

To close a stream use g_io_stream_close() which will close the common -stream object and also the individual substreams. You can also close -the substreams themselves. In most cases this only marks the -substream as closed, so further I/O on it fails but common state in the -GIOStream may still be open. However, some streams may support -"half-closed" states where one direction of the stream is actually shut down.

-

Operations on GIOStreams cannot be started while another operation on the -GIOStream or its substreams is in progress. Specifically, an application can -read from the GInputStream and write to the GOutputStream simultaneously -(either in separate threads, or as asynchronous operations in the same -thread), but an application cannot start any GIOStream operation while there -is a GIOStream, GInputStream or GOutputStream operation in progress, and -an application can’t start any GInputStream or GOutputStream operation -while there is a GIOStream operation in progress.

-

This is a product of individual stream operations being associated with a -given GMainContext (the thread-default context at the time the operation was -started), rather than entire streams being associated with a single -GMainContext.

-

GIO may run operations on GIOStreams from other (worker) threads, and this -may be exposed to application code in the behaviour of wrapper streams, such -as GBufferedInputStream or GTlsConnection. With such wrapper APIs, -application code may only run operations on the base (wrapped) stream when -the wrapper stream is idle. Note that the semantics of such operations may -not be well-defined due to the state the wrapper stream leaves the base -stream in (though they are guaranteed not to crash).

-
-
-

Functions

-
-

g_io_stream_get_input_stream ()

-
GInputStream *
-g_io_stream_get_input_stream (GIOStream *stream);
-

Gets the input stream for this object. This is used -for reading.

-
-

Parameters

-
----- - - - - - -

stream

a GIOStream

 
-
-
-

Returns

-

a GInputStream, owned by the GIOStream. -Do not free.

-

[transfer none]

-
-

Since: 2.22

-
-
-
-

g_io_stream_get_output_stream ()

-
GOutputStream *
-g_io_stream_get_output_stream (GIOStream *stream);
-

Gets the output stream for this object. This is used for -writing.

-
-

Parameters

-
----- - - - - - -

stream

a GIOStream

 
-
-
-

Returns

-

a GOutputStream, owned by the GIOStream. -Do not free.

-

[transfer none]

-
-

Since: 2.22

-
-
-
-

g_io_stream_splice_async ()

-
void
-g_io_stream_splice_async (GIOStream *stream1,
-                          GIOStream *stream2,
-                          GIOStreamSpliceFlags flags,
-                          int io_priority,
-                          GCancellable *cancellable,
-                          GAsyncReadyCallback callback,
-                          gpointer user_data);
-

Asyncronously splice the output stream of stream1 - to the input stream of -stream2 -, and splice the output stream of stream2 - to the input stream of -stream1 -.

-

When the operation is finished callback - will be called. -You can then call g_io_stream_splice_finish() to get the -result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream1

a GIOStream.

 

stream2

a GIOStream.

 

flags

a set of GIOStreamSpliceFlags.

 

io_priority

the io priority of the request.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

user data passed to callback -.

[closure]
-
-

Since: 2.28

-
-
-
-

g_io_stream_splice_finish ()

-
gboolean
-g_io_stream_splice_finish (GAsyncResult *result,
-                           GError **error);
-

Finishes an asynchronous io stream splice operation.

-
-

Parameters

-
----- - - - - - - - - - - - - -

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE on success, FALSE otherwise.

-
-

Since: 2.28

-
-
-
-

g_io_stream_close ()

-
gboolean
-g_io_stream_close (GIOStream *stream,
-                   GCancellable *cancellable,
-                   GError **error);
-

Closes the stream, releasing resources related to it. This will also -close the individual input and output streams, if they are not already -closed.

-

Once the stream is closed, all other operations will return -G_IO_ERROR_CLOSED. Closing a stream multiple times will not -return an error.

-

Closing a stream will automatically flush any outstanding buffers -in the stream.

-

Streams will be automatically closed when the last reference -is dropped, but you might want to call this function to make sure -resources are released as early as possible.

-

Some streams might keep the backing store of the stream (e.g. a file -descriptor) open after the stream is closed. See the documentation for -the individual stream for details.

-

On failure the first error that happened will be reported, but the -close operation will finish as much as possible. A stream that failed -to close will still return G_IO_ERROR_CLOSED for all operations. -Still, it is important to check and report the error to the user, -otherwise there might be a loss of data as all data might not be written.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned. -Cancelling a close will still leave the stream closed, but some streams -can use a faster close that doesn't block to e.g. check errors.

-

The default implementation of this method just calls close on the -individual input/output streams.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GIOStream

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

TRUE on success, FALSE on failure

-
-

Since: 2.22

-
-
-
-

g_io_stream_close_async ()

-
void
-g_io_stream_close_async (GIOStream *stream,
-                         int io_priority,
-                         GCancellable *cancellable,
-                         GAsyncReadyCallback callback,
-                         gpointer user_data);
-

Requests an asynchronous close of the stream, releasing resources -related to it. When the operation is finished callback - will be -called. You can then call g_io_stream_close_finish() to get -the result of the operation.

-

For behaviour details see g_io_stream_close().

-

The asynchronous methods have a default fallback that uses threads -to implement asynchronicity, so they are optional for inheriting -classes. However, if you override one you must override all.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GIOStream

 

io_priority

the io priority of the request

 

cancellable

optional cancellable object.

[nullable]

callback

callback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-

Since: 2.22

-
-
-
-

g_io_stream_close_finish ()

-
gboolean
-g_io_stream_close_finish (GIOStream *stream,
-                          GAsyncResult *result,
-                          GError **error);
-

Closes a stream.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GIOStream

 

result

a GAsyncResult

 

error

a GError location to store the error occurring, or NULL to -ignore

 
-
-
-

Returns

-

TRUE if stream was successfully closed, FALSE otherwise.

-
-

Since: 2.22

-
-
-
-

g_io_stream_is_closed ()

-
gboolean
-g_io_stream_is_closed (GIOStream *stream);
-

Checks if a stream is closed.

-
-

Parameters

-
----- - - - - - -

stream

a GIOStream

 
-
-
-

Returns

-

TRUE if the stream is closed.

-
-

Since: 2.22

-
-
-
-

g_io_stream_has_pending ()

-
gboolean
-g_io_stream_has_pending (GIOStream *stream);
-

Checks if a stream has pending actions.

-
-

Parameters

-
----- - - - - - -

stream

a GIOStream

 
-
-
-

Returns

-

TRUE if stream -has pending actions.

-
-

Since: 2.22

-
-
-
-

g_io_stream_set_pending ()

-
gboolean
-g_io_stream_set_pending (GIOStream *stream,
-                         GError **error);
-

Sets stream - to have actions pending. If the pending flag is -already set or stream - is closed, it will return FALSE and set -error -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GIOStream

 

error

a GError location to store the error occurring, or NULL to -ignore

 
-
-
-

Returns

-

TRUE if pending was previously unset and is now set.

-
-

Since: 2.22

-
-
-
-

g_io_stream_clear_pending ()

-
void
-g_io_stream_clear_pending (GIOStream *stream);
-

Clears the pending flag on stream -.

-
-

Parameters

-
----- - - - - - -

stream

a GIOStream

 
-
-

Since: 2.22

-
-
-
-

Types and Values

-
-

enum GIOStreamSpliceFlags

-

GIOStreamSpliceFlags determine how streams should be spliced.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_IO_STREAM_SPLICE_NONE

-

Do not close either stream.

-
 

G_IO_STREAM_SPLICE_CLOSE_STREAM1

-

Close the first stream after - the splice.

-
 

G_IO_STREAM_SPLICE_CLOSE_STREAM2

-

Close the second stream after - the splice.

-
 

G_IO_STREAM_SPLICE_WAIT_FOR_BOTH

-

Wait for both splice operations to finish - before calling the callback.

-
 
-
-

Since: 2.28

-
-
-
-

GIOStream

-
typedef struct _GIOStream GIOStream;
-

Base class for read-write streams.

-
-
-
-

Property Details

-
-

The “closed” property

-
  “closed”                   gboolean
-

Is the stream closed.

-

Flags: Read

-

Default value: FALSE

-
-
-
-

The “input-stream” property

-
  “input-stream”             GInputStream *
-

The GInputStream to read from.

-

Flags: Read

-
-
-
-

The “output-stream” property

-
  “output-stream”            GOutputStream *
-

The GOutputStream to write to.

-

Flags: Read

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GIcon.html b/docs/reference/gio/html/GIcon.html deleted file mode 100644 index cc116cb1b..000000000 --- a/docs/reference/gio/html/GIcon.html +++ /dev/null @@ -1,471 +0,0 @@ - - - - -GIcon: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIcon

-

GIcon — Interface for icons

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-guint - -g_icon_hash () -
-gboolean - -g_icon_equal () -
-gchar * - -g_icon_to_string () -
-GIcon * - -g_icon_new_for_string () -
-GVariant * - -g_icon_serialize () -
-GIcon * - -g_icon_deserialize () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GIcon
structGIconIface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GIcon
-
-
-
-

Prerequisites

-

-GIcon requires - GObject.

-
-
-

Known Derived Interfaces

-

-GIcon is required by - GLoadableIcon.

-
-
-

Known Implementations

-

-GIcon is implemented by - GBytesIcon, GEmblem, GEmblemedIcon, GFileIcon and GThemedIcon.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GIcon is a very minimal interface for icons. It provides functions -for checking the equality of two icons, hashing of icons and -serializing an icon to and from strings.

-

GIcon does not provide the actual pixmap for the icon as this is out -of GIO's scope, however implementations of GIcon may contain the name -of an icon (see GThemedIcon), or the path to an icon (see GLoadableIcon).

-

To obtain a hash of a GIcon, see g_icon_hash().

-

To check if two GIcons are equal, see g_icon_equal().

-

For serializing a GIcon, use g_icon_serialize() and -g_icon_deserialize().

-

If you want to consume GIcon (for example, in a toolkit) you must -be prepared to handle at least the three following cases: -GLoadableIcon, GThemedIcon and GEmblemedIcon. It may also make -sense to have fast-paths for other cases (like handling GdkPixbuf -directly, for example) but all compliant GIcon implementations -outside of GIO must implement GLoadableIcon.

-

If your application or library provides one or more GIcon -implementations you need to ensure that your new implementation also -implements GLoadableIcon. Additionally, you must provide an -implementation of g_icon_serialize() that gives a result that is -understood by g_icon_deserialize(), yielding one of the built-in icon -types.

-
-
-

Functions

-
-

g_icon_hash ()

-
guint
-g_icon_hash (gconstpointer icon);
-

Gets a hash for an icon.

-

Virtual: hash

-
-

Parameters

-
----- - - - - - -

icon

gconstpointer to an icon object.

[not nullable]
-
-
-

Returns

-

a guint containing a hash for the icon -, suitable for -use in a GHashTable or similar data structure.

-
-
-
-
-

g_icon_equal ()

-
gboolean
-g_icon_equal (GIcon *icon1,
-              GIcon *icon2);
-

Checks if two icons are equal.

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon1

pointer to the first GIcon.

[nullable]

icon2

pointer to the second GIcon.

[nullable]
-
-
-

Returns

-

TRUE if icon1 -is equal to icon2 -. FALSE otherwise.

-
-
-
-
-

g_icon_to_string ()

-
gchar *
-g_icon_to_string (GIcon *icon);
-

Generates a textual representation of icon - that can be used for -serialization such as when passing icon - to a different process or -saving it to persistent storage. Use g_icon_new_for_string() to -get icon - back from the returned string.

-

The encoding of the returned string is proprietary to GIcon except -in the following two cases

-
    -
  • If icon - is a GFileIcon, the returned string is a native path -(such as /path/to/my icon.png) without escaping -if the GFile for icon - is a native file. If the file is not -native, the returned string is the result of g_file_get_uri() -(such as sftp://path/to/my%20icon.png).

  • -
  • If icon - is a GThemedIcon with exactly one name, the encoding is -simply the name (such as network-server).

  • -
-

Virtual: to_tokens

-
-

Parameters

-
----- - - - - - -

icon

a GIcon.

 
-
-
-

Returns

-

An allocated NUL-terminated UTF8 string or -NULL if icon -can't be serialized. Use g_free() to free.

-

[nullable]

-
-

Since: 2.20

-
-
-
-

g_icon_new_for_string ()

-
GIcon *
-g_icon_new_for_string (const gchar *str,
-                       GError **error);
-

Generate a GIcon instance from str -. This function can fail if -str - is not valid - see g_icon_to_string() for discussion.

-

If your application or library provides one or more GIcon -implementations you need to ensure that each GType is registered -with the type system prior to calling g_icon_new_for_string().

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

A string obtained via g_icon_to_string().

 

error

Return location for error.

 
-
-
-

Returns

-

An object implementing the GIcon -interface or NULL if error -is set.

-

[transfer full]

-
-

Since: 2.20

-
-
-
-

g_icon_serialize ()

-
GVariant *
-g_icon_serialize (GIcon *icon);
-

Serializes a GIcon into a GVariant. An equivalent GIcon can be retrieved -back by calling g_icon_deserialize() on the returned value. -As serialization will avoid using raw icon data when possible, it only -makes sense to transfer the GVariant between processes on the same machine, -(as opposed to over the network), and within the same file system namespace.

-
-

Parameters

-
----- - - - - - -

icon

a GIcon

 
-
-
-

Returns

-

a GVariant, or NULL when serialization fails.

-

[transfer full]

-
-

Since: 2.38

-
-
-
-

g_icon_deserialize ()

-
GIcon *
-g_icon_deserialize (GVariant *value);
-

Deserializes a GIcon previously serialized using g_icon_serialize().

-
-

Parameters

-
----- - - - - - -

value

a GVariant created with g_icon_serialize()

 
-
-
-

Returns

-

a GIcon, or NULL when deserialization fails.

-

[transfer full]

-
-

Since: 2.38

-
-
-
-

Types and Values

-
-

GIcon

-
typedef struct _GIcon GIcon;
-

An abstract type that specifies an icon.

-
-
-
-

struct GIconIface

-
struct GIconIface {
-  GTypeInterface g_iface;
-
-  /* Virtual Table */
-
-  guint       (* hash)        (GIcon   *icon);
-  gboolean    (* equal)       (GIcon   *icon1,
-                               GIcon   *icon2);
-  gboolean    (* to_tokens)   (GIcon   *icon,
-			       GPtrArray *tokens,
-                               gint    *out_version);
-  GIcon *     (* from_tokens) (gchar  **tokens,
-                               gint     num_tokens,
-                               gint     version,
-                               GError **error);
-
-  GVariant *  (* serialize)   (GIcon   *icon);
-};
-
-

GIconIface is used to implement GIcon types for various -different systems. See GThemedIcon and GLoadableIcon for -examples of how to implement this interface.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

hash ()

A hash for a given GIcon.

 

equal ()

Checks if two GIcons are equal.

 

to_tokens ()

Serializes a GIcon into tokens. The tokens must not -contain any whitespace. Don't implement if the GIcon can't be -serialized (Since 2.20).

 

from_tokens ()

Constructs a GIcon from tokens. Set the GError if -the tokens are malformed. Don't implement if the GIcon can't be -serialized (Since 2.20).

 

serialize ()

Serializes a GIcon into a GVariant. Since: 2.38

 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GInetAddress.html b/docs/reference/gio/html/GInetAddress.html deleted file mode 100644 index 96a477566..000000000 --- a/docs/reference/gio/html/GInetAddress.html +++ /dev/null @@ -1,1029 +0,0 @@ - - - - -GInetAddress: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GInetAddress

-

GInetAddress — An IPv4/IPv6 address

-
- -
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
gpointerbytesRead / Write / Construct Only
GSocketFamilyfamilyRead / Write / Construct Only
gbooleanis-anyRead
gbooleanis-link-localRead
gbooleanis-loopbackRead
gbooleanis-mc-globalRead
gbooleanis-mc-link-localRead
gbooleanis-mc-node-localRead
gbooleanis-mc-org-localRead
gbooleanis-mc-site-localRead
gbooleanis-multicastRead
gbooleanis-site-localRead
-
-
-

Types and Values

-
---- - - - - -
 GInetAddress
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GInetAddress
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GInetAddress represents an IPv4 or IPv6 internet address. Use -g_resolver_lookup_by_name() or g_resolver_lookup_by_name_async() to -look up the GInetAddress for a hostname. Use -g_resolver_lookup_by_address() or -g_resolver_lookup_by_address_async() to look up the hostname for a -GInetAddress.

-

To actually connect to a remote host, you will need a -GInetSocketAddress (which includes a GInetAddress as well as a -port number).

-
-
-

Functions

-
-

g_inet_address_new_from_string ()

-
GInetAddress *
-g_inet_address_new_from_string (const gchar *string);
-

Parses string - as an IP address and creates a new GInetAddress.

-
-

Parameters

-
----- - - - - - -

string

a string representation of an IP address

 
-
-
-

Returns

-

a new GInetAddress corresponding to string -, or NULL if -string -could not be parsed. -Free the returned object with g_object_unref().

-
-

Since: 2.22

-
-
-
-

g_inet_address_new_from_bytes ()

-
GInetAddress *
-g_inet_address_new_from_bytes (const guint8 *bytes,
-                               GSocketFamily family);
-

Creates a new GInetAddress from the given family - and bytes -. -bytes - should be 4 bytes for G_SOCKET_FAMILY_IPV4 and 16 bytes for -G_SOCKET_FAMILY_IPV6.

-
-

Parameters

-
----- - - - - - - - - - - - - -

bytes

raw address data.

[array][element-type guint8]

family

the address family of bytes -

 
-
-
-

Returns

-

a new GInetAddress corresponding to family -and bytes -. -Free the returned object with g_object_unref().

-
-

Since: 2.22

-
-
-
-

g_inet_address_new_any ()

-
GInetAddress *
-g_inet_address_new_any (GSocketFamily family);
-

Creates a GInetAddress for the "any" address (unassigned/"don't -care") for family -.

-
-

Parameters

-
----- - - - - - -

family

the address family

 
-
-
-

Returns

-

a new GInetAddress corresponding to the "any" address -for family -. -Free the returned object with g_object_unref().

-
-

Since: 2.22

-
-
-
-

g_inet_address_new_loopback ()

-
GInetAddress *
-g_inet_address_new_loopback (GSocketFamily family);
-

Creates a GInetAddress for the loopback address for family -.

-
-

Parameters

-
----- - - - - - -

family

the address family

 
-
-
-

Returns

-

a new GInetAddress corresponding to the loopback address -for family -. -Free the returned object with g_object_unref().

-
-

Since: 2.22

-
-
-
-

g_inet_address_equal ()

-
gboolean
-g_inet_address_equal (GInetAddress *address,
-                      GInetAddress *other_address);
-

Checks if two GInetAddress instances are equal, e.g. the same address.

-
-

Parameters

-
----- - - - - - - - - - - - - -

address

A GInetAddress.

 

other_address

Another GInetAddress.

 
-
-
-

Returns

-

TRUE if address -and other_address -are equal, FALSE otherwise.

-
-

Since: 2.30

-
-
-
-

g_inet_address_to_bytes ()

-
const guint8 *
-g_inet_address_to_bytes (GInetAddress *address);
-

Gets the raw binary address data from address -.

-

[skip]

-
-

Parameters

-
----- - - - - - -

address

a GInetAddress

 
-
-
-

Returns

-

a pointer to an internal array of the bytes in address -, -which should not be modified, stored, or freed. The size of this -array can be gotten with g_inet_address_get_native_size().

-
-

Since: 2.22

-
-
-
-

g_inet_address_get_native_size ()

-
gsize
-g_inet_address_get_native_size (GInetAddress *address);
-

Gets the size of the native raw binary address for address -. This -is the size of the data that you get from g_inet_address_to_bytes().

-
-

Parameters

-
----- - - - - - -

address

a GInetAddress

 
-
-
-

Returns

-

the number of bytes used for the native version of address -.

-
-

Since: 2.22

-
-
-
-

g_inet_address_to_string ()

-
gchar *
-g_inet_address_to_string (GInetAddress *address);
-

Converts address - to string form.

-
-

Parameters

-
----- - - - - - -

address

a GInetAddress

 
-
-
-

Returns

-

a representation of address -as a string, which should be -freed after use.

-
-

Since: 2.22

-
-
-
-

g_inet_address_get_family ()

-
GSocketFamily
-g_inet_address_get_family (GInetAddress *address);
-

Gets address -'s family

-
-

Parameters

-
----- - - - - - -

address

a GInetAddress

 
-
-
-

Returns

-

address -'s family

-
-

Since: 2.22

-
-
-
-

g_inet_address_get_is_any ()

-
gboolean
-g_inet_address_get_is_any (GInetAddress *address);
-

Tests whether address - is the "any" address for its family.

-
-

Parameters

-
----- - - - - - -

address

a GInetAddress

 
-
-
-

Returns

-

TRUE if address -is the "any" address for its family.

-
-

Since: 2.22

-
-
-
-

g_inet_address_get_is_loopback ()

-
gboolean
-g_inet_address_get_is_loopback (GInetAddress *address);
-

Tests whether address - is the loopback address for its family.

-
-

Parameters

-
----- - - - - - -

address

a GInetAddress

 
-
-
-

Returns

-

TRUE if address -is the loopback address for its family.

-
-

Since: 2.22

-
-
-
-

g_inet_address_get_is_link_local ()

-
gboolean
-g_inet_address_get_is_link_local (GInetAddress *address);
-

Tests whether address - is a link-local address (that is, if it -identifies a host on a local network that is not connected to the -Internet).

-
-

Parameters

-
----- - - - - - -

address

a GInetAddress

 
-
-
-

Returns

-

TRUE if address -is a link-local address.

-
-

Since: 2.22

-
-
-
-

g_inet_address_get_is_site_local ()

-
gboolean
-g_inet_address_get_is_site_local (GInetAddress *address);
-

Tests whether address - is a site-local address such as 10.0.0.1 -(that is, the address identifies a host on a local network that can -not be reached directly from the Internet, but which may have -outgoing Internet connectivity via a NAT or firewall).

-
-

Parameters

-
----- - - - - - -

address

a GInetAddress

 
-
-
-

Returns

-

TRUE if address -is a site-local address.

-
-

Since: 2.22

-
-
-
-

g_inet_address_get_is_multicast ()

-
gboolean
-g_inet_address_get_is_multicast (GInetAddress *address);
-

Tests whether address - is a multicast address.

-
-

Parameters

-
----- - - - - - -

address

a GInetAddress

 
-
-
-

Returns

-

TRUE if address -is a multicast address.

-
-

Since: 2.22

-
-
-
-

g_inet_address_get_is_mc_link_local ()

-
gboolean
-g_inet_address_get_is_mc_link_local (GInetAddress *address);
-

Tests whether address - is a link-local multicast address.

-
-

Parameters

-
----- - - - - - -

address

a GInetAddress

 
-
-
-

Returns

-

TRUE if address -is a link-local multicast address.

-
-

Since: 2.22

-
-
-
-

g_inet_address_get_is_mc_node_local ()

-
gboolean
-g_inet_address_get_is_mc_node_local (GInetAddress *address);
-

Tests whether address - is a node-local multicast address.

-
-

Parameters

-
----- - - - - - -

address

a GInetAddress

 
-
-
-

Returns

-

TRUE if address -is a node-local multicast address.

-
-

Since: 2.22

-
-
-
-

g_inet_address_get_is_mc_site_local ()

-
gboolean
-g_inet_address_get_is_mc_site_local (GInetAddress *address);
-

Tests whether address - is a site-local multicast address.

-
-

Parameters

-
----- - - - - - -

address

a GInetAddress

 
-
-
-

Returns

-

TRUE if address -is a site-local multicast address.

-
-

Since: 2.22

-
-
-
-

g_inet_address_get_is_mc_org_local ()

-
gboolean
-g_inet_address_get_is_mc_org_local (GInetAddress *address);
-

Tests whether address - is an organization-local multicast address.

-
-

Parameters

-
----- - - - - - -

address

a GInetAddress

 
-
-
-

Returns

-

TRUE if address -is an organization-local multicast address.

-
-

Since: 2.22

-
-
-
-

g_inet_address_get_is_mc_global ()

-
gboolean
-g_inet_address_get_is_mc_global (GInetAddress *address);
-

Tests whether address - is a global multicast address.

-
-

Parameters

-
----- - - - - - -

address

a GInetAddress

 
-
-
-

Returns

-

TRUE if address -is a global multicast address.

-
-

Since: 2.22

-
-
-
-

Types and Values

-
-

GInetAddress

-
typedef struct _GInetAddress GInetAddress;
-

An IPv4 or IPv6 internet address.

-
-
-
-

Property Details

-
-

The “bytes” property

-
  “bytes”                    gpointer
-

The raw address data.

-

Flags: Read / Write / Construct Only

-
-
-
-

The “family” property

-
  “family”                   GSocketFamily
-

The address family (IPv4 or IPv6).

-

Flags: Read / Write / Construct Only

-

Default value: G_SOCKET_FAMILY_INVALID

-
-
-
-

The “is-any” property

-
  “is-any”                   gboolean
-

Whether this is the "any" address for its family. -See g_inet_address_get_is_any().

-

Flags: Read

-

Default value: FALSE

-

Since: 2.22

-
-
-
-

The “is-link-local” property

-
  “is-link-local”            gboolean
-

Whether this is a link-local address. -See g_inet_address_get_is_link_local().

-

Flags: Read

-

Default value: FALSE

-

Since: 2.22

-
-
-
-

The “is-loopback” property

-
  “is-loopback”              gboolean
-

Whether this is the loopback address for its family. -See g_inet_address_get_is_loopback().

-

Flags: Read

-

Default value: FALSE

-

Since: 2.22

-
-
-
-

The “is-mc-global” property

-
  “is-mc-global”             gboolean
-

Whether this is a global multicast address. -See g_inet_address_get_is_mc_global().

-

Flags: Read

-

Default value: FALSE

-

Since: 2.22

-
-
-
-

The “is-mc-link-local” property

-
  “is-mc-link-local”         gboolean
-

Whether this is a link-local multicast address. -See g_inet_address_get_is_mc_link_local().

-

Flags: Read

-

Default value: FALSE

-

Since: 2.22

-
-
-
-

The “is-mc-node-local” property

-
  “is-mc-node-local”         gboolean
-

Whether this is a node-local multicast address. -See g_inet_address_get_is_mc_node_local().

-

Flags: Read

-

Default value: FALSE

-

Since: 2.22

-
-
-
-

The “is-mc-org-local” property

-
  “is-mc-org-local”          gboolean
-

Whether this is an organization-local multicast address. -See g_inet_address_get_is_mc_org_local().

-

Flags: Read

-

Default value: FALSE

-

Since: 2.22

-
-
-
-

The “is-mc-site-local” property

-
  “is-mc-site-local”         gboolean
-

Whether this is a site-local multicast address. -See g_inet_address_get_is_mc_site_local().

-

Flags: Read

-

Default value: FALSE

-

Since: 2.22

-
-
-
-

The “is-multicast” property

-
  “is-multicast”             gboolean
-

Whether this is a multicast address. -See g_inet_address_get_is_multicast().

-

Flags: Read

-

Default value: FALSE

-

Since: 2.22

-
-
-
-

The “is-site-local” property

-
  “is-site-local”            gboolean
-

Whether this is a site-local address. -See g_inet_address_get_is_loopback().

-

Flags: Read

-

Default value: FALSE

-

Since: 2.22

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GInetAddressMask.html b/docs/reference/gio/html/GInetAddressMask.html deleted file mode 100644 index 27e0c9002..000000000 --- a/docs/reference/gio/html/GInetAddressMask.html +++ /dev/null @@ -1,501 +0,0 @@ - - - - -GInetAddressMask: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GInetAddressMask

-

GInetAddressMask — An IPv4/IPv6 address mask

-
- -
-

Properties

-
----- - - - - - - - - - - - - - - - - - -
-GInetAddress *addressRead / Write
GSocketFamilyfamilyRead
guintlengthRead / Write
-
-
-

Types and Values

-
---- - - - - -
 GInetAddressMask
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GInetAddressMask
-
-
-
-

Implemented Interfaces

-

-GInetAddressMask implements - GInitable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GInetAddressMask represents a range of IPv4 or IPv6 addresses -described by a base address and a length indicating how many bits -of the base address are relevant for matching purposes. These are -often given in string form. Eg, "10.0.0.0/8", or "fe80::/10".

-
-
-

Functions

-
-

g_inet_address_mask_new ()

-
GInetAddressMask *
-g_inet_address_mask_new (GInetAddress *addr,
-                         guint length,
-                         GError **error);
-

Creates a new GInetAddressMask representing all addresses whose -first length - bits match addr -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

addr

a GInetAddress

 

length

number of bits of addr -to use

 

error

return location for GError, or NULL

 
-
-
-

Returns

-

a new GInetAddressMask, or NULL on error

-
-

Since: 2.32

-
-
-
-

g_inet_address_mask_new_from_string ()

-
GInetAddressMask *
-g_inet_address_mask_new_from_string (const gchar *mask_string,
-                                     GError **error);
-

Parses mask_string - as an IP address and (optional) length, and -creates a new GInetAddressMask. The length, if present, is -delimited by a "/". If it is not present, then the length is -assumed to be the full length of the address.

-
-

Parameters

-
----- - - - - - - - - - - - - -

mask_string

an IP address or address/length string

 

error

return location for GError, or NULL

 
-
-
-

Returns

-

a new GInetAddressMask corresponding to string -, or NULL -on error.

-
-

Since: 2.32

-
-
-
-

g_inet_address_mask_to_string ()

-
gchar *
-g_inet_address_mask_to_string (GInetAddressMask *mask);
-

Converts mask - back to its corresponding string form.

-
-

Parameters

-
----- - - - - - -

mask

a GInetAddressMask

 
-
-
-

Returns

-

a string corresponding to mask -.

-
-

Since: 2.32

-
-
-
-

g_inet_address_mask_get_family ()

-
GSocketFamily
-g_inet_address_mask_get_family (GInetAddressMask *mask);
-

Gets the GSocketFamily of mask -'s address

-
-

Parameters

-
----- - - - - - -

mask

a GInetAddressMask

 
-
-
-

Returns

-

the GSocketFamily of mask -'s address

-
-

Since: 2.32

-
-
-
-

g_inet_address_mask_get_address ()

-
GInetAddress *
-g_inet_address_mask_get_address (GInetAddressMask *mask);
-

Gets mask -'s base address

-
-

Parameters

-
----- - - - - - -

mask

a GInetAddressMask

 
-
-
-

Returns

-

mask -'s base address.

-

[transfer none]

-
-

Since: 2.32

-
-
-
-

g_inet_address_mask_get_length ()

-
guint
-g_inet_address_mask_get_length (GInetAddressMask *mask);
-

Gets mask -'s length

-
-

Parameters

-
----- - - - - - -

mask

a GInetAddressMask

 
-
-
-

Returns

-

mask -'s length

-
-

Since: 2.32

-
-
-
-

g_inet_address_mask_matches ()

-
gboolean
-g_inet_address_mask_matches (GInetAddressMask *mask,
-                             GInetAddress *address);
-

Tests if address - falls within the range described by mask -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

mask

a GInetAddressMask

 

address

a GInetAddress

 
-
-
-

Returns

-

whether address -falls within the range described by -mask -.

-
-

Since: 2.32

-
-
-
-

g_inet_address_mask_equal ()

-
gboolean
-g_inet_address_mask_equal (GInetAddressMask *mask,
-                           GInetAddressMask *mask2);
-

Tests if mask - and mask2 - are the same mask.

-
-

Parameters

-
----- - - - - - - - - - - - - -

mask

a GInetAddressMask

 

mask2

another GInetAddressMask

 
-
-
-

Returns

-

whether mask -and mask2 -are the same mask

-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

GInetAddressMask

-
typedef struct _GInetAddressMask GInetAddressMask;
-

A combination of an IPv4 or IPv6 base address and a length, -representing a range of IP addresses.

-

Since: 2.32

-
-
-
-

Property Details

-
-

The “address” property

-
  “address”                  GInetAddress *
-

The base address.

-

Flags: Read / Write

-
-
-
-

The “family” property

-
  “family”                   GSocketFamily
-

The address family (IPv4 or IPv6).

-

Flags: Read

-

Default value: G_SOCKET_FAMILY_INVALID

-
-
-
-

The “length” property

-
  “length”                   guint
-

The prefix length.

-

Flags: Read / Write

-

Allowed values: <= 128

-

Default value: 0

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GInetSocketAddress.html b/docs/reference/gio/html/GInetSocketAddress.html deleted file mode 100644 index ea959bd17..000000000 --- a/docs/reference/gio/html/GInetSocketAddress.html +++ /dev/null @@ -1,413 +0,0 @@ - - - - -GInetSocketAddress: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GInetSocketAddress

-

GInetSocketAddress — Internet GSocketAddress

-
- -
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - -
-GInetAddress *addressRead / Write / Construct Only
guintflowinfoRead / Write / Construct Only
guintportRead / Write / Construct Only
guintscope-idRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GInetSocketAddress
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSocketAddress
-        ╰── GInetSocketAddress
-            ╰── GProxyAddress
-
-
-
-

Implemented Interfaces

-

-GInetSocketAddress implements - GSocketConnectable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

An IPv4 or IPv6 socket address; that is, the combination of a -GInetAddress and a port number.

-
-
-

Functions

-
-

g_inet_socket_address_new ()

-
GSocketAddress *
-g_inet_socket_address_new (GInetAddress *address,
-                           guint16 port);
-

Creates a new GInetSocketAddress for address - and port -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

address

a GInetAddress

 

port

a port number

 
-
-
-

Returns

-

a new GInetSocketAddress

-
-

Since: 2.22

-
-
-
-

g_inet_socket_address_new_from_string ()

-
GSocketAddress *
-g_inet_socket_address_new_from_string (const char *address,
-                                       guint port);
-

Creates a new GInetSocketAddress for address - and port -.

-

If address - is an IPv6 address, it can also contain a scope ID -(separated from the address by a %).

-
-

Parameters

-
----- - - - - - - - - - - - - -

address

the string form of an IP address

 

port

a port number

 
-
-
-

Returns

-

a new GInetSocketAddress, or NULL if address -cannot be -parsed.

-
-

Since: 2.40

-
-
-
-

g_inet_socket_address_get_address ()

-
GInetAddress *
-g_inet_socket_address_get_address (GInetSocketAddress *address);
-

Gets address -'s GInetAddress.

-
-

Parameters

-
----- - - - - - -

address

a GInetSocketAddress

 
-
-
-

Returns

-

the GInetAddress for address -, which must be -g_object_ref()'d if it will be stored.

-

[transfer none]

-
-

Since: 2.22

-
-
-
-

g_inet_socket_address_get_port ()

-
guint16
-g_inet_socket_address_get_port (GInetSocketAddress *address);
-

Gets address -'s port.

-
-

Parameters

-
----- - - - - - -

address

a GInetSocketAddress

 
-
-
-

Returns

-

the port for address -

-
-

Since: 2.22

-
-
-
-

g_inet_socket_address_get_flowinfo ()

-
guint32
-g_inet_socket_address_get_flowinfo (GInetSocketAddress *address);
-

Gets the sin6_flowinfo field from address -, -which must be an IPv6 address.

-
-

Parameters

-
----- - - - - - -

address

a G_SOCKET_FAMILY_IPV6 GInetSocketAddress

 
-
-
-

Returns

-

the flowinfo field

-
-

Since: 2.32

-
-
-
-

g_inet_socket_address_get_scope_id ()

-
guint32
-g_inet_socket_address_get_scope_id (GInetSocketAddress *address);
-

Gets the sin6_scope_id field from address -, -which must be an IPv6 address.

-
-

Parameters

-
----- - - - - - -

address

a G_SOCKET_FAMILY_IPV6 GInetAddress

 
-
-
-

Returns

-

the scope id field

-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

GInetSocketAddress

-
typedef struct _GInetSocketAddress GInetSocketAddress;
-

An IPv4 or IPv6 socket address, corresponding to a struct -sockaddr_in or struct sockaddr_in6.

-
-
-
-

Property Details

-
-

The “address” property

-
  “address”                  GInetAddress *
-

The address.

-

Flags: Read / Write / Construct Only

-
-
-
-

The “flowinfo” property

-
  “flowinfo”                 guint
-

The sin6_flowinfo field, for IPv6 addresses.

-

Flags: Read / Write / Construct Only

-

Default value: 0

-

Since: 2.32

-
-
-
-

The “port” property

-
  “port”                     guint
-

The port.

-

Flags: Read / Write / Construct Only

-

Allowed values: <= 65535

-

Default value: 0

-
-
-
-

The “scope-id” property

-
  “scope-id”                 guint
-

IPv6 scope ID.

-

Flags: Read / Write / Construct Only

-

Default value: 0

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GInitable.html b/docs/reference/gio/html/GInitable.html deleted file mode 100644 index 0bacd1b5e..000000000 --- a/docs/reference/gio/html/GInitable.html +++ /dev/null @@ -1,446 +0,0 @@ - - - - -GInitable: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GInitable

-

GInitable — Failable object initialization interface

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
-gboolean - -g_initable_init () -
-gpointer - -g_initable_new () -
-GObject * - -g_initable_new_valist () -
-gpointer - -g_initable_newv () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GInitable
structGInitableIface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GInitable
-
-
-
-

Prerequisites

-

-GInitable requires - GObject.

-
-
-

Known Derived Interfaces

-

-GInitable is required by - GNetworkMonitor.

-
-
-

Known Implementations

-

-GInitable is implemented by - GCharsetConverter, GDBusConnection, GDBusObjectManagerClient, GDBusProxy, GDBusServer, GInetAddressMask, GSocket and GSubprocess.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GInitable is implemented by objects that can fail during -initialization. If an object implements this interface then -it must be initialized as the first thing after construction, -either via g_initable_init() or g_async_initable_init_async() -(the latter is only available if it also implements GAsyncInitable).

-

If the object is not initialized, or initialization returns with an -error, then all operations on the object except g_object_ref() and -g_object_unref() are considered to be invalid, and have undefined -behaviour. They will often fail with g_critical() or g_warning(), but -this must not be relied on.

-

Users of objects implementing this are not intended to use -the interface method directly, instead it will be used automatically -in various ways. For C applications you generally just call -g_initable_new() directly, or indirectly via a foo_thing_new() wrapper. -This will call g_initable_init() under the cover, returning NULL and -setting a GError on failure (at which point the instance is -unreferenced).

-

For bindings in languages where the native constructor supports -exceptions the binding could check for objects implemention GInitable -during normal construction and automatically initialize them, throwing -an exception on failure.

-
-
-

Functions

-
-

g_initable_init ()

-
gboolean
-g_initable_init (GInitable *initable,
-                 GCancellable *cancellable,
-                 GError **error);
-

Initializes the object implementing the interface.

-

The object must be initialized before any real use after initial -construction, either with this function or g_async_initable_init_async().

-

Implementations may also support cancellation. If cancellable - is not NULL, -then initialization can be cancelled by triggering the cancellable object -from another thread. If the operation was cancelled, the error -G_IO_ERROR_CANCELLED will be returned. If cancellable - is not NULL and -the object doesn't support cancellable initialization the error -G_IO_ERROR_NOT_SUPPORTED will be returned.

-

If the object is not initialized, or initialization returns with an -error, then all operations on the object except g_object_ref() and -g_object_unref() are considered to be invalid, and have undefined -behaviour. See the introduction for more details.

-

Implementations of this method must be idempotent, i.e. multiple calls -to this function with the same argument should return the same results. -Only the first call initializes the object, further calls return the result -of the first call. This is so that it's safe to implement the singleton -pattern in the GObject constructor function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

initable

a GInitable.

 

cancellable

optional GCancellable object, NULL to ignore.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE if successful. If an error has occurred, this function will -return FALSE and set error -appropriately if present.

-
-

Since: 2.22

-
-
-
-

g_initable_new ()

-
gpointer
-g_initable_new (GType object_type,
-                GCancellable *cancellable,
-                GError **error,
-                const gchar *first_property_name,
-                ...);
-

Helper function for constructing GInitable object. This is -similar to g_object_new() but also initializes the object -and returns NULL, setting an error on failure.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

object_type

a GType supporting GInitable.

 

cancellable

optional GCancellable object, NULL to ignore.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 

first_property_name

the name of the first property, or NULL if no -properties.

[nullable]

...

the value if the first property, followed by and other property -value pairs, and ended by NULL.

 
-
-
-

Returns

-

a newly allocated -GObject, or NULL on error.

-

[type GObject.Object][transfer full]

-
-

Since: 2.22

-
-
-
-

g_initable_new_valist ()

-
GObject *
-g_initable_new_valist (GType object_type,
-                       const gchar *first_property_name,
-                       va_list var_args,
-                       GCancellable *cancellable,
-                       GError **error);
-

Helper function for constructing GInitable object. This is -similar to g_object_new_valist() but also initializes the object -and returns NULL, setting an error on failure.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

object_type

a GType supporting GInitable.

 

first_property_name

the name of the first property, followed by -the value, and other property value pairs, and ended by NULL.

 

var_args

The var args list generated from first_property_name -.

 

cancellable

optional GCancellable object, NULL to ignore.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

a newly allocated -GObject, or NULL on error.

-

[type GObject.Object][transfer full]

-
-

Since: 2.22

-
-
-
-

g_initable_newv ()

-
gpointer
-g_initable_newv (GType object_type,
-                 guint n_parameters,
-                 GParameter *parameters,
-                 GCancellable *cancellable,
-                 GError **error);
-

Helper function for constructing GInitable object. This is -similar to g_object_newv() but also initializes the object -and returns NULL, setting an error on failure.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

object_type

a GType supporting GInitable.

 

n_parameters

the number of parameters in parameters -

 

parameters

the parameters to use to construct the object.

[array length=n_parameters]

cancellable

optional GCancellable object, NULL to ignore.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

a newly allocated -GObject, or NULL on error.

-

[type GObject.Object][transfer full]

-
-

Since: 2.22

-
-
-
-

Types and Values

-
-

GInitable

-
typedef struct _GInitable GInitable;
-

Interface for initializable objects.

-

Since: 2.22

-
-
-
-

struct GInitableIface

-
struct GInitableIface {
-  GTypeInterface g_iface;
-
-  /* Virtual Table */
-
-  gboolean    (* init) (GInitable    *initable,
-			GCancellable *cancellable,
-			GError      **error);
-};
-
-

Provides an interface for initializing object such that initialization -may fail.

-
-

Members

-
----- - - - - - -

init ()

Initializes the object.

 
-
-

Since: 2.22

-
-
-
-

See Also

-

GAsyncInitable

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GInputStream.html b/docs/reference/gio/html/GInputStream.html deleted file mode 100644 index 10ac24e67..000000000 --- a/docs/reference/gio/html/GInputStream.html +++ /dev/null @@ -1,1300 +0,0 @@ - - - - -GInputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GInputStream

-

GInputStream — Base class for implementing streaming input

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gssize - -g_input_stream_read () -
-gboolean - -g_input_stream_read_all () -
-void - -g_input_stream_read_all_async () -
-gboolean - -g_input_stream_read_all_finish () -
-gssize - -g_input_stream_skip () -
-gboolean - -g_input_stream_close () -
-void - -g_input_stream_read_async () -
-gssize - -g_input_stream_read_finish () -
-void - -g_input_stream_skip_async () -
-gssize - -g_input_stream_skip_finish () -
-void - -g_input_stream_close_async () -
-gboolean - -g_input_stream_close_finish () -
-gboolean - -g_input_stream_is_closed () -
-gboolean - -g_input_stream_has_pending () -
-gboolean - -g_input_stream_set_pending () -
-void - -g_input_stream_clear_pending () -
-GBytes * - -g_input_stream_read_bytes () -
-void - -g_input_stream_read_bytes_async () -
-GBytes * - -g_input_stream_read_bytes_finish () -
-
-
-

Types and Values

-
---- - - - - -
 GInputStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GInputStream
-        ├── GFilterInputStream
-        ├── GFileInputStream
-        ├── GMemoryInputStream
-        ╰── GUnixInputStream
-
-
-
-

Known Derived Interfaces

-

-GInputStream is required by - GPollableInputStream.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GInputStream has functions to read from a stream (g_input_stream_read()), -to close a stream (g_input_stream_close()) and to skip some content -(g_input_stream_skip()).

-

To copy the content of an input stream to an output stream without -manually handling the reads and writes, use g_output_stream_splice().

-

See the documentation for GIOStream for details of thread safety of -streaming APIs.

-

All of these functions have async variants too.

-
-
-

Functions

-
-

g_input_stream_read ()

-
gssize
-g_input_stream_read (GInputStream *stream,
-                     void *buffer,
-                     gsize count,
-                     GCancellable *cancellable,
-                     GError **error);
-

Tries to read count - bytes from the stream into the buffer starting at -buffer -. Will block during this read.

-

If count is zero returns zero and does nothing. A value of count - -larger than G_MAXSSIZE will cause a G_IO_ERROR_INVALID_ARGUMENT error.

-

On success, the number of bytes read into the buffer is returned. -It is not an error if this is not the same as the requested size, as it -can happen e.g. near the end of a file. Zero is returned on end of file -(or if count - is zero), but never otherwise.

-

The returned buffer - is not a nul-terminated string, it can contain nul bytes -at any position, and this function doesn't nul-terminate the buffer -.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an -operation was partially finished when the operation was cancelled the -partial result will be returned, without an error.

-

On error -1 is returned and error - is set accordingly.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GInputStream.

 

buffer

a buffer to -read data into (which should be at least count bytes long).

[array length=count][element-type guint8]

count

the number of bytes that will be read from the stream

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

Number of bytes read, or -1 on error, or 0 on end of file.

-
-
-
-
-

g_input_stream_read_all ()

-
gboolean
-g_input_stream_read_all (GInputStream *stream,
-                         void *buffer,
-                         gsize count,
-                         gsize *bytes_read,
-                         GCancellable *cancellable,
-                         GError **error);
-

Tries to read count - bytes from the stream into the buffer starting at -buffer -. Will block during this read.

-

This function is similar to g_input_stream_read(), except it tries to -read as many bytes as requested, only stopping on an error or end of stream.

-

On a successful read of count - bytes, or if we reached the end of the -stream, TRUE is returned, and bytes_read - is set to the number of bytes -read into buffer -.

-

If there is an error during the operation FALSE is returned and error - -is set to indicate the error status.

-

As a special exception to the normal conventions for functions that -use GError, if this function returns FALSE (and sets error -) then -bytes_read - will be set to the number of bytes that were successfully -read before the error was encountered. This functionality is only -available from C. If you need it from another language then you must -write your own loop around g_input_stream_read().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GInputStream.

 

buffer

a buffer to -read data into (which should be at least count bytes long).

[array length=count][element-type guint8]

count

the number of bytes that will be read from the stream

 

bytes_read

location to store the number of bytes that was read from the stream.

[out]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

TRUE on success, FALSE if there was an error

-
-
-
-
-

g_input_stream_read_all_async ()

-
void
-g_input_stream_read_all_async (GInputStream *stream,
-                               void *buffer,
-                               gsize count,
-                               int io_priority,
-                               GCancellable *cancellable,
-                               GAsyncReadyCallback callback,
-                               gpointer user_data);
-

Request an asynchronous read of count - bytes from the stream into the -buffer starting at buffer -.

-

This is the asynchronous equivalent of g_input_stream_read_all().

-

Call g_input_stream_read_all_finish() to collect the result.

-

Any outstanding I/O request with higher priority (lower numerical -value) will be executed before an outstanding request with lower -priority. Default priority is G_PRIORITY_DEFAULT.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

A GInputStream

 

buffer

a buffer to -read data into (which should be at least count bytes long).

[array length=count][element-type guint8]

count

the number of bytes that will be read from the stream

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

callback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-

Since: 2.44

-
-
-
-

g_input_stream_read_all_finish ()

-
gboolean
-g_input_stream_read_all_finish (GInputStream *stream,
-                                GAsyncResult *result,
-                                gsize *bytes_read,
-                                GError **error);
-

Finishes an asynchronous stream read operation started with -g_input_stream_read_all_async().

-

As a special exception to the normal conventions for functions that -use GError, if this function returns FALSE (and sets error -) then -bytes_read - will be set to the number of bytes that were successfully -read before the error was encountered. This functionality is only -available from C. If you need it from another language then you must -write your own loop around g_input_stream_read_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GInputStream

 

result

a GAsyncResult

 

bytes_read

location to store the number of bytes that was read from the stream.

[out]

error

a GError location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

TRUE on success, FALSE if there was an error

-
-

Since: 2.44

-
-
-
-

g_input_stream_skip ()

-
gssize
-g_input_stream_skip (GInputStream *stream,
-                     gsize count,
-                     GCancellable *cancellable,
-                     GError **error);
-

Tries to skip count - bytes from the stream. Will block during the operation.

-

This is identical to g_input_stream_read(), from a behaviour standpoint, -but the bytes that are skipped are not returned to the user. Some -streams have an implementation that is more efficient than reading the data.

-

This function is optional for inherited classes, as the default implementation -emulates it using read.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an -operation was partially finished when the operation was cancelled the -partial result will be returned, without an error.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GInputStream.

 

count

the number of bytes that will be skipped from the stream

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

Number of bytes skipped, or -1 on error

-
-
-
-
-

g_input_stream_close ()

-
gboolean
-g_input_stream_close (GInputStream *stream,
-                      GCancellable *cancellable,
-                      GError **error);
-

Closes the stream, releasing resources related to it.

-

Once the stream is closed, all other operations will return G_IO_ERROR_CLOSED. -Closing a stream multiple times will not return an error.

-

Streams will be automatically closed when the last reference -is dropped, but you might want to call this function to make sure -resources are released as early as possible.

-

Some streams might keep the backing store of the stream (e.g. a file descriptor) -open after the stream is closed. See the documentation for the individual -stream for details.

-

On failure the first error that happened will be reported, but the close -operation will finish as much as possible. A stream that failed to -close will still return G_IO_ERROR_CLOSED for all operations. Still, it -is important to check and report the error to the user.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned. -Cancelling a close will still leave the stream closed, but some streams -can use a faster close that doesn't block to e.g. check errors.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

A GInputStream.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

TRUE on success, FALSE on failure

-
-
-
-
-

g_input_stream_read_async ()

-
void
-g_input_stream_read_async (GInputStream *stream,
-                           void *buffer,
-                           gsize count,
-                           int io_priority,
-                           GCancellable *cancellable,
-                           GAsyncReadyCallback callback,
-                           gpointer user_data);
-

Request an asynchronous read of count - bytes from the stream into the buffer -starting at buffer -. When the operation is finished callback - will be called. -You can then call g_input_stream_read_finish() to get the result of the -operation.

-

During an async request no other sync and async calls are allowed on stream -, and will -result in G_IO_ERROR_PENDING errors.

-

A value of count - larger than G_MAXSSIZE will cause a G_IO_ERROR_INVALID_ARGUMENT error.

-

On success, the number of bytes read into the buffer will be passed to the -callback. It is not an error if this is not the same as the requested size, as it -can happen e.g. near the end of a file, but generally we try to read -as many bytes as requested. Zero is returned on end of file -(or if count - is zero), but never otherwise.

-

Any outstanding i/o request with higher priority (lower numerical value) will -be executed before an outstanding request with lower priority. Default -priority is G_PRIORITY_DEFAULT.

-

The asyncronous methods have a default fallback that uses threads to implement -asynchronicity, so they are optional for inheriting classes. However, if you -override one you must override all.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

A GInputStream.

 

buffer

a buffer to -read data into (which should be at least count bytes long).

[array length=count][element-type guint8]

count

the number of bytes that will be read from the stream

 

io_priority

the I/O priority -of the request.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

callback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_input_stream_read_finish ()

-
gssize
-g_input_stream_read_finish (GInputStream *stream,
-                            GAsyncResult *result,
-                            GError **error);
-

Finishes an asynchronous stream read operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GInputStream.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

number of bytes read in, or -1 on error, or 0 on end of file.

-
-
-
-
-

g_input_stream_skip_async ()

-
void
-g_input_stream_skip_async (GInputStream *stream,
-                           gsize count,
-                           int io_priority,
-                           GCancellable *cancellable,
-                           GAsyncReadyCallback callback,
-                           gpointer user_data);
-

Request an asynchronous skip of count - bytes from the stream. -When the operation is finished callback - will be called. -You can then call g_input_stream_skip_finish() to get the result -of the operation.

-

During an async request no other sync and async calls are allowed, -and will result in G_IO_ERROR_PENDING errors.

-

A value of count - larger than G_MAXSSIZE will cause a G_IO_ERROR_INVALID_ARGUMENT error.

-

On success, the number of bytes skipped will be passed to the callback. -It is not an error if this is not the same as the requested size, as it -can happen e.g. near the end of a file, but generally we try to skip -as many bytes as requested. Zero is returned on end of file -(or if count - is zero), but never otherwise.

-

Any outstanding i/o request with higher priority (lower numerical value) -will be executed before an outstanding request with lower priority. -Default priority is G_PRIORITY_DEFAULT.

-

The asynchronous methods have a default fallback that uses threads to -implement asynchronicity, so they are optional for inheriting classes. -However, if you override one, you must override all.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

A GInputStream.

 

count

the number of bytes that will be skipped from the stream

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

callback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_input_stream_skip_finish ()

-
gssize
-g_input_stream_skip_finish (GInputStream *stream,
-                            GAsyncResult *result,
-                            GError **error);
-

Finishes a stream skip operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GInputStream.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

the size of the bytes skipped, or -1 on error.

-
-
-
-
-

g_input_stream_close_async ()

-
void
-g_input_stream_close_async (GInputStream *stream,
-                            int io_priority,
-                            GCancellable *cancellable,
-                            GAsyncReadyCallback callback,
-                            gpointer user_data);
-

Requests an asynchronous closes of the stream, releasing resources related to it. -When the operation is finished callback - will be called. -You can then call g_input_stream_close_finish() to get the result of the -operation.

-

For behaviour details see g_input_stream_close().

-

The asyncronous methods have a default fallback that uses threads to implement -asynchronicity, so they are optional for inheriting classes. However, if you -override one you must override all.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

A GInputStream.

 

io_priority

the I/O priority of the request

 

cancellable

optional cancellable object.

[nullable]

callback

callback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_input_stream_close_finish ()

-
gboolean
-g_input_stream_close_finish (GInputStream *stream,
-                             GAsyncResult *result,
-                             GError **error);
-

Finishes closing a stream asynchronously, started from g_input_stream_close_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GInputStream.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE if the stream was closed successfully.

-
-
-
-
-

g_input_stream_is_closed ()

-
gboolean
-g_input_stream_is_closed (GInputStream *stream);
-

Checks if an input stream is closed.

-
-

Parameters

-
----- - - - - - -

stream

input stream.

 
-
-
-

Returns

-

TRUE if the stream is closed.

-
-
-
-
-

g_input_stream_has_pending ()

-
gboolean
-g_input_stream_has_pending (GInputStream *stream);
-

Checks if an input stream has pending actions.

-
-

Parameters

-
----- - - - - - -

stream

input stream.

 
-
-
-

Returns

-

TRUE if stream -has pending actions.

-
-
-
-
-

g_input_stream_set_pending ()

-
gboolean
-g_input_stream_set_pending (GInputStream *stream,
-                            GError **error);
-

Sets stream - to have actions pending. If the pending flag is -already set or stream - is closed, it will return FALSE and set -error -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

input stream

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE if pending was previously unset and is now set.

-
-
-
-
-

g_input_stream_clear_pending ()

-
void
-g_input_stream_clear_pending (GInputStream *stream);
-

Clears the pending flag on stream -.

-
-

Parameters

-
----- - - - - - -

stream

input stream

 
-
-
-
-
-

g_input_stream_read_bytes ()

-
GBytes *
-g_input_stream_read_bytes (GInputStream *stream,
-                           gsize count,
-                           GCancellable *cancellable,
-                           GError **error);
-

Like g_input_stream_read(), this tries to read count - bytes from -the stream in a blocking fashion. However, rather than reading into -a user-supplied buffer, this will create a new GBytes containing -the data that was read. This may be easier to use from language -bindings.

-

If count is zero, returns a zero-length GBytes and does nothing. A -value of count - larger than G_MAXSSIZE will cause a -G_IO_ERROR_INVALID_ARGUMENT error.

-

On success, a new GBytes is returned. It is not an error if the -size of this object is not the same as the requested size, as it -can happen e.g. near the end of a file. A zero-length GBytes is -returned on end of file (or if count - is zero), but never -otherwise.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an -operation was partially finished when the operation was cancelled the -partial result will be returned, without an error.

-

On error NULL is returned and error - is set accordingly.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GInputStream.

 

count

maximum number of bytes that will be read from the stream. Common -values include 4096 and 8192.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

a new GBytes, or NULL on error

-
-

Since: 2.34

-
-
-
-

g_input_stream_read_bytes_async ()

-
void
-g_input_stream_read_bytes_async (GInputStream *stream,
-                                 gsize count,
-                                 int io_priority,
-                                 GCancellable *cancellable,
-                                 GAsyncReadyCallback callback,
-                                 gpointer user_data);
-

Request an asynchronous read of count - bytes from the stream into a -new GBytes. When the operation is finished callback - will be -called. You can then call g_input_stream_read_bytes_finish() to get the -result of the operation.

-

During an async request no other sync and async calls are allowed -on stream -, and will result in G_IO_ERROR_PENDING errors.

-

A value of count - larger than G_MAXSSIZE will cause a -G_IO_ERROR_INVALID_ARGUMENT error.

-

On success, the new GBytes will be passed to the callback. It is -not an error if this is smaller than the requested size, as it can -happen e.g. near the end of a file, but generally we try to read as -many bytes as requested. Zero is returned on end of file (or if -count - is zero), but never otherwise.

-

Any outstanding I/O request with higher priority (lower numerical -value) will be executed before an outstanding request with lower -priority. Default priority is G_PRIORITY_DEFAULT.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

A GInputStream.

 

count

the number of bytes that will be read from the stream

 

io_priority

the I/O priority of the request

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

callback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-

Since: 2.34

-
-
-
-

g_input_stream_read_bytes_finish ()

-
GBytes *
-g_input_stream_read_bytes_finish (GInputStream *stream,
-                                  GAsyncResult *result,
-                                  GError **error);
-

Finishes an asynchronous stream read-into-GBytes operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GInputStream.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

the newly-allocated GBytes, or NULL on error

-
-

Since: 2.34

-
-
-
-

Types and Values

-
-

GInputStream

-
typedef struct _GInputStream GInputStream;
-

Base class for streaming input operations.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GListModel.html b/docs/reference/gio/html/GListModel.html deleted file mode 100644 index 8f464a2e1..000000000 --- a/docs/reference/gio/html/GListModel.html +++ /dev/null @@ -1,526 +0,0 @@ - - - - -GListModel: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GListModel

-

GListModel — An interface describing a dynamic list of objects

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - -
-GType - -g_list_model_get_item_type () -
-guint - -g_list_model_get_n_items () -
-gpointer - -g_list_model_get_item () -
-GObject * - -g_list_model_get_object () -
-void - -g_list_model_items_changed () -
-
-
-

Signals

-
----- - - - - - -
voiditems-changedRun Last
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GListModel
structGListModelInterface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GListModel
-
-
-
-

Prerequisites

-

-GListModel requires - GObject.

-
-
-

Known Implementations

-

-GListModel is implemented by - GListStore.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GListModel is an interface that represents a mutable list of -GObjects. Its main intention is as a model for various widgets in -user interfaces, such as list views, but it can also be used as a -convenient method of returning lists of data, with support for -updates.

-

Each object in the list may also report changes in itself via some -mechanism (normally the “notify” signal). Taken together -with the “items-changed” signal, this provides for a list -that can change its membership, and in which the members can change -their individual properties.

-

A good example would be the list of visible wireless network access -points, where each access point can report dynamic properties such as -signal strength.

-

It is important to note that the GListModel itself does not report -changes to the individual items. It only reports changes to the list -membership. If you want to observe changes to the objects themselves -then you need to connect signals to the objects that you are -interested in.

-

All items in a GListModel are of (or derived from) the same type. -g_list_model_get_item_type() returns that type. The type may be an -interface, in which case all objects in the list must implement it.

-

The semantics are close to that of an array: -g_list_model_get_n_items() returns the number of items in the list and -g_list_model_get_item() returns an item at a (0-based) position. In -order to allow implementations to calculate the list length lazily, -you can also iterate over items: starting from 0, repeatedly call -g_list_model_get_item() until it returns NULL.

-

An implementation may create objects lazily, but must take care to -return the same object for a given position until all references to -it are gone.

-

On the other side, a consumer is expected only to hold references on -objects that are currently "user visible", in order to faciliate the -maximum level of laziness in the implementation of the list and to -reduce the required number of signal connections at a given time.

-

This interface is intended only to be used from a single thread. The -thread in which it is appropriate to use it depends on the particular -implementation, but typically it will be from the thread that owns -the thread-default main context -in effect at the time that the model was created.

-
-
-

Functions

-
-

g_list_model_get_item_type ()

-
GType
-g_list_model_get_item_type (GListModel *list);
-

Gets the type of the items in list -. All items returned from -g_list_model_get_type() are of that type or a subtype, or are an -implementation of that interface.

-

The item type of a GListModel can not change during the life of the -model.

-
-

Parameters

-
----- - - - - - -

list

a GListModel

 
-
-
-

Returns

-

the GType of the items contained in list -.

-
-

Since: 2.44

-
-
-
-

g_list_model_get_n_items ()

-
guint
-g_list_model_get_n_items (GListModel *list);
-

Gets the number of items in list -.

-

Depending on the model implementation, calling this function may be -less efficient than iterating the list with increasing values for -position - until g_list_model_get_item() returns NULL.

-
-

Parameters

-
----- - - - - - -

list

a GListModel

 
-
-
-

Returns

-

the number of items in list -.

-
-

Since: 2.44

-
-
-
-

g_list_model_get_item ()

-
gpointer
-g_list_model_get_item (GListModel *list,
-                       guint position);
-

Get the item at position -. If position - is greater than the number of -items in list -, NULL is returned.

-

NULL is never returned for an index that is smaller than the length -of the list. See g_list_model_get_n_items().

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GListModel

 

position

the position of the item to fetch

 
-
-
-

Returns

-

the item at position -.

-

[transfer full][nullable][type GObject]

-
-

Since: 2.44

-
-
-
-

g_list_model_get_object ()

-
GObject *
-g_list_model_get_object (GListModel *list,
-                         guint position);
-

Get the item at position -. If position - is greater than the number of -items in list -, NULL is returned.

-

NULL is never returned for an index that is smaller than the length -of the list. See g_list_model_get_n_items().

-

[rename-to g_list_model_get_item]

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GListModel

 

position

the position of the item to fetch

 
-
-
-

Returns

-

the object at position -.

-

[transfer full][nullable]

-
-

Since: 2.44

-
-
-
-

g_list_model_items_changed ()

-
void
-g_list_model_items_changed (GListModel *list,
-                            guint position,
-                            guint removed,
-                            guint added);
-

Emits the “items-changed” signal on list -.

-

This function should only be called by classes implementing -GListModel. It has to be called after the internal representation -of list - has been updated, because handlers connected to this signal -might query the new state of the list.

-

Implementations must only make changes to the model (as visible to -its consumer) in places that will not cause problems for that -consumer. For models that are driven directly by a write API (such -as GListStore), changes can be reported in response to uses of that -API. For models that represent remote data, changes should only be -made from a fresh mainloop dispatch. It is particularly not -permitted to make changes in response to a call to the GListModel -consumer API.

-

Stated another way: in general, it is assumed that code making a -series of accesses to the model via the API, without returning to the -mainloop, and without calling other code, will continue to view the -same contents of the model.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

list

a GListModel

 

position

the position at which list -changed

 

removed

the number of items removed

 

added

the number of items added

 
-
-

Since: 2.44

-
-
-
-

Types and Values

-
-

GListModel

-
typedef struct _GListModel GListModel;
-

GListModel is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

struct GListModelInterface

-
struct GListModelInterface {
-  GTypeInterface g_iface;
-
-  GType     (* get_item_type)   (GListModel *list);
-
-  guint     (* get_n_items)     (GListModel *list);
-
-  gpointer  (* get_item)        (GListModel *list,
-                                 guint       position);
-};
-
-

The virtual function table for GListModel.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

get_item_type ()

the virtual function pointer for g_list_model_get_item_type()

 

get_n_items ()

the virtual function pointer for g_list_model_get_n_items()

 

get_item ()

the virtual function pointer for g_list_model_get_item()

 
-
-

Since: 2.44

-
-
-
-

Signal Details

-
-

The “items-changed” signal

-
void
-user_function (GListModel *list,
-               guint       position,
-               guint       removed,
-               guint       added,
-               gpointer    user_data)
-

This signal is emitted whenever items were added or removed to -list -. At position -, removed - items were removed and added - items -were added in their place.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

list

the GListModel that changed

 

position

the position at which list -changed

 

removed

the number of items removed

 

added

the number of items added

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.44

-
-
-
-

See Also

-

GListStore

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GListStore.html b/docs/reference/gio/html/GListStore.html deleted file mode 100644 index e5b85de64..000000000 --- a/docs/reference/gio/html/GListStore.html +++ /dev/null @@ -1,535 +0,0 @@ - - - - -GListStore: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GListStore

-

GListStore — A simple implementation of GListModel

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GListStore * - -g_list_store_new () -
-void - -g_list_store_insert () -
-guint - -g_list_store_insert_sorted () -
-void - -g_list_store_append () -
-void - -g_list_store_remove () -
-void - -g_list_store_remove_all () -
-void - -g_list_store_splice () -
-void - -g_list_store_sort () -
-
-
-

Properties

-
----- - - - - - -
-GType *item-typeRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GListStore
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GListStore
-
-
-
-

Implemented Interfaces

-

-GListStore implements - GListModel.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GListStore is a simple implementation of GListModel that stores all -items in memory.

-

It provides insertions, deletions, and lookups in logarithmic time -with a fast path for the common case of iterating the list linearly.

-
-
-

Functions

-
-

g_list_store_new ()

-
GListStore *
-g_list_store_new (GType item_type);
-

Creates a new GListStore with items of type item_type -. item_type - -must be a subclass of GObject.

-
-

Parameters

-
----- - - - - - -

item_type

the GType of items in the list

 
-
-
-

Returns

-

a new GListStore

-
-

Since: 2.44

-
-
-
-

g_list_store_insert ()

-
void
-g_list_store_insert (GListStore *store,
-                     guint position,
-                     gpointer item);
-

Inserts item - into store - at position -. item - must be of type -“item-type” or derived from it. position - must be smaller -than the length of the list, or equal to it to append.

-

This function takes a ref on item -.

-

Use g_list_store_splice() to insert multiple items at the same time -efficiently.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

store

a GListStore

 

position

the position at which to insert the new item

 

item

the new item.

[type GObject]
-
-

Since: 2.44

-
-
-
-

g_list_store_insert_sorted ()

-
guint
-g_list_store_insert_sorted (GListStore *store,
-                            gpointer item,
-                            GCompareDataFunc compare_func,
-                            gpointer user_data);
-

Inserts item - into store - at a position to be determined by the -compare_func -.

-

The list must already be sorted before calling this function or the -result is undefined. Usually you would approach this by only ever -inserting items by way of this function.

-

This function takes a ref on item -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

store

a GListStore

 

item

the new item.

[type GObject]

compare_func

pairwise comparison function for sorting.

[scope call]

user_data

user data for compare_func -.

[closure]
-
-
-

Returns

-

the position at which item -was inserted

-
-

Since: 2.44

-
-
-
-

g_list_store_append ()

-
void
-g_list_store_append (GListStore *store,
-                     gpointer item);
-

Appends item - to store -. item - must be of type “item-type”.

-

This function takes a ref on item -.

-

Use g_list_store_splice() to append multiple items at the same time -efficiently.

-
-

Parameters

-
----- - - - - - - - - - - - - -

store

a GListStore

 

item

the new item.

[type GObject]
-
-

Since: 2.44

-
-
-
-

g_list_store_remove ()

-
void
-g_list_store_remove (GListStore *store,
-                     guint position);
-

Removes the item from store - that is at position -. position - must be -smaller than the current length of the list.

-

Use g_list_store_splice() to remove multiple items at the same time -efficiently.

-
-

Parameters

-
----- - - - - - - - - - - - - -

store

a GListStore

 

position

the position of the item that is to be removed

 
-
-

Since: 2.44

-
-
-
-

g_list_store_remove_all ()

-
void
-g_list_store_remove_all (GListStore *store);
-

Removes all items from store -.

-
-

Parameters

-
----- - - - - - -

store

a GListStore

 
-
-

Since: 2.44

-
-
-
-

g_list_store_splice ()

-
void
-g_list_store_splice (GListStore *store,
-                     guint position,
-                     guint n_removals,
-                     gpointer *additions,
-                     guint n_additions);
-

Changes store - by removing n_removals - items and adding n_additions - -items to it. additions - must contain n_additions - items of type -“item-type”. NULL is not permitted.

-

This function is more efficient than g_list_store_insert() and -g_list_store_remove(), because it only emits -“items-changed” once for the change.

-

This function takes a ref on each item in additions -.

-

The parameters position - and n_removals - must be correct (ie: -position - + n_removals - must be less than or equal to the length of -the list at the time this function is called).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

store

a GListStore

 

position

the position at which to make the change

 

n_removals

the number of items to remove

 

additions

the items to add.

[array length=n_additions][element-type GObject]

n_additions

the number of items to add

 
-
-

Since: 2.44

-
-
-
-

g_list_store_sort ()

-
void
-g_list_store_sort (GListStore *store,
-                   GCompareDataFunc compare_func,
-                   gpointer user_data);
-

Sort the items in store - according to compare_func -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

store

a GListStore

 

compare_func

pairwise comparison function for sorting.

[scope call]

user_data

user data for compare_func -.

[closure]
-
-

Since: 2.46

-
-
-
-

Types and Values

-
-

GListStore

-
typedef struct _GListStore GListStore;
-

GListStore is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

Property Details

-
-

The “item-type” property

-
  “item-type”                GType *
-

The type of items contained in this list store. Items must be -subclasses of GObject.

-

Flags: Read / Write / Construct Only

-

Allowed values: GObject

-

Since: 2.44

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GLoadableIcon.html b/docs/reference/gio/html/GLoadableIcon.html deleted file mode 100644 index b20f6eed8..000000000 --- a/docs/reference/gio/html/GLoadableIcon.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - -GLoadableIcon: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GLoadableIcon

-

GLoadableIcon — Loadable Icons

-
-
-

Functions

-
---- - - - - - - - - - - - - - - -
-GInputStream * - -g_loadable_icon_load () -
-void - -g_loadable_icon_load_async () -
-GInputStream * - -g_loadable_icon_load_finish () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GLoadableIcon
structGLoadableIconIface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GLoadableIcon
-
-
-
-

Prerequisites

-

-GLoadableIcon requires - GIcon and GObject.

-
-
-

Known Implementations

-

-GLoadableIcon is implemented by - GBytesIcon and GFileIcon.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Extends the GIcon interface and adds the ability to -load icons from streams.

-
-
-

Functions

-
-

g_loadable_icon_load ()

-
GInputStream *
-g_loadable_icon_load (GLoadableIcon *icon,
-                      int size,
-                      char **type,
-                      GCancellable *cancellable,
-                      GError **error);
-

Loads a loadable icon. For the asynchronous version of this function, -see g_loadable_icon_load_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

icon

a GLoadableIcon.

 

size

an integer.

 

type

a location to store the type of the loaded -icon, NULL to ignore.

[out][optional]

cancellable

optional GCancellable object, NULL to -ignore.

[nullable]

error

a GError location to store the error occurring, or NULL -to ignore.

 
-
-
-

Returns

-

a GInputStream to read the icon from.

-

[transfer full]

-
-
-
-
-

g_loadable_icon_load_async ()

-
void
-g_loadable_icon_load_async (GLoadableIcon *icon,
-                            int size,
-                            GCancellable *cancellable,
-                            GAsyncReadyCallback callback,
-                            gpointer user_data);
-

Loads an icon asynchronously. To finish this function, see -g_loadable_icon_load_finish(). For the synchronous, blocking -version of this function, see g_loadable_icon_load().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

icon

a GLoadableIcon.

 

size

an integer.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call when the -request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_loadable_icon_load_finish ()

-
GInputStream *
-g_loadable_icon_load_finish (GLoadableIcon *icon,
-                             GAsyncResult *res,
-                             char **type,
-                             GError **error);
-

Finishes an asynchronous icon load started in g_loadable_icon_load_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

icon

a GLoadableIcon.

 

res

a GAsyncResult.

 

type

a location to store the type of the loaded -icon, NULL to ignore.

[out][optional]

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

a GInputStream to read the icon from.

-

[transfer full]

-
-
-
-
-

Types and Values

-
-

GLoadableIcon

-
typedef struct _GLoadableIcon GLoadableIcon;
-

Generic type for all kinds of icons that can be loaded -as a stream.

-
-
-
-

struct GLoadableIconIface

-
struct GLoadableIconIface {
-  GTypeInterface g_iface;
-
-  /* Virtual Table */
-
-  GInputStream * (* load)        (GLoadableIcon       *icon,
-                                  int                  size,
-                                  char               **type,
-                                  GCancellable        *cancellable,
-                                  GError             **error);
-  void           (* load_async)  (GLoadableIcon       *icon,
-                                  int                  size,
-                                  GCancellable        *cancellable,
-                                  GAsyncReadyCallback  callback,
-                                  gpointer             user_data);
-  GInputStream * (* load_finish) (GLoadableIcon       *icon,
-                                  GAsyncResult        *res,
-                                  char               **type,
-                                  GError             **error);
-};
-
-

Interface for icons that can be loaded as a stream.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

load ()

Loads an icon.

 

load_async ()

Loads an icon asynchronously.

 

load_finish ()

Finishes an asynchronous icon load.

 
-
-
-
-
-

See Also

-

GIcon, GThemedIcon

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GMemoryInputStream.html b/docs/reference/gio/html/GMemoryInputStream.html deleted file mode 100644 index 325b68226..000000000 --- a/docs/reference/gio/html/GMemoryInputStream.html +++ /dev/null @@ -1,304 +0,0 @@ - - - - -GMemoryInputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GMemoryInputStream

-

GMemoryInputStream — Streaming input operations on memory chunks

-
-
-

Functions

- -
-
-

Types and Values

-
---- - - - - -
 GMemoryInputStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GInputStream
-        ╰── GMemoryInputStream
-
-
-
-

Implemented Interfaces

-

-GMemoryInputStream implements - GSeekable and GPollableInputStream.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GMemoryInputStream is a class for using arbitrary -memory chunks as input for GIO streaming input operations.

-

As of GLib 2.34, GMemoryInputStream implements -GPollableInputStream.

-
-
-

Functions

-
-

g_memory_input_stream_new ()

-
GInputStream *
-g_memory_input_stream_new (void);
-

Creates a new empty GMemoryInputStream.

-
-

Returns

-

a new GInputStream

-
-
-
-
-

g_memory_input_stream_new_from_data ()

-
GInputStream *
-g_memory_input_stream_new_from_data (const void *data,
-                                     gssize len,
-                                     GDestroyNotify destroy);
-

Creates a new GMemoryInputStream with data in memory of a given size.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

data

input data.

[array length=len][element-type guint8][transfer full]

len

length of the data, may be -1 if data -is a nul-terminated string

 

destroy

function that is called to free data -, or NULL.

[nullable]
-
-
-

Returns

-

new GInputStream read from data -of len -bytes.

-
-
-
-
-

g_memory_input_stream_new_from_bytes ()

-
GInputStream *
-g_memory_input_stream_new_from_bytes (GBytes *bytes);
-

Creates a new GMemoryInputStream with data from the given bytes -.

-
-

Parameters

-
----- - - - - - -

bytes

a GBytes

 
-
-
-

Returns

-

new GInputStream read from bytes -

-
-

Since: 2.34

-
-
-
-

g_memory_input_stream_add_data ()

-
void
-g_memory_input_stream_add_data (GMemoryInputStream *stream,
-                                const void *data,
-                                gssize len,
-                                GDestroyNotify destroy);
-

Appends data - to data that can be read from the input stream

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GMemoryInputStream

 

data

input data.

[array length=len][element-type guint8][transfer full]

len

length of the data, may be -1 if data -is a nul-terminated string

 

destroy

function that is called to free data -, or NULL.

[nullable]
-
-
-
-
-

g_memory_input_stream_add_bytes ()

-
void
-g_memory_input_stream_add_bytes (GMemoryInputStream *stream,
-                                 GBytes *bytes);
-

Appends bytes - to data that can be read from the input stream.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GMemoryInputStream

 

bytes

input data

 
-
-

Since: 2.34

-
-
-
-

Types and Values

-
-

GMemoryInputStream

-
typedef struct _GMemoryInputStream GMemoryInputStream;
-

Implements GInputStream for arbitrary memory chunks.

-
-
-
-

See Also

-

GMemoryOutputStream

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GMemoryOutputStream.html b/docs/reference/gio/html/GMemoryOutputStream.html deleted file mode 100644 index 02d4f16e8..000000000 --- a/docs/reference/gio/html/GMemoryOutputStream.html +++ /dev/null @@ -1,577 +0,0 @@ - - - - -GMemoryOutputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GMemoryOutputStream

-

GMemoryOutputStream — Streaming output operations on memory chunks

-
- -
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
gpointerdataRead / Write / Construct Only
gulongdata-sizeRead
gpointerdestroy-functionRead / Write / Construct Only
gpointerrealloc-functionRead / Write / Construct Only
gulongsizeRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GMemoryOutputStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GOutputStream
-        ╰── GMemoryOutputStream
-
-
-
-

Implemented Interfaces

-

-GMemoryOutputStream implements - GSeekable and GPollableOutputStream.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GMemoryOutputStream is a class for using arbitrary -memory chunks as output for GIO streaming output operations.

-

As of GLib 2.34, GMemoryOutputStream trivially implements -GPollableOutputStream: it always polls as ready.

-
-
-

Functions

-
-

GReallocFunc ()

-
gpointer
-(*GReallocFunc) (gpointer data,
-                 gsize size);
-

Changes the size of the memory block pointed to by data - to -size - bytes.

-

The function should have the same semantics as realloc().

-
-

Parameters

-
----- - - - - - - - - - - - - -

data

memory block to reallocate

 

size

size to reallocate data -to

 
-
-
-

Returns

-

a pointer to the reallocated memory

-
-
-
-
-

g_memory_output_stream_new ()

-
GOutputStream *
-g_memory_output_stream_new (gpointer data,
-                            gsize size,
-                            GReallocFunc realloc_function,
-                            GDestroyNotify destroy_function);
-

Creates a new GMemoryOutputStream.

-

In most cases this is not the function you want. See -g_memory_output_stream_new_resizable() instead.

-

If data - is non-NULL, the stream will use that for its internal storage.

-

If realloc_fn - is non-NULL, it will be used for resizing the internal -storage when necessary and the stream will be considered resizable. -In that case, the stream will start out being (conceptually) empty. -size - is used only as a hint for how big data - is. Specifically, -seeking to the end of a newly-created stream will seek to zero, not -size -. Seeking past the end of the stream and then writing will -introduce a zero-filled gap.

-

If realloc_fn - is NULL then the stream is fixed-sized. Seeking to -the end will seek to size - exactly. Writing past the end will give -an 'out of space' error. Attempting to seek past the end will fail. -Unlike the resizable case, seeking to an offset within the stream and -writing will preserve the bytes passed in as data - before that point -and will return them as part of g_memory_output_stream_steal_data(). -If you intend to seek you should probably therefore ensure that data - -is properly initialised.

-

It is probably only meaningful to provide data - and size - in the case -that you want a fixed-sized stream. Put another way: if realloc_fn - -is non-NULL then it makes most sense to give data - as NULL and -size - as 0 (allowing GMemoryOutputStream to do the initial -allocation for itself).

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
// a stream that can grow
-stream = g_memory_output_stream_new (NULL, 0, realloc, free);
-
-// another stream that can grow
-stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
-
-// a fixed-size stream
-data = malloc (200);
-stream3 = g_memory_output_stream_new (data, 200, NULL, free);
-
- -

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

data

pointer to a chunk of memory to use, or NULL.

[nullable]

size

the size of data -

 

realloc_function

a function with realloc() semantics (like g_realloc()) -to be called when data -needs to be grown, or NULL.

[nullable]

destroy_function

a function to be called on data -when the stream is -finalized, or NULL.

[nullable]
-
-
-

Returns

-

A newly created GMemoryOutputStream object.

-
-
-
-
-

g_memory_output_stream_new_resizable ()

-
GOutputStream *
-g_memory_output_stream_new_resizable (void);
-

Creates a new GMemoryOutputStream, using g_realloc() and g_free() -for memory allocation.

-

Since: 2.36

-
-
-
-

g_memory_output_stream_get_data ()

-
gpointer
-g_memory_output_stream_get_data (GMemoryOutputStream *ostream);
-

Gets any loaded data from the ostream -.

-

Note that the returned pointer may become invalid on the next -write or truncate operation on the stream.

-
-

Parameters

-
----- - - - - - -

ostream

a GMemoryOutputStream

 
-
-
-

Returns

-

pointer to the stream's data, or NULL if the data -has been stolen.

-

[transfer none]

-
-
-
-
-

g_memory_output_stream_get_size ()

-
gsize
-g_memory_output_stream_get_size (GMemoryOutputStream *ostream);
-

Gets the size of the currently allocated data area (available from -g_memory_output_stream_get_data()).

-

You probably don't want to use this function on resizable streams. -See g_memory_output_stream_get_data_size() instead. For resizable -streams the size returned by this function is an implementation -detail and may be change at any time in response to operations on the -stream.

-

If the stream is fixed-sized (ie: no realloc was passed to -g_memory_output_stream_new()) then this is the maximum size of the -stream and further writes will return G_IO_ERROR_NO_SPACE.

-

In any case, if you want the number of bytes currently written to the -stream, use g_memory_output_stream_get_data_size().

-
-

Parameters

-
----- - - - - - -

ostream

a GMemoryOutputStream

 
-
-
-

Returns

-

the number of bytes allocated for the data buffer

-
-
-
-
-

g_memory_output_stream_get_data_size ()

-
gsize
-g_memory_output_stream_get_data_size (GMemoryOutputStream *ostream);
-

Returns the number of bytes from the start up to including the last -byte written in the stream that has not been truncated away.

-
-

Parameters

-
----- - - - - - -

ostream

a GMemoryOutputStream

 
-
-
-

Returns

-

the number of bytes written to the stream

-
-

Since: 2.18

-
-
-
-

g_memory_output_stream_steal_data ()

-
gpointer
-g_memory_output_stream_steal_data (GMemoryOutputStream *ostream);
-

Gets any loaded data from the ostream -. Ownership of the data -is transferred to the caller; when no longer needed it must be -freed using the free function set in ostream -'s -“destroy-function” property.

-

ostream - must be closed before calling this function.

-
-

Parameters

-
----- - - - - - -

ostream

a GMemoryOutputStream

 
-
-
-

Returns

-

the stream's data, or NULL if it has previously -been stolen.

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_memory_output_stream_steal_as_bytes ()

-
GBytes *
-g_memory_output_stream_steal_as_bytes (GMemoryOutputStream *ostream);
-

Returns data from the ostream - as a GBytes. ostream - must be -closed before calling this function.

-
-

Parameters

-
----- - - - - - -

ostream

a GMemoryOutputStream

 
-
-
-

Returns

-

the stream's data.

-

[transfer full]

-
-

Since: 2.34

-
-
-
-

Types and Values

-
-

GMemoryOutputStream

-
typedef struct _GMemoryOutputStream GMemoryOutputStream;
-

Implements GOutputStream for arbitrary memory chunks.

-
-
-
-

Property Details

-
-

The “data” property

-
  “data”                     gpointer
-

Pointer to buffer where data will be written.

-

Flags: Read / Write / Construct Only

-

Since: 2.24

-
-
-
-

The “data-size” property

-
  “data-size”                gulong
-

Size of data written to the buffer.

-

Flags: Read

-

Since: 2.24

-
-
-
-

The “destroy-function” property

-
  “destroy-function”         gpointer
-

Function called with the buffer as argument when the stream is destroyed.

-

[skip]

-

Flags: Read / Write / Construct Only

-

Since: 2.24

-
-
-
-

The “realloc-function” property

-
  “realloc-function”         gpointer
-

Function with realloc semantics called to enlarge the buffer.

-

[skip]

-

Flags: Read / Write / Construct Only

-

Since: 2.24

-
-
-
-

The “size” property

-
  “size”                     gulong
-

Current size of the data buffer.

-

Flags: Read / Write / Construct Only

-

Since: 2.24

-
-
-
-

See Also

-

GMemoryInputStream

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GMenu.html b/docs/reference/gio/html/GMenu.html deleted file mode 100644 index 4b6676edd..000000000 --- a/docs/reference/gio/html/GMenu.html +++ /dev/null @@ -1,1870 +0,0 @@ - - - - -GMenu: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GMenu

-

GMenu — A simple implementation of GMenuModel

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GMenu * - -g_menu_new () -
-void - -g_menu_freeze () -
-void - -g_menu_insert () -
-void - -g_menu_prepend () -
-void - -g_menu_append () -
-void - -g_menu_insert_item () -
-void - -g_menu_append_item () -
-void - -g_menu_prepend_item () -
-void - -g_menu_insert_section () -
-void - -g_menu_prepend_section () -
-void - -g_menu_append_section () -
-void - -g_menu_append_submenu () -
-void - -g_menu_insert_submenu () -
-void - -g_menu_prepend_submenu () -
-void - -g_menu_remove () -
-void - -g_menu_remove_all () -
-GMenuItem * - -g_menu_item_new () -
-GMenuItem * - -g_menu_item_new_section () -
-GMenuItem * - -g_menu_item_new_submenu () -
-GMenuItem * - -g_menu_item_new_from_model () -
-void - -g_menu_item_set_label () -
-void - -g_menu_item_set_icon () -
-void - -g_menu_item_set_action_and_target_value () -
-void - -g_menu_item_set_action_and_target () -
-void - -g_menu_item_set_detailed_action () -
-void - -g_menu_item_set_section () -
-void - -g_menu_item_set_submenu () -
-GVariant * - -g_menu_item_get_attribute_value () -
-gboolean - -g_menu_item_get_attribute () -
-GMenuModel * - -g_menu_item_get_link () -
-void - -g_menu_item_set_attribute_value () -
-void - -g_menu_item_set_attribute () -
-void - -g_menu_item_set_link () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GMenu
 GMenuItem
-
-
-

Object Hierarchy

-
    GObject
-    ├── GMenuItem
-    ╰── GMenuModel
-        ╰── GMenu
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GMenu is a simple implementation of GMenuModel. -You populate a GMenu by adding GMenuItem instances to it.

-

There are some convenience functions to allow you to directly -add items (avoiding GMenuItem) for the common cases. To add -a regular item, use g_menu_insert(). To add a section, use -g_menu_insert_section(). To add a submenu, use -g_menu_insert_submenu().

-
-
-

Functions

-
-

g_menu_new ()

-
GMenu *
-g_menu_new (void);
-

Creates a new GMenu.

-

The new menu has no items.

-
-

Returns

-

a new GMenu

-
-

Since: 2.32

-
-
-
-

g_menu_freeze ()

-
void
-g_menu_freeze (GMenu *menu);
-

Marks menu - as frozen.

-

After the menu is frozen, it is an error to attempt to make any -changes to it. In effect this means that the GMenu API must no -longer be used.

-

This function causes g_menu_model_is_mutable() to begin returning -FALSE, which has some positive performance implications.

-
-

Parameters

-
----- - - - - - -

menu

a GMenu

 
-
-

Since: 2.32

-
-
-
-

g_menu_insert ()

-
void
-g_menu_insert (GMenu *menu,
-               gint position,
-               const gchar *label,
-               const gchar *detailed_action);
-

Convenience function for inserting a normal menu item into menu -. -Combine g_menu_item_new() and g_menu_insert_item() for a more flexible -alternative.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

menu

a GMenu

 

position

the position at which to insert the item

 

label

the section label, or NULL.

[nullable]

detailed_action

the detailed action string, or NULL.

[nullable]
-
-

Since: 2.32

-
-
-
-

g_menu_prepend ()

-
void
-g_menu_prepend (GMenu *menu,
-                const gchar *label,
-                const gchar *detailed_action);
-

Convenience function for prepending a normal menu item to the start -of menu -. Combine g_menu_item_new() and g_menu_insert_item() for a more -flexible alternative.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

menu

a GMenu

 

label

the section label, or NULL.

[nullable]

detailed_action

the detailed action string, or NULL.

[nullable]
-
-

Since: 2.32

-
-
-
-

g_menu_append ()

-
void
-g_menu_append (GMenu *menu,
-               const gchar *label,
-               const gchar *detailed_action);
-

Convenience function for appending a normal menu item to the end of -menu -. Combine g_menu_item_new() and g_menu_insert_item() for a more -flexible alternative.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

menu

a GMenu

 

label

the section label, or NULL.

[nullable]

detailed_action

the detailed action string, or NULL.

[nullable]
-
-

Since: 2.32

-
-
-
-

g_menu_insert_item ()

-
void
-g_menu_insert_item (GMenu *menu,
-                    gint position,
-                    GMenuItem *item);
-

Inserts item - into menu -.

-

The "insertion" is actually done by copying all of the attribute and -link values of item - and using them to form a new item within menu -. -As such, item - itself is not really inserted, but rather, a menu item -that is exactly the same as the one presently described by item -.

-

This means that item - is essentially useless after the insertion -occurs. Any changes you make to it are ignored unless it is inserted -again (at which point its updated values will be copied).

-

You should probably just free item - once you're done.

-

There are many convenience functions to take care of common cases. -See g_menu_insert(), g_menu_insert_section() and -g_menu_insert_submenu() as well as "prepend" and "append" variants of -each of these functions.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

menu

a GMenu

 

position

the position at which to insert the item

 

item

the GMenuItem to insert

 
-
-

Since: 2.32

-
-
-
-

g_menu_append_item ()

-
void
-g_menu_append_item (GMenu *menu,
-                    GMenuItem *item);
-

Appends item - to the end of menu -.

-

See g_menu_insert_item() for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - -

menu

a GMenu

 

item

a GMenuItem to append

 
-
-

Since: 2.32

-
-
-
-

g_menu_prepend_item ()

-
void
-g_menu_prepend_item (GMenu *menu,
-                     GMenuItem *item);
-

Prepends item - to the start of menu -.

-

See g_menu_insert_item() for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - -

menu

a GMenu

 

item

a GMenuItem to prepend

 
-
-

Since: 2.32

-
-
-
-

g_menu_insert_section ()

-
void
-g_menu_insert_section (GMenu *menu,
-                       gint position,
-                       const gchar *label,
-                       GMenuModel *section);
-

Convenience function for inserting a section menu item into menu -. -Combine g_menu_item_new_section() and g_menu_insert_item() for a more -flexible alternative.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

menu

a GMenu

 

position

the position at which to insert the item

 

label

the section label, or NULL.

[nullable]

section

a GMenuModel with the items of the section

 
-
-

Since: 2.32

-
-
-
-

g_menu_prepend_section ()

-
void
-g_menu_prepend_section (GMenu *menu,
-                        const gchar *label,
-                        GMenuModel *section);
-

Convenience function for prepending a section menu item to the start -of menu -. Combine g_menu_item_new_section() and g_menu_insert_item() for -a more flexible alternative.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

menu

a GMenu

 

label

the section label, or NULL.

[nullable]

section

a GMenuModel with the items of the section

 
-
-

Since: 2.32

-
-
-
-

g_menu_append_section ()

-
void
-g_menu_append_section (GMenu *menu,
-                       const gchar *label,
-                       GMenuModel *section);
-

Convenience function for appending a section menu item to the end of -menu -. Combine g_menu_item_new_section() and g_menu_insert_item() for a -more flexible alternative.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

menu

a GMenu

 

label

the section label, or NULL.

[nullable]

section

a GMenuModel with the items of the section

 
-
-

Since: 2.32

-
-
-
-

g_menu_append_submenu ()

-
void
-g_menu_append_submenu (GMenu *menu,
-                       const gchar *label,
-                       GMenuModel *submenu);
-

Convenience function for appending a submenu menu item to the end of -menu -. Combine g_menu_item_new_submenu() and g_menu_insert_item() for a -more flexible alternative.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

menu

a GMenu

 

label

the section label, or NULL.

[nullable]

submenu

a GMenuModel with the items of the submenu

 
-
-

Since: 2.32

-
-
-
-

g_menu_insert_submenu ()

-
void
-g_menu_insert_submenu (GMenu *menu,
-                       gint position,
-                       const gchar *label,
-                       GMenuModel *submenu);
-

Convenience function for inserting a submenu menu item into menu -. -Combine g_menu_item_new_submenu() and g_menu_insert_item() for a more -flexible alternative.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

menu

a GMenu

 

position

the position at which to insert the item

 

label

the section label, or NULL.

[nullable]

submenu

a GMenuModel with the items of the submenu

 
-
-

Since: 2.32

-
-
-
-

g_menu_prepend_submenu ()

-
void
-g_menu_prepend_submenu (GMenu *menu,
-                        const gchar *label,
-                        GMenuModel *submenu);
-

Convenience function for prepending a submenu menu item to the start -of menu -. Combine g_menu_item_new_submenu() and g_menu_insert_item() for -a more flexible alternative.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

menu

a GMenu

 

label

the section label, or NULL.

[nullable]

submenu

a GMenuModel with the items of the submenu

 
-
-

Since: 2.32

-
-
-
-

g_menu_remove ()

-
void
-g_menu_remove (GMenu *menu,
-               gint position);
-

Removes an item from the menu.

-

position - gives the index of the item to remove.

-

It is an error if position is not in range the range from 0 to one -less than the number of items in the menu.

-

It is not possible to remove items by identity since items are added -to the menu simply by copying their links and attributes (ie: -identity of the item itself is not preserved).

-
-

Parameters

-
----- - - - - - - - - - - - - -

menu

a GMenu

 

position

the position of the item to remove

 
-
-

Since: 2.32

-
-
-
-

g_menu_remove_all ()

-
void
-g_menu_remove_all (GMenu *menu);
-

Removes all items in the menu.

-
-

Parameters

-
----- - - - - - -

menu

a GMenu

 
-
-

Since: 2.38

-
-
-
-

g_menu_item_new ()

-
GMenuItem *
-g_menu_item_new (const gchar *label,
-                 const gchar *detailed_action);
-

Creates a new GMenuItem.

-

If label - is non-NULL it is used to set the "label" attribute of the -new item.

-

If detailed_action - is non-NULL it is used to set the "action" and -possibly the "target" attribute of the new item. See -g_menu_item_set_detailed_action() for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - -

label

the section label, or NULL.

[nullable]

detailed_action

the detailed action string, or NULL.

[nullable]
-
-
-

Returns

-

a new GMenuItem

-
-

Since: 2.32

-
-
-
-

g_menu_item_new_section ()

-
GMenuItem *
-g_menu_item_new_section (const gchar *label,
-                         GMenuModel *section);
-

Creates a new GMenuItem representing a section.

-

This is a convenience API around g_menu_item_new() and -g_menu_item_set_section().

-

The effect of having one menu appear as a section of another is -exactly as it sounds: the items from section - become a direct part of -the menu that menu_item - is added to.

-

Visual separation is typically displayed between two non-empty -sections. If label - is non-NULL then it will be encorporated into -this visual indication. This allows for labeled subsections of a -menu.

-

As a simple example, consider a typical "Edit" menu from a simple -program. It probably contains an "Undo" and "Redo" item, followed by -a separator, followed by "Cut", "Copy" and "Paste".

-

This would be accomplished by creating three GMenu instances. The -first would be populated with the "Undo" and "Redo" items, and the -second with the "Cut", "Copy" and "Paste" items. The first and -second menus would then be added as submenus of the third. In XML -format, this would look something like the following:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
<menu id='edit-menu'>
-  <section>
-    <item label='Undo'/>
-    <item label='Redo'/>
-  </section>
-  <section>
-    <item label='Cut'/>
-    <item label='Copy'/>
-    <item label='Paste'/>
-  </section>
-</menu>
-
- -

-

The following example is exactly equivalent. It is more illustrative -of the exact relationship between the menus and items (keeping in -mind that the 'link' element defines a new menu that is linked to the -containing one). The style of the second example is more verbose and -difficult to read (and therefore not recommended except for the -purpose of understanding what is really going on).

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
<menu id='edit-menu'>
-  <item>
-    <link name='section'>
-      <item label='Undo'/>
-      <item label='Redo'/>
-    </link>
-  </item>
-  <item>
-    <link name='section'>
-      <item label='Cut'/>
-      <item label='Copy'/>
-      <item label='Paste'/>
-    </link>
-  </item>
-</menu>
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

label

the section label, or NULL.

[nullable]

section

a GMenuModel with the items of the section

 
-
-
-

Returns

-

a new GMenuItem

-
-

Since: 2.32

-
-
-
-

g_menu_item_new_submenu ()

-
GMenuItem *
-g_menu_item_new_submenu (const gchar *label,
-                         GMenuModel *submenu);
-

Creates a new GMenuItem representing a submenu.

-

This is a convenience API around g_menu_item_new() and -g_menu_item_set_submenu().

-
-

Parameters

-
----- - - - - - - - - - - - - -

label

the section label, or NULL.

[nullable]

submenu

a GMenuModel with the items of the submenu

 
-
-
-

Returns

-

a new GMenuItem

-
-

Since: 2.32

-
-
-
-

g_menu_item_new_from_model ()

-
GMenuItem *
-g_menu_item_new_from_model (GMenuModel *model,
-                            gint item_index);
-

Creates a GMenuItem as an exact copy of an existing menu item in a -GMenuModel.

-

item_index - must be valid (ie: be sure to call -g_menu_model_get_n_items() first).

-
-

Parameters

-
----- - - - - - - - - - - - - -

model

a GMenuModel

 

item_index

the index of an item in model -

 
-
-
-

Returns

-

a new GMenuItem.

-
-

Since: 2.34

-
-
-
-

g_menu_item_set_label ()

-
void
-g_menu_item_set_label (GMenuItem *menu_item,
-                       const gchar *label);
-

Sets or unsets the "label" attribute of menu_item -.

-

If label - is non-NULL it is used as the label for the menu item. If -it is NULL then the label attribute is unset.

-
-

Parameters

-
----- - - - - - - - - - - - - -

menu_item

a GMenuItem

 

label

the label to set, or NULL to unset.

[nullable]
-
-

Since: 2.32

-
-
-
-

g_menu_item_set_icon ()

-
void
-g_menu_item_set_icon (GMenuItem *menu_item,
-                      GIcon *icon);
-

Sets (or unsets) the icon on menu_item -.

-

This call is the same as calling g_icon_serialize() and using the -result as the value to g_menu_item_set_attribute_value() for -G_MENU_ATTRIBUTE_ICON.

-

This API is only intended for use with "noun" menu items; things like -bookmarks or applications in an "Open With" menu. Don't use it on -menu items corresponding to verbs (eg: stock icons for 'Save' or -'Quit').

-

If icon - is NULL then the icon is unset.

-
-

Parameters

-
----- - - - - - - - - - - - - -

menu_item

a GMenuItem

 

icon

a GIcon, or NULL

 
-
-

Since: 2.38

-
-
-
-

g_menu_item_set_action_and_target_value ()

-
void
-g_menu_item_set_action_and_target_value
-                               (GMenuItem *menu_item,
-                                const gchar *action,
-                                GVariant *target_value);
-

Sets or unsets the "action" and "target" attributes of menu_item -.

-

If action - is NULL then both the "action" and "target" attributes -are unset (and target_value - is ignored).

-

If action - is non-NULL then the "action" attribute is set. The -"target" attribute is then set to the value of target_value - if it is -non-NULL or unset otherwise.

-

Normal menu items (ie: not submenu, section or other custom item -types) are expected to have the "action" attribute set to identify -the action that they are associated with. The state type of the -action help to determine the disposition of the menu item. See -GAction and GActionGroup for an overview of actions.

-

In general, clicking on the menu item will result in activation of -the named action with the "target" attribute given as the parameter -to the action invocation. If the "target" attribute is not set then -the action is invoked with no parameter.

-

If the action has no state then the menu item is usually drawn as a -plain menu item (ie: with no additional decoration).

-

If the action has a boolean state then the menu item is usually drawn -as a toggle menu item (ie: with a checkmark or equivalent -indication). The item should be marked as 'toggled' or 'checked' -when the boolean state is TRUE.

-

If the action has a string state then the menu item is usually drawn -as a radio menu item (ie: with a radio bullet or equivalent -indication). The item should be marked as 'selected' when the string -state is equal to the value of the target - property.

-

See g_menu_item_set_action_and_target() or -g_menu_item_set_detailed_action() for two equivalent calls that are -probably more convenient for most uses.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

menu_item

a GMenuItem

 

action

the name of the action for this item.

[nullable]

target_value

a GVariant to use as the action target.

[nullable]
-
-

Since: 2.32

-
-
-
-

g_menu_item_set_action_and_target ()

-
void
-g_menu_item_set_action_and_target (GMenuItem *menu_item,
-                                   const gchar *action,
-                                   const gchar *format_string,
-                                   ...);
-

Sets or unsets the "action" and "target" attributes of menu_item -.

-

If action - is NULL then both the "action" and "target" attributes -are unset (and format_string - is ignored along with the positional -parameters).

-

If action - is non-NULL then the "action" attribute is set. -format_string - is then inspected. If it is non-NULL then the proper -position parameters are collected to create a GVariant instance to -use as the target value. If it is NULL then the positional -parameters are ignored and the "target" attribute is unset.

-

See also g_menu_item_set_action_and_target_value() for an equivalent -call that directly accepts a GVariant. See -g_menu_item_set_detailed_action() for a more convenient version that -works with string-typed targets.

-

See also g_menu_item_set_action_and_target_value() for a -description of the semantics of the action and target attributes.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

menu_item

a GMenuItem

 

action

the name of the action for this item.

[nullable]

format_string

a GVariant format string.

[nullable]

...

positional parameters, as per format_string -

 
-
-

Since: 2.32

-
-
-
-

g_menu_item_set_detailed_action ()

-
void
-g_menu_item_set_detailed_action (GMenuItem *menu_item,
-                                 const gchar *detailed_action);
-

Sets the "action" and possibly the "target" attribute of menu_item -.

-

The format of detailed_action - is the same format parsed by -g_action_parse_detailed_name().

-

See g_menu_item_set_action_and_target() or -g_menu_item_set_action_and_target_value() for more flexible (but -slightly less convenient) alternatives.

-

See also g_menu_item_set_action_and_target_value() for a description of -the semantics of the action and target attributes.

-
-

Parameters

-
----- - - - - - - - - - - - - -

menu_item

a GMenuItem

 

detailed_action

the "detailed" action string

 
-
-

Since: 2.32

-
-
-
-

g_menu_item_set_section ()

-
void
-g_menu_item_set_section (GMenuItem *menu_item,
-                         GMenuModel *section);
-

Sets or unsets the "section" link of menu_item - to section -.

-

The effect of having one menu appear as a section of another is -exactly as it sounds: the items from section - become a direct part of -the menu that menu_item - is added to. See g_menu_item_new_section() -for more information about what it means for a menu item to be a -section.

-
-

Parameters

-
----- - - - - - - - - - - - - -

menu_item

a GMenuItem

 

section

a GMenuModel, or NULL.

[nullable]
-
-

Since: 2.32

-
-
-
-

g_menu_item_set_submenu ()

-
void
-g_menu_item_set_submenu (GMenuItem *menu_item,
-                         GMenuModel *submenu);
-

Sets or unsets the "submenu" link of menu_item - to submenu -.

-

If submenu - is non-NULL, it is linked to. If it is NULL then the -link is unset.

-

The effect of having one menu appear as a submenu of another is -exactly as it sounds.

-
-

Parameters

-
----- - - - - - - - - - - - - -

menu_item

a GMenuItem

 

submenu

a GMenuModel, or NULL.

[nullable]
-
-

Since: 2.32

-
-
-
-

g_menu_item_get_attribute_value ()

-
GVariant *
-g_menu_item_get_attribute_value (GMenuItem *menu_item,
-                                 const gchar *attribute,
-                                 const GVariantType *expected_type);
-

Queries the named attribute - on menu_item -.

-

If expected_type - is specified and the attribute does not have this -type, NULL is returned. NULL is also returned if the attribute -simply does not exist.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

menu_item

a GMenuItem

 

attribute

the attribute name to query

 

expected_type

the expected type of the attribute.

[nullable]
-
-
-

Returns

-

the attribute value, or NULL.

-

[transfer full]

-
-

Since: 2.34

-
-
-
-

g_menu_item_get_attribute ()

-
gboolean
-g_menu_item_get_attribute (GMenuItem *menu_item,
-                           const gchar *attribute,
-                           const gchar *format_string,
-                           ...);
-

Queries the named attribute - on menu_item -.

-

If the attribute exists and matches the GVariantType corresponding -to format_string - then format_string - is used to deconstruct the -value into the positional parameters and TRUE is returned.

-

If the attribute does not exist, or it does exist but has the wrong -type, then the positional parameters are ignored and FALSE is -returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

menu_item

a GMenuItem

 

attribute

the attribute name to query

 

format_string

a GVariant format string

 

...

positional parameters, as per format_string -

 
-
-
-

Returns

-

TRUE if the named attribute was found with the expected -type

-
-

Since: 2.34

-
-
-
-

g_menu_item_get_link ()

-
GMenuModel *
-g_menu_item_get_link (GMenuItem *menu_item,
-                      const gchar *link);
-

Queries the named link - on menu_item -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

menu_item

a GMenuItem

 

link

the link name to query

 
-
-
-

Returns

-

the link, or NULL.

-

[transfer full]

-
-

Since: 2.34

-
-
-
-

g_menu_item_set_attribute_value ()

-
void
-g_menu_item_set_attribute_value (GMenuItem *menu_item,
-                                 const gchar *attribute,
-                                 GVariant *value);
-

Sets or unsets an attribute on menu_item -.

-

The attribute to set or unset is specified by attribute -. This -can be one of the standard attribute names G_MENU_ATTRIBUTE_LABEL, -G_MENU_ATTRIBUTE_ACTION, G_MENU_ATTRIBUTE_TARGET, or a custom -attribute name. -Attribute names are restricted to lowercase characters, numbers -and '-'. Furthermore, the names must begin with a lowercase character, -must not end with a '-', and must not contain consecutive dashes.

-

must consist only of lowercase -ASCII characters, digits and '-'.

-

If value - is non-NULL then it is used as the new value for the -attribute. If value - is NULL then the attribute is unset. If -the value - GVariant is floating, it is consumed.

-

See also g_menu_item_set_attribute() for a more convenient way to do -the same.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

menu_item

a GMenuItem

 

attribute

the attribute to set

 

value

a GVariant to use as the value, or NULL.

[nullable]
-
-

Since: 2.32

-
-
-
-

g_menu_item_set_attribute ()

-
void
-g_menu_item_set_attribute (GMenuItem *menu_item,
-                           const gchar *attribute,
-                           const gchar *format_string,
-                           ...);
-

Sets or unsets an attribute on menu_item -.

-

The attribute to set or unset is specified by attribute -. This -can be one of the standard attribute names G_MENU_ATTRIBUTE_LABEL, -G_MENU_ATTRIBUTE_ACTION, G_MENU_ATTRIBUTE_TARGET, or a custom -attribute name. -Attribute names are restricted to lowercase characters, numbers -and '-'. Furthermore, the names must begin with a lowercase character, -must not end with a '-', and must not contain consecutive dashes.

-

If format_string - is non-NULL then the proper position parameters -are collected to create a GVariant instance to use as the attribute -value. If it is NULL then the positional parameterrs are ignored -and the named attribute is unset.

-

See also g_menu_item_set_attribute_value() for an equivalent call -that directly accepts a GVariant.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

menu_item

a GMenuItem

 

attribute

the attribute to set

 

format_string

a GVariant format string, or NULL.

[nullable]

...

positional parameters, as per format_string -

 
-
-

Since: 2.32

-
-
-
-

g_menu_item_set_link ()

-
void
-g_menu_item_set_link (GMenuItem *menu_item,
-                      const gchar *link,
-                      GMenuModel *model);
-

Creates a link from menu_item - to model - if non-NULL, or unsets it.

-

Links are used to establish a relationship between a particular menu -item and another menu. For example, G_MENU_LINK_SUBMENU is used to -associate a submenu with a particular menu item, and G_MENU_LINK_SECTION -is used to create a section. Other types of link can be used, but there -is no guarantee that clients will be able to make sense of them. -Link types are restricted to lowercase characters, numbers -and '-'. Furthermore, the names must begin with a lowercase character, -must not end with a '-', and must not contain consecutive dashes.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

menu_item

a GMenuItem

 

link

type of link to establish or unset

 

model

the GMenuModel to link to (or NULL to unset).

[nullable]
-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

GMenu

-
typedef struct _GMenu GMenu;
-

GMenu is an opaque structure type. You must access it using the -functions below.

-

Since: 2.32

-
-
-
-

GMenuItem

-
typedef struct _GMenuItem GMenuItem;
-

GMenuItem is an opaque structure type. You must access it using the -functions below.

-

Since: 2.32

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GMenuModel.html b/docs/reference/gio/html/GMenuModel.html deleted file mode 100644 index 5dc228d60..000000000 --- a/docs/reference/gio/html/GMenuModel.html +++ /dev/null @@ -1,1208 +0,0 @@ - - - - -GMenuModel: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GMenuModel

-

GMenuModel — An abstract class representing the contents of a menu

-
- -
-

Signals

-
----- - - - - - -
voiditems-changedRun Last
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 GMenuModel
#defineG_MENU_ATTRIBUTE_ACTION
#defineG_MENU_ATTRIBUTE_ACTION_NAMESPACE
#defineG_MENU_ATTRIBUTE_TARGET
#defineG_MENU_ATTRIBUTE_LABEL
#defineG_MENU_ATTRIBUTE_ICON
#defineG_MENU_LINK_SECTION
#defineG_MENU_LINK_SUBMENU
structGMenuAttributeIter
structGMenuLinkIter
-
-
-

Object Hierarchy

-
    GObject
-    ├── GMenuAttributeIter
-    ├── GMenuLinkIter
-    ╰── GMenuModel
-        ├── GDBusMenuModel
-        ╰── GMenu
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GMenuModel represents the contents of a menu -- an ordered list of -menu items. The items are associated with actions, which can be -activated through them. Items can be grouped in sections, and may -have submenus associated with them. Both items and sections usually -have some representation data, such as labels or icons. The type of -the associated action (ie whether it is stateful, and what kind of -state it has) can influence the representation of the item.

-

The conceptual model of menus in GMenuModel is hierarchical: -sections and submenus are again represented by GMenuModels. -Menus themselves do not define their own roles. Rather, the role -of a particular GMenuModel is defined by the item that references -it (or, in the case of the 'root' menu, is defined by the context -in which it is used).

-

As an example, consider the visible portions of this menu:

-
-

An example menu

-

-

There are 8 "menus" visible in the screenshot: one menubar, two -submenus and 5 sections:

-
    -
  • the toplevel menubar (containing 4 items)

  • -
  • the View submenu (containing 3 sections)

  • -
  • the first section of the View submenu (containing 2 items)

  • -
  • the second section of the View submenu (containing 1 item)

  • -
  • the final section of the View submenu (containing 1 item)

  • -
  • the Highlight Mode submenu (containing 2 sections)

  • -
  • the Sources section (containing 2 items)

  • -
  • the Markup section (containing 2 items)

  • -
-

The example illustrates the conceptual connection between -these 8 menus. Each large block in the figure represents a menu and the -smaller blocks within the large block represent items in that menu. Some -items contain references to other menus.

-
-
-

A menu example

-

-

Notice that the separators visible in the example -appear nowhere in the menu model. This is because -separators are not explicitly represented in the menu model. Instead, -a separator is inserted between any two non-empty sections of a menu. -Section items can have labels just like any other item. In that case, -a display system may show a section header instead of a separator.

-

The motivation for this abstract model of application controls is -that modern user interfaces tend to make these controls available -outside the application. Examples include global menus, jumplists, -dash boards, etc. To support such uses, it is necessary to 'export' -information about actions and their representation in menus, which -is exactly what the GActionGroup exporter -and the GMenuModel exporter do for -GActionGroup and GMenuModel. The client-side counterparts to -make use of the exported information are GDBusActionGroup and -GDBusMenuModel.

-

The API of GMenuModel is very generic, with iterators for the -attributes and links of an item, see g_menu_model_iterate_item_attributes() -and g_menu_model_iterate_item_links(). The 'standard' attributes and -link types have predefined names: G_MENU_ATTRIBUTE_LABEL, -G_MENU_ATTRIBUTE_ACTION, G_MENU_ATTRIBUTE_TARGET, G_MENU_LINK_SECTION -and G_MENU_LINK_SUBMENU.

-

Items in a GMenuModel represent active controls if they refer to -an action that can get activated when the user interacts with the -menu item. The reference to the action is encoded by the string id -in the G_MENU_ATTRIBUTE_ACTION attribute. An action id uniquely -identifies an action in an action group. Which action group(s) provide -actions depends on the context in which the menu model is used. -E.g. when the model is exported as the application menu of a -GtkApplication, actions can be application-wide or window-specific -(and thus come from two different action groups). By convention, the -application-wide actions have names that start with "app.", while the -names of window-specific actions start with "win.".

-

While a wide variety of stateful actions is possible, the following -is the minimum that is expected to be supported by all users of exported -menu information:

-
    -
  • an action with no parameter type and no state

  • -
  • an action with no parameter type and boolean state

  • -
  • an action with string parameter type and string state

  • -
-
-
-

Stateless

-

A stateless action typically corresponds to an ordinary menu item.

-

Selecting such a menu item will activate the action (with no parameter).

-
-
-

Boolean State

-

An action with a boolean state will most typically be used with a "toggle" -or "switch" menu item. The state can be set directly, but activating the -action (with no parameter) results in the state being toggled.

-

Selecting a toggle menu item will activate the action. The menu item should -be rendered as "checked" when the state is true.

-
-
-

String Parameter and State

-

Actions with string parameters and state will most typically be used to -represent an enumerated choice over the items available for a group of -radio menu items. Activating the action with a string parameter is -equivalent to setting that parameter as the state.

-

Radio menu items, in addition to being associated with the action, will -have a target value. Selecting that menu item will result in activation -of the action with the target value as the parameter. The menu item should -be rendered as "selected" when the state of the action is equal to the -target value of the menu item.

-
-
-
-

Functions

-
-

g_menu_model_is_mutable ()

-
gboolean
-g_menu_model_is_mutable (GMenuModel *model);
-

Queries if model - is mutable.

-

An immutable GMenuModel will never emit the “items-changed” -signal. Consumers of the model may make optimisations accordingly.

-
-

Parameters

-
----- - - - - - -

model

a GMenuModel

 
-
-
-

Returns

-

TRUE if the model is mutable (ie: "items-changed" may be -emitted).

-
-

Since: 2.32

-
-
-
-

g_menu_model_get_n_items ()

-
gint
-g_menu_model_get_n_items (GMenuModel *model);
-

Query the number of items in model -.

-
-

Parameters

-
----- - - - - - -

model

a GMenuModel

 
-
-
-

Returns

-

the number of items

-
-

Since: 2.32

-
-
-
-

g_menu_model_get_item_attribute_value ()

-
GVariant *
-g_menu_model_get_item_attribute_value (GMenuModel *model,
-                                       gint item_index,
-                                       const gchar *attribute,
-                                       const GVariantType *expected_type);
-

Queries the item at position item_index - in model - for the attribute -specified by attribute -.

-

If expected_type - is non-NULL then it specifies the expected type of -the attribute. If it is NULL then any type will be accepted.

-

If the attribute exists and matches expected_type - (or if the -expected type is unspecified) then the value is returned.

-

If the attribute does not exist, or does not match the expected type -then NULL is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

model

a GMenuModel

 

item_index

the index of the item

 

attribute

the attribute to query

 

expected_type

the expected type of the attribute, or -NULL.

[nullable]
-
-
-

Returns

-

the value of the attribute.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_menu_model_get_item_attribute ()

-
gboolean
-g_menu_model_get_item_attribute (GMenuModel *model,
-                                 gint item_index,
-                                 const gchar *attribute,
-                                 const gchar *format_string,
-                                 ...);
-

Queries item at position item_index - in model - for the attribute -specified by attribute -.

-

If the attribute exists and matches the GVariantType corresponding -to format_string - then format_string - is used to deconstruct the -value into the positional parameters and TRUE is returned.

-

If the attribute does not exist, or it does exist but has the wrong -type, then the positional parameters are ignored and FALSE is -returned.

-

This function is a mix of g_menu_model_get_item_attribute_value() and -g_variant_get(), followed by a g_variant_unref(). As such, -format_string - must make a complete copy of the data (since the -GVariant may go away after the call to g_variant_unref()). In -particular, no '&' characters are allowed in format_string -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

model

a GMenuModel

 

item_index

the index of the item

 

attribute

the attribute to query

 

format_string

a GVariant format string

 

...

positional parameters, as per format_string -

 
-
-
-

Returns

-

TRUE if the named attribute was found with the expected -type

-
-

Since: 2.32

-
-
-
-

g_menu_model_get_item_link ()

-
GMenuModel *
-g_menu_model_get_item_link (GMenuModel *model,
-                            gint item_index,
-                            const gchar *link);
-

Queries the item at position item_index - in model - for the link -specified by link -.

-

If the link exists, the linked GMenuModel is returned. If the link -does not exist, NULL is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

model

a GMenuModel

 

item_index

the index of the item

 

link

the link to query

 
-
-
-

Returns

-

the linked GMenuModel, or NULL.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_menu_model_iterate_item_attributes ()

-
GMenuAttributeIter *
-g_menu_model_iterate_item_attributes (GMenuModel *model,
-                                      gint item_index);
-

Creates a GMenuAttributeIter to iterate over the attributes of -the item at position item_index - in model -.

-

You must free the iterator with g_object_unref() when you are done.

-
-

Parameters

-
----- - - - - - - - - - - - - -

model

a GMenuModel

 

item_index

the index of the item

 
-
-
-

Returns

-

a new GMenuAttributeIter.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_menu_model_iterate_item_links ()

-
GMenuLinkIter *
-g_menu_model_iterate_item_links (GMenuModel *model,
-                                 gint item_index);
-

Creates a GMenuLinkIter to iterate over the links of the item at -position item_index - in model -.

-

You must free the iterator with g_object_unref() when you are done.

-
-

Parameters

-
----- - - - - - - - - - - - - -

model

a GMenuModel

 

item_index

the index of the item

 
-
-
-

Returns

-

a new GMenuLinkIter.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_menu_model_items_changed ()

-
void
-g_menu_model_items_changed (GMenuModel *model,
-                            gint position,
-                            gint removed,
-                            gint added);
-

Requests emission of the “items-changed” signal on model -.

-

This function should never be called except by GMenuModel -subclasses. Any other calls to this function will very likely lead -to a violation of the interface of the model.

-

The implementation should update its internal representation of the -menu before emitting the signal. The implementation should further -expect to receive queries about the new state of the menu (and -particularly added menu items) while signal handlers are running.

-

The implementation must dispatch this call directly from a mainloop -entry and not in response to calls -- particularly those from the -GMenuModel API. Said another way: the menu must not change while -user code is running without returning to the mainloop.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

model

a GMenuModel

 

position

the position of the change

 

removed

the number of items removed

 

added

the number of items added

 
-
-

Since: 2.32

-
-
-
-

g_menu_attribute_iter_get_next ()

-
gboolean
-g_menu_attribute_iter_get_next (GMenuAttributeIter *iter,
-                                const gchar **out_name,
-                                GVariant **value);
-

This function combines g_menu_attribute_iter_next() with -g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value().

-

First the iterator is advanced to the next (possibly first) attribute. -If that fails, then FALSE is returned and there are no other -effects.

-

If successful, name - and value - are set to the name and value of the -attribute that has just been advanced to. At this point, -g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value() will -return the same values again.

-

The value returned in name - remains valid for as long as the iterator -remains at the current position. The value returned in value - must -be unreffed using g_variant_unref() when it is no longer in use.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

iter

a GMenuAttributeIter

 

out_name

the type of the attribute.

[out][optional][transfer none]

value

the attribute value.

[out][optional][transfer full]
-
-
-

Returns

-

TRUE on success, or FALSE if there is no additional -attribute

-
-

Since: 2.32

-
-
-
-

g_menu_attribute_iter_get_name ()

-
const gchar *
-g_menu_attribute_iter_get_name (GMenuAttributeIter *iter);
-

Gets the name of the attribute at the current iterator position, as -a string.

-

The iterator is not advanced.

-
-

Parameters

-
----- - - - - - -

iter

a GMenuAttributeIter

 
-
-
-

Returns

-

the name of the attribute

-
-

Since: 2.32

-
-
-
-

g_menu_attribute_iter_get_value ()

-
GVariant *
-g_menu_attribute_iter_get_value (GMenuAttributeIter *iter);
-

Gets the value of the attribute at the current iterator position.

-

The iterator is not advanced.

-
-

Parameters

-
----- - - - - - -

iter

a GMenuAttributeIter

 
-
-
-

Returns

-

the value of the current attribute.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_menu_attribute_iter_next ()

-
gboolean
-g_menu_attribute_iter_next (GMenuAttributeIter *iter);
-

Attempts to advance the iterator to the next (possibly first) -attribute.

-

TRUE is returned on success, or FALSE if there are no more -attributes.

-

You must call this function when you first acquire the iterator -to advance it to the first attribute (and determine if the first -attribute exists at all).

-
-

Parameters

-
----- - - - - - -

iter

a GMenuAttributeIter

 
-
-
-

Returns

-

TRUE on success, or FALSE when there are no more attributes

-
-

Since: 2.32

-
-
-
-

g_menu_link_iter_get_name ()

-
const gchar *
-g_menu_link_iter_get_name (GMenuLinkIter *iter);
-

Gets the name of the link at the current iterator position.

-

The iterator is not advanced.

-
-

Parameters

-
----- - - - - - -

iter

a GMenuLinkIter

 
-
-
-

Returns

-

the type of the link

-
-

Since: 2.32

-
-
-
-

g_menu_link_iter_get_next ()

-
gboolean
-g_menu_link_iter_get_next (GMenuLinkIter *iter,
-                           const gchar **out_link,
-                           GMenuModel **value);
-

This function combines g_menu_link_iter_next() with -g_menu_link_iter_get_name() and g_menu_link_iter_get_value().

-

First the iterator is advanced to the next (possibly first) link. -If that fails, then FALSE is returned and there are no other effects.

-

If successful, out_link - and value - are set to the name and GMenuModel -of the link that has just been advanced to. At this point, -g_menu_link_iter_get_name() and g_menu_link_iter_get_value() will return the -same values again.

-

The value returned in out_link - remains valid for as long as the iterator -remains at the current position. The value returned in value - must -be unreffed using g_object_unref() when it is no longer in use.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

iter

a GMenuLinkIter

 

out_link

the name of the link.

[out][optional][transfer none]

value

the linked GMenuModel.

[out][optional][transfer full]
-
-
-

Returns

-

TRUE on success, or FALSE if there is no additional link

-
-

Since: 2.32

-
-
-
-

g_menu_link_iter_get_value ()

-
GMenuModel *
-g_menu_link_iter_get_value (GMenuLinkIter *iter);
-

Gets the linked GMenuModel at the current iterator position.

-

The iterator is not advanced.

-
-

Parameters

-
----- - - - - - -

iter

a GMenuLinkIter

 
-
-
-

Returns

-

the GMenuModel that is linked to.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_menu_link_iter_next ()

-
gboolean
-g_menu_link_iter_next (GMenuLinkIter *iter);
-

Attempts to advance the iterator to the next (possibly first) -link.

-

TRUE is returned on success, or FALSE if there are no more links.

-

You must call this function when you first acquire the iterator to -advance it to the first link (and determine if the first link exists -at all).

-
-

Parameters

-
----- - - - - - -

iter

a GMenuLinkIter

 
-
-
-

Returns

-

TRUE on success, or FALSE when there are no more links

-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

GMenuModel

-
typedef struct _GMenuModel GMenuModel;
-

GMenuModel is an opaque structure type. You must access it using the -functions below.

-

Since: 2.32

-
-
-
-

G_MENU_ATTRIBUTE_ACTION

-
#define G_MENU_ATTRIBUTE_ACTION "action"
-
-

The menu item attribute which holds the action name of the item. Action -names are namespaced with an identifier for the action group in which the -action resides. For example, "win." for window-specific actions and "app." -for application-wide actions.

-

See also g_menu_model_get_item_attribute() and g_menu_item_set_attribute().

-

Since: 2.32

-
-
-
-

G_MENU_ATTRIBUTE_ACTION_NAMESPACE

-
#define G_MENU_ATTRIBUTE_ACTION_NAMESPACE "action-namespace"
-
-

The menu item attribute that holds the namespace for all action names in -menus that are linked from this item.

-

Since: 2.36

-
-
-
-

G_MENU_ATTRIBUTE_TARGET

-
#define G_MENU_ATTRIBUTE_TARGET "target"
-
-

The menu item attribute which holds the target with which the item's action -will be activated.

-

See also g_menu_item_set_action_and_target()

-

Since: 2.32

-
-
-
-

G_MENU_ATTRIBUTE_LABEL

-
#define G_MENU_ATTRIBUTE_LABEL "label"
-
-

The menu item attribute which holds the label of the item.

-

Since: 2.32

-
-
-
-

G_MENU_ATTRIBUTE_ICON

-
#define G_MENU_ATTRIBUTE_ICON "icon"
-
-

The menu item attribute which holds the icon of the item.

-

The icon is stored in the format returned by g_icon_serialize().

-

This attribute is intended only to represent 'noun' icons such as -favicons for a webpage, or application icons. It should not be used -for 'verbs' (ie: stock icons).

-

Since: 2.38

-
-
-
-

G_MENU_LINK_SECTION

-
#define G_MENU_LINK_SECTION "section"
-
-

The name of the link that associates a menu item with a section. The linked -menu will usually be shown in place of the menu item, using the item's label -as a header.

-

See also g_menu_item_set_link().

-

Since: 2.32

-
-
-
-

G_MENU_LINK_SUBMENU

-
#define G_MENU_LINK_SUBMENU "submenu"
-
-

The name of the link that associates a menu item with a submenu.

-

See also g_menu_item_set_link().

-

Since: 2.32

-
-
-
-

struct GMenuAttributeIter

-
struct GMenuAttributeIter;
-

GMenuAttributeIter is an opaque structure type. You must access it -using the functions below.

-

Since: 2.32

-
-
-
-

struct GMenuLinkIter

-
struct GMenuLinkIter;
-

GMenuLinkIter is an opaque structure type. You must access it using -the functions below.

-

Since: 2.32

-
-
-
-

Signal Details

-
-

The “items-changed” signal

-
void
-user_function (GMenuModel *model,
-               gint        position,
-               gint        removed,
-               gint        added,
-               gpointer    user_data)
-

Emitted when a change has occured to the menu.

-

The only changes that can occur to a menu is that items are removed -or added. Items may not change (except by being removed and added -back in the same location). This signal is capable of describing -both of those changes (at the same time).

-

The signal means that starting at the index position -, removed - -items were removed and added - items were added in their place. If -removed - is zero then only items were added. If added - is zero -then only items were removed.

-

As an example, if the menu contains items a, b, c, d (in that -order) and the signal (2, 1, 3) occurs then the new composition of -the menu will be a, b, _, _, _, d (with each _ representing some -new item).

-

Signal handlers may query the model (particularly the added items) -and expect to see the results of the modification that is being -reported. The signal is emitted after the modification.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

model

the GMenuModel that is changing

 

position

the position of the change

 

removed

the number of items removed

 

added

the number of items added

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

See Also

-

GActionGroup

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GMount.html b/docs/reference/gio/html/GMount.html deleted file mode 100644 index 67a200d11..000000000 --- a/docs/reference/gio/html/GMount.html +++ /dev/null @@ -1,1912 +0,0 @@ - - - - -GMount: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GMount

-

GMount — Mount management

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-char * - -g_mount_get_name () -
-char * - -g_mount_get_uuid () -
-GIcon * - -g_mount_get_icon () -
-GIcon * - -g_mount_get_symbolic_icon () -
-GDrive * - -g_mount_get_drive () -
-GFile * - -g_mount_get_root () -
-GVolume * - -g_mount_get_volume () -
-GFile * - -g_mount_get_default_location () -
-gboolean - -g_mount_can_unmount () -
-void - -g_mount_unmount () -
-gboolean - -g_mount_unmount_finish () -
-void - -g_mount_unmount_with_operation () -
-gboolean - -g_mount_unmount_with_operation_finish () -
-void - -g_mount_remount () -
-gboolean - -g_mount_remount_finish () -
-gboolean - -g_mount_can_eject () -
-void - -g_mount_eject () -
-gboolean - -g_mount_eject_finish () -
-void - -g_mount_eject_with_operation () -
-gboolean - -g_mount_eject_with_operation_finish () -
-void - -g_mount_guess_content_type () -
-gchar ** - -g_mount_guess_content_type_finish () -
-gchar ** - -g_mount_guess_content_type_sync () -
-gboolean - -g_mount_is_shadowed () -
-void - -g_mount_shadow () -
-void - -g_mount_unshadow () -
const gchar * - -g_mount_get_sort_key () -
-
-
-

Signals

-
----- - - - - - - - - - - - - - - - - - -
voidchangedRun Last
voidpre-unmountRun Last
voidunmountedRun Last
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
 GMount
structGMountIface
enumGMountMountFlags
enumGMountUnmountFlags
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GMount
-
-
-
-

Prerequisites

-

-GMount requires - GObject.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

The GMount interface represents user-visible mounts. Note, when -porting from GnomeVFS, GMount is the moral equivalent of GnomeVFSVolume.

-

GMount is a "mounted" filesystem that you can access. Mounted is in -quotes because it's not the same as a unix mount, it might be a gvfs -mount, but you can still access the files on it if you use GIO. Might or -might not be related to a volume object.

-

Unmounting a GMount instance is an asynchronous operation. For -more information about asynchronous operations, see GAsyncResult -and GTask. To unmount a GMount instance, first call -g_mount_unmount_with_operation() with (at least) the GMount instance and a -GAsyncReadyCallback. The callback will be fired when the -operation has resolved (either with success or failure), and a -GAsyncReady structure will be passed to the callback. That -callback should then call g_mount_unmount_with_operation_finish() with the GMount -and the GAsyncReady data to see if the operation was completed -successfully. If an error - is present when g_mount_unmount_with_operation_finish() -is called, then it will be filled with any error information.

-
-
-

Functions

-
-

g_mount_get_name ()

-
char *
-g_mount_get_name (GMount *mount);
-

Gets the name of mount -.

-
-

Parameters

-
----- - - - - - -

mount

a GMount.

 
-
-
-

Returns

-

the name for the given mount -. -The returned string should be freed with g_free() -when no longer needed.

-
-
-
-
-

g_mount_get_uuid ()

-
char *
-g_mount_get_uuid (GMount *mount);
-

Gets the UUID for the mount -. The reference is typically based on -the file system UUID for the mount in question and should be -considered an opaque string. Returns NULL if there is no UUID -available.

-
-

Parameters

-
----- - - - - - -

mount

a GMount.

 
-
-
-

Returns

-

the UUID for mount -or NULL if no UUID can be computed. -The returned string should be freed with g_free() -when no longer needed.

-
-
-
-
-

g_mount_get_icon ()

-
GIcon *
-g_mount_get_icon (GMount *mount);
-

Gets the icon for mount -.

-
-

Parameters

-
----- - - - - - -

mount

a GMount.

 
-
-
-

Returns

-

a GIcon. -The returned object should be unreffed with -g_object_unref() when no longer needed.

-

[transfer full]

-
-
-
-
-

g_mount_get_symbolic_icon ()

-
GIcon *
-g_mount_get_symbolic_icon (GMount *mount);
-

Gets the symbolic icon for mount -.

-
-

Parameters

-
----- - - - - - -

mount

a GMount.

 
-
-
-

Returns

-

a GIcon. -The returned object should be unreffed with -g_object_unref() when no longer needed.

-

[transfer full]

-
-

Since: 2.34

-
-
-
-

g_mount_get_drive ()

-
GDrive *
-g_mount_get_drive (GMount *mount);
-

Gets the drive for the mount -.

-

This is a convenience method for getting the GVolume and then -using that object to get the GDrive.

-
-

Parameters

-
----- - - - - - -

mount

a GMount.

 
-
-
-

Returns

-

a GDrive or NULL if mount -is not associated with a volume or a drive. -The returned object should be unreffed with -g_object_unref() when no longer needed.

-

[transfer full]

-
-
-
-
-

g_mount_get_root ()

-
GFile *
-g_mount_get_root (GMount *mount);
-

Gets the root directory on mount -.

-
-

Parameters

-
----- - - - - - -

mount

a GMount.

 
-
-
-

Returns

-

a GFile. -The returned object should be unreffed with -g_object_unref() when no longer needed.

-

[transfer full]

-
-
-
-
-

g_mount_get_volume ()

-
GVolume *
-g_mount_get_volume (GMount *mount);
-

Gets the volume for the mount -.

-
-

Parameters

-
----- - - - - - -

mount

a GMount.

 
-
-
-

Returns

-

a GVolume or NULL if mount -is not associated with a volume. -The returned object should be unreffed with -g_object_unref() when no longer needed.

-

[transfer full]

-
-
-
-
-

g_mount_get_default_location ()

-
GFile *
-g_mount_get_default_location (GMount *mount);
-

Gets the default location of mount -. The default location of the given -mount - is a path that reflects the main entry point for the user (e.g. -the home directory, or the root of the volume).

-
-

Parameters

-
----- - - - - - -

mount

a GMount.

 
-
-
-

Returns

-

a GFile. -The returned object should be unreffed with -g_object_unref() when no longer needed.

-

[transfer full]

-
-
-
-
-

g_mount_can_unmount ()

-
gboolean
-g_mount_can_unmount (GMount *mount);
-

Checks if mount - can be mounted.

-
-

Parameters

-
----- - - - - - -

mount

a GMount.

 
-
-
-

Returns

-

TRUE if the mount -can be unmounted.

-
-
-
-
-

g_mount_unmount ()

-
void
-g_mount_unmount (GMount *mount,
-                 GMountUnmountFlags flags,
-                 GCancellable *cancellable,
-                 GAsyncReadyCallback callback,
-                 gpointer user_data);
-
-

g_mount_unmount has been deprecated since version 2.22 and should not be used in newly-written code.

-

Use g_mount_unmount_with_operation() instead.

-
-

Unmounts a mount. This is an asynchronous operation, and is -finished by calling g_mount_unmount_finish() with the mount - -and GAsyncResult data returned in the callback -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

mount

a GMount.

 

flags

flags affecting the operation

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback, or NULL.

[nullable]

user_data

user data passed to callback -.

 
-
-
-
-
-

g_mount_unmount_finish ()

-
gboolean
-g_mount_unmount_finish (GMount *mount,
-                        GAsyncResult *result,
-                        GError **error);
-
-

g_mount_unmount_finish has been deprecated since version 2.22 and should not be used in newly-written code.

-

Use g_mount_unmount_with_operation_finish() instead.

-
-

Finishes unmounting a mount. If any errors occurred during the operation, -error - will be set to contain the errors and FALSE will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

mount

a GMount.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE if the mount was successfully unmounted. FALSE otherwise.

-
-
-
-
-

g_mount_unmount_with_operation ()

-
void
-g_mount_unmount_with_operation (GMount *mount,
-                                GMountUnmountFlags flags,
-                                GMountOperation *mount_operation,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

Unmounts a mount. This is an asynchronous operation, and is -finished by calling g_mount_unmount_with_operation_finish() with the mount - -and GAsyncResult data returned in the callback -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

mount

a GMount.

 

flags

flags affecting the operation

 

mount_operation

a GMountOperation or NULL to avoid -user interaction.

[nullable]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback, or NULL.

[nullable]

user_data

user data passed to callback -.

 
-
-

Since: 2.22

-
-
-
-

g_mount_unmount_with_operation_finish ()

-
gboolean
-g_mount_unmount_with_operation_finish (GMount *mount,
-                                       GAsyncResult *result,
-                                       GError **error);
-

Finishes unmounting a mount. If any errors occurred during the operation, -error - will be set to contain the errors and FALSE will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

mount

a GMount.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE if the mount was successfully unmounted. FALSE otherwise.

-
-

Since: 2.22

-
-
-
-

g_mount_remount ()

-
void
-g_mount_remount (GMount *mount,
-                 GMountMountFlags flags,
-                 GMountOperation *mount_operation,
-                 GCancellable *cancellable,
-                 GAsyncReadyCallback callback,
-                 gpointer user_data);
-

Remounts a mount. This is an asynchronous operation, and is -finished by calling g_mount_remount_finish() with the mount - -and GAsyncResults data returned in the callback -.

-

Remounting is useful when some setting affecting the operation -of the volume has been changed, as these may need a remount to -take affect. While this is semantically equivalent with unmounting -and then remounting not all backends might need to actually be -unmounted.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

mount

a GMount.

 

flags

flags affecting the operation

 

mount_operation

a GMountOperation or NULL to avoid -user interaction.

[nullable]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback, or NULL.

[nullable]

user_data

user data passed to callback -.

 
-
-
-
-
-

g_mount_remount_finish ()

-
gboolean
-g_mount_remount_finish (GMount *mount,
-                        GAsyncResult *result,
-                        GError **error);
-

Finishes remounting a mount. If any errors occurred during the operation, -error - will be set to contain the errors and FALSE will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

mount

a GMount.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE if the mount was successfully remounted. FALSE otherwise.

-
-
-
-
-

g_mount_can_eject ()

-
gboolean
-g_mount_can_eject (GMount *mount);
-

Checks if mount - can be eject.

-
-

Parameters

-
----- - - - - - -

mount

a GMount.

 
-
-
-

Returns

-

TRUE if the mount -can be ejected.

-
-
-
-
-

g_mount_eject ()

-
void
-g_mount_eject (GMount *mount,
-               GMountUnmountFlags flags,
-               GCancellable *cancellable,
-               GAsyncReadyCallback callback,
-               gpointer user_data);
-
-

g_mount_eject has been deprecated since version 2.22 and should not be used in newly-written code.

-

Use g_mount_eject_with_operation() instead.

-
-

Ejects a mount. This is an asynchronous operation, and is -finished by calling g_mount_eject_finish() with the mount - -and GAsyncResult data returned in the callback -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

mount

a GMount.

 

flags

flags affecting the unmount if required for eject

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback, or NULL.

[nullable]

user_data

user data passed to callback -.

 
-
-
-
-
-

g_mount_eject_finish ()

-
gboolean
-g_mount_eject_finish (GMount *mount,
-                      GAsyncResult *result,
-                      GError **error);
-
-

g_mount_eject_finish has been deprecated since version 2.22 and should not be used in newly-written code.

-

Use g_mount_eject_with_operation_finish() instead.

-
-

Finishes ejecting a mount. If any errors occurred during the operation, -error - will be set to contain the errors and FALSE will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

mount

a GMount.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE if the mount was successfully ejected. FALSE otherwise.

-
-
-
-
-

g_mount_eject_with_operation ()

-
void
-g_mount_eject_with_operation (GMount *mount,
-                              GMountUnmountFlags flags,
-                              GMountOperation *mount_operation,
-                              GCancellable *cancellable,
-                              GAsyncReadyCallback callback,
-                              gpointer user_data);
-

Ejects a mount. This is an asynchronous operation, and is -finished by calling g_mount_eject_with_operation_finish() with the mount - -and GAsyncResult data returned in the callback -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

mount

a GMount.

 

flags

flags affecting the unmount if required for eject

 

mount_operation

a GMountOperation or NULL to avoid -user interaction.

[nullable]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback, or NULL.

[nullable]

user_data

user data passed to callback -.

 
-
-

Since: 2.22

-
-
-
-

g_mount_eject_with_operation_finish ()

-
gboolean
-g_mount_eject_with_operation_finish (GMount *mount,
-                                     GAsyncResult *result,
-                                     GError **error);
-

Finishes ejecting a mount. If any errors occurred during the operation, -error - will be set to contain the errors and FALSE will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

mount

a GMount.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE if the mount was successfully ejected. FALSE otherwise.

-
-

Since: 2.22

-
-
-
-

g_mount_guess_content_type ()

-
void
-g_mount_guess_content_type (GMount *mount,
-                            gboolean force_rescan,
-                            GCancellable *cancellable,
-                            GAsyncReadyCallback callback,
-                            gpointer user_data);
-

Tries to guess the type of content stored on mount -. Returns one or -more textual identifiers of well-known content types (typically -prefixed with "x-content/"), e.g. x-content/image-dcf for camera -memory cards. See the -shared-mime-info -specification for more on x-content types.

-

This is an asynchronous operation (see -g_mount_guess_content_type_sync() for the synchronous version), and -is finished by calling g_mount_guess_content_type_finish() with the -mount - and GAsyncResult data returned in the callback -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

mount

a GMount

 

force_rescan

Whether to force a rescan of the content. -Otherwise a cached result will be used if available

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback

 

user_data

user data passed to callback -

 
-
-

Since: 2.18

-
-
-
-

g_mount_guess_content_type_finish ()

-
gchar **
-g_mount_guess_content_type_finish (GMount *mount,
-                                   GAsyncResult *result,
-                                   GError **error);
-

Finishes guessing content types of mount -. If any errors occurred -during the operation, error - will be set to contain the errors and -FALSE will be returned. In particular, you may get an -G_IO_ERROR_NOT_SUPPORTED if the mount does not support content -guessing.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

mount

a GMount

 

result

a GAsyncResult

 

error

a GError location to store the error occurring, or NULL to -ignore

 
-
-
-

Returns

-

a NULL-terminated array of content types or NULL on error. -Caller should free this array with g_strfreev() when done with it.

-

[transfer full][element-type utf8]

-
-

Since: 2.18

-
-
-
-

g_mount_guess_content_type_sync ()

-
gchar **
-g_mount_guess_content_type_sync (GMount *mount,
-                                 gboolean force_rescan,
-                                 GCancellable *cancellable,
-                                 GError **error);
-

Tries to guess the type of content stored on mount -. Returns one or -more textual identifiers of well-known content types (typically -prefixed with "x-content/"), e.g. x-content/image-dcf for camera -memory cards. See the -shared-mime-info -specification for more on x-content types.

-

This is an synchronous operation and as such may block doing IO; -see g_mount_guess_content_type() for the asynchronous version.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

mount

a GMount

 

force_rescan

Whether to force a rescan of the content. -Otherwise a cached result will be used if available

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

a GError location to store the error occurring, or NULL to -ignore

 
-
-
-

Returns

-

a NULL-terminated array of content types or NULL on error. -Caller should free this array with g_strfreev() when done with it.

-

[transfer full][element-type utf8]

-
-

Since: 2.18

-
-
-
-

g_mount_is_shadowed ()

-
gboolean
-g_mount_is_shadowed (GMount *mount);
-

Determines if mount - is shadowed. Applications or libraries should -avoid displaying mount - in the user interface if it is shadowed.

-

A mount is said to be shadowed if there exists one or more user -visible objects (currently GMount objects) with a root that is -inside the root of mount -.

-

One application of shadow mounts is when exposing a single file -system that is used to address several logical volumes. In this -situation, a GVolumeMonitor implementation would create two -GVolume objects (for example, one for the camera functionality of -the device and one for a SD card reader on the device) with -activation URIs gphoto2://[usb:001,002]/store1/ -and gphoto2://[usb:001,002]/store2/. When the -underlying mount (with root -gphoto2://[usb:001,002]/) is mounted, said -GVolumeMonitor implementation would create two GMount objects -(each with their root matching the corresponding volume activation -root) that would shadow the original mount.

-

The proxy monitor in GVfs 2.26 and later, automatically creates and -manage shadow mounts (and shadows the underlying mount) if the -activation root on a GVolume is set.

-
-

Parameters

-
----- - - - - - -

mount

A GMount.

 
-
-
-

Returns

-

TRUE if mount -is shadowed.

-
-

Since: 2.20

-
-
-
-

g_mount_shadow ()

-
void
-g_mount_shadow (GMount *mount);
-

Increments the shadow count on mount -. Usually used by -GVolumeMonitor implementations when creating a shadow mount for -mount -, see g_mount_is_shadowed() for more information. The caller -will need to emit the “changed” signal on mount - manually.

-
-

Parameters

-
----- - - - - - -

mount

A GMount.

 
-
-

Since: 2.20

-
-
-
-

g_mount_unshadow ()

-
void
-g_mount_unshadow (GMount *mount);
-

Decrements the shadow count on mount -. Usually used by -GVolumeMonitor implementations when destroying a shadow mount for -mount -, see g_mount_is_shadowed() for more information. The caller -will need to emit the “changed” signal on mount - manually.

-
-

Parameters

-
----- - - - - - -

mount

A GMount.

 
-
-

Since: 2.20

-
-
-
-

g_mount_get_sort_key ()

-
const gchar *
-g_mount_get_sort_key (GMount *mount);
-

Gets the sort key for mount -, if any.

-
-

Parameters

-
----- - - - - - -

mount

A GMount.

 
-
-
-

Returns

-

Sorting key for mount -or NULL if no such key is available.

-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

GMount

-
typedef struct _GMount GMount;
-

A handle to an object implementing the GMountIface interface.

-
-
-
-

struct GMountIface

-
struct GMountIface {
-  GTypeInterface g_iface;
-
-  /* signals */
-
-  void        (* changed)                   (GMount              *mount);
-  void        (* unmounted)                 (GMount              *mount);
-
-  /* Virtual Table */
-
-  GFile     * (* get_root)                  (GMount              *mount);
-  char      * (* get_name)                  (GMount              *mount);
-  GIcon     * (* get_icon)                  (GMount              *mount);
-  char      * (* get_uuid)                  (GMount              *mount);
-  GVolume   * (* get_volume)                (GMount              *mount);
-  GDrive    * (* get_drive)                 (GMount              *mount);
-  gboolean    (* can_unmount)               (GMount              *mount);
-  gboolean    (* can_eject)                 (GMount              *mount);
-
-  void        (* unmount)                   (GMount              *mount,
-                                             GMountUnmountFlags   flags,
-                                             GCancellable        *cancellable,
-                                             GAsyncReadyCallback  callback,
-                                             gpointer             user_data);
-  gboolean    (* unmount_finish)            (GMount              *mount,
-                                             GAsyncResult        *result,
-                                             GError             **error);
-
-  void        (* eject)                     (GMount              *mount,
-                                             GMountUnmountFlags   flags,
-                                             GCancellable        *cancellable,
-                                             GAsyncReadyCallback  callback,
-                                             gpointer             user_data);
-  gboolean    (* eject_finish)              (GMount              *mount,
-                                             GAsyncResult        *result,
-                                             GError             **error);
-
-  void        (* remount)                   (GMount              *mount,
-                                             GMountMountFlags     flags,
-                                             GMountOperation     *mount_operation,
-                                             GCancellable        *cancellable,
-                                             GAsyncReadyCallback  callback,
-                                             gpointer             user_data);
-  gboolean    (* remount_finish)            (GMount              *mount,
-                                             GAsyncResult        *result,
-                                             GError             **error);
-
-  void        (* guess_content_type)        (GMount              *mount,
-                                             gboolean             force_rescan,
-                                             GCancellable        *cancellable,
-                                             GAsyncReadyCallback  callback,
-                                             gpointer             user_data);
-  gchar    ** (* guess_content_type_finish) (GMount              *mount,
-                                             GAsyncResult        *result,
-                                             GError             **error);
-  gchar    ** (* guess_content_type_sync)   (GMount              *mount,
-                                             gboolean             force_rescan,
-                                             GCancellable        *cancellable,
-                                             GError             **error);
-
-  /* Signal, not VFunc */
-  void        (* pre_unmount)               (GMount              *mount);
-
-  void        (* unmount_with_operation)    (GMount              *mount,
-                                             GMountUnmountFlags   flags,
-                                             GMountOperation     *mount_operation,
-                                             GCancellable        *cancellable,
-                                             GAsyncReadyCallback  callback,
-                                             gpointer             user_data);
-  gboolean    (* unmount_with_operation_finish) (GMount          *mount,
-                                             GAsyncResult        *result,
-                                             GError             **error);
-
-  void        (* eject_with_operation)      (GMount              *mount,
-                                             GMountUnmountFlags   flags,
-                                             GMountOperation     *mount_operation,
-                                             GCancellable        *cancellable,
-                                             GAsyncReadyCallback  callback,
-                                             gpointer             user_data);
-  gboolean    (* eject_with_operation_finish) (GMount            *mount,
-                                             GAsyncResult        *result,
-                                             GError             **error);
-  GFile     * (* get_default_location)      (GMount              *mount);
-
-  const gchar * (* get_sort_key)            (GMount              *mount);
-  GIcon       * (* get_symbolic_icon)       (GMount              *mount);
-};
-
-

Interface for implementing operations for mounts.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

changed ()

Changed signal that is emitted when the mount's state has changed.

 

unmounted ()

The unmounted signal that is emitted when the GMount have been unmounted. If the recipient is holding references to the object they should release them so the object can be finalized.

 

get_root ()

Gets a GFile to the root directory of the GMount.

 

get_name ()

Gets a string containing the name of the GMount.

 

get_icon ()

Gets a GIcon for the GMount.

 

get_uuid ()

Gets the UUID for the GMount. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns NULL if there is no UUID available.

 

get_volume ()

Gets a GVolume the mount is located on. Returns NULL if the GMount is not associated with a GVolume.

 

get_drive ()

Gets a GDrive the volume of the mount is located on. Returns NULL if the GMount is not associated with a GDrive or a GVolume. This is convenience method for getting the GVolume and using that to get the GDrive.

 

can_unmount ()

Checks if a GMount can be unmounted.

 

can_eject ()

Checks if a GMount can be ejected.

 

unmount ()

Starts unmounting a GMount.

 

unmount_finish ()

Finishes an unmounting operation.

 

eject ()

Starts ejecting a GMount.

 

eject_finish ()

Finishes an eject operation.

 

remount ()

Starts remounting a GMount.

 

remount_finish ()

Finishes a remounting operation.

 

guess_content_type ()

Starts guessing the type of the content of a GMount. -See g_mount_guess_content_type() for more information on content -type guessing. This operation was added in 2.18.

 

guess_content_type_finish ()

Finishes a content type guessing operation. Added in 2.18.

 

guess_content_type_sync ()

Synchronous variant of guess_content_type -. Added in 2.18

 

pre_unmount ()

The ::pre-unmount signal that is emitted when the GMount will soon be emitted. If the recipient is somehow holding the mount open by keeping an open file on it it should close the file.

 

unmount_with_operation ()

Starts unmounting a GMount using a GMountOperation. Since 2.22.

 

unmount_with_operation_finish ()

Finishes an unmounting operation using a GMountOperation. Since 2.22.

 

eject_with_operation ()

Starts ejecting a GMount using a GMountOperation. Since 2.22.

 

eject_with_operation_finish ()

Finishes an eject operation using a GMountOperation. Since 2.22.

 

get_default_location ()

Gets a GFile indication a start location that can be use as the entry point for this mount. Since 2.24.

 

get_sort_key ()

Gets a key used for sorting GMount instance or NULL if no such key exists. Since 2.32.

 

get_symbolic_icon ()

Gets a symbolic GIcon for the GMount. Since 2.34.

 
-
-
-
-
-

enum GMountMountFlags

-

Flags used when mounting a mount.

-
-

Members

-
----- - - - - - -

G_MOUNT_MOUNT_NONE

-

No flags set.

-
 
-
-
-
-
-

enum GMountUnmountFlags

-

Flags used when an unmounting a mount.

-
-

Members

-
----- - - - - - - - - - - - - -

G_MOUNT_UNMOUNT_NONE

-

No flags set.

-
 

G_MOUNT_UNMOUNT_FORCE

-

Unmount even if there are outstanding - file operations on the mount.

-
 
-
-
-
-
-

Signal Details

-
-

The “changed” signal

-
void
-user_function (GMount  *mount,
-               gpointer user_data)
-

Emitted when the mount has been changed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

mount

the object on which the signal is emitted

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “pre-unmount” signal

-
void
-user_function (GMount  *mount,
-               gpointer user_data)
-

This signal is emitted when the GMount is about to be -unmounted.

-
-

Parameters

-
----- - - - - - - - - - - - - -

mount

the object on which the signal is emitted

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.22

-
-
-
-

The “unmounted” signal

-
void
-user_function (GMount  *mount,
-               gpointer user_data)
-

This signal is emitted when the GMount have been -unmounted. If the recipient is holding references to the -object they should release them so the object can be -finalized.

-
-

Parameters

-
----- - - - - - - - - - - - - -

mount

the object on which the signal is emitted

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

See Also

-

GVolume, GUnixMountEntry, GUnixMountPoint

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GMountOperation.html b/docs/reference/gio/html/GMountOperation.html deleted file mode 100644 index 14b3220f0..000000000 --- a/docs/reference/gio/html/GMountOperation.html +++ /dev/null @@ -1,1187 +0,0 @@ - - - - -GMountOperation: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GMountOperation

-

GMountOperation — Object used for authentication and user interaction

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GMountOperation * - -g_mount_operation_new () -
const char * - -g_mount_operation_get_username () -
-void - -g_mount_operation_set_username () -
const char * - -g_mount_operation_get_password () -
-void - -g_mount_operation_set_password () -
-gboolean - -g_mount_operation_get_anonymous () -
-void - -g_mount_operation_set_anonymous () -
const char * - -g_mount_operation_get_domain () -
-void - -g_mount_operation_set_domain () -
-GPasswordSave - -g_mount_operation_get_password_save () -
-void - -g_mount_operation_set_password_save () -
-int - -g_mount_operation_get_choice () -
-void - -g_mount_operation_set_choice () -
-void - -g_mount_operation_reply () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
gbooleananonymousRead / Write
gintchoiceRead / Write
-gchar *domainRead / Write
-gchar *passwordRead / Write
GPasswordSavepassword-saveRead / Write
-gchar *usernameRead / Write
-
-
-

Signals

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
voidabortedRun Last
voidask-passwordRun Last
voidask-questionRun Last
voidreplyRun Last
voidshow-processesRun Last
voidshow-unmount-progressRun Last
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
enumGAskPasswordFlags
enumGPasswordSave
 GMountOperation
enumGMountOperationResult
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GMountOperation
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GMountOperation provides a mechanism for interacting with the user. -It can be used for authenticating mountable operations, such as loop -mounting files, hard drive partitions or server locations. It can -also be used to ask the user questions or show a list of applications -preventing unmount or eject operations from completing.

-

Note that GMountOperation is used for more than just GMount -objects – for example it is also used in g_drive_start() and -g_drive_stop().

-

Users should instantiate a subclass of this that implements all the -various callbacks to show the required dialogs, such as -GtkMountOperation. If no user interaction is desired (for example -when automounting filesystems at login time), usually NULL can be -passed, see each method taking a GMountOperation for details.

-
-
-

Functions

-
-

g_mount_operation_new ()

-
GMountOperation *
-g_mount_operation_new (void);
-

Creates a new mount operation.

-
-

Returns

-

a GMountOperation.

-
-
-
-
-

g_mount_operation_get_username ()

-
const char *
-g_mount_operation_get_username (GMountOperation *op);
-

Get the user name from the mount operation.

-
-

Parameters

-
----- - - - - - -

op

a GMountOperation.

 
-
-
-

Returns

-

a string containing the user name.

-
-
-
-
-

g_mount_operation_set_username ()

-
void
-g_mount_operation_set_username (GMountOperation *op,
-                                const char *username);
-

Sets the user name within op - to username -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

op

a GMountOperation.

 

username

input username.

 
-
-
-
-
-

g_mount_operation_get_password ()

-
const char *
-g_mount_operation_get_password (GMountOperation *op);
-

Gets a password from the mount operation.

-
-

Parameters

-
----- - - - - - -

op

a GMountOperation.

 
-
-
-

Returns

-

a string containing the password within op -.

-
-
-
-
-

g_mount_operation_set_password ()

-
void
-g_mount_operation_set_password (GMountOperation *op,
-                                const char *password);
-

Sets the mount operation's password to password -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

op

a GMountOperation.

 

password

password to set.

 
-
-
-
-
-

g_mount_operation_get_anonymous ()

-
gboolean
-g_mount_operation_get_anonymous (GMountOperation *op);
-

Check to see whether the mount operation is being used -for an anonymous user.

-
-

Parameters

-
----- - - - - - -

op

a GMountOperation.

 
-
-
-

Returns

-

TRUE if mount operation is anonymous.

-
-
-
-
-

g_mount_operation_set_anonymous ()

-
void
-g_mount_operation_set_anonymous (GMountOperation *op,
-                                 gboolean anonymous);
-

Sets the mount operation to use an anonymous user if anonymous - is TRUE.

-
-

Parameters

-
----- - - - - - - - - - - - - -

op

a GMountOperation.

 

anonymous

boolean value.

 
-
-
-
-
-

g_mount_operation_get_domain ()

-
const char *
-g_mount_operation_get_domain (GMountOperation *op);
-

Gets the domain of the mount operation.

-
-

Parameters

-
----- - - - - - -

op

a GMountOperation.

 
-
-
-

Returns

-

a string set to the domain.

-
-
-
-
-

g_mount_operation_set_domain ()

-
void
-g_mount_operation_set_domain (GMountOperation *op,
-                              const char *domain);
-

Sets the mount operation's domain.

-
-

Parameters

-
----- - - - - - - - - - - - - -

op

a GMountOperation.

 

domain

the domain to set.

 
-
-
-
-
-

g_mount_operation_get_password_save ()

-
GPasswordSave
-g_mount_operation_get_password_save (GMountOperation *op);
-

Gets the state of saving passwords for the mount operation.

-
-

Parameters

-
----- - - - - - -

op

a GMountOperation.

 
-
-
-

Returns

-

a GPasswordSave flag.

-
-
-
-
-

g_mount_operation_set_password_save ()

-
void
-g_mount_operation_set_password_save (GMountOperation *op,
-                                     GPasswordSave save);
-

Sets the state of saving passwords for the mount operation.

-
-

Parameters

-
----- - - - - - - - - - - - - -

op

a GMountOperation.

 

save

a set of GPasswordSave flags.

 
-
-
-
-
-

g_mount_operation_get_choice ()

-
int
-g_mount_operation_get_choice (GMountOperation *op);
-

Gets a choice from the mount operation.

-
-

Parameters

-
----- - - - - - -

op

a GMountOperation.

 
-
-
-

Returns

-

an integer containing an index of the user's choice from -the choice's list, or 0.

-
-
-
-
-

g_mount_operation_set_choice ()

-
void
-g_mount_operation_set_choice (GMountOperation *op,
-                              int choice);
-

Sets a default choice for the mount operation.

-
-

Parameters

-
----- - - - - - - - - - - - - -

op

a GMountOperation.

 

choice

an integer.

 
-
-
-
-
-

g_mount_operation_reply ()

-
void
-g_mount_operation_reply (GMountOperation *op,
-                         GMountOperationResult result);
-

Emits the “reply” signal.

-
-

Parameters

-
----- - - - - - - - - - - - - -

op

a GMountOperation

 

result

a GMountOperationResult

 
-
-
-
-
-

Types and Values

-
-

enum GAskPasswordFlags

-

GAskPasswordFlags are used to request specific information from the -user, or to notify the user of their choices in an authentication -situation.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_ASK_PASSWORD_NEED_PASSWORD

-

operation requires a password.

-
 

G_ASK_PASSWORD_NEED_USERNAME

-

operation requires a username.

-
 

G_ASK_PASSWORD_NEED_DOMAIN

-

operation requires a domain.

-
 

G_ASK_PASSWORD_SAVING_SUPPORTED

-

operation supports saving settings.

-
 

G_ASK_PASSWORD_ANONYMOUS_SUPPORTED

-

operation supports anonymous users.

-
 
-
-
-
-
-

enum GPasswordSave

-

GPasswordSave is used to indicate the lifespan of a saved password.

-

Gvfs stores passwords in the Gnome keyring when this flag allows it -to, and later retrieves it again from there.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_PASSWORD_SAVE_NEVER

-

never save a password.

-
 

G_PASSWORD_SAVE_FOR_SESSION

-

save a password for the session.

-
 

G_PASSWORD_SAVE_PERMANENTLY

-

save a password permanently.

-
 
-
-
-
-
-

GMountOperation

-
typedef struct _GMountOperation GMountOperation;
-

Class for providing authentication methods for mounting operations, -such as mounting a file locally, or authenticating with a server.

-
-
-
-

enum GMountOperationResult

-

GMountOperationResult is returned as a result when a request for -information is send by the mounting operation.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_MOUNT_OPERATION_HANDLED

-

The request was fulfilled and the - user specified data is now available

-
 

G_MOUNT_OPERATION_ABORTED

-

The user requested the mount operation - to be aborted

-
 

G_MOUNT_OPERATION_UNHANDLED

-

The request was unhandled (i.e. not - implemented)

-
 
-
-
-
-
-

Property Details

-
-

The “anonymous” property

-
  “anonymous”                gboolean
-

Whether to use an anonymous user when authenticating.

-

Flags: Read / Write

-

Default value: FALSE

-
-
-
-

The “choice” property

-
  “choice”                   gint
-

The index of the user's choice when a question is asked during the - -mount operation. See the “ask-question” signal.

-

Flags: Read / Write

-

Allowed values: >= 0

-

Default value: 0

-
-
-
-

The “domain” property

-
  “domain”                   gchar *
-

The domain to use for the mount operation.

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “password” property

-
  “password”                 gchar *
-

The password that is used for authentication when carrying out -the mount operation.

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “password-save” property

-
  “password-save”            GPasswordSave
-

Determines if and how the password information should be saved.

-

Flags: Read / Write

-

Default value: G_PASSWORD_SAVE_NEVER

-
-
-
-

The “username” property

-
  “username”                 gchar *
-

The user name that is used for authentication when carrying out -the mount operation.

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

Signal Details

-
-

The “aborted” signal

-
void
-user_function (GMountOperation *arg0,
-               gpointer         user_data)
-

Emitted by the backend when e.g. a device becomes unavailable -while a mount operation is in progress.

-

Implementations of GMountOperation should handle this signal -by dismissing open password dialogs.

-
-

Parameters

-
----- - - - - - -

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.20

-
-
-
-

The “ask-password” signal

-
void
-user_function (GMountOperation  *op,
-               gchar            *message,
-               gchar            *default_user,
-               gchar            *default_domain,
-               GAskPasswordFlags flags,
-               gpointer          user_data)
-

Emitted when a mount operation asks the user for a password.

-

If the message contains a line break, the first line should be -presented as a heading. For example, it may be used as the -primary text in a GtkMessageDialog.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

op

a GMountOperation requesting a password.

 

message

string containing a message to display to the user.

 

default_user

string containing the default user name.

 

default_domain

string containing the default domain.

 

flags

a set of GAskPasswordFlags.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “ask-question” signal

-
void
-user_function (GMountOperation *op,
-               gchar           *message,
-               GStrv            choices,
-               gpointer         user_data)
-

Emitted when asking the user a question and gives a list of -choices for the user to choose from.

-

If the message contains a line break, the first line should be -presented as a heading. For example, it may be used as the -primary text in a GtkMessageDialog.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

op

a GMountOperation asking a question.

 

message

string containing a message to display to the user.

 

choices

an array of strings for each possible choice.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “reply” signal

-
void
-user_function (GMountOperation      *op,
-               GMountOperationResult result,
-               gpointer              user_data)
-

Emitted when the user has replied to the mount operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

op

a GMountOperation.

 

result

a GMountOperationResult indicating how the request was handled

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “show-processes” signal

-
void
-user_function (GMountOperation *op,
-               gchar           *message,
-               GArray          *processes,
-               GStrv            choices,
-               gpointer         user_data)
-

Emitted when one or more processes are blocking an operation -e.g. unmounting/ejecting a GMount or stopping a GDrive.

-

Note that this signal may be emitted several times to update the -list of blocking processes as processes close files. The -application should only respond with g_mount_operation_reply() to -the latest signal (setting “choice” to the choice -the user made).

-

If the message contains a line break, the first line should be -presented as a heading. For example, it may be used as the -primary text in a GtkMessageDialog.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

op

a GMountOperation.

 

message

string containing a message to display to the user.

 

processes

an array of GPid for processes -blocking the operation.

[element-type GPid]

choices

an array of strings for each possible choice.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.22

-
-
-
-

The “show-unmount-progress” signal

-
void
-user_function (GMountOperation *op,
-               gchar           *message,
-               gint64           time_left,
-               gint64           bytes_left,
-               gpointer         user_data)
-

Emitted when an unmount operation has been busy for more than some time -(typically 1.5 seconds).

-

When unmounting or ejecting a volume, the kernel might need to flush -pending data in its buffers to the volume stable storage, and this operation -can take a considerable amount of time. This signal may be emitted several -times as long as the unmount operation is outstanding, and then one -last time when the operation is completed, with bytes_left - set to zero.

-

Implementations of GMountOperation should handle this signal by -showing an UI notification, and then dismiss it, or show another notification -of completion, when bytes_left - reaches zero.

-

If the message contains a line break, the first line should be -presented as a heading. For example, it may be used as the -primary text in a GtkMessageDialog.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

op

a GMountOperation:

 

message

string containing a mesage to display to the user

 

time_left

the estimated time left before the operation completes, -in microseconds, or -1

 

bytes_left

the amount of bytes to be written before the operation -completes (or -1 if such amount is not known), or zero if the operation -is completed

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.34

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GNetworkAddress.html b/docs/reference/gio/html/GNetworkAddress.html deleted file mode 100644 index f8600c08d..000000000 --- a/docs/reference/gio/html/GNetworkAddress.html +++ /dev/null @@ -1,501 +0,0 @@ - - - - -GNetworkAddress: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GNetworkAddress

-

GNetworkAddress — A GSocketConnectable for resolving hostnames

-
-
-

Functions

- -
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - -
-gchar *hostnameRead / Write / Construct Only
guintportRead / Write / Construct Only
-gchar *schemeRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GNetworkAddress
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GNetworkAddress
-
-
-
-

Implemented Interfaces

-

-GNetworkAddress implements - GSocketConnectable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GNetworkAddress provides an easy way to resolve a hostname and -then attempt to connect to that host, handling the possibility of -multiple IP addresses and multiple address families.

-

See GSocketConnectable for and example of using the connectable -interface.

-
-
-

Functions

-
-

g_network_address_new ()

-
GSocketConnectable *
-g_network_address_new (const gchar *hostname,
-                       guint16 port);
-

Creates a new GSocketConnectable for connecting to the given -hostname - and port -.

-

Note that depending on the configuration of the machine, a -hostname - of localhost may refer to the IPv4 loopback address -only, or to both IPv4 and IPv6; use -g_network_address_new_loopback() to create a GNetworkAddress that -is guaranteed to resolve to both addresses.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hostname

the hostname

 

port

the port

 
-
-
-

Returns

-

the new GNetworkAddress.

-

[transfer full][type GNetworkAddress]

-
-

Since: 2.22

-
-
-
-

g_network_address_new_loopback ()

-
GSocketConnectable *
-g_network_address_new_loopback (guint16 port);
-

Creates a new GSocketConnectable for connecting to the local host -over a loopback connection to the given port -. This is intended for -use in connecting to local services which may be running on IPv4 or -IPv6.

-

The connectable will return IPv4 and IPv6 loopback addresses, -regardless of how the host resolves localhost. By contrast, -g_network_address_new() will often only return an IPv4 address when -resolving localhost, and an IPv6 address for localhost6.

-

g_network_address_get_hostname() will always return localhost for -GNetworkAddresses created with this constructor.

-
-

Parameters

-
----- - - - - - -

port

the port

 
-
-
-

Returns

-

the new GNetworkAddress.

-

[transfer full][type GNetworkAddress]

-
-

Since: 2.44

-
-
-
-

g_network_address_parse ()

-
GSocketConnectable *
-g_network_address_parse (const gchar *host_and_port,
-                         guint16 default_port,
-                         GError **error);
-

Creates a new GSocketConnectable for connecting to the given -hostname - and port -. May fail and return NULL in case -parsing host_and_port - fails.

-

host_and_port - may be in any of a number of recognised formats; an IPv6 -address, an IPv4 address, or a domain name (in which case a DNS -lookup is performed). Quoting with [] is supported for all address -types. A port override may be specified in the usual way with a -colon.

-

If no port is specified in host_and_port - then default_port - will be -used as the port number to connect to.

-

In general, host_and_port - is expected to be provided by the user -(allowing them to give the hostname, and a port overide if necessary) -and default_port - is expected to be provided by the application.

-

(The port component of host_and_port - can also be specified as a -service name rather than as a numeric port, but this functionality -is deprecated, because it depends on the contents of /etc/services, -which is generally quite sparse on platforms other than Linux.)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

host_and_port

the hostname and optionally a port

 

default_port

the default port if not in host_and_port -

 

error

a pointer to a GError, or NULL

 
-
-
-

Returns

-

the new -GNetworkAddress, or NULL on error.

-

[transfer full][type GNetworkAddress]

-
-

Since: 2.22

-
-
-
-

g_network_address_parse_uri ()

-
GSocketConnectable *
-g_network_address_parse_uri (const gchar *uri,
-                             guint16 default_port,
-                             GError **error);
-

Creates a new GSocketConnectable for connecting to the given -uri -. May fail and return NULL in case parsing uri - fails.

-

Using this rather than g_network_address_new() or -g_network_address_parse() allows GSocketClient to determine -when to use application-specific proxy protocols.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

uri

the hostname and optionally a port

 

default_port

The default port if none is found in the URI

 

error

a pointer to a GError, or NULL

 
-
-
-

Returns

-

the new -GNetworkAddress, or NULL on error.

-

[transfer full][type GNetworkAddress]

-
-

Since: 2.26

-
-
-
-

g_network_address_get_hostname ()

-
const gchar *
-g_network_address_get_hostname (GNetworkAddress *addr);
-

Gets addr -'s hostname. This might be either UTF-8 or ASCII-encoded, -depending on what addr - was created with.

-
-

Parameters

-
----- - - - - - -

addr

a GNetworkAddress

 
-
-
-

Returns

-

addr -'s hostname

-
-

Since: 2.22

-
-
-
-

g_network_address_get_port ()

-
guint16
-g_network_address_get_port (GNetworkAddress *addr);
-

Gets addr -'s port number

-
-

Parameters

-
----- - - - - - -

addr

a GNetworkAddress

 
-
-
-

Returns

-

addr -'s port (which may be 0)

-
-

Since: 2.22

-
-
-
-

g_network_address_get_scheme ()

-
const gchar *
-g_network_address_get_scheme (GNetworkAddress *addr);
-

Gets addr -'s scheme

-
-

Parameters

-
----- - - - - - -

addr

a GNetworkAddress

 
-
-
-

Returns

-

addr -'s scheme (NULL if not built from URI)

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GNetworkAddress

-
typedef struct _GNetworkAddress GNetworkAddress;
-

A GSocketConnectable for resolving a hostname and connecting to -that host.

-
-
-
-

Property Details

-
-

The “hostname” property

-
  “hostname”                 gchar *
-

Hostname to resolve.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
-

The “port” property

-
  “port”                     guint
-

Network port.

-

Flags: Read / Write / Construct Only

-

Allowed values: <= 65535

-

Default value: 0

-
-
-
-

The “scheme” property

-
  “scheme”                   gchar *
-

URI Scheme.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GNetworkMonitor.html b/docs/reference/gio/html/GNetworkMonitor.html deleted file mode 100644 index 12e3e1028..000000000 --- a/docs/reference/gio/html/GNetworkMonitor.html +++ /dev/null @@ -1,719 +0,0 @@ - - - - -GNetworkMonitor: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GNetworkMonitor

-

GNetworkMonitor — Network status monitor

-
- -
-

Properties

-
----- - - - - - - - - - - - - - - - - - -
GNetworkConnectivityconnectivityRead
gbooleannetwork-availableRead
gbooleannetwork-meteredRead
-
-
-

Signals

-
----- - - - - - -
voidnetwork-changedRun Last
-
-
-

Types and Values

- -
-
-

Object Hierarchy

-
    GInterface
-    ╰── GNetworkMonitor
-
-
-
-

Prerequisites

-

-GNetworkMonitor requires - GInitable and GObject.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GNetworkMonitor provides an easy-to-use cross-platform API -for monitoring network connectivity. On Linux, the implementation -is based on the kernel's netlink interface.

-
-
-

Functions

-
-

g_network_monitor_get_default ()

-
GNetworkMonitor *
-g_network_monitor_get_default (void);
-

Gets the default GNetworkMonitor for the system.

-
-

Returns

-

a GNetworkMonitor.

-

[transfer none]

-
-

Since: 2.32

-
-
-
-

g_network_monitor_get_network_available ()

-
gboolean
-g_network_monitor_get_network_available
-                               (GNetworkMonitor *monitor);
-

Checks if the network is available. "Available" here means that the -system has a default route available for at least one of IPv4 or -IPv6. It does not necessarily imply that the public Internet is -reachable. See “network-available” for more details.

-
-

Parameters

-
----- - - - - - -

monitor

the GNetworkMonitor

 
-
-
-

Returns

-

whether the network is available

-
-

Since: 2.32

-
-
-
-

g_network_monitor_get_network_metered ()

-
gboolean
-g_network_monitor_get_network_metered (GNetworkMonitor *monitor);
-

Checks if the network is metered. -See “network-metered” for more details.

-
-

Parameters

-
----- - - - - - -

monitor

the GNetworkMonitor

 
-
-
-

Returns

-

whether the connection is metered

-
-

Since: 2.46

-
-
-
-

g_network_monitor_can_reach ()

-
gboolean
-g_network_monitor_can_reach (GNetworkMonitor *monitor,
-                             GSocketConnectable *connectable,
-                             GCancellable *cancellable,
-                             GError **error);
-

Attempts to determine whether or not the host pointed to by -connectable - can be reached, without actually trying to connect to -it.

-

This may return TRUE even when “network-available” -is FALSE, if, for example, monitor - can determine that -connectable - refers to a host on a local network.

-

If monitor - believes that an attempt to connect to connectable - -will succeed, it will return TRUE. Otherwise, it will return -FALSE and set error - to an appropriate error (such as -G_IO_ERROR_HOST_UNREACHABLE).

-

Note that although this does not attempt to connect to -connectable -, it may still block for a brief period of time (eg, -trying to do multicast DNS on the local network), so if you do not -want to block, you should use g_network_monitor_can_reach_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

monitor

a GNetworkMonitor

 

connectable

a GSocketConnectable

 

cancellable

a GCancellable, or NULL.

[nullable]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE if connectable -is reachable, FALSE if not.

-
-

Since: 2.32

-
-
-
-

g_network_monitor_can_reach_async ()

-
void
-g_network_monitor_can_reach_async (GNetworkMonitor *monitor,
-                                   GSocketConnectable *connectable,
-                                   GCancellable *cancellable,
-                                   GAsyncReadyCallback callback,
-                                   gpointer user_data);
-

Asynchronously attempts to determine whether or not the host -pointed to by connectable - can be reached, without actually -trying to connect to it.

-

For more details, see g_network_monitor_can_reach().

-

When the operation is finished, callback - will be called. -You can then call g_network_monitor_can_reach_finish() -to get the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

monitor

a GNetworkMonitor

 

connectable

a GSocketConnectable

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

a GAsyncReadyCallback to call when the -request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_network_monitor_can_reach_finish ()

-
gboolean
-g_network_monitor_can_reach_finish (GNetworkMonitor *monitor,
-                                    GAsyncResult *result,
-                                    GError **error);
-

Finishes an async network connectivity test. -See g_network_monitor_can_reach_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

monitor

a GNetworkMonitor

 

result

a GAsyncResult

 

error

return location for errors, or NULL

 
-
-
-

Returns

-

TRUE if network is reachable, FALSE if not.

-
-
-
-
-

g_network_monitor_get_connectivity ()

-
GNetworkConnectivity
-g_network_monitor_get_connectivity (GNetworkMonitor *monitor);
-

Gets a more detailed networking state than -g_network_monitor_get_network_available().

-

If “network-available” is FALSE, then the -connectivity state will be G_NETWORK_CONNECTIVITY_LOCAL.

-

If “network-available” is TRUE, then the -connectivity state will be G_NETWORK_CONNECTIVITY_FULL (if there -is full Internet connectivity), G_NETWORK_CONNECTIVITY_LIMITED (if -the host has a default route, but appears to be unable to actually -reach the full Internet), or G_NETWORK_CONNECTIVITY_PORTAL (if the -host is trapped behind a "captive portal" that requires some sort -of login or acknowledgement before allowing full Internet access).

-

Note that in the case of G_NETWORK_CONNECTIVITY_LIMITED and -G_NETWORK_CONNECTIVITY_PORTAL, it is possible that some sites are -reachable but others are not. In this case, applications can -attempt to connect to remote servers, but should gracefully fall -back to their "offline" behavior if the connection attempt fails.

-
-

Parameters

-
----- - - - - - -

monitor

the GNetworkMonitor

 
-
-
-

Returns

-

the network connectivity state

-
-

Since: 2.44

-
-
-
-

Types and Values

-
-

GNetworkMonitor

-
typedef struct _GNetworkMonitor GNetworkMonitor;
-

GNetworkMonitor monitors the status of network connections and -indicates when a possibly-user-visible change has occurred.

-

Since: 2.32

-
-
-
-

struct GNetworkMonitorInterface

-
struct GNetworkMonitorInterface {
-  GTypeInterface g_iface;
-
-  void     (*network_changed)  (GNetworkMonitor      *monitor,
-				gboolean              available);
-
-  gboolean (*can_reach)        (GNetworkMonitor      *monitor,
-				GSocketConnectable   *connectable,
-				GCancellable         *cancellable,
-				GError              **error);
-  void     (*can_reach_async)  (GNetworkMonitor      *monitor,
-				GSocketConnectable   *connectable,
-				GCancellable         *cancellable,
-				GAsyncReadyCallback   callback,
-				gpointer              user_data);
-  gboolean (*can_reach_finish) (GNetworkMonitor      *monitor,
-				GAsyncResult         *result,
-				GError              **error);
-};
-
-

The virtual function table for GNetworkMonitor.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

network_changed ()

the virtual function pointer for the -GNetworkMonitor::network-changed signal.

 

can_reach ()

the virtual function pointer for g_network_monitor_can_reach()

 

can_reach_async ()

the virtual function pointer for -g_network_monitor_can_reach_async()

 

can_reach_finish ()

the virtual function pointer for -g_network_monitor_can_reach_finish()

 
-
-

Since: 2.32

-
-
-
-

G_NETWORK_MONITOR_EXTENSION_POINT_NAME

-
#define G_NETWORK_MONITOR_EXTENSION_POINT_NAME "gio-network-monitor"
-
-

Extension point for network status monitoring functionality. -See Extending GIO.

-

Since: 2.30

-
-
-
-

enum GNetworkConnectivity

-

The host's network connectivity state, as reported by GNetworkMonitor.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_NETWORK_CONNECTIVITY_LOCAL

-

The host is not configured with a - route to the Internet; it may or may not be connected to a local - network.

-
 

G_NETWORK_CONNECTIVITY_LIMITED

-

The host is connected to a network, but - does not appear to be able to reach the full Internet, perhaps - due to upstream network problems.

-
 

G_NETWORK_CONNECTIVITY_PORTAL

-

The host is behind a captive portal and - cannot reach the full Internet.

-
 

G_NETWORK_CONNECTIVITY_FULL

-

The host is connected to a network, and - appears to be able to reach the full Internet.

-
 
-
-

Since: 2.44

-
-
-
-

Property Details

-
-

The “connectivity” property

-
  “connectivity”             GNetworkConnectivity
-

More detailed information about the host's network connectivity. -See g_network_monitor_get_connectivity() and -GNetworkConnectivity for more details.

-

Flags: Read

-

Default value: G_NETWORK_CONNECTIVITY_FULL

-

Since: 2.44

-
-
-
-

The “network-available” property

-
  “network-available”        gboolean
-

Whether the network is considered available. That is, whether the -system has a default route for at least one of IPv4 or IPv6.

-

Real-world networks are of course much more complicated than -this; the machine may be connected to a wifi hotspot that -requires payment before allowing traffic through, or may be -connected to a functioning router that has lost its own upstream -connectivity. Some hosts might only be accessible when a VPN is -active. Other hosts might only be accessible when the VPN is -not active. Thus, it is best to use g_network_monitor_can_reach() -or g_network_monitor_can_reach_async() to test for reachability -on a host-by-host basis. (On the other hand, when the property is -FALSE, the application can reasonably expect that no remote -hosts at all are reachable, and should indicate this to the user -in its UI.)

-

See also “network-changed”.

-

Flags: Read

-

Default value: FALSE

-

Since: 2.32

-
-
-
-

The “network-metered” property

-
  “network-metered”          gboolean
-

Whether the network is considered metered. That is, whether the -system has traffic flowing through the default connection that is -subject to limitations set by service providers. For example, traffic -might be billed by the amount of data transmitted, or there might be a -quota on the amount of traffic per month. This is typical with tethered -connections (3G and 4G) and in such situations, bandwidth intensive -applications may wish to avoid network activity where possible if it will -cost the user money or use up their limited quota.

-

If more information is required about specific devices then the -system network management API should be used instead (for example, -NetworkManager or ConnMan).

-

If this information is not available then no networks will be -marked as metered.

-

See also “network-available”.

-

Flags: Read

-

Default value: FALSE

-

Since: 2.46

-
-
-
-

Signal Details

-
-

The “network-changed” signal

-
void
-user_function (GNetworkMonitor *monitor,
-               gboolean         available,
-               gpointer         user_data)
-

Emitted when the network configuration changes. If available - is -TRUE, then some hosts may be reachable that were not reachable -before, while others that were reachable before may no longer be -reachable. If available - is FALSE, then no remote hosts are -reachable.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

monitor

a GNetworkMonitor

 

available

the current value of “network-available”

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.32

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GNetworkService.html b/docs/reference/gio/html/GNetworkService.html deleted file mode 100644 index b62e44469..000000000 --- a/docs/reference/gio/html/GNetworkService.html +++ /dev/null @@ -1,416 +0,0 @@ - - - - -GNetworkService: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GNetworkService

-

GNetworkService — A GSocketConnectable for resolving SRV records

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GSocketConnectable * - -g_network_service_new () -
const gchar * - -g_network_service_get_service () -
const gchar * - -g_network_service_get_protocol () -
const gchar * - -g_network_service_get_domain () -
const gchar * - -g_network_service_get_scheme () -
-void - -g_network_service_set_scheme () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - -
-gchar *domainRead / Write / Construct Only
-gchar *protocolRead / Write / Construct Only
-gchar *schemeRead / Write
-gchar *serviceRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GNetworkService
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GNetworkService
-
-
-
-

Implemented Interfaces

-

-GNetworkService implements - GSocketConnectable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Like GNetworkAddress does with hostnames, GNetworkService -provides an easy way to resolve a SRV record, and then attempt to -connect to one of the hosts that implements that service, handling -service priority/weighting, multiple IP addresses, and multiple -address families.

-

See GSrvTarget for more information about SRV records, and see -GSocketConnectable for and example of using the connectable -interface.

-
-
-

Functions

-
-

g_network_service_new ()

-
GSocketConnectable *
-g_network_service_new (const gchar *service,
-                       const gchar *protocol,
-                       const gchar *domain);
-

Creates a new GNetworkService representing the given service -, -protocol -, and domain -. This will initially be unresolved; use the -GSocketConnectable interface to resolve it.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

service

the service type to look up (eg, "ldap")

 

protocol

the networking protocol to use for service -(eg, "tcp")

 

domain

the DNS domain to look up the service in

 
-
-
-

Returns

-

a new GNetworkService.

-

[transfer full][type GNetworkService]

-
-

Since: 2.22

-
-
-
-

g_network_service_get_service ()

-
const gchar *
-g_network_service_get_service (GNetworkService *srv);
-

Gets srv -'s service name (eg, "ldap").

-
-

Parameters

-
----- - - - - - -

srv

a GNetworkService

 
-
-
-

Returns

-

srv -'s service name

-
-

Since: 2.22

-
-
-
-

g_network_service_get_protocol ()

-
const gchar *
-g_network_service_get_protocol (GNetworkService *srv);
-

Gets srv -'s protocol name (eg, "tcp").

-
-

Parameters

-
----- - - - - - -

srv

a GNetworkService

 
-
-
-

Returns

-

srv -'s protocol name

-
-

Since: 2.22

-
-
-
-

g_network_service_get_domain ()

-
const gchar *
-g_network_service_get_domain (GNetworkService *srv);
-

Gets the domain that srv - serves. This might be either UTF-8 or -ASCII-encoded, depending on what srv - was created with.

-
-

Parameters

-
----- - - - - - -

srv

a GNetworkService

 
-
-
-

Returns

-

srv -'s domain name

-
-

Since: 2.22

-
-
-
-

g_network_service_get_scheme ()

-
const gchar *
-g_network_service_get_scheme (GNetworkService *srv);
-

Get's the URI scheme used to resolve proxies. By default, the service name -is used as scheme.

-
-

Parameters

-
----- - - - - - -

srv

a GNetworkService

 
-
-
-

Returns

-

srv -'s scheme name

-
-

Since: 2.26

-
-
-
-

g_network_service_set_scheme ()

-
void
-g_network_service_set_scheme (GNetworkService *srv,
-                              const gchar *scheme);
-

Set's the URI scheme used to resolve proxies. By default, the service name -is used as scheme.

-
-

Parameters

-
----- - - - - - - - - - - - - -

srv

a GNetworkService

 

scheme

a URI scheme

 
-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GNetworkService

-
typedef struct _GNetworkService GNetworkService;
-

A GSocketConnectable for resolving a SRV record and connecting to -that service.

-
-
-
-

Property Details

-
-

The “domain” property

-
  “domain”                   gchar *
-

Network domain, eg, "example.com".

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
-

The “protocol” property

-
  “protocol”                 gchar *
-

Network protocol, eg "tcp".

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
-

The “scheme” property

-
  “scheme”                   gchar *
-

Network scheme (default is to use service).

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “service” property

-
  “service”                  gchar *
-

Service name, eg "ldap".

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GNotification.html b/docs/reference/gio/html/GNotification.html deleted file mode 100644 index 0d0fa7ab5..000000000 --- a/docs/reference/gio/html/GNotification.html +++ /dev/null @@ -1,780 +0,0 @@ - - - - -GNotification: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GNotification

-

GNotification — User Notifications (pop up messages)

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GNotification * - -g_notification_new () -
-void - -g_notification_set_title () -
-void - -g_notification_set_body () -
-void - -g_notification_set_icon () -
-void - -g_notification_set_priority () -
-void - -g_notification_set_urgent () -
-void - -g_notification_set_default_action () -
-void - -g_notification_set_default_action_and_target () -
-void - -g_notification_set_default_action_and_target_value () -
-void - -g_notification_add_button () -
-void - -g_notification_add_button_with_target () -
-void - -g_notification_add_button_with_target_value () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GNotification
enumGNotificationPriority
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GNotification
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GNotification is a mechanism for creating a notification to be shown -to the user -- typically as a pop-up notification presented by the -desktop environment shell.

-

The key difference between GNotification and other similar APIs is -that, if supported by the desktop environment, notifications sent -with GNotification will persist after the application has exited, -and even across system reboots.

-

Since the user may click on a notification while the application is -not running, applications using GNotification should be able to be -started as a D-Bus service, using GApplication.

-

User interaction with a notification (either the default action, or -buttons) must be associated with actions on the application (ie: -"app." actions). It is not possible to route user interaction -through the notification itself, because the object will not exist if -the application is autostarted as a result of a notification being -clicked.

-

A notification can be sent with g_application_send_notification().

-
-
-

Functions

-
-

g_notification_new ()

-
GNotification *
-g_notification_new (const gchar *title);
-

Creates a new GNotification with title - as its title.

-

After populating notification - with more details, it can be sent to -the desktop shell with g_application_send_notification(). Changing -any properties after this call will not have any effect until -resending notification -.

-
-

Parameters

-
----- - - - - - -

title

the title of the notification

 
-
-
-

Returns

-

a new GNotification instance

-
-

Since: 2.40

-
-
-
-

g_notification_set_title ()

-
void
-g_notification_set_title (GNotification *notification,
-                          const gchar *title);
-

Sets the title of notification - to title -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

notification

a GNotification

 

title

the new title for notification -

 
-
-

Since: 2.40

-
-
-
-

g_notification_set_body ()

-
void
-g_notification_set_body (GNotification *notification,
-                         const gchar *body);
-

Sets the body of notification - to body -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

notification

a GNotification

 

body

the new body for notification -, or NULL.

[nullable]
-
-

Since: 2.40

-
-
-
-

g_notification_set_icon ()

-
void
-g_notification_set_icon (GNotification *notification,
-                         GIcon *icon);
-

Sets the icon of notification - to icon -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

notification

a GNotification

 

icon

the icon to be shown in notification -, as a GIcon

 
-
-

Since: 2.40

-
-
-
-

g_notification_set_priority ()

-
void
-g_notification_set_priority (GNotification *notification,
-                             GNotificationPriority priority);
-

Sets the priority of notification - to priority -. See -GNotificationPriority for possible values.

-
-

Parameters

-
----- - - - - - - - - - - - - -

notification

a GNotification

 

priority

a GNotificationPriority

 
-
-
-
-
-

g_notification_set_urgent ()

-
void
-g_notification_set_urgent (GNotification *notification,
-                           gboolean urgent);
-

g_notification_set_urgent is deprecated and should not be used in newly-written code.

-

Deprecated in favor of g_notification_set_priority().

-
-

Parameters

-
----- - - - - - - - - - - - - -

notification

a GNotification

 

urgent

TRUE if notification -is urgent

 
-
-

Since: 2.40

-
-
-
-

g_notification_set_default_action ()

-
void
-g_notification_set_default_action (GNotification *notification,
-                                   const gchar *detailed_action);
-

Sets the default action of notification - to detailed_action -. This -action is activated when the notification is clicked on.

-

The action in detailed_action - must be an application-wide action (it -must start with "app."). If detailed_action - contains a target, the -given action will be activated with that target as its parameter. -See g_action_parse_detailed_name() for a description of the format -for detailed_action -.

-

When no default action is set, the application that the notification -was sent on is activated.

-
-

Parameters

-
----- - - - - - - - - - - - - -

notification

a GNotification

 

detailed_action

a detailed action name

 
-
-

Since: 2.40

-
-
-
-

g_notification_set_default_action_and_target ()

-
void
-g_notification_set_default_action_and_target
-                               (GNotification *notification,
-                                const gchar *action,
-                                const gchar *target_format,
-                                ...);
-

Sets the default action of notification - to action -. This action is -activated when the notification is clicked on. It must be an -application-wide action (it must start with "app.").

-

If target_format - is given, it is used to collect remaining -positional parameters into a GVariant instance, similar to -g_variant_new(). action - will be activated with that GVariant as its -parameter.

-

When no default action is set, the application that the notification -was sent on is activated.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

notification

a GNotification

 

action

an action name

 

target_format

a GVariant format string, or NULL.

[nullable]

...

positional parameters, as determined by target_format -

 
-
-

Since: 2.40

-
-
-
-

g_notification_set_default_action_and_target_value ()

-
void
-g_notification_set_default_action_and_target_value
-                               (GNotification *notification,
-                                const gchar *action,
-                                GVariant *target);
-

Sets the default action of notification - to action -. This action is -activated when the notification is clicked on. It must be an -application-wide action (start with "app.").

-

If target - is non-NULL, action - will be activated with target - as -its parameter.

-

When no default action is set, the application that the notification -was sent on is activated.

-

[rename-to g_notification_set_default_action_and_target]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

notification

a GNotification

 

action

an action name

 

target

a GVariant to use as action -'s parameter, or NULL.

[nullable]
-
-

Since: 2.40

-
-
-
-

g_notification_add_button ()

-
void
-g_notification_add_button (GNotification *notification,
-                           const gchar *label,
-                           const gchar *detailed_action);
-

Adds a button to notification - that activates the action in -detailed_action - when clicked. That action must be an -application-wide action (starting with "app."). If detailed_action - -contains a target, the action will be activated with that target as -its parameter.

-

See g_action_parse_detailed_name() for a description of the format -for detailed_action -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

notification

a GNotification

 

label

label of the button

 

detailed_action

a detailed action name

 
-
-

Since: 2.40

-
-
-
-

g_notification_add_button_with_target ()

-
void
-g_notification_add_button_with_target (GNotification *notification,
-                                       const gchar *label,
-                                       const gchar *action,
-                                       const gchar *target_format,
-                                       ...);
-

Adds a button to notification - that activates action - when clicked. -action - must be an application-wide action (it must start with "app.").

-

If target_format - is given, it is used to collect remaining -positional parameters into a GVariant instance, similar to -g_variant_new(). action - will be activated with that GVariant as its -parameter.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

notification

a GNotification

 

label

label of the button

 

action

an action name

 

target_format

a GVariant format string, or NULL.

[nullable]

...

positional parameters, as determined by target_format -

 
-
-

Since: 2.40

-
-
-
-

g_notification_add_button_with_target_value ()

-
void
-g_notification_add_button_with_target_value
-                               (GNotification *notification,
-                                const gchar *label,
-                                const gchar *action,
-                                GVariant *target);
-

Adds a button to notification - that activates action - when clicked. -action - must be an application-wide action (it must start with "app.").

-

If target - is non-NULL, action - will be activated with target - as -its parameter.

-

[rename-to g_notification_add_button_with_target]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

notification

a GNotification

 

label

label of the button

 

action

an action name

 

target

a GVariant to use as action -'s parameter, or NULL.

[nullable]
-
-

Since: 2.40

-
-
-
-

Types and Values

-
-

GNotification

-
typedef struct _GNotification GNotification;
-

This structure type is private and should only be accessed using the -public APIs.

-

Since: 2.40

-
-
-
-

enum GNotificationPriority

-

Priority levels for GNotifications.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_NOTIFICATION_PRIORITY_NORMAL

-

the default priority, to be used for the - majority of notifications (for example email messages, software updates, - completed download/sync operations)

-
 

G_NOTIFICATION_PRIORITY_LOW

-

for notifications that do not require - immediate attention - typically used for contextual background - information, such as contact birthdays or local weather

-
 

G_NOTIFICATION_PRIORITY_HIGH

-

for events that require more attention, - usually because responses are time-sensitive (for example chat and SMS - messages or alarms)

-
 

G_NOTIFICATION_PRIORITY_URGENT

-

for urgent notifications, or notifications - that require a response in a short space of time (for example phone calls - or emergency warnings)

-
 
-
-

Since: 2.42

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GOutputStream.html b/docs/reference/gio/html/GOutputStream.html deleted file mode 100644 index 95faf2f4d..000000000 --- a/docs/reference/gio/html/GOutputStream.html +++ /dev/null @@ -1,1701 +0,0 @@ - - - - -GOutputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GOutputStream

-

GOutputStream — Base class for implementing streaming output

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gssize - -g_output_stream_write () -
-gboolean - -g_output_stream_write_all () -
-void - -g_output_stream_write_all_async () -
-gboolean - -g_output_stream_write_all_finish () -
-gssize - -g_output_stream_splice () -
-gboolean - -g_output_stream_flush () -
-gboolean - -g_output_stream_close () -
-void - -g_output_stream_write_async () -
-gssize - -g_output_stream_write_finish () -
-void - -g_output_stream_splice_async () -
-gssize - -g_output_stream_splice_finish () -
-void - -g_output_stream_flush_async () -
-gboolean - -g_output_stream_flush_finish () -
-void - -g_output_stream_close_async () -
-gboolean - -g_output_stream_close_finish () -
-gboolean - -g_output_stream_is_closing () -
-gboolean - -g_output_stream_is_closed () -
-gboolean - -g_output_stream_has_pending () -
-gboolean - -g_output_stream_set_pending () -
-void - -g_output_stream_clear_pending () -
-gssize - -g_output_stream_write_bytes () -
-void - -g_output_stream_write_bytes_async () -
-gssize - -g_output_stream_write_bytes_finish () -
-gboolean - -g_output_stream_printf () -
-gboolean - -g_output_stream_vprintf () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
enumGOutputStreamSpliceFlags
 GOutputStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GOutputStream
-        ├── GFilterOutputStream
-        ├── GFileOutputStream
-        ├── GMemoryOutputStream
-        ╰── GUnixOutputStream
-
-
-
-

Known Derived Interfaces

-

-GOutputStream is required by - GPollableOutputStream.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GOutputStream has functions to write to a stream (g_output_stream_write()), -to close a stream (g_output_stream_close()) and to flush pending writes -(g_output_stream_flush()).

-

To copy the content of an input stream to an output stream without -manually handling the reads and writes, use g_output_stream_splice().

-

See the documentation for GIOStream for details of thread safety of -streaming APIs.

-

All of these functions have async variants too.

-
-
-

Functions

-
-

g_output_stream_write ()

-
gssize
-g_output_stream_write (GOutputStream *stream,
-                       const void *buffer,
-                       gsize count,
-                       GCancellable *cancellable,
-                       GError **error);
-

Tries to write count - bytes from buffer - into the stream. Will block -during the operation.

-

If count is 0, returns 0 and does nothing. A value of count - -larger than G_MAXSSIZE will cause a G_IO_ERROR_INVALID_ARGUMENT error.

-

On success, the number of bytes written to the stream is returned. -It is not an error if this is not the same as the requested size, as it -can happen e.g. on a partial I/O error, or if there is not enough -storage in the stream. All writes block until at least one byte -is written or an error occurs; 0 is never returned (unless -count - is 0).

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an -operation was partially finished when the operation was cancelled the -partial result will be returned, without an error.

-

On error -1 is returned and error - is set accordingly.

-

Virtual: write_fn

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GOutputStream.

 

buffer

the buffer containing the data to write.

[array length=count][element-type guint8]

count

the number of bytes to write

 

cancellable

optional cancellable object.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

Number of bytes written, or -1 on error

-
-
-
-
-

g_output_stream_write_all ()

-
gboolean
-g_output_stream_write_all (GOutputStream *stream,
-                           const void *buffer,
-                           gsize count,
-                           gsize *bytes_written,
-                           GCancellable *cancellable,
-                           GError **error);
-

Tries to write count - bytes from buffer - into the stream. Will block -during the operation.

-

This function is similar to g_output_stream_write(), except it tries to -write as many bytes as requested, only stopping on an error.

-

On a successful write of count - bytes, TRUE is returned, and bytes_written - -is set to count -.

-

If there is an error during the operation FALSE is returned and error - -is set to indicate the error status.

-

As a special exception to the normal conventions for functions that -use GError, if this function returns FALSE (and sets error -) then -bytes_written - will be set to the number of bytes that were -successfully written before the error was encountered. This -functionality is only available from C. If you need it from another -language then you must write your own loop around -g_output_stream_write().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GOutputStream.

 

buffer

the buffer containing the data to write.

[array length=count][element-type guint8]

count

the number of bytes to write

 

bytes_written

location to store the number of bytes that was -written to the stream.

[out]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

TRUE on success, FALSE if there was an error

-
-
-
-
-

g_output_stream_write_all_async ()

-
void
-g_output_stream_write_all_async (GOutputStream *stream,
-                                 const void *buffer,
-                                 gsize count,
-                                 int io_priority,
-                                 GCancellable *cancellable,
-                                 GAsyncReadyCallback callback,
-                                 gpointer user_data);
-

Request an asynchronous write of count - bytes from buffer - into -the stream. When the operation is finished callback - will be called. -You can then call g_output_stream_write_all_finish() to get the result of the -operation.

-

This is the asynchronous version of g_output_stream_write_all().

-

Call g_output_stream_write_all_finish() to collect the result.

-

Any outstanding I/O request with higher priority (lower numerical -value) will be executed before an outstanding request with lower -priority. Default priority is G_PRIORITY_DEFAULT.

-

Note that no copy of buffer - will be made, so it must stay valid -until callback - is called.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

A GOutputStream

 

buffer

the buffer containing the data to write.

[array length=count][element-type guint8]

count

the number of bytes to write

 

io_priority

the io priority of the request

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

callback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-

Since: 2.44

-
-
-
-

g_output_stream_write_all_finish ()

-
gboolean
-g_output_stream_write_all_finish (GOutputStream *stream,
-                                  GAsyncResult *result,
-                                  gsize *bytes_written,
-                                  GError **error);
-

Finishes an asynchronous stream write operation started with -g_output_stream_write_all_async().

-

As a special exception to the normal conventions for functions that -use GError, if this function returns FALSE (and sets error -) then -bytes_written - will be set to the number of bytes that were -successfully written before the error was encountered. This -functionality is only available from C. If you need it from another -language then you must write your own loop around -g_output_stream_write_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GOutputStream

 

result

a GAsyncResult

 

bytes_written

location to store the number of bytes that was written to the stream.

[out]

error

a GError location to store the error occurring, or NULL to ignore.

 
-
-
-

Returns

-

TRUE on success, FALSE if there was an error

-
-

Since: 2.44

-
-
-
-

g_output_stream_splice ()

-
gssize
-g_output_stream_splice (GOutputStream *stream,
-                        GInputStream *source,
-                        GOutputStreamSpliceFlags flags,
-                        GCancellable *cancellable,
-                        GError **error);
-

Splices an input stream into an output stream.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GOutputStream.

 

source

a GInputStream.

 

flags

a set of GOutputStreamSpliceFlags.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

a gssize containing the size of the data spliced, or --1 if an error occurred. Note that if the number of bytes -spliced is greater than G_MAXSSIZE, then that will be -returned, and there is no way to determine the actual number -of bytes spliced.

-
-
-
-
-

g_output_stream_flush ()

-
gboolean
-g_output_stream_flush (GOutputStream *stream,
-                       GCancellable *cancellable,
-                       GError **error);
-

Forces a write of all user-space buffered data for the given -stream -. Will block during the operation. Closing the stream will -implicitly cause a flush.

-

This function is optional for inherited classes.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GOutputStream.

 

cancellable

optional cancellable object.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

TRUE on success, FALSE on error

-
-
-
-
-

g_output_stream_close ()

-
gboolean
-g_output_stream_close (GOutputStream *stream,
-                       GCancellable *cancellable,
-                       GError **error);
-

Closes the stream, releasing resources related to it.

-

Once the stream is closed, all other operations will return G_IO_ERROR_CLOSED. -Closing a stream multiple times will not return an error.

-

Closing a stream will automatically flush any outstanding buffers in the -stream.

-

Streams will be automatically closed when the last reference -is dropped, but you might want to call this function to make sure -resources are released as early as possible.

-

Some streams might keep the backing store of the stream (e.g. a file descriptor) -open after the stream is closed. See the documentation for the individual -stream for details.

-

On failure the first error that happened will be reported, but the close -operation will finish as much as possible. A stream that failed to -close will still return G_IO_ERROR_CLOSED for all operations. Still, it -is important to check and report the error to the user, otherwise -there might be a loss of data as all data might not be written.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned. -Cancelling a close will still leave the stream closed, but there some streams -can use a faster close that doesn't block to e.g. check errors. On -cancellation (as with any error) there is no guarantee that all written -data will reach the target.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

A GOutputStream.

 

cancellable

optional cancellable object.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

TRUE on success, FALSE on failure

-
-
-
-
-

g_output_stream_write_async ()

-
void
-g_output_stream_write_async (GOutputStream *stream,
-                             const void *buffer,
-                             gsize count,
-                             int io_priority,
-                             GCancellable *cancellable,
-                             GAsyncReadyCallback callback,
-                             gpointer user_data);
-

Request an asynchronous write of count - bytes from buffer - into -the stream. When the operation is finished callback - will be called. -You can then call g_output_stream_write_finish() to get the result of the -operation.

-

During an async request no other sync and async calls are allowed, -and will result in G_IO_ERROR_PENDING errors.

-

A value of count - larger than G_MAXSSIZE will cause a -G_IO_ERROR_INVALID_ARGUMENT error.

-

On success, the number of bytes written will be passed to the -callback -. It is not an error if this is not the same as the -requested size, as it can happen e.g. on a partial I/O error, -but generally we try to write as many bytes as requested.

-

You are guaranteed that this method will never fail with -G_IO_ERROR_WOULD_BLOCK - if stream - can't accept more data, the -method will just wait until this changes.

-

Any outstanding I/O request with higher priority (lower numerical -value) will be executed before an outstanding request with lower -priority. Default priority is G_PRIORITY_DEFAULT.

-

The asynchronous methods have a default fallback that uses threads -to implement asynchronicity, so they are optional for inheriting -classes. However, if you override one you must override all.

-

For the synchronous, blocking version of this function, see -g_output_stream_write().

-

Note that no copy of buffer - will be made, so it must stay valid -until callback - is called. See g_output_stream_write_bytes_async() -for a GBytes version that will automatically hold a reference to -the contents (without copying) for the duration of the call.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

A GOutputStream.

 

buffer

the buffer containing the data to write.

[array length=count][element-type guint8]

count

the number of bytes to write

 

io_priority

the io priority of the request.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

callback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_output_stream_write_finish ()

-
gssize
-g_output_stream_write_finish (GOutputStream *stream,
-                              GAsyncResult *result,
-                              GError **error);
-

Finishes a stream write operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GOutputStream.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

a gssize containing the number of bytes written to the stream.

-
-
-
-
-

g_output_stream_splice_async ()

-
void
-g_output_stream_splice_async (GOutputStream *stream,
-                              GInputStream *source,
-                              GOutputStreamSpliceFlags flags,
-                              int io_priority,
-                              GCancellable *cancellable,
-                              GAsyncReadyCallback callback,
-                              gpointer user_data);
-

Splices a stream asynchronously. -When the operation is finished callback - will be called. -You can then call g_output_stream_splice_finish() to get the -result of the operation.

-

For the synchronous, blocking version of this function, see -g_output_stream_splice().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GOutputStream.

 

source

a GInputStream.

 

flags

a set of GOutputStreamSpliceFlags.

 

io_priority

the io priority of the request.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

user data passed to callback -.

[closure]
-
-
-
-
-

g_output_stream_splice_finish ()

-
gssize
-g_output_stream_splice_finish (GOutputStream *stream,
-                               GAsyncResult *result,
-                               GError **error);
-

Finishes an asynchronous stream splice operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GOutputStream.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

a gssize of the number of bytes spliced. Note that if the -number of bytes spliced is greater than G_MAXSSIZE, then that -will be returned, and there is no way to determine the actual -number of bytes spliced.

-
-
-
-
-

g_output_stream_flush_async ()

-
void
-g_output_stream_flush_async (GOutputStream *stream,
-                             int io_priority,
-                             GCancellable *cancellable,
-                             GAsyncReadyCallback callback,
-                             gpointer user_data);
-

Forces an asynchronous write of all user-space buffered data for -the given stream -. -For behaviour details see g_output_stream_flush().

-

When the operation is finished callback - will be -called. You can then call g_output_stream_flush_finish() to get the -result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GOutputStream.

 

io_priority

the io priority of the request.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_output_stream_flush_finish ()

-
gboolean
-g_output_stream_flush_finish (GOutputStream *stream,
-                              GAsyncResult *result,
-                              GError **error);
-

Finishes flushing an output stream.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GOutputStream.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE if flush operation succeeded, FALSE otherwise.

-
-
-
-
-

g_output_stream_close_async ()

-
void
-g_output_stream_close_async (GOutputStream *stream,
-                             int io_priority,
-                             GCancellable *cancellable,
-                             GAsyncReadyCallback callback,
-                             gpointer user_data);
-

Requests an asynchronous close of the stream, releasing resources -related to it. When the operation is finished callback - will be -called. You can then call g_output_stream_close_finish() to get -the result of the operation.

-

For behaviour details see g_output_stream_close().

-

The asynchronous methods have a default fallback that uses threads -to implement asynchronicity, so they are optional for inheriting -classes. However, if you override one you must override all.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

A GOutputStream.

 

io_priority

the io priority of the request.

 

cancellable

optional cancellable object.

[nullable]

callback

callback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_output_stream_close_finish ()

-
gboolean
-g_output_stream_close_finish (GOutputStream *stream,
-                              GAsyncResult *result,
-                              GError **error);
-

Closes an output stream.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GOutputStream.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE if stream was successfully closed, FALSE otherwise.

-
-
-
-
-

g_output_stream_is_closing ()

-
gboolean
-g_output_stream_is_closing (GOutputStream *stream);
-

Checks if an output stream is being closed. This can be -used inside e.g. a flush implementation to see if the -flush (or other i/o operation) is called from within -the closing operation.

-
-

Parameters

-
----- - - - - - -

stream

a GOutputStream.

 
-
-
-

Returns

-

TRUE if stream -is being closed. FALSE otherwise.

-
-

Since: 2.24

-
-
-
-

g_output_stream_is_closed ()

-
gboolean
-g_output_stream_is_closed (GOutputStream *stream);
-

Checks if an output stream has already been closed.

-
-

Parameters

-
----- - - - - - -

stream

a GOutputStream.

 
-
-
-

Returns

-

TRUE if stream -is closed. FALSE otherwise.

-
-
-
-
-

g_output_stream_has_pending ()

-
gboolean
-g_output_stream_has_pending (GOutputStream *stream);
-

Checks if an output stream has pending actions.

-
-

Parameters

-
----- - - - - - -

stream

a GOutputStream.

 
-
-
-

Returns

-

TRUE if stream -has pending actions.

-
-
-
-
-

g_output_stream_set_pending ()

-
gboolean
-g_output_stream_set_pending (GOutputStream *stream,
-                             GError **error);
-

Sets stream - to have actions pending. If the pending flag is -already set or stream - is closed, it will return FALSE and set -error -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GOutputStream.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE if pending was previously unset and is now set.

-
-
-
-
-

g_output_stream_clear_pending ()

-
void
-g_output_stream_clear_pending (GOutputStream *stream);
-

Clears the pending flag on stream -.

-
-

Parameters

-
----- - - - - - -

stream

output stream

 
-
-
-
-
-

g_output_stream_write_bytes ()

-
gssize
-g_output_stream_write_bytes (GOutputStream *stream,
-                             GBytes *bytes,
-                             GCancellable *cancellable,
-                             GError **error);
-

A wrapper function for g_output_stream_write() which takes a -GBytes as input. This can be more convenient for use by language -bindings or in other cases where the refcounted nature of GBytes -is helpful over a bare pointer interface.

-

However, note that this function may still perform partial writes, -just like g_output_stream_write(). If that occurs, to continue -writing, you will need to create a new GBytes containing just the -remaining bytes, using g_bytes_new_from_bytes(). Passing the same -GBytes instance multiple times potentially can result in duplicated -data in the output stream.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

stream

a GOutputStream.

 

bytes

the GBytes to write

 

cancellable

optional cancellable object.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

Number of bytes written, or -1 on error

-
-
-
-
-

g_output_stream_write_bytes_async ()

-
void
-g_output_stream_write_bytes_async (GOutputStream *stream,
-                                   GBytes *bytes,
-                                   int io_priority,
-                                   GCancellable *cancellable,
-                                   GAsyncReadyCallback callback,
-                                   gpointer user_data);
-

This function is similar to g_output_stream_write_async(), but -takes a GBytes as input. Due to the refcounted nature of GBytes, -this allows the stream to avoid taking a copy of the data.

-

However, note that this function may still perform partial writes, -just like g_output_stream_write_async(). If that occurs, to continue -writing, you will need to create a new GBytes containing just the -remaining bytes, using g_bytes_new_from_bytes(). Passing the same -GBytes instance multiple times potentially can result in duplicated -data in the output stream.

-

For the synchronous, blocking version of this function, see -g_output_stream_write_bytes().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

A GOutputStream.

 

bytes

The bytes to write

 

io_priority

the io priority of the request.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

callback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_output_stream_write_bytes_finish ()

-
gssize
-g_output_stream_write_bytes_finish (GOutputStream *stream,
-                                    GAsyncResult *result,
-                                    GError **error);
-

Finishes a stream write-from-GBytes operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

stream

a GOutputStream.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

a gssize containing the number of bytes written to the stream.

-
-
-
-
-

g_output_stream_printf ()

-
gboolean
-g_output_stream_printf (GOutputStream *stream,
-                        gsize *bytes_written,
-                        GCancellable *cancellable,
-                        GError **error,
-                        const gchar *format,
-                        ...);
-

This is a utility function around g_output_stream_write_all(). It -uses g_strdup_vprintf() to turn format - and @... into a string that -is then written to stream -.

-

See the documentation of g_output_stream_write_all() about the -behavior of the actual write operation.

-

Note that partial writes cannot be properly checked with this -function due to the variable length of the written string, if you -need precise control over partial write failures, you need to -create you own printf()-like wrapper around g_output_stream_write() -or g_output_stream_write_all().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GOutputStream.

 

bytes_written

location to store the number of bytes that was -written to the stream.

[out]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

location to store the error occurring, or NULL to ignore

 

format

the format string. See the printf() documentation

 

...

the parameters to insert into the format string

 
-
-
-

Returns

-

TRUE on success, FALSE if there was an error

-
-

Since: 2.40

-
-
-
-

g_output_stream_vprintf ()

-
gboolean
-g_output_stream_vprintf (GOutputStream *stream,
-                         gsize *bytes_written,
-                         GCancellable *cancellable,
-                         GError **error,
-                         const gchar *format,
-                         va_list args);
-

This is a utility function around g_output_stream_write_all(). It -uses g_strdup_vprintf() to turn format - and args - into a string that -is then written to stream -.

-

See the documentation of g_output_stream_write_all() about the -behavior of the actual write operation.

-

Note that partial writes cannot be properly checked with this -function due to the variable length of the written string, if you -need precise control over partial write failures, you need to -create you own printf()-like wrapper around g_output_stream_write() -or g_output_stream_write_all().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GOutputStream.

 

bytes_written

location to store the number of bytes that was -written to the stream.

[out]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

location to store the error occurring, or NULL to ignore

 

format

the format string. See the printf() documentation

 

args

the parameters to insert into the format string

 
-
-
-

Returns

-

TRUE on success, FALSE if there was an error

-
-

Since: 2.40

-
-
-
-

Types and Values

-
-

enum GOutputStreamSpliceFlags

-

GOutputStreamSpliceFlags determine how streams should be spliced.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_OUTPUT_STREAM_SPLICE_NONE

-

Do not close either stream.

-
 

G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE

-

Close the source stream after - the splice.

-
 

G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET

-

Close the target stream after - the splice.

-
 
-
-
-
-
-

GOutputStream

-
typedef struct _GOutputStream GOutputStream;
-

Base class for writing output.

-

All classes derived from GOutputStream should implement synchronous -writing, splicing, flushing and closing streams, but may implement -asynchronous versions.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GPermission.html b/docs/reference/gio/html/GPermission.html deleted file mode 100644 index 07e9b04c9..000000000 --- a/docs/reference/gio/html/GPermission.html +++ /dev/null @@ -1,664 +0,0 @@ - - - - -GPermission: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GPermission

-

GPermission — An object representing the permission - to perform a certain action

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -g_permission_get_allowed () -
-gboolean - -g_permission_get_can_acquire () -
-gboolean - -g_permission_get_can_release () -
-gboolean - -g_permission_acquire () -
-void - -g_permission_acquire_async () -
-gboolean - -g_permission_acquire_finish () -
-gboolean - -g_permission_release () -
-void - -g_permission_release_async () -
-gboolean - -g_permission_release_finish () -
-void - -g_permission_impl_update () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - -
gbooleanallowedRead
gbooleancan-acquireRead
gbooleancan-releaseRead
-
-
-

Types and Values

-
---- - - - - -
 GPermission
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GPermission
-        ╰── GSimplePermission
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A GPermission represents the status of the caller's permission to -perform a certain action.

-

You can query if the action is currently allowed and if it is -possible to acquire the permission so that the action will be allowed -in the future.

-

There is also an API to actually acquire the permission and one to -release it.

-

As an example, a GPermission might represent the ability for the -user to write to a GSettings object. This GPermission object could -then be used to decide if it is appropriate to show a "Click here to -unlock" button in a dialog and to provide the mechanism to invoke -when that button is clicked.

-
-
-

Functions

-
-

g_permission_get_allowed ()

-
gboolean
-g_permission_get_allowed (GPermission *permission);
-

Gets the value of the 'allowed' property. This property is TRUE if -the caller currently has permission to perform the action that -permission - represents the permission to perform.

-
-

Parameters

-
----- - - - - - -

permission

a GPermission instance

 
-
-
-

Returns

-

the value of the 'allowed' property

-
-

Since: 2.26

-
-
-
-

g_permission_get_can_acquire ()

-
gboolean
-g_permission_get_can_acquire (GPermission *permission);
-

Gets the value of the 'can-acquire' property. This property is TRUE -if it is generally possible to acquire the permission by calling -g_permission_acquire().

-
-

Parameters

-
----- - - - - - -

permission

a GPermission instance

 
-
-
-

Returns

-

the value of the 'can-acquire' property

-
-

Since: 2.26

-
-
-
-

g_permission_get_can_release ()

-
gboolean
-g_permission_get_can_release (GPermission *permission);
-

Gets the value of the 'can-release' property. This property is TRUE -if it is generally possible to release the permission by calling -g_permission_release().

-
-

Parameters

-
----- - - - - - -

permission

a GPermission instance

 
-
-
-

Returns

-

the value of the 'can-release' property

-
-

Since: 2.26

-
-
-
-

g_permission_acquire ()

-
gboolean
-g_permission_acquire (GPermission *permission,
-                      GCancellable *cancellable,
-                      GError **error);
-

Attempts to acquire the permission represented by permission -.

-

The precise method by which this happens depends on the permission -and the underlying authentication mechanism. A simple example is -that a dialog may appear asking the user to enter their password.

-

You should check with g_permission_get_can_acquire() before calling -this function.

-

If the permission is acquired then TRUE is returned. Otherwise, -FALSE is returned and error - is set appropriately.

-

This call is blocking, likely for a very long time (in the case that -user interaction is required). See g_permission_acquire_async() for -the non-blocking version.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

permission

a GPermission instance

 

cancellable

a GCancellable, or NULL.

[nullable]

error

a pointer to a NULL GError, or NULL

 
-
-
-

Returns

-

TRUE if the permission was successfully acquired

-
-

Since: 2.26

-
-
-
-

g_permission_acquire_async ()

-
void
-g_permission_acquire_async (GPermission *permission,
-                            GCancellable *cancellable,
-                            GAsyncReadyCallback callback,
-                            gpointer user_data);
-

Attempts to acquire the permission represented by permission -.

-

This is the first half of the asynchronous version of -g_permission_acquire().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

permission

a GPermission instance

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

the GAsyncReadyCallback to call when done

 

user_data

the user data to pass to callback -

 
-
-

Since: 2.26

-
-
-
-

g_permission_acquire_finish ()

-
gboolean
-g_permission_acquire_finish (GPermission *permission,
-                             GAsyncResult *result,
-                             GError **error);
-

Collects the result of attempting to acquire the permission -represented by permission -.

-

This is the second half of the asynchronous version of -g_permission_acquire().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

permission

a GPermission instance

 

result

the GAsyncResult given to the GAsyncReadyCallback

 

error

a pointer to a NULL GError, or NULL

 
-
-
-

Returns

-

TRUE if the permission was successfully acquired

-
-

Since: 2.26

-
-
-
-

g_permission_release ()

-
gboolean
-g_permission_release (GPermission *permission,
-                      GCancellable *cancellable,
-                      GError **error);
-

Attempts to release the permission represented by permission -.

-

The precise method by which this happens depends on the permission -and the underlying authentication mechanism. In most cases the -permission will be dropped immediately without further action.

-

You should check with g_permission_get_can_release() before calling -this function.

-

If the permission is released then TRUE is returned. Otherwise, -FALSE is returned and error - is set appropriately.

-

This call is blocking, likely for a very long time (in the case that -user interaction is required). See g_permission_release_async() for -the non-blocking version.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

permission

a GPermission instance

 

cancellable

a GCancellable, or NULL.

[nullable]

error

a pointer to a NULL GError, or NULL

 
-
-
-

Returns

-

TRUE if the permission was successfully released

-
-

Since: 2.26

-
-
-
-

g_permission_release_async ()

-
void
-g_permission_release_async (GPermission *permission,
-                            GCancellable *cancellable,
-                            GAsyncReadyCallback callback,
-                            gpointer user_data);
-

Attempts to release the permission represented by permission -.

-

This is the first half of the asynchronous version of -g_permission_release().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

permission

a GPermission instance

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

the GAsyncReadyCallback to call when done

 

user_data

the user data to pass to callback -

 
-
-

Since: 2.26

-
-
-
-

g_permission_release_finish ()

-
gboolean
-g_permission_release_finish (GPermission *permission,
-                             GAsyncResult *result,
-                             GError **error);
-

Collects the result of attempting to release the permission -represented by permission -.

-

This is the second half of the asynchronous version of -g_permission_release().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

permission

a GPermission instance

 

result

the GAsyncResult given to the GAsyncReadyCallback

 

error

a pointer to a NULL GError, or NULL

 
-
-
-

Returns

-

TRUE if the permission was successfully released

-
-

Since: 2.26

-
-
-
-

g_permission_impl_update ()

-
void
-g_permission_impl_update (GPermission *permission,
-                          gboolean allowed,
-                          gboolean can_acquire,
-                          gboolean can_release);
-

This function is called by the GPermission implementation to update -the properties of the permission. You should never call this -function except from a GPermission implementation.

-

GObject notify signals are generated, as appropriate.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

permission

a GPermission instance

 

allowed

the new value for the 'allowed' property

 

can_acquire

the new value for the 'can-acquire' property

 

can_release

the new value for the 'can-release' property

 
-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GPermission

-
typedef struct _GPermission GPermission;
-

GPermission is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

Property Details

-
-

The “allowed” property

-
  “allowed”                  gboolean
-

TRUE if the caller currently has permission to perform the action that -permission - represents the permission to perform.

-

Flags: Read

-

Default value: FALSE

-
-
-
-

The “can-acquire” property

-
  “can-acquire”              gboolean
-

TRUE if it is generally possible to acquire the permission by calling -g_permission_acquire().

-

Flags: Read

-

Default value: FALSE

-
-
-
-

The “can-release” property

-
  “can-release”              gboolean
-

TRUE if it is generally possible to release the permission by calling -g_permission_release().

-

Flags: Read

-

Default value: FALSE

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GPollableInputStream.html b/docs/reference/gio/html/GPollableInputStream.html deleted file mode 100644 index e74fade6f..000000000 --- a/docs/reference/gio/html/GPollableInputStream.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - -GPollableInputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GPollableInputStream

-

GPollableInputStream — Interface for pollable input streams

-
- -
-

Types and Values

-
---- - - - - - - - - - - -
 GPollableInputStream
structGPollableInputStreamInterface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GPollableInputStream
-
-
-
-

Prerequisites

-

-GPollableInputStream requires - GInputStream.

-
-
-

Known Implementations

-

-GPollableInputStream is implemented by - GConverterInputStream, GMemoryInputStream and GUnixInputStream.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GPollableInputStream is implemented by GInputStreams that -can be polled for readiness to read. This can be used when -interfacing with a non-GIO API that expects -UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.

-
-
-

Functions

-
-

g_pollable_input_stream_can_poll ()

-
gboolean
-g_pollable_input_stream_can_poll (GPollableInputStream *stream);
-

Checks if stream - is actually pollable. Some classes may implement -GPollableInputStream but have only certain instances of that class -be pollable. If this method returns FALSE, then the behavior of -other GPollableInputStream methods is undefined.

-

For any given stream, the value returned by this method is constant; -a stream cannot switch from pollable to non-pollable or vice versa.

-
-

Parameters

-
----- - - - - - -

stream

a GPollableInputStream.

 
-
-
-

Returns

-

TRUE if stream -is pollable, FALSE if not.

-
-

Since: 2.28

-
-
-
-

g_pollable_input_stream_is_readable ()

-
gboolean
-g_pollable_input_stream_is_readable (GPollableInputStream *stream);
-

Checks if stream - can be read.

-

Note that some stream types may not be able to implement this 100% -reliably, and it is possible that a call to g_input_stream_read() -after this returns TRUE would still block. To guarantee -non-blocking behavior, you should always use -g_pollable_input_stream_read_nonblocking(), which will return a -G_IO_ERROR_WOULD_BLOCK error rather than blocking.

-
-

Parameters

-
----- - - - - - -

stream

a GPollableInputStream.

 
-
-
-

Returns

-

TRUE if stream -is readable, FALSE if not. If an error -has occurred on stream -, this will result in -g_pollable_input_stream_is_readable() returning TRUE, and the -next attempt to read will return the error.

-
-

Since: 2.28

-
-
-
-

g_pollable_input_stream_create_source ()

-
GSource *
-g_pollable_input_stream_create_source (GPollableInputStream *stream,
-                                       GCancellable *cancellable);
-

Creates a GSource that triggers when stream - can be read, or -cancellable - is triggered or an error occurs. The callback on the -source is of the GPollableSourceFunc type.

-

As with g_pollable_input_stream_is_readable(), it is possible that -the stream may not actually be readable even after the source -triggers, so you should use g_pollable_input_stream_read_nonblocking() -rather than g_input_stream_read() from the callback.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GPollableInputStream.

 

cancellable

a GCancellable, or NULL.

[nullable]
-
-
-

Returns

-

a new GSource.

-

[transfer full]

-
-

Since: 2.28

-
-
-
-

g_pollable_input_stream_read_nonblocking ()

-
gssize
-g_pollable_input_stream_read_nonblocking
-                               (GPollableInputStream *stream,
-                                void *buffer,
-                                gsize count,
-                                GCancellable *cancellable,
-                                GError **error);
-

Attempts to read up to count - bytes from stream - into buffer -, as -with g_input_stream_read(). If stream - is not currently readable, -this will immediately return G_IO_ERROR_WOULD_BLOCK, and you can -use g_pollable_input_stream_create_source() to create a GSource -that will be triggered when stream - is readable.

-

Note that since this method never blocks, you cannot actually -use cancellable - to cancel it. However, it will return an error -if cancellable - has already been cancelled when you call, which -may happen if you call this method after a source triggers due -to having been cancelled.

-

Virtual: read_nonblocking

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GPollableInputStream

 

buffer

a buffer to -read data into (which should be at least count -bytes long).

[array length=count][element-type guint8]

count

the number of bytes you want to read

 

cancellable

a GCancellable, or NULL.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

the number of bytes read, or -1 on error (including -G_IO_ERROR_WOULD_BLOCK).

-
-
-
-
-

Types and Values

-
-

GPollableInputStream

-
typedef struct _GPollableInputStream GPollableInputStream;
-

An interface for a GInputStream that can be polled for readability.

-

Since: 2.28

-
-
-
-

struct GPollableInputStreamInterface

-
struct GPollableInputStreamInterface {
-  GTypeInterface g_iface;
-
-  /* Virtual Table */
-  gboolean     (*can_poll)         (GPollableInputStream  *stream);
-
-  gboolean     (*is_readable)      (GPollableInputStream  *stream);
-  GSource *    (*create_source)    (GPollableInputStream  *stream,
-				    GCancellable          *cancellable);
-  gssize       (*read_nonblocking) (GPollableInputStream  *stream,
-				    void                  *buffer,
-				    gsize                  count,
-				    GError               **error);
-};
-
-

The interface for pollable input streams.

-

The default implementation of can_poll - always returns TRUE.

-

The default implementation of read_nonblocking - calls -g_pollable_input_stream_is_readable(), and then calls -g_input_stream_read() if it returns TRUE. This means you only need -to override it if it is possible that your is_readable - -implementation may return TRUE when the stream is not actually -readable.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

can_poll ()

Checks if the GPollableInputStream instance is actually pollable

 

is_readable ()

Checks if the stream is readable

 

create_source ()

Creates a GSource to poll the stream

 

read_nonblocking ()

Does a non-blocking read or returns -G_IO_ERROR_WOULD_BLOCK

 
-
-

Since: 2.28

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GPollableOutputStream.html b/docs/reference/gio/html/GPollableOutputStream.html deleted file mode 100644 index 6c9a28a24..000000000 --- a/docs/reference/gio/html/GPollableOutputStream.html +++ /dev/null @@ -1,402 +0,0 @@ - - - - -GPollableOutputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GPollableOutputStream

-

GPollableOutputStream — Interface for pollable output streams

-
- -
-

Types and Values

-
---- - - - - - - - - - - -
 GPollableOutputStream
structGPollableOutputStreamInterface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GPollableOutputStream
-
-
-
-

Prerequisites

-

-GPollableOutputStream requires - GOutputStream.

-
-
-

Known Implementations

-

-GPollableOutputStream is implemented by - GConverterOutputStream, GMemoryOutputStream and GUnixOutputStream.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GPollableOutputStream is implemented by GOutputStreams that -can be polled for readiness to write. This can be used when -interfacing with a non-GIO API that expects -UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.

-
-
-

Functions

-
-

g_pollable_output_stream_can_poll ()

-
gboolean
-g_pollable_output_stream_can_poll (GPollableOutputStream *stream);
-

Checks if stream - is actually pollable. Some classes may implement -GPollableOutputStream but have only certain instances of that -class be pollable. If this method returns FALSE, then the behavior -of other GPollableOutputStream methods is undefined.

-

For any given stream, the value returned by this method is constant; -a stream cannot switch from pollable to non-pollable or vice versa.

-
-

Parameters

-
----- - - - - - -

stream

a GPollableOutputStream.

 
-
-
-

Returns

-

TRUE if stream -is pollable, FALSE if not.

-
-

Since: 2.28

-
-
-
-

g_pollable_output_stream_is_writable ()

-
gboolean
-g_pollable_output_stream_is_writable (GPollableOutputStream *stream);
-

Checks if stream - can be written.

-

Note that some stream types may not be able to implement this 100% -reliably, and it is possible that a call to g_output_stream_write() -after this returns TRUE would still block. To guarantee -non-blocking behavior, you should always use -g_pollable_output_stream_write_nonblocking(), which will return a -G_IO_ERROR_WOULD_BLOCK error rather than blocking.

-
-

Parameters

-
----- - - - - - -

stream

a GPollableOutputStream.

 
-
-
-

Returns

-

TRUE if stream -is writable, FALSE if not. If an error -has occurred on stream -, this will result in -g_pollable_output_stream_is_writable() returning TRUE, and the -next attempt to write will return the error.

-
-

Since: 2.28

-
-
-
-

g_pollable_output_stream_create_source ()

-
GSource *
-g_pollable_output_stream_create_source
-                               (GPollableOutputStream *stream,
-                                GCancellable *cancellable);
-

Creates a GSource that triggers when stream - can be written, or -cancellable - is triggered or an error occurs. The callback on the -source is of the GPollableSourceFunc type.

-

As with g_pollable_output_stream_is_writable(), it is possible that -the stream may not actually be writable even after the source -triggers, so you should use g_pollable_output_stream_write_nonblocking() -rather than g_output_stream_write() from the callback.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GPollableOutputStream.

 

cancellable

a GCancellable, or NULL.

[nullable]
-
-
-

Returns

-

a new GSource.

-

[transfer full]

-
-

Since: 2.28

-
-
-
-

g_pollable_output_stream_write_nonblocking ()

-
gssize
-g_pollable_output_stream_write_nonblocking
-                               (GPollableOutputStream *stream,
-                                const void *buffer,
-                                gsize count,
-                                GCancellable *cancellable,
-                                GError **error);
-

Attempts to write up to count - bytes from buffer - to stream -, as -with g_output_stream_write(). If stream - is not currently writable, -this will immediately return G_IO_ERROR_WOULD_BLOCK, and you can -use g_pollable_output_stream_create_source() to create a GSource -that will be triggered when stream - is writable.

-

Note that since this method never blocks, you cannot actually -use cancellable - to cancel it. However, it will return an error -if cancellable - has already been cancelled when you call, which -may happen if you call this method after a source triggers due -to having been cancelled.

-

Virtual: write_nonblocking

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GPollableOutputStream

 

buffer

a buffer to write -data from.

[array length=count][element-type guint8]

count

the number of bytes you want to write

 

cancellable

a GCancellable, or NULL.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

the number of bytes written, or -1 on error (including -G_IO_ERROR_WOULD_BLOCK).

-
-
-
-
-

Types and Values

-
-

GPollableOutputStream

-
typedef struct _GPollableOutputStream GPollableOutputStream;
-

An interface for a GOutputStream that can be polled for readability.

-

Since: 2.28

-
-
-
-

struct GPollableOutputStreamInterface

-
struct GPollableOutputStreamInterface {
-  GTypeInterface g_iface;
-
-  /* Virtual Table */
-  gboolean     (*can_poll)          (GPollableOutputStream  *stream);
-
-  gboolean     (*is_writable)       (GPollableOutputStream  *stream);
-  GSource *    (*create_source)     (GPollableOutputStream  *stream,
-				     GCancellable           *cancellable);
-  gssize       (*write_nonblocking) (GPollableOutputStream  *stream,
-				     const void             *buffer,
-				     gsize                   count,
-				     GError                **error);
-};
-
-

The interface for pollable output streams.

-

The default implementation of can_poll - always returns TRUE.

-

The default implementation of write_nonblocking - calls -g_pollable_output_stream_is_writable(), and then calls -g_output_stream_write() if it returns TRUE. This means you only -need to override it if it is possible that your is_writable - -implementation may return TRUE when the stream is not actually -writable.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

can_poll ()

Checks if the GPollableOutputStream instance is actually pollable

 

is_writable ()

Checks if the stream is writable

 

create_source ()

Creates a GSource to poll the stream

 

write_nonblocking ()

Does a non-blocking write or returns -G_IO_ERROR_WOULD_BLOCK

 
-
-

Since: 2.28

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GPropertyAction.html b/docs/reference/gio/html/GPropertyAction.html deleted file mode 100644 index dd8e7e3f4..000000000 --- a/docs/reference/gio/html/GPropertyAction.html +++ /dev/null @@ -1,331 +0,0 @@ - - - - -GPropertyAction: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GPropertyAction

-

GPropertyAction — A GAction reflecting a GObject property

-
-
-

Functions

-
---- - - - - -
-GPropertyAction * - -g_property_action_new () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
gbooleanenabledRead
gbooleaninvert-booleanRead / Write / Construct Only
-gchar *nameRead / Write / Construct Only
-GObject *objectWrite / Construct Only
-GVariantType *parameter-typeRead
-gchar *property-nameWrite / Construct Only
-GVariant *stateRead
-GVariantType *state-typeRead
-
-
-

Types and Values

-
---- - - - - -
 GPropertyAction
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GPropertyAction
-
-
-
-

Implemented Interfaces

-

-GPropertyAction implements - GAction.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A GPropertyAction is a way to get a GAction with a state value -reflecting and controlling the value of a GObject property.

-

The state of the action will correspond to the value of the property. -Changing it will change the property (assuming the requested value -matches the requirements as specified in the GParamSpec).

-

Only the most common types are presently supported. Booleans are -mapped to booleans, strings to strings, signed/unsigned integers to -int32/uint32 and floats and doubles to doubles.

-

If the property is an enum then the state will be string-typed and -conversion will automatically be performed between the enum value and -"nick" string as per the GEnumValue table.

-

Flags types are not currently supported.

-

Properties of object types, boxed types and pointer types are not -supported and probably never will be.

-

Properties of GVariant types are not currently supported.

-

If the property is boolean-valued then the action will have a NULL -parameter type, and activating the action (with no parameter) will -toggle the value of the property.

-

In all other cases, the parameter type will correspond to the type of -the property.

-

The general idea here is to reduce the number of locations where a -particular piece of state is kept (and therefore has to be synchronised -between). GPropertyAction does not have a separate state that is kept -in sync with the property value -- its state is the property value.

-

For example, it might be useful to create a GAction corresponding to -the "visible-child-name" property of a GtkStack so that the current -page can be switched from a menu. The active radio indication in the -menu is then directly determined from the active page of the -GtkStack.

-

An anti-example would be binding the "active-id" property on a -GtkComboBox. This is because the state of the combobox itself is -probably uninteresting and is actually being used to control -something else.

-

Another anti-example would be to bind to the "visible-child-name" -property of a GtkStack if this value is actually stored in -GSettings. In that case, the real source of the value is -GSettings. If you want a GAction to control a setting stored in -GSettings, see g_settings_create_action() instead, and possibly -combine its use with g_settings_bind().

-
-
-

Functions

-
-

g_property_action_new ()

-
GPropertyAction *
-g_property_action_new (const gchar *name,
-                       gpointer object,
-                       const gchar *property_name);
-

Creates a GAction corresponding to the value of property -property_name - on object -.

-

The property must be existent and readable and writable (and not -construct-only).

-

This function takes a reference on object - and doesn't release it -until the action is destroyed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

name

the name of the action to create

 

object

the object that has the property -to wrap.

[type GObject.Object]

property_name

the name of the property

 
-
-
-

Returns

-

a new GPropertyAction

-
-

Since: 2.38

-
-
-
-

Types and Values

-
-

GPropertyAction

-
typedef struct _GPropertyAction GPropertyAction;
-

This type is opaque.

-

Since: 2.38

-
-
-
-

Property Details

-
-

The “enabled” property

-
  “enabled”                  gboolean
-

If action - is currently enabled.

-

If the action is disabled then calls to g_action_activate() and -g_action_change_state() have no effect.

-

Flags: Read

-

Default value: TRUE

-

Since: 2.38

-
-
-
-

The “invert-boolean” property

-
  “invert-boolean”           gboolean
-

If TRUE, the state of the action will be the negation of the -property value, provided the property is boolean.

-

Flags: Read / Write / Construct Only

-

Default value: FALSE

-

Since: 2.46

-
-
-
-

The “name” property

-
  “name”                     gchar *
-

The name of the action. This is mostly meaningful for identifying -the action once it has been added to a GActionMap.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.38

-
-
-
-

The “object” property

-
  “object”                   GObject *
-

The object to wrap a property on.

-

The object must be a non-NULL GObject with properties.

-

Flags: Write / Construct Only

-

Since: 2.38

-
-
-
-

The “parameter-type” property

-
  “parameter-type”           GVariantType *
-

The type of the parameter that must be given when activating the -action.

-

Flags: Read

-

Since: 2.38

-
-
-
-

The “property-name” property

-
  “property-name”            gchar *
-

The name of the property to wrap on the object.

-

The property must exist on the passed-in object and it must be -readable and writable (and not construct-only).

-

Flags: Write / Construct Only

-

Default value: NULL

-

Since: 2.38

-
-
-
-

The “state” property

-
  “state”                    GVariant *
-

The state of the action, or NULL if the action is stateless.

-

Flags: Read

-

Allowed values: GVariant<*>

-

Default value: NULL

-

Since: 2.38

-
-
-
-

The “state-type” property

-
  “state-type”               GVariantType *
-

The GVariantType of the state that the action has, or NULL if the -action is stateless.

-

Flags: Read

-

Since: 2.38

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GProxy.html b/docs/reference/gio/html/GProxy.html deleted file mode 100644 index 1583e0aec..000000000 --- a/docs/reference/gio/html/GProxy.html +++ /dev/null @@ -1,448 +0,0 @@ - - - - -GProxy: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GProxy

-

GProxy — Interface for proxy handling

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - -
-GIOStream * - -g_proxy_connect () -
-void - -g_proxy_connect_async () -
-GIOStream * - -g_proxy_connect_finish () -
-GProxy * - -g_proxy_get_default_for_protocol () -
-gboolean - -g_proxy_supports_hostname () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
 GProxy
structGProxyInterface
#defineG_PROXY_EXTENSION_POINT_NAME
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GProxy
-
-
-
-

Prerequisites

-

-GProxy requires - GObject.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A GProxy handles connecting to a remote host via a given type of -proxy server. It is implemented by the 'gio-proxy' extension point. -The extensions are named after their proxy protocol name. As an -example, a SOCKS5 proxy implementation can be retrieved with the -name 'socks5' using the function -g_io_extension_point_get_extension_by_name().

-
-
-

Functions

-
-

g_proxy_connect ()

-
GIOStream *
-g_proxy_connect (GProxy *proxy,
-                 GIOStream *connection,
-                 GProxyAddress *proxy_address,
-                 GCancellable *cancellable,
-                 GError **error);
-

Given connection - to communicate with a proxy (eg, a -GSocketConnection that is connected to the proxy server), this -does the necessary handshake to connect to proxy_address -, and if -required, wraps the GIOStream to handle proxy payload.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

proxy

a GProxy

 

connection

a GIOStream

 

proxy_address

a GProxyAddress

 

cancellable

a GCancellable.

[nullable]

error

return GError

 
-
-
-

Returns

-

a GIOStream that will replace connection -. This might -be the same as connection -, in which case a reference -will be added.

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_proxy_connect_async ()

-
void
-g_proxy_connect_async (GProxy *proxy,
-                       GIOStream *connection,
-                       GProxyAddress *proxy_address,
-                       GCancellable *cancellable,
-                       GAsyncReadyCallback callback,
-                       gpointer user_data);
-

Asynchronous version of g_proxy_connect().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

proxy

a GProxy

 

connection

a GIOStream

 

proxy_address

a GProxyAddress

 

cancellable

a GCancellable.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

callback data.

[closure]
-
-

Since: 2.26

-
-
-
-

g_proxy_connect_finish ()

-
GIOStream *
-g_proxy_connect_finish (GProxy *proxy,
-                        GAsyncResult *result,
-                        GError **error);
-

See g_proxy_connect().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

proxy

a GProxy

 

result

a GAsyncResult

 

error

return GError

 
-
-
-

Returns

-

a GIOStream.

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_proxy_get_default_for_protocol ()

-
GProxy *
-g_proxy_get_default_for_protocol (const gchar *protocol);
-

Lookup "gio-proxy" extension point for a proxy implementation that supports -specified protocol.

-
-

Parameters

-
----- - - - - - -

protocol

the proxy protocol name (e.g. http, socks, etc)

 
-
-
-

Returns

-

return a GProxy or NULL if protocol -is not supported.

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_proxy_supports_hostname ()

-
gboolean
-g_proxy_supports_hostname (GProxy *proxy);
-

Some proxy protocols expect to be passed a hostname, which they -will resolve to an IP address themselves. Others, like SOCKS4, do -not allow this. This function will return FALSE if proxy - is -implementing such a protocol. When FALSE is returned, the caller -should resolve the destination hostname first, and then pass a -GProxyAddress containing the stringified IP address to -g_proxy_connect() or g_proxy_connect_async().

-
-

Parameters

-
----- - - - - - -

proxy

a GProxy

 
-
-
-

Returns

-

TRUE if hostname resolution is supported.

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GProxy

-
typedef struct _GProxy GProxy;
-

Interface that handles proxy connection and payload.

-

Since: 2.26

-
-
-
-

struct GProxyInterface

-
struct GProxyInterface {
-  GTypeInterface g_iface;
-
-  /* Virtual Table */
-
-  GIOStream * (* connect)           (GProxy               *proxy,
-				     GIOStream            *connection,
-				     GProxyAddress        *proxy_address,
-				     GCancellable         *cancellable,
-				     GError              **error);
-
-  void        (* connect_async)     (GProxy               *proxy,
-				     GIOStream            *connection,
-				     GProxyAddress	  *proxy_address,
-				     GCancellable         *cancellable,
-				     GAsyncReadyCallback   callback,
-				     gpointer              user_data);
-
-  GIOStream * (* connect_finish)    (GProxy               *proxy,
-				     GAsyncResult         *result,
-				     GError              **error);
-
-  gboolean    (* supports_hostname) (GProxy             *proxy);
-};
-
-

Provides an interface for handling proxy connection and payload.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

connect ()

Connect to proxy server and wrap (if required) the connection -to handle payload.

 

connect_async ()

Same as connect() but asynchronous.

 

connect_finish ()

Returns the result of connect_async()

 

supports_hostname ()

Returns whether the proxy supports hostname lookups.

 
-
-

Since: 2.26

-
-
-
-

G_PROXY_EXTENSION_POINT_NAME

-
#define G_PROXY_EXTENSION_POINT_NAME "gio-proxy"
-
-

Extension point for proxy functionality. -See Extending GIO.

-

Since: 2.26

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GProxyAddress.html b/docs/reference/gio/html/GProxyAddress.html deleted file mode 100644 index aff3f4e90..000000000 --- a/docs/reference/gio/html/GProxyAddress.html +++ /dev/null @@ -1,573 +0,0 @@ - - - - -GProxyAddress: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GProxyAddress

-

GProxyAddress — An internet address with proxy information

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const gchar * - -g_proxy_address_get_destination_protocol () -
const gchar * - -g_proxy_address_get_destination_hostname () -
-guint16 - -g_proxy_address_get_destination_port () -
const gchar * - -g_proxy_address_get_password () -
const gchar * - -g_proxy_address_get_protocol () -
const gchar * - -g_proxy_address_get_username () -
const gchar * - -g_proxy_address_get_uri () -
-GSocketAddress * - -g_proxy_address_new () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gchar *destination-hostnameRead / Write / Construct Only
guintdestination-portRead / Write / Construct Only
-gchar *destination-protocolRead / Write / Construct Only
-gchar *passwordRead / Write / Construct Only
-gchar *protocolRead / Write / Construct Only
-gchar *uriRead / Write / Construct Only
-gchar *usernameRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GProxyAddress
structGProxyAddressClass
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSocketAddress
-        ╰── GInetSocketAddress
-            ╰── GProxyAddress
-
-
-
-

Implemented Interfaces

-

-GProxyAddress implements - GSocketConnectable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Support for proxied GInetSocketAddress.

-
-
-

Functions

-
-

g_proxy_address_get_destination_protocol ()

-
const gchar *
-g_proxy_address_get_destination_protocol
-                               (GProxyAddress *proxy);
-

Gets the protocol that is being spoken to the destination -server; eg, "http" or "ftp".

-
-

Parameters

-
----- - - - - - -

proxy

a GProxyAddress

 
-
-
-

Returns

-

the proxy -'s destination protocol

-
-

Since: 2.34

-
-
-
-

g_proxy_address_get_destination_hostname ()

-
const gchar *
-g_proxy_address_get_destination_hostname
-                               (GProxyAddress *proxy);
-

Gets proxy -'s destination hostname; that is, the name of the host -that will be connected to via the proxy, not the name of the proxy -itself.

-
-

Parameters

-
----- - - - - - -

proxy

a GProxyAddress

 
-
-
-

Returns

-

the proxy -'s destination hostname

-
-

Since: 2.26

-
-
-
-

g_proxy_address_get_destination_port ()

-
guint16
-g_proxy_address_get_destination_port (GProxyAddress *proxy);
-

Gets proxy -'s destination port; that is, the port on the -destination host that will be connected to via the proxy, not the -port number of the proxy itself.

-
-

Parameters

-
----- - - - - - -

proxy

a GProxyAddress

 
-
-
-

Returns

-

the proxy -'s destination port

-
-

Since: 2.26

-
-
-
-

g_proxy_address_get_password ()

-
const gchar *
-g_proxy_address_get_password (GProxyAddress *proxy);
-

Gets proxy -'s password.

-
-

Parameters

-
----- - - - - - -

proxy

a GProxyAddress

 
-
-
-

Returns

-

the proxy -'s password

-
-

Since: 2.26

-
-
-
-

g_proxy_address_get_protocol ()

-
const gchar *
-g_proxy_address_get_protocol (GProxyAddress *proxy);
-

Gets proxy -'s protocol. eg, "socks" or "http"

-
-

Parameters

-
----- - - - - - -

proxy

a GProxyAddress

 
-
-
-

Returns

-

the proxy -'s protocol

-
-

Since: 2.26

-
-
-
-

g_proxy_address_get_username ()

-
const gchar *
-g_proxy_address_get_username (GProxyAddress *proxy);
-

Gets proxy -'s username.

-
-

Parameters

-
----- - - - - - -

proxy

a GProxyAddress

 
-
-
-

Returns

-

the proxy -'s username

-
-

Since: 2.26

-
-
-
-

g_proxy_address_get_uri ()

-
const gchar *
-g_proxy_address_get_uri (GProxyAddress *proxy);
-

Gets the proxy URI that proxy - was constructed from.

-
-

Parameters

-
----- - - - - - -

proxy

a GProxyAddress

 
-
-
-

Returns

-

the proxy -'s URI, or NULL if unknown

-
-

Since: 2.34

-
-
-
-

g_proxy_address_new ()

-
GSocketAddress *
-g_proxy_address_new (GInetAddress *inetaddr,
-                     guint16 port,
-                     const gchar *protocol,
-                     const gchar *dest_hostname,
-                     guint16 dest_port,
-                     const gchar *username,
-                     const gchar *password);
-

Creates a new GProxyAddress for inetaddr - with protocol - that should -tunnel through dest_hostname - and dest_port -.

-

(Note that this method doesn't set the “uri” or -“destination-protocol” fields; use g_object_new() -directly if you want to set those.)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

inetaddr

The proxy server GInetAddress.

 

port

The proxy server port.

 

protocol

The proxy protocol to support, in lower case (e.g. socks, http).

 

dest_hostname

The destination hostname the proxy should tunnel to.

 

dest_port

The destination port to tunnel to.

 

username

The username to authenticate to the proxy server -(or NULL).

[nullable]

password

The password to authenticate to the proxy server -(or NULL).

[nullable]
-
-
-

Returns

-

a new GProxyAddress

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GProxyAddress

-
typedef struct _GProxyAddress GProxyAddress;
-

A GInetSocketAddress representing a connection via a proxy server

-

Since: 2.26

-
-
-
-

struct GProxyAddressClass

-
struct GProxyAddressClass {
-  GInetSocketAddressClass parent_class;
-};
-
-

Class structure for GProxyAddress.

-

Since: 2.26

-
-
-
-

Property Details

-
-

The “destination-hostname” property

-
  “destination-hostname”     gchar *
-

The proxy destination hostname.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
-

The “destination-port” property

-
  “destination-port”         guint
-

The proxy destination port.

-

Flags: Read / Write / Construct Only

-

Allowed values: <= 65535

-

Default value: 0

-
-
-
-

The “destination-protocol” property

-
  “destination-protocol”     gchar *
-

The protocol being spoke to the destination host, or NULL if -the GProxyAddress doesn't know.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.34

-
-
-
-

The “password” property

-
  “password”                 gchar *
-

The proxy password.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
-

The “protocol” property

-
  “protocol”                 gchar *
-

The proxy protocol.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
-

The “uri” property

-
  “uri”                      gchar *
-

The URI string that the proxy was constructed from (or NULL -if the creator didn't specify this).

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.34

-
-
-
-

The “username” property

-
  “username”                 gchar *
-

The proxy username.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GProxyResolver.html b/docs/reference/gio/html/GProxyResolver.html deleted file mode 100644 index eb4694b46..000000000 --- a/docs/reference/gio/html/GProxyResolver.html +++ /dev/null @@ -1,428 +0,0 @@ - - - - -GProxyResolver: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GProxyResolver

-

GProxyResolver — Asynchronous and cancellable network proxy resolver

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - -
-GProxyResolver * - -g_proxy_resolver_get_default () -
-gboolean - -g_proxy_resolver_is_supported () -
-gchar ** - -g_proxy_resolver_lookup () -
-void - -g_proxy_resolver_lookup_async () -
-gchar ** - -g_proxy_resolver_lookup_finish () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
 GProxyResolver
structGProxyResolverInterface
#defineG_PROXY_RESOLVER_EXTENSION_POINT_NAME
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GProxyResolver
-
-
-
-

Prerequisites

-

-GProxyResolver requires - GObject.

-
-
-

Known Implementations

-

-GProxyResolver is implemented by - GSimpleProxyResolver.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GProxyResolver provides synchronous and asynchronous network proxy -resolution. GProxyResolver is used within GSocketClient through -the method g_socket_connectable_proxy_enumerate().

-
-
-

Functions

-
-

g_proxy_resolver_get_default ()

-
GProxyResolver *
-g_proxy_resolver_get_default (void);
-

Gets the default GProxyResolver for the system.

-
-

Returns

-

the default GProxyResolver.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_proxy_resolver_is_supported ()

-
gboolean
-g_proxy_resolver_is_supported (GProxyResolver *resolver);
-

Checks if resolver - can be used on this system. (This is used -internally; g_proxy_resolver_get_default() will only return a proxy -resolver that returns TRUE for this method.)

-
-

Parameters

-
----- - - - - - -

resolver

a GProxyResolver

 
-
-
-

Returns

-

TRUE if resolver -is supported.

-
-

Since: 2.26

-
-
-
-

g_proxy_resolver_lookup ()

-
gchar **
-g_proxy_resolver_lookup (GProxyResolver *resolver,
-                         const gchar *uri,
-                         GCancellable *cancellable,
-                         GError **error);
-

Looks into the system proxy configuration to determine what proxy, -if any, to use to connect to uri -. The returned proxy URIs are of -the form <protocol>://[user[:password]@]host:port or -direct://, where <protocol> could be http, rtsp, socks -or other proxying protocol.

-

If you don't know what network protocol is being used on the -socket, you should use none as the URI protocol. -In this case, the resolver might still return a generic proxy type -(such as SOCKS), but would not return protocol-specific proxy types -(such as http).

-

direct:// is used when no proxy is needed. -Direct connection should not be attempted unless it is part of the -returned array of proxies.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

resolver

a GProxyResolver

 

uri

a URI representing the destination to connect to

 

cancellable

a GCancellable, or NULL.

[nullable]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

A -NULL-terminated array of proxy URIs. Must be freed -with g_strfreev().

-

[transfer full][array zero-terminated=1]

-
-

Since: 2.26

-
-
-
-

g_proxy_resolver_lookup_async ()

-
void
-g_proxy_resolver_lookup_async (GProxyResolver *resolver,
-                               const gchar *uri,
-                               GCancellable *cancellable,
-                               GAsyncReadyCallback callback,
-                               gpointer user_data);
-

Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more -details.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

resolver

a GProxyResolver

 

uri

a URI representing the destination to connect to

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

callback to call after resolution completes.

[scope async]

user_data

data for callback -.

[closure]
-
-

Since: 2.26

-
-
-
-

g_proxy_resolver_lookup_finish ()

-
gchar **
-g_proxy_resolver_lookup_finish (GProxyResolver *resolver,
-                                GAsyncResult *result,
-                                GError **error);
-

Call this function to obtain the array of proxy URIs when -g_proxy_resolver_lookup_async() is complete. See -g_proxy_resolver_lookup() for more details.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

resolver

a GProxyResolver

 

result

the result passed to your GAsyncReadyCallback

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

A -NULL-terminated array of proxy URIs. Must be freed -with g_strfreev().

-

[transfer full][array zero-terminated=1]

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GProxyResolver

-
typedef struct _GProxyResolver GProxyResolver;
-

A helper class to enumerate proxies base on URI.

-

Since: 2.26

-
-
-
-

struct GProxyResolverInterface

-
struct GProxyResolverInterface {
-  GTypeInterface g_iface;
-
-  /* Virtual Table */
-  gboolean (* is_supported)  (GProxyResolver       *resolver);
-
-  gchar ** (* lookup)        (GProxyResolver       *resolver,
-			      const gchar          *uri,
-			      GCancellable         *cancellable,
-			      GError              **error);
-
-  void     (* lookup_async)  (GProxyResolver       *resolver,
-			      const gchar          *uri,
-			      GCancellable         *cancellable,
-			      GAsyncReadyCallback   callback,
-			      gpointer              user_data);
-
-  gchar ** (* lookup_finish) (GProxyResolver       *resolver,
-			      GAsyncResult         *result,
-			      GError              **error);
-};
-
-

The virtual function table for GProxyResolver.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

is_supported ()

the virtual function pointer for g_proxy_resolver_is_supported()

 

lookup ()

the virtual function pointer for g_proxy_resolver_lookup()

 

lookup_async ()

the virtual function pointer for -g_proxy_resolver_lookup_async()

 

lookup_finish ()

the virtual function pointer for -g_proxy_resolver_lookup_finish()

 
-
-
-
-
-

G_PROXY_RESOLVER_EXTENSION_POINT_NAME

-
#define G_PROXY_RESOLVER_EXTENSION_POINT_NAME "gio-proxy-resolver"
-
-

Extension point for proxy resolving functionality. -See Extending GIO.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GRemoteActionGroup.html b/docs/reference/gio/html/GRemoteActionGroup.html deleted file mode 100644 index a546e9364..000000000 --- a/docs/reference/gio/html/GRemoteActionGroup.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - -GRemoteActionGroup: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GRemoteActionGroup

-

GRemoteActionGroup — A GActionGroup that interacts with other processes

-
-
-

Functions

-
---- - - - - - - - - - - -
-void - -g_remote_action_group_activate_action_full () -
-void - -g_remote_action_group_change_action_state_full () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GRemoteActionGroup
structGRemoteActionGroupInterface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GRemoteActionGroup
-
-
-
-

Prerequisites

-

-GRemoteActionGroup requires - GActionGroup and GObject.

-
-
-

Known Implementations

-

-GRemoteActionGroup is implemented by - GDBusActionGroup.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

The GRemoteActionGroup interface is implemented by GActionGroup -instances that either transmit action invocations to other processes -or receive action invocations in the local process from other -processes.

-

The interface has _full variants of the two -methods on GActionGroup used to activate actions: -g_action_group_activate_action() and -g_action_group_change_action_state(). These variants allow a -"platform data" GVariant to be specified: a dictionary providing -context for the action invocation (for example: timestamps, startup -notification IDs, etc).

-

GDBusActionGroup implements GRemoteActionGroup. This provides a -mechanism to send platform data for action invocations over D-Bus.

-

Additionally, g_dbus_connection_export_action_group() will check if -the exported GActionGroup implements GRemoteActionGroup and use the -_full variants of the calls if available. This -provides a mechanism by which to receive platform data for action -invocations that arrive by way of D-Bus.

-
-
-

Functions

-
-

g_remote_action_group_activate_action_full ()

-
void
-g_remote_action_group_activate_action_full
-                               (GRemoteActionGroup *remote,
-                                const gchar *action_name,
-                                GVariant *parameter,
-                                GVariant *platform_data);
-

Activates the remote action.

-

This is the same as g_action_group_activate_action() except that it -allows for provision of "platform data" to be sent along with the -activation request. This typically contains details such as the user -interaction timestamp or startup notification information.

-

platform_data - must be non-NULL and must have the type -G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

remote

a GDBusActionGroup

 

action_name

the name of the action to activate

 

parameter

the optional parameter to the activation.

[nullable]

platform_data

the platform data to send

 
-
-

Since: 2.32

-
-
-
-

g_remote_action_group_change_action_state_full ()

-
void
-g_remote_action_group_change_action_state_full
-                               (GRemoteActionGroup *remote,
-                                const gchar *action_name,
-                                GVariant *value,
-                                GVariant *platform_data);
-

Changes the state of a remote action.

-

This is the same as g_action_group_change_action_state() except that -it allows for provision of "platform data" to be sent along with the -state change request. This typically contains details such as the -user interaction timestamp or startup notification information.

-

platform_data - must be non-NULL and must have the type -G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

remote

a GRemoteActionGroup

 

action_name

the name of the action to change the state of

 

value

the new requested value for the state

 

platform_data

the platform data to send

 
-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

GRemoteActionGroup

-
typedef struct _GRemoteActionGroup GRemoteActionGroup;
-

GRemoteActionGroup is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

struct GRemoteActionGroupInterface

-
struct GRemoteActionGroupInterface {
-  GTypeInterface g_iface;
-
-  void (* activate_action_full)     (GRemoteActionGroup *remote,
-                                     const gchar        *action_name,
-                                     GVariant           *parameter,
-                                     GVariant           *platform_data);
-
-  void (* change_action_state_full) (GRemoteActionGroup *remote,
-                                     const gchar        *action_name,
-                                     GVariant           *value,
-                                     GVariant           *platform_data);
-};
-
-

The virtual function table for GRemoteActionGroup.

-
-

Members

-
----- - - - - - - - - - - - - -

activate_action_full ()

the virtual function pointer for g_remote_action_group_activate_action_full()

 

change_action_state_full ()

the virtual function pointer for g_remote_action_group_change_action_state_full()

 
-
-

Since: 2.32

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GResolver.html b/docs/reference/gio/html/GResolver.html deleted file mode 100644 index 9749fc117..000000000 --- a/docs/reference/gio/html/GResolver.html +++ /dev/null @@ -1,1247 +0,0 @@ - - - - -GResolver: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GResolver

-

GResolver — Asynchronous and cancellable DNS resolver

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GResolver * - -g_resolver_get_default () -
-void - -g_resolver_set_default () -
-GList * - -g_resolver_lookup_by_name () -
-void - -g_resolver_lookup_by_name_async () -
-GList * - -g_resolver_lookup_by_name_finish () -
-void - -g_resolver_free_addresses () -
-gchar * - -g_resolver_lookup_by_address () -
-void - -g_resolver_lookup_by_address_async () -
-gchar * - -g_resolver_lookup_by_address_finish () -
-GList * - -g_resolver_lookup_service () -
-void - -g_resolver_lookup_service_async () -
-GList * - -g_resolver_lookup_service_finish () -
-void - -g_resolver_free_targets () -
-GList * - -g_resolver_lookup_records () -
-void - -g_resolver_lookup_records_async () -
-GList * - -g_resolver_lookup_records_finish () -
-
-
-

Signals

-
----- - - - - - -
voidreloadRun Last
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
 GResolver
enumGResolverRecordType
#defineG_RESOLVER_ERROR
enumGResolverError
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GResolver
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GResolver provides cancellable synchronous and asynchronous DNS -resolution, for hostnames (g_resolver_lookup_by_address(), -g_resolver_lookup_by_name() and their async variants) and SRV -(service) records (g_resolver_lookup_service()).

-

GNetworkAddress and GNetworkService provide wrappers around -GResolver functionality that also implement GSocketConnectable, -making it easy to connect to a remote host/service.

-
-
-

Functions

-
-

g_resolver_get_default ()

-
GResolver *
-g_resolver_get_default (void);
-

Gets the default GResolver. You should unref it when you are done -with it. GResolver may use its reference count as a hint about how -many threads it should allocate for concurrent DNS resolutions.

-
-

Returns

-

the default GResolver.

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_resolver_set_default ()

-
void
-g_resolver_set_default (GResolver *resolver);
-

Sets resolver - to be the application's default resolver (reffing -resolver -, and unreffing the previous default resolver, if any). -Future calls to g_resolver_get_default() will return this resolver.

-

This can be used if an application wants to perform any sort of DNS -caching or "pinning"; it can implement its own GResolver that -calls the original default resolver for DNS operations, and -implements its own cache policies on top of that, and then set -itself as the default resolver for all later code to use.

-
-

Parameters

-
----- - - - - - -

resolver

the new default GResolver

 
-
-

Since: 2.22

-
-
-
-

g_resolver_lookup_by_name ()

-
GList *
-g_resolver_lookup_by_name (GResolver *resolver,
-                           const gchar *hostname,
-                           GCancellable *cancellable,
-                           GError **error);
-

Synchronously resolves hostname - to determine its associated IP -address(es). hostname - may be an ASCII-only or UTF-8 hostname, or -the textual form of an IP address (in which case this just becomes -a wrapper around g_inet_address_new_from_string()).

-

On success, g_resolver_lookup_by_name() will return a non-empty GList of -GInetAddress, sorted in order of preference and guaranteed to not -contain duplicates. That is, if using the result to connect to -hostname -, you should attempt to connect to the first address -first, then the second if the first fails, etc. If you are using -the result to listen on a socket, it is appropriate to add each -result using e.g. g_socket_listener_add_address().

-

If the DNS resolution fails, error - (if non-NULL) will be set to a -value from GResolverError and NULL will be returned.

-

If cancellable - is non-NULL, it can be used to cancel the -operation, in which case error - (if non-NULL) will be set to -G_IO_ERROR_CANCELLED.

-

If you are planning to connect to a socket on the resolved IP -address, it may be easier to create a GNetworkAddress and use its -GSocketConnectable interface.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

resolver

a GResolver

 

hostname

the hostname to look up

 

cancellable

a GCancellable, or NULL.

[nullable]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a non-empty GList -of GInetAddress, or NULL on error. You -must unref each of the addresses and free the list when you are -done with it. (You can use g_resolver_free_addresses() to do this.).

-

[element-type GInetAddress][transfer full]

-
-

Since: 2.22

-
-
-
-

g_resolver_lookup_by_name_async ()

-
void
-g_resolver_lookup_by_name_async (GResolver *resolver,
-                                 const gchar *hostname,
-                                 GCancellable *cancellable,
-                                 GAsyncReadyCallback callback,
-                                 gpointer user_data);
-

Begins asynchronously resolving hostname - to determine its -associated IP address(es), and eventually calls callback -, which -must call g_resolver_lookup_by_name_finish() to get the result. -See g_resolver_lookup_by_name() for more details.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

resolver

a GResolver

 

hostname

the hostname to look up the address of

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

callback to call after resolution completes.

[scope async]

user_data

data for callback -.

[closure]
-
-

Since: 2.22

-
-
-
-

g_resolver_lookup_by_name_finish ()

-
GList *
-g_resolver_lookup_by_name_finish (GResolver *resolver,
-                                  GAsyncResult *result,
-                                  GError **error);
-

Retrieves the result of a call to -g_resolver_lookup_by_name_async().

-

If the DNS resolution failed, error - (if non-NULL) will be set to -a value from GResolverError. If the operation was cancelled, -error - will be set to G_IO_ERROR_CANCELLED.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

resolver

a GResolver

 

result

the result passed to your GAsyncReadyCallback

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a GList -of GInetAddress, or NULL on error. See g_resolver_lookup_by_name() -for more details.

-

[element-type GInetAddress][transfer full]

-
-

Since: 2.22

-
-
-
-

g_resolver_free_addresses ()

-
void
-g_resolver_free_addresses (GList *addresses);
-

Frees addresses - (which should be the return value from -g_resolver_lookup_by_name() or g_resolver_lookup_by_name_finish()). -(This is a convenience method; you can also simply free the results -by hand.)

-

[skip]

-
-

Parameters

-
----- - - - - - -

addresses

a GList of GInetAddress

 
-
-

Since: 2.22

-
-
-
-

g_resolver_lookup_by_address ()

-
gchar *
-g_resolver_lookup_by_address (GResolver *resolver,
-                              GInetAddress *address,
-                              GCancellable *cancellable,
-                              GError **error);
-

Synchronously reverse-resolves address - to determine its -associated hostname.

-

If the DNS resolution fails, error - (if non-NULL) will be set to -a value from GResolverError.

-

If cancellable - is non-NULL, it can be used to cancel the -operation, in which case error - (if non-NULL) will be set to -G_IO_ERROR_CANCELLED.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

resolver

a GResolver

 

address

the address to reverse-resolve

 

cancellable

a GCancellable, or NULL.

[nullable]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a hostname (either ASCII-only, or in ASCII-encoded -form), or NULL on error.

-
-

Since: 2.22

-
-
-
-

g_resolver_lookup_by_address_async ()

-
void
-g_resolver_lookup_by_address_async (GResolver *resolver,
-                                    GInetAddress *address,
-                                    GCancellable *cancellable,
-                                    GAsyncReadyCallback callback,
-                                    gpointer user_data);
-

Begins asynchronously reverse-resolving address - to determine its -associated hostname, and eventually calls callback -, which must -call g_resolver_lookup_by_address_finish() to get the final result.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

resolver

a GResolver

 

address

the address to reverse-resolve

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

callback to call after resolution completes.

[scope async]

user_data

data for callback -.

[closure]
-
-

Since: 2.22

-
-
-
-

g_resolver_lookup_by_address_finish ()

-
gchar *
-g_resolver_lookup_by_address_finish (GResolver *resolver,
-                                     GAsyncResult *result,
-                                     GError **error);
-

Retrieves the result of a previous call to -g_resolver_lookup_by_address_async().

-

If the DNS resolution failed, error - (if non-NULL) will be set to -a value from GResolverError. If the operation was cancelled, -error - will be set to G_IO_ERROR_CANCELLED.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

resolver

a GResolver

 

result

the result passed to your GAsyncReadyCallback

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a hostname (either ASCII-only, or in ASCII-encoded -form), or NULL on error.

-
-

Since: 2.22

-
-
-
-

g_resolver_lookup_service ()

-
GList *
-g_resolver_lookup_service (GResolver *resolver,
-                           const gchar *service,
-                           const gchar *protocol,
-                           const gchar *domain,
-                           GCancellable *cancellable,
-                           GError **error);
-

Synchronously performs a DNS SRV lookup for the given service - and -protocol - in the given domain - and returns an array of GSrvTarget. -domain - may be an ASCII-only or UTF-8 hostname. Note also that the -service - and protocol - arguments do not include the leading underscore -that appears in the actual DNS entry.

-

On success, g_resolver_lookup_service() will return a non-empty GList of -GSrvTarget, sorted in order of preference. (That is, you should -attempt to connect to the first target first, then the second if -the first fails, etc.)

-

If the DNS resolution fails, error - (if non-NULL) will be set to -a value from GResolverError and NULL will be returned.

-

If cancellable - is non-NULL, it can be used to cancel the -operation, in which case error - (if non-NULL) will be set to -G_IO_ERROR_CANCELLED.

-

If you are planning to connect to the service, it is usually easier -to create a GNetworkService and use its GSocketConnectable -interface.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

resolver

a GResolver

 

service

the service type to look up (eg, "ldap")

 

protocol

the networking protocol to use for service -(eg, "tcp")

 

domain

the DNS domain to look up the service in

 

cancellable

a GCancellable, or NULL.

[nullable]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a non-empty GList of -GSrvTarget, or NULL on error. You must free each of the targets and the -list when you are done with it. (You can use g_resolver_free_targets() to do -this.).

-

[element-type GSrvTarget][transfer full]

-
-

Since: 2.22

-
-
-
-

g_resolver_lookup_service_async ()

-
void
-g_resolver_lookup_service_async (GResolver *resolver,
-                                 const gchar *service,
-                                 const gchar *protocol,
-                                 const gchar *domain,
-                                 GCancellable *cancellable,
-                                 GAsyncReadyCallback callback,
-                                 gpointer user_data);
-

Begins asynchronously performing a DNS SRV lookup for the given -service - and protocol - in the given domain -, and eventually calls -callback -, which must call g_resolver_lookup_service_finish() to -get the final result. See g_resolver_lookup_service() for more -details.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

resolver

a GResolver

 

service

the service type to look up (eg, "ldap")

 

protocol

the networking protocol to use for service -(eg, "tcp")

 

domain

the DNS domain to look up the service in

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

callback to call after resolution completes.

[scope async]

user_data

data for callback -.

[closure]
-
-

Since: 2.22

-
-
-
-

g_resolver_lookup_service_finish ()

-
GList *
-g_resolver_lookup_service_finish (GResolver *resolver,
-                                  GAsyncResult *result,
-                                  GError **error);
-

Retrieves the result of a previous call to -g_resolver_lookup_service_async().

-

If the DNS resolution failed, error - (if non-NULL) will be set to -a value from GResolverError. If the operation was cancelled, -error - will be set to G_IO_ERROR_CANCELLED.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

resolver

a GResolver

 

result

the result passed to your GAsyncReadyCallback

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a non-empty GList of -GSrvTarget, or NULL on error. See g_resolver_lookup_service() for more -details.

-

[element-type GSrvTarget][transfer full]

-
-

Since: 2.22

-
-
-
-

g_resolver_free_targets ()

-
void
-g_resolver_free_targets (GList *targets);
-

Frees targets - (which should be the return value from -g_resolver_lookup_service() or g_resolver_lookup_service_finish()). -(This is a convenience method; you can also simply free the -results by hand.)

-

[skip]

-
-

Parameters

-
----- - - - - - -

targets

a GList of GSrvTarget

 
-
-

Since: 2.22

-
-
-
-

g_resolver_lookup_records ()

-
GList *
-g_resolver_lookup_records (GResolver *resolver,
-                           const gchar *rrname,
-                           GResolverRecordType record_type,
-                           GCancellable *cancellable,
-                           GError **error);
-

Synchronously performs a DNS record lookup for the given rrname - and returns -a list of records as GVariant tuples. See GResolverRecordType for -information on what the records contain for each record_type -.

-

If the DNS resolution fails, error - (if non-NULL) will be set to -a value from GResolverError and NULL will be returned.

-

If cancellable - is non-NULL, it can be used to cancel the -operation, in which case error - (if non-NULL) will be set to -G_IO_ERROR_CANCELLED.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

resolver

a GResolver

 

rrname

the DNS name to lookup the record for

 

record_type

the type of DNS record to lookup

 

cancellable

a GCancellable, or NULL.

[nullable]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a non-empty GList of -GVariant, or NULL on error. You must free each of the records and the list -when you are done with it. (You can use g_list_free_full() with -g_variant_unref() to do this.).

-

[element-type GVariant][transfer full]

-
-

Since: 2.34

-
-
-
-

g_resolver_lookup_records_async ()

-
void
-g_resolver_lookup_records_async (GResolver *resolver,
-                                 const gchar *rrname,
-                                 GResolverRecordType record_type,
-                                 GCancellable *cancellable,
-                                 GAsyncReadyCallback callback,
-                                 gpointer user_data);
-

Begins asynchronously performing a DNS lookup for the given -rrname -, and eventually calls callback -, which must call -g_resolver_lookup_records_finish() to get the final result. See -g_resolver_lookup_records() for more details.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

resolver

a GResolver

 

rrname

the DNS name to lookup the record for

 

record_type

the type of DNS record to lookup

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

callback to call after resolution completes.

[scope async]

user_data

data for callback -.

[closure]
-
-

Since: 2.34

-
-
-
-

g_resolver_lookup_records_finish ()

-
GList *
-g_resolver_lookup_records_finish (GResolver *resolver,
-                                  GAsyncResult *result,
-                                  GError **error);
-

Retrieves the result of a previous call to -g_resolver_lookup_records_async(). Returns a non-empty list of records as -GVariant tuples. See GResolverRecordType for information on what the -records contain.

-

If the DNS resolution failed, error - (if non-NULL) will be set to -a value from GResolverError. If the operation was cancelled, -error - will be set to G_IO_ERROR_CANCELLED.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

resolver

a GResolver

 

result

the result passed to your GAsyncReadyCallback

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a non-empty GList of -GVariant, or NULL on error. You must free each of the records and the list -when you are done with it. (You can use g_list_free_full() with -g_variant_unref() to do this.).

-

[element-type GVariant][transfer full]

-
-

Since: 2.34

-
-
-
-

Types and Values

-
-

GResolver

-
typedef struct _GResolver GResolver;
-

The object that handles DNS resolution. Use g_resolver_get_default() -to get the default resolver.

-

This is an abstract type; subclasses of it implement different resolvers for -different platforms and situations.

-
-
-
-

enum GResolverRecordType

-

The type of record that g_resolver_lookup_records() or -g_resolver_lookup_records_async() should retrieve. The records are returned -as lists of GVariant tuples. Each record type has different values in -the variant tuples returned.

-

G_RESOLVER_RECORD_SRV records are returned as variants with the signature -'(qqqs)', containing a guint16 with the priority, a guint16 with the -weight, a guint16 with the port, and a string of the hostname.

-

G_RESOLVER_RECORD_MX records are returned as variants with the signature -'(qs)', representing a guint16 with the preference, and a string containing -the mail exchanger hostname.

-

G_RESOLVER_RECORD_TXT records are returned as variants with the signature -'(as)', representing an array of the strings in the text record.

-

G_RESOLVER_RECORD_SOA records are returned as variants with the signature -'(ssuuuuu)', representing a string containing the primary name server, a -string containing the administrator, the serial as a guint32, the refresh -interval as guint32, the retry interval as a guint32, the expire timeout -as a guint32, and the ttl as a guint32.

-

G_RESOLVER_RECORD_NS records are returned as variants with the signature -'(s)', representing a string of the hostname of the name server.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_RESOLVER_RECORD_SRV

-

lookup DNS SRV records for a domain

-
 

G_RESOLVER_RECORD_MX

-

lookup DNS MX records for a domain

-
 

G_RESOLVER_RECORD_TXT

-

lookup DNS TXT records for a name

-
 

G_RESOLVER_RECORD_SOA

-

lookup DNS SOA records for a zone

-
 

G_RESOLVER_RECORD_NS

-

lookup DNS NS records for a domain

-
 
-
-

Since: 2.34

-
-
-
-

G_RESOLVER_ERROR

-
#define G_RESOLVER_ERROR (g_resolver_error_quark ())
-
-

Error domain for GResolver. Errors in this domain will be from the -GResolverError enumeration. See GError for more information on -error domains.

-
-
-
-

enum GResolverError

-

An error code used with G_RESOLVER_ERROR in a GError returned -from a GResolver routine.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_RESOLVER_ERROR_NOT_FOUND

-

the requested name/address/service was not - found

-
 

G_RESOLVER_ERROR_TEMPORARY_FAILURE

-

the requested information could not - be looked up due to a network error or similar problem

-
 

G_RESOLVER_ERROR_INTERNAL

-

unknown error

-
 
-
-

Since: 2.22

-
-
-
-

Signal Details

-
-

The “reload” signal

-
void
-user_function (GResolver *resolver,
-               gpointer   user_data)
-

Emitted when the resolver notices that the system resolver -configuration has changed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

resolver

a GResolver

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GResource.html b/docs/reference/gio/html/GResource.html deleted file mode 100644 index 73b90d069..000000000 --- a/docs/reference/gio/html/GResource.html +++ /dev/null @@ -1,1196 +0,0 @@ - - - - -GResource: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GResource

-

GResource — Resource framework

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GResource * - -g_resource_load () -
-GResource * - -g_resource_new_from_data () -
-GResource * - -g_resource_ref () -
-void - -g_resource_unref () -
-GBytes * - -g_resource_lookup_data () -
-GInputStream * - -g_resource_open_stream () -
-char ** - -g_resource_enumerate_children () -
-gboolean - -g_resource_get_info () -
-void - -g_static_resource_init () -
-void - -g_static_resource_fini () -
-GResource * - -g_static_resource_get_resource () -
-void - -g_resources_register () -
-void - -g_resources_unregister () -
-GBytes * - -g_resources_lookup_data () -
-GInputStream * - -g_resources_open_stream () -
-char ** - -g_resources_enumerate_children () -
-gboolean - -g_resources_get_info () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
 GResource
enumGResourceFlags
enumGResourceLookupFlags
structGStaticResource
#defineG_RESOURCE_ERROR
enumGResourceError
-
-
-

Object Hierarchy

-
    GBoxed
-    ╰── GResource
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Applications and libraries often contain binary or textual data that is -really part of the application, rather than user data. For instance -GtkBuilder .ui files, splashscreen images, GMenu markup XML, CSS files, -icons, etc. These are often shipped as files in $datadir/appname, or -manually included as literal strings in the code.

-

The GResource API and the glib-compile-resources program -provide a convenient and efficient alternative to this which has some nice properties. You -maintain the files as normal files, so its easy to edit them, but during the build the files -are combined into a binary bundle that is linked into the executable. This means that loading -the resource files are efficient (as they are already in memory, shared with other instances) and -simple (no need to check for things like I/O errors or locate the files in the filesystem). It -also makes it easier to create relocatable applications.

-

Resource files can also be marked as compressed. Such files will be included in the resource bundle -in a compressed form, but will be automatically uncompressed when the resource is used. This -is very useful e.g. for larger text files that are parsed once (or rarely) and then thrown away.

-

Resource files can also be marked to be preprocessed, by setting the value of the -preprocess attribute to a comma-separated list of preprocessing options. -The only options currently supported are:

-

xml-stripblanks which will use the xmllint command -to strip ignorable whitespace from the XML file. For this to work, -the XMLLINT environment variable must be set to the full path to -the xmllint executable, or xmllint must be in the PATH; otherwise -the preprocessing step is skipped.

-

to-pixdata which will use the gdk-pixbuf-pixdata command to convert -images to the GdkPixdata format, which allows you to create pixbufs directly using the data inside -the resource file, rather than an (uncompressed) copy if it. For this, the gdk-pixbuf-pixdata -program must be in the PATH, or the GDK_PIXBUF_PIXDATA environment variable must be -set to the full path to the gdk-pixbuf-pixdata executable; otherwise the resource compiler will -abort.

-

Resource bundles are created by the glib-compile-resources program -which takes an XML file that describes the bundle, and a set of files that the XML references. These -are combined into a binary resource bundle.

-

An example resource description:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
<?xml version="1.0" encoding="UTF-8"?>
-<gresources>
-  <gresource prefix="/org/gtk/Example">
-    <file>data/splashscreen.png</file>
-    <file compressed="true">dialog.ui</file>
-    <file preprocess="xml-stripblanks">menumarkup.xml</file>
-  </gresource>
-</gresources>
-
- -

-

This will create a resource bundle with the following files:

-
- - - - - - - -
1
-2
-3
/org/gtk/Example/data/splashscreen.png
-/org/gtk/Example/dialog.ui
-/org/gtk/Example/menumarkup.xml
-
- -

-

Note that all resources in the process share the same namespace, so use Java-style -path prefixes (like in the above example) to avoid conflicts.

-

You can then use glib-compile-resources to compile the XML to a -binary bundle that you can load with g_resource_load(). However, its more common to use the --generate-source and ---generate-header arguments to create a source file and header to link directly into your application. -This will generate get_resource(), register_resource() and -unregister_resource() functions, prefixed by the --c-name argument passed -to glib-compile-resources. get_resource() returns -the generated GResource object. The register and unregister functions -register the resource so its files can be accessed using -g_resources_lookup_data().

-

Once a GResource has been created and registered all the data in it can be accessed globally in the process by -using API calls like g_resources_open_stream() to stream the data or g_resources_lookup_data() to get a direct pointer -to the data. You can also use URIs like "resource:///org/gtk/Example/data/splashscreen.png" with GFile to access -the resource data.

-

There are two forms of the generated source, the default version uses the compiler support for constructor -and destructor functions (where available) to automatically create and register the GResource on startup -or library load time. If you pass --manual-register two functions to register/unregister the resource is instead -created. This requires an explicit initialization call in your application/library, but it works on all platforms, -even on the minor ones where this is not available. (Constructor support is available for at least Win32, Mac OS and Linux.)

-

Note that resource data can point directly into the data segment of e.g. a library, so if you are unloading libraries -during runtime you need to be very careful with keeping around pointers to data from a resource, as this goes away -when the library is unloaded. However, in practice this is not generally a problem, since most resource accesses -is for your own resources, and resource data is often used once, during parsing, and then released.

-

When debugging a program or testing a change to an installed version, it is often useful to be able to -replace resources in the program or library, without recompiling, for debugging or quick hacking and testing -purposes.

-

Since GLib 2.50, it is possible to use the G_RESOURCE_OVERLAYS environment variable to selectively overlay -resources with replacements from the filesystem. It is a colon-separated list of substitutions to perform -during resource lookups.

-

A substitution has the form

-
- - - - - - - -
1
/org/gtk/libgtk=/home/desrt/gtk-overlay
-
- -

-

The part before the = is the resource subpath for which the overlay applies. The part after is a -filesystem path which contains files and subdirectories as you would like to be loaded as resources with the -equivalent names.

-

In the example above, if an application tried to load a resource with the resource path -/org/gtk/libgtk/ui/gtkdialog.ui then GResource would check the filesystem path -/home/desrt/gtk-overlay/ui/gtkdialog.ui. If a file was found there, it would be used instead. This is an -overlay, not an outright replacement, which means that if a file is not found at that path, the built-in -version will be used instead. Whiteouts are not currently supported.

-

Substitutions must start with a slash, and must not contain a trailing slash before the '='. The path after -the slash should ideally be absolute, but this is not strictly required. It is possible to overlay the -location of a single resource with an individual file.

-
-
-

Functions

-
-

g_resource_load ()

-
GResource *
-g_resource_load (const gchar *filename,
-                 GError **error);
-

Loads a binary resource bundle and creates a GResource representation of it, allowing -you to query it for data.

-

If you want to use this resource in the global resource namespace you need -to register it with g_resources_register().

-
-

Parameters

-
----- - - - - - - - - - - - - -

filename

the path of a filename to load, in the GLib filename encoding.

[type filename]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a new GResource, or NULL on error.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_resource_new_from_data ()

-
GResource *
-g_resource_new_from_data (GBytes *data,
-                          GError **error);
-

Creates a GResource from a reference to the binary resource bundle. -This will keep a reference to data - while the resource lives, so -the data should not be modified or freed.

-

If you want to use this resource in the global resource namespace you need -to register it with g_resources_register().

-
-

Parameters

-
----- - - - - - - - - - - - - -

data

A GBytes

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a new GResource, or NULL on error.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_resource_ref ()

-
GResource *
-g_resource_ref (GResource *resource);
-

Atomically increments the reference count of resource - by one. This -function is MT-safe and may be called from any thread.

-
-

Parameters

-
----- - - - - - -

resource

A GResource

 
-
-
-

Returns

-

The passed in GResource

-
-

Since: 2.32

-
-
-
-

g_resource_unref ()

-
void
-g_resource_unref (GResource *resource);
-

Atomically decrements the reference count of resource - by one. If the -reference count drops to 0, all memory allocated by the resource is -released. This function is MT-safe and may be called from any -thread.

-
-

Parameters

-
----- - - - - - -

resource

A GResource

 
-
-

Since: 2.32

-
-
-
-

g_resource_lookup_data ()

-
GBytes *
-g_resource_lookup_data (GResource *resource,
-                        const char *path,
-                        GResourceLookupFlags lookup_flags,
-                        GError **error);
-

Looks for a file at the specified path - in the resource and -returns a GBytes that lets you directly access the data in -memory.

-

The data is always followed by a zero byte, so you -can safely use the data as a C string. However, that byte -is not included in the size of the GBytes.

-

For uncompressed resource files this is a pointer directly into -the resource bundle, which is typically in some readonly data section -in the program binary. For compressed files we allocate memory on -the heap and automatically uncompress the data.

-

lookup_flags - controls the behaviour of the lookup.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

resource

A GResource

 

path

A pathname inside the resource

 

lookup_flags

A GResourceLookupFlags

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

GBytes or NULL on error. -Free the returned object with g_bytes_unref().

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_resource_open_stream ()

-
GInputStream *
-g_resource_open_stream (GResource *resource,
-                        const char *path,
-                        GResourceLookupFlags lookup_flags,
-                        GError **error);
-

Looks for a file at the specified path - in the resource and -returns a GInputStream that lets you read the data.

-

lookup_flags - controls the behaviour of the lookup.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

resource

A GResource

 

path

A pathname inside the resource

 

lookup_flags

A GResourceLookupFlags

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

GInputStream or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_resource_enumerate_children ()

-
char **
-g_resource_enumerate_children (GResource *resource,
-                               const char *path,
-                               GResourceLookupFlags lookup_flags,
-                               GError **error);
-

Returns all the names of children at the specified path - in the resource. -The return result is a NULL terminated list of strings which should -be released with g_strfreev().

-

If path - is invalid or does not exist in the GResource, -G_RESOURCE_ERROR_NOT_FOUND will be returned.

-

lookup_flags - controls the behaviour of the lookup.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

resource

A GResource

 

path

A pathname inside the resource

 

lookup_flags

A GResourceLookupFlags

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

an array of constant strings.

-

[array zero-terminated=1][transfer full]

-
-

Since: 2.32

-
-
-
-

g_resource_get_info ()

-
gboolean
-g_resource_get_info (GResource *resource,
-                     const char *path,
-                     GResourceLookupFlags lookup_flags,
-                     gsize *size,
-                     guint32 *flags,
-                     GError **error);
-

Looks for a file at the specified path - in the resource and -if found returns information about it.

-

lookup_flags - controls the behaviour of the lookup.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

resource

A GResource

 

path

A pathname inside the resource

 

lookup_flags

A GResourceLookupFlags

 

size

a location to place the length of the contents of the file, -or NULL if the length is not needed.

[out][optional]

flags

a location to place the flags about the file, -or NULL if the length is not needed.

[out][optional]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE if the file was found. FALSE if there were errors

-
-

Since: 2.32

-
-
-
-

g_static_resource_init ()

-
void
-g_static_resource_init (GStaticResource *static_resource);
-

Initializes a GResource from static data using a -GStaticResource.

-

This is normally used by code generated by -glib-compile-resources -and is not typically used by other code.

-
-

Parameters

-
----- - - - - - -

static_resource

pointer to a static GStaticResource

 
-
-

Since: 2.32

-
-
-
-

g_static_resource_fini ()

-
void
-g_static_resource_fini (GStaticResource *static_resource);
-

Finalized a GResource initialized by g_static_resource_init().

-

This is normally used by code generated by -glib-compile-resources -and is not typically used by other code.

-
-

Parameters

-
----- - - - - - -

static_resource

pointer to a static GStaticResource

 
-
-

Since: 2.32

-
-
-
-

g_static_resource_get_resource ()

-
GResource *
-g_static_resource_get_resource (GStaticResource *static_resource);
-

Gets the GResource that was registered by a call to g_static_resource_init().

-

This is normally used by code generated by -glib-compile-resources -and is not typically used by other code.

-
-

Parameters

-
----- - - - - - -

static_resource

pointer to a static GStaticResource

 
-
-
-

Returns

-

a GResource.

-

[transfer none]

-
-

Since: 2.32

-
-
-
-

g_resources_register ()

-
void
-g_resources_register (GResource *resource);
-

Registers the resource with the process-global set of resources. -Once a resource is registered the files in it can be accessed -with the global resource lookup functions like g_resources_lookup_data().

-
-

Parameters

-
----- - - - - - -

resource

A GResource

 
-
-

Since: 2.32

-
-
-
-

g_resources_unregister ()

-
void
-g_resources_unregister (GResource *resource);
-

Unregisters the resource from the process-global set of resources.

-
-

Parameters

-
----- - - - - - -

resource

A GResource

 
-
-

Since: 2.32

-
-
-
-

g_resources_lookup_data ()

-
GBytes *
-g_resources_lookup_data (const char *path,
-                         GResourceLookupFlags lookup_flags,
-                         GError **error);
-

Looks for a file at the specified path - in the set of -globally registered resources and returns a GBytes that -lets you directly access the data in memory.

-

The data is always followed by a zero byte, so you -can safely use the data as a C string. However, that byte -is not included in the size of the GBytes.

-

For uncompressed resource files this is a pointer directly into -the resource bundle, which is typically in some readonly data section -in the program binary. For compressed files we allocate memory on -the heap and automatically uncompress the data.

-

lookup_flags - controls the behaviour of the lookup.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

path

A pathname inside the resource

 

lookup_flags

A GResourceLookupFlags

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

GBytes or NULL on error. -Free the returned object with g_bytes_unref().

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_resources_open_stream ()

-
GInputStream *
-g_resources_open_stream (const char *path,
-                         GResourceLookupFlags lookup_flags,
-                         GError **error);
-

Looks for a file at the specified path - in the set of -globally registered resources and returns a GInputStream -that lets you read the data.

-

lookup_flags - controls the behaviour of the lookup.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

path

A pathname inside the resource

 

lookup_flags

A GResourceLookupFlags

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

GInputStream or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_resources_enumerate_children ()

-
char **
-g_resources_enumerate_children (const char *path,
-                                GResourceLookupFlags lookup_flags,
-                                GError **error);
-

Returns all the names of children at the specified path - in the set of -globally registered resources. -The return result is a NULL terminated list of strings which should -be released with g_strfreev().

-

lookup_flags - controls the behaviour of the lookup.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

path

A pathname inside the resource

 

lookup_flags

A GResourceLookupFlags

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

an array of constant strings.

-

[array zero-terminated=1][transfer full]

-
-

Since: 2.32

-
-
-
-

g_resources_get_info ()

-
gboolean
-g_resources_get_info (const char *path,
-                      GResourceLookupFlags lookup_flags,
-                      gsize *size,
-                      guint32 *flags,
-                      GError **error);
-

Looks for a file at the specified path - in the set of -globally registered resources and if found returns information about it.

-

lookup_flags - controls the behaviour of the lookup.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

path

A pathname inside the resource

 

lookup_flags

A GResourceLookupFlags

 

size

a location to place the length of the contents of the file, -or NULL if the length is not needed.

[out][optional]

flags

a location to place the flags about the file, -or NULL if the length is not needed.

[out][optional]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE if the file was found. FALSE if there were errors

-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

GResource

-
typedef struct _GResource GResource;
-

A resource bundle.

-

Since: 2.32

-
-
-
-

enum GResourceFlags

-

GResourceFlags give information about a particular file inside a resource -bundle.

-
-

Members

-
----- - - - - - - - - - - - - -

G_RESOURCE_FLAGS_NONE

-

No flags set.

-
 

G_RESOURCE_FLAGS_COMPRESSED

-

The file is compressed.

-
 
-
-

Since: 2.32

-
-
-
-

enum GResourceLookupFlags

-

GResourceLookupFlags determine how resource path lookups are handled.

-
-

Members

-
----- - - - - - -

G_RESOURCE_LOOKUP_FLAGS_NONE

-

No flags set.

-
 
-
-

Since: 2.32

-
-
-
-

struct GStaticResource

-
struct GStaticResource {
-};
-
-

GStaticResource is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

G_RESOURCE_ERROR

-
#define G_RESOURCE_ERROR (g_resource_error_quark ())
-
-

Error domain for GResource. Errors in this domain will be from the -GResourceError enumeration. See GError for more information on -error domains.

-
-
-
-

enum GResourceError

-

An error code used with G_RESOURCE_ERROR in a GError returned -from a GResource routine.

-
-

Members

-
----- - - - - - - - - - - - - -

G_RESOURCE_ERROR_NOT_FOUND

-

no file was found at the requested path

-
 

G_RESOURCE_ERROR_INTERNAL

-

unknown error

-
 
-
-

Since: 2.32

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSeekable.html b/docs/reference/gio/html/GSeekable.html deleted file mode 100644 index 82bd2caff..000000000 --- a/docs/reference/gio/html/GSeekable.html +++ /dev/null @@ -1,430 +0,0 @@ - - - - -GSeekable: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSeekable

-

GSeekable — Stream seeking interface

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - -
-goffset - -g_seekable_tell () -
-gboolean - -g_seekable_can_seek () -
-gboolean - -g_seekable_seek () -
-gboolean - -g_seekable_can_truncate () -
-gboolean - -g_seekable_truncate () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GSeekable
structGSeekableIface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GSeekable
-
-
-
-

Prerequisites

-

-GSeekable requires - GObject.

-
- -
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GSeekable is implemented by streams (implementations of -GInputStream or GOutputStream) that support seeking.

-

Seekable streams largely fall into two categories: resizable and -fixed-size.

-

GSeekable on fixed-sized streams is approximately the same as POSIX -lseek() on a block device (for example: attmepting to seek past the -end of the device is an error). Fixed streams typically cannot be -truncated.

-

GSeekable on resizable streams is approximately the same as POSIX -lseek() on a normal file. Seeking past the end and writing data will -usually cause the stream to resize by introducing zero bytes.

-
-
-

Functions

-
-

g_seekable_tell ()

-
goffset
-g_seekable_tell (GSeekable *seekable);
-

Tells the current position within the stream.

-
-

Parameters

-
----- - - - - - -

seekable

a GSeekable.

 
-
-
-

Returns

-

the offset from the beginning of the buffer.

-
-
-
-
-

g_seekable_can_seek ()

-
gboolean
-g_seekable_can_seek (GSeekable *seekable);
-

Tests if the stream supports the GSeekableIface.

-
-

Parameters

-
----- - - - - - -

seekable

a GSeekable.

 
-
-
-

Returns

-

TRUE if seekable -can be seeked. FALSE otherwise.

-
-
-
-
-

g_seekable_seek ()

-
gboolean
-g_seekable_seek (GSeekable *seekable,
-                 goffset offset,
-                 GSeekType type,
-                 GCancellable *cancellable,
-                 GError **error);
-

Seeks in the stream by the given offset -, modified by type -.

-

Attempting to seek past the end of the stream will have different -results depending on if the stream is fixed-sized or resizable. If -the stream is resizable then seeking past the end and then writing -will result in zeros filling the empty space. Seeking past the end -of a resizable stream and reading will result in EOF. Seeking past -the end of a fixed-sized stream will fail.

-

Any operation that would result in a negative offset will fail.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

seekable

a GSeekable.

 

offset

a goffset.

 

type

a GSeekType.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE if successful. If an error -has occurred, this function will return FALSE and set error -appropriately if present.

-
-
-
-
-

g_seekable_can_truncate ()

-
gboolean
-g_seekable_can_truncate (GSeekable *seekable);
-

Tests if the stream can be truncated.

-
-

Parameters

-
----- - - - - - -

seekable

a GSeekable.

 
-
-
-

Returns

-

TRUE if the stream can be truncated, FALSE otherwise.

-
-
-
-
-

g_seekable_truncate ()

-
gboolean
-g_seekable_truncate (GSeekable *seekable,
-                     goffset offset,
-                     GCancellable *cancellable,
-                     GError **error);
-

Truncates a stream with a given offset.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned. If an -operation was partially finished when the operation was cancelled the -partial result will be returned, without an error.

-

Virtual: truncate_fn

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

seekable

a GSeekable.

 

offset

a goffset.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

TRUE if successful. If an error -has occurred, this function will return FALSE and set error -appropriately if present.

-
-
-
-
-

Types and Values

-
-

GSeekable

-
typedef struct _GSeekable GSeekable;
-

Seek object for streaming operations.

-
-
-
-

struct GSeekableIface

-
struct GSeekableIface {
-  GTypeInterface g_iface;
-
-  /* Virtual Table */
-
-  goffset     (* tell)	         (GSeekable    *seekable);
-
-  gboolean    (* can_seek)       (GSeekable    *seekable);
-  gboolean    (* seek)	         (GSeekable    *seekable,
-				  goffset       offset,
-				  GSeekType     type,
-				  GCancellable *cancellable,
-				  GError      **error);
-
-  gboolean    (* can_truncate)   (GSeekable    *seekable);
-  gboolean    (* truncate_fn)    (GSeekable    *seekable,
-				  goffset       offset,
-				  GCancellable *cancellable,
-				  GError       **error);
-
-  /* TODO: Async seek/truncate */
-};
-
-

Provides an interface for implementing seekable functionality on I/O Streams.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

tell ()

Tells the current location within a stream.

 

can_seek ()

Checks if seeking is supported by the stream.

 

seek ()

Seeks to a location within a stream.

 

can_truncate ()

Checks if truncation is supported by the stream.

 

truncate_fn ()

Truncates a stream.

 
-
-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSettings.html b/docs/reference/gio/html/GSettings.html deleted file mode 100644 index a23999719..000000000 --- a/docs/reference/gio/html/GSettings.html +++ /dev/null @@ -1,3846 +0,0 @@ - - - - -GSettings: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSettings

-

GSettings — High-level API for application settings

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GSettings * - -g_settings_new () -
-GSettings * - -g_settings_new_with_path () -
-GSettings * - -g_settings_new_with_backend () -
-GSettings * - -g_settings_new_with_backend_and_path () -
-GSettings * - -g_settings_new_full () -
-void - -g_settings_sync () -
-GVariant * - -g_settings_get_value () -
-gboolean - -g_settings_set_value () -
-gboolean - -g_settings_is_writable () -
-void - -g_settings_delay () -
-void - -g_settings_apply () -
-void - -g_settings_revert () -
-gboolean - -g_settings_get_has_unapplied () -
-GSettings * - -g_settings_get_child () -
-void - -g_settings_reset () -
-GVariant * - -g_settings_get_user_value () -
-GVariant * - -g_settings_get_default_value () -
const gchar * const * - -g_settings_list_schemas () -
const gchar * const * - -g_settings_list_relocatable_schemas () -
-gchar ** - -g_settings_list_keys () -
-gchar ** - -g_settings_list_children () -
-GVariant * - -g_settings_get_range () -
-gboolean - -g_settings_range_check () -
-void - -g_settings_get () -
-gboolean - -g_settings_set () -
-gboolean - -g_settings_get_boolean () -
-gboolean - -g_settings_set_boolean () -
-gint - -g_settings_get_int () -
-gboolean - -g_settings_set_int () -
-gint64 - -g_settings_get_int64 () -
-gboolean - -g_settings_set_int64 () -
-guint - -g_settings_get_uint () -
-gboolean - -g_settings_set_uint () -
-guint64 - -g_settings_get_uint64 () -
-gboolean - -g_settings_set_uint64 () -
-gdouble - -g_settings_get_double () -
-gboolean - -g_settings_set_double () -
-gchar * - -g_settings_get_string () -
-gboolean - -g_settings_set_string () -
-gchar ** - -g_settings_get_strv () -
-gboolean - -g_settings_set_strv () -
-gint - -g_settings_get_enum () -
-gboolean - -g_settings_set_enum () -
-guint - -g_settings_get_flags () -
-gboolean - -g_settings_set_flags () -
-gboolean - -(*GSettingsGetMapping) () -
-gpointer - -g_settings_get_mapped () -
-void - -g_settings_bind () -
-void - -g_settings_bind_with_mapping () -
-void - -g_settings_bind_writable () -
-void - -g_settings_unbind () -
-GVariant * - -(*GSettingsBindSetMapping) () -
-gboolean - -(*GSettingsBindGetMapping) () -
-GAction * - -g_settings_create_action () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GSettingsBackend *backendRead / Write / Construct Only
gbooleandelay-applyRead
gbooleanhas-unappliedRead
-gchar *pathRead / Write / Construct Only
-gchar *schemaRead / Write / Construct Only
-gchar *schema-idRead / Write / Construct Only
-GSettingsSchema *settings-schemaRead / Write / Construct Only
-
-
-

Signals

- -
-
-

Types and Values

-
---- - - - - - - - - - - -
 GSettings
enumGSettingsBindFlags
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSettings
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

The GSettings class provides a convenient API for storing and retrieving -application settings.

-

Reads and writes can be considered to be non-blocking. Reading -settings with GSettings is typically extremely fast: on -approximately the same order of magnitude (but slower than) a -GHashTable lookup. Writing settings is also extremely fast in terms -of time to return to your application, but can be extremely expensive -for other threads and other processes. Many settings backends -(including dconf) have lazy initialisation which means in the common -case of the user using their computer without modifying any settings -a lot of work can be avoided. For dconf, the D-Bus service doesn't -even need to be started in this case. For this reason, you should -only ever modify GSettings keys in response to explicit user action. -Particular care should be paid to ensure that modifications are not -made during startup -- for example, when setting the initial value -of preferences widgets. The built-in g_settings_bind() functionality -is careful not to write settings in response to notify signals as a -result of modifications that it makes to widgets.

-

When creating a GSettings instance, you have to specify a schema -that describes the keys in your settings and their types and default -values, as well as some other information.

-

Normally, a schema has as fixed path that determines where the settings -are stored in the conceptual global tree of settings. However, schemas -can also be 'relocatable', i.e. not equipped with -a fixed path. This is -useful e.g. when the schema describes an 'account', and you want to be -able to store a arbitrary number of accounts.

-

Paths must start with and end with a forward slash character ('/') -and must not contain two sequential slash characters. Paths should -be chosen based on a domain name associated with the program or -library to which the settings belong. Examples of paths are -"/org/gtk/settings/file-chooser/" and "/ca/desrt/dconf-editor/". -Paths should not start with "/apps/", "/desktop/" or "/system/" as -they often did in GConf.

-

Unlike other configuration systems (like GConf), GSettings does not -restrict keys to basic types like strings and numbers. GSettings stores -values as GVariant, and allows any GVariantType for keys. Key names -are restricted to lowercase characters, numbers and '-'. Furthermore, -the names must begin with a lowercase character, must not end -with a '-', and must not contain consecutive dashes.

-

Similar to GConf, the default values in GSettings schemas can be -localized, but the localized values are stored in gettext catalogs -and looked up with the domain that is specified in the -gettext-domain attribute of the <schemalist> or <schema> -elements and the category that is specified in the l10n attribute of -the <default> element. The string which is translated includes all text in -the <default> element, including any surrounding quotation marks.

-

The l10n attribute must be set to messages or time, and sets the -locale category for -translation. -The messages category should be used by default; use time for -translatable date or time formats. A translation comment can be added as an -XML comment immediately above the <default> element — it is recommended to -add these comments to aid translators understand the meaning and -implications of the default value. An optional translation context -attribute can be set on the <default> element to disambiguate multiple -defaults which use the same string.

-

For example:

-
- - - - - - - -
1
-2
-3
-4
<!-- Translators: A list of words which are not allowed to be typed, in
-     GVariant serialization syntax.
-     See: https://developer.gnome.org/glib/stable/gvariant-text.html -->
-<default l10n='messages' context='Banned words'>['bad', 'words']</default>
-
- -

-

Translations of default values must remain syntactically valid serialized -GVariants (e.g. retaining any surrounding quotation marks) or runtime -errors will occur.

-

GSettings uses schemas in a compact binary form that is created -by the glib-compile-schemas -utility. The input is a schema description in an XML format.

-

A DTD for the gschema XML format can be found here: -gschema.dtd

-

The glib-compile-schemas tool expects schema -files to have the extension .gschema.xml.

-

At runtime, schemas are identified by their id (as specified in the -id attribute of the <schema> element). The convention for schema -ids is to use a dotted name, similar in style to a D-Bus bus name, -e.g. "org.gnome.SessionManager". In particular, if the settings are -for a specific service that owns a D-Bus bus name, the D-Bus bus name -and schema id should match. For schemas which deal with settings not -associated with one named application, the id should not use -StudlyCaps, e.g. "org.gnome.font-rendering".

-

In addition to GVariant types, keys can have types that have -enumerated types. These can be described by a <choice>, -<enum> or <flags> element, as seen in the -example. The underlying type of such a key -is string, but you can use g_settings_get_enum(), g_settings_set_enum(), -g_settings_get_flags(), g_settings_set_flags() access the numeric values -corresponding to the string value of enum and flags keys.

-

An example for default value:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
<schemalist>
-  <schema id="org.gtk.Test" path="/org/gtk/Test/" gettext-domain="test">
-
-    <key name="greeting" type="s">
-      <default l10n="messages">"Hello, earthlings"</default>
-      <summary>A greeting</summary>
-      <description>
-        Greeting of the invading martians
-      </description>
-    </key>
-
-    <key name="box" type="(ii)">
-      <default>(20,30)</default>
-    </key>
-
-  </schema>
-</schemalist>
-
- -

-

An example for ranges, choices and enumerated types:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
<schemalist>
-
-  <enum id="org.gtk.Test.myenum">
-    <value nick="first" value="1"/>
-    <value nick="second" value="2"/>
-  </enum>
-
-  <flags id="org.gtk.Test.myflags">
-    <value nick="flag1" value="1"/>
-    <value nick="flag2" value="2"/>
-    <value nick="flag3" value="4"/>
-  </flags>
-
-  <schema id="org.gtk.Test">
-
-    <key name="key-with-range" type="i">
-      <range min="1" max="100"/>
-      <default>10</default>
-    </key>
-
-    <key name="key-with-choices" type="s">
-      <choices>
-        <choice value='Elisabeth'/>
-        <choice value='Annabeth'/>
-        <choice value='Joe'/>
-      </choices>
-      <aliases>
-        <alias value='Anna' target='Annabeth'/>
-        <alias value='Beth' target='Elisabeth'/>
-      </aliases>
-      <default>'Joe'</default>
-    </key>
-
-    <key name='enumerated-key' enum='org.gtk.Test.myenum'>
-      <default>'first'</default>
-    </key>
-
-    <key name='flags-key' flags='org.gtk.Test.myflags'>
-      <default>["flag1","flag2"]</default>
-    </key>
-  </schema>
-</schemalist>
-
- -

-
-

Vendor overrides

-

Default values are defined in the schemas that get installed by -an application. Sometimes, it is necessary for a vendor or distributor -to adjust these defaults. Since patching the XML source for the schema -is inconvenient and error-prone, -glib-compile-schemas reads so-called vendor -override' files. These are keyfiles in the same directory as the XML -schema sources which can override default values. The schema id serves -as the group name in the key file, and the values are expected in -serialized GVariant form, as in the following example:

-
- - - - - - - -
1
-2
-3
[org.gtk.Example]
-key1='string'
-key2=1.5
-
- -

-

glib-compile-schemas expects schema files to have the extension -.gschema.override.

-
-
-

Binding

-

A very convenient feature of GSettings lets you bind GObject properties -directly to settings, using g_settings_bind(). Once a GObject property -has been bound to a setting, changes on either side are automatically -propagated to the other side. GSettings handles details like mapping -between GObject and GVariant types, and preventing infinite cycles.

-

This makes it very easy to hook up a preferences dialog to the -underlying settings. To make this even more convenient, GSettings -looks for a boolean property with the name "sensitivity" and -automatically binds it to the writability of the bound setting. -If this 'magic' gets in the way, it can be suppressed with the -G_SETTINGS_BIND_NO_SENSITIVITY flag.

-
-
-

Relocatable schemas

-

A relocatable schema is one with no path attribute specified on its -<schema> element. By using g_settings_new_with_path(), a GSettings object -can be instantiated for a relocatable schema, assigning a path to the -instance. Paths passed to g_settings_new_with_path() will typically be -constructed dynamically from a constant prefix plus some form of instance -identifier; but they must still be valid GSettings paths. Paths could also -be constant and used with a globally installed schema originating from a -dependency library.

-

For example, a relocatable schema could be used to store geometry information -for different windows in an application. If the schema ID was -org.foo.MyApp.Window, it could be instantiated for paths -/org/foo/MyApp/main/, /org/foo/MyApp/document-1/, -/org/foo/MyApp/document-2/, etc. If any of the paths are well-known -they can be specified as <child> elements in the parent schema, e.g.:

-
- - - - - - - -
1
-2
-3
<schema id="org.foo.MyApp" path="/org/foo/MyApp/">
-  <child name="main" schema="org.foo.MyApp.Window"/>
-</schema>
-
- -

-
-
-

Build system integration

-

GSettings comes with autotools integration to simplify compiling and -installing schemas. To add GSettings support to an application, add the -following to your configure.ac:

-
- - - - - - - -
1
GLIB_GSETTINGS
-
- -

-

In the appropriate Makefile.am, use the following snippet to compile and -install the named schema:

-
- - - - - - - -
1
-2
-3
-4
gsettings_SCHEMAS = org.foo.MyApp.gschema.xml
-EXTRA_DIST = $(gsettings_SCHEMAS)
-
-@GSETTINGS_RULES@
-
- -

-

No changes are needed to the build system to mark a schema XML file for -translation. Assuming it sets the gettext-domain attribute, a schema may -be marked for translation by adding it to POTFILES.in, assuming gettext -0.19 is in use (the preferred method for translation):

-
- - - - - - - -
1
data/org.foo.MyApp.gschema.xml
-
- -

-

Alternatively, if intltool 0.50.1 is in use:

-
- - - - - - - -
1
[type: gettext/gsettings]data/org.foo.MyApp.gschema.xml
-
- -

-

GSettings will use gettext to look up translations for the <summary> and -<description> elements, and also any <default> elements which have a l10n -attribute set. Translations must not be included in the .gschema.xml file -by the build system, for example by using intltool XML rules with a -.gschema.xml.in template.

-

If an enumerated type defined in a C header file is to be used in a GSettings -schema, it can either be defined manually using an <enum> element in the -schema XML, or it can be extracted automatically from the C header. This -approach is preferred, as it ensures the two representations are always -synchronised. To do so, add the following to the relevant Makefile.am:

-
- - - - - - - -
1
-2
gsettings_ENUM_NAMESPACE = org.foo.MyApp
-gsettings_ENUM_FILES = my-app-enums.h my-app-misc.h
-
- -

-

gsettings_ENUM_NAMESPACE specifies the schema namespace for the enum files, -which are specified in gsettings_ENUM_FILES. This will generate a -org.foo.MyApp.enums.xml file containing the extracted enums, which will be -automatically included in the schema compilation, install and uninstall -rules. It should not be committed to version control or included in -EXTRA_DIST.

-
-
-
-

Functions

-
-

g_settings_new ()

-
GSettings *
-g_settings_new (const gchar *schema_id);
-

Creates a new GSettings object with the schema specified by -schema_id -.

-

Signals on the newly created GSettings object will be dispatched -via the thread-default GMainContext in effect at the time of the -call to g_settings_new(). The new GSettings will hold a reference -on the context. See g_main_context_push_thread_default().

-
-

Parameters

-
----- - - - - - -

schema_id

the id of the schema

 
-
-
-

Returns

-

a new GSettings object

-
-

Since: 2.26

-
-
-
-

g_settings_new_with_path ()

-
GSettings *
-g_settings_new_with_path (const gchar *schema_id,
-                          const gchar *path);
-

Creates a new GSettings object with the relocatable schema specified -by schema_id - and a given path.

-

You only need to do this if you want to directly create a settings -object with a schema that doesn't have a specified path of its own. -That's quite rare.

-

It is a programmer error to call this function for a schema that -has an explicitly specified path.

-

It is a programmer error if path - is not a valid path. A valid path -begins and ends with '/' and does not contain two consecutive '/' -characters.

-
-

Parameters

-
----- - - - - - - - - - - - - -

schema_id

the id of the schema

 

path

the path to use

 
-
-
-

Returns

-

a new GSettings object

-
-

Since: 2.26

-
-
-
-

g_settings_new_with_backend ()

-
GSettings *
-g_settings_new_with_backend (const gchar *schema_id,
-                             GSettingsBackend *backend);
-

Creates a new GSettings object with the schema specified by -schema_id - and a given GSettingsBackend.

-

Creating a GSettings object with a different backend allows accessing -settings from a database other than the usual one. For example, it may make -sense to pass a backend corresponding to the "defaults" settings database on -the system to get a settings object that modifies the system default -settings instead of the settings for this user.

-
-

Parameters

-
----- - - - - - - - - - - - - -

schema_id

the id of the schema

 

backend

the GSettingsBackend to use

 
-
-
-

Returns

-

a new GSettings object

-
-

Since: 2.26

-
-
-
-

g_settings_new_with_backend_and_path ()

-
GSettings *
-g_settings_new_with_backend_and_path (const gchar *schema_id,
-                                      GSettingsBackend *backend,
-                                      const gchar *path);
-

Creates a new GSettings object with the schema specified by -schema_id - and a given GSettingsBackend and path.

-

This is a mix of g_settings_new_with_backend() and -g_settings_new_with_path().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

schema_id

the id of the schema

 

backend

the GSettingsBackend to use

 

path

the path to use

 
-
-
-

Returns

-

a new GSettings object

-
-

Since: 2.26

-
-
-
-

g_settings_new_full ()

-
GSettings *
-g_settings_new_full (GSettingsSchema *schema,
-                     GSettingsBackend *backend,
-                     const gchar *path);
-

Creates a new GSettings object with a given schema, backend and -path.

-

It should be extremely rare that you ever want to use this function. -It is made available for advanced use-cases (such as plugin systems -that want to provide access to schemas loaded from custom locations, -etc).

-

At the most basic level, a GSettings object is a pure composition of -4 things: a GSettingsSchema, a GSettingsBackend, a path within that -backend, and a GMainContext to which signals are dispatched.

-

This constructor therefore gives you full control over constructing -GSettings instances. The first 3 parameters are given directly as -schema -, backend - and path -, and the main context is taken from the -thread-default (as per g_settings_new()).

-

If backend - is NULL then the default backend is used.

-

If path - is NULL then the path from the schema is used. It is an -error if path - is NULL and the schema has no path of its own or if -path - is non-NULL and not equal to the path that the schema does -have.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

schema

a GSettingsSchema

 

backend

a GSettingsBackend.

[nullable]

path

the path to use.

[nullable]
-
-
-

Returns

-

a new GSettings object

-
-

Since: 2.32

-
-
-
-

g_settings_sync ()

-
void
-g_settings_sync (void);
-

Ensures that all pending operations for the given are complete for -the default backend.

-

Writes made to a GSettings are handled asynchronously. For this -reason, it is very unlikely that the changes have it to disk by the -time g_settings_set() returns.

-

This call will block until all of the writes have made it to the -backend. Since the mainloop is not running, no change notifications -will be dispatched during this call (but some may be queued by the -time the call is done).

-
-
-
-

g_settings_get_value ()

-
GVariant *
-g_settings_get_value (GSettings *settings,
-                      const gchar *key);
-

Gets the value that is stored in settings - for key -.

-

It is a programmer error to give a key - that isn't contained in the -schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to get the value for

 
-
-
-

Returns

-

a new GVariant

-
-

Since: 2.26

-
-
-
-

g_settings_set_value ()

-
gboolean
-g_settings_set_value (GSettings *settings,
-                      const gchar *key,
-                      GVariant *value);
-

Sets key - in settings - to value -.

-

It is a programmer error to give a key - that isn't contained in the -schema for settings - or for value - to have the incorrect type, per -the schema.

-

If value - is floating then this function consumes the reference.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

the name of the key to set

 

value

a GVariant of the correct type

 
-
-
-

Returns

-

TRUE if setting the key succeeded, -FALSE if the key was not writable

-
-

Since: 2.26

-
-
-
-

g_settings_is_writable ()

-
gboolean
-g_settings_is_writable (GSettings *settings,
-                        const gchar *name);
-

Finds out if a key can be written or not

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings object

 

name

the name of a key

 
-
-
-

Returns

-

TRUE if the key name -is writable

-
-

Since: 2.26

-
-
-
-

g_settings_delay ()

-
void
-g_settings_delay (GSettings *settings);
-

Changes the GSettings object into 'delay-apply' mode. In this -mode, changes to settings - are not immediately propagated to the -backend, but kept locally until g_settings_apply() is called.

-
-

Parameters

-
----- - - - - - -

settings

a GSettings object

 
-
-

Since: 2.26

-
-
-
-

g_settings_apply ()

-
void
-g_settings_apply (GSettings *settings);
-

Applies any changes that have been made to the settings. This -function does nothing unless settings - is in 'delay-apply' mode; -see g_settings_delay(). In the normal case settings are always -applied immediately.

-
-

Parameters

-
----- - - - - - -

settings

a GSettings instance

 
-
-
-
-
-

g_settings_revert ()

-
void
-g_settings_revert (GSettings *settings);
-

Reverts all non-applied changes to the settings. This function -does nothing unless settings - is in 'delay-apply' mode; see -g_settings_delay(). In the normal case settings are always applied -immediately.

-

Change notifications will be emitted for affected keys.

-
-

Parameters

-
----- - - - - - -

settings

a GSettings instance

 
-
-
-
-
-

g_settings_get_has_unapplied ()

-
gboolean
-g_settings_get_has_unapplied (GSettings *settings);
-

Returns whether the GSettings object has any unapplied -changes. This can only be the case if it is in 'delayed-apply' mode.

-
-

Parameters

-
----- - - - - - -

settings

a GSettings object

 
-
-
-

Returns

-

TRUE if settings -has unapplied changes

-
-

Since: 2.26

-
-
-
-

g_settings_get_child ()

-
GSettings *
-g_settings_get_child (GSettings *settings,
-                      const gchar *name);
-

Creates a child settings object which has a base path of -base-path/@name, where base-path is the base path of -settings -.

-

The schema for the child settings object must have been declared -in the schema of settings - using a <child> element.

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings object

 

name

the name of the child schema

 
-
-
-

Returns

-

a 'child' settings object.

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_settings_reset ()

-
void
-g_settings_reset (GSettings *settings,
-                  const gchar *key);
-

Resets key - to its default value.

-

This call resets the key, as much as possible, to its default value. -That might the value specified in the schema or the one set by the -administrator.

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings object

 

key

the name of a key

 
-
-
-
-
-

g_settings_get_user_value ()

-
GVariant *
-g_settings_get_user_value (GSettings *settings,
-                           const gchar *key);
-

Checks the "user value" of a key, if there is one.

-

The user value of a key is the last value that was set by the user.

-

After calling g_settings_reset() this function should always return -NULL (assuming something is not wrong with the system -configuration).

-

It is possible that g_settings_get_value() will return a different -value than this function. This can happen in the case that the user -set a value for a key that was subsequently locked down by the system -administrator -- this function will return the user's old value.

-

This function may be useful for adding a "reset" option to a UI or -for providing indication that a particular value has been changed.

-

It is a programmer error to give a key - that isn't contained in the -schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to get the user value for

 
-
-
-

Returns

-

the user's value, if set.

-

[nullable][transfer full]

-
-

Since: 2.40

-
-
-
-

g_settings_get_default_value ()

-
GVariant *
-g_settings_get_default_value (GSettings *settings,
-                              const gchar *key);
-

Gets the "default value" of a key.

-

This is the value that would be read if g_settings_reset() were to be -called on the key.

-

Note that this may be a different value than returned by -g_settings_schema_key_get_default_value() if the system administrator -has provided a default value.

-

Comparing the return values of g_settings_get_default_value() and -g_settings_get_value() is not sufficient for determining if a value -has been set because the user may have explicitly set the value to -something that happens to be equal to the default. The difference -here is that if the default changes in the future, the user's key -will still be set.

-

This function may be useful for adding an indication to a UI of what -the default value was before the user set it.

-

It is a programmer error to give a key - that isn't contained in the -schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to get the default value for

 
-
-
-

Returns

-

the default value.

-

[nullable][transfer full]

-
-

Since: 2.40

-
-
-
-

g_settings_list_schemas ()

-
const gchar * const *
-g_settings_list_schemas (void);
-
-

g_settings_list_schemas has been deprecated since version 2.40 and should not be used in newly-written code.

-

Use g_settings_schema_source_list_schemas() instead. -If you used g_settings_list_schemas() to check for the presence of -a particular schema, use g_settings_schema_source_lookup() instead -of your whole loop.

-
-

<!-- -->

-
-

Returns

-

a list of GSettings -schemas that are available. The list must not be modified or -freed.

-

[element-type utf8][transfer none]

-
-

Since: 2.26

-
-
-
-

g_settings_list_relocatable_schemas ()

-
const gchar * const *
-g_settings_list_relocatable_schemas (void);
-
-

g_settings_list_relocatable_schemas has been deprecated since version 2.40 and should not be used in newly-written code.

-

Use g_settings_schema_source_list_schemas() instead

-
-

<!-- -->

-
-

Returns

-

a list of relocatable -GSettings schemas that are available. The list must not be -modified or freed.

-

[element-type utf8][transfer none]

-
-

Since: 2.28

-
-
-
-

g_settings_list_keys ()

-
gchar **
-g_settings_list_keys (GSettings *settings);
-

g_settings_list_keys is deprecated and should not be used in newly-written code.

-

Introspects the list of keys on settings -.

-

You should probably not be calling this function from "normal" code -(since you should already know what keys are in your schema). This -function is intended for introspection reasons.

-

You should free the return value with g_strfreev() when you are done -with it.

-
-

Parameters

-
----- - - - - - -

settings

a GSettings object

 
-
-
-

Returns

-

a list of the keys on settings -.

-

[transfer full][element-type utf8]

-
-
-
-
-

g_settings_list_children ()

-
gchar **
-g_settings_list_children (GSettings *settings);
-

Gets the list of children on settings -.

-

The list is exactly the list of strings for which it is not an error -to call g_settings_get_child().

-

For GSettings objects that are lists, this value can change at any -time and you should connect to the "children-changed" signal to watch -for those changes. Note that there is a race condition here: you may -request a child after listing it only for it to have been destroyed -in the meantime. For this reason, g_settings_get_child() may return -NULL even for a child that was listed by this function.

-

For GSettings objects that are not lists, you should probably not be -calling this function from "normal" code (since you should already -know what children are in your schema). This function may still be -useful there for introspection reasons, however.

-

You should free the return value with g_strfreev() when you are done -with it.

-
-

Parameters

-
----- - - - - - -

settings

a GSettings object

 
-
-
-

Returns

-

a list of the children on settings -.

-

[transfer full][element-type utf8]

-
-
-
-
-

g_settings_get_range ()

-
GVariant *
-g_settings_get_range (GSettings *settings,
-                      const gchar *key);
-
-

g_settings_get_range has been deprecated since version 2.40 and should not be used in newly-written code.

-

Use g_settings_schema_key_get_range() instead.

-
-

Queries the range of a key.

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings

 

key

the key to query the range of

 
-
-

Since: 2.28

-
-
-
-

g_settings_range_check ()

-
gboolean
-g_settings_range_check (GSettings *settings,
-                        const gchar *key,
-                        GVariant *value);
-
-

g_settings_range_check has been deprecated since version 2.40 and should not be used in newly-written code.

-

Use g_settings_schema_key_range_check() instead.

-
-

Checks if the given value - is of the correct type and within the -permitted range for key -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

settings

a GSettings

 

key

the key to check

 

value

the value to check

 
-
-
-

Returns

-

TRUE if value -is valid for key -

-
-

Since: 2.28

-
-
-
-

g_settings_get ()

-
void
-g_settings_get (GSettings *settings,
-                const gchar *key,
-                const gchar *format,
-                ...);
-

Gets the value that is stored at key - in settings -.

-

A convenience function that combines g_settings_get_value() with -g_variant_get().

-

It is a programmer error to give a key - that isn't contained in the -schema for settings - or for the GVariantType of format - to mismatch -the type given in the schema.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to get the value for

 

format

a GVariant format string

 

...

arguments as per format -

 
-
-

Since: 2.26

-
-
-
-

g_settings_set ()

-
gboolean
-g_settings_set (GSettings *settings,
-                const gchar *key,
-                const gchar *format,
-                ...);
-

Sets key - in settings - to value -.

-

A convenience function that combines g_settings_set_value() with -g_variant_new().

-

It is a programmer error to give a key - that isn't contained in the -schema for settings - or for the GVariantType of format - to mismatch -the type given in the schema.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

the name of the key to set

 

format

a GVariant format string

 

...

arguments as per format -

 
-
-
-

Returns

-

TRUE if setting the key succeeded, -FALSE if the key was not writable

-
-

Since: 2.26

-
-
-
-

g_settings_get_boolean ()

-
gboolean
-g_settings_get_boolean (GSettings *settings,
-                        const gchar *key);
-

Gets the value that is stored at key - in settings -.

-

A convenience variant of g_settings_get() for booleans.

-

It is a programmer error to give a key - that isn't specified as -having a boolean type in the schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to get the value for

 
-
-
-

Returns

-

a boolean

-
-

Since: 2.26

-
-
-
-

g_settings_set_boolean ()

-
gboolean
-g_settings_set_boolean (GSettings *settings,
-                        const gchar *key,
-                        gboolean value);
-

Sets key - in settings - to value -.

-

A convenience variant of g_settings_set() for booleans.

-

It is a programmer error to give a key - that isn't specified as -having a boolean type in the schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

the name of the key to set

 

value

the value to set it to

 
-
-
-

Returns

-

TRUE if setting the key succeeded, -FALSE if the key was not writable

-
-

Since: 2.26

-
-
-
-

g_settings_get_int ()

-
gint
-g_settings_get_int (GSettings *settings,
-                    const gchar *key);
-

Gets the value that is stored at key - in settings -.

-

A convenience variant of g_settings_get() for 32-bit integers.

-

It is a programmer error to give a key - that isn't specified as -having a int32 type in the schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to get the value for

 
-
-
-

Returns

-

an integer

-
-

Since: 2.26

-
-
-
-

g_settings_set_int ()

-
gboolean
-g_settings_set_int (GSettings *settings,
-                    const gchar *key,
-                    gint value);
-

Sets key - in settings - to value -.

-

A convenience variant of g_settings_set() for 32-bit integers.

-

It is a programmer error to give a key - that isn't specified as -having a int32 type in the schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

the name of the key to set

 

value

the value to set it to

 
-
-
-

Returns

-

TRUE if setting the key succeeded, -FALSE if the key was not writable

-
-

Since: 2.26

-
-
-
-

g_settings_get_int64 ()

-
gint64
-g_settings_get_int64 (GSettings *settings,
-                      const gchar *key);
-

Gets the value that is stored at key - in settings -.

-

A convenience variant of g_settings_get() for 64-bit integers.

-

It is a programmer error to give a key - that isn't specified as -having a int64 type in the schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to get the value for

 
-
-
-

Returns

-

a 64-bit integer

-
-

Since: 2.50

-
-
-
-

g_settings_set_int64 ()

-
gboolean
-g_settings_set_int64 (GSettings *settings,
-                      const gchar *key,
-                      gint64 value);
-

Sets key - in settings - to value -.

-

A convenience variant of g_settings_set() for 64-bit integers.

-

It is a programmer error to give a key - that isn't specified as -having a int64 type in the schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

the name of the key to set

 

value

the value to set it to

 
-
-
-

Returns

-

TRUE if setting the key succeeded, -FALSE if the key was not writable

-
-

Since: 2.50

-
-
-
-

g_settings_get_uint ()

-
guint
-g_settings_get_uint (GSettings *settings,
-                     const gchar *key);
-

Gets the value that is stored at key - in settings -.

-

A convenience variant of g_settings_get() for 32-bit unsigned -integers.

-

It is a programmer error to give a key - that isn't specified as -having a uint32 type in the schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to get the value for

 
-
-
-

Returns

-

an unsigned integer

-
-

Since: 2.30

-
-
-
-

g_settings_set_uint ()

-
gboolean
-g_settings_set_uint (GSettings *settings,
-                     const gchar *key,
-                     guint value);
-

Sets key - in settings - to value -.

-

A convenience variant of g_settings_set() for 32-bit unsigned -integers.

-

It is a programmer error to give a key - that isn't specified as -having a uint32 type in the schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

the name of the key to set

 

value

the value to set it to

 
-
-
-

Returns

-

TRUE if setting the key succeeded, -FALSE if the key was not writable

-
-

Since: 2.30

-
-
-
-

g_settings_get_uint64 ()

-
guint64
-g_settings_get_uint64 (GSettings *settings,
-                       const gchar *key);
-

Gets the value that is stored at key - in settings -.

-

A convenience variant of g_settings_get() for 64-bit unsigned -integers.

-

It is a programmer error to give a key - that isn't specified as -having a uint64 type in the schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to get the value for

 
-
-
-

Returns

-

a 64-bit unsigned integer

-
-

Since: 2.50

-
-
-
-

g_settings_set_uint64 ()

-
gboolean
-g_settings_set_uint64 (GSettings *settings,
-                       const gchar *key,
-                       guint64 value);
-

Sets key - in settings - to value -.

-

A convenience variant of g_settings_set() for 64-bit unsigned -integers.

-

It is a programmer error to give a key - that isn't specified as -having a uint64 type in the schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

the name of the key to set

 

value

the value to set it to

 
-
-
-

Returns

-

TRUE if setting the key succeeded, -FALSE if the key was not writable

-
-

Since: 2.50

-
-
-
-

g_settings_get_double ()

-
gdouble
-g_settings_get_double (GSettings *settings,
-                       const gchar *key);
-

Gets the value that is stored at key - in settings -.

-

A convenience variant of g_settings_get() for doubles.

-

It is a programmer error to give a key - that isn't specified as -having a 'double' type in the schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to get the value for

 
-
-
-

Returns

-

a double

-
-

Since: 2.26

-
-
-
-

g_settings_set_double ()

-
gboolean
-g_settings_set_double (GSettings *settings,
-                       const gchar *key,
-                       gdouble value);
-

Sets key - in settings - to value -.

-

A convenience variant of g_settings_set() for doubles.

-

It is a programmer error to give a key - that isn't specified as -having a 'double' type in the schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

the name of the key to set

 

value

the value to set it to

 
-
-
-

Returns

-

TRUE if setting the key succeeded, -FALSE if the key was not writable

-
-

Since: 2.26

-
-
-
-

g_settings_get_string ()

-
gchar *
-g_settings_get_string (GSettings *settings,
-                       const gchar *key);
-

Gets the value that is stored at key - in settings -.

-

A convenience variant of g_settings_get() for strings.

-

It is a programmer error to give a key - that isn't specified as -having a string type in the schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to get the value for

 
-
-
-

Returns

-

a newly-allocated string

-
-

Since: 2.26

-
-
-
-

g_settings_set_string ()

-
gboolean
-g_settings_set_string (GSettings *settings,
-                       const gchar *key,
-                       const gchar *value);
-

Sets key - in settings - to value -.

-

A convenience variant of g_settings_set() for strings.

-

It is a programmer error to give a key - that isn't specified as -having a string type in the schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

the name of the key to set

 

value

the value to set it to

 
-
-
-

Returns

-

TRUE if setting the key succeeded, -FALSE if the key was not writable

-
-

Since: 2.26

-
-
-
-

g_settings_get_strv ()

-
gchar **
-g_settings_get_strv (GSettings *settings,
-                     const gchar *key);
-

A convenience variant of g_settings_get() for string arrays.

-

It is a programmer error to give a key - that isn't specified as -having an array of strings type in the schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to get the value for

 
-
-
-

Returns

-

a -newly-allocated, NULL-terminated array of strings, the value that -is stored at key -in settings -.

-

[array zero-terminated=1][transfer full]

-
-

Since: 2.26

-
-
-
-

g_settings_set_strv ()

-
gboolean
-g_settings_set_strv (GSettings *settings,
-                     const gchar *key,
-                     const gchar *const *value);
-

Sets key - in settings - to value -.

-

A convenience variant of g_settings_set() for string arrays. If -value - is NULL, then key - is set to be the empty array.

-

It is a programmer error to give a key - that isn't specified as -having an array of strings type in the schema for settings -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

the name of the key to set

 

value

the value to set it to, or NULL.

[nullable][array zero-terminated=1]
-
-
-

Returns

-

TRUE if setting the key succeeded, -FALSE if the key was not writable

-
-

Since: 2.26

-
-
-
-

g_settings_get_enum ()

-
gint
-g_settings_get_enum (GSettings *settings,
-                     const gchar *key);
-

Gets the value that is stored in settings - for key - and converts it -to the enum value that it represents.

-

In order to use this function the type of the value must be a string -and it must be marked in the schema file as an enumerated type.

-

It is a programmer error to give a key - that isn't contained in the -schema for settings - or is not marked as an enumerated type.

-

If the value stored in the configuration database is not a valid -value for the enumerated type then this function will return the -default value.

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to get the value for

 
-
-
-

Returns

-

the enum value

-
-

Since: 2.26

-
-
-
-

g_settings_set_enum ()

-
gboolean
-g_settings_set_enum (GSettings *settings,
-                     const gchar *key,
-                     gint value);
-

Looks up the enumerated type nick for value - and writes it to key -, -within settings -.

-

It is a programmer error to give a key - that isn't contained in the -schema for settings - or is not marked as an enumerated type, or for -value - not to be a valid value for the named type.

-

After performing the write, accessing key - directly with -g_settings_get_string() will return the 'nick' associated with -value -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

a key, within settings -

 

value

an enumerated value

 
-
-
-

Returns

-

TRUE, if the set succeeds

-
-
-
-
-

g_settings_get_flags ()

-
guint
-g_settings_get_flags (GSettings *settings,
-                      const gchar *key);
-

Gets the value that is stored in settings - for key - and converts it -to the flags value that it represents.

-

In order to use this function the type of the value must be an array -of strings and it must be marked in the schema file as an flags type.

-

It is a programmer error to give a key - that isn't contained in the -schema for settings - or is not marked as a flags type.

-

If the value stored in the configuration database is not a valid -value for the flags type then this function will return the default -value.

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to get the value for

 
-
-
-

Returns

-

the flags value

-
-

Since: 2.26

-
-
-
-

g_settings_set_flags ()

-
gboolean
-g_settings_set_flags (GSettings *settings,
-                      const gchar *key,
-                      guint value);
-

Looks up the flags type nicks for the bits specified by value -, puts -them in an array of strings and writes the array to key -, within -settings -.

-

It is a programmer error to give a key - that isn't contained in the -schema for settings - or is not marked as a flags type, or for value - -to contain any bits that are not value for the named type.

-

After performing the write, accessing key - directly with -g_settings_get_strv() will return an array of 'nicks'; one for each -bit in value -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

a key, within settings -

 

value

a flags value

 
-
-
-

Returns

-

TRUE, if the set succeeds

-
-
-
-
-

GSettingsGetMapping ()

-
gboolean
-(*GSettingsGetMapping) (GVariant *value,
-                        gpointer *result,
-                        gpointer user_data);
-

The type of the function that is used to convert from a value stored -in a GSettings to a value that is useful to the application.

-

If the value is successfully mapped, the result should be stored at -result - and TRUE returned. If mapping fails (for example, if value - -is not in the right format) then FALSE should be returned.

-

If value - is NULL then it means that the mapping function is being -given a "last chance" to successfully return a valid value. TRUE -must be returned in this case.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

value

the GVariant to map, or NULL

 

result

the result of the mapping.

[out]

user_data

the user data that was passed to -g_settings_get_mapped().

[closure]
-
-
-

Returns

-

TRUE if the conversion succeeded, FALSE in case of an error

-
-
-
-
-

g_settings_get_mapped ()

-
gpointer
-g_settings_get_mapped (GSettings *settings,
-                       const gchar *key,
-                       GSettingsGetMapping mapping,
-                       gpointer user_data);
-

Gets the value that is stored at key - in settings -, subject to -application-level validation/mapping.

-

You should use this function when the application needs to perform -some processing on the value of the key (for example, parsing). The -mapping - function performs that processing. If the function -indicates that the processing was unsuccessful (due to a parse error, -for example) then the mapping is tried again with another value.

-

This allows a robust 'fall back to defaults' behaviour to be -implemented somewhat automatically.

-

The first value that is tried is the user's setting for the key. If -the mapping function fails to map this value, other values may be -tried in an unspecified order (system or site defaults, translated -schema default values, untranslated schema default values, etc).

-

If the mapping function fails for all possible values, one additional -attempt is made: the mapping function is called with a NULL value. -If the mapping function still indicates failure at this point then -the application will be aborted.

-

The result parameter for the mapping - function is pointed to a -gpointer which is initially set to NULL. The same pointer is given -to each invocation of mapping -. The final value of that gpointer is -what is returned by this function. NULL is valid; it is returned -just as any other value would be.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to get the value for

 

mapping

the function to map the value in the -settings database to the value used by the application.

[scope call]

user_data

user data for mapping -

 
-
-
-

Returns

-

the result, which may be NULL.

-

[transfer full]

-
-
-
-
-

g_settings_bind ()

-
void
-g_settings_bind (GSettings *settings,
-                 const gchar *key,
-                 gpointer object,
-                 const gchar *property,
-                 GSettingsBindFlags flags);
-

Create a binding between the key - in the settings - object -and the property property - of object -.

-

The binding uses the default GIO mapping functions to map -between the settings and property values. These functions -handle booleans, numeric types and string types in a -straightforward way. Use g_settings_bind_with_mapping() if -you need a custom mapping, or map between types that are not -supported by the default mapping functions.

-

Unless the flags - include G_SETTINGS_BIND_NO_SENSITIVITY, this -function also establishes a binding between the writability of -key - and the "sensitive" property of object - (if object - has -a boolean property by that name). See g_settings_bind_writable() -for more details about writable bindings.

-

Note that the lifecycle of the binding is tied to the object, -and that you can have only one binding per object property. -If you bind the same property twice on the same object, the second -binding overrides the first one.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to bind

 

object

a GObject.

[type GObject.Object]

property

the name of the property to bind

 

flags

flags for the binding

 
-
-

Since: 2.26

-
-
-
-

g_settings_bind_with_mapping ()

-
void
-g_settings_bind_with_mapping (GSettings *settings,
-                              const gchar *key,
-                              gpointer object,
-                              const gchar *property,
-                              GSettingsBindFlags flags,
-                              GSettingsBindGetMapping get_mapping,
-                              GSettingsBindSetMapping set_mapping,
-                              gpointer user_data,
-                              GDestroyNotify destroy);
-

Create a binding between the key - in the settings - object -and the property property - of object -.

-

The binding uses the provided mapping functions to map between -settings and property values.

-

Note that the lifecycle of the binding is tied to the object, -and that you can have only one binding per object property. -If you bind the same property twice on the same object, the second -binding overrides the first one.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to bind

 

object

a GObject.

[type GObject.Object]

property

the name of the property to bind

 

flags

flags for the binding

 

get_mapping

a function that gets called to convert values -from settings -to object -, or NULL to use the default GIO mapping

 

set_mapping

a function that gets called to convert values -from object -to settings -, or NULL to use the default GIO mapping

 

user_data

data that gets passed to get_mapping -and set_mapping -

 

destroy

GDestroyNotify function for user_data -

 
-
-

Since: 2.26

-
-
-
-

g_settings_bind_writable ()

-
void
-g_settings_bind_writable (GSettings *settings,
-                          const gchar *key,
-                          gpointer object,
-                          const gchar *property,
-                          gboolean inverted);
-

Create a binding between the writability of key - in the -settings - object and the property property - of object -. -The property must be boolean; "sensitive" or "visible" -properties of widgets are the most likely candidates.

-

Writable bindings are always uni-directional; changes of the -writability of the setting will be propagated to the object -property, not the other way.

-

When the inverted - argument is TRUE, the binding inverts the -value as it passes from the setting to the object, i.e. property - -will be set to TRUE if the key is not writable.

-

Note that the lifecycle of the binding is tied to the object, -and that you can have only one binding per object property. -If you bind the same property twice on the same object, the second -binding overrides the first one.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

settings

a GSettings object

 

key

the key to bind

 

object

a GObject.

[type GObject.Object]

property

the name of a boolean property to bind

 

inverted

whether to 'invert' the value

 
-
-

Since: 2.26

-
-
-
-

g_settings_unbind ()

-
void
-g_settings_unbind (gpointer object,
-                   const gchar *property);
-

Removes an existing binding for property - on object -.

-

Note that bindings are automatically removed when the -object is finalized, so it is rarely necessary to call this -function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

object

the object.

[type GObject.Object]

property

the property whose binding is removed

 
-
-

Since: 2.26

-
-
-
-

GSettingsBindSetMapping ()

-
GVariant *
-(*GSettingsBindSetMapping) (const GValue *value,
-                            const GVariantType *expected_type,
-                            gpointer user_data);
-

The type for the function that is used to convert an object property -value to a GVariant for storing it in GSettings.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

value

a GValue containing the property value to map

 

expected_type

the GVariantType to create

 

user_data

user data that was specified when the binding was created

 
-
-
-

Returns

-

a new GVariant holding the data from value -, -or NULL in case of an error

-
-
-
-
-

GSettingsBindGetMapping ()

-
gboolean
-(*GSettingsBindGetMapping) (GValue *value,
-                            GVariant *variant,
-                            gpointer user_data);
-

The type for the function that is used to convert from GSettings to -an object property. The value - is already initialized to hold values -of the appropriate type.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

value

return location for the property value

 

variant

the GVariant

 

user_data

user data that was specified when the binding was created

 
-
-
-

Returns

-

TRUE if the conversion succeeded, FALSE in case of an error

-
-
-
-
-

g_settings_create_action ()

-
GAction *
-g_settings_create_action (GSettings *settings,
-                          const gchar *key);
-

Creates a GAction corresponding to a given GSettings key.

-

The action has the same name as the key.

-

The value of the key becomes the state of the action and the action -is enabled when the key is writable. Changing the state of the -action results in the key being written to. Changes to the value or -writability of the key cause appropriate change notifications to be -emitted for the action.

-

For boolean-valued keys, action activations take no parameter and -result in the toggling of the value. For all other types, -activations take the new value for the key (which must have the -correct type).

-
-

Parameters

-
----- - - - - - - - - - - - - -

settings

a GSettings

 

key

the name of a key in settings -

 
-
-
-

Returns

-

a new GAction.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

GSettings

-
typedef struct _GSettings GSettings;
-

GSettings is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

enum GSettingsBindFlags

-

Flags used when creating a binding. These flags determine in which -direction the binding works. The default is to synchronize in both -directions.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_SETTINGS_BIND_DEFAULT

-

Equivalent to G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET

-
 

G_SETTINGS_BIND_GET

-

Update the GObject property when the setting changes. - It is an error to use this flag if the property is not writable.

-
 

G_SETTINGS_BIND_SET

-

Update the setting when the GObject property changes. - It is an error to use this flag if the property is not readable.

-
 

G_SETTINGS_BIND_NO_SENSITIVITY

-

Do not try to bind a "sensitivity" property to the writability of the setting

-
 

G_SETTINGS_BIND_GET_NO_CHANGES

-

When set in addition to G_SETTINGS_BIND_GET, set the GObject property - value initially from the setting, but do not listen for changes of the setting

-
 

G_SETTINGS_BIND_INVERT_BOOLEAN

-

When passed to g_settings_bind(), uses a pair of mapping functions that invert - the boolean value when mapping between the setting and the property. The setting and property must both - be booleans. You cannot pass this flag to g_settings_bind_with_mapping().

-
 
-
-
-
-
-

Property Details

-
-

The “backend” property

-
  “backend”                  GSettingsBackend *
-

The GSettingsBackend for this settings object.

-

Flags: Read / Write / Construct Only

-
-
-
-

The “delay-apply” property

-
  “delay-apply”              gboolean
-

Whether the GSettings object is in 'delay-apply' mode. See -g_settings_delay() for details.

-

Flags: Read

-

Default value: FALSE

-

Since: 2.28

-
-
-
-

The “has-unapplied” property

-
  “has-unapplied”            gboolean
-

If this property is TRUE, the GSettings object has outstanding -changes that will be applied when g_settings_apply() is called.

-

Flags: Read

-

Default value: FALSE

-
-
-
-

The “path” property

-
  “path”                     gchar *
-

The path within the backend where the settings are stored.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
-

The “schema” property

-
  “schema”                   gchar *
-

The name of the schema that describes the types of keys -for this GSettings object.

-

The type of this property is *not* GSettingsSchema. -GSettingsSchema has only existed since version 2.32 and -unfortunately this name was used in previous versions to refer to -the schema ID rather than the schema itself. Take care to use the -'settings-schema' property if you wish to pass in a -GSettingsSchema.

-
-

GSettings:schema has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use the 'schema-id' property instead. In a future -version, this property may instead refer to a GSettingsSchema.

-
-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
-

The “schema-id” property

-
  “schema-id”                gchar *
-

The name of the schema that describes the types of keys -for this GSettings object.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
-

The “settings-schema” property

-
  “settings-schema”          GSettingsSchema *
-

The GSettingsSchema describing the types of keys for this -GSettings object.

-

Ideally, this property would be called 'schema'. GSettingsSchema -has only existed since version 2.32, however, and before then the -'schema' property was used to refer to the ID of the schema rather -than the schema itself. Take care.

-

Flags: Read / Write / Construct Only

-
-
-
-

Signal Details

-
-

The “change-event” signal

-
gboolean
-user_function (GSettings *settings,
-               gpointer   keys,
-               gint       n_keys,
-               gpointer   user_data)
-

The "change-event" signal is emitted once per change event that -affects this settings object. You should connect to this signal -only if you are interested in viewing groups of changes before they -are split out into multiple emissions of the "changed" signal. -For most use cases it is more appropriate to use the "changed" signal.

-

In the event that the change event applies to one or more specified -keys, keys - will be an array of GQuark of length n_keys -. In the -event that the change event applies to the GSettings object as a -whole (ie: potentially every key has been changed) then keys - will -be NULL and n_keys - will be 0.

-

The default handler for this signal invokes the "changed" signal -for each affected key. If any other connected handler returns -TRUE then this default functionality will be suppressed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

settings

the object on which the signal was emitted

 

keys

an array of GQuarks for the changed keys, or NULL.

[array length=n_keys][element-type GQuark][nullable]

n_keys

the length of the keys -array, or 0

 

user_data

user data set when the signal handler was connected.

 
-
-
-

Returns

-

TRUE to stop other handlers from being invoked for the -event. FALSE to propagate the event further.

-
-

Flags: Run Last

-
-
-
-

The “changed” signal

-
void
-user_function (GSettings *settings,
-               gchar     *key,
-               gpointer   user_data)
-

The "changed" signal is emitted when a key has potentially changed. -You should call one of the g_settings_get() calls to check the new -value.

-

This signal supports detailed connections. You can connect to the -detailed signal "changed::x" in order to only receive callbacks -when key "x" changes.

-

Note that settings - only emits this signal if you have read key - at -least once while a signal handler was already connected for key -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

settings

the object on which the signal was emitted

 

key

the name of the key that changed

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Has Details

-
-
-
-

The “writable-change-event” signal

-
gboolean
-user_function (GSettings *settings,
-               guint      key,
-               gpointer   user_data)
-

The "writable-change-event" signal is emitted once per writability -change event that affects this settings object. You should connect -to this signal if you are interested in viewing groups of changes -before they are split out into multiple emissions of the -"writable-changed" signal. For most use cases it is more -appropriate to use the "writable-changed" signal.

-

In the event that the writability change applies only to a single -key, key - will be set to the GQuark for that key. In the event -that the writability change affects the entire settings object, -key - will be 0.

-

The default handler for this signal invokes the "writable-changed" -and "changed" signals for each affected key. This is done because -changes in writability might also imply changes in value (if for -example, a new mandatory setting is introduced). If any other -connected handler returns TRUE then this default functionality -will be suppressed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

settings

the object on which the signal was emitted

 

key

the quark of the key, or 0

 

user_data

user data set when the signal handler was connected.

 
-
-
-

Returns

-

TRUE to stop other handlers from being invoked for the -event. FALSE to propagate the event further.

-
-

Flags: Run Last

-
-
-
-

The “writable-changed” signal

-
void
-user_function (GSettings *settings,
-               gchar     *key,
-               gpointer   user_data)
-

The "writable-changed" signal is emitted when the writability of a -key has potentially changed. You should call -g_settings_is_writable() in order to determine the new status.

-

This signal supports detailed connections. You can connect to the -detailed signal "writable-changed::x" in order to only receive -callbacks when the writability of "x" changes.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

settings

the object on which the signal was emitted

 

key

the key

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Has Details

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSettingsBackend.html b/docs/reference/gio/html/GSettingsBackend.html deleted file mode 100644 index 6050e44e9..000000000 --- a/docs/reference/gio/html/GSettingsBackend.html +++ /dev/null @@ -1,815 +0,0 @@ - - - - -GSettingsBackend: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSettingsBackend

-

GSettingsBackend — Interface for settings backend implementations

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GSettingsBackend * - -g_settings_backend_get_default () -
-void - -g_settings_backend_changed () -
-void - -g_settings_backend_path_changed () -
-void - -g_settings_backend_keys_changed () -
-void - -g_settings_backend_path_writable_changed () -
-void - -g_settings_backend_writable_changed () -
-void - -g_settings_backend_changed_tree () -
-void - -g_settings_backend_flatten_tree () -
-GSettingsBackend * - -g_keyfile_settings_backend_new () -
-GSettingsBackend * - -g_memory_settings_backend_new () -
-GSettingsBackend * - -g_null_settings_backend_new () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
 GSettingsBackend
structGSettingsBackendClass
#defineG_SETTINGS_BACKEND_EXTENSION_POINT_NAME
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSettingsBackend
-
-
-
-

Includes

-
#include <gio/gsettingsbackend.h>
-
-
-
-

Description

-

The GSettingsBackend interface defines a generic interface for -non-strictly-typed data that is stored in a hierarchy. To implement -an alternative storage backend for GSettings, you need to implement -the GSettingsBackend interface and then make it implement the -extension point G_SETTINGS_BACKEND_EXTENSION_POINT_NAME.

-

The interface defines methods for reading and writing values, a -method for determining if writing of certain values will fail -(lockdown) and a change notification mechanism.

-

The semantics of the interface are very precisely defined and -implementations must carefully adhere to the expectations of -callers that are documented on each of the interface methods.

-

Some of the GSettingsBackend functions accept or return a GTree. -These trees always have strings as keys and GVariant as values. -g_settings_backend_create_tree() is a convenience function to create -suitable trees.

-

The GSettingsBackend API is exported to allow third-party -implementations, but does not carry the same stability guarantees -as the public GIO API. For this reason, you have to define the -C preprocessor symbol G_SETTINGS_ENABLE_BACKEND before including -gio/gsettingsbackend.h.

-
-
-

Functions

-
-

g_settings_backend_get_default ()

-
GSettingsBackend *
-g_settings_backend_get_default (void);
-

Returns the default GSettingsBackend. It is possible to override -the default by setting the GSETTINGS_BACKEND environment variable -to the name of a settings backend.

-

The user gets a reference to the backend.

-
-

Returns

-

the default GSettingsBackend.

-

[transfer full]

-
-

Since: 2.28

-
-
-
-

g_settings_backend_changed ()

-
void
-g_settings_backend_changed (GSettingsBackend *backend,
-                            const gchar *key,
-                            gpointer origin_tag);
-

Signals that a single key has possibly changed. Backend -implementations should call this if a key has possibly changed its -value.

-

key - must be a valid key (ie starting with a slash, not containing -'//', and not ending with a slash).

-

The implementation must call this function during any call to -g_settings_backend_write(), before the call returns (except in the -case that no keys are actually changed and it cares to detect this -fact). It may not rely on the existence of a mainloop for -dispatching the signal later.

-

The implementation may call this function at any other time it likes -in response to other events (such as changes occurring outside of the -program). These calls may originate from a mainloop or may originate -in response to any other action (including from calls to -g_settings_backend_write()).

-

In the case that this call is in response to a call to -g_settings_backend_write() then origin_tag - must be set to the same -value that was passed to that call.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

backend

a GSettingsBackend implementation

 

key

the name of the key

 

origin_tag

the origin tag

 
-
-

Since: 2.26

-
-
-
-

g_settings_backend_path_changed ()

-
void
-g_settings_backend_path_changed (GSettingsBackend *backend,
-                                 const gchar *path,
-                                 gpointer origin_tag);
-

Signals that all keys below a given path may have possibly changed. -Backend implementations should call this if an entire path of keys -have possibly changed their values.

-

path - must be a valid path (ie starting and ending with a slash and -not containing '//').

-

The meaning of this signal is that any of the key which has a name -starting with path - may have changed.

-

The same rules for when notifications must occur apply as per -g_settings_backend_changed(). This call might be an appropriate -reasponse to a 'reset' call but implementations are also free to -explicitly list the keys that were affected by that call if they can -easily do so.

-

For efficiency reasons, the implementation should strive for path - to -be as long as possible (ie: the longest common prefix of all of the -keys that were changed) but this is not strictly required. As an -example, if this function is called with the path of "/" then every -single key in the application will be notified of a possible change.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

backend

a GSettingsBackend implementation

 

path

the path containing the changes

 

origin_tag

the origin tag

 
-
-

Since: 2.26

-
-
-
-

g_settings_backend_keys_changed ()

-
void
-g_settings_backend_keys_changed (GSettingsBackend *backend,
-                                 const gchar *path,
-                                 gchar const * const *items,
-                                 gpointer origin_tag);
-

Signals that a list of keys have possibly changed. Backend -implementations should call this if keys have possibly changed their -values.

-

path - must be a valid path (ie starting and ending with a slash and -not containing '//'). Each string in items - must form a valid key -name when path - is prefixed to it (ie: each item must not start or -end with '/' and must not contain '//').

-

The meaning of this signal is that any of the key names resulting -from the contatenation of path - with each item in items - may have -changed.

-

The same rules for when notifications must occur apply as per -g_settings_backend_changed(). These two calls can be used -interchangeably if exactly one item has changed (although in that -case g_settings_backend_changed() is definitely preferred).

-

For efficiency reasons, the implementation should strive for path - to -be as long as possible (ie: the longest common prefix of all of the -keys that were changed) but this is not strictly required.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

backend

a GSettingsBackend implementation

 

path

the path containing the changes

 

items

the NULL-terminated list of changed keys.

[array zero-terminated=1]

origin_tag

the origin tag

 
-
-

Since: 2.26

-
-
-
-

g_settings_backend_path_writable_changed ()

-
void
-g_settings_backend_path_writable_changed
-                               (GSettingsBackend *backend,
-                                const gchar *path);
-

Signals that the writability of all keys below a given path may have -changed.

-

Since GSettings performs no locking operations for itself, this call -will always be made in response to external events.

-
-

Parameters

-
----- - - - - - - - - - - - - -

backend

a GSettingsBackend implementation

 

path

the name of the path

 
-
-

Since: 2.26

-
-
-
-

g_settings_backend_writable_changed ()

-
void
-g_settings_backend_writable_changed (GSettingsBackend *backend,
-                                     const gchar *key);
-

Signals that the writability of a single key has possibly changed.

-

Since GSettings performs no locking operations for itself, this call -will always be made in response to external events.

-
-

Parameters

-
----- - - - - - - - - - - - - -

backend

a GSettingsBackend implementation

 

key

the name of the key

 
-
-

Since: 2.26

-
-
-
-

g_settings_backend_changed_tree ()

-
void
-g_settings_backend_changed_tree (GSettingsBackend *backend,
-                                 GTree *tree,
-                                 gpointer origin_tag);
-

This call is a convenience wrapper. It gets the list of changes from -tree -, computes the longest common prefix and calls -g_settings_backend_changed().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

backend

a GSettingsBackend implementation

 

tree

a GTree containing the changes

 

origin_tag

the origin tag

 
-
-

Since: 2.26

-
-
-
-

g_settings_backend_flatten_tree ()

-
void
-g_settings_backend_flatten_tree (GTree *tree,
-                                 gchar **path,
-                                 const gchar ***keys,
-                                 GVariant ***values);
-

Calculate the longest common prefix of all keys in a tree and write -out an array of the key names relative to that prefix and, -optionally, the value to store at each of those keys.

-

You must free the value returned in path -, keys - and values - using -g_free(). You should not attempt to free or unref the contents of -keys - or values -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

tree

a GTree containing the changes

 

path

the location to save the path.

[out]

keys

the -location to save the relative keys.

[out][transfer container][array zero-terminated=1]

values

the location to save the values, or NULL.

[out][optional][transfer container][array zero-terminated=1]
-
-

Since: 2.26

-
-
-
-

g_keyfile_settings_backend_new ()

-
GSettingsBackend *
-g_keyfile_settings_backend_new (const gchar *filename,
-                                const gchar *root_path,
-                                const gchar *root_group);
-

Creates a keyfile-backed GSettingsBackend.

-

The filename of the keyfile to use is given by filename -.

-

All settings read to or written from the backend must fall under the -path given in root_path - (which must start and end with a slash and -not contain two consecutive slashes). root_path - may be "/".

-

If root_group - is non-NULL then it specifies the name of the keyfile -group used for keys that are written directly below root_path -. For -example, if root_path - is "/apps/example/" and root_group - is -"toplevel", then settings the key "/apps/example/enabled" to a value -of TRUE will cause the following to appear in the keyfile:

-
- - - - - - - -
1
-2
[toplevel]
-enabled=true
-
- -

-

If root_group - is NULL then it is not permitted to store keys -directly below the root_path -.

-

For keys not stored directly below root_path - (ie: in a sub-path), -the name of the subpath (with the final slash stripped) is used as -the name of the keyfile group. To continue the example, if -"/apps/example/profiles/default/font-size" were set to -12 then the following would appear in the keyfile:

-
- - - - - - - -
1
-2
[profiles/default]
-font-size=12
-
- -

-

The backend will refuse writes (and return writability as being -FALSE) for keys outside of root_path - and, in the event that -root_group - is NULL, also for keys directly under root_path -. -Writes will also be refused if the backend detects that it has the -inability to rewrite the keyfile (ie: the containing directory is not -writable).

-

There is no checking done for your key namespace clashing with the -syntax of the key file format. For example, if you have '[' or ']' -characters in your path names or '=' in your key names you may be in -trouble.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

filename

the filename of the keyfile

 

root_path

the path under which all settings keys appear

 

root_group

the group name corresponding to -root_path -, or NULL.

[nullable]
-
-
-

Returns

-

a keyfile-backed GSettingsBackend.

-

[transfer full]

-
-
-
-
-

g_memory_settings_backend_new ()

-
GSettingsBackend *
-g_memory_settings_backend_new (void);
-

Creates a memory-backed GSettingsBackend.

-

This backend allows changes to settings, but does not write them -to any backing storage, so the next time you run your application, -the memory backend will start out with the default values again.

-
-

Returns

-

a newly created GSettingsBackend.

-

[transfer full]

-
-

Since: 2.28

-
-
-
-

g_null_settings_backend_new ()

-
GSettingsBackend *
-g_null_settings_backend_new (void);
-

Creates a readonly GSettingsBackend.

-

This backend does not allow changes to settings, so all settings -will always have their default values.

-
-

Returns

-

a newly created GSettingsBackend.

-

[transfer full]

-
-

Since: 2.28

-
-
-
-

Types and Values

-
-

GSettingsBackend

-
typedef struct _GSettingsBackend GSettingsBackend;
-

An implementation of a settings storage repository.

-
-
-
-

struct GSettingsBackendClass

-
struct GSettingsBackendClass {
-  GObjectClass parent_class;
-
-  GVariant *    (*read)             (GSettingsBackend    *backend,
-                                     const gchar         *key,
-                                     const GVariantType  *expected_type,
-                                     gboolean             default_value);
-
-  gboolean      (*get_writable)     (GSettingsBackend    *backend,
-                                     const gchar         *key);
-
-  gboolean      (*write)            (GSettingsBackend    *backend,
-                                     const gchar         *key,
-                                     GVariant            *value,
-                                     gpointer             origin_tag);
-  gboolean      (*write_tree)       (GSettingsBackend    *backend,
-                                     GTree               *tree,
-                                     gpointer             origin_tag);
-  void          (*reset)            (GSettingsBackend    *backend,
-                                     const gchar         *key,
-                                     gpointer             origin_tag);
-
-  void          (*subscribe)        (GSettingsBackend    *backend,
-                                     const gchar         *name);
-  void          (*unsubscribe)      (GSettingsBackend    *backend,
-                                     const gchar         *name);
-  void          (*sync)             (GSettingsBackend    *backend);
-
-  GPermission * (*get_permission)   (GSettingsBackend    *backend,
-                                     const gchar         *path);
-
-  GVariant *    (*read_user_value)  (GSettingsBackend    *backend,
-                                     const gchar         *key,
-                                     const GVariantType  *expected_type);
-};
-
-

Class structure for GSettingsBackend.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

read ()

virtual method to read a key's value

 

get_writable ()

virtual method to get if a key is writable

 

write ()

virtual method to change key's value

 

write_tree ()

virtual method to change a tree of keys

 

reset ()

virtual method to reset state

 

subscribe ()

virtual method to subscribe to key changes

 

unsubscribe ()

virtual method to unsubscribe to key changes

 

sync ()

virtual method to sync state

 

get_permission ()

virtual method to get permission of a key

 

read_user_value ()

virtual method to read user's key value

 
-
-
-
-
-

G_SETTINGS_BACKEND_EXTENSION_POINT_NAME

-
#define G_SETTINGS_BACKEND_EXTENSION_POINT_NAME "gsettings-backend"
-
-

Extension point for GSettingsBackend functionality.

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSimpleAction.html b/docs/reference/gio/html/GSimpleAction.html deleted file mode 100644 index 05caec38f..000000000 --- a/docs/reference/gio/html/GSimpleAction.html +++ /dev/null @@ -1,580 +0,0 @@ - - - - -GSimpleAction: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSimpleAction

-

GSimpleAction — A simple GAction implementation

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - -
-GSimpleAction * - -g_simple_action_new () -
-GSimpleAction * - -g_simple_action_new_stateful () -
-void - -g_simple_action_set_enabled () -
-void - -g_simple_action_set_state () -
-void - -g_simple_action_set_state_hint () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
gbooleanenabledRead / Write
-gchar *nameRead / Write / Construct Only
-GVariantType *parameter-typeRead / Write / Construct Only
-GVariant *stateRead / Write / Construct
-GVariantType *state-typeRead
-
-
-

Signals

-
----- - - - - - - - - - - - - -
voidactivateRun Last
voidchange-stateRun Last
-
-
-

Types and Values

-
---- - - - - -
 GSimpleAction
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSimpleAction
-
-
-
-

Implemented Interfaces

-

-GSimpleAction implements - GAction.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A GSimpleAction is the obvious simple implementation of the GAction -interface. This is the easiest way to create an action for purposes of -adding it to a GSimpleActionGroup.

-

See also GtkAction.

-
-
-

Functions

-
-

g_simple_action_new ()

-
GSimpleAction *
-g_simple_action_new (const gchar *name,
-                     const GVariantType *parameter_type);
-

Creates a new action.

-

The created action is stateless. See g_simple_action_new_stateful().

-
-

Parameters

-
----- - - - - - - - - - - - - -

name

the name of the action

 

parameter_type

the type of parameter to the activate function.

[nullable]
-
-
-

Returns

-

a new GSimpleAction

-
-

Since: 2.28

-
-
-
-

g_simple_action_new_stateful ()

-
GSimpleAction *
-g_simple_action_new_stateful (const gchar *name,
-                              const GVariantType *parameter_type,
-                              GVariant *state);
-

Creates a new stateful action.

-

state - is the initial state of the action. All future state values -must have the same GVariantType as the initial state.

-

If the state - GVariant is floating, it is consumed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

name

the name of the action

 

parameter_type

the type of the parameter to the activate function.

[nullable]

state

the initial state of the action

 
-
-
-

Returns

-

a new GSimpleAction

-
-

Since: 2.28

-
-
-
-

g_simple_action_set_enabled ()

-
void
-g_simple_action_set_enabled (GSimpleAction *simple,
-                             gboolean enabled);
-

Sets the action as enabled or not.

-

An action must be enabled in order to be activated or in order to -have its state changed from outside callers.

-

This should only be called by the implementor of the action. Users -of the action should not attempt to modify its enabled flag.

-
-

Parameters

-
----- - - - - - - - - - - - - -

simple

a GSimpleAction

 

enabled

whether the action is enabled

 
-
-

Since: 2.28

-
-
-
-

g_simple_action_set_state ()

-
void
-g_simple_action_set_state (GSimpleAction *simple,
-                           GVariant *value);
-

Sets the state of the action.

-

This directly updates the 'state' property to the given value.

-

This should only be called by the implementor of the action. Users -of the action should not attempt to directly modify the 'state' -property. Instead, they should call g_action_change_state() to -request the change.

-

If the value - GVariant is floating, it is consumed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

simple

a GSimpleAction

 

value

the new GVariant for the state

 
-
-

Since: 2.30

-
-
-
-

g_simple_action_set_state_hint ()

-
void
-g_simple_action_set_state_hint (GSimpleAction *simple,
-                                GVariant *state_hint);
-

Sets the state hint for the action.

-

See g_action_get_state_hint() for more information about -action state hints.

-
-

Parameters

-
----- - - - - - - - - - - - - -

simple

a GSimpleAction

 

state_hint

a GVariant representing the state hint.

[nullable]
-
-

Since: 2.44

-
-
-
-

Types and Values

-
-

GSimpleAction

-
typedef struct _GSimpleAction GSimpleAction;
-

GSimpleAction is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

Property Details

-
-

The “enabled” property

-
  “enabled”                  gboolean
-

If action - is currently enabled.

-

If the action is disabled then calls to g_action_activate() and -g_action_change_state() have no effect.

-

Flags: Read / Write

-

Default value: TRUE

-

Since: 2.28

-
-
-
-

The “name” property

-
  “name”                     gchar *
-

The name of the action. This is mostly meaningful for identifying -the action once it has been added to a GSimpleActionGroup.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.28

-
-
-
-

The “parameter-type” property

-
  “parameter-type”           GVariantType *
-

The type of the parameter that must be given when activating the -action.

-

Flags: Read / Write / Construct Only

-

Since: 2.28

-
-
-
-

The “state” property

-
  “state”                    GVariant *
-

The state of the action, or NULL if the action is stateless.

-

Flags: Read / Write / Construct

-

Allowed values: GVariant<*>

-

Default value: NULL

-

Since: 2.28

-
-
-
-

The “state-type” property

-
  “state-type”               GVariantType *
-

The GVariantType of the state that the action has, or NULL if the -action is stateless.

-

Flags: Read

-

Since: 2.28

-
-
-
-

Signal Details

-
-

The “activate” signal

-
void
-user_function (GSimpleAction *simple,
-               GVariant      *parameter,
-               gpointer       user_data)
-

Indicates that the action was just activated.

-

parameter - will always be of the expected type. In the event that -an incorrect type was given, no signal will be emitted.

-

Since GLib 2.40, if no handler is connected to this signal then the -default behaviour for boolean-stated actions with a NULL parameter -type is to toggle them via the “change-state” signal. -For stateful actions where the state type is equal to the parameter -type, the default is to forward them directly to -“change-state”. This should allow almost all users -of GSimpleAction to connect only one handler or the other.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

simple

the GSimpleAction

 

parameter

the parameter to the activation.

[nullable]

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.28

-
-
-
-

The “change-state” signal

-
void
-user_function (GSimpleAction *simple,
-               GVariant      *value,
-               gpointer       user_data)
-

Indicates that the action just received a request to change its -state.

-

value - will always be of the correct state type. In the event that -an incorrect type was given, no signal will be emitted.

-

If no handler is connected to this signal then the default -behaviour is to call g_simple_action_set_state() to set the state -to the requested value. If you connect a signal handler then no -default action is taken. If the state should change then you must -call g_simple_action_set_state() from the handler.

-

An example of a 'change-state' handler:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
static void
-change_volume_state (GSimpleAction *action,
-                     GVariant      *value,
-                     gpointer       user_data)
-{
-  gint requested;
-
-  requested = g_variant_get_int32 (value);
-
-  // Volume only goes from 0 to 10
-  if (0 <= requested && requested <= 10)
-    g_simple_action_set_state (action, value);
-}
-
- -

-

The handler need not set the state to the requested value. -It could set it to any value at all, or take some other action.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

simple

the GSimpleAction

 

value

the requested value for the state.

[nullable]

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.30

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSimpleActionGroup.html b/docs/reference/gio/html/GSimpleActionGroup.html deleted file mode 100644 index dc707a357..000000000 --- a/docs/reference/gio/html/GSimpleActionGroup.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - -GSimpleActionGroup: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSimpleActionGroup

-

GSimpleActionGroup — A simple GActionGroup implementation

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - -
-GSimpleActionGroup * - -g_simple_action_group_new () -
-GAction * - -g_simple_action_group_lookup () -
-void - -g_simple_action_group_insert () -
-void - -g_simple_action_group_remove () -
-void - -g_simple_action_group_add_entries () -
-
-
-

Types and Values

-
---- - - - - -
 GSimpleActionGroup
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSimpleActionGroup
-
-
-
-

Implemented Interfaces

-

-GSimpleActionGroup implements - GActionGroup and GActionMap.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GSimpleActionGroup is a hash table filled with GAction objects, -implementing the GActionGroup and GActionMap interfaces.

-
-
-

Functions

-
-

g_simple_action_group_new ()

-
GSimpleActionGroup *
-g_simple_action_group_new (void);
-

Creates a new, empty, GSimpleActionGroup.

-
-

Returns

-

a new GSimpleActionGroup

-
-

Since: 2.28

-
-
-
-

g_simple_action_group_lookup ()

-
GAction *
-g_simple_action_group_lookup (GSimpleActionGroup *simple,
-                              const gchar *action_name);
-
-

g_simple_action_group_lookup has been deprecated since version 2.38 and should not be used in newly-written code.

-

Use g_action_map_lookup_action()

-
-

Looks up the action with the name action_name - in the group.

-

If no such action exists, returns NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

simple

a GSimpleActionGroup

 

action_name

the name of an action

 
-
-
-

Returns

-

a GAction, or NULL.

-

[transfer none]

-
-

Since: 2.28

-
-
-
-

g_simple_action_group_insert ()

-
void
-g_simple_action_group_insert (GSimpleActionGroup *simple,
-                              GAction *action);
-
-

g_simple_action_group_insert has been deprecated since version 2.38 and should not be used in newly-written code.

-

Use g_action_map_add_action()

-
-

Adds an action to the action group.

-

If the action group already contains an action with the same name as -action - then the old action is dropped from the group.

-

The action group takes its own reference on action -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

simple

a GSimpleActionGroup

 

action

a GAction

 
-
-

Since: 2.28

-
-
-
-

g_simple_action_group_remove ()

-
void
-g_simple_action_group_remove (GSimpleActionGroup *simple,
-                              const gchar *action_name);
-
-

g_simple_action_group_remove has been deprecated since version 2.38 and should not be used in newly-written code.

-

Use g_action_map_remove_action()

-
-

Removes the named action from the action group.

-

If no action of this name is in the group then nothing happens.

-
-

Parameters

-
----- - - - - - - - - - - - - -

simple

a GSimpleActionGroup

 

action_name

the name of the action

 
-
-

Since: 2.28

-
-
-
-

g_simple_action_group_add_entries ()

-
void
-g_simple_action_group_add_entries (GSimpleActionGroup *simple,
-                                   const GActionEntry *entries,
-                                   gint n_entries,
-                                   gpointer user_data);
-
-

g_simple_action_group_add_entries has been deprecated since version 2.38 and should not be used in newly-written code.

-

Use g_action_map_add_action_entries()

-
-

A convenience function for creating multiple GSimpleAction instances -and adding them to the action group.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

simple

a GSimpleActionGroup

 

entries

a pointer to the first item in -an array of GActionEntry structs.

[array length=n_entries]

n_entries

the length of entries -, or -1

 

user_data

the user data for signal connections

 
-
-

Since: 2.30

-
-
-
-

Types and Values

-
-

GSimpleActionGroup

-
typedef struct _GSimpleActionGroup GSimpleActionGroup;
-

The GSimpleActionGroup structure contains private data and should only be accessed using the provided API.

-

Since: 2.28

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSimpleAsyncResult.html b/docs/reference/gio/html/GSimpleAsyncResult.html deleted file mode 100644 index d5c1d49c3..000000000 --- a/docs/reference/gio/html/GSimpleAsyncResult.html +++ /dev/null @@ -1,1730 +0,0 @@ - - - - -GSimpleAsyncResult: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSimpleAsyncResult

-

GSimpleAsyncResult — Simple asynchronous results implementation

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -(*GSimpleAsyncThreadFunc) () -
-GSimpleAsyncResult * - -g_simple_async_result_new () -
-GSimpleAsyncResult * - -g_simple_async_result_new_error () -
-GSimpleAsyncResult * - -g_simple_async_result_new_from_error () -
-GSimpleAsyncResult * - -g_simple_async_result_new_take_error () -
-void - -g_simple_async_result_set_check_cancellable () -
-void - -g_simple_async_result_set_op_res_gpointer () -
-gpointer - -g_simple_async_result_get_op_res_gpointer () -
-void - -g_simple_async_result_set_op_res_gssize () -
-gssize - -g_simple_async_result_get_op_res_gssize () -
-void - -g_simple_async_result_set_op_res_gboolean () -
-gboolean - -g_simple_async_result_get_op_res_gboolean () -
-gpointer - -g_simple_async_result_get_source_tag () -
-gboolean - -g_simple_async_result_is_valid () -
-void - -g_simple_async_result_set_handle_cancellation () -
-void - -g_simple_async_result_complete () -
-void - -g_simple_async_result_complete_in_idle () -
-void - -g_simple_async_result_run_in_thread () -
-void - -g_simple_async_result_set_from_error () -
-void - -g_simple_async_result_take_error () -
-gboolean - -g_simple_async_result_propagate_error () -
-void - -g_simple_async_result_set_error () -
-void - -g_simple_async_result_set_error_va () -
-void - -g_simple_async_report_error_in_idle () -
-void - -g_simple_async_report_gerror_in_idle () -
-void - -g_simple_async_report_take_gerror_in_idle () -
-
-
-

Types and Values

-
---- - - - - -
 GSimpleAsyncResult
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSimpleAsyncResult
-
-
-
-

Implemented Interfaces

-

-GSimpleAsyncResult implements - GAsyncResult.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

As of GLib 2.46, GSimpleAsyncResult is deprecated in favor of -GTask, which provides a simpler API.

-

GSimpleAsyncResult implements GAsyncResult.

-

GSimpleAsyncResult handles GAsyncReadyCallbacks, error -reporting, operation cancellation and the final state of an operation, -completely transparent to the application. Results can be returned -as a pointer e.g. for functions that return data that is collected -asynchronously, a boolean value for checking the success or failure -of an operation, or a gssize for operations which return the number -of bytes modified by the operation; all of the simple return cases -are covered.

-

Most of the time, an application will not need to know of the details -of this API; it is handled transparently, and any necessary operations -are handled by GAsyncResult's interface. However, if implementing a -new GIO module, for writing language bindings, or for complex -applications that need better control of how asynchronous operations -are completed, it is important to understand this functionality.

-

GSimpleAsyncResults are tagged with the calling function to ensure -that asynchronous functions and their finishing functions are used -together correctly.

-

To create a new GSimpleAsyncResult, call g_simple_async_result_new(). -If the result needs to be created for a GError, use -g_simple_async_result_new_from_error() or -g_simple_async_result_new_take_error(). If a GError is not available -(e.g. the asynchronous operation's doesn't take a GError argument), -but the result still needs to be created for an error condition, use -g_simple_async_result_new_error() (or g_simple_async_result_set_error_va() -if your application or binding requires passing a variable argument list -directly), and the error can then be propagated through the use of -g_simple_async_result_propagate_error().

-

An asynchronous operation can be made to ignore a cancellation event by -calling g_simple_async_result_set_handle_cancellation() with a -GSimpleAsyncResult for the operation and FALSE. This is useful for -operations that are dangerous to cancel, such as close (which would -cause a leak if cancelled before being run).

-

GSimpleAsyncResult can integrate into GLib's event loop, GMainLoop, -or it can use GThreads. -g_simple_async_result_complete() will finish an I/O task directly -from the point where it is called. g_simple_async_result_complete_in_idle() -will finish it from an idle handler in the -thread-default main context -. g_simple_async_result_run_in_thread() will run the -job in a separate thread and then deliver the result to the -thread-default main context.

-

To set the results of an asynchronous function, -g_simple_async_result_set_op_res_gpointer(), -g_simple_async_result_set_op_res_gboolean(), and -g_simple_async_result_set_op_res_gssize() -are provided, setting the operation's result to a gpointer, gboolean, or -gssize, respectively.

-

Likewise, to get the result of an asynchronous function, -g_simple_async_result_get_op_res_gpointer(), -g_simple_async_result_get_op_res_gboolean(), and -g_simple_async_result_get_op_res_gssize() are -provided, getting the operation's result as a gpointer, gboolean, and -gssize, respectively.

-

For the details of the requirements implementations must respect, see -GAsyncResult. A typical implementation of an asynchronous operation -using GSimpleAsyncResult looks something like this:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
static void
-baked_cb (Cake    *cake,
-          gpointer user_data)
-{
-  // In this example, this callback is not given a reference to the cake,
-  // so the GSimpleAsyncResult has to take a reference to it.
-  GSimpleAsyncResult *result = user_data;
-
-  if (cake == NULL)
-    g_simple_async_result_set_error (result,
-                                     BAKER_ERRORS,
-                                     BAKER_ERROR_NO_FLOUR,
-                                     "Go to the supermarket");
-  else
-    g_simple_async_result_set_op_res_gpointer (result,
-                                               g_object_ref (cake),
-                                               g_object_unref);
-
-
-  // In this example, we assume that baked_cb is called as a callback from
-  // the mainloop, so it's safe to complete the operation synchronously here.
-  // If, however, _baker_prepare_cake () might call its callback without
-  // first returning to the mainloop — inadvisable, but some APIs do so —
-  // we would need to use g_simple_async_result_complete_in_idle().
-  g_simple_async_result_complete (result);
-  g_object_unref (result);
-}
-
-void
-baker_bake_cake_async (Baker              *self,
-                       guint               radius,
-                       GAsyncReadyCallback callback,
-                       gpointer            user_data)
-{
-  GSimpleAsyncResult *simple;
-  Cake               *cake;
-
-  if (radius < 3)
-    {
-      g_simple_async_report_error_in_idle (G_OBJECT (self),
-                                           callback,
-                                           user_data,
-                                           BAKER_ERRORS,
-                                           BAKER_ERROR_TOO_SMALL,
-                                           "%ucm radius cakes are silly",
-                                           radius);
-      return;
-    }
-
-  simple = g_simple_async_result_new (G_OBJECT (self),
-                                      callback,
-                                      user_data,
-                                      baker_bake_cake_async);
-  cake = _baker_get_cached_cake (self, radius);
-
-  if (cake != NULL)
-    {
-      g_simple_async_result_set_op_res_gpointer (simple,
-                                                 g_object_ref (cake),
-                                                 g_object_unref);
-      g_simple_async_result_complete_in_idle (simple);
-      g_object_unref (simple);
-      // Drop the reference returned by _baker_get_cached_cake();
-      // the GSimpleAsyncResult has taken its own reference.
-      g_object_unref (cake);
-      return;
-    }
-
-  _baker_prepare_cake (self, radius, baked_cb, simple);
-}
-
-Cake *
-baker_bake_cake_finish (Baker        *self,
-                        GAsyncResult *result,
-                        GError      **error)
-{
-  GSimpleAsyncResult *simple;
-  Cake               *cake;
-
-  g_return_val_if_fail (g_simple_async_result_is_valid (result,
-                                                        G_OBJECT (self),
-                                                        baker_bake_cake_async),
-                        NULL);
-
-  simple = (GSimpleAsyncResult *) result;
-
-  if (g_simple_async_result_propagate_error (simple, error))
-    return NULL;
-
-  cake = CAKE (g_simple_async_result_get_op_res_gpointer (simple));
-  return g_object_ref (cake);
-}
-
- -

-
-
-

Functions

-
-

GSimpleAsyncThreadFunc ()

-
void
-(*GSimpleAsyncThreadFunc) (GSimpleAsyncResult *res,
-                           GObject *object,
-                           GCancellable *cancellable);
-

Simple thread function that runs an asynchronous operation and -checks for cancellation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

res

a GSimpleAsyncResult.

 

object

a GObject.

 

cancellable

optional GCancellable object, NULL to ignore.

 
-
-
-
-
-

g_simple_async_result_new ()

-
GSimpleAsyncResult *
-g_simple_async_result_new (GObject *source_object,
-                           GAsyncReadyCallback callback,
-                           gpointer user_data,
-                           gpointer source_tag);
-
-

g_simple_async_result_new has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use g_task_new() instead.

-
-

Creates a GSimpleAsyncResult.

-

The common convention is to create the GSimpleAsyncResult in the -function that starts the asynchronous operation and use that same -function as the source_tag -.

-

If your operation supports cancellation with GCancellable (which it -probably should) then you should provide the user's cancellable to -g_simple_async_result_set_check_cancellable() immediately after -this function returns.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

source_object

a GObject, or NULL.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

user data passed to callback -.

[closure]

source_tag

the asynchronous function.

 
-
-
-

Returns

-

a GSimpleAsyncResult.

-
-
-
-
-

g_simple_async_result_new_error ()

-
GSimpleAsyncResult *
-g_simple_async_result_new_error (GObject *source_object,
-                                 GAsyncReadyCallback callback,
-                                 gpointer user_data,
-                                 GQuark domain,
-                                 gint code,
-                                 const char *format,
-                                 ...);
-
-

g_simple_async_result_new_error has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use g_task_new() and g_task_return_new_error() instead.

-
-

Creates a new GSimpleAsyncResult with a set error.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

source_object

a GObject, or NULL.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

user data passed to callback -.

[closure]

domain

a GQuark.

 

code

an error code.

 

format

a string with format characters.

 

...

a list of values to insert into format -.

 
-
-
-

Returns

-

a GSimpleAsyncResult.

-
-
-
-
-

g_simple_async_result_new_from_error ()

-
GSimpleAsyncResult *
-g_simple_async_result_new_from_error (GObject *source_object,
-                                      GAsyncReadyCallback callback,
-                                      gpointer user_data,
-                                      const GError *error);
-
-

g_simple_async_result_new_from_error has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use g_task_new() and g_task_return_error() instead.

-
-

Creates a GSimpleAsyncResult from an error condition.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

source_object

a GObject, or NULL.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

user data passed to callback -.

[closure]

error

a GError

 
-
-
-

Returns

-

a GSimpleAsyncResult.

-
-
-
-
-

g_simple_async_result_new_take_error ()

-
GSimpleAsyncResult *
-g_simple_async_result_new_take_error (GObject *source_object,
-                                      GAsyncReadyCallback callback,
-                                      gpointer user_data,
-                                      GError *error);
-
-

g_simple_async_result_new_take_error has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use g_task_new() and g_task_return_error() instead.

-
-

Creates a GSimpleAsyncResult from an error condition, and takes over the -caller's ownership of error -, so the caller does not need to free it anymore.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

source_object

a GObject, or NULL.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

user data passed to callback -.

[closure]

error

a GError

 
-
-
-

Returns

-

a GSimpleAsyncResult

-
-

Since: 2.28

-
-
-
-

g_simple_async_result_set_check_cancellable ()

-
void
-g_simple_async_result_set_check_cancellable
-                               (GSimpleAsyncResult *simple,
-                                GCancellable *check_cancellable);
-
-

g_simple_async_result_set_check_cancellable has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use GTask instead.

-
-

Sets a GCancellable to check before dispatching results.

-

This function has one very specific purpose: the provided cancellable -is checked at the time of g_simple_async_result_propagate_error() If -it is cancelled, these functions will return an "Operation was -cancelled" error (G_IO_ERROR_CANCELLED).

-

Implementors of cancellable asynchronous functions should use this in -order to provide a guarantee to their callers that cancelling an -async operation will reliably result in an error being returned for -that operation (even if a positive result for the operation has -already been sent as an idle to the main context to be dispatched).

-

The checking described above is done regardless of any call to the -unrelated g_simple_async_result_set_handle_cancellation() function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

simple

a GSimpleAsyncResult

 

check_cancellable

a GCancellable to check, or NULL to unset.

[nullable]
-
-

Since: 2.32

-
-
-
-

g_simple_async_result_set_op_res_gpointer ()

-
void
-g_simple_async_result_set_op_res_gpointer
-                               (GSimpleAsyncResult *simple,
-                                gpointer op_res,
-                                GDestroyNotify destroy_op_res);
-
-

g_simple_async_result_set_op_res_gpointer has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use GTask and g_task_return_pointer() instead.

-
-

Sets the operation result within the asynchronous result to a pointer.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

simple

a GSimpleAsyncResult.

 

op_res

a pointer result from an asynchronous function.

 

destroy_op_res

a GDestroyNotify function.

 
-
-
-
-
-

g_simple_async_result_get_op_res_gpointer ()

-
gpointer
-g_simple_async_result_get_op_res_gpointer
-                               (GSimpleAsyncResult *simple);
-
-

g_simple_async_result_get_op_res_gpointer has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use GTask and g_task_propagate_pointer() instead.

-
-

Gets a pointer result as returned by the asynchronous function.

-

[skip]

-
-

Parameters

-
----- - - - - - -

simple

a GSimpleAsyncResult.

 
-
-
-

Returns

-

a pointer from the result.

-
-
-
-
-

g_simple_async_result_set_op_res_gssize ()

-
void
-g_simple_async_result_set_op_res_gssize
-                               (GSimpleAsyncResult *simple,
-                                gssize op_res);
-
-

g_simple_async_result_set_op_res_gssize has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use GTask and g_task_return_int() instead.

-
-

Sets the operation result within the asynchronous result to -the given op_res -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

simple

a GSimpleAsyncResult.

 

op_res

a gssize.

 
-
-
-
-
-

g_simple_async_result_get_op_res_gssize ()

-
gssize
-g_simple_async_result_get_op_res_gssize
-                               (GSimpleAsyncResult *simple);
-
-

g_simple_async_result_get_op_res_gssize has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use GTask and g_task_propagate_int() instead.

-
-

Gets a gssize from the asynchronous result.

-
-

Parameters

-
----- - - - - - -

simple

a GSimpleAsyncResult.

 
-
-
-

Returns

-

a gssize returned from the asynchronous function.

-
-
-
-
-

g_simple_async_result_set_op_res_gboolean ()

-
void
-g_simple_async_result_set_op_res_gboolean
-                               (GSimpleAsyncResult *simple,
-                                gboolean op_res);
-
-

g_simple_async_result_set_op_res_gboolean has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use GTask and g_task_return_boolean() instead.

-
-

Sets the operation result to a boolean within the asynchronous result.

-
-

Parameters

-
----- - - - - - - - - - - - - -

simple

a GSimpleAsyncResult.

 

op_res

a gboolean.

 
-
-
-
-
-

g_simple_async_result_get_op_res_gboolean ()

-
gboolean
-g_simple_async_result_get_op_res_gboolean
-                               (GSimpleAsyncResult *simple);
-
-

g_simple_async_result_get_op_res_gboolean has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use GTask and g_task_propagate_boolean() instead.

-
-

Gets the operation result boolean from within the asynchronous result.

-
-

Parameters

-
----- - - - - - -

simple

a GSimpleAsyncResult.

 
-
-
-

Returns

-

TRUE if the operation's result was TRUE, FALSE -if the operation's result was FALSE.

-
-
-
-
-

g_simple_async_result_get_source_tag ()

-
gpointer
-g_simple_async_result_get_source_tag (GSimpleAsyncResult *simple);
-
-

g_simple_async_result_get_source_tag has been deprecated since version 2.46. and should not be used in newly-written code.

-

Use GTask and g_task_get_source_tag() instead.

-
-

Gets the source tag for the GSimpleAsyncResult.

-

[skip]

-
-

Parameters

-
----- - - - - - -

simple

a GSimpleAsyncResult.

 
-
-
-

Returns

-

a gpointer to the source object for the GSimpleAsyncResult.

-
-
-
-
-

g_simple_async_result_is_valid ()

-
gboolean
-g_simple_async_result_is_valid (GAsyncResult *result,
-                                GObject *source,
-                                gpointer source_tag);
-
-

g_simple_async_result_is_valid has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use GTask and g_task_is_valid() instead.

-
-

Ensures that the data passed to the _finish function of an async -operation is consistent. Three checks are performed.

-

First, result - is checked to ensure that it is really a -GSimpleAsyncResult. Second, source - is checked to ensure that it -matches the source object of result -. Third, source_tag - is -checked to ensure that it is equal to the source_tag - argument given -to g_simple_async_result_new() (which, by convention, is a pointer -to the _async function corresponding to the _finish function from -which this function is called). (Alternatively, if either -source_tag - or result -'s source tag is NULL, then the source tag -check is skipped.)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

result

the GAsyncResult passed to the _finish function.

 

source

the GObject passed to the _finish function.

[nullable]

source_tag

the asynchronous function.

[nullable]
-
-
-

Returns

-

TRUE if all checks passed or FALSE if any failed.

-
-

Since: 2.20

-
-
-
-

g_simple_async_result_set_handle_cancellation ()

-
void
-g_simple_async_result_set_handle_cancellation
-                               (GSimpleAsyncResult *simple,
-                                gboolean handle_cancellation);
-

g_simple_async_result_set_handle_cancellation has been deprecated since version 2.46 and should not be used in newly-written code.

-

Sets whether to handle cancellation within the asynchronous operation.

-

This function has nothing to do with -g_simple_async_result_set_check_cancellable(). It only refers to the -GCancellable passed to g_simple_async_result_run_in_thread().

-
-

Parameters

-
----- - - - - - - - - - - - - -

simple

a GSimpleAsyncResult.

 

handle_cancellation

a gboolean.

 
-
-
-
-
-

g_simple_async_result_complete ()

-
void
-g_simple_async_result_complete (GSimpleAsyncResult *simple);
-
-

g_simple_async_result_complete has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use GTask instead.

-
-

Completes an asynchronous I/O job immediately. Must be called in -the thread where the asynchronous result was to be delivered, as it -invokes the callback directly. If you are in a different thread use -g_simple_async_result_complete_in_idle().

-

Calling this function takes a reference to simple - for as long as -is needed to complete the call.

-
-

Parameters

-
----- - - - - - -

simple

a GSimpleAsyncResult.

 
-
-
-
-
-

g_simple_async_result_complete_in_idle ()

-
void
-g_simple_async_result_complete_in_idle
-                               (GSimpleAsyncResult *simple);
-
-

g_simple_async_result_complete_in_idle has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use GTask instead.

-
-

Completes an asynchronous function in an idle handler in the -thread-default main context -of the thread that simple - was initially created in -(and re-pushes that context around the invocation of the callback).

-

Calling this function takes a reference to simple - for as long as -is needed to complete the call.

-
-

Parameters

-
----- - - - - - -

simple

a GSimpleAsyncResult.

 
-
-
-
-
-

g_simple_async_result_run_in_thread ()

-
void
-g_simple_async_result_run_in_thread (GSimpleAsyncResult *simple,
-                                     GSimpleAsyncThreadFunc func,
-                                     int io_priority,
-                                     GCancellable *cancellable);
-
-

g_simple_async_result_run_in_thread has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use GTask and g_task_run_in_thread() instead.

-
-

Runs the asynchronous job in a separate thread and then calls -g_simple_async_result_complete_in_idle() on simple - to return -the result to the appropriate main loop.

-

Calling this function takes a reference to simple - for as long as -is needed to run the job and report its completion.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

simple

a GSimpleAsyncResult.

 

func

a GSimpleAsyncThreadFunc.

 

io_priority

the io priority of the request.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]
-
-
-
-
-

g_simple_async_result_set_from_error ()

-
void
-g_simple_async_result_set_from_error (GSimpleAsyncResult *simple,
-                                      const GError *error);
-
-

g_simple_async_result_set_from_error has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use GTask and g_task_return_error() instead.

-
-

Sets the result from a GError.

-
-

Parameters

-
----- - - - - - - - - - - - - -

simple

a GSimpleAsyncResult.

 

error

GError.

 
-
-
-
-
-

g_simple_async_result_take_error ()

-
void
-g_simple_async_result_take_error (GSimpleAsyncResult *simple,
-                                  GError *error);
-
-

g_simple_async_result_take_error has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use GTask and g_task_return_error() instead.

-
-

Sets the result from error -, and takes over the caller's ownership -of error -, so the caller does not need to free it any more.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

simple

a GSimpleAsyncResult

 

error

a GError

 
-
-

Since: 2.28

-
-
-
-

g_simple_async_result_propagate_error ()

-
gboolean
-g_simple_async_result_propagate_error (GSimpleAsyncResult *simple,
-                                       GError **dest);
-
-

g_simple_async_result_propagate_error has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use GTask instead.

-
-

Propagates an error from within the simple asynchronous result to -a given destination.

-

If the GCancellable given to a prior call to -g_simple_async_result_set_check_cancellable() is cancelled then this -function will return TRUE with dest - set appropriately.

-
-

Parameters

-
----- - - - - - - - - - - - - -

simple

a GSimpleAsyncResult.

 

dest

a location to propagate the error to.

[out]
-
-
-

Returns

-

TRUE if the error was propagated to dest -. FALSE otherwise.

-
-
-
-
-

g_simple_async_result_set_error ()

-
void
-g_simple_async_result_set_error (GSimpleAsyncResult *simple,
-                                 GQuark domain,
-                                 gint code,
-                                 const char *format,
-                                 ...);
-
-

g_simple_async_result_set_error has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use GTask and g_task_return_new_error() instead.

-
-

Sets an error within the asynchronous result without a GError.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

simple

a GSimpleAsyncResult.

 

domain

a GQuark (usually G_IO_ERROR).

 

code

an error code.

 

format

a formatted error reporting string.

 

...

a list of variables to fill in format -.

 
-
-
-
-
-

g_simple_async_result_set_error_va ()

-
void
-g_simple_async_result_set_error_va (GSimpleAsyncResult *simple,
-                                    GQuark domain,
-                                    gint code,
-                                    const char *format,
-                                    va_list args);
-
-

g_simple_async_result_set_error_va has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use GTask and g_task_return_error() instead.

-
-

Sets an error within the asynchronous result without a GError. -Unless writing a binding, see g_simple_async_result_set_error().

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

simple

a GSimpleAsyncResult.

 

domain

a GQuark (usually G_IO_ERROR).

 

code

an error code.

 

format

a formatted error reporting string.

 

args

va_list of arguments.

 
-
-
-
-
-

g_simple_async_report_error_in_idle ()

-
void
-g_simple_async_report_error_in_idle (GObject *object,
-                                     GAsyncReadyCallback callback,
-                                     gpointer user_data,
-                                     GQuark domain,
-                                     gint code,
-                                     const char *format,
-                                     ...);
-
-

g_simple_async_report_error_in_idle has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use g_task_report_error().

-
-

Reports an error in an asynchronous function in an idle function by -directly setting the contents of the GAsyncResult with the given error -information.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

object

a GObject, or NULL.

[nullable]

callback

a GAsyncReadyCallback.

 

user_data

user data passed to callback -.

 

domain

a GQuark containing the error domain (usually G_IO_ERROR).

 

code

a specific error code.

 

format

a formatted error reporting string.

 

...

a list of variables to fill in format -.

 
-
-
-
-
-

g_simple_async_report_gerror_in_idle ()

-
void
-g_simple_async_report_gerror_in_idle (GObject *object,
-                                      GAsyncReadyCallback callback,
-                                      gpointer user_data,
-                                      const GError *error);
-
-

g_simple_async_report_gerror_in_idle has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use g_task_report_error().

-
-

Reports an error in an idle function. Similar to -g_simple_async_report_error_in_idle(), but takes a GError rather -than building a new one.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

object

a GObject, or NULL.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

user data passed to callback -.

[closure]

error

the GError to report

 
-
-
-
-
-

g_simple_async_report_take_gerror_in_idle ()

-
void
-g_simple_async_report_take_gerror_in_idle
-                               (GObject *object,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data,
-                                GError *error);
-
-

g_simple_async_report_take_gerror_in_idle has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use g_task_report_error().

-
-

Reports an error in an idle function. Similar to -g_simple_async_report_gerror_in_idle(), but takes over the caller's -ownership of error -, so the caller does not have to free it any more.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

object

a GObject, or NULL.

[nullable]

callback

a GAsyncReadyCallback.

 

user_data

user data passed to callback -.

 

error

the GError to report

 
-
-

Since: 2.28

-
-
-
-

Types and Values

-
-

GSimpleAsyncResult

-
typedef struct _GSimpleAsyncResult GSimpleAsyncResult;
-

A simple implementation of GAsyncResult.

-
-
-
-

See Also

-

GAsyncResult, GTask

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSimpleIOStream.html b/docs/reference/gio/html/GSimpleIOStream.html deleted file mode 100644 index 98f48ba1f..000000000 --- a/docs/reference/gio/html/GSimpleIOStream.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - -GSimpleIOStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSimpleIOStream

-

GSimpleIOStream — A wrapper around an input and an output stream.

-
-
-

Functions

-
---- - - - - -
-GIOStream * - -g_simple_io_stream_new () -
-
-
-

Properties

-
----- - - - - - - - - - - - - -
-GInputStream *input-streamRead / Write / Construct Only
-GOutputStream *output-streamRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GSimpleIOStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GIOStream
-        ╰── GSimpleIOStream
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GSimpleIOStream creates a GIOStream from an arbitrary GInputStream and -GOutputStream. This allows any pair of input and output streams to be used -with GIOStream methods.

-

This is useful when you obtained a GInputStream and a GOutputStream -by other means, for instance creating them with platform specific methods as -g_unix_input_stream_new() or g_win32_input_stream_new(), and you want -to take advantage of the methods provided by GIOStream.

-
-
-

Functions

-
-

g_simple_io_stream_new ()

-
GIOStream *
-g_simple_io_stream_new (GInputStream *input_stream,
-                        GOutputStream *output_stream);
-

Creates a new GSimpleIOStream wrapping input_stream - and output_stream -. -See also GIOStream.

-
-

Parameters

-
----- - - - - - - - - - - - - -

input_stream

a GInputStream.

 

output_stream

a GOutputStream.

 
-
-
-

Returns

-

a new GSimpleIOStream instance.

-
-

Since: 2.44

-
-
-
-

Types and Values

-
-

GSimpleIOStream

-
typedef struct _GSimpleIOStream GSimpleIOStream;
-

A wrapper around a GInputStream and a GOutputStream.

-

Since: 2.44

-
-
-
-

Property Details

-
-

The “input-stream” property

-
  “input-stream”             GInputStream *
-

The GInputStream to read from.

-

Flags: Read / Write / Construct Only

-

Since: 2.44

-
-
-
-

The “output-stream” property

-
  “output-stream”            GOutputStream *
-

The GOutputStream to write to.

-

Flags: Read / Write / Construct Only

-

Since: 2.44

-
-
-
-

See Also

-

GIOStream

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSimplePermission.html b/docs/reference/gio/html/GSimplePermission.html deleted file mode 100644 index 35a967c82..000000000 --- a/docs/reference/gio/html/GSimplePermission.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - -GSimplePermission: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSimplePermission

-

GSimplePermission — A GPermission that doesn't change value

-
-
-

Functions

-
---- - - - - -
-GPermission * - -g_simple_permission_new () -
-
-
-

Types and Values

-
---- - - - - -
 GSimplePermission
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GPermission
-        ╰── GSimplePermission
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GSimplePermission is a trivial implementation of GPermission that -represents a permission that is either always or never allowed. The -value is given at construction and doesn't change.

-

Calling request or release will result in errors.

-
-
-

Functions

-
-

g_simple_permission_new ()

-
GPermission *
-g_simple_permission_new (gboolean allowed);
-

Creates a new GPermission instance that represents an action that is -either always or never allowed.

-
-

Parameters

-
----- - - - - - -

allowed

TRUE if the action is allowed

 
-
-
-

Returns

-

the GSimplePermission, as a GPermission

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GSimplePermission

-
typedef struct _GSimplePermission GSimplePermission;
-

GSimplePermission is an opaque data structure. There are no methods -except for those defined by GPermission.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSimpleProxyResolver.html b/docs/reference/gio/html/GSimpleProxyResolver.html deleted file mode 100644 index f7eb184e1..000000000 --- a/docs/reference/gio/html/GSimpleProxyResolver.html +++ /dev/null @@ -1,373 +0,0 @@ - - - - -GSimpleProxyResolver: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSimpleProxyResolver

-

GSimpleProxyResolver — Simple proxy resolver implementation

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
-GProxyResolver * - -g_simple_proxy_resolver_new () -
-void - -g_simple_proxy_resolver_set_default_proxy () -
-void - -g_simple_proxy_resolver_set_ignore_hosts () -
-void - -g_simple_proxy_resolver_set_uri_proxy () -
-
-
-

Properties

-
----- - - - - - - - - - - - - -
-gchar *default-proxyRead / Write
GStrvignore-hostsRead / Write
-
-
-

Types and Values

-
---- - - - - -
structGSimpleProxyResolver
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSimpleProxyResolver
-
-
-
-

Implemented Interfaces

-

-GSimpleProxyResolver implements - GProxyResolver.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GSimpleProxyResolver is a simple GProxyResolver implementation -that handles a single default proxy, multiple URI-scheme-specific -proxies, and a list of hosts that proxies should not be used for.

-

GSimpleProxyResolver is never the default proxy resolver, but it -can be used as the base class for another proxy resolver -implementation, or it can be created and used manually, such as -with g_socket_client_set_proxy_resolver().

-
-
-

Functions

-
-

g_simple_proxy_resolver_new ()

-
GProxyResolver *
-g_simple_proxy_resolver_new (const gchar *default_proxy,
-                             gchar **ignore_hosts);
-

Creates a new GSimpleProxyResolver. See -“default-proxy” and -“ignore-hosts” for more details on how the -arguments are interpreted.

-
-

Parameters

-
----- - - - - - - - - - - - - -

default_proxy

the default proxy to use, eg -"socks://192.168.1.1".

[nullable]

ignore_hosts

an optional list of hosts/IP addresses -to not use a proxy for.

[nullable]
-
-
-

Returns

-

(transfer full) a new GSimpleProxyResolver

-
-

Since: 2.36

-
-
-
-

g_simple_proxy_resolver_set_default_proxy ()

-
void
-g_simple_proxy_resolver_set_default_proxy
-                               (GSimpleProxyResolver *resolver,
-                                const gchar *default_proxy);
-

Sets the default proxy on resolver -, to be used for any URIs that -don't match “ignore-hosts” or a proxy set -via g_simple_proxy_resolver_set_uri_proxy().

-

If default_proxy - starts with "socks://", -GSimpleProxyResolver will treat it as referring to all three of -the socks5, socks4a, and socks4 proxy types.

-
-

Parameters

-
----- - - - - - - - - - - - - -

resolver

a GSimpleProxyResolver

 

default_proxy

the default proxy to use

 
-
-

Since: 2.36

-
-
-
-

g_simple_proxy_resolver_set_ignore_hosts ()

-
void
-g_simple_proxy_resolver_set_ignore_hosts
-                               (GSimpleProxyResolver *resolver,
-                                gchar **ignore_hosts);
-

Sets the list of ignored hosts.

-

See “ignore-hosts” for more details on how the -ignore_hosts - argument is interpreted.

-
-

Parameters

-
----- - - - - - - - - - - - - -

resolver

a GSimpleProxyResolver

 

ignore_hosts

NULL-terminated list of hosts/IP addresses -to not use a proxy for

 
-
-

Since: 2.36

-
-
-
-

g_simple_proxy_resolver_set_uri_proxy ()

-
void
-g_simple_proxy_resolver_set_uri_proxy (GSimpleProxyResolver *resolver,
-                                       const gchar *uri_scheme,
-                                       const gchar *proxy);
-

Adds a URI-scheme-specific proxy to resolver -; URIs whose scheme -matches uri_scheme - (and which don't match -“ignore-hosts”) will be proxied via proxy -.

-

As with “default-proxy”, if proxy - starts with -"socks://", GSimpleProxyResolver will treat it -as referring to all three of the socks5, socks4a, and socks4 proxy -types.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

resolver

a GSimpleProxyResolver

 

uri_scheme

the URI scheme to add a proxy for

 

proxy

the proxy to use for uri_scheme -

 
-
-

Since: 2.36

-
-
-
-

Types and Values

-
-

struct GSimpleProxyResolver

-
struct GSimpleProxyResolver;
-

A GProxyResolver implementation for using a fixed set of proxies.

-
-
-
-

Property Details

-
-

The “default-proxy” property

-
  “default-proxy”            gchar *
-

The default proxy URI that will be used for any URI that doesn't -match “ignore-hosts”, and doesn't match any -of the schemes set with g_simple_proxy_resolver_set_uri_proxy().

-

Note that as a special case, if this URI starts with -"socks://", GSimpleProxyResolver will treat it as referring -to all three of the socks5, socks4a, and socks4 proxy types.

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “ignore-hosts” property

-
  “ignore-hosts”             GStrv
-

A list of hostnames and IP addresses that the resolver should -allow direct connections to.

-

Entries can be in one of 4 formats:

-
    -
  • A hostname, such as "example.com", ".example.com", or -"*.example.com", any of which match "example.com" or -any subdomain of it.

  • -
  • An IPv4 or IPv6 address, such as "192.168.1.1", -which matches only that address.

  • -
  • A hostname or IP address followed by a port, such as -"example.com:80", which matches whatever the hostname or IP -address would match, but only for URLs with the (explicitly) -indicated port. In the case of an IPv6 address, the address -part must appear in brackets: "[::1]:443"

  • -
  • An IP address range, given by a base address and prefix length, -such as "fe80::/10", which matches any address in that range.

  • -
-

Note that when dealing with Unicode hostnames, the matching is -done against the ASCII form of the name.

-

Also note that hostname exclusions apply only to connections made -to hosts identified by name, and IP address exclusions apply only -to connections made to hosts identified by address. That is, if -example.com has an address of 192.168.1.1, and the :ignore-hosts list -contains only "192.168.1.1", then a connection to "example.com" -(eg, via a GNetworkAddress) will use the proxy, and a connection to -"192.168.1.1" (eg, via a GInetSocketAddress) will not.

-

These rules match the "ignore-hosts"/"noproxy" rules most -commonly used by other applications.

-

Flags: Read / Write

-
-
-
-

See Also

-

g_socket_client_set_proxy_resolver()

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSocket.html b/docs/reference/gio/html/GSocket.html deleted file mode 100644 index 875d156a8..000000000 --- a/docs/reference/gio/html/GSocket.html +++ /dev/null @@ -1,4069 +0,0 @@ - - - - -GSocket: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSocket

-

GSocket — Low-level socket object

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -(*GSocketSourceFunc) () -
-GSocket * - -g_socket_new () -
-GSocket * - -g_socket_new_from_fd () -
-gboolean - -g_socket_bind () -
-gboolean - -g_socket_listen () -
-GSocket * - -g_socket_accept () -
-gboolean - -g_socket_connect () -
-gboolean - -g_socket_check_connect_result () -
-gssize - -g_socket_receive () -
-gssize - -g_socket_receive_from () -
-gssize - -g_socket_receive_message () -
-gint - -g_socket_receive_messages () -
-gssize - -g_socket_receive_with_blocking () -
-gssize - -g_socket_send () -
-gssize - -g_socket_send_to () -
-gssize - -g_socket_send_message () -
-gint - -g_socket_send_messages () -
-gssize - -g_socket_send_with_blocking () -
-gboolean - -g_socket_close () -
-gboolean - -g_socket_is_closed () -
-gboolean - -g_socket_shutdown () -
-gboolean - -g_socket_is_connected () -
-GSource * - -g_socket_create_source () -
-GIOCondition - -g_socket_condition_check () -
-gboolean - -g_socket_condition_wait () -
-gboolean - -g_socket_condition_timed_wait () -
-gssize - -g_socket_get_available_bytes () -
-void - -g_socket_set_listen_backlog () -
-gint - -g_socket_get_listen_backlog () -
-gboolean - -g_socket_get_blocking () -
-void - -g_socket_set_blocking () -
-gboolean - -g_socket_get_keepalive () -
-void - -g_socket_set_keepalive () -
-guint - -g_socket_get_timeout () -
-void - -g_socket_set_timeout () -
-void - -g_socket_set_ttl () -
-guint - -g_socket_get_ttl () -
-gboolean - -g_socket_get_broadcast () -
-void - -g_socket_set_broadcast () -
-gboolean - -g_socket_get_option () -
-gboolean - -g_socket_set_option () -
-GSocketFamily - -g_socket_get_family () -
-int - -g_socket_get_fd () -
-GSocketAddress * - -g_socket_get_local_address () -
-GSocketProtocol - -g_socket_get_protocol () -
-GSocketAddress * - -g_socket_get_remote_address () -
-GSocketType - -g_socket_get_socket_type () -
-gboolean - -g_socket_speaks_ipv4 () -
-GCredentials * - -g_socket_get_credentials () -
-gboolean - -g_socket_join_multicast_group () -
-gboolean - -g_socket_leave_multicast_group () -
-gboolean - -g_socket_get_multicast_loopback () -
-void - -g_socket_set_multicast_loopback () -
-guint - -g_socket_get_multicast_ttl () -
-void - -g_socket_set_multicast_ttl () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
gbooleanblockingRead / Write
gbooleanbroadcastRead / Write
GSocketFamilyfamilyRead / Write / Construct Only
gintfdRead / Write / Construct Only
gbooleankeepaliveRead / Write
gintlisten-backlogRead / Write
-GSocketAddress *local-addressRead
gbooleanmulticast-loopbackRead / Write
guintmulticast-ttlRead / Write
GSocketProtocolprotocolRead / Write / Construct Only
-GSocketAddress *remote-addressRead
guinttimeoutRead / Write
guintttlRead / Write
GSocketTypetypeRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 GSocket
enumGSocketType
enumGSocketProtocol
enumGSocketMsgFlags
structGInputVector
structGInputMessage
structGOutputVector
structGOutputMessage
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSocket
-
-
-
-

Implemented Interfaces

-

-GSocket implements - GInitable and GDatagramBased.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A GSocket is a low-level networking primitive. It is a more or less -direct mapping of the BSD socket API in a portable GObject based API. -It supports both the UNIX socket implementations and winsock2 on Windows.

-

GSocket is the platform independent base upon which the higher level -network primitives are based. Applications are not typically meant to -use it directly, but rather through classes like GSocketClient, -GSocketService and GSocketConnection. However there may be cases where -direct use of GSocket is useful.

-

GSocket implements the GInitable interface, so if it is manually constructed -by e.g. g_object_new() you must call g_initable_init() and check the -results before using the object. This is done automatically in -g_socket_new() and g_socket_new_from_fd(), so these functions can return -NULL.

-

Sockets operate in two general modes, blocking or non-blocking. When -in blocking mode all operations (which don’t take an explicit blocking -parameter) block until the requested operation -is finished or there is an error. In non-blocking mode all calls that -would block return immediately with a G_IO_ERROR_WOULD_BLOCK error. -To know when a call would successfully run you can call g_socket_condition_check(), -or g_socket_condition_wait(). You can also use g_socket_create_source() and -attach it to a GMainContext to get callbacks when I/O is possible. -Note that all sockets are always set to non blocking mode in the system, and -blocking mode is emulated in GSocket.

-

When working in non-blocking mode applications should always be able to -handle getting a G_IO_ERROR_WOULD_BLOCK error even when some other -function said that I/O was possible. This can easily happen in case -of a race condition in the application, but it can also happen for other -reasons. For instance, on Windows a socket is always seen as writable -until a write returns G_IO_ERROR_WOULD_BLOCK.

-

GSockets can be either connection oriented or datagram based. -For connection oriented types you must first establish a connection by -either connecting to an address or accepting a connection from another -address. For connectionless socket types the target/source address is -specified or received in each I/O operation.

-

All socket file descriptors are set to be close-on-exec.

-

Note that creating a GSocket causes the signal SIGPIPE to be -ignored for the remainder of the program. If you are writing a -command-line utility that uses GSocket, you may need to take into -account the fact that your program will not automatically be killed -if it tries to write to stdout after it has been closed.

-

Like most other APIs in GLib, GSocket is not inherently thread safe. To use -a GSocket concurrently from multiple threads, you must implement your own -locking.

-
-
-

Functions

-
-

GSocketSourceFunc ()

-
gboolean
-(*GSocketSourceFunc) (GSocket *socket,
-                      GIOCondition condition,
-                      gpointer user_data);
-

This is the function type of the callback used for the GSource -returned by g_socket_create_source().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

socket

the GSocket

 

condition

the current condition at the source fired.

 

user_data

data passed in by the user.

 
-
-
-

Returns

-

it should return FALSE if the source should be removed.

-
-

Since: 2.22

-
-
-
-

g_socket_new ()

-
GSocket *
-g_socket_new (GSocketFamily family,
-              GSocketType type,
-              GSocketProtocol protocol,
-              GError **error);
-

Creates a new GSocket with the defined family, type and protocol. -If protocol - is 0 (G_SOCKET_PROTOCOL_DEFAULT) the default protocol type -for the family and type is used.

-

The protocol - is a family and type specific int that specifies what -kind of protocol to use. GSocketProtocol lists several common ones. -Many families only support one protocol, and use 0 for this, others -support several and using 0 means to use the default protocol for -the family and type.

-

The protocol id is passed directly to the operating -system, so you can use protocols not listed in GSocketProtocol if you -know the protocol number used for it.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

family

the socket family to use, e.g. G_SOCKET_FAMILY_IPV4.

 

type

the socket type to use.

 

protocol

the id of the protocol to use, or 0 for default.

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

a GSocket or NULL on error. -Free the returned object with g_object_unref().

-
-

Since: 2.22

-
-
-
-

g_socket_new_from_fd ()

-
GSocket *
-g_socket_new_from_fd (gint fd,
-                      GError **error);
-

Creates a new GSocket from a native file descriptor -or winsock SOCKET handle.

-

This reads all the settings from the file descriptor so that -all properties should work. Note that the file descriptor -will be set to non-blocking mode, independent on the blocking -mode of the GSocket.

-

On success, the returned GSocket takes ownership of fd -. On failure, the -caller must close fd - themselves.

-

Since GLib 2.46, it is no longer a fatal error to call this on a non-socket -descriptor. Instead, a GError will be set with code G_IO_ERROR_FAILED

-
-

Parameters

-
----- - - - - - - - - - - - - -

fd

a native socket file descriptor.

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

a GSocket or NULL on error. -Free the returned object with g_object_unref().

-
-

Since: 2.22

-
-
-
-

g_socket_bind ()

-
gboolean
-g_socket_bind (GSocket *socket,
-               GSocketAddress *address,
-               gboolean allow_reuse,
-               GError **error);
-

When a socket is created it is attached to an address family, but it -doesn't have an address in this family. g_socket_bind() assigns the -address (sometimes called name) of the socket.

-

It is generally required to bind to a local address before you can -receive connections. (See g_socket_listen() and g_socket_accept() ). -In certain situations, you may also want to bind a socket that will be -used to initiate connections, though this is not normally required.

-

If socket - is a TCP socket, then allow_reuse - controls the setting -of the SO_REUSEADDR socket option; normally it should be TRUE for -server sockets (sockets that you will eventually call -g_socket_accept() on), and FALSE for client sockets. (Failing to -set this flag on a server socket may cause g_socket_bind() to return -G_IO_ERROR_ADDRESS_IN_USE if the server program is stopped and then -immediately restarted.)

-

If socket - is a UDP socket, then allow_reuse - determines whether or -not other UDP sockets can be bound to the same address at the same -time. In particular, you can have several UDP sockets bound to the -same address, and they will all receive all of the multicast and -broadcast packets sent to that address. (The behavior of unicast -UDP packets to an address with multiple listeners is not defined.)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket.

 

address

a GSocketAddress specifying the local address.

 

allow_reuse

whether to allow reusing this address

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

TRUE on success, FALSE on error.

-
-

Since: 2.22

-
-
-
-

g_socket_listen ()

-
gboolean
-g_socket_listen (GSocket *socket,
-                 GError **error);
-

Marks the socket as a server socket, i.e. a socket that is used -to accept incoming requests using g_socket_accept().

-

Before calling this the socket must be bound to a local address using -g_socket_bind().

-

To set the maximum amount of outstanding clients, use -g_socket_set_listen_backlog().

-
-

Parameters

-
----- - - - - - - - - - - - - -

socket

a GSocket.

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

TRUE on success, FALSE on error.

-
-

Since: 2.22

-
-
-
-

g_socket_accept ()

-
GSocket *
-g_socket_accept (GSocket *socket,
-                 GCancellable *cancellable,
-                 GError **error);
-

Accept incoming connections on a connection-based socket. This removes -the first outstanding connection request from the listening socket and -creates a GSocket object for it.

-

The socket - must be bound to a local address with g_socket_bind() and -must be listening for incoming connections (g_socket_listen()).

-

If there are no outstanding connections then the operation will block -or return G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled. -To be notified of an incoming connection, wait for the G_IO_IN condition.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

socket

a GSocket.

 

cancellable

a GCancellable or NULL.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

a new GSocket, or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_connect ()

-
gboolean
-g_socket_connect (GSocket *socket,
-                  GSocketAddress *address,
-                  GCancellable *cancellable,
-                  GError **error);
-

Connect the socket to the specified remote address.

-

For connection oriented socket this generally means we attempt to make -a connection to the address -. For a connection-less socket it sets -the default address for g_socket_send() and discards all incoming datagrams -from other sources.

-

Generally connection oriented sockets can only connect once, but -connection-less sockets can connect multiple times to change the -default address.

-

If the connect call needs to do network I/O it will block, unless -non-blocking I/O is enabled. Then G_IO_ERROR_PENDING is returned -and the user can be notified of the connection finishing by waiting -for the G_IO_OUT condition. The result of the connection must then be -checked with g_socket_check_connect_result().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket.

 

address

a GSocketAddress specifying the remote address.

 

cancellable

a GCancellable or NULL.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

TRUE if connected, FALSE on error.

-
-

Since: 2.22

-
-
-
-

g_socket_check_connect_result ()

-
gboolean
-g_socket_check_connect_result (GSocket *socket,
-                               GError **error);
-

Checks and resets the pending connect error for the socket. -This is used to check for errors when g_socket_connect() is -used in non-blocking mode.

-
-

Parameters

-
----- - - - - - - - - - - - - -

socket

a GSocket

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

TRUE if no error, FALSE otherwise, setting error -to the error

-
-

Since: 2.22

-
-
-
-

g_socket_receive ()

-
gssize
-g_socket_receive (GSocket *socket,
-                  gchar *buffer,
-                  gsize size,
-                  GCancellable *cancellable,
-                  GError **error);
-

Receive data (up to size - bytes) from a socket. This is mainly used by -connection-oriented sockets; it is identical to g_socket_receive_from() -with address - set to NULL.

-

For G_SOCKET_TYPE_DATAGRAM and G_SOCKET_TYPE_SEQPACKET sockets, -g_socket_receive() will always read either 0 or 1 complete messages from -the socket. If the received message is too large to fit in buffer -, then -the data beyond size - bytes will be discarded, without any explicit -indication that this has occurred.

-

For G_SOCKET_TYPE_STREAM sockets, g_socket_receive() can return any -number of bytes, up to size -. If more than size - bytes have been -received, the additional data will be returned in future calls to -g_socket_receive().

-

If the socket is in blocking mode the call will block until there -is some data to receive, the connection is closed, or there is an -error. If there is no data available and the socket is in -non-blocking mode, a G_IO_ERROR_WOULD_BLOCK error will be -returned. To be notified when data is available, wait for the -G_IO_IN condition.

-

On error -1 is returned and error - is set accordingly.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket

 

buffer

a buffer to -read data into (which should be at least size -bytes long).

[array length=size][element-type guint8]

size

the number of bytes you want to read from the socket

 

cancellable

a GCancellable or NULL.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

Number of bytes read, or 0 if the connection was closed by -the peer, or -1 on error

-
-

Since: 2.22

-
-
-
-

g_socket_receive_from ()

-
gssize
-g_socket_receive_from (GSocket *socket,
-                       GSocketAddress **address,
-                       gchar *buffer,
-                       gsize size,
-                       GCancellable *cancellable,
-                       GError **error);
-

Receive data (up to size - bytes) from a socket.

-

If address - is non-NULL then address - will be set equal to the -source address of the received packet. -address - is owned by the caller.

-

See g_socket_receive() for additional information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket

 

address

a pointer to a GSocketAddress -pointer, or NULL.

[out][optional]

buffer

a buffer to -read data into (which should be at least size -bytes long).

[array length=size][element-type guint8]

size

the number of bytes you want to read from the socket

 

cancellable

a GCancellable or NULL.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

Number of bytes read, or 0 if the connection was closed by -the peer, or -1 on error

-
-

Since: 2.22

-
-
-
-

g_socket_receive_message ()

-
gssize
-g_socket_receive_message (GSocket *socket,
-                          GSocketAddress **address,
-                          GInputVector *vectors,
-                          gint num_vectors,
-                          GSocketControlMessage ***messages,
-                          gint *num_messages,
-                          gint *flags,
-                          GCancellable *cancellable,
-                          GError **error);
-

Receive data from a socket. For receiving multiple messages, see -g_socket_receive_messages(); for easier use, see -g_socket_receive() and g_socket_receive_from().

-

If address - is non-NULL then address - will be set equal to the -source address of the received packet. -address - is owned by the caller.

-

vector - must point to an array of GInputVector structs and -num_vectors - must be the length of this array. These structs -describe the buffers that received data will be scattered into. -If num_vectors - is -1, then vectors - is assumed to be terminated -by a GInputVector with a NULL buffer pointer.

-

As a special case, if num_vectors - is 0 (in which case, vectors - -may of course be NULL), then a single byte is received and -discarded. This is to facilitate the common practice of sending a -single '\0' byte for the purposes of transferring ancillary data.

-

messages -, if non-NULL, will be set to point to a newly-allocated -array of GSocketControlMessage instances or NULL if no such -messages was received. These correspond to the control messages -received from the kernel, one GSocketControlMessage per message -from the kernel. This array is NULL-terminated and must be freed -by the caller using g_free() after calling g_object_unref() on each -element. If messages - is NULL, any control messages received will -be discarded.

-

num_messages -, if non-NULL, will be set to the number of control -messages received.

-

If both messages - and num_messages - are non-NULL, then -num_messages - gives the number of GSocketControlMessage instances -in messages - (ie: not including the NULL terminator).

-

flags - is an in/out parameter. The commonly available arguments -for this are available in the GSocketMsgFlags enum, but the -values there are the same as the system values, and the flags -are passed in as-is, so you can pass in system-specific flags too -(and g_socket_receive_message() may pass system-specific flags out). -Flags passed in to the parameter affect the receive operation; flags returned -out of it are relevant to the specific returned message.

-

As with g_socket_receive(), data may be discarded if socket - is -G_SOCKET_TYPE_DATAGRAM or G_SOCKET_TYPE_SEQPACKET and you do not -provide enough buffer space to read a complete message. You can pass -G_SOCKET_MSG_PEEK in flags - to peek at the current message without -removing it from the receive queue, but there is no portable way to find -out the length of the message other than by reading it into a -sufficiently-large buffer.

-

If the socket is in blocking mode the call will block until there -is some data to receive, the connection is closed, or there is an -error. If there is no data available and the socket is in -non-blocking mode, a G_IO_ERROR_WOULD_BLOCK error will be -returned. To be notified when data is available, wait for the -G_IO_IN condition.

-

On error -1 is returned and error - is set accordingly.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket

 

address

a pointer to a GSocketAddress -pointer, or NULL.

[out][optional]

vectors

an array of GInputVector structs.

[array length=num_vectors]

num_vectors

the number of elements in vectors -, or -1

 

messages

a pointer which -may be filled with an array of GSocketControlMessages, or NULL.

[array length=num_messages][out][optional]

num_messages

a pointer which will be filled with the number of -elements in messages -, or NULL.

[out]

flags

a pointer to an int containing GSocketMsgFlags flags.

[inout]

cancellable

a GCancellable or NULL

 

error

a GError pointer, or NULL

 
-
-
-

Returns

-

Number of bytes read, or 0 if the connection was closed by -the peer, or -1 on error

-
-

Since: 2.22

-
-
-
-

g_socket_receive_messages ()

-
gint
-g_socket_receive_messages (GSocket *socket,
-                           GInputMessage *messages,
-                           guint num_messages,
-                           gint flags,
-                           GCancellable *cancellable,
-                           GError **error);
-

Receive multiple data messages from socket - in one go. This is the most -complicated and fully-featured version of this call. For easier use, see -g_socket_receive(), g_socket_receive_from(), and g_socket_receive_message().

-

messages - must point to an array of GInputMessage structs and -num_messages - must be the length of this array. Each GInputMessage -contains a pointer to an array of GInputVector structs describing the -buffers that the data received in each message will be written to. Using -multiple GInputVectors is more memory-efficient than manually copying data -out of a single buffer to multiple sources, and more system-call-efficient -than making multiple calls to g_socket_receive(), such as in scenarios where -a lot of data packets need to be received (e.g. high-bandwidth video -streaming over RTP/UDP).

-

flags - modify how all messages are received. The commonly available -arguments for this are available in the GSocketMsgFlags enum, but the -values there are the same as the system values, and the flags -are passed in as-is, so you can pass in system-specific flags too. These -flags affect the overall receive operation. Flags affecting individual -messages are returned in GInputMessage.flags.

-

The other members of GInputMessage are treated as described in its -documentation.

-

If “blocking” is TRUE the call will block until num_messages - have -been received, or the end of the stream is reached.

-

If “blocking” is FALSE the call will return up to num_messages - -without blocking, or G_IO_ERROR_WOULD_BLOCK if no messages are queued in the -operating system to be received.

-

In blocking mode, if “timeout” is positive and is reached before any -messages are received, G_IO_ERROR_TIMED_OUT is returned, otherwise up to -num_messages - are returned. (Note: This is effectively the -behaviour of MSG_WAITFORONE with recvmmsg().)

-

To be notified when messages are available, wait for the -G_IO_IN condition. Note though that you may still receive -G_IO_ERROR_WOULD_BLOCK from g_socket_receive_messages() even if you were -previously notified of a G_IO_IN condition.

-

If the remote peer closes the connection, any messages queued in the -operating system will be returned, and subsequent calls to -g_socket_receive_messages() will return 0 (with no error set).

-

On error -1 is returned and error - is set accordingly. An error will only -be returned if zero messages could be received; otherwise the number of -messages successfully received before the error will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket

 

messages

an array of GInputMessage structs.

[array length=num_messages]

num_messages

the number of elements in messages -

 

flags

an int containing GSocketMsgFlags flags for the overall operation

 

cancellable

a GCancellable or NULL.

[nullable]

error

GError for error reporting, or NULL to ignore

 
-
-
-

Returns

-

number of messages received, or -1 on error. Note that the number -of messages received may be smaller than num_messages -if in non-blocking -mode, if the peer closed the connection, or if num_messages -was larger than UIO_MAXIOV (1024), in which case the caller may re-try -to receive the remaining messages.

-
-

Since: 2.48

-
-
-
-

g_socket_receive_with_blocking ()

-
gssize
-g_socket_receive_with_blocking (GSocket *socket,
-                                gchar *buffer,
-                                gsize size,
-                                gboolean blocking,
-                                GCancellable *cancellable,
-                                GError **error);
-

This behaves exactly the same as g_socket_receive(), except that -the choice of blocking or non-blocking behavior is determined by -the blocking - argument rather than by socket -'s properties.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket

 

buffer

a buffer to -read data into (which should be at least size -bytes long).

[array length=size][element-type guint8]

size

the number of bytes you want to read from the socket

 

blocking

whether to do blocking or non-blocking I/O

 

cancellable

a GCancellable or NULL.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

Number of bytes read, or 0 if the connection was closed by -the peer, or -1 on error

-
-

Since: 2.26

-
-
-
-

g_socket_send ()

-
gssize
-g_socket_send (GSocket *socket,
-               const gchar *buffer,
-               gsize size,
-               GCancellable *cancellable,
-               GError **error);
-

Tries to send size - bytes from buffer - on the socket. This is -mainly used by connection-oriented sockets; it is identical to -g_socket_send_to() with address - set to NULL.

-

If the socket is in blocking mode the call will block until there is -space for the data in the socket queue. If there is no space available -and the socket is in non-blocking mode a G_IO_ERROR_WOULD_BLOCK error -will be returned. To be notified when space is available, wait for the -G_IO_OUT condition. Note though that you may still receive -G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously -notified of a G_IO_OUT condition. (On Windows in particular, this is -very common due to the way the underlying APIs work.)

-

On error -1 is returned and error - is set accordingly.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket

 

buffer

the buffer -containing the data to send.

[array length=size][element-type guint8]

size

the number of bytes to send

 

cancellable

a GCancellable or NULL.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

Number of bytes written (which may be less than size -), or -1 -on error

-
-

Since: 2.22

-
-
-
-

g_socket_send_to ()

-
gssize
-g_socket_send_to (GSocket *socket,
-                  GSocketAddress *address,
-                  const gchar *buffer,
-                  gsize size,
-                  GCancellable *cancellable,
-                  GError **error);
-

Tries to send size - bytes from buffer - to address -. If address - is -NULL then the message is sent to the default receiver (set by -g_socket_connect()).

-

See g_socket_send() for additional information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket

 

address

a GSocketAddress, or NULL.

[nullable]

buffer

the buffer -containing the data to send.

[array length=size][element-type guint8]

size

the number of bytes to send

 

cancellable

a GCancellable or NULL.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

Number of bytes written (which may be less than size -), or -1 -on error

-
-

Since: 2.22

-
-
-
-

g_socket_send_message ()

-
gssize
-g_socket_send_message (GSocket *socket,
-                       GSocketAddress *address,
-                       GOutputVector *vectors,
-                       gint num_vectors,
-                       GSocketControlMessage **messages,
-                       gint num_messages,
-                       gint flags,
-                       GCancellable *cancellable,
-                       GError **error);
-

Send data to address - on socket -. For sending multiple messages see -g_socket_send_messages(); for easier use, see -g_socket_send() and g_socket_send_to().

-

If address - is NULL then the message is sent to the default receiver -(set by g_socket_connect()).

-

vectors - must point to an array of GOutputVector structs and -num_vectors - must be the length of this array. (If num_vectors - is -1, -then vectors - is assumed to be terminated by a GOutputVector with a -NULL buffer pointer.) The GOutputVector structs describe the buffers -that the sent data will be gathered from. Using multiple -GOutputVectors is more memory-efficient than manually copying -data from multiple sources into a single buffer, and more -network-efficient than making multiple calls to g_socket_send().

-

messages -, if non-NULL, is taken to point to an array of num_messages - -GSocketControlMessage instances. These correspond to the control -messages to be sent on the socket. -If num_messages - is -1 then messages - is treated as a NULL-terminated -array.

-

flags - modify how the message is sent. The commonly available arguments -for this are available in the GSocketMsgFlags enum, but the -values there are the same as the system values, and the flags -are passed in as-is, so you can pass in system-specific flags too.

-

If the socket is in blocking mode the call will block until there is -space for the data in the socket queue. If there is no space available -and the socket is in non-blocking mode a G_IO_ERROR_WOULD_BLOCK error -will be returned. To be notified when space is available, wait for the -G_IO_OUT condition. Note though that you may still receive -G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously -notified of a G_IO_OUT condition. (On Windows in particular, this is -very common due to the way the underlying APIs work.)

-

On error -1 is returned and error - is set accordingly.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket

 

address

a GSocketAddress, or NULL.

[nullable]

vectors

an array of GOutputVector structs.

[array length=num_vectors]

num_vectors

the number of elements in vectors -, or -1

 

messages

a pointer to an -array of GSocketControlMessages, or NULL.

[array length=num_messages][nullable]

num_messages

number of elements in messages -, or -1.

 

flags

an int containing GSocketMsgFlags flags

 

cancellable

a GCancellable or NULL.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

Number of bytes written (which may be less than size -), or -1 -on error

-
-

Since: 2.22

-
-
-
-

g_socket_send_messages ()

-
gint
-g_socket_send_messages (GSocket *socket,
-                        GOutputMessage *messages,
-                        guint num_messages,
-                        gint flags,
-                        GCancellable *cancellable,
-                        GError **error);
-

Send multiple data messages from socket - in one go. This is the most -complicated and fully-featured version of this call. For easier use, see -g_socket_send(), g_socket_send_to(), and g_socket_send_message().

-

messages - must point to an array of GOutputMessage structs and -num_messages - must be the length of this array. Each GOutputMessage -contains an address to send the data to, and a pointer to an array of -GOutputVector structs to describe the buffers that the data to be sent -for each message will be gathered from. Using multiple GOutputVectors is -more memory-efficient than manually copying data from multiple sources -into a single buffer, and more network-efficient than making multiple -calls to g_socket_send(). Sending multiple messages in one go avoids the -overhead of making a lot of syscalls in scenarios where a lot of data -packets need to be sent (e.g. high-bandwidth video streaming over RTP/UDP), -or where the same data needs to be sent to multiple recipients.

-

flags - modify how the message is sent. The commonly available arguments -for this are available in the GSocketMsgFlags enum, but the -values there are the same as the system values, and the flags -are passed in as-is, so you can pass in system-specific flags too.

-

If the socket is in blocking mode the call will block until there is -space for all the data in the socket queue. If there is no space available -and the socket is in non-blocking mode a G_IO_ERROR_WOULD_BLOCK error -will be returned if no data was written at all, otherwise the number of -messages sent will be returned. To be notified when space is available, -wait for the G_IO_OUT condition. Note though that you may still receive -G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously -notified of a G_IO_OUT condition. (On Windows in particular, this is -very common due to the way the underlying APIs work.)

-

On error -1 is returned and error - is set accordingly. An error will only -be returned if zero messages could be sent; otherwise the number of messages -successfully sent before the error will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket

 

messages

an array of GOutputMessage structs.

[array length=num_messages]

num_messages

the number of elements in messages -

 

flags

an int containing GSocketMsgFlags flags

 

cancellable

a GCancellable or NULL.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

number of messages sent, or -1 on error. Note that the number of -messages sent may be smaller than num_messages -if the socket is -non-blocking or if num_messages -was larger than UIO_MAXIOV (1024), -in which case the caller may re-try to send the remaining messages.

-
-

Since: 2.44

-
-
-
-

g_socket_send_with_blocking ()

-
gssize
-g_socket_send_with_blocking (GSocket *socket,
-                             const gchar *buffer,
-                             gsize size,
-                             gboolean blocking,
-                             GCancellable *cancellable,
-                             GError **error);
-

This behaves exactly the same as g_socket_send(), except that -the choice of blocking or non-blocking behavior is determined by -the blocking - argument rather than by socket -'s properties.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket

 

buffer

the buffer -containing the data to send.

[array length=size][element-type guint8]

size

the number of bytes to send

 

blocking

whether to do blocking or non-blocking I/O

 

cancellable

a GCancellable or NULL.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

Number of bytes written (which may be less than size -), or -1 -on error

-
-

Since: 2.26

-
-
-
-

g_socket_close ()

-
gboolean
-g_socket_close (GSocket *socket,
-                GError **error);
-

Closes the socket, shutting down any active connection.

-

Closing a socket does not wait for all outstanding I/O operations -to finish, so the caller should not rely on them to be guaranteed -to complete even if the close returns with no error.

-

Once the socket is closed, all other operations will return -G_IO_ERROR_CLOSED. Closing a socket multiple times will not -return an error.

-

Sockets will be automatically closed when the last reference -is dropped, but you might want to call this function to make sure -resources are released as early as possible.

-

Beware that due to the way that TCP works, it is possible for -recently-sent data to be lost if either you close a socket while the -G_IO_IN condition is set, or else if the remote connection tries to -send something to you after you close the socket but before it has -finished reading all of the data you sent. There is no easy generic -way to avoid this problem; the easiest fix is to design the network -protocol such that the client will never send data "out of turn". -Another solution is for the server to half-close the connection by -calling g_socket_shutdown() with only the shutdown_write - flag set, -and then wait for the client to notice this and close its side of the -connection, after which the server can safely call g_socket_close(). -(This is what GTcpConnection does if you call -g_tcp_connection_set_graceful_disconnect(). But of course, this -only works if the client will close its connection after the server -does.)

-
-

Parameters

-
----- - - - - - - - - - - - - -

socket

a GSocket

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

TRUE on success, FALSE on error

-
-

Since: 2.22

-
-
-
-

g_socket_is_closed ()

-
gboolean
-g_socket_is_closed (GSocket *socket);
-

Checks whether a socket is closed.

-
-

Parameters

-
----- - - - - - -

socket

a GSocket

 
-
-
-

Returns

-

TRUE if socket is closed, FALSE otherwise

-
-

Since: 2.22

-
-
-
-

g_socket_shutdown ()

-
gboolean
-g_socket_shutdown (GSocket *socket,
-                   gboolean shutdown_read,
-                   gboolean shutdown_write,
-                   GError **error);
-

Shut down part or all of a full-duplex connection.

-

If shutdown_read - is TRUE then the receiving side of the connection -is shut down, and further reading is disallowed.

-

If shutdown_write - is TRUE then the sending side of the connection -is shut down, and further writing is disallowed.

-

It is allowed for both shutdown_read - and shutdown_write - to be TRUE.

-

One example where it is useful to shut down only one side of a connection is -graceful disconnect for TCP connections where you close the sending side, -then wait for the other side to close the connection, thus ensuring that the -other side saw all sent data.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket

 

shutdown_read

whether to shut down the read side

 

shutdown_write

whether to shut down the write side

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

TRUE on success, FALSE on error

-
-

Since: 2.22

-
-
-
-

g_socket_is_connected ()

-
gboolean
-g_socket_is_connected (GSocket *socket);
-

Check whether the socket is connected. This is only useful for -connection-oriented sockets.

-

If using g_socket_shutdown(), this function will return TRUE until the -socket has been shut down for reading and writing. If you do a non-blocking -connect, this function will not return TRUE until after you call -g_socket_check_connect_result().

-
-

Parameters

-
----- - - - - - -

socket

a GSocket.

 
-
-
-

Returns

-

TRUE if socket is connected, FALSE otherwise.

-
-

Since: 2.22

-
-
-
-

g_socket_create_source ()

-
GSource *
-g_socket_create_source (GSocket *socket,
-                        GIOCondition condition,
-                        GCancellable *cancellable);
-

Creates a GSource that can be attached to a GMainContext to monitor -for the availability of the specified condition - on the socket. The GSource -keeps a reference to the socket -.

-

The callback on the source is of the GSocketSourceFunc type.

-

It is meaningless to specify G_IO_ERR or G_IO_HUP in condition -; -these conditions will always be reported output if they are true.

-

cancellable - if not NULL can be used to cancel the source, which will -cause the source to trigger, reporting the current condition (which -is likely 0 unless cancellation happened at the same time as a -condition change). You can check for this in the callback using -g_cancellable_is_cancelled().

-

If socket - has a timeout set, and it is reached before condition - -occurs, the source will then trigger anyway, reporting G_IO_IN or -G_IO_OUT depending on condition -. However, socket - will have been -marked as having had a timeout, and so the next GSocket I/O method -you call will then fail with a G_IO_ERROR_TIMED_OUT.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

socket

a GSocket

 

condition

a GIOCondition mask to monitor

 

cancellable

a GCancellable or NULL.

[nullable]
-
-
-

Returns

-

a newly allocated GSource, free with g_source_unref().

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_condition_check ()

-
GIOCondition
-g_socket_condition_check (GSocket *socket,
-                          GIOCondition condition);
-

Checks on the readiness of socket - to perform operations. -The operations specified in condition - are checked for and masked -against the currently-satisfied conditions on socket -. The result -is returned.

-

Note that on Windows, it is possible for an operation to return -G_IO_ERROR_WOULD_BLOCK even immediately after -g_socket_condition_check() has claimed that the socket is ready for -writing. Rather than calling g_socket_condition_check() and then -writing to the socket if it succeeds, it is generally better to -simply try writing to the socket right away, and try again later if -the initial attempt returns G_IO_ERROR_WOULD_BLOCK.

-

It is meaningless to specify G_IO_ERR or G_IO_HUP in condition; -these conditions will always be set in the output if they are true.

-

This call never blocks.

-
-

Parameters

-
----- - - - - - - - - - - - - -

socket

a GSocket

 

condition

a GIOCondition mask to check

 
-
-
-

Returns

-

the GIOCondition -mask of the current state

-
-

Since: 2.22

-
-
-
-

g_socket_condition_wait ()

-
gboolean
-g_socket_condition_wait (GSocket *socket,
-                         GIOCondition condition,
-                         GCancellable *cancellable,
-                         GError **error);
-

Waits for condition - to become true on socket -. When the condition -is met, TRUE is returned.

-

If cancellable - is cancelled before the condition is met, or if the -socket has a timeout set and it is reached before the condition is -met, then FALSE is returned and error -, if non-NULL, is set to -the appropriate value (G_IO_ERROR_CANCELLED or -G_IO_ERROR_TIMED_OUT).

-

See also g_socket_condition_timed_wait().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket

 

condition

a GIOCondition mask to wait for

 

cancellable

a GCancellable, or NULL.

[nullable]

error

a GError pointer, or NULL

 
-
-
-

Returns

-

TRUE if the condition was met, FALSE otherwise

-
-

Since: 2.22

-
-
-
-

g_socket_condition_timed_wait ()

-
gboolean
-g_socket_condition_timed_wait (GSocket *socket,
-                               GIOCondition condition,
-                               gint64 timeout,
-                               GCancellable *cancellable,
-                               GError **error);
-

Waits for up to timeout - microseconds for condition - to become true -on socket -. If the condition is met, TRUE is returned.

-

If cancellable - is cancelled before the condition is met, or if -timeout - (or the socket's “timeout”) is reached before the -condition is met, then FALSE is returned and error -, if non-NULL, -is set to the appropriate value (G_IO_ERROR_CANCELLED or -G_IO_ERROR_TIMED_OUT).

-

If you don't want a timeout, use g_socket_condition_wait(). -(Alternatively, you can pass -1 for timeout -.)

-

Note that although timeout - is in microseconds for consistency with -other GLib APIs, this function actually only has millisecond -resolution, and the behavior is undefined if timeout - is not an -exact number of milliseconds.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket

 

condition

a GIOCondition mask to wait for

 

timeout

the maximum time (in microseconds) to wait, or -1

 

cancellable

a GCancellable, or NULL.

[nullable]

error

a GError pointer, or NULL

 
-
-
-

Returns

-

TRUE if the condition was met, FALSE otherwise

-
-

Since: 2.32

-
-
-
-

g_socket_get_available_bytes ()

-
gssize
-g_socket_get_available_bytes (GSocket *socket);
-

Get the amount of data pending in the OS input buffer, without blocking.

-

If socket - is a UDP or SCTP socket, this will return the size of -just the next packet, even if additional packets are buffered after -that one.

-

Note that on Windows, this function is rather inefficient in the -UDP case, and so if you know any plausible upper bound on the size -of the incoming packet, it is better to just do a -g_socket_receive() with a buffer of that size, rather than calling -g_socket_get_available_bytes() first and then doing a receive of -exactly the right size.

-
-

Parameters

-
----- - - - - - -

socket

a GSocket

 
-
-
-

Returns

-

the number of bytes that can be read from the socket -without blocking or truncating, or -1 on error.

-
-

Since: 2.32

-
-
-
-

g_socket_set_listen_backlog ()

-
void
-g_socket_set_listen_backlog (GSocket *socket,
-                             gint backlog);
-

Sets the maximum number of outstanding connections allowed -when listening on this socket. If more clients than this are -connecting to the socket and the application is not handling them -on time then the new connections will be refused.

-

Note that this must be called before g_socket_listen() and has no -effect if called after that.

-
-

Parameters

-
----- - - - - - - - - - - - - -

socket

a GSocket.

 

backlog

the maximum number of pending connections.

 
-
-

Since: 2.22

-
-
-
-

g_socket_get_listen_backlog ()

-
gint
-g_socket_get_listen_backlog (GSocket *socket);
-

Gets the listen backlog setting of the socket. For details on this, -see g_socket_set_listen_backlog().

-
-

Parameters

-
----- - - - - - -

socket

a GSocket.

 
-
-
-

Returns

-

the maximum number of pending connections.

-
-

Since: 2.22

-
-
-
-

g_socket_get_blocking ()

-
gboolean
-g_socket_get_blocking (GSocket *socket);
-

Gets the blocking mode of the socket. For details on blocking I/O, -see g_socket_set_blocking().

-
-

Parameters

-
----- - - - - - -

socket

a GSocket.

 
-
-
-

Returns

-

TRUE if blocking I/O is used, FALSE otherwise.

-
-

Since: 2.22

-
-
-
-

g_socket_set_blocking ()

-
void
-g_socket_set_blocking (GSocket *socket,
-                       gboolean blocking);
-

Sets the blocking mode of the socket. In blocking mode -all operations (which don’t take an explicit blocking parameter) block until -they succeed or there is an error. In -non-blocking mode all functions return results immediately or -with a G_IO_ERROR_WOULD_BLOCK error.

-

All sockets are created in blocking mode. However, note that the -platform level socket is always non-blocking, and blocking mode -is a GSocket level feature.

-
-

Parameters

-
----- - - - - - - - - - - - - -

socket

a GSocket.

 

blocking

Whether to use blocking I/O or not.

 
-
-

Since: 2.22

-
-
-
-

g_socket_get_keepalive ()

-
gboolean
-g_socket_get_keepalive (GSocket *socket);
-

Gets the keepalive mode of the socket. For details on this, -see g_socket_set_keepalive().

-
-

Parameters

-
----- - - - - - -

socket

a GSocket.

 
-
-
-

Returns

-

TRUE if keepalive is active, FALSE otherwise.

-
-

Since: 2.22

-
-
-
-

g_socket_set_keepalive ()

-
void
-g_socket_set_keepalive (GSocket *socket,
-                        gboolean keepalive);
-

Sets or unsets the SO_KEEPALIVE flag on the underlying socket. When -this flag is set on a socket, the system will attempt to verify that the -remote socket endpoint is still present if a sufficiently long period of -time passes with no data being exchanged. If the system is unable to -verify the presence of the remote endpoint, it will automatically close -the connection.

-

This option is only functional on certain kinds of sockets. (Notably, -G_SOCKET_PROTOCOL_TCP sockets.)

-

The exact time between pings is system- and protocol-dependent, but will -normally be at least two hours. Most commonly, you would set this flag -on a server socket if you want to allow clients to remain idle for long -periods of time, but also want to ensure that connections are eventually -garbage-collected if clients crash or become unreachable.

-
-

Parameters

-
----- - - - - - - - - - - - - -

socket

a GSocket.

 

keepalive

Value for the keepalive flag

 
-
-

Since: 2.22

-
-
-
-

g_socket_get_timeout ()

-
guint
-g_socket_get_timeout (GSocket *socket);
-

Gets the timeout setting of the socket. For details on this, see -g_socket_set_timeout().

-
-

Parameters

-
----- - - - - - -

socket

a GSocket.

 
-
-
-

Returns

-

the timeout in seconds

-
-

Since: 2.26

-
-
-
-

g_socket_set_timeout ()

-
void
-g_socket_set_timeout (GSocket *socket,
-                      guint timeout);
-

Sets the time in seconds after which I/O operations on socket - will -time out if they have not yet completed.

-

On a blocking socket, this means that any blocking GSocket -operation will time out after timeout - seconds of inactivity, -returning G_IO_ERROR_TIMED_OUT.

-

On a non-blocking socket, calls to g_socket_condition_wait() will -also fail with G_IO_ERROR_TIMED_OUT after the given time. Sources -created with g_socket_create_source() will trigger after -timeout - seconds of inactivity, with the requested condition -set, at which point calling g_socket_receive(), g_socket_send(), -g_socket_check_connect_result(), etc, will fail with -G_IO_ERROR_TIMED_OUT.

-

If timeout - is 0 (the default), operations will never time out -on their own.

-

Note that if an I/O operation is interrupted by a signal, this may -cause the timeout to be reset.

-
-

Parameters

-
----- - - - - - - - - - - - - -

socket

a GSocket.

 

timeout

the timeout for socket -, in seconds, or 0 for none

 
-
-

Since: 2.26

-
-
-
-

g_socket_set_ttl ()

-
void
-g_socket_set_ttl (GSocket *socket,
-                  guint ttl);
-

Sets the time-to-live for outgoing unicast packets on socket -. -By default the platform-specific default value is used.

-
-

Parameters

-
----- - - - - - - - - - - - - -

socket

a GSocket.

 

ttl

the time-to-live value for all unicast packets on socket -

 
-
-

Since: 2.32

-
-
-
-

g_socket_get_ttl ()

-
guint
-g_socket_get_ttl (GSocket *socket);
-

Gets the unicast time-to-live setting on socket -; see -g_socket_set_ttl() for more details.

-
-

Parameters

-
----- - - - - - -

socket

a GSocket.

 
-
-
-

Returns

-

the time-to-live setting on socket -

-
-

Since: 2.32

-
-
-
-

g_socket_get_broadcast ()

-
gboolean
-g_socket_get_broadcast (GSocket *socket);
-

Gets the broadcast setting on socket -; if TRUE, -it is possible to send packets to broadcast -addresses.

-
-

Parameters

-
----- - - - - - -

socket

a GSocket.

 
-
-
-

Returns

-

the broadcast setting on socket -

-
-

Since: 2.32

-
-
-
-

g_socket_set_broadcast ()

-
void
-g_socket_set_broadcast (GSocket *socket,
-                        gboolean broadcast);
-

Sets whether socket - should allow sending to broadcast addresses. -This is FALSE by default.

-
-

Parameters

-
----- - - - - - - - - - - - - -

socket

a GSocket.

 

broadcast

whether socket -should allow sending to broadcast -addresses

 
-
-

Since: 2.32

-
-
-
-

g_socket_get_option ()

-
gboolean
-g_socket_get_option (GSocket *socket,
-                     gint level,
-                     gint optname,
-                     gint *value,
-                     GError **error);
-

Gets the value of an integer-valued option on socket -, as with -getsockopt(). (If you need to fetch a non-integer-valued option, -you will need to call getsockopt() directly.)

-

The <gio/gnetworking.h> -header pulls in system headers that will define most of the -standard/portable socket options. For unusual socket protocols or -platform-dependent options, you may need to include additional -headers.

-

Note that even for socket options that are a single byte in size, -value - is still a pointer to a gint variable, not a guchar; -g_socket_get_option() will handle the conversion internally.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket

 

level

the "API level" of the option (eg, SOL_SOCKET)

 

optname

the "name" of the option (eg, SO_BROADCAST)

 

value

return location for the option value.

[out]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

success or failure. On failure, error -will be set, and -the system error value (errno or WSAGetLastError()) will still -be set to the result of the getsockopt() call.

-
-

Since: 2.36

-
-
-
-

g_socket_set_option ()

-
gboolean
-g_socket_set_option (GSocket *socket,
-                     gint level,
-                     gint optname,
-                     gint value,
-                     GError **error);
-

Sets the value of an integer-valued option on socket -, as with -setsockopt(). (If you need to set a non-integer-valued option, -you will need to call setsockopt() directly.)

-

The <gio/gnetworking.h> -header pulls in system headers that will define most of the -standard/portable socket options. For unusual socket protocols or -platform-dependent options, you may need to include additional -headers.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket

 

level

the "API level" of the option (eg, SOL_SOCKET)

 

optname

the "name" of the option (eg, SO_BROADCAST)

 

value

the value to set the option to

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

success or failure. On failure, error -will be set, and -the system error value (errno or WSAGetLastError()) will still -be set to the result of the setsockopt() call.

-
-

Since: 2.36

-
-
-
-

g_socket_get_family ()

-
GSocketFamily
-g_socket_get_family (GSocket *socket);
-

Gets the socket family of the socket.

-
-

Parameters

-
----- - - - - - -

socket

a GSocket.

 
-
-
-

Returns

-

a GSocketFamily

-
-

Since: 2.22

-
-
-
-

g_socket_get_fd ()

-
int
-g_socket_get_fd (GSocket *socket);
-

Returns the underlying OS socket object. On unix this -is a socket file descriptor, and on Windows this is -a Winsock2 SOCKET handle. This may be useful for -doing platform specific or otherwise unusual operations -on the socket.

-
-

Parameters

-
----- - - - - - -

socket

a GSocket.

 
-
-
-

Returns

-

the file descriptor of the socket.

-
-

Since: 2.22

-
-
-
-

g_socket_get_local_address ()

-
GSocketAddress *
-g_socket_get_local_address (GSocket *socket,
-                            GError **error);
-

Try to get the local address of a bound socket. This is only -useful if the socket has been bound to a local address, -either explicitly or implicitly when connecting.

-
-

Parameters

-
----- - - - - - - - - - - - - -

socket

a GSocket.

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

a GSocketAddress or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_get_protocol ()

-
GSocketProtocol
-g_socket_get_protocol (GSocket *socket);
-

Gets the socket protocol id the socket was created with. -In case the protocol is unknown, -1 is returned.

-
-

Parameters

-
----- - - - - - -

socket

a GSocket.

 
-
-
-

Returns

-

a protocol id, or -1 if unknown

-
-

Since: 2.22

-
-
-
-

g_socket_get_remote_address ()

-
GSocketAddress *
-g_socket_get_remote_address (GSocket *socket,
-                             GError **error);
-

Try to get the remove address of a connected socket. This is only -useful for connection oriented sockets that have been connected.

-
-

Parameters

-
----- - - - - - - - - - - - - -

socket

a GSocket.

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

a GSocketAddress or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_get_socket_type ()

-
GSocketType
-g_socket_get_socket_type (GSocket *socket);
-

Gets the socket type of the socket.

-
-

Parameters

-
----- - - - - - -

socket

a GSocket.

 
-
-
-

Returns

-

a GSocketType

-
-

Since: 2.22

-
-
-
-

g_socket_speaks_ipv4 ()

-
gboolean
-g_socket_speaks_ipv4 (GSocket *socket);
-

Checks if a socket is capable of speaking IPv4.

-

IPv4 sockets are capable of speaking IPv4. On some operating systems -and under some combinations of circumstances IPv6 sockets are also -capable of speaking IPv4. See RFC 3493 section 3.7 for more -information.

-

No other types of sockets are currently considered as being capable -of speaking IPv4.

-
-

Parameters

-
----- - - - - - -

socket

a GSocket

 
-
-
-

Returns

-

TRUE if this socket can be used with IPv4.

-
-

Since: 2.22

-
-
-
-

g_socket_get_credentials ()

-
GCredentials *
-g_socket_get_credentials (GSocket *socket,
-                          GError **error);
-

Returns the credentials of the foreign process connected to this -socket, if any (e.g. it is only supported for G_SOCKET_FAMILY_UNIX -sockets).

-

If this operation isn't supported on the OS, the method fails with -the G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented -by reading the SO_PEERCRED option on the underlying socket.

-

Other ways to obtain credentials from a foreign peer includes the -GUnixCredentialsMessage type and -g_unix_connection_send_credentials() / -g_unix_connection_receive_credentials() functions.

-
-

Parameters

-
----- - - - - - - - - - - - - -

socket

a GSocket.

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

NULL if error -is set, otherwise a GCredentials object -that must be freed with g_object_unref().

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_socket_join_multicast_group ()

-
gboolean
-g_socket_join_multicast_group (GSocket *socket,
-                               GInetAddress *group,
-                               gboolean source_specific,
-                               const gchar *iface,
-                               GError **error);
-

Registers socket - to receive multicast messages sent to group -. -socket - must be a G_SOCKET_TYPE_DATAGRAM socket, and must have -been bound to an appropriate interface and port with -g_socket_bind().

-

If iface - is NULL, the system will automatically pick an interface -to bind to based on group -.

-

If source_specific - is TRUE, source-specific multicast as defined -in RFC 4604 is used. Note that on older platforms this may fail -with a G_IO_ERROR_NOT_SUPPORTED error.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket.

 

group

a GInetAddress specifying the group address to join.

 

iface

Name of the interface to use, or NULL.

[nullable]

source_specific

TRUE if source-specific multicast should be used

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

TRUE on success, FALSE on error.

-
-

Since: 2.32

-
-
-
-

g_socket_leave_multicast_group ()

-
gboolean
-g_socket_leave_multicast_group (GSocket *socket,
-                                GInetAddress *group,
-                                gboolean source_specific,
-                                const gchar *iface,
-                                GError **error);
-

Removes socket - from the multicast group defined by group -, iface -, -and source_specific - (which must all have the same values they had -when you joined the group).

-

socket - remains bound to its address and port, and can still receive -unicast messages after calling this.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

socket

a GSocket.

 

group

a GInetAddress specifying the group address to leave.

 

iface

Interface used.

[nullable]

source_specific

TRUE if source-specific multicast was used

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

TRUE on success, FALSE on error.

-
-

Since: 2.32

-
-
-
-

g_socket_get_multicast_loopback ()

-
gboolean
-g_socket_get_multicast_loopback (GSocket *socket);
-

Gets the multicast loopback setting on socket -; if TRUE (the -default), outgoing multicast packets will be looped back to -multicast listeners on the same host.

-
-

Parameters

-
----- - - - - - -

socket

a GSocket.

 
-
-
-

Returns

-

the multicast loopback setting on socket -

-
-

Since: 2.32

-
-
-
-

g_socket_set_multicast_loopback ()

-
void
-g_socket_set_multicast_loopback (GSocket *socket,
-                                 gboolean loopback);
-

Sets whether outgoing multicast packets will be received by sockets -listening on that multicast address on the same host. This is TRUE -by default.

-
-

Parameters

-
----- - - - - - - - - - - - - -

socket

a GSocket.

 

loopback

whether socket -should receive messages sent to its -multicast groups from the local host

 
-
-

Since: 2.32

-
-
-
-

g_socket_get_multicast_ttl ()

-
guint
-g_socket_get_multicast_ttl (GSocket *socket);
-

Gets the multicast time-to-live setting on socket -; see -g_socket_set_multicast_ttl() for more details.

-
-

Parameters

-
----- - - - - - -

socket

a GSocket.

 
-
-
-

Returns

-

the multicast time-to-live setting on socket -

-
-

Since: 2.32

-
-
-
-

g_socket_set_multicast_ttl ()

-
void
-g_socket_set_multicast_ttl (GSocket *socket,
-                            guint ttl);
-

Sets the time-to-live for outgoing multicast datagrams on socket -. -By default, this is 1, meaning that multicast packets will not leave -the local network.

-
-

Parameters

-
----- - - - - - - - - - - - - -

socket

a GSocket.

 

ttl

the time-to-live value for all multicast datagrams on socket -

 
-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

GSocket

-
typedef struct _GSocket GSocket;
-

A lowlevel network socket object.

-

Since: 2.22

-
-
-
-

enum GSocketType

-

Flags used when creating a GSocket. Some protocols may not implement -all the socket types.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_SOCKET_TYPE_INVALID

-

Type unknown or wrong

-
 

G_SOCKET_TYPE_STREAM

-

Reliable connection-based byte streams (e.g. TCP).

-
 

G_SOCKET_TYPE_DATAGRAM

-

Connectionless, unreliable datagram passing. - (e.g. UDP)

-
 

G_SOCKET_TYPE_SEQPACKET

-

Reliable connection-based passing of datagrams - of fixed maximum length (e.g. SCTP).

-
 
-
-

Since: 2.22

-
-
-
-

enum GSocketProtocol

-

A protocol identifier is specified when creating a GSocket, which is a -family/type specific identifier, where 0 means the default protocol for -the particular family/type.

-

This enum contains a set of commonly available and used protocols. You -can also pass any other identifiers handled by the platform in order to -use protocols not listed here.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_SOCKET_PROTOCOL_UNKNOWN

-

The protocol type is unknown

-
 

G_SOCKET_PROTOCOL_DEFAULT

-

The default protocol for the family/type

-
 

G_SOCKET_PROTOCOL_TCP

-

TCP over IP

-
 

G_SOCKET_PROTOCOL_UDP

-

UDP over IP

-
 

G_SOCKET_PROTOCOL_SCTP

-

SCTP over IP

-
 
-
-

Since: 2.22

-
-
-
-

enum GSocketMsgFlags

-

Flags used in g_socket_receive_message() and g_socket_send_message(). -The flags listed in the enum are some commonly available flags, but the -values used for them are the same as on the platform, and any other flags -are passed in/out as is. So to use a platform specific flag, just include -the right system header and pass in the flag.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_SOCKET_MSG_NONE

-

No flags.

-
 

G_SOCKET_MSG_OOB

-

Request to send/receive out of band data.

-
 

G_SOCKET_MSG_PEEK

-

Read data from the socket without removing it from - the queue.

-
 

G_SOCKET_MSG_DONTROUTE

-

Don't use a gateway to send out the packet, - only send to hosts on directly connected networks.

-
 
-
-

Since: 2.22

-
-
-
-

struct GInputVector

-
struct GInputVector {
-  gpointer buffer;
-  gsize size;
-};
-
-

Structure used for scatter/gather data input. -You generally pass in an array of GInputVectors -and the operation will store the read data starting in the -first buffer, switching to the next as needed.

-
-

Members

-
----- - - - - - - - - - - - - -

gpointer buffer;

Pointer to a buffer where data will be written.

 

gsize size;

the available size in buffer -.

 
-
-

Since: 2.22

-
-
-
-

struct GInputMessage

-
struct GInputMessage {
-  GSocketAddress         **address;
-
-  GInputVector            *vectors;
-  guint                    num_vectors;
-
-  gsize                    bytes_received;
-  gint                     flags;
-
-  GSocketControlMessage ***control_messages;
-  guint                   *num_control_messages;
-};
-
-

Structure used for scatter/gather data input when receiving multiple -messages or packets in one go. You generally pass in an array of empty -GInputVectors and the operation will use all the buffers as if they -were one buffer, and will set bytes_received - to the total number of bytes -received across all GInputVectors.

-

This structure closely mirrors struct mmsghdr and struct msghdr from -the POSIX sockets API (see man 2 recvmmsg).

-

If address - is non-NULL then it is set to the source address the message -was received from, and the caller must free it afterwards.

-

If control_messages - is non-NULL then it is set to an array of control -messages received with the message (if any), and the caller must free it -afterwards. num_control_messages - is set to the number of elements in -this array, which may be zero.

-

Flags relevant to this message will be returned in flags -. For example, -MSG_EOR or MSG_TRUNC.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

GSocketAddress **address;

return location -for a GSocketAddress, or NULL.

[optional][out][transfer full]

GInputVector *vectors;

pointer to an -array of input vectors.

[array length=num_vectors][out]

guint num_vectors;

the number of input vectors pointed to by vectors -

 

gsize bytes_received;

will be set to the number of bytes that have been -received.

[out]

gint flags;

collection of GSocketMsgFlags for the received message, -outputted by the call.

[out]

GSocketControlMessage ***control_messages;

(array length=num_control_messages) (optional) -(out) (transfer full): return location for a -caller-allocated array of GSocketControlMessages, or NULL

 

guint *num_control_messages;

return location for the number of -elements in control_messages -.

[out][optional]
-
-

Since: 2.48

-
-
-
-

struct GOutputVector

-
struct GOutputVector {
-  gconstpointer buffer;
-  gsize size;
-};
-
-

Structure used for scatter/gather data output. -You generally pass in an array of GOutputVectors -and the operation will use all the buffers as if they were -one buffer.

-
-

Members

-
----- - - - - - - - - - - - - -

gconstpointer buffer;

Pointer to a buffer of data to read.

 

gsize size;

the size of buffer -.

 
-
-

Since: 2.22

-
-
-
-

struct GOutputMessage

-
struct GOutputMessage {
-  GSocketAddress         *address;
-
-  GOutputVector          *vectors;
-  guint                   num_vectors;
-
-  guint                   bytes_sent;
-
-  GSocketControlMessage **control_messages;
-  guint                   num_control_messages;
-};
-
-

Structure used for scatter/gather data output when sending multiple -messages or packets in one go. You generally pass in an array of -GOutputVectors and the operation will use all the buffers as if they -were one buffer.

-

If address - is NULL then the message is sent to the default receiver -(as previously set by g_socket_connect()).

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

GSocketAddress *address;

a GSocketAddress, or NULL.

[nullable]

GOutputVector *vectors;

pointer to an array of output vectors

 

guint num_vectors;

the number of output vectors pointed to by vectors -.

 

guint bytes_sent;

initialize to 0. Will be set to the number of bytes -that have been sent

 

GSocketControlMessage **control_messages;

a pointer -to an array of GSocketControlMessages, or NULL.

[array length=num_control_messages][nullable]

guint num_control_messages;

number of elements in control_messages -.

 
-
-

Since: 2.44

-
-
-
-

Property Details

-
-

The “blocking” property

-
  “blocking”                 gboolean
-

Whether or not I/O on this socket is blocking.

-

Flags: Read / Write

-

Default value: TRUE

-
-
-
-

The “broadcast” property

-
  “broadcast”                gboolean
-

Whether the socket should allow sending to broadcast addresses.

-

Flags: Read / Write

-

Default value: FALSE

-

Since: 2.32

-
-
-
-

The “family” property

-
  “family”                   GSocketFamily
-

The sockets address family.

-

Flags: Read / Write / Construct Only

-

Default value: G_SOCKET_FAMILY_INVALID

-
-
-
-

The “fd” property

-
  “fd”                       gint
-

The sockets file descriptor.

-

Flags: Read / Write / Construct Only

-

Default value: -1

-
-
-
-

The “keepalive” property

-
  “keepalive”                gboolean
-

Keep connection alive by sending periodic pings.

-

Flags: Read / Write

-

Default value: FALSE

-
-
-
-

The “listen-backlog” property

-
  “listen-backlog”           gint
-

Outstanding connections in the listen queue.

-

Flags: Read / Write

-

Allowed values: [0,128]

-

Default value: 10

-
-
-
-

The “local-address” property

-
  “local-address”            GSocketAddress *
-

The local address the socket is bound to.

-

Flags: Read

-
-
-
-

The “multicast-loopback” property

-
  “multicast-loopback”       gboolean
-

Whether outgoing multicast packets loop back to the local host.

-

Flags: Read / Write

-

Default value: TRUE

-

Since: 2.32

-
-
-
-

The “multicast-ttl” property

-
  “multicast-ttl”            guint
-

Time-to-live out outgoing multicast packets

-

Flags: Read / Write

-

Default value: 1

-

Since: 2.32

-
-
-
-

The “protocol” property

-
  “protocol”                 GSocketProtocol
-

The id of the protocol to use, or -1 for unknown.

-

Flags: Read / Write / Construct Only

-

Default value: G_SOCKET_PROTOCOL_UNKNOWN

-
-
-
-

The “remote-address” property

-
  “remote-address”           GSocketAddress *
-

The remote address the socket is connected to.

-

Flags: Read

-
-
-
-

The “timeout” property

-
  “timeout”                  guint
-

The timeout in seconds on socket I/O

-

Flags: Read / Write

-

Default value: 0

-

Since: 2.26

-
-
-
-

The “ttl” property

-
  “ttl”                      guint
-

Time-to-live for outgoing unicast packets

-

Flags: Read / Write

-

Default value: 0

-

Since: 2.32

-
-
-
-

The “type” property

-
  “type”                     GSocketType
-

The sockets type.

-

Flags: Read / Write / Construct Only

-

Default value: G_SOCKET_TYPE_STREAM

-
-
-
-

See Also

-

GInitable, <gnetworking.h>

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSocketAddress.html b/docs/reference/gio/html/GSocketAddress.html deleted file mode 100644 index 3f244a7ac..000000000 --- a/docs/reference/gio/html/GSocketAddress.html +++ /dev/null @@ -1,369 +0,0 @@ - - - - -GSocketAddress: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSocketAddress

-

GSocketAddress — Abstract base class representing endpoints - for socket communication

-
-
-

Functions

- -
-
-

Properties

-
----- - - - - - -
GSocketFamilyfamilyRead
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GSocketAddress
enumGSocketFamily
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSocketAddress
-        ├── GInetSocketAddress
-        ╰── GUnixSocketAddress
-
-
-
-

Implemented Interfaces

-

-GSocketAddress implements - GSocketConnectable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GSocketAddress is the equivalent of struct sockaddr in the BSD -sockets API. This is an abstract class; use GInetSocketAddress -for internet sockets, or GUnixSocketAddress for UNIX domain sockets.

-
-
-

Functions

-
-

g_socket_address_new_from_native ()

-
GSocketAddress *
-g_socket_address_new_from_native (gpointer native,
-                                  gsize len);
-

Creates a GSocketAddress subclass corresponding to the native -struct sockaddr native -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

native

a pointer to a struct sockaddr.

[not nullable]

len

the size of the memory location pointed to by native -

 
-
-
-

Returns

-

a new GSocketAddress if native -could successfully -be converted, otherwise NULL

-
-

Since: 2.22

-
-
-
-

g_socket_address_get_family ()

-
GSocketFamily
-g_socket_address_get_family (GSocketAddress *address);
-

Gets the socket family type of address -.

-
-

Parameters

-
----- - - - - - -

address

a GSocketAddress

 
-
-
-

Returns

-

the socket family type of address -

-
-

Since: 2.22

-
-
-
-

g_socket_address_to_native ()

-
gboolean
-g_socket_address_to_native (GSocketAddress *address,
-                            gpointer dest,
-                            gsize destlen,
-                            GError **error);
-

Converts a GSocketAddress to a native struct sockaddr, which can -be passed to low-level functions like connect() or bind().

-

If not enough space is available, a G_IO_ERROR_NO_SPACE error -is returned. If the address type is not known on the system -then a G_IO_ERROR_NOT_SUPPORTED error is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

address

a GSocketAddress

 

dest

a pointer to a memory location that will contain the native -struct sockaddr

 

destlen

the size of dest -. Must be at least as large as -g_socket_address_get_native_size()

 

error

GError for error reporting, or NULL to ignore

 
-
-
-

Returns

-

TRUE if dest -was filled in, FALSE on error

-
-

Since: 2.22

-
-
-
-

g_socket_address_get_native_size ()

-
gssize
-g_socket_address_get_native_size (GSocketAddress *address);
-

Gets the size of address -'s native struct sockaddr. -You can use this to allocate memory to pass to -g_socket_address_to_native().

-
-

Parameters

-
----- - - - - - -

address

a GSocketAddress

 
-
-
-

Returns

-

the size of the native struct sockaddr that -address -represents

-
-

Since: 2.22

-
-
-
-

Types and Values

-
-

GSocketAddress

-
typedef struct _GSocketAddress GSocketAddress;
-

A socket endpoint address, corresponding to struct sockaddr -or one of its subtypes.

-
-
-
-

enum GSocketFamily

-

The protocol family of a GSocketAddress. (These values are -identical to the system defines AF_INET, AF_INET6 and AF_UNIX, -if available.)

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_SOCKET_FAMILY_INVALID

-

no address family

-
 

G_SOCKET_FAMILY_UNIX

-

the UNIX domain family

-
 

G_SOCKET_FAMILY_IPV4

-

the IPv4 family

-
 

G_SOCKET_FAMILY_IPV6

-

the IPv6 family

-
 
-
-

Since: 2.22

-
-
-
-

Property Details

-
-

The “family” property

-
  “family”                   GSocketFamily
-

The family of the socket address.

-

Flags: Read

-

Default value: G_SOCKET_FAMILY_INVALID

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSocketClient.html b/docs/reference/gio/html/GSocketClient.html deleted file mode 100644 index a6315772b..000000000 --- a/docs/reference/gio/html/GSocketClient.html +++ /dev/null @@ -1,2070 +0,0 @@ - - - - -GSocketClient: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSocketClient

-

GSocketClient — Helper for connecting to a network service

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GSocketClient * - -g_socket_client_new () -
-GSocketConnection * - -g_socket_client_connect () -
-void - -g_socket_client_connect_async () -
-GSocketConnection * - -g_socket_client_connect_finish () -
-GSocketConnection * - -g_socket_client_connect_to_host () -
-void - -g_socket_client_connect_to_host_async () -
-GSocketConnection * - -g_socket_client_connect_to_host_finish () -
-GSocketConnection * - -g_socket_client_connect_to_service () -
-void - -g_socket_client_connect_to_service_async () -
-GSocketConnection * - -g_socket_client_connect_to_service_finish () -
-GSocketConnection * - -g_socket_client_connect_to_uri () -
-void - -g_socket_client_connect_to_uri_async () -
-GSocketConnection * - -g_socket_client_connect_to_uri_finish () -
-void - -g_socket_client_set_family () -
-void - -g_socket_client_set_local_address () -
-void - -g_socket_client_set_protocol () -
-void - -g_socket_client_set_socket_type () -
-void - -g_socket_client_set_timeout () -
-void - -g_socket_client_set_enable_proxy () -
-void - -g_socket_client_set_proxy_resolver () -
-void - -g_socket_client_set_tls () -
-void - -g_socket_client_set_tls_validation_flags () -
-GSocketFamily - -g_socket_client_get_family () -
-GSocketAddress * - -g_socket_client_get_local_address () -
-GSocketProtocol - -g_socket_client_get_protocol () -
-GSocketType - -g_socket_client_get_socket_type () -
-guint - -g_socket_client_get_timeout () -
-gboolean - -g_socket_client_get_enable_proxy () -
-GProxyResolver * - -g_socket_client_get_proxy_resolver () -
-gboolean - -g_socket_client_get_tls () -
-GTlsCertificateFlags - -g_socket_client_get_tls_validation_flags () -
-void - -g_socket_client_add_application_proxy () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
gbooleanenable-proxyRead / Write / Construct
GSocketFamilyfamilyRead / Write / Construct
-GSocketAddress *local-addressRead / Write / Construct
GSocketProtocolprotocolRead / Write / Construct
-GProxyResolver *proxy-resolverRead / Write / Construct
guinttimeoutRead / Write / Construct
gbooleantlsRead / Write / Construct
GTlsCertificateFlagstls-validation-flagsRead / Write / Construct
GSocketTypetypeRead / Write / Construct
-
-
-

Signals

-
----- - - - - - -
voideventRun Last
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GSocketClient
enumGSocketClientEvent
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSocketClient
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GSocketClient is a lightweight high-level utility class for connecting to -a network host using a connection oriented socket type.

-

You create a GSocketClient object, set any options you want, and then -call a sync or async connect operation, which returns a GSocketConnection -subclass on success.

-

The type of the GSocketConnection object returned depends on the type of -the underlying socket that is in use. For instance, for a TCP/IP connection -it will be a GTcpConnection.

-

As GSocketClient is a lightweight object, you don't need to cache it. You -can just create a new one any time you need one.

-
-
-

Functions

-
-

g_socket_client_new ()

-
GSocketClient *
-g_socket_client_new (void);
-

Creates a new GSocketClient with the default options.

-
-

Returns

-

a GSocketClient. -Free the returned object with g_object_unref().

-
-

Since: 2.22

-
-
-
-

g_socket_client_connect ()

-
GSocketConnection *
-g_socket_client_connect (GSocketClient *client,
-                         GSocketConnectable *connectable,
-                         GCancellable *cancellable,
-                         GError **error);
-

Tries to resolve the connectable - and make a network connection to it.

-

Upon a successful connection, a new GSocketConnection is constructed -and returned. The caller owns this new object and must drop their -reference to it when finished with it.

-

The type of the GSocketConnection object returned depends on the type of -the underlying socket that is used. For instance, for a TCP/IP connection -it will be a GTcpConnection.

-

The socket created will be the same family as the address that the -connectable - resolves to, unless family is set with g_socket_client_set_family() -or indirectly via g_socket_client_set_local_address(). The socket type -defaults to G_SOCKET_TYPE_STREAM but can be set with -g_socket_client_set_socket_type().

-

If a local address is specified with g_socket_client_set_local_address() the -socket will be bound to this address before connecting.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

client

a GSocketClient.

 

connectable

a GSocketConnectable specifying the remote address.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

a GSocketConnection on success, NULL on error.

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_client_connect_async ()

-
void
-g_socket_client_connect_async (GSocketClient *client,
-                               GSocketConnectable *connectable,
-                               GCancellable *cancellable,
-                               GAsyncReadyCallback callback,
-                               gpointer user_data);
-

This is the asynchronous version of g_socket_client_connect().

-

When the operation is finished callback - will be -called. You can then call g_socket_client_connect_finish() to get -the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

client

a GSocketClient

 

connectable

a GSocketConnectable specifying the remote address.

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

user data for the callback.

[closure]
-
-

Since: 2.22

-
-
-
-

g_socket_client_connect_finish ()

-
GSocketConnection *
-g_socket_client_connect_finish (GSocketClient *client,
-                                GAsyncResult *result,
-                                GError **error);
-

Finishes an async connect operation. See g_socket_client_connect_async()

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

client

a GSocketClient.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

a GSocketConnection on success, NULL on error.

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_client_connect_to_host ()

-
GSocketConnection *
-g_socket_client_connect_to_host (GSocketClient *client,
-                                 const gchar *host_and_port,
-                                 guint16 default_port,
-                                 GCancellable *cancellable,
-                                 GError **error);
-

This is a helper function for g_socket_client_connect().

-

Attempts to create a TCP connection to the named host.

-

host_and_port - may be in any of a number of recognized formats; an IPv6 -address, an IPv4 address, or a domain name (in which case a DNS -lookup is performed). Quoting with [] is supported for all address -types. A port override may be specified in the usual way with a -colon. Ports may be given as decimal numbers or symbolic names (in -which case an /etc/services lookup is performed).

-

If no port override is given in host_and_port - then default_port - will be -used as the port number to connect to.

-

In general, host_and_port - is expected to be provided by the user (allowing -them to give the hostname, and a port override if necessary) and -default_port - is expected to be provided by the application.

-

In the case that an IP address is given, a single connection -attempt is made. In the case that a name is given, multiple -connection attempts may be made, in turn and according to the -number of address records in DNS, until a connection succeeds.

-

Upon a successful connection, a new GSocketConnection is constructed -and returned. The caller owns this new object and must drop their -reference to it when finished with it.

-

In the event of any failure (DNS error, service not found, no hosts -connectable) NULL is returned and error - (if non-NULL) is set -accordingly.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

client

a GSocketClient

 

host_and_port

the name and optionally port of the host to connect to

 

default_port

the default port to connect to

 

cancellable

a GCancellable, or NULL.

[nullable]

error

a pointer to a GError, or NULL

 
-
-
-

Returns

-

a GSocketConnection on success, NULL on error.

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_client_connect_to_host_async ()

-
void
-g_socket_client_connect_to_host_async (GSocketClient *client,
-                                       const gchar *host_and_port,
-                                       guint16 default_port,
-                                       GCancellable *cancellable,
-                                       GAsyncReadyCallback callback,
-                                       gpointer user_data);
-

This is the asynchronous version of g_socket_client_connect_to_host().

-

When the operation is finished callback - will be -called. You can then call g_socket_client_connect_to_host_finish() to get -the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

client

a GSocketClient

 

host_and_port

the name and optionally the port of the host to connect to

 

default_port

the default port to connect to

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

user data for the callback.

[closure]
-
-

Since: 2.22

-
-
-
-

g_socket_client_connect_to_host_finish ()

-
GSocketConnection *
-g_socket_client_connect_to_host_finish
-                               (GSocketClient *client,
-                                GAsyncResult *result,
-                                GError **error);
-

Finishes an async connect operation. See g_socket_client_connect_to_host_async()

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

client

a GSocketClient.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

a GSocketConnection on success, NULL on error.

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_client_connect_to_service ()

-
GSocketConnection *
-g_socket_client_connect_to_service (GSocketClient *client,
-                                    const gchar *domain,
-                                    const gchar *service,
-                                    GCancellable *cancellable,
-                                    GError **error);
-

Attempts to create a TCP connection to a service.

-

This call looks up the SRV record for service - at domain - for the -"tcp" protocol. It then attempts to connect, in turn, to each of -the hosts providing the service until either a connection succeeds -or there are no hosts remaining.

-

Upon a successful connection, a new GSocketConnection is constructed -and returned. The caller owns this new object and must drop their -reference to it when finished with it.

-

In the event of any failure (DNS error, service not found, no hosts -connectable) NULL is returned and error - (if non-NULL) is set -accordingly.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

client

a GSocketConnection

 

domain

a domain name

 

service

the name of the service to connect to

 

cancellable

a GCancellable, or NULL.

[nullable]

error

a pointer to a GError, or NULL

 
-
-
-

Returns

-

a GSocketConnection if successful, or NULL on error.

-

[transfer full]

-
-
-
-
-

g_socket_client_connect_to_service_async ()

-
void
-g_socket_client_connect_to_service_async
-                               (GSocketClient *client,
-                                const gchar *domain,
-                                const gchar *service,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

This is the asynchronous version of -g_socket_client_connect_to_service().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

client

a GSocketClient

 

domain

a domain name

 

service

the name of the service to connect to

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

user data for the callback.

[closure]
-
-

Since: 2.22

-
-
-
-

g_socket_client_connect_to_service_finish ()

-
GSocketConnection *
-g_socket_client_connect_to_service_finish
-                               (GSocketClient *client,
-                                GAsyncResult *result,
-                                GError **error);
-

Finishes an async connect operation. See g_socket_client_connect_to_service_async()

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

client

a GSocketClient.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

a GSocketConnection on success, NULL on error.

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_client_connect_to_uri ()

-
GSocketConnection *
-g_socket_client_connect_to_uri (GSocketClient *client,
-                                const gchar *uri,
-                                guint16 default_port,
-                                GCancellable *cancellable,
-                                GError **error);
-

This is a helper function for g_socket_client_connect().

-

Attempts to create a TCP connection with a network URI.

-

uri - may be any valid URI containing an "authority" (hostname/port) -component. If a port is not specified in the URI, default_port - -will be used. TLS will be negotiated if “tls” is TRUE. -(GSocketClient does not know to automatically assume TLS for -certain URI schemes.)

-

Using this rather than g_socket_client_connect() or -g_socket_client_connect_to_host() allows GSocketClient to -determine when to use application-specific proxy protocols.

-

Upon a successful connection, a new GSocketConnection is constructed -and returned. The caller owns this new object and must drop their -reference to it when finished with it.

-

In the event of any failure (DNS error, service not found, no hosts -connectable) NULL is returned and error - (if non-NULL) is set -accordingly.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

client

a GSocketClient

 

uri

A network URI

 

default_port

the default port to connect to

 

cancellable

a GCancellable, or NULL.

[nullable]

error

a pointer to a GError, or NULL

 
-
-
-

Returns

-

a GSocketConnection on success, NULL on error.

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_socket_client_connect_to_uri_async ()

-
void
-g_socket_client_connect_to_uri_async (GSocketClient *client,
-                                      const gchar *uri,
-                                      guint16 default_port,
-                                      GCancellable *cancellable,
-                                      GAsyncReadyCallback callback,
-                                      gpointer user_data);
-

This is the asynchronous version of g_socket_client_connect_to_uri().

-

When the operation is finished callback - will be -called. You can then call g_socket_client_connect_to_uri_finish() to get -the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

client

a GSocketClient

 

uri

a network uri

 

default_port

the default port to connect to

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

user data for the callback.

[closure]
-
-

Since: 2.26

-
-
-
-

g_socket_client_connect_to_uri_finish ()

-
GSocketConnection *
-g_socket_client_connect_to_uri_finish (GSocketClient *client,
-                                       GAsyncResult *result,
-                                       GError **error);
-

Finishes an async connect operation. See g_socket_client_connect_to_uri_async()

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

client

a GSocketClient.

 

result

a GAsyncResult.

 

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

a GSocketConnection on success, NULL on error.

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_socket_client_set_family ()

-
void
-g_socket_client_set_family (GSocketClient *client,
-                            GSocketFamily family);
-

Sets the socket family of the socket client. -If this is set to something other than G_SOCKET_FAMILY_INVALID -then the sockets created by this object will be of the specified -family.

-

This might be useful for instance if you want to force the local -connection to be an ipv4 socket, even though the address might -be an ipv6 mapped to ipv4 address.

-
-

Parameters

-
----- - - - - - - - - - - - - -

client

a GSocketClient.

 

family

a GSocketFamily

 
-
-

Since: 2.22

-
-
-
-

g_socket_client_set_local_address ()

-
void
-g_socket_client_set_local_address (GSocketClient *client,
-                                   GSocketAddress *address);
-

Sets the local address of the socket client. -The sockets created by this object will bound to the -specified address (if not NULL) before connecting.

-

This is useful if you want to ensure that the local -side of the connection is on a specific port, or on -a specific interface.

-
-

Parameters

-
----- - - - - - - - - - - - - -

client

a GSocketClient.

 

address

a GSocketAddress, or NULL.

[nullable]
-
-

Since: 2.22

-
-
-
-

g_socket_client_set_protocol ()

-
void
-g_socket_client_set_protocol (GSocketClient *client,
-                              GSocketProtocol protocol);
-

Sets the protocol of the socket client. -The sockets created by this object will use of the specified -protocol.

-

If protocol - is 0 that means to use the default -protocol for the socket family and type.

-
-

Parameters

-
----- - - - - - - - - - - - - -

client

a GSocketClient.

 

protocol

a GSocketProtocol

 
-
-

Since: 2.22

-
-
-
-

g_socket_client_set_socket_type ()

-
void
-g_socket_client_set_socket_type (GSocketClient *client,
-                                 GSocketType type);
-

Sets the socket type of the socket client. -The sockets created by this object will be of the specified -type.

-

It doesn't make sense to specify a type of G_SOCKET_TYPE_DATAGRAM, -as GSocketClient is used for connection oriented services.

-
-

Parameters

-
----- - - - - - - - - - - - - -

client

a GSocketClient.

 

type

a GSocketType

 
-
-

Since: 2.22

-
-
-
-

g_socket_client_set_timeout ()

-
void
-g_socket_client_set_timeout (GSocketClient *client,
-                             guint timeout);
-

Sets the I/O timeout for sockets created by client -. timeout - is a -time in seconds, or 0 for no timeout (the default).

-

The timeout value affects the initial connection attempt as well, -so setting this may cause calls to g_socket_client_connect(), etc, -to fail with G_IO_ERROR_TIMED_OUT.

-
-

Parameters

-
----- - - - - - - - - - - - - -

client

a GSocketClient.

 

timeout

the timeout

 
-
-

Since: 2.26

-
-
-
-

g_socket_client_set_enable_proxy ()

-
void
-g_socket_client_set_enable_proxy (GSocketClient *client,
-                                  gboolean enable);
-

Sets whether or not client - attempts to make connections via a -proxy server. When enabled (the default), GSocketClient will use a -GProxyResolver to determine if a proxy protocol such as SOCKS is -needed, and automatically do the necessary proxy negotiation.

-

See also g_socket_client_set_proxy_resolver().

-
-

Parameters

-
----- - - - - - - - - - - - - -

client

a GSocketClient.

 

enable

whether to enable proxies

 
-
-

Since: 2.26

-
-
-
-

g_socket_client_set_proxy_resolver ()

-
void
-g_socket_client_set_proxy_resolver (GSocketClient *client,
-                                    GProxyResolver *proxy_resolver);
-

Overrides the GProxyResolver used by client -. You can call this if -you want to use specific proxies, rather than using the system -default proxy settings.

-

Note that whether or not the proxy resolver is actually used -depends on the setting of “enable-proxy”, which is not -changed by this function (but which is TRUE by default)

-
-

Parameters

-
----- - - - - - - - - - - - - -

client

a GSocketClient.

 

proxy_resolver

a GProxyResolver, or NULL for the -default.

[nullable]
-
-

Since: 2.36

-
-
-
-

g_socket_client_set_tls ()

-
void
-g_socket_client_set_tls (GSocketClient *client,
-                         gboolean tls);
-

Sets whether client - creates TLS (aka SSL) connections. If tls - is -TRUE, client - will wrap its connections in a GTlsClientConnection -and perform a TLS handshake when connecting.

-

Note that since GSocketClient must return a GSocketConnection, -but GTlsClientConnection is not a GSocketConnection, this -actually wraps the resulting GTlsClientConnection in a -GTcpWrapperConnection when returning it. You can use -g_tcp_wrapper_connection_get_base_io_stream() on the return value -to extract the GTlsClientConnection.

-

If you need to modify the behavior of the TLS handshake (eg, by -setting a client-side certificate to use, or connecting to the -“accept-certificate” signal), you can connect to -client -'s “event” signal and wait for it to be -emitted with G_SOCKET_CLIENT_TLS_HANDSHAKING, which will give you -a chance to see the GTlsClientConnection before the handshake -starts.

-
-

Parameters

-
----- - - - - - - - - - - - - -

client

a GSocketClient.

 

tls

whether to use TLS

 
-
-

Since: 2.28

-
-
-
-

g_socket_client_set_tls_validation_flags ()

-
void
-g_socket_client_set_tls_validation_flags
-                               (GSocketClient *client,
-                                GTlsCertificateFlags flags);
-

Sets the TLS validation flags used when creating TLS connections -via client -. The default value is G_TLS_CERTIFICATE_VALIDATE_ALL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

client

a GSocketClient.

 

flags

the validation flags

 
-
-

Since: 2.28

-
-
-
-

g_socket_client_get_family ()

-
GSocketFamily
-g_socket_client_get_family (GSocketClient *client);
-

Gets the socket family of the socket client.

-

See g_socket_client_set_family() for details.

-
-

Parameters

-
----- - - - - - -

client

a GSocketClient.

 
-
-
-

Returns

-

a GSocketFamily

-
-

Since: 2.22

-
-
-
-

g_socket_client_get_local_address ()

-
GSocketAddress *
-g_socket_client_get_local_address (GSocketClient *client);
-

Gets the local address of the socket client.

-

See g_socket_client_set_local_address() for details.

-
-

Parameters

-
----- - - - - - -

client

a GSocketClient.

 
-
-
-

Returns

-

a GSocketAddress or NULL. Do not free.

-

[transfer none]

-
-

Since: 2.22

-
-
-
-

g_socket_client_get_protocol ()

-
GSocketProtocol
-g_socket_client_get_protocol (GSocketClient *client);
-

Gets the protocol name type of the socket client.

-

See g_socket_client_set_protocol() for details.

-
-

Parameters

-
----- - - - - - -

client

a GSocketClient

 
-
-
-

Returns

-

a GSocketProtocol

-
-

Since: 2.22

-
-
-
-

g_socket_client_get_socket_type ()

-
GSocketType
-g_socket_client_get_socket_type (GSocketClient *client);
-

Gets the socket type of the socket client.

-

See g_socket_client_set_socket_type() for details.

-
-

Parameters

-
----- - - - - - -

client

a GSocketClient.

 
-
-
-

Returns

-

a GSocketFamily

-
-

Since: 2.22

-
-
-
-

g_socket_client_get_timeout ()

-
guint
-g_socket_client_get_timeout (GSocketClient *client);
-

Gets the I/O timeout time for sockets created by client -.

-

See g_socket_client_set_timeout() for details.

-
-

Parameters

-
----- - - - - - -

client

a GSocketClient

 
-
-
-

Returns

-

the timeout in seconds

-
-

Since: 2.26

-
-
-
-

g_socket_client_get_enable_proxy ()

-
gboolean
-g_socket_client_get_enable_proxy (GSocketClient *client);
-

Gets the proxy enable state; see g_socket_client_set_enable_proxy()

-
-

Parameters

-
----- - - - - - -

client

a GSocketClient.

 
-
-
-

Returns

-

whether proxying is enabled

-
-

Since: 2.26

-
-
-
-

g_socket_client_get_proxy_resolver ()

-
GProxyResolver *
-g_socket_client_get_proxy_resolver (GSocketClient *client);
-

Gets the GProxyResolver being used by client -. Normally, this will -be the resolver returned by g_proxy_resolver_get_default(), but you -can override it with g_socket_client_set_proxy_resolver().

-
-

Parameters

-
----- - - - - - -

client

a GSocketClient.

 
-
-
-

Returns

-

The GProxyResolver being used by -client -.

-

[transfer none]

-
-

Since: 2.36

-
-
-
-

g_socket_client_get_tls ()

-
gboolean
-g_socket_client_get_tls (GSocketClient *client);
-

Gets whether client - creates TLS connections. See -g_socket_client_set_tls() for details.

-
-

Parameters

-
----- - - - - - -

client

a GSocketClient.

 
-
-
-

Returns

-

whether client -uses TLS

-
-

Since: 2.28

-
-
-
-

g_socket_client_get_tls_validation_flags ()

-
GTlsCertificateFlags
-g_socket_client_get_tls_validation_flags
-                               (GSocketClient *client);
-

Gets the TLS validation flags used creating TLS connections via -client -.

-
-

Parameters

-
----- - - - - - -

client

a GSocketClient.

 
-
-
-

Returns

-

the TLS validation flags

-
-

Since: 2.28

-
-
-
-

g_socket_client_add_application_proxy ()

-
void
-g_socket_client_add_application_proxy (GSocketClient *client,
-                                       const gchar *protocol);
-

Enable proxy protocols to be handled by the application. When the -indicated proxy protocol is returned by the GProxyResolver, -GSocketClient will consider this protocol as supported but will -not try to find a GProxy instance to handle handshaking. The -application must check for this case by calling -g_socket_connection_get_remote_address() on the returned -GSocketConnection, and seeing if it's a GProxyAddress of the -appropriate type, to determine whether or not it needs to handle -the proxy handshaking itself.

-

This should be used for proxy protocols that are dialects of -another protocol such as HTTP proxy. It also allows cohabitation of -proxy protocols that are reused between protocols. A good example -is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also -be use as generic socket proxy through the HTTP CONNECT method.

-

When the proxy is detected as being an application proxy, TLS handshake -will be skipped. This is required to let the application do the proxy -specific handshake.

-
-

Parameters

-
----- - - - - - - - - - - - - -

client

a GSocketClient

 

protocol

The proxy protocol

 
-
-
-
-
-

Types and Values

-
-

GSocketClient

-
typedef struct _GSocketClient GSocketClient;
-

A helper class for network clients to make connections.

-

Since: 2.22

-
-
-
-

enum GSocketClientEvent

-

Describes an event occurring on a GSocketClient. See the -“event” signal for more details.

-

Additional values may be added to this type in the future.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_SOCKET_CLIENT_RESOLVING

-

The client is doing a DNS lookup.

-
 

G_SOCKET_CLIENT_RESOLVED

-

The client has completed a DNS lookup.

-
 

G_SOCKET_CLIENT_CONNECTING

-

The client is connecting to a remote - host (either a proxy or the destination server).

-
 

G_SOCKET_CLIENT_CONNECTED

-

The client has connected to a remote - host.

-
 

G_SOCKET_CLIENT_PROXY_NEGOTIATING

-

The client is negotiating - with a proxy to connect to the destination server.

-
 

G_SOCKET_CLIENT_PROXY_NEGOTIATED

-

The client has negotiated - with the proxy server.

-
 

G_SOCKET_CLIENT_TLS_HANDSHAKING

-

The client is performing a - TLS handshake.

-
 

G_SOCKET_CLIENT_TLS_HANDSHAKED

-

The client has performed a - TLS handshake.

-
 

G_SOCKET_CLIENT_COMPLETE

-

The client is done with a particular - GSocketConnectable.

-
 
-
-

Since: 2.32

-
-
-
-

Property Details

-
-

The “enable-proxy” property

-
  “enable-proxy”             gboolean
-

Enable proxy support.

-

Flags: Read / Write / Construct

-

Default value: TRUE

-
-
-
-

The “family” property

-
  “family”                   GSocketFamily
-

The sockets address family to use for socket construction.

-

Flags: Read / Write / Construct

-

Default value: G_SOCKET_FAMILY_INVALID

-
-
-
-

The “local-address” property

-
  “local-address”            GSocketAddress *
-

The local address constructed sockets will be bound to.

-

Flags: Read / Write / Construct

-
-
-
-

The “protocol” property

-
  “protocol”                 GSocketProtocol
-

The protocol to use for socket construction, or 0 for default.

-

Flags: Read / Write / Construct

-

Default value: G_SOCKET_PROTOCOL_DEFAULT

-
-
-
-

The “proxy-resolver” property

-
  “proxy-resolver”           GProxyResolver *
-

The proxy resolver to use

-

Flags: Read / Write / Construct

-

Since: 2.36

-
-
-
-

The “timeout” property

-
  “timeout”                  guint
-

The I/O timeout for sockets, or 0 for none.

-

Flags: Read / Write / Construct

-

Default value: 0

-
-
-
-

The “tls” property

-
  “tls”                      gboolean
-

Whether to create TLS connections.

-

Flags: Read / Write / Construct

-

Default value: FALSE

-
-
-
-

The “tls-validation-flags” property

-
  “tls-validation-flags”     GTlsCertificateFlags
-

TLS validation flags to use.

-

Flags: Read / Write / Construct

-

Default value: G_TLS_CERTIFICATE_UNKNOWN_CA | G_TLS_CERTIFICATE_BAD_IDENTITY | G_TLS_CERTIFICATE_NOT_ACTIVATED | G_TLS_CERTIFICATE_EXPIRED | G_TLS_CERTIFICATE_REVOKED | G_TLS_CERTIFICATE_INSECURE | G_TLS_CERTIFICATE_GENERIC_ERROR

-
-
-
-

The “type” property

-
  “type”                     GSocketType
-

The sockets type to use for socket construction.

-

Flags: Read / Write / Construct

-

Default value: G_SOCKET_TYPE_STREAM

-
-
-
-

Signal Details

-
-

The “event” signal

-
void
-user_function (GSocketClient      *client,
-               GSocketClientEvent  event,
-               GSocketConnectable *connectable,
-               GIOStream          *connection,
-               gpointer            user_data)
-

Emitted when client -'s activity on connectable - changes state. -Among other things, this can be used to provide progress -information about a network connection in the UI. The meanings of -the different event - values are as follows:

-
-

Each event except G_SOCKET_CLIENT_COMPLETE may be emitted -multiple times (or not at all) for a given connectable (in -particular, if client - ends up attempting to connect to more than -one address). However, if client - emits the “event” -signal at all for a given connectable, that it will always emit -it with G_SOCKET_CLIENT_COMPLETE when it is done.

-

Note that there may be additional GSocketClientEvent values in -the future; unrecognized event - values should be ignored.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

client

the GSocketClient

 

event

the event that is occurring

 

connectable

the GSocketConnectable that event -is occurring on

 

connection

the current representation of the connection.

[nullable]

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.32

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSocketConnectable.html b/docs/reference/gio/html/GSocketConnectable.html deleted file mode 100644 index d74ca1034..000000000 --- a/docs/reference/gio/html/GSocketConnectable.html +++ /dev/null @@ -1,664 +0,0 @@ - - - - -GSocketConnectable: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSocketConnectable

-

GSocketConnectable — Interface for potential socket endpoints

-
- -
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - -
-GSocketConnectable *connectableRead / Write / Construct Only
guintdefault-portRead / Write / Construct Only
-GProxyResolver *proxy-resolverRead / Write / Construct
-gchar *uriRead / Write / Construct Only
-
-
-

Types and Values

- -
-
-

Object Hierarchy

-
    GInterface
-    ╰── GSocketConnectable
-    GObject
-    ╰── GSocketAddressEnumerator
-        ╰── GProxyAddressEnumerator
-
-
-
-

Prerequisites

-

-GSocketConnectable requires - GObject.

-
-
-

Known Implementations

-

-GSocketConnectable is implemented by - GInetSocketAddress, GNetworkAddress, GNetworkService, GProxyAddress, GSocketAddress and GUnixSocketAddress.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Objects that describe one or more potential socket endpoints -implement GSocketConnectable. Callers can then use -g_socket_connectable_enumerate() to get a GSocketAddressEnumerator -to try out each socket address in turn until one succeeds, as shown -in the sample code below.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
MyConnectionType *
-connect_to_host (const char    *hostname,
-                 guint16        port,
-                 GCancellable  *cancellable,
-                 GError       **error)
-{
-  MyConnection *conn = NULL;
-  GSocketConnectable *addr;
-  GSocketAddressEnumerator *enumerator;
-  GSocketAddress *sockaddr;
-  GError *conn_error = NULL;
-
-  addr = g_network_address_new (hostname, port);
-  enumerator = g_socket_connectable_enumerate (addr);
-  g_object_unref (addr);
-
-  // Try each sockaddr until we succeed. Record the first connection error,
-  // but not any further ones (since they'll probably be basically the same
-  // as the first).
-  while (!conn && (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error))
-    {
-      conn = connect_to_sockaddr (sockaddr, conn_error ? NULL : &conn_error);
-      g_object_unref (sockaddr);
-    }
-  g_object_unref (enumerator);
-
-  if (conn)
-    {
-      if (conn_error)
-        {
-          // We couldn't connect to the first address, but we succeeded
-          // in connecting to a later address.
-          g_error_free (conn_error);
-        }
-      return conn;
-    }
-  else if (error)
-    {
-      /// Either initial lookup failed, or else the caller cancelled us.
-      if (conn_error)
-        g_error_free (conn_error);
-      return NULL;
-    }
-  else
-    {
-      g_error_propagate (error, conn_error);
-      return NULL;
-    }
-}
-
- -

-
-
-

Functions

-
-

g_socket_connectable_enumerate ()

-
GSocketAddressEnumerator *
-g_socket_connectable_enumerate (GSocketConnectable *connectable);
-

Creates a GSocketAddressEnumerator for connectable -.

-
-

Parameters

-
----- - - - - - -

connectable

a GSocketConnectable

 
-
-
-

Returns

-

a new GSocketAddressEnumerator.

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_connectable_proxy_enumerate ()

-
GSocketAddressEnumerator *
-g_socket_connectable_proxy_enumerate (GSocketConnectable *connectable);
-

Creates a GSocketAddressEnumerator for connectable - that will -return GProxyAddresses for addresses that you must connect -to via a proxy.

-

If connectable - does not implement -g_socket_connectable_proxy_enumerate(), this will fall back to -calling g_socket_connectable_enumerate().

-
-

Parameters

-
----- - - - - - -

connectable

a GSocketConnectable

 
-
-
-

Returns

-

a new GSocketAddressEnumerator.

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_socket_connectable_to_string ()

-
gchar *
-g_socket_connectable_to_string (GSocketConnectable *connectable);
-

Format a GSocketConnectable as a string. This is a human-readable format for -use in debugging output, and is not a stable serialization format. It is not -suitable for use in user interfaces as it exposes too much information for a -user.

-

If the GSocketConnectable implementation does not support string formatting, -the implementation’s type name will be returned as a fallback.

-
-

Parameters

-
----- - - - - - -

connectable

a GSocketConnectable

 
-
-
-

Returns

-

the formatted string.

-

[transfer full]

-
-

Since: 2.48

-
-
-
-

g_socket_address_enumerator_next ()

-
GSocketAddress *
-g_socket_address_enumerator_next (GSocketAddressEnumerator *enumerator,
-                                  GCancellable *cancellable,
-                                  GError **error);
-

Retrieves the next GSocketAddress from enumerator -. Note that this -may block for some amount of time. (Eg, a GNetworkAddress may need -to do a DNS lookup before it can return an address.) Use -g_socket_address_enumerator_next_async() if you need to avoid -blocking.

-

If enumerator - is expected to yield addresses, but for some reason -is unable to (eg, because of a DNS error), then the first call to -g_socket_address_enumerator_next() will return an appropriate error -in *error -. However, if the first call to -g_socket_address_enumerator_next() succeeds, then any further -internal errors (other than cancellable - being triggered) will be -ignored.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

enumerator

a GSocketAddressEnumerator

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

a GError.

 
-
-
-

Returns

-

a GSocketAddress (owned by the caller), or NULL on -error (in which case *error -will be set) or if there are no -more addresses.

-

[transfer full]

-
-
-
-
-

g_socket_address_enumerator_next_async ()

-
void
-g_socket_address_enumerator_next_async
-                               (GSocketAddressEnumerator *enumerator,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

Asynchronously retrieves the next GSocketAddress from enumerator - -and then calls callback -, which must call -g_socket_address_enumerator_next_finish() to get the result.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

enumerator

a GSocketAddressEnumerator

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call when the request -is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-
-
-
-

g_socket_address_enumerator_next_finish ()

-
GSocketAddress *
-g_socket_address_enumerator_next_finish
-                               (GSocketAddressEnumerator *enumerator,
-                                GAsyncResult *result,
-                                GError **error);
-

Retrieves the result of a completed call to -g_socket_address_enumerator_next_async(). See -g_socket_address_enumerator_next() for more information about -error handling.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

enumerator

a GSocketAddressEnumerator

 

result

a GAsyncResult

 

error

a GError

 
-
-
-

Returns

-

a GSocketAddress (owned by the caller), or NULL on -error (in which case *error -will be set) or if there are no -more addresses.

-

[transfer full]

-
-
-
-
-

Types and Values

-
-

GSocketConnectable

-
typedef struct _GSocketConnectable GSocketConnectable;
-

Interface for objects that contain or generate GSocketAddress<!-- -->es.

-
-
-
-

struct GSocketConnectableIface

-
struct GSocketConnectableIface {
-  GTypeInterface g_iface;
-
-  /* Virtual Table */
-
-  GSocketAddressEnumerator * (* enumerate)       (GSocketConnectable *connectable);
-
-  GSocketAddressEnumerator * (* proxy_enumerate) (GSocketConnectable *connectable);
-
-  gchar                    * (* to_string)       (GSocketConnectable *connectable);
-};
-
-

Provides an interface for returning a GSocketAddressEnumerator -and GProxyAddressEnumerator

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

enumerate ()

Creates a GSocketAddressEnumerator

 

proxy_enumerate ()

Creates a GProxyAddressEnumerator

 

to_string ()

Format the connectable’s address as a string for debugging. -Implementing this is optional. (Since: 2.48)

 
-
-
-
-
-

GSocketAddressEnumerator

-
typedef struct _GSocketAddressEnumerator GSocketAddressEnumerator;
-

Enumerator type for objects that contain or generate -GSocketAddress<!-- -->es.

-
-
-
-

GProxyAddressEnumerator

-
typedef struct _GProxyAddressEnumerator GProxyAddressEnumerator;
-

A subclass of GSocketAddressEnumerator that takes another address -enumerator and wraps its results in GProxyAddress<!-- -->es as -directed by the default GProxyResolver.

-
-
-
-

Property Details

-
-

The “connectable” property

-
  “connectable”              GSocketConnectable *
-

The connectable being enumerated.

-

Flags: Read / Write / Construct Only

-
-
-
-

The “default-port” property

-
  “default-port”             guint
-

The default port to use if “uri” does not -specify one.

-

Flags: Read / Write / Construct Only

-

Allowed values: <= 65535

-

Default value: 0

-

Since: 2.38

-
-
-
-

The “proxy-resolver” property

-
  “proxy-resolver”           GProxyResolver *
-

The proxy resolver to use.

-

Flags: Read / Write / Construct

-

Since: 2.36

-
-
-
-

The “uri” property

-
  “uri”                      gchar *
-

The destination URI, use none:// for generic socket.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSocketConnection.html b/docs/reference/gio/html/GSocketConnection.html deleted file mode 100644 index f64c645cf..000000000 --- a/docs/reference/gio/html/GSocketConnection.html +++ /dev/null @@ -1,626 +0,0 @@ - - - - -GSocketConnection: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSocketConnection

-

GSocketConnection — A socket connection

-
- -
-

Properties

-
----- - - - - - -
-GSocket *socketRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GSocketConnection
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GIOStream
-        ╰── GSocketConnection
-            ├── GTcpConnection
-            ╰── GUnixConnection
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GSocketConnection is a GIOStream for a connected socket. They -can be created either by GSocketClient when connecting to a host, -or by GSocketListener when accepting a new client.

-

The type of the GSocketConnection object returned from these calls -depends on the type of the underlying socket that is in use. For -instance, for a TCP/IP connection it will be a GTcpConnection.

-

Choosing what type of object to construct is done with the socket -connection factory, and it is possible for 3rd parties to register -custom socket connection types for specific combination of socket -family/type/protocol using g_socket_connection_factory_register_type().

-

To close a GSocketConnection, use g_io_stream_close(). Closing both -substreams of the GIOStream separately will not close the underlying -GSocket.

-
-
-

Functions

-
-

g_socket_connection_connect ()

-
gboolean
-g_socket_connection_connect (GSocketConnection *connection,
-                             GSocketAddress *address,
-                             GCancellable *cancellable,
-                             GError **error);
-

Connect connection - to the specified remote address.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

connection

a GSocketConnection

 

address

a GSocketAddress specifying the remote address.

 

cancellable

a GCancellable or NULL.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

TRUE if the connection succeeded, FALSE on error

-
-

Since: 2.32

-
-
-
-

g_socket_connection_connect_async ()

-
void
-g_socket_connection_connect_async (GSocketConnection *connection,
-                                   GSocketAddress *address,
-                                   GCancellable *cancellable,
-                                   GAsyncReadyCallback callback,
-                                   gpointer user_data);
-

Asynchronously connect connection - to the specified remote address.

-

This clears the “blocking” flag on connection -'s underlying -socket if it is currently set.

-

Use g_socket_connection_connect_finish() to retrieve the result.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

a GSocketConnection

 

address

a GSocketAddress specifying the remote address.

 

cancellable

a GCancellable or NULL.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

user data for the callback.

[closure]
-
-

Since: 2.32

-
-
-
-

g_socket_connection_connect_finish ()

-
gboolean
-g_socket_connection_connect_finish (GSocketConnection *connection,
-                                    GAsyncResult *result,
-                                    GError **error);
-

Gets the result of a g_socket_connection_connect_async() call.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

a GSocketConnection

 

result

the GAsyncResult

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

TRUE if the connection succeeded, FALSE on error

-
-

Since: 2.32

-
-
-
-

g_socket_connection_is_connected ()

-
gboolean
-g_socket_connection_is_connected (GSocketConnection *connection);
-

Checks if connection - is connected. This is equivalent to calling -g_socket_is_connected() on connection -'s underlying GSocket.

-
-

Parameters

-
----- - - - - - -

connection

a GSocketConnection

 
-
-
-

Returns

-

whether connection -is connected

-
-

Since: 2.32

-
-
-
-

g_socket_connection_get_local_address ()

-
GSocketAddress *
-g_socket_connection_get_local_address (GSocketConnection *connection,
-                                       GError **error);
-

Try to get the local address of a socket connection.

-
-

Parameters

-
----- - - - - - - - - - - - - -

connection

a GSocketConnection

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

a GSocketAddress or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_connection_get_remote_address ()

-
GSocketAddress *
-g_socket_connection_get_remote_address
-                               (GSocketConnection *connection,
-                                GError **error);
-

Try to get the remote address of a socket connection.

-

Since GLib 2.40, when used with g_socket_client_connect() or -g_socket_client_connect_async(), during emission of -G_SOCKET_CLIENT_CONNECTING, this function will return the remote -address that will be used for the connection. This allows -applications to print e.g. "Connecting to example.com -(10.42.77.3)...".

-
-

Parameters

-
----- - - - - - - - - - - - - -

connection

a GSocketConnection

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

a GSocketAddress or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_connection_get_socket ()

-
GSocket *
-g_socket_connection_get_socket (GSocketConnection *connection);
-

Gets the underlying GSocket object of the connection. -This can be useful if you want to do something unusual on it -not supported by the GSocketConnection APIs.

-
-

Parameters

-
----- - - - - - -

connection

a GSocketConnection

 
-
-
-

Returns

-

a GSocket or NULL on error.

-

[transfer none]

-
-

Since: 2.22

-
-
-
-

g_socket_connection_factory_create_connection ()

-
GSocketConnection *
-g_socket_connection_factory_create_connection
-                               (GSocket *socket);
-

Creates a GSocketConnection subclass of the right type for -socket -.

-
-

Parameters

-
----- - - - - - -

socket

a GSocket

 
-
-
-

Returns

-

a GSocketConnection.

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_connection_factory_lookup_type ()

-
GType
-g_socket_connection_factory_lookup_type
-                               (GSocketFamily family,
-                                GSocketType type,
-                                gint protocol_id);
-

Looks up the GType to be used when creating socket connections on -sockets with the specified family -, type - and protocol_id -.

-

If no type is registered, the GSocketConnection base type is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

family

a GSocketFamily

 

type

a GSocketType

 

protocol_id

a protocol id

 
-
-
-

Returns

-

a GType

-
-

Since: 2.22

-
-
-
-

g_socket_connection_factory_register_type ()

-
void
-g_socket_connection_factory_register_type
-                               (GType g_type,
-                                GSocketFamily family,
-                                GSocketType type,
-                                gint protocol);
-

Looks up the GType to be used when creating socket connections on -sockets with the specified family -, type - and protocol -.

-

If no type is registered, the GSocketConnection base type is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

g_type

a GType, inheriting from G_TYPE_SOCKET_CONNECTION

 

family

a GSocketFamily

 

type

a GSocketType

 

protocol

a protocol id

 
-
-

Since: 2.22

-
-
-
-

Types and Values

-
-

GSocketConnection

-
typedef struct _GSocketConnection GSocketConnection;
-

A socket connection GIOStream object for connection-oriented sockets.

-

Since: 2.22

-
-
-
-

Property Details

-
-

The “socket” property

-
  “socket”                   GSocket *
-

The underlying GSocket.

-

Flags: Read / Write / Construct Only

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSocketControlMessage.html b/docs/reference/gio/html/GSocketControlMessage.html deleted file mode 100644 index 4500a8d6c..000000000 --- a/docs/reference/gio/html/GSocketControlMessage.html +++ /dev/null @@ -1,326 +0,0 @@ - - - - -GSocketControlMessage: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSocketControlMessage

-

GSocketControlMessage — A GSocket control message

-
-
-

Functions

- -
-
-

Types and Values

-
---- - - - - -
 GSocketControlMessage
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSocketControlMessage
-        ├── GUnixCredentialsMessage
-        ╰── GUnixFDMessage
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A GSocketControlMessage is a special-purpose utility message that -can be sent to or received from a GSocket. These types of -messages are often called "ancillary data".

-

The message can represent some sort of special instruction to or -information from the socket or can represent a special kind of -transfer to the peer (for example, sending a file descriptor over -a UNIX socket).

-

These messages are sent with g_socket_send_message() and received -with g_socket_receive_message().

-

To extend the set of control message that can be sent, subclass this -class and override the get_size, get_level, get_type and serialize -methods.

-

To extend the set of control messages that can be received, subclass -this class and implement the deserialize method. Also, make sure your -class is registered with the GType typesystem before calling -g_socket_receive_message() to read such a message.

-
-
-

Functions

-
-

g_socket_control_message_deserialize ()

-
GSocketControlMessage *
-g_socket_control_message_deserialize (int level,
-                                      int type,
-                                      gsize size,
-                                      gpointer data);
-

Tries to deserialize a socket control message of a given -level - and type -. This will ask all known (to GType) subclasses -of GSocketControlMessage if they can understand this kind -of message and if so deserialize it into a GSocketControlMessage.

-

If there is no implementation for this kind of control message, NULL -will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

level

a socket level

 

type

a socket control message type for the given level -

 

size

the size of the data in bytes

 

data

pointer to the message data.

[array length=size][element-type guint8]
-
-
-

Returns

-

the deserialized message or NULL.

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_control_message_get_level ()

-
int
-g_socket_control_message_get_level (GSocketControlMessage *message);
-

Returns the "level" (i.e. the originating protocol) of the control message. -This is often SOL_SOCKET.

-
-

Parameters

-
----- - - - - - -

message

a GSocketControlMessage

 
-
-
-

Returns

-

an integer describing the level

-
-

Since: 2.22

-
-
-
-

g_socket_control_message_get_msg_type ()

-
int
-g_socket_control_message_get_msg_type (GSocketControlMessage *message);
-

Returns the protocol specific type of the control message. -For instance, for UNIX fd passing this would be SCM_RIGHTS.

-
-

Parameters

-
----- - - - - - -

message

a GSocketControlMessage

 
-
-
-

Returns

-

an integer describing the type of control message

-
-

Since: 2.22

-
-
-
-

g_socket_control_message_get_size ()

-
gsize
-g_socket_control_message_get_size (GSocketControlMessage *message);
-

Returns the space required for the control message, not including -headers or alignment.

-
-

Parameters

-
----- - - - - - -

message

a GSocketControlMessage

 
-
-
-

Returns

-

The number of bytes required.

-
-

Since: 2.22

-
-
-
-

g_socket_control_message_serialize ()

-
void
-g_socket_control_message_serialize (GSocketControlMessage *message,
-                                    gpointer data);
-

Converts the data in the message to bytes placed in the -message.

-

data - is guaranteed to have enough space to fit the size -returned by g_socket_control_message_get_size() on this -object.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

a GSocketControlMessage

 

data

A buffer to write data to.

[not nullable]
-
-

Since: 2.22

-
-
-
-

Types and Values

-
-

GSocketControlMessage

-
typedef struct _GSocketControlMessage GSocketControlMessage;
-

Base class for socket-type specific control messages that can be sent and -received over GSocket.

-
-
-
-

See Also

-

GSocket.

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSocketListener.html b/docs/reference/gio/html/GSocketListener.html deleted file mode 100644 index 51848d436..000000000 --- a/docs/reference/gio/html/GSocketListener.html +++ /dev/null @@ -1,986 +0,0 @@ - - - - -GSocketListener: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSocketListener

-

GSocketListener — Helper for accepting network client connections

-
- -
-

Properties

-
----- - - - - - -
gintlisten-backlogRead / Write / Construct
-
-
-

Signals

-
----- - - - - - -
voideventRun Last
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GSocketListener
enumGSocketListenerEvent
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSocketListener
-        ╰── GSocketService
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A GSocketListener is an object that keeps track of a set -of server sockets and helps you accept sockets from any of the -socket, either sync or async.

-

If you want to implement a network server, also look at GSocketService -and GThreadedSocketService which are subclass of GSocketListener -that makes this even easier.

-
-
-

Functions

-
-

g_socket_listener_new ()

-
GSocketListener *
-g_socket_listener_new (void);
-

Creates a new GSocketListener with no sockets to listen for. -New listeners can be added with e.g. g_socket_listener_add_address() -or g_socket_listener_add_inet_port().

-
-

Returns

-

a new GSocketListener.

-
-

Since: 2.22

-
-
-
-

g_socket_listener_add_socket ()

-
gboolean
-g_socket_listener_add_socket (GSocketListener *listener,
-                              GSocket *socket,
-                              GObject *source_object,
-                              GError **error);
-

Adds socket - to the set of sockets that we try to accept -new clients from. The socket must be bound to a local -address and listened to.

-

source_object - will be passed out in the various calls -to accept to identify this particular source, which is -useful if you're listening on multiple addresses and do -different things depending on what address is connected to.

-

The socket - will not be automatically closed when the listener - is finalized -unless the listener held the final reference to the socket. Before GLib 2.42, -the socket - was automatically closed on finalization of the listener -, even -if references to it were held elsewhere.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

listener

a GSocketListener

 

socket

a listening GSocket

 

source_object

Optional GObject identifying this source.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

TRUE on success, FALSE on error.

-
-

Since: 2.22

-
-
-
-

g_socket_listener_add_address ()

-
gboolean
-g_socket_listener_add_address (GSocketListener *listener,
-                               GSocketAddress *address,
-                               GSocketType type,
-                               GSocketProtocol protocol,
-                               GObject *source_object,
-                               GSocketAddress **effective_address,
-                               GError **error);
-

Creates a socket of type type - and protocol protocol -, binds -it to address - and adds it to the set of sockets we're accepting -sockets from.

-

Note that adding an IPv6 address, depending on the platform, -may or may not result in a listener that also accepts IPv4 -connections. For more deterministic behavior, see -g_socket_listener_add_inet_port().

-

source_object - will be passed out in the various calls -to accept to identify this particular source, which is -useful if you're listening on multiple addresses and do -different things depending on what address is connected to.

-

If successful and effective_address - is non-NULL then it will -be set to the address that the binding actually occurred at. This -is helpful for determining the port number that was used for when -requesting a binding to port 0 (ie: "any port"). This address, if -requested, belongs to the caller and must be freed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

listener

a GSocketListener

 

address

a GSocketAddress

 

type

a GSocketType

 

protocol

a GSocketProtocol

 

source_object

Optional GObject identifying this source.

[nullable]

effective_address

location to store the address that was bound to, or NULL.

[out][optional]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

TRUE on success, FALSE on error.

-
-

Since: 2.22

-
-
-
-

g_socket_listener_add_inet_port ()

-
gboolean
-g_socket_listener_add_inet_port (GSocketListener *listener,
-                                 guint16 port,
-                                 GObject *source_object,
-                                 GError **error);
-

Helper function for g_socket_listener_add_address() that -creates a TCP/IP socket listening on IPv4 and IPv6 (if -supported) on the specified port on all interfaces.

-

source_object - will be passed out in the various calls -to accept to identify this particular source, which is -useful if you're listening on multiple addresses and do -different things depending on what address is connected to.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

listener

a GSocketListener

 

port

an IP port number (non-zero)

 

source_object

Optional GObject identifying this source.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

TRUE on success, FALSE on error.

-
-

Since: 2.22

-
-
-
-

g_socket_listener_add_any_inet_port ()

-
guint16
-g_socket_listener_add_any_inet_port (GSocketListener *listener,
-                                     GObject *source_object,
-                                     GError **error);
-

Listens for TCP connections on any available port number for both -IPv6 and IPv4 (if each is available).

-

This is useful if you need to have a socket for incoming connections -but don't care about the specific port number.

-

source_object - will be passed out in the various calls -to accept to identify this particular source, which is -useful if you're listening on multiple addresses and do -different things depending on what address is connected to.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

listener

a GSocketListener

 

source_object

Optional GObject identifying this source.

[nullable]

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

the port number, or 0 in case of failure.

-
-

Since: 2.24

-
-
-
-

g_socket_listener_accept ()

-
GSocketConnection *
-g_socket_listener_accept (GSocketListener *listener,
-                          GObject **source_object,
-                          GCancellable *cancellable,
-                          GError **error);
-

Blocks waiting for a client to connect to any of the sockets added -to the listener. Returns a GSocketConnection for the socket that was -accepted.

-

If source_object - is not NULL it will be filled out with the source -object specified when the corresponding socket or address was added -to the listener.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

listener

a GSocketListener

 

source_object

location where GObject pointer will be stored, or NULL.

[out][transfer none][optional]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

a GSocketConnection on success, NULL on error.

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_listener_accept_async ()

-
void
-g_socket_listener_accept_async (GSocketListener *listener,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

This is the asynchronous version of g_socket_listener_accept().

-

When the operation is finished callback - will be -called. You can then call g_socket_listener_accept_socket() -to get the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

listener

a GSocketListener

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

user data for the callback.

[closure]
-
-

Since: 2.22

-
-
-
-

g_socket_listener_accept_finish ()

-
GSocketConnection *
-g_socket_listener_accept_finish (GSocketListener *listener,
-                                 GAsyncResult *result,
-                                 GObject **source_object,
-                                 GError **error);
-

Finishes an async accept operation. See g_socket_listener_accept_async()

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

listener

a GSocketListener

 

result

a GAsyncResult.

 

source_object

Optional GObject identifying this source.

[out][transfer none][optional]

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

a GSocketConnection on success, NULL on error.

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_listener_accept_socket ()

-
GSocket *
-g_socket_listener_accept_socket (GSocketListener *listener,
-                                 GObject **source_object,
-                                 GCancellable *cancellable,
-                                 GError **error);
-

Blocks waiting for a client to connect to any of the sockets added -to the listener. Returns the GSocket that was accepted.

-

If you want to accept the high-level GSocketConnection, not a GSocket, -which is often the case, then you should use g_socket_listener_accept() -instead.

-

If source_object - is not NULL it will be filled out with the source -object specified when the corresponding socket or address was added -to the listener.

-

If cancellable - is not NULL, then the operation can be cancelled by -triggering the cancellable object from another thread. If the operation -was cancelled, the error G_IO_ERROR_CANCELLED will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

listener

a GSocketListener

 

source_object

location where GObject pointer will be stored, or NULL.

[out][transfer none][optional]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

a GSocket on success, NULL on error.

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_listener_accept_socket_async ()

-
void
-g_socket_listener_accept_socket_async (GSocketListener *listener,
-                                       GCancellable *cancellable,
-                                       GAsyncReadyCallback callback,
-                                       gpointer user_data);
-

This is the asynchronous version of g_socket_listener_accept_socket().

-

When the operation is finished callback - will be -called. You can then call g_socket_listener_accept_socket_finish() -to get the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

listener

a GSocketListener

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

user_data

user data for the callback.

[closure]
-
-

Since: 2.22

-
-
-
-

g_socket_listener_accept_socket_finish ()

-
GSocket *
-g_socket_listener_accept_socket_finish
-                               (GSocketListener *listener,
-                                GAsyncResult *result,
-                                GObject **source_object,
-                                GError **error);
-

Finishes an async accept operation. See g_socket_listener_accept_socket_async()

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

listener

a GSocketListener

 

result

a GAsyncResult.

 

source_object

Optional GObject identifying this source.

[out][transfer none][optional]

error

a GError location to store the error occurring, or NULL to -ignore.

 
-
-
-

Returns

-

a GSocket on success, NULL on error.

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

g_socket_listener_close ()

-
void
-g_socket_listener_close (GSocketListener *listener);
-

Closes all the sockets in the listener.

-
-

Parameters

-
----- - - - - - -

listener

a GSocketListener

 
-
-

Since: 2.22

-
-
-
-

g_socket_listener_set_backlog ()

-
void
-g_socket_listener_set_backlog (GSocketListener *listener,
-                               int listen_backlog);
-

Sets the listen backlog on the sockets in the listener.

-

See g_socket_set_listen_backlog() for details

-
-

Parameters

-
----- - - - - - - - - - - - - -

listener

a GSocketListener

 

listen_backlog

an integer

 
-
-

Since: 2.22

-
-
-
-

Types and Values

-
-

GSocketListener

-
typedef struct _GSocketListener GSocketListener;
-

A helper class for network servers to listen for and accept connections.

-

Since: 2.22

-
-
-
-

enum GSocketListenerEvent

-

Describes an event occurring on a GSocketListener. See the -“event” signal for more details.

-

Additional values may be added to this type in the future.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_SOCKET_LISTENER_BINDING

-

The listener is about to bind a socket.

-
 

G_SOCKET_LISTENER_BOUND

-

The listener has bound a socket.

-
 

G_SOCKET_LISTENER_LISTENING

-

The listener is about to start - listening on this socket.

-
 

G_SOCKET_LISTENER_LISTENED

-

The listener is now listening on - this socket.

-
 
-
-

Since: 2.46

-
-
-
-

Property Details

-
-

The “listen-backlog” property

-
  “listen-backlog”           gint
-

outstanding connections in the listen queue.

-

Flags: Read / Write / Construct

-

Allowed values: [0,2000]

-

Default value: 10

-
-
-
-

Signal Details

-
-

The “event” signal

-
void
-user_function (GSocketListener     *listener,
-               GSocketListenerEvent event,
-               GSocket             *socket,
-               gpointer             user_data)
-

Emitted when listener -'s activity on socket - changes state. -Note that when listener - is used to listen on both IPv4 and -IPv6, a separate set of signals will be emitted for each, and -the order they happen in is undefined.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

listener

the GSocketListener

 

event

the event that is occurring

 

socket

the GSocket the event is occurring on

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.46

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSocketService.html b/docs/reference/gio/html/GSocketService.html deleted file mode 100644 index 17e2e4f9d..000000000 --- a/docs/reference/gio/html/GSocketService.html +++ /dev/null @@ -1,360 +0,0 @@ - - - - -GSocketService: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSocketService

-

GSocketService — Make it easy to implement a network service

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
-GSocketService * - -g_socket_service_new () -
-void - -g_socket_service_start () -
-void - -g_socket_service_stop () -
-gboolean - -g_socket_service_is_active () -
-
-
-

Properties

-
----- - - - - - -
gbooleanactiveRead / Write / Construct
-
-
-

Signals

-
----- - - - - - -
gbooleanincomingRun Last
-
-
-

Types and Values

-
---- - - - - -
 GSocketService
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSocketListener
-        ╰── GSocketService
-            ╰── GThreadedSocketService
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A GSocketService is an object that represents a service that -is provided to the network or over local sockets. When a new -connection is made to the service the “incoming” -signal is emitted.

-

A GSocketService is a subclass of GSocketListener and you need -to add the addresses you want to accept connections on with the -GSocketListener APIs.

-

There are two options for implementing a network service based on -GSocketService. The first is to create the service using -g_socket_service_new() and to connect to the “incoming” -signal. The second is to subclass GSocketService and override the -default signal handler implementation.

-

In either case, the handler must immediately return, or else it -will block additional incoming connections from being serviced. -If you are interested in writing connection handlers that contain -blocking code then see GThreadedSocketService.

-

The socket service runs on the main loop of the -thread-default context -of the thread it is created in, and is not -threadsafe in general. However, the calls to start and stop the -service are thread-safe so these can be used from threads that -handle incoming clients.

-
-
-

Functions

-
-

g_socket_service_new ()

-
GSocketService *
-g_socket_service_new (void);
-

Creates a new GSocketService with no sockets to listen for. -New listeners can be added with e.g. g_socket_listener_add_address() -or g_socket_listener_add_inet_port().

-

New services are created active, there is no need to call -g_socket_service_start(), unless g_socket_service_stop() has been -called before.

-
-

Returns

-

a new GSocketService.

-
-

Since: 2.22

-
-
-
-

g_socket_service_start ()

-
void
-g_socket_service_start (GSocketService *service);
-

Restarts the service, i.e. start accepting connections -from the added sockets when the mainloop runs. This only needs -to be called after the service has been stopped from -g_socket_service_stop().

-

This call is thread-safe, so it may be called from a thread -handling an incoming client request.

-
-

Parameters

-
----- - - - - - -

service

a GSocketService

 
-
-

Since: 2.22

-
-
-
-

g_socket_service_stop ()

-
void
-g_socket_service_stop (GSocketService *service);
-

Stops the service, i.e. stops accepting connections -from the added sockets when the mainloop runs.

-

This call is thread-safe, so it may be called from a thread -handling an incoming client request.

-

Note that this only stops accepting new connections; it does not -close the listening sockets, and you can call -g_socket_service_start() again later to begin listening again. To -close the listening sockets, call g_socket_listener_close(). (This -will happen automatically when the GSocketService is finalized.)

-

This must be called before calling g_socket_listener_close() as -the socket service will start accepting connections immediately -when a new socket is added.

-
-

Parameters

-
----- - - - - - -

service

a GSocketService

 
-
-

Since: 2.22

-
-
-
-

g_socket_service_is_active ()

-
gboolean
-g_socket_service_is_active (GSocketService *service);
-

Check whether the service is active or not. An active -service will accept new clients that connect, while -a non-active service will let connecting clients queue -up until the service is started.

-
-

Parameters

-
----- - - - - - -

service

a GSocketService

 
-
-
-

Returns

-

TRUE if the service is active, FALSE otherwise

-
-

Since: 2.22

-
-
-
-

Types and Values

-
-

GSocketService

-
typedef struct _GSocketService GSocketService;
-

A helper class for handling accepting incomming connections in the -glib mainloop.

-

Since: 2.22

-
-
-
-

Property Details

-
-

The “active” property

-
  “active”                   gboolean
-

Whether the service is currently accepting connections.

-

Flags: Read / Write / Construct

-

Default value: TRUE

-

Since: 2.46

-
-
-
-

Signal Details

-
-

The “incoming” signal

-
gboolean
-user_function (GSocketService    *service,
-               GSocketConnection *connection,
-               GObject           *source_object,
-               gpointer           user_data)
-

The ::incoming signal is emitted when a new incoming connection -to service - needs to be handled. The handler must initiate the -handling of connection -, but may not block; in essence, -asynchronous operations must be used.

-

connection - will be unreffed once the signal handler returns, -so you need to ref it yourself if you are planning to use it.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

service

the GSocketService

 

connection

a new GSocketConnection object

 

source_object

the source_object passed to -g_socket_listener_add_address().

[nullable]

user_data

user data set when the signal handler was connected.

 
-
-
-

Returns

-

TRUE to stop other handlers from being called

-
-

Flags: Run Last

-

Since: 2.22

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSrvTarget.html b/docs/reference/gio/html/GSrvTarget.html deleted file mode 100644 index e897d3420..000000000 --- a/docs/reference/gio/html/GSrvTarget.html +++ /dev/null @@ -1,418 +0,0 @@ - - - - -GSrvTarget: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSrvTarget

-

GSrvTarget — DNS SRV record target

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GSrvTarget * - -g_srv_target_new () -
-GSrvTarget * - -g_srv_target_copy () -
-void - -g_srv_target_free () -
const gchar * - -g_srv_target_get_hostname () -
-guint16 - -g_srv_target_get_port () -
-guint16 - -g_srv_target_get_priority () -
-guint16 - -g_srv_target_get_weight () -
-GList * - -g_srv_target_list_sort () -
-
-
-

Types and Values

-
---- - - - - -
 GSrvTarget
-
-
-

Object Hierarchy

-
    GBoxed
-    ╰── GSrvTarget
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

SRV (service) records are used by some network protocols to provide -service-specific aliasing and load-balancing. For example, XMPP -(Jabber) uses SRV records to locate the XMPP server for a domain; -rather than connecting directly to "example.com" or assuming a -specific server hostname like "xmpp.example.com", an XMPP client -would look up the "xmpp-client" SRV record for "example.com", and -then connect to whatever host was pointed to by that record.

-

You can use g_resolver_lookup_service() or -g_resolver_lookup_service_async() to find the GSrvTargets -for a given service. However, if you are simply planning to connect -to the remote service, you can use GNetworkService's -GSocketConnectable interface and not need to worry about -GSrvTarget at all.

-
-
-

Functions

-
-

g_srv_target_new ()

-
GSrvTarget *
-g_srv_target_new (const gchar *hostname,
-                  guint16 port,
-                  guint16 priority,
-                  guint16 weight);
-

Creates a new GSrvTarget with the given parameters.

-

You should not need to use this; normally GSrvTargets are -created by GResolver.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

hostname

the host that the service is running on

 

port

the port that the service is running on

 

priority

the target's priority

 

weight

the target's weight

 
-
-
-

Returns

-

a new GSrvTarget.

-
-

Since: 2.22

-
-
-
-

g_srv_target_copy ()

-
GSrvTarget *
-g_srv_target_copy (GSrvTarget *target);
-

Copies target -

-
-

Parameters

-
----- - - - - - -

target

a GSrvTarget

 
-
-
-

Returns

-

a copy of target -

-
-

Since: 2.22

-
-
-
-

g_srv_target_free ()

-
void
-g_srv_target_free (GSrvTarget *target);
-

Frees target -

-
-

Parameters

-
----- - - - - - -

target

a GSrvTarget

 
-
-

Since: 2.22

-
-
-
-

g_srv_target_get_hostname ()

-
const gchar *
-g_srv_target_get_hostname (GSrvTarget *target);
-

Gets target -'s hostname (in ASCII form; if you are going to present -this to the user, you should use g_hostname_is_ascii_encoded() to -check if it contains encoded Unicode segments, and use -g_hostname_to_unicode() to convert it if it does.)

-
-

Parameters

-
----- - - - - - -

target

a GSrvTarget

 
-
-
-

Returns

-

target -'s hostname

-
-

Since: 2.22

-
-
-
-

g_srv_target_get_port ()

-
guint16
-g_srv_target_get_port (GSrvTarget *target);
-

Gets target -'s port

-
-

Parameters

-
----- - - - - - -

target

a GSrvTarget

 
-
-
-

Returns

-

target -'s port

-
-

Since: 2.22

-
-
-
-

g_srv_target_get_priority ()

-
guint16
-g_srv_target_get_priority (GSrvTarget *target);
-

Gets target -'s priority. You should not need to look at this; -GResolver already sorts the targets according to the algorithm in -RFC 2782.

-
-

Parameters

-
----- - - - - - -

target

a GSrvTarget

 
-
-
-

Returns

-

target -'s priority

-
-

Since: 2.22

-
-
-
-

g_srv_target_get_weight ()

-
guint16
-g_srv_target_get_weight (GSrvTarget *target);
-

Gets target -'s weight. You should not need to look at this; -GResolver already sorts the targets according to the algorithm in -RFC 2782.

-
-

Parameters

-
----- - - - - - -

target

a GSrvTarget

 
-
-
-

Returns

-

target -'s weight

-
-

Since: 2.22

-
-
-
-

g_srv_target_list_sort ()

-
GList *
-g_srv_target_list_sort (GList *targets);
-

Sorts targets - in place according to the algorithm in RFC 2782.

-

[skip]

-
-

Parameters

-
----- - - - - - -

targets

a GList of GSrvTarget

 
-
-
-

Returns

-

the head of the sorted list.

-

[transfer full]

-
-

Since: 2.22

-
-
-
-

Types and Values

-
-

GSrvTarget

-
typedef struct _GSrvTarget GSrvTarget;
-

A single target host/port that a network service is running on.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSubprocess.html b/docs/reference/gio/html/GSubprocess.html deleted file mode 100644 index 6391d77b5..000000000 --- a/docs/reference/gio/html/GSubprocess.html +++ /dev/null @@ -1,1587 +0,0 @@ - - - - -GSubprocess: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSubprocess

-

GSubprocess — Child processes

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GSubprocess * - -g_subprocess_new () -
-GSubprocess * - -g_subprocess_newv () -
const gchar * - -g_subprocess_get_identifier () -
-GOutputStream * - -g_subprocess_get_stdin_pipe () -
-GInputStream * - -g_subprocess_get_stdout_pipe () -
-GInputStream * - -g_subprocess_get_stderr_pipe () -
-gboolean - -g_subprocess_wait () -
-void - -g_subprocess_wait_async () -
-gboolean - -g_subprocess_wait_finish () -
-gboolean - -g_subprocess_wait_check () -
-void - -g_subprocess_wait_check_async () -
-gboolean - -g_subprocess_wait_check_finish () -
-gboolean - -g_subprocess_get_successful () -
-gboolean - -g_subprocess_get_if_exited () -
-gint - -g_subprocess_get_exit_status () -
-gboolean - -g_subprocess_get_if_signaled () -
-gint - -g_subprocess_get_term_sig () -
-gint - -g_subprocess_get_status () -
-void - -g_subprocess_send_signal () -
-void - -g_subprocess_force_exit () -
-gboolean - -g_subprocess_communicate () -
-void - -g_subprocess_communicate_async () -
-gboolean - -g_subprocess_communicate_finish () -
-gboolean - -g_subprocess_communicate_utf8 () -
-void - -g_subprocess_communicate_utf8_async () -
-gboolean - -g_subprocess_communicate_utf8_finish () -
-
-
-

Properties

-
----- - - - - - - - - - - - - -
GStrvargvWrite / Construct Only
GSubprocessFlagsflagsWrite / Construct Only
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GSubprocess
enumGSubprocessFlags
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSubprocess
-
-
-
-

Implemented Interfaces

-

-GSubprocess implements - GInitable.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GSubprocess allows the creation of and interaction with child -processes.

-

Processes can be communicated with using standard GIO-style APIs (ie: -GInputStream, GOutputStream). There are GIO-style APIs to wait for -process termination (ie: cancellable and with an asynchronous -variant).

-

There is an API to force a process to terminate, as well as a -race-free API for sending UNIX signals to a subprocess.

-

One major advantage that GIO brings over the core GLib library is -comprehensive API for asynchronous I/O, such -g_output_stream_splice_async(). This makes GSubprocess -significantly more powerful and flexible than equivalent APIs in -some other languages such as the subprocess.py -included with Python. For example, using GSubprocess one could -create two child processes, reading standard output from the first, -processing it, and writing to the input stream of the second, all -without blocking the main loop.

-

A powerful g_subprocess_communicate() API is provided similar to the -communicate() method of subprocess.py. This enables very easy -interaction with a subprocess that has been opened with pipes.

-

GSubprocess defaults to tight control over the file descriptors open -in the child process, avoiding dangling-fd issues that are caused by -a simple fork()/exec(). The only open file descriptors in the -spawned process are ones that were explicitly specified by the -GSubprocess API (unless G_SUBPROCESS_FLAGS_INHERIT_FDS was -specified).

-

GSubprocess will quickly reap all child processes as they exit, -avoiding "zombie processes" remaining around for long periods of -time. g_subprocess_wait() can be used to wait for this to happen, -but it will happen even without the call being explicitly made.

-

As a matter of principle, GSubprocess has no API that accepts -shell-style space-separated strings. It will, however, match the -typical shell behaviour of searching the PATH for executables that do -not contain a directory separator in their name.

-

GSubprocess attempts to have a very simple API for most uses (ie: -spawning a subprocess with arguments and support for most typical -kinds of input and output redirection). See g_subprocess_new(). The -GSubprocessLauncher API is provided for more complicated cases -(advanced types of redirection, environment variable manipulation, -change of working directory, child setup functions, etc).

-

A typical use of GSubprocess will involve calling -g_subprocess_new(), followed by g_subprocess_wait_async() or -g_subprocess_wait(). After the process exits, the status can be -checked using functions such as g_subprocess_get_if_exited() (which -are similar to the familiar WIFEXITED-style POSIX macros).

-
-
-

Functions

-
-

g_subprocess_new ()

-
GSubprocess *
-g_subprocess_new (GSubprocessFlags flags,
-                  GError **error,
-                  const gchar *argv0,
-                  ...);
-

Create a new process with the given flags and varargs argument -list. By default, matching the g_spawn_async() defaults, the -child's stdin will be set to the system null device, and -stdout/stderr will be inherited from the parent. You can use -flags - to control this behavior.

-

The argument list must be terminated with NULL.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

flags

flags that define the behaviour of the subprocess

 

error

return location for an error, or NULL.

[nullable]

argv0

first commandline argument to pass to the subprocess

 

...

more commandline arguments, followed by NULL

 
-
-
-

Returns

-

A newly created GSubprocess, or NULL on error (and error -will be set)

-
-

Since: 2.40

-
-
-
-

g_subprocess_newv ()

-
GSubprocess *
-g_subprocess_newv (const gchar * const *argv,
-                   GSubprocessFlags flags,
-                   GError **error);
-

Create a new process with the given flags and argument list.

-

The argument list is expected to be NULL-terminated.

-

[rename-to g_subprocess_new]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

argv

commandline arguments for the subprocess.

[array zero-terminated=1][element-type utf8]

flags

flags that define the behaviour of the subprocess

 

error

return location for an error, or NULL.

[nullable]
-
-
-

Returns

-

A newly created GSubprocess, or NULL on error (and error -will be set)

-
-

Since: 2.40

-
-
-
-

g_subprocess_get_identifier ()

-
const gchar *
-g_subprocess_get_identifier (GSubprocess *subprocess);
-

On UNIX, returns the process ID as a decimal string. -On Windows, returns the result of GetProcessId() also as a string.

-
-

Parameters

-
----- - - - - - -

subprocess

a GSubprocess

 
-
-
-
-
-

g_subprocess_get_stdin_pipe ()

-
GOutputStream *
-g_subprocess_get_stdin_pipe (GSubprocess *subprocess);
-

Gets the GOutputStream that you can write to in order to give data -to the stdin of subprocess -.

-

The process must have been created with -G_SUBPROCESS_FLAGS_STDIN_PIPE.

-
-

Parameters

-
----- - - - - - -

subprocess

a GSubprocess

 
-
-
-

Returns

-

the stdout pipe.

-

[transfer none]

-
-

Since: 2.40

-
-
-
-

g_subprocess_get_stdout_pipe ()

-
GInputStream *
-g_subprocess_get_stdout_pipe (GSubprocess *subprocess);
-

Gets the GInputStream from which to read the stdout output of -subprocess -.

-

The process must have been created with -G_SUBPROCESS_FLAGS_STDOUT_PIPE.

-
-

Parameters

-
----- - - - - - -

subprocess

a GSubprocess

 
-
-
-

Returns

-

the stdout pipe.

-

[transfer none]

-
-

Since: 2.40

-
-
-
-

g_subprocess_get_stderr_pipe ()

-
GInputStream *
-g_subprocess_get_stderr_pipe (GSubprocess *subprocess);
-

Gets the GInputStream from which to read the stderr output of -subprocess -.

-

The process must have been created with -G_SUBPROCESS_FLAGS_STDERR_PIPE.

-
-

Parameters

-
----- - - - - - -

subprocess

a GSubprocess

 
-
-
-

Returns

-

the stderr pipe.

-

[transfer none]

-
-

Since: 2.40

-
-
-
-

g_subprocess_wait ()

-
gboolean
-g_subprocess_wait (GSubprocess *subprocess,
-                   GCancellable *cancellable,
-                   GError **error);
-

Synchronously wait for the subprocess to terminate.

-

After the process terminates you can query its exit status with -functions such as g_subprocess_get_if_exited() and -g_subprocess_get_exit_status().

-

This function does not fail in the case of the subprocess having -abnormal termination. See g_subprocess_wait_check() for that.

-

Cancelling cancellable - doesn't kill the subprocess. Call -g_subprocess_force_exit() if it is desirable.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

subprocess

a GSubprocess

 

cancellable

a GCancellable

 

error

a GError

 
-
-
-

Returns

-

TRUE on success, FALSE if cancellable -was cancelled

-
-

Since: 2.40

-
-
-
-

g_subprocess_wait_async ()

-
void
-g_subprocess_wait_async (GSubprocess *subprocess,
-                         GCancellable *cancellable,
-                         GAsyncReadyCallback callback,
-                         gpointer user_data);
-

Wait for the subprocess to terminate.

-

This is the asynchronous version of g_subprocess_wait().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

subprocess

a GSubprocess

 

cancellable

a GCancellable, or NULL

 

callback

a GAsyncReadyCallback to call when the operation is complete

 

user_data

user_data for callback -

 
-
-

Since: 2.40

-
-
-
-

g_subprocess_wait_finish ()

-
gboolean
-g_subprocess_wait_finish (GSubprocess *subprocess,
-                          GAsyncResult *result,
-                          GError **error);
-

Collects the result of a previous call to -g_subprocess_wait_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

subprocess

a GSubprocess

 

result

the GAsyncResult passed to your GAsyncReadyCallback

 

error

a pointer to a NULL GError, or NULL

 
-
-
-

Returns

-

TRUE if successful, or FALSE with error -set

-
-

Since: 2.40

-
-
-
-

g_subprocess_wait_check ()

-
gboolean
-g_subprocess_wait_check (GSubprocess *subprocess,
-                         GCancellable *cancellable,
-                         GError **error);
-

Combines g_subprocess_wait() with g_spawn_check_exit_status().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

subprocess

a GSubprocess

 

cancellable

a GCancellable

 

error

a GError

 
-
-
-

Returns

-

TRUE on success, FALSE if process exited abnormally, or -cancellable -was cancelled

-
-

Since: 2.40

-
-
-
-

g_subprocess_wait_check_async ()

-
void
-g_subprocess_wait_check_async (GSubprocess *subprocess,
-                               GCancellable *cancellable,
-                               GAsyncReadyCallback callback,
-                               gpointer user_data);
-

Combines g_subprocess_wait_async() with g_spawn_check_exit_status().

-

This is the asynchronous version of g_subprocess_wait_check().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

subprocess

a GSubprocess

 

cancellable

a GCancellable, or NULL

 

callback

a GAsyncReadyCallback to call when the operation is complete

 

user_data

user_data for callback -

 
-
-

Since: 2.40

-
-
-
-

g_subprocess_wait_check_finish ()

-
gboolean
-g_subprocess_wait_check_finish (GSubprocess *subprocess,
-                                GAsyncResult *result,
-                                GError **error);
-

Collects the result of a previous call to -g_subprocess_wait_check_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

subprocess

a GSubprocess

 

result

the GAsyncResult passed to your GAsyncReadyCallback

 

error

a pointer to a NULL GError, or NULL

 
-
-
-

Returns

-

TRUE if successful, or FALSE with error -set

-
-

Since: 2.40

-
-
-
-

g_subprocess_get_successful ()

-
gboolean
-g_subprocess_get_successful (GSubprocess *subprocess);
-

Checks if the process was "successful". A process is considered -successful if it exited cleanly with an exit status of 0, either by -way of the exit() system call or return from main().

-

It is an error to call this function before g_subprocess_wait() has -returned.

-
-

Parameters

-
----- - - - - - -

subprocess

a GSubprocess

 
-
-
-

Returns

-

TRUE if the process exited cleanly with a exit status of 0

-
-

Since: 2.40

-
-
-
-

g_subprocess_get_if_exited ()

-
gboolean
-g_subprocess_get_if_exited (GSubprocess *subprocess);
-

Check if the given subprocess exited normally (ie: by way of exit() -or return from main()).

-

This is equivalent to the system WIFEXITED macro.

-

It is an error to call this function before g_subprocess_wait() has -returned.

-
-

Parameters

-
----- - - - - - -

subprocess

a GSubprocess

 
-
-
-

Returns

-

TRUE if the case of a normal exit

-
-

Since: 2.40

-
-
-
-

g_subprocess_get_exit_status ()

-
gint
-g_subprocess_get_exit_status (GSubprocess *subprocess);
-

Check the exit status of the subprocess, given that it exited -normally. This is the value passed to the exit() system call or the -return value from main.

-

This is equivalent to the system WEXITSTATUS macro.

-

It is an error to call this function before g_subprocess_wait() and -unless g_subprocess_get_if_exited() returned TRUE.

-
-

Parameters

-
----- - - - - - -

subprocess

a GSubprocess

 
-
-
-

Returns

-

the exit status

-
-

Since: 2.40

-
-
-
-

g_subprocess_get_if_signaled ()

-
gboolean
-g_subprocess_get_if_signaled (GSubprocess *subprocess);
-

Check if the given subprocess terminated in response to a signal.

-

This is equivalent to the system WIFSIGNALED macro.

-

It is an error to call this function before g_subprocess_wait() has -returned.

-
-

Parameters

-
----- - - - - - -

subprocess

a GSubprocess

 
-
-
-

Returns

-

TRUE if the case of termination due to a signal

-
-

Since: 2.40

-
-
-
-

g_subprocess_get_term_sig ()

-
gint
-g_subprocess_get_term_sig (GSubprocess *subprocess);
-

Get the signal number that caused the subprocess to terminate, given -that it terminated due to a signal.

-

This is equivalent to the system WTERMSIG macro.

-

It is an error to call this function before g_subprocess_wait() and -unless g_subprocess_get_if_signaled() returned TRUE.

-
-

Parameters

-
----- - - - - - -

subprocess

a GSubprocess

 
-
-
-

Returns

-

the signal causing termination

-
-

Since: 2.40

-
-
-
-

g_subprocess_get_status ()

-
gint
-g_subprocess_get_status (GSubprocess *subprocess);
-

Gets the raw status code of the process, as from waitpid().

-

This value has no particular meaning, but it can be used with the -macros defined by the system headers such as WIFEXITED. It can also -be used with g_spawn_check_exit_status().

-

It is more likely that you want to use g_subprocess_get_if_exited() -followed by g_subprocess_get_exit_status().

-

It is an error to call this function before g_subprocess_wait() has -returned.

-
-

Parameters

-
----- - - - - - -

subprocess

a GSubprocess

 
-
-
-

Returns

-

the (meaningless) waitpid() exit status from the kernel

-
-

Since: 2.40

-
-
-
-

g_subprocess_send_signal ()

-
void
-g_subprocess_send_signal (GSubprocess *subprocess,
-                          gint signal_num);
-

Sends the UNIX signal signal_num - to the subprocess, if it is still -running.

-

This API is race-free. If the subprocess has terminated, it will not -be signalled.

-

This API is not available on Windows.

-
-

Parameters

-
----- - - - - - - - - - - - - -

subprocess

a GSubprocess

 

signal_num

the signal number to send

 
-
-

Since: 2.40

-
-
-
-

g_subprocess_force_exit ()

-
void
-g_subprocess_force_exit (GSubprocess *subprocess);
-

Use an operating-system specific method to attempt an immediate, -forceful termination of the process. There is no mechanism to -determine whether or not the request itself was successful; -however, you can use g_subprocess_wait() to monitor the status of -the process after calling this function.

-

On Unix, this function sends SIGKILL.

-
-

Parameters

-
----- - - - - - -

subprocess

a GSubprocess

 
-
-

Since: 2.40

-
-
-
-

g_subprocess_communicate ()

-
gboolean
-g_subprocess_communicate (GSubprocess *subprocess,
-                          GBytes *stdin_buf,
-                          GCancellable *cancellable,
-                          GBytes **stdout_buf,
-                          GBytes **stderr_buf,
-                          GError **error);
-

Communicate with the subprocess until it terminates, and all input -and output has been completed.

-

If stdin_buf - is given, the subprocess must have been created with -G_SUBPROCESS_FLAGS_STDIN_PIPE. The given data is fed to the -stdin of the subprocess and the pipe is closed (ie: EOF).

-

At the same time (as not to cause blocking when dealing with large -amounts of data), if G_SUBPROCESS_FLAGS_STDOUT_PIPE or -G_SUBPROCESS_FLAGS_STDERR_PIPE were used, reads from those -streams. The data that was read is returned in stdout - and/or -the stderr -.

-

If the subprocess was created with G_SUBPROCESS_FLAGS_STDOUT_PIPE, -stdout_buf - will contain the data read from stdout. Otherwise, for -subprocesses not created with G_SUBPROCESS_FLAGS_STDOUT_PIPE, -stdout_buf - will be set to NULL. Similar provisions apply to -stderr_buf - and G_SUBPROCESS_FLAGS_STDERR_PIPE.

-

As usual, any output variable may be given as NULL to ignore it.

-

If you desire the stdout and stderr data to be interleaved, create -the subprocess with G_SUBPROCESS_FLAGS_STDOUT_PIPE and -G_SUBPROCESS_FLAGS_STDERR_MERGE. The merged result will be returned -in stdout_buf - and stderr_buf - will be set to NULL.

-

In case of any error (including cancellation), FALSE will be -returned with error - set. Some or all of the stdin data may have -been written. Any stdout or stderr data that has been read will be -discarded. None of the out variables (aside from error -) will have -been set to anything in particular and should not be inspected.

-

In the case that TRUE is returned, the subprocess has exited and the -exit status inspection APIs (eg: g_subprocess_get_if_exited(), -g_subprocess_get_exit_status()) may be used.

-

You should not attempt to use any of the subprocess pipes after -starting this function, since they may be left in strange states, -even if the operation was cancelled. You should especially not -attempt to interact with the pipes while the operation is in progress -(either from another thread or if using the asynchronous version).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

subprocess

a GSubprocess

 

stdin_buf

data to send to the stdin of the subprocess, or NULL.

[nullable]

cancellable

a GCancellable

 

stdout_buf

data read from the subprocess stdout.

[out]

stderr_buf

data read from the subprocess stderr.

[out]

error

a pointer to a NULL GError pointer, or NULL

 
-
-
-

Returns

-

TRUE if successful

-
-

Since: 2.40

-
-
-
-

g_subprocess_communicate_async ()

-
void
-g_subprocess_communicate_async (GSubprocess *subprocess,
-                                GBytes *stdin_buf,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

Asynchronous version of g_subprocess_communicate(). Complete -invocation with g_subprocess_communicate_finish().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

subprocess

Self

 

stdin_buf

Input data, or NULL.

[nullable]

cancellable

Cancellable.

[nullable]

callback

Callback

 

user_data

User data

 
-
-
-
-
-

g_subprocess_communicate_finish ()

-
gboolean
-g_subprocess_communicate_finish (GSubprocess *subprocess,
-                                 GAsyncResult *result,
-                                 GBytes **stdout_buf,
-                                 GBytes **stderr_buf,
-                                 GError **error);
-

Complete an invocation of g_subprocess_communicate_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

subprocess

Self

 

result

Result

 

stdout_buf

Return location for stdout data.

[out]

stderr_buf

Return location for stderr data.

[out]

error

Error

 
-
-
-
-
-

g_subprocess_communicate_utf8 ()

-
gboolean
-g_subprocess_communicate_utf8 (GSubprocess *subprocess,
-                               const char *stdin_buf,
-                               GCancellable *cancellable,
-                               char **stdout_buf,
-                               char **stderr_buf,
-                               GError **error);
-

Like g_subprocess_communicate(), but validates the output of the -process as UTF-8, and returns it as a regular NUL terminated string.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

subprocess

a GSubprocess

 

stdin_buf

data to send to the stdin of the subprocess, or NULL.

[nullable]

cancellable

a GCancellable

 

stdout_buf

data read from the subprocess stdout.

[out]

stderr_buf

data read from the subprocess stderr.

[out]

error

a pointer to a NULL GError pointer, or NULL

 
-
-
-
-
-

g_subprocess_communicate_utf8_async ()

-
void
-g_subprocess_communicate_utf8_async (GSubprocess *subprocess,
-                                     const char *stdin_buf,
-                                     GCancellable *cancellable,
-                                     GAsyncReadyCallback callback,
-                                     gpointer user_data);
-

Asynchronous version of g_subprocess_communicate_utf8(). Complete -invocation with g_subprocess_communicate_utf8_finish().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

subprocess

Self

 

stdin_buf

Input data, or NULL.

[nullable]

cancellable

Cancellable

 

callback

Callback

 

user_data

User data

 
-
-
-
-
-

g_subprocess_communicate_utf8_finish ()

-
gboolean
-g_subprocess_communicate_utf8_finish (GSubprocess *subprocess,
-                                      GAsyncResult *result,
-                                      char **stdout_buf,
-                                      char **stderr_buf,
-                                      GError **error);
-

Complete an invocation of g_subprocess_communicate_utf8_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

subprocess

Self

 

result

Result

 

stdout_buf

Return location for stdout data.

[out]

stderr_buf

Return location for stderr data.

[out]

error

Error

 
-
-
-
-
-

Types and Values

-
-

GSubprocess

-
typedef struct _GSubprocess GSubprocess;
-

A child process.

-

Since: 2.40

-
-
-
-

enum GSubprocessFlags

-

Flags to define the behaviour of a GSubprocess.

-

Note that the default for stdin is to redirect from /dev/null. For -stdout and stderr the default are for them to inherit the -corresponding descriptor from the calling process.

-

Note that it is a programmer error to mix 'incompatible' flags. For -example, you may not request both G_SUBPROCESS_FLAGS_STDOUT_PIPE and -G_SUBPROCESS_FLAGS_STDOUT_SILENCE.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_SUBPROCESS_FLAGS_NONE

-

No flags.

-
 

G_SUBPROCESS_FLAGS_STDIN_PIPE

-

create a pipe for the stdin of the - spawned process that can be accessed with - g_subprocess_get_stdin_pipe().

-
 

G_SUBPROCESS_FLAGS_STDIN_INHERIT

-

stdin is inherited from the - calling process.

-
 

G_SUBPROCESS_FLAGS_STDOUT_PIPE

-

create a pipe for the stdout of the - spawned process that can be accessed with - g_subprocess_get_stdout_pipe().

-
 

G_SUBPROCESS_FLAGS_STDOUT_SILENCE

-

silence the stdout of the spawned - process (ie: redirect to /dev/null).

-
 

G_SUBPROCESS_FLAGS_STDERR_PIPE

-

create a pipe for the stderr of the - spawned process that can be accessed with - g_subprocess_get_stderr_pipe().

-
 

G_SUBPROCESS_FLAGS_STDERR_SILENCE

-

silence the stderr of the spawned - process (ie: redirect to /dev/null).

-
 

G_SUBPROCESS_FLAGS_STDERR_MERGE

-

merge the stderr of the spawned - process with whatever the stdout happens to be. This is a good way - of directing both streams to a common log file, for example.

-
 

G_SUBPROCESS_FLAGS_INHERIT_FDS

-

spawned processes will inherit the - file descriptors of their parent, unless those descriptors have - been explicitly marked as close-on-exec. This flag has no effect - over the "standard" file descriptors (stdin, stdout, stderr).

-
 
-
-

Since: 2.40

-
-
-
-

Property Details

-
-

The “argv” property

-
  “argv”                     GStrv
-

Argument vector.

-

Flags: Write / Construct Only

-
-
-
-

The “flags” property

-
  “flags”                    GSubprocessFlags
-

Subprocess flags.

-

Flags: Write / Construct Only

-
-
-
-

See Also

-

GSubprocessLauncher

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GSubprocessLauncher.html b/docs/reference/gio/html/GSubprocessLauncher.html deleted file mode 100644 index 02f1d53e5..000000000 --- a/docs/reference/gio/html/GSubprocessLauncher.html +++ /dev/null @@ -1,960 +0,0 @@ - - - - -GSubprocess Launcher: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSubprocess Launcher

-

GSubprocess Launcher — Environment options for launching a child process

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GSubprocessLauncher * - -g_subprocess_launcher_new () -
-GSubprocess * - -g_subprocess_launcher_spawn () -
-GSubprocess * - -g_subprocess_launcher_spawnv () -
-void - -g_subprocess_launcher_set_environ () -
-void - -g_subprocess_launcher_setenv () -
-void - -g_subprocess_launcher_unsetenv () -
const gchar * - -g_subprocess_launcher_getenv () -
-void - -g_subprocess_launcher_set_cwd () -
-void - -g_subprocess_launcher_set_flags () -
-void - -g_subprocess_launcher_set_stdin_file_path () -
-void - -g_subprocess_launcher_take_stdin_fd () -
-void - -g_subprocess_launcher_set_stdout_file_path () -
-void - -g_subprocess_launcher_take_stdout_fd () -
-void - -g_subprocess_launcher_set_stderr_file_path () -
-void - -g_subprocess_launcher_take_stderr_fd () -
-void - -g_subprocess_launcher_take_fd () -
-void - -g_subprocess_launcher_set_child_setup () -
-
-
-

Properties

-
----- - - - - - -
GSubprocessFlagsflagsWrite / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GSubprocessLauncher
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSubprocessLauncher
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

This class contains a set of options for launching child processes, -such as where its standard input and output will be directed, the -argument list, the environment, and more.

-

While the GSubprocess class has high level functions covering -popular cases, use of this class allows access to more advanced -options. It can also be used to launch multiple subprocesses with -a similar configuration.

-
-
-

Functions

-
-

g_subprocess_launcher_new ()

-
GSubprocessLauncher *
-g_subprocess_launcher_new (GSubprocessFlags flags);
-

Creates a new GSubprocessLauncher.

-

The launcher is created with the default options. A copy of the -environment of the calling process is made at the time of this call -and will be used as the environment that the process is launched in.

-
-

Parameters

-
----- - - - - - -

flags

GSubprocessFlags

 
-
-

Since: 2.40

-
-
-
-

g_subprocess_launcher_spawn ()

-
GSubprocess *
-g_subprocess_launcher_spawn (GSubprocessLauncher *self,
-                             GError **error,
-                             const gchar *argv0,
-                             ...);
-

Creates a GSubprocess given a provided varargs list of arguments.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

self

a GSubprocessLauncher

 

error

Error

 

argv0

Command line arguments

 

...

Continued arguments, NULL terminated

 
-
-
-

Returns

-

A new GSubprocess, or NULL on error (and error -will be set).

-

[transfer full]

-
-

Since: 2.40

-
-
-
-

g_subprocess_launcher_spawnv ()

-
GSubprocess *
-g_subprocess_launcher_spawnv (GSubprocessLauncher *self,
-                              const gchar * const *argv,
-                              GError **error);
-

Creates a GSubprocess given a provided array of arguments.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

self

a GSubprocessLauncher

 

argv

Command line arguments.

[array zero-terminated=1][element-type utf8]

error

Error

 
-
-
-

Returns

-

A new GSubprocess, or NULL on error (and error -will be set).

-

[transfer full]

-
-

Since: 2.40

-
-
-
-

g_subprocess_launcher_set_environ ()

-
void
-g_subprocess_launcher_set_environ (GSubprocessLauncher *self,
-                                   gchar **env);
-

Replace the entire environment of processes launched from this -launcher with the given 'environ' variable.

-

Typically you will build this variable by using g_listenv() to copy -the process 'environ' and using the functions g_environ_setenv(), -g_environ_unsetenv(), etc.

-

As an alternative, you can use g_subprocess_launcher_setenv(), -g_subprocess_launcher_unsetenv(), etc.

-

Pass NULL to inherit the parent process' environment. Pass an -empty array to set an empty environment.

-

On UNIX, all strings in this array can be arbitrary byte strings. -On Windows, they should be in UTF-8.

-
-

Parameters

-
----- - - - - - - - - - - - - -

self

a GSubprocess

 

env

the replacement environment.

[array zero-terminated=1]
-
-

Since: 2.40

-
-
-
-

g_subprocess_launcher_setenv ()

-
void
-g_subprocess_launcher_setenv (GSubprocessLauncher *self,
-                              const gchar *variable,
-                              const gchar *value,
-                              gboolean overwrite);
-

Sets the environment variable variable - in the environment of -processes launched from this launcher.

-

On UNIX, both the variable's name and value can be arbitrary byte -strings, except that the variable's name cannot contain '='. -On Windows, they should be in UTF-8.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

self

a GSubprocess

 

variable

the environment variable to set, must not contain '='

 

value

the new value for the variable

 

overwrite

whether to change the variable if it already exists

 
-
-

Since: 2.40

-
-
-
-

g_subprocess_launcher_unsetenv ()

-
void
-g_subprocess_launcher_unsetenv (GSubprocessLauncher *self,
-                                const gchar *variable);
-

Removes the environment variable variable - from the environment of -processes launched from this launcher.

-

On UNIX, the variable's name can be an arbitrary byte string not -containing '='. On Windows, it should be in UTF-8.

-
-

Parameters

-
----- - - - - - - - - - - - - -

self

a GSubprocess

 

variable

the environment variable to unset, must not contain '='

 
-
-

Since: 2.40

-
-
-
-

g_subprocess_launcher_getenv ()

-
const gchar *
-g_subprocess_launcher_getenv (GSubprocessLauncher *self,
-                              const gchar *variable);
-

Returns the value of the environment variable variable - in the -environment of processes launched from this launcher.

-

On UNIX, the returned string can be an arbitrary byte string. -On Windows, it will be UTF-8.

-
-

Parameters

-
----- - - - - - - - - - - - - -

self

a GSubprocess

 

variable

the environment variable to get

 
-
-
-

Returns

-

the value of the environment variable, NULL if unset

-
-

Since: 2.40

-
-
-
-

g_subprocess_launcher_set_cwd ()

-
void
-g_subprocess_launcher_set_cwd (GSubprocessLauncher *self,
-                               const gchar *cwd);
-

Sets the current working directory that processes will be launched -with.

-

By default processes are launched with the current working directory -of the launching process at the time of launch.

-
-

Parameters

-
----- - - - - - - - - - - - - -

self

a GSubprocess

 

cwd

the cwd for launched processes.

[type filename]
-
-

Since: 2.40

-
-
-
-

g_subprocess_launcher_set_flags ()

-
void
-g_subprocess_launcher_set_flags (GSubprocessLauncher *self,
-                                 GSubprocessFlags flags);
-

Sets the flags on the launcher.

-

The default flags are G_SUBPROCESS_FLAGS_NONE.

-

You may not set flags that specify conflicting options for how to -handle a particular stdio stream (eg: specifying both -G_SUBPROCESS_FLAGS_STDIN_PIPE and -G_SUBPROCESS_FLAGS_STDIN_INHERIT).

-

You may also not set a flag that conflicts with a previous call to a -function like g_subprocess_launcher_set_stdin_file_path() or -g_subprocess_launcher_take_stdout_fd().

-
-

Parameters

-
----- - - - - - - - - - - - - -

self

a GSubprocessLauncher

 

flags

GSubprocessFlags

 
-
-

Since: 2.40

-
-
-
-

g_subprocess_launcher_set_stdin_file_path ()

-
void
-g_subprocess_launcher_set_stdin_file_path
-                               (GSubprocessLauncher *self,
-                                const gchar *path);
-

Sets the file path to use as the stdin for spawned processes.

-

If path - is NULL then any previously given path is unset.

-

The file must exist or spawning the process will fail.

-

You may not set a stdin file path if a stdin fd is already set or if -the launcher flags contain any flags directing stdin elsewhere.

-

This feature is only available on UNIX.

-
-

Parameters

-
----- - - - - - - - - - - - - -

self

a GSubprocessLauncher

 

path

(type filename) (nullable: a filename or NULL

 
-
-

Since: 2.40

-
-
-
-

g_subprocess_launcher_take_stdin_fd ()

-
void
-g_subprocess_launcher_take_stdin_fd (GSubprocessLauncher *self,
-                                     gint fd);
-

Sets the file descriptor to use as the stdin for spawned processes.

-

If fd - is -1 then any previously given fd is unset.

-

Note that if your intention is to have the stdin of the calling -process inherited by the child then G_SUBPROCESS_FLAGS_STDIN_INHERIT -is a better way to go about doing that.

-

The passed fd - is noted but will not be touched in the current -process. It is therefore necessary that it be kept open by the -caller until the subprocess is spawned. The file descriptor will -also not be explicitly closed on the child side, so it must be marked -O_CLOEXEC if that's what you want.

-

You may not set a stdin fd if a stdin file path is already set or if -the launcher flags contain any flags directing stdin elsewhere.

-

This feature is only available on UNIX.

-
-

Parameters

-
----- - - - - - - - - - - - - -

self

a GSubprocessLauncher

 

fd

a file descriptor, or -1

 
-
-

Since: 2.40

-
-
-
-

g_subprocess_launcher_set_stdout_file_path ()

-
void
-g_subprocess_launcher_set_stdout_file_path
-                               (GSubprocessLauncher *self,
-                                const gchar *path);
-

Sets the file path to use as the stdout for spawned processes.

-

If path - is NULL then any previously given path is unset.

-

The file will be created or truncated when the process is spawned, as -would be the case if using '>' at the shell.

-

You may not set a stdout file path if a stdout fd is already set or -if the launcher flags contain any flags directing stdout elsewhere.

-

This feature is only available on UNIX.

-
-

Parameters

-
----- - - - - - - - - - - - - -

self

a GSubprocessLauncher

 

path

a filename or NULL.

[type filename][nullable]
-
-

Since: 2.40

-
-
-
-

g_subprocess_launcher_take_stdout_fd ()

-
void
-g_subprocess_launcher_take_stdout_fd (GSubprocessLauncher *self,
-                                      gint fd);
-

Sets the file descriptor to use as the stdout for spawned processes.

-

If fd - is -1 then any previously given fd is unset.

-

Note that the default behaviour is to pass stdout through to the -stdout of the parent process.

-

The passed fd - is noted but will not be touched in the current -process. It is therefore necessary that it be kept open by the -caller until the subprocess is spawned. The file descriptor will -also not be explicitly closed on the child side, so it must be marked -O_CLOEXEC if that's what you want.

-

You may not set a stdout fd if a stdout file path is already set or -if the launcher flags contain any flags directing stdout elsewhere.

-

This feature is only available on UNIX.

-
-

Parameters

-
----- - - - - - - - - - - - - -

self

a GSubprocessLauncher

 

fd

a file descriptor, or -1

 
-
-

Since: 2.40

-
-
-
-

g_subprocess_launcher_set_stderr_file_path ()

-
void
-g_subprocess_launcher_set_stderr_file_path
-                               (GSubprocessLauncher *self,
-                                const gchar *path);
-

Sets the file path to use as the stderr for spawned processes.

-

If path - is NULL then any previously given path is unset.

-

The file will be created or truncated when the process is spawned, as -would be the case if using '2>' at the shell.

-

If you want to send both stdout and stderr to the same file then use -G_SUBPROCESS_FLAGS_STDERR_MERGE.

-

You may not set a stderr file path if a stderr fd is already set or -if the launcher flags contain any flags directing stderr elsewhere.

-

This feature is only available on UNIX.

-
-

Parameters

-
----- - - - - - - - - - - - - -

self

a GSubprocessLauncher

 

path

a filename or NULL.

[type filename][nullable]
-
-

Since: 2.40

-
-
-
-

g_subprocess_launcher_take_stderr_fd ()

-
void
-g_subprocess_launcher_take_stderr_fd (GSubprocessLauncher *self,
-                                      gint fd);
-

Sets the file descriptor to use as the stderr for spawned processes.

-

If fd - is -1 then any previously given fd is unset.

-

Note that the default behaviour is to pass stderr through to the -stderr of the parent process.

-

The passed fd - belongs to the GSubprocessLauncher. It will be -automatically closed when the launcher is finalized. The file -descriptor will also be closed on the child side when executing the -spawned process.

-

You may not set a stderr fd if a stderr file path is already set or -if the launcher flags contain any flags directing stderr elsewhere.

-

This feature is only available on UNIX.

-
-

Parameters

-
----- - - - - - - - - - - - - -

self

a GSubprocessLauncher

 

fd

a file descriptor, or -1

 
-
-

Since: 2.40

-
-
-
-

g_subprocess_launcher_take_fd ()

-
void
-g_subprocess_launcher_take_fd (GSubprocessLauncher *self,
-                               gint source_fd,
-                               gint target_fd);
-

Transfer an arbitrary file descriptor from parent process to the -child. This function takes "ownership" of the fd; it will be closed -in the parent when self - is freed.

-

By default, all file descriptors from the parent will be closed. -This function allows you to create (for example) a custom pipe() or -socketpair() before launching the process, and choose the target -descriptor in the child.

-

An example use case is GNUPG, which has a command line argument ---passphrase-fd providing a file descriptor number where it expects -the passphrase to be written.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

self

a GSubprocessLauncher

 

source_fd

File descriptor in parent process

 

target_fd

Target descriptor for child process

 
-
-
-
-
-

g_subprocess_launcher_set_child_setup ()

-
void
-g_subprocess_launcher_set_child_setup (GSubprocessLauncher *self,
-                                       GSpawnChildSetupFunc child_setup,
-                                       gpointer user_data,
-                                       GDestroyNotify destroy_notify);
-

Sets up a child setup function.

-

The child setup function will be called after fork() but before -exec() on the child's side.

-

destroy_notify - will not be automatically called on the child's side -of the fork(). It will only be called when the last reference on the -GSubprocessLauncher is dropped or when a new child setup function is -given.

-

NULL can be given as child_setup - to disable the functionality.

-

Child setup functions are only available on UNIX.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

self

a GSubprocessLauncher

 

child_setup

a GSpawnChildSetupFunc to use as the child setup function

 

user_data

user data for child_setup -

 

destroy_notify

a GDestroyNotify for user_data -

 
-
-

Since: 2.40

-
-
-
-

Types and Values

-
-

GSubprocessLauncher

-
typedef struct _GSubprocessLauncher GSubprocessLauncher;
-

Options for launching a child process.

-

Since: 2.40

-
-
-
-

Property Details

-
-

The “flags” property

-
  “flags”                    GSubprocessFlags
-

GSubprocessFlags for launched processes.

-

Flags: Write / Construct Only

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GTask.html b/docs/reference/gio/html/GTask.html deleted file mode 100644 index a985b7ad3..000000000 --- a/docs/reference/gio/html/GTask.html +++ /dev/null @@ -1,2636 +0,0 @@ - - - - -GTask: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GTask

-

GTask — Cancellable synchronous or asynchronous task - and result

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GTask * - -g_task_new () -
-void - -g_task_set_task_data () -
-void - -g_task_set_priority () -
-void - -g_task_set_check_cancellable () -
-gboolean - -g_task_set_return_on_cancel () -
-void - -g_task_set_source_tag () -
-void - -g_task_report_error () -
-void - -g_task_report_new_error () -
-gpointer - -g_task_get_task_data () -
-gint - -g_task_get_priority () -
-GCancellable * - -g_task_get_cancellable () -
-gboolean - -g_task_get_check_cancellable () -
-gboolean - -g_task_get_return_on_cancel () -
-GMainContext * - -g_task_get_context () -
-gpointer - -g_task_get_source_object () -
-gpointer - -g_task_get_source_tag () -
-void - -g_task_return_boolean () -
-void - -g_task_return_int () -
-void - -g_task_return_pointer () -
-void - -g_task_return_error () -
-void - -g_task_return_new_error () -
-gboolean - -g_task_return_error_if_cancelled () -
-gboolean - -g_task_propagate_boolean () -
-gssize - -g_task_propagate_int () -
-gpointer - -g_task_propagate_pointer () -
-gboolean - -g_task_had_error () -
-gboolean - -g_task_get_completed () -
-void - -g_task_run_in_thread () -
-void - -g_task_run_in_thread_sync () -
-void - -(*GTaskThreadFunc) () -
-void - -g_task_attach_source () -
-gboolean - -g_task_is_valid () -
-
-
-

Properties

-
----- - - - - - -
gbooleancompletedRead
-
-
-

Types and Values

-
---- - - - - -
 GTask
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GTask
-
-
-
-

Implemented Interfaces

-

-GTask implements - GAsyncResult.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A GTask represents and manages a cancellable "task".

-
-

Asynchronous operations

-

The most common usage of GTask is as a GAsyncResult, to -manage data during an asynchronous operation. You call -g_task_new() in the "start" method, followed by -g_task_set_task_data() and the like if you need to keep some -additional data associated with the task, and then pass the -task object around through your asynchronous operation. -Eventually, you will call a method such as -g_task_return_pointer() or g_task_return_error(), which will -save the value you give it and then invoke the task's callback -function (waiting until the next iteration of the main -loop first, if necessary). The caller will pass the GTask back -to the operation's finish function (as a GAsyncResult), and -you can use g_task_propagate_pointer() or the like to extract -the return value.

-

Here is an example for using GTask as a GAsyncResult:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
typedef struct {
-  CakeFrostingType frosting;
-  char *message;
-} DecorationData;
-
-static void
-decoration_data_free (DecorationData *decoration)
-{
-  g_free (decoration->message);
-  g_slice_free (DecorationData, decoration);
-}
-
-static void
-baked_cb (Cake     *cake,
-          gpointer  user_data)
-{
-  GTask *task = user_data;
-  DecorationData *decoration = g_task_get_task_data (task);
-  GError *error = NULL;
-
-  if (cake == NULL)
-    {
-      g_task_return_new_error (task, BAKER_ERROR, BAKER_ERROR_NO_FLOUR,
-                               "Go to the supermarket");
-      g_object_unref (task);
-      return;
-    }
-
-  if (!cake_decorate (cake, decoration->frosting, decoration->message, &error))
-    {
-      g_object_unref (cake);
-      // g_task_return_error() takes ownership of error
-      g_task_return_error (task, error);
-      g_object_unref (task);
-      return;
-    }
-
-  g_task_return_pointer (task, cake, g_object_unref);
-  g_object_unref (task);
-}
-
-void
-baker_bake_cake_async (Baker               *self,
-                       guint                radius,
-                       CakeFlavor           flavor,
-                       CakeFrostingType     frosting,
-                       const char          *message,
-                       GCancellable        *cancellable,
-                       GAsyncReadyCallback  callback,
-                       gpointer             user_data)
-{
-  GTask *task;
-  DecorationData *decoration;
-  Cake  *cake;
-
-  task = g_task_new (self, cancellable, callback, user_data);
-  if (radius < 3)
-    {
-      g_task_return_new_error (task, BAKER_ERROR, BAKER_ERROR_TOO_SMALL,
-                               "%ucm radius cakes are silly",
-                               radius);
-      g_object_unref (task);
-      return;
-    }
-
-  cake = _baker_get_cached_cake (self, radius, flavor, frosting, message);
-  if (cake != NULL)
-    {
-      // _baker_get_cached_cake() returns a reffed cake
-      g_task_return_pointer (task, cake, g_object_unref);
-      g_object_unref (task);
-      return;
-    }
-
-  decoration = g_slice_new (DecorationData);
-  decoration->frosting = frosting;
-  decoration->message = g_strdup (message);
-  g_task_set_task_data (task, decoration, (GDestroyNotify) decoration_data_free);
-
-  _baker_begin_cake (self, radius, flavor, cancellable, baked_cb, task);
-}
-
-Cake *
-baker_bake_cake_finish (Baker         *self,
-                        GAsyncResult  *result,
-                        GError       **error)
-{
-  g_return_val_if_fail (g_task_is_valid (result, self), NULL);
-
-  return g_task_propagate_pointer (G_TASK (result), error);
-}
-
- -

-
-
-

Chained asynchronous operations

-

GTask also tries to simplify asynchronous operations that -internally chain together several smaller asynchronous -operations. g_task_get_cancellable(), g_task_get_context(), -and g_task_get_priority() allow you to get back the task's -GCancellable, GMainContext, and I/O priority -when starting a new subtask, so you don't have to keep track -of them yourself. g_task_attach_source() simplifies the case -of waiting for a source to fire (automatically using the correct -GMainContext and priority).

-

Here is an example for chained asynchronous operations:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
-111
-112
-113
-114
-115
-116
-117
-118
-119
-120
-121
-122
-123
typedef struct {
-  Cake *cake;
-  CakeFrostingType frosting;
-  char *message;
-} BakingData;
-
-static void
-decoration_data_free (BakingData *bd)
-{
-  if (bd->cake)
-    g_object_unref (bd->cake);
-  g_free (bd->message);
-  g_slice_free (BakingData, bd);
-}
-
-static void
-decorated_cb (Cake         *cake,
-              GAsyncResult *result,
-              gpointer      user_data)
-{
-  GTask *task = user_data;
-  GError *error = NULL;
-
-  if (!cake_decorate_finish (cake, result, &error))
-    {
-      g_object_unref (cake);
-      g_task_return_error (task, error);
-      g_object_unref (task);
-      return;
-    }
-
-  // baking_data_free() will drop its ref on the cake, so we have to
-  // take another here to give to the caller.
-  g_task_return_pointer (task, g_object_ref (cake), g_object_unref);
-  g_object_unref (task);
-}
-
-static gboolean
-decorator_ready (gpointer user_data)
-{
-  GTask *task = user_data;
-  BakingData *bd = g_task_get_task_data (task);
-
-  cake_decorate_async (bd->cake, bd->frosting, bd->message,
-                       g_task_get_cancellable (task),
-                       decorated_cb, task);
-
-  return G_SOURCE_REMOVE;
-}
-
-static void
-baked_cb (Cake     *cake,
-          gpointer  user_data)
-{
-  GTask *task = user_data;
-  BakingData *bd = g_task_get_task_data (task);
-  GError *error = NULL;
-
-  if (cake == NULL)
-    {
-      g_task_return_new_error (task, BAKER_ERROR, BAKER_ERROR_NO_FLOUR,
-                               "Go to the supermarket");
-      g_object_unref (task);
-      return;
-    }
-
-  bd->cake = cake;
-
-  // Bail out now if the user has already cancelled
-  if (g_task_return_error_if_cancelled (task))
-    {
-      g_object_unref (task);
-      return;
-    }
-
-  if (cake_decorator_available (cake))
-    decorator_ready (task);
-  else
-    {
-      GSource *source;
-
-      source = cake_decorator_wait_source_new (cake);
-      // Attach @source to @task's GMainContext and have it call
-      // decorator_ready() when it is ready.
-      g_task_attach_source (task, source, decorator_ready);
-      g_source_unref (source);
-    }
-}
-
-void
-baker_bake_cake_async (Baker               *self,
-                       guint                radius,
-                       CakeFlavor           flavor,
-                       CakeFrostingType     frosting,
-                       const char          *message,
-                       gint                 priority,
-                       GCancellable        *cancellable,
-                       GAsyncReadyCallback  callback,
-                       gpointer             user_data)
-{
-  GTask *task;
-  BakingData *bd;
-
-  task = g_task_new (self, cancellable, callback, user_data);
-  g_task_set_priority (task, priority);
-
-  bd = g_slice_new0 (BakingData);
-  bd->frosting = frosting;
-  bd->message = g_strdup (message);
-  g_task_set_task_data (task, bd, (GDestroyNotify) baking_data_free);
-
-  _baker_begin_cake (self, radius, flavor, cancellable, baked_cb, task);
-}
-
-Cake *
-baker_bake_cake_finish (Baker         *self,
-                        GAsyncResult  *result,
-                        GError       **error)
-{
-  g_return_val_if_fail (g_task_is_valid (result, self), NULL);
-
-  return g_task_propagate_pointer (G_TASK (result), error);
-}
-
- -

-
-
-

Asynchronous operations from synchronous ones

-

You can use g_task_run_in_thread() to turn a synchronous -operation into an asynchronous one, by running it in a thread -which will then dispatch the result back to the caller's -GMainContext when it completes.

-

Running a task in a thread:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
typedef struct {
-  guint radius;
-  CakeFlavor flavor;
-  CakeFrostingType frosting;
-  char *message;
-} CakeData;
-
-static void
-cake_data_free (CakeData *cake_data)
-{
-  g_free (cake_data->message);
-  g_slice_free (CakeData, cake_data);
-}
-
-static void
-bake_cake_thread (GTask         *task,
-                  gpointer       source_object,
-                  gpointer       task_data,
-                  GCancellable  *cancellable)
-{
-  Baker *self = source_object;
-  CakeData *cake_data = task_data;
-  Cake *cake;
-  GError *error = NULL;
-
-  cake = bake_cake (baker, cake_data->radius, cake_data->flavor,
-                    cake_data->frosting, cake_data->message,
-                    cancellable, &error);
-  if (cake)
-    g_task_return_pointer (task, cake, g_object_unref);
-  else
-    g_task_return_error (task, error);
-}
-
-void
-baker_bake_cake_async (Baker               *self,
-                       guint                radius,
-                       CakeFlavor           flavor,
-                       CakeFrostingType     frosting,
-                       const char          *message,
-                       GCancellable        *cancellable,
-                       GAsyncReadyCallback  callback,
-                       gpointer             user_data)
-{
-  CakeData *cake_data;
-  GTask *task;
-
-  cake_data = g_slice_new (CakeData);
-  cake_data->radius = radius;
-  cake_data->flavor = flavor;
-  cake_data->frosting = frosting;
-  cake_data->message = g_strdup (message);
-  task = g_task_new (self, cancellable, callback, user_data);
-  g_task_set_task_data (task, cake_data, (GDestroyNotify) cake_data_free);
-  g_task_run_in_thread (task, bake_cake_thread);
-  g_object_unref (task);
-}
-
-Cake *
-baker_bake_cake_finish (Baker         *self,
-                        GAsyncResult  *result,
-                        GError       **error)
-{
-  g_return_val_if_fail (g_task_is_valid (result, self), NULL);
-
-  return g_task_propagate_pointer (G_TASK (result), error);
-}
-
- -

-
-
-

Adding cancellability to uncancellable tasks

-

Finally, g_task_run_in_thread() and g_task_run_in_thread_sync() -can be used to turn an uncancellable operation into a -cancellable one. If you call g_task_set_return_on_cancel(), -passing TRUE, then if the task's GCancellable is cancelled, -it will return control back to the caller immediately, while -allowing the task thread to continue running in the background -(and simply discarding its result when it finally does finish). -Provided that the task thread is careful about how it uses -locks and other externally-visible resources, this allows you -to make "GLib-friendly" asynchronous and cancellable -synchronous variants of blocking APIs.

-

Cancelling a task:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
static void
-bake_cake_thread (GTask         *task,
-                  gpointer       source_object,
-                  gpointer       task_data,
-                  GCancellable  *cancellable)
-{
-  Baker *self = source_object;
-  CakeData *cake_data = task_data;
-  Cake *cake;
-  GError *error = NULL;
-
-  cake = bake_cake (baker, cake_data->radius, cake_data->flavor,
-                    cake_data->frosting, cake_data->message,
-                    &error);
-  if (error)
-    {
-      g_task_return_error (task, error);
-      return;
-    }
-
-  // If the task has already been cancelled, then we don't want to add
-  // the cake to the cake cache. Likewise, we don't  want to have the
-  // task get cancelled in the middle of updating the cache.
-  // g_task_set_return_on_cancel() will return %TRUE here if it managed
-  // to disable return-on-cancel, or %FALSE if the task was cancelled
-  // before it could.
-  if (g_task_set_return_on_cancel (task, FALSE))
-    {
-      // If the caller cancels at this point, their
-      // GAsyncReadyCallback won't be invoked until we return,
-      // so we don't have to worry that this code will run at
-      // the same time as that code does. But if there were
-      // other functions that might look at the cake cache,
-      // then we'd probably need a GMutex here as well.
-      baker_add_cake_to_cache (baker, cake);
-      g_task_return_pointer (task, cake, g_object_unref);
-    }
-}
-
-void
-baker_bake_cake_async (Baker               *self,
-                       guint                radius,
-                       CakeFlavor           flavor,
-                       CakeFrostingType     frosting,
-                       const char          *message,
-                       GCancellable        *cancellable,
-                       GAsyncReadyCallback  callback,
-                       gpointer             user_data)
-{
-  CakeData *cake_data;
-  GTask *task;
-
-  cake_data = g_slice_new (CakeData);
-
-  ...
-
-  task = g_task_new (self, cancellable, callback, user_data);
-  g_task_set_task_data (task, cake_data, (GDestroyNotify) cake_data_free);
-  g_task_set_return_on_cancel (task, TRUE);
-  g_task_run_in_thread (task, bake_cake_thread);
-}
-
-Cake *
-baker_bake_cake_sync (Baker               *self,
-                      guint                radius,
-                      CakeFlavor           flavor,
-                      CakeFrostingType     frosting,
-                      const char          *message,
-                      GCancellable        *cancellable,
-                      GError             **error)
-{
-  CakeData *cake_data;
-  GTask *task;
-  Cake *cake;
-
-  cake_data = g_slice_new (CakeData);
-
-  ...
-
-  task = g_task_new (self, cancellable, NULL, NULL);
-  g_task_set_task_data (task, cake_data, (GDestroyNotify) cake_data_free);
-  g_task_set_return_on_cancel (task, TRUE);
-  g_task_run_in_thread_sync (task, bake_cake_thread);
-
-  cake = g_task_propagate_pointer (task, error);
-  g_object_unref (task);
-  return cake;
-}
-
- -

-
-
-

Porting from GSimpleAsyncResult

-

GTask's API attempts to be simpler than GSimpleAsyncResult's -in several ways:

-
-
-
-
-

Functions

-
-

g_task_new ()

-
GTask *
-g_task_new (gpointer source_object,
-            GCancellable *cancellable,
-            GAsyncReadyCallback callback,
-            gpointer callback_data);
-

Creates a GTask acting on source_object -, which will eventually be -used to invoke callback - in the current -thread-default main context.

-

Call this in the "start" method of your asynchronous method, and -pass the GTask around throughout the asynchronous operation. You -can use g_task_set_task_data() to attach task-specific data to the -object, which you can retrieve later via g_task_get_task_data().

-

By default, if cancellable - is cancelled, then the return value of -the task will always be G_IO_ERROR_CANCELLED, even if the task had -already completed before the cancellation. This allows for -simplified handling in cases where cancellation may imply that -other objects that the task depends on have been destroyed. If you -do not want this behavior, you can use -g_task_set_check_cancellable() to change it.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

source_object

the GObject that owns -this task, or NULL.

[nullable][type GObject]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback.

[scope async]

callback_data

user data passed to callback -.

[closure]
-
-
-

Returns

-

a GTask.

-
-

Since: 2.36

-
-
-
-

g_task_set_task_data ()

-
void
-g_task_set_task_data (GTask *task,
-                      gpointer task_data,
-                      GDestroyNotify task_data_destroy);
-

Sets task -'s task data (freeing the existing task data, if any).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

task

the GTask

 

task_data

task-specific data.

[nullable]

task_data_destroy

GDestroyNotify for task_data -.

[nullable]
-
-

Since: 2.36

-
-
-
-

g_task_set_priority ()

-
void
-g_task_set_priority (GTask *task,
-                     gint priority);
-

Sets task -'s priority. If you do not call this, it will default to -G_PRIORITY_DEFAULT.

-

This will affect the priority of GSources created with -g_task_attach_source() and the scheduling of tasks run in threads, -and can also be explicitly retrieved later via -g_task_get_priority().

-
-

Parameters

-
----- - - - - - - - - - - - - -

task

the GTask

 

priority

the priority of the request

 
-
-

Since: 2.36

-
-
-
-

g_task_set_check_cancellable ()

-
void
-g_task_set_check_cancellable (GTask *task,
-                              gboolean check_cancellable);
-

Sets or clears task -'s check-cancellable flag. If this is TRUE -(the default), then g_task_propagate_pointer(), etc, and -g_task_had_error() will check the task's GCancellable first, and -if it has been cancelled, then they will consider the task to have -returned an "Operation was cancelled" error -(G_IO_ERROR_CANCELLED), regardless of any other error or return -value the task may have had.

-

If check_cancellable - is FALSE, then the GTask will not check the -cancellable itself, and it is up to task -'s owner to do this (eg, -via g_task_return_error_if_cancelled()).

-

If you are using g_task_set_return_on_cancel() as well, then -you must leave check-cancellable set TRUE.

-
-

Parameters

-
----- - - - - - - - - - - - - -

task

the GTask

 

check_cancellable

whether GTask will check the state of -its GCancellable for you.

 
-
-

Since: 2.36

-
-
-
-

g_task_set_return_on_cancel ()

-
gboolean
-g_task_set_return_on_cancel (GTask *task,
-                             gboolean return_on_cancel);
-

Sets or clears task -'s return-on-cancel flag. This is only -meaningful for tasks run via g_task_run_in_thread() or -g_task_run_in_thread_sync().

-

If return_on_cancel - is TRUE, then cancelling task -'s -GCancellable will immediately cause it to return, as though the -task's GTaskThreadFunc had called -g_task_return_error_if_cancelled() and then returned.

-

This allows you to create a cancellable wrapper around an -uninterruptable function. The GTaskThreadFunc just needs to be -careful that it does not modify any externally-visible state after -it has been cancelled. To do that, the thread should call -g_task_set_return_on_cancel() again to (atomically) set -return-on-cancel FALSE before making externally-visible changes; -if the task gets cancelled before the return-on-cancel flag could -be changed, g_task_set_return_on_cancel() will indicate this by -returning FALSE.

-

You can disable and re-enable this flag multiple times if you wish. -If the task's GCancellable is cancelled while return-on-cancel is -FALSE, then calling g_task_set_return_on_cancel() to set it TRUE -again will cause the task to be cancelled at that point.

-

If the task's GCancellable is already cancelled before you call -g_task_run_in_thread()/g_task_run_in_thread_sync(), then the -GTaskThreadFunc will still be run (for consistency), but the task -will also be completed right away.

-
-

Parameters

-
----- - - - - - - - - - - - - -

task

the GTask

 

return_on_cancel

whether the task returns automatically when -it is cancelled.

 
-
-
-

Returns

-

TRUE if task -'s return-on-cancel flag was changed to -match return_on_cancel -. FALSE if task -has already been -cancelled.

-
-

Since: 2.36

-
-
-
-

g_task_set_source_tag ()

-
void
-g_task_set_source_tag (GTask *task,
-                       gpointer source_tag);
-

Sets task -'s source tag. You can use this to tag a task return -value with a particular pointer (usually a pointer to the function -doing the tagging) and then later check it using -g_task_get_source_tag() (or g_async_result_is_tagged()) in the -task's "finish" function, to figure out if the response came from a -particular place.

-
-

Parameters

-
----- - - - - - - - - - - - - -

task

the GTask

 

source_tag

an opaque pointer indicating the source of this task

 
-
-

Since: 2.36

-
-
-
-

g_task_report_error ()

-
void
-g_task_report_error (gpointer source_object,
-                     GAsyncReadyCallback callback,
-                     gpointer callback_data,
-                     gpointer source_tag,
-                     GError *error);
-

Creates a GTask and then immediately calls g_task_return_error() -on it. Use this in the wrapper function of an asynchronous method -when you want to avoid even calling the virtual method. You can -then use g_async_result_is_tagged() in the finish method wrapper to -check if the result there is tagged as having been created by the -wrapper method, and deal with it appropriately if so.

-

See also g_task_report_new_error().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

source_object

the GObject that owns -this task, or NULL.

[nullable][type GObject]

callback

a GAsyncReadyCallback.

[scope async]

callback_data

user data passed to callback -.

[closure]

source_tag

an opaque pointer indicating the source of this task

 

error

error to report.

[transfer full]
-
-

Since: 2.36

-
-
-
-

g_task_report_new_error ()

-
void
-g_task_report_new_error (gpointer source_object,
-                         GAsyncReadyCallback callback,
-                         gpointer callback_data,
-                         gpointer source_tag,
-                         GQuark domain,
-                         gint code,
-                         const char *format,
-                         ...);
-

Creates a GTask and then immediately calls -g_task_return_new_error() on it. Use this in the wrapper function -of an asynchronous method when you want to avoid even calling the -virtual method. You can then use g_async_result_is_tagged() in the -finish method wrapper to check if the result there is tagged as -having been created by the wrapper method, and deal with it -appropriately if so.

-

See also g_task_report_error().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

source_object

the GObject that owns -this task, or NULL.

[nullable][type GObject]

callback

a GAsyncReadyCallback.

[scope async]

callback_data

user data passed to callback -.

[closure]

source_tag

an opaque pointer indicating the source of this task

 

domain

a GQuark.

 

code

an error code.

 

format

a string with format characters.

 

...

a list of values to insert into format -.

 
-
-

Since: 2.36

-
-
-
-

g_task_get_task_data ()

-
gpointer
-g_task_get_task_data (GTask *task);
-

Gets task -'s task_data.

-
-

Parameters

-
----- - - - - - -

task

a GTask

 
-
-
-

Returns

-

task -'s task_data.

-

[transfer none]

-
-

Since: 2.36

-
-
-
-

g_task_get_priority ()

-
gint
-g_task_get_priority (GTask *task);
-

Gets task -'s priority

-
-

Parameters

-
----- - - - - - -

task

a GTask

 
-
-
-

Returns

-

task -'s priority

-
-

Since: 2.36

-
-
-
-

g_task_get_cancellable ()

-
GCancellable *
-g_task_get_cancellable (GTask *task);
-

Gets task -'s GCancellable

-
-

Parameters

-
----- - - - - - -

task

a GTask

 
-
-
-

Returns

-

task -'s GCancellable.

-

[transfer none]

-
-

Since: 2.36

-
-
-
-

g_task_get_check_cancellable ()

-
gboolean
-g_task_get_check_cancellable (GTask *task);
-

Gets task -'s check-cancellable flag. See -g_task_set_check_cancellable() for more details.

-
-

Parameters

-
----- - - - - - -

task

the GTask

 
-
-

Since: 2.36

-
-
-
-

g_task_get_return_on_cancel ()

-
gboolean
-g_task_get_return_on_cancel (GTask *task);
-

Gets task -'s return-on-cancel flag. See -g_task_set_return_on_cancel() for more details.

-
-

Parameters

-
----- - - - - - -

task

the GTask

 
-
-

Since: 2.36

-
-
-
-

g_task_get_context ()

-
GMainContext *
-g_task_get_context (GTask *task);
-

Gets the GMainContext that task - will return its result in (that -is, the context that was the -thread-default main context -at the point when task - was created).

-

This will always return a non-NULL value, even if the task's -context is the default GMainContext.

-
-

Parameters

-
----- - - - - - -

task

a GTask

 
-
-
-

Returns

-

task -'s GMainContext.

-

[transfer none]

-
-

Since: 2.36

-
-
-
-

g_task_get_source_object ()

-
gpointer
-g_task_get_source_object (GTask *task);
-

Gets the source object from task -. Like -g_async_result_get_source_object(), but does not ref the object.

-
-

Parameters

-
----- - - - - - -

task

a GTask

 
-
-
-

Returns

-

task -'s source object, or NULL.

-

[transfer none][type GObject]

-
-

Since: 2.36

-
-
-
-

g_task_get_source_tag ()

-
gpointer
-g_task_get_source_tag (GTask *task);
-

Gets task -'s source tag. See g_task_set_source_tag().

-
-

Parameters

-
----- - - - - - -

task

a GTask

 
-
-
-

Returns

-

task -'s source tag.

-

[transfer none]

-
-

Since: 2.36

-
-
-
-

g_task_return_boolean ()

-
void
-g_task_return_boolean (GTask *task,
-                       gboolean result);
-

Sets task -'s result to result - and completes the task (see -g_task_return_pointer() for more discussion of exactly what this -means).

-
-

Parameters

-
----- - - - - - - - - - - - - -

task

a GTask.

 

result

the gboolean result of a task function.

 
-
-

Since: 2.36

-
-
-
-

g_task_return_int ()

-
void
-g_task_return_int (GTask *task,
-                   gssize result);
-

Sets task -'s result to result - and completes the task (see -g_task_return_pointer() for more discussion of exactly what this -means).

-
-

Parameters

-
----- - - - - - - - - - - - - -

task

a GTask.

 

result

the integer (gssize) result of a task function.

 
-
-

Since: 2.36

-
-
-
-

g_task_return_pointer ()

-
void
-g_task_return_pointer (GTask *task,
-                       gpointer result,
-                       GDestroyNotify result_destroy);
-

Sets task -'s result to result - and completes the task. If result - -is not NULL, then result_destroy - will be used to free result - if -the caller does not take ownership of it with -g_task_propagate_pointer().

-

"Completes the task" means that for an ordinary asynchronous task -it will either invoke the task's callback, or else queue that -callback to be invoked in the proper GMainContext, or in the next -iteration of the current GMainContext. For a task run via -g_task_run_in_thread() or g_task_run_in_thread_sync(), calling this -method will save result - to be returned to the caller later, but -the task will not actually be completed until the GTaskThreadFunc -exits.

-

Note that since the task may be completed before returning from -g_task_return_pointer(), you cannot assume that result - is still -valid after calling this, unless you are still holding another -reference on it.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

task

a GTask

 

result

the pointer result of a task -function.

[nullable][transfer full]

result_destroy

a GDestroyNotify function.

[nullable]
-
-

Since: 2.36

-
-
-
-

g_task_return_error ()

-
void
-g_task_return_error (GTask *task,
-                     GError *error);
-

Sets task -'s result to error - (which task - assumes ownership of) -and completes the task (see g_task_return_pointer() for more -discussion of exactly what this means).

-

Note that since the task takes ownership of error -, and since the -task may be completed before returning from g_task_return_error(), -you cannot assume that error - is still valid after calling this. -Call g_error_copy() on the error if you need to keep a local copy -as well.

-

See also g_task_return_new_error().

-
-

Parameters

-
----- - - - - - - - - - - - - -

task

a GTask.

 

error

the GError result of a task function.

[transfer full]
-
-

Since: 2.36

-
-
-
-

g_task_return_new_error ()

-
void
-g_task_return_new_error (GTask *task,
-                         GQuark domain,
-                         gint code,
-                         const char *format,
-                         ...);
-

Sets task -'s result to a new GError created from domain -, code -, -format -, and the remaining arguments, and completes the task (see -g_task_return_pointer() for more discussion of exactly what this -means).

-

See also g_task_return_error().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

task

a GTask.

 

domain

a GQuark.

 

code

an error code.

 

format

a string with format characters.

 

...

a list of values to insert into format -.

 
-
-

Since: 2.36

-
-
-
-

g_task_return_error_if_cancelled ()

-
gboolean
-g_task_return_error_if_cancelled (GTask *task);
-

Checks if task -'s GCancellable has been cancelled, and if so, sets -task -'s error accordingly and completes the task (see -g_task_return_pointer() for more discussion of exactly what this -means).

-
-

Parameters

-
----- - - - - - -

task

a GTask

 
-
-
-

Returns

-

TRUE if task -has been cancelled, FALSE if not

-
-

Since: 2.36

-
-
-
-

g_task_propagate_boolean ()

-
gboolean
-g_task_propagate_boolean (GTask *task,
-                          GError **error);
-

Gets the result of task - as a gboolean.

-

If the task resulted in an error, or was cancelled, then this will -instead return FALSE and set error -.

-

Since this method transfers ownership of the return value (or -error) to the caller, you may only call it once.

-
-

Parameters

-
----- - - - - - - - - - - - - -

task

a GTask.

 

error

return location for a GError

 
-
-
-

Returns

-

the task result, or FALSE on error

-
-

Since: 2.36

-
-
-
-

g_task_propagate_int ()

-
gssize
-g_task_propagate_int (GTask *task,
-                      GError **error);
-

Gets the result of task - as an integer (gssize).

-

If the task resulted in an error, or was cancelled, then this will -instead return -1 and set error -.

-

Since this method transfers ownership of the return value (or -error) to the caller, you may only call it once.

-
-

Parameters

-
----- - - - - - - - - - - - - -

task

a GTask.

 

error

return location for a GError

 
-
-
-

Returns

-

the task result, or -1 on error

-
-

Since: 2.36

-
-
-
-

g_task_propagate_pointer ()

-
gpointer
-g_task_propagate_pointer (GTask *task,
-                          GError **error);
-

Gets the result of task - as a pointer, and transfers ownership -of that value to the caller.

-

If the task resulted in an error, or was cancelled, then this will -instead return NULL and set error -.

-

Since this method transfers ownership of the return value (or -error) to the caller, you may only call it once.

-
-

Parameters

-
----- - - - - - - - - - - - - -

task

a GTask

 

error

return location for a GError

 
-
-
-

Returns

-

the task result, or NULL on error.

-

[transfer full]

-
-

Since: 2.36

-
-
-
-

g_task_had_error ()

-
gboolean
-g_task_had_error (GTask *task);
-

Tests if task - resulted in an error.

-
-

Parameters

-
----- - - - - - -

task

a GTask.

 
-
-
-

Returns

-

TRUE if the task resulted in an error, FALSE otherwise.

-
-

Since: 2.36

-
-
-
-

g_task_get_completed ()

-
gboolean
-g_task_get_completed (GTask *task);
-

Gets the value of “completed”. This changes from FALSE to TRUE after -the task’s callback is invoked, and will return FALSE if called from inside -the callback.

-
-

Parameters

-
----- - - - - - -

task

a GTask.

 
-
-
-

Returns

-

TRUE if the task has completed, FALSE otherwise.

-
-

Since: 2.44

-
-
-
-

g_task_run_in_thread ()

-
void
-g_task_run_in_thread (GTask *task,
-                      GTaskThreadFunc task_func);
-

Runs task_func - in another thread. When task_func - returns, task -'s -GAsyncReadyCallback will be invoked in task -'s GMainContext.

-

This takes a ref on task - until the task completes.

-

See GTaskThreadFunc for more details about how task_func - is handled.

-

Although GLib currently rate-limits the tasks queued via -g_task_run_in_thread(), you should not assume that it will always -do this. If you have a very large number of tasks to run, but don't -want them to all run at once, you should only queue a limited -number of them at a time.

-
-

Parameters

-
----- - - - - - - - - - - - - -

task

a GTask

 

task_func

a GTaskThreadFunc

 
-
-

Since: 2.36

-
-
-
-

g_task_run_in_thread_sync ()

-
void
-g_task_run_in_thread_sync (GTask *task,
-                           GTaskThreadFunc task_func);
-

Runs task_func - in another thread, and waits for it to return or be -cancelled. You can use g_task_propagate_pointer(), etc, afterward -to get the result of task_func -.

-

See GTaskThreadFunc for more details about how task_func - is handled.

-

Normally this is used with tasks created with a NULL -callback, but note that even if the task does -have a callback, it will not be invoked when task_func - returns. -“completed” will be set to TRUE just before this function returns.

-

Although GLib currently rate-limits the tasks queued via -g_task_run_in_thread_sync(), you should not assume that it will -always do this. If you have a very large number of tasks to run, -but don't want them to all run at once, you should only queue a -limited number of them at a time.

-
-

Parameters

-
----- - - - - - - - - - - - - -

task

a GTask

 

task_func

a GTaskThreadFunc

 
-
-

Since: 2.36

-
-
-
-

GTaskThreadFunc ()

-
void
-(*GTaskThreadFunc) (GTask *task,
-                    gpointer source_object,
-                    gpointer task_data,
-                    GCancellable *cancellable);
-

The prototype for a task function to be run in a thread via -g_task_run_in_thread() or g_task_run_in_thread_sync().

-

If the return-on-cancel flag is set on task -, and cancellable - gets -cancelled, then the GTask will be completed immediately (as though -g_task_return_error_if_cancelled() had been called), without -waiting for the task function to complete. However, the task -function will continue running in its thread in the background. The -function therefore needs to be careful about how it uses -externally-visible state in this case. See -g_task_set_return_on_cancel() for more details.

-

Other than in that case, task - will be completed when the -GTaskThreadFunc returns, not when it calls a -g_task_return_ function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

task

the GTask

 

source_object

task -'s source object.

[type GObject]

task_data

task -'s task data

 

cancellable

task -'s GCancellable, or NULL

 
-
-

Since: 2.36

-
-
-
-

g_task_attach_source ()

-
void
-g_task_attach_source (GTask *task,
-                      GSource *source,
-                      GSourceFunc callback);
-

A utility function for dealing with async operations where you need -to wait for a GSource to trigger. Attaches source - to task -'s -GMainContext with task -'s priority, and sets source -'s -callback to callback -, with task - as the callback's user_data.

-

This takes a reference on task - until source - is destroyed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

task

a GTask

 

source

the source to attach

 

callback

the callback to invoke when source -triggers

 
-
-

Since: 2.36

-
-
-
-

g_task_is_valid ()

-
gboolean
-g_task_is_valid (gpointer result,
-                 gpointer source_object);
-

Checks that result - is a GTask, and that source_object - is its -source object (or that source_object - is NULL and result - has no -source object). This can be used in g_return_if_fail() checks.

-
-

Parameters

-
----- - - - - - - - - - - - - -

result

A GAsyncResult.

[type Gio.AsyncResult]

source_object

the source object -expected to be associated with the task.

[nullable][type GObject]
-
-
-

Returns

-

TRUE if result -and source_object -are valid, FALSE -if not

-
-

Since: 2.36

-
-
-
-

Types and Values

-
-

GTask

-
typedef struct _GTask GTask;
-

The opaque object representing a synchronous or asynchronous task -and its result.

-
-
-
-

Property Details

-
-

The “completed” property

-
  “completed”                gboolean
-

Whether the task has completed, meaning its callback (if set) has been -invoked. This can only happen after g_task_return_pointer(), -g_task_return_error() or one of the other return functions have been called -on the task.

-

This property is guaranteed to change from FALSE to TRUE exactly once.

-

The “notify” signal for this change is emitted in the same main -context as the task’s callback, immediately after that callback is invoked.

-

Flags: Read

-

Default value: FALSE

-

Since: 2.44

-
-
-
-

See Also

-

GAsyncResult

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GTcpConnection.html b/docs/reference/gio/html/GTcpConnection.html deleted file mode 100644 index 3acf095ab..000000000 --- a/docs/reference/gio/html/GTcpConnection.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - -GTcpConnection: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GTcpConnection

-

GTcpConnection — A TCP GSocketConnection

-
-
-

Functions

- -
-
-

Properties

-
----- - - - - - -
gbooleangraceful-disconnectRead / Write
-
-
-

Types and Values

-
---- - - - - -
 GTcpConnection
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GIOStream
-        ╰── GSocketConnection
-            ╰── GTcpConnection
-                ╰── GTcpWrapperConnection
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

This is the subclass of GSocketConnection that is created -for TCP/IP sockets.

-
-
-

Functions

-
-

g_tcp_connection_set_graceful_disconnect ()

-
void
-g_tcp_connection_set_graceful_disconnect
-                               (GTcpConnection *connection,
-                                gboolean graceful_disconnect);
-

This enables graceful disconnects on close. A graceful disconnect -means that we signal the receiving end that the connection is terminated -and wait for it to close the connection before closing the connection.

-

A graceful disconnect means that we can be sure that we successfully sent -all the outstanding data to the other end, or get an error reported. -However, it also means we have to wait for all the data to reach the -other side and for it to acknowledge this by closing the socket, which may -take a while. For this reason it is disabled by default.

-
-

Parameters

-
----- - - - - - - - - - - - - -

connection

a GTcpConnection

 

graceful_disconnect

Whether to do graceful disconnects or not

 
-
-

Since: 2.22

-
-
-
-

g_tcp_connection_get_graceful_disconnect ()

-
gboolean
-g_tcp_connection_get_graceful_disconnect
-                               (GTcpConnection *connection);
-

Checks if graceful disconnects are used. See -g_tcp_connection_set_graceful_disconnect().

-
-

Parameters

-
----- - - - - - -

connection

a GTcpConnection

 
-
-
-

Returns

-

TRUE if graceful disconnect is used on close, FALSE otherwise

-
-

Since: 2.22

-
-
-
-

Types and Values

-
-

GTcpConnection

-
typedef struct _GTcpConnection GTcpConnection;
-

A GSocketConnection for TCP/IP connections.

-

Since: 2.22

-
-
-
-

Property Details

-
-

The “graceful-disconnect” property

-
  “graceful-disconnect”      gboolean
-

Whether or not close does a graceful disconnect.

-

Flags: Read / Write

-

Default value: FALSE

-
-
-
-

See Also

-

GSocketConnection.

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GTcpWrapperConnection.html b/docs/reference/gio/html/GTcpWrapperConnection.html deleted file mode 100644 index be92dc18f..000000000 --- a/docs/reference/gio/html/GTcpWrapperConnection.html +++ /dev/null @@ -1,211 +0,0 @@ - - - - -GTcpWrapperConnection: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GTcpWrapperConnection

-

GTcpWrapperConnection — Wrapper for non-GSocketConnection-based, - GSocket-based GIOStreams

-
-
-

Functions

- -
-
-

Properties

-
----- - - - - - -
-GIOStream *base-io-streamRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GTcpWrapperConnection
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GIOStream
-        ╰── GSocketConnection
-            ╰── GTcpConnection
-                ╰── GTcpWrapperConnection
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A GTcpWrapperConnection can be used to wrap a GIOStream that is -based on a GSocket, but which is not actually a -GSocketConnection. This is used by GSocketClient so that it can -always return a GSocketConnection, even when the connection it has -actually created is not directly a GSocketConnection.

-
-
-

Functions

-
-

g_tcp_wrapper_connection_new ()

-
GSocketConnection *
-g_tcp_wrapper_connection_new (GIOStream *base_io_stream,
-                              GSocket *socket);
-

Wraps base_io_stream - and socket - together as a GSocketConnection.

-
-

Parameters

-
----- - - - - - - - - - - - - -

base_io_stream

the GIOStream to wrap

 

socket

the GSocket associated with base_io_stream -

 
-
-
-

Returns

-

the new GSocketConnection.

-
-

Since: 2.28

-
-
-
-

g_tcp_wrapper_connection_get_base_io_stream ()

-
GIOStream *
-g_tcp_wrapper_connection_get_base_io_stream
-                               (GTcpWrapperConnection *conn);
-

Get's conn -'s base GIOStream

-
-

Parameters

-
----- - - - - - -

conn

a GTcpWrapperConnection

 
-
-
-

Returns

-

conn -'s base GIOStream.

-

[transfer none]

-
-
-
-
-

Types and Values

-
-

GTcpWrapperConnection

-
typedef struct _GTcpWrapperConnection GTcpWrapperConnection;
-

GTcpWrapperConnection is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

Property Details

-
-

The “base-io-stream” property

-
  “base-io-stream”           GIOStream *
-

The wrapped GIOStream.

-

Flags: Read / Write / Construct Only

-
-
-
-

See Also

-

GSocketConnection.

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GTestDBus.html b/docs/reference/gio/html/GTestDBus.html deleted file mode 100644 index f88a1c8a1..000000000 --- a/docs/reference/gio/html/GTestDBus.html +++ /dev/null @@ -1,506 +0,0 @@ - - - - -GTestDBus: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GTestDBus

-

GTestDBus — D-Bus testing helper

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GTestDBus * - -g_test_dbus_new () -
-GTestDBusFlags - -g_test_dbus_get_flags () -
const gchar * - -g_test_dbus_get_bus_address () -
-void - -g_test_dbus_add_service_dir () -
-void - -g_test_dbus_up () -
-void - -g_test_dbus_stop () -
-void - -g_test_dbus_down () -
-void - -g_test_dbus_unset () -
-
-
-

Properties

-
----- - - - - - -
GTestDBusFlagsflagsRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GTestDBus
enumGTestDBusFlags
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GTestDBus
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A helper class for testing code which uses D-Bus without touching the user's -session bus.

-

Note that GTestDBus modifies the user’s environment, calling setenv(). -This is not thread-safe, so all GTestDBus calls should be completed before -threads are spawned, or should have appropriate locking to ensure no access -conflicts to environment variables shared between GTestDBus and other -threads.

-
-

Creating unit tests using GTestDBus

-

Testing of D-Bus services can be tricky because normally we only ever run -D-Bus services over an existing instance of the D-Bus daemon thus we -usually don't activate D-Bus services that are not yet installed into the -target system. The GTestDBus object makes this easier for us by taking care -of the lower level tasks such as running a private D-Bus daemon and looking -up uninstalled services in customizable locations, typically in your source -code tree.

-

The first thing you will need is a separate service description file for the -D-Bus daemon. Typically a services subdirectory of your tests directory -is a good place to put this file.

-

The service file should list your service along with an absolute path to the -uninstalled service executable in your source tree. Using autotools we would -achieve this by adding a file such as my-server.service.in in the services -directory and have it processed by configure.

-
- - - - - - - -
1
-2
-3
[D-BUS Service]
-Name=org.gtk.GDBus.Examples.ObjectManager
-Exec=@abs_top_builddir@/gio/tests/gdbus-example-objectmanager-server
-
- -

-You will also need to indicate this service directory in your test -fixtures, so you will need to pass the path while compiling your -test cases. Typically this is done with autotools with an added -preprocessor flag specified to compile your tests such as:

-
- - - - - - - -
1
-DTEST_SERVICES=\""$(abs_top_builddir)/tests/services"\"
-
- -

- Once you have a service definition file which is local to your source tree, -you can proceed to set up a GTest fixture using the GTestDBus scaffolding.

-

An example of a test fixture for D-Bus services can be found -here: -gdbus-test-fixture.c

-

Note that these examples only deal with isolating the D-Bus aspect of your -service. To successfully run isolated unit tests on your service you may need -some additional modifications to your test case fixture. For example; if your -service uses GSettings and installs a schema then it is important that your test service -not load the schema in the ordinary installed location (chances are that your service -and schema files are not yet installed, or worse; there is an older version of the -schema file sitting in the install location).

-

Most of the time we can work around these obstacles using the -environment. Since the environment is inherited by the D-Bus daemon -created by GTestDBus and then in turn inherited by any services the -D-Bus daemon activates, using the setup routine for your fixture is -a practical place to help sandbox your runtime environment. For the -rather typical GSettings case we can work around this by setting -GSETTINGS_SCHEMA_DIR to the in tree directory holding your schemas -in the above fixture_setup() routine.

-

The GSettings schemas need to be locally pre-compiled for this to work. This can be achieved -by compiling the schemas locally as a step before running test cases, an autotools setup might -do the following in the directory holding schemas:

-
- - - - - - - -
1
-2
-3
-4
all-am:
-        $(GLIB_COMPILE_SCHEMAS) .
-
-CLEANFILES += gschemas.compiled
-
- -

-
-
-
-

Functions

-
-

g_test_dbus_new ()

-
GTestDBus *
-g_test_dbus_new (GTestDBusFlags flags);
-

Create a new GTestDBus object.

-
-

Parameters

-
----- - - - - - -

flags

a GTestDBusFlags

 
-
-
-

Returns

-

a new GTestDBus.

-

[transfer full]

-
-
-
-
-

g_test_dbus_get_flags ()

-
GTestDBusFlags
-g_test_dbus_get_flags (GTestDBus *self);
-

Get the flags of the GTestDBus object.

-
-

Parameters

-
----- - - - - - -

self

a GTestDBus

 
-
-
-

Returns

-

the value of “flags” property

-
-
-
-
-

g_test_dbus_get_bus_address ()

-
const gchar *
-g_test_dbus_get_bus_address (GTestDBus *self);
-

Get the address on which dbus-daemon is running. If g_test_dbus_up() has not -been called yet, NULL is returned. This can be used with -g_dbus_connection_new_for_address().

-
-

Parameters

-
----- - - - - - -

self

a GTestDBus

 
-
-
-

Returns

-

the address of the bus, or NULL.

-

[nullable]

-
-
-
-
-

g_test_dbus_add_service_dir ()

-
void
-g_test_dbus_add_service_dir (GTestDBus *self,
-                             const gchar *path);
-

Add a path where dbus-daemon will look up .service files. This can't be -called after g_test_dbus_up().

-
-

Parameters

-
----- - - - - - - - - - - - - -

self

a GTestDBus

 

path

path to a directory containing .service files

 
-
-
-
-
-

g_test_dbus_up ()

-
void
-g_test_dbus_up (GTestDBus *self);
-

Start a dbus-daemon instance and set DBUS_SESSION_BUS_ADDRESS. After this -call, it is safe for unit tests to start sending messages on the session bus.

-

If this function is called from setup callback of g_test_add(), -g_test_dbus_down() must be called in its teardown callback.

-

If this function is called from unit test's main(), then g_test_dbus_down() -must be called after g_test_run().

-
-

Parameters

-
----- - - - - - -

self

a GTestDBus

 
-
-
-
-
-

g_test_dbus_stop ()

-
void
-g_test_dbus_stop (GTestDBus *self);
-

Stop the session bus started by g_test_dbus_up().

-

Unlike g_test_dbus_down(), this won't verify the GDBusConnection -singleton returned by g_bus_get() or g_bus_get_sync() is destroyed. Unit -tests wanting to verify behaviour after the session bus has been stopped -can use this function but should still call g_test_dbus_down() when done.

-
-

Parameters

-
----- - - - - - -

self

a GTestDBus

 
-
-
-
-
-

g_test_dbus_down ()

-
void
-g_test_dbus_down (GTestDBus *self);
-

Stop the session bus started by g_test_dbus_up().

-

This will wait for the singleton returned by g_bus_get() or g_bus_get_sync() -is destroyed. This is done to ensure that the next unit test won't get a -leaked singleton from this test.

-
-

Parameters

-
----- - - - - - -

self

a GTestDBus

 
-
-
-
-
-

g_test_dbus_unset ()

-
void
-g_test_dbus_unset (void);
-

Unset DISPLAY and DBUS_SESSION_BUS_ADDRESS env variables to ensure the test -won't use user's session bus.

-

This is useful for unit tests that want to verify behaviour when no session -bus is running. It is not necessary to call this if unit test already calls -g_test_dbus_up() before acquiring the session bus.

-
-
-
-

Types and Values

-
-

GTestDBus

-
typedef struct _GTestDBus GTestDBus;
-

The GTestDBus structure contains only private data and -should only be accessed using the provided API.

-

Since: 2.34

-
-
-
-

enum GTestDBusFlags

-

Flags to define future GTestDBus behaviour.

-
-

Members

-
----- - - - - - -

G_TEST_DBUS_NONE

-

No flags.

-
 
-
-

Since: 2.34

-
-
-
-

Property Details

-
-

The “flags” property

-
  “flags”                    GTestDBusFlags
-

GTestDBusFlags specifying the behaviour of the D-Bus session.

-

Flags: Read / Write / Construct Only

-

Since: 2.34

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GThemedIcon.html b/docs/reference/gio/html/GThemedIcon.html deleted file mode 100644 index 9dfeb715f..000000000 --- a/docs/reference/gio/html/GThemedIcon.html +++ /dev/null @@ -1,463 +0,0 @@ - - - - -GThemedIcon: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GThemedIcon

-

GThemedIcon — Icon theming support

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GIcon * - -g_themed_icon_new () -
-GIcon * - -g_themed_icon_new_from_names () -
-GIcon * - -g_themed_icon_new_with_default_fallbacks () -
-void - -g_themed_icon_prepend_name () -
-void - -g_themed_icon_append_name () -
const gchar * const * - -g_themed_icon_get_names () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - -
-gchar *nameWrite / Construct Only
GStrvnamesRead / Write / Construct Only
gbooleanuse-default-fallbacksRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GThemedIcon
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GThemedIcon
-
-
-
-

Implemented Interfaces

-

-GThemedIcon implements - GIcon.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GThemedIcon is an implementation of GIcon that supports icon themes. -GThemedIcon contains a list of all of the icons present in an icon -theme, so that icons can be looked up quickly. GThemedIcon does -not provide actual pixmaps for icons, just the icon names. -Ideally something like gtk_icon_theme_choose_icon() should be used to -resolve the list of names so that fallback icons work nicely with -themes that inherit other themes.

-
-
-

Functions

-
-

g_themed_icon_new ()

-
GIcon *
-g_themed_icon_new (const char *iconname);
-

Creates a new themed icon for iconname -.

-
-

Parameters

-
----- - - - - - -

iconname

a string containing an icon name.

 
-
-
-

Returns

-

a new GThemedIcon.

-

[transfer full][type GThemedIcon]

-
-
-
-
-

g_themed_icon_new_from_names ()

-
GIcon *
-g_themed_icon_new_from_names (char **iconnames,
-                              int len);
-

Creates a new themed icon for iconnames -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

iconnames

an array of strings containing icon names.

[array length=len]

len

the length of the iconnames -array, or -1 if iconnames -is -NULL-terminated

 
-
-
-

Returns

-

a new GThemedIcon.

-

[transfer full][type GThemedIcon]

-
-
-
-
-

g_themed_icon_new_with_default_fallbacks ()

-
GIcon *
-g_themed_icon_new_with_default_fallbacks
-                               (const char *iconname);
-

Creates a new themed icon for iconname -, and all the names -that can be created by shortening iconname - at '-' characters.

-

In the following example, icon1 - and icon2 - are equivalent:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
const char *names[] = { 
-  "gnome-dev-cdrom-audio",
-  "gnome-dev-cdrom",
-  "gnome-dev",
-  "gnome"
-};
-
-icon1 = g_themed_icon_new_from_names (names, 4);
-icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio");
-
- -

-
-

Parameters

-
----- - - - - - -

iconname

a string containing an icon name

 
-
-
-

Returns

-

a new GThemedIcon.

-

[transfer full][type GThemedIcon]

-
-
-
-
-

g_themed_icon_prepend_name ()

-
void
-g_themed_icon_prepend_name (GThemedIcon *icon,
-                            const char *iconname);
-

Prepend a name to the list of icons from within icon -.

-

Note that doing so invalidates the hash computed by prior calls -to g_icon_hash().

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon

a GThemedIcon

 

iconname

name of icon to prepend to list of icons from within icon -.

 
-
-

Since: 2.18

-
-
-
-

g_themed_icon_append_name ()

-
void
-g_themed_icon_append_name (GThemedIcon *icon,
-                           const char *iconname);
-

Append a name to the list of icons from within icon -.

-

Note that doing so invalidates the hash computed by prior calls -to g_icon_hash().

-
-

Parameters

-
----- - - - - - - - - - - - - -

icon

a GThemedIcon

 

iconname

name of icon to append to list of icons from within icon -.

 
-
-
-
-
-

g_themed_icon_get_names ()

-
const gchar * const *
-g_themed_icon_get_names (GThemedIcon *icon);
-

Gets the names of icons from within icon -.

-
-

Parameters

-
----- - - - - - -

icon

a GThemedIcon.

 
-
-
-

Returns

-

a list of icon names.

-

[transfer none]

-
-
-
-
-

Types and Values

-
-

GThemedIcon

-
typedef struct _GThemedIcon GThemedIcon;
-

An implementation of GIcon for themed icons.

-
-
-
-

Property Details

-
-

The “name” property

-
  “name”                     gchar *
-

The icon name.

-

Flags: Write / Construct Only

-

Default value: NULL

-
-
-
-

The “names” property

-
  “names”                    GStrv
-

A NULL-terminated array of icon names.

-

Flags: Read / Write / Construct Only

-
-
-
-

The “use-default-fallbacks” property

-
  “use-default-fallbacks”    gboolean
-

Whether to use the default fallbacks found by shortening the icon name - -at '-' characters. If the "names" array has more than one element, - -ignores any past the first.

-

For example, if the icon name was "gnome-dev-cdrom-audio", the array - -would become

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
{
-  "gnome-dev-cdrom-audio",
-  "gnome-dev-cdrom",
-  "gnome-dev",
-  "gnome",
-  NULL
-};
-
- -

-

Flags: Read / Write / Construct Only

-

Default value: FALSE

-
-
-
-

See Also

-

GIcon, GLoadableIcon

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GThreadedSocketService.html b/docs/reference/gio/html/GThreadedSocketService.html deleted file mode 100644 index 653ca9d99..000000000 --- a/docs/reference/gio/html/GThreadedSocketService.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - -GThreadedSocketService: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GThreadedSocketService

-

GThreadedSocketService — A threaded GSocketService

-
-
-

Functions

-
---- - - - - -
-GSocketService * - -g_threaded_socket_service_new () -
-
-
-

Properties

-
----- - - - - - -
gintmax-threadsRead / Write / Construct Only
-
-
-

Signals

-
----- - - - - - -
gbooleanrunRun Last
-
-
-

Types and Values

-
---- - - - - -
 GThreadedSocketService
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSocketListener
-        ╰── GSocketService
-            ╰── GThreadedSocketService
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A GThreadedSocketService is a simple subclass of GSocketService -that handles incoming connections by creating a worker thread and -dispatching the connection to it by emitting the -“run” signal in the new thread.

-

The signal handler may perform blocking IO and need not return -until the connection is closed.

-

The service is implemented using a thread pool, so there is a -limited amount of threads available to serve incoming requests. -The service automatically stops the GSocketService from accepting -new connections when all threads are busy.

-

As with GSocketService, you may connect to “run”, -or subclass and override the default handler.

-
-
-

Functions

-
-

g_threaded_socket_service_new ()

-
GSocketService *
-g_threaded_socket_service_new (int max_threads);
-

Creates a new GThreadedSocketService with no listeners. Listeners -must be added with one of the GSocketListener "add" methods.

-
-

Parameters

-
----- - - - - - -

max_threads

the maximal number of threads to execute concurrently -handling incoming clients, -1 means no limit

 
-
-
-

Returns

-

a new GSocketService.

-
-

Since: 2.22

-
-
-
-

Types and Values

-
-

GThreadedSocketService

-
typedef struct _GThreadedSocketService GThreadedSocketService;
-

A helper class for handling accepting incoming connections in the -glib mainloop and handling them in a thread.

-

Since: 2.22

-
-
-
-

Property Details

-
-

The “max-threads” property

-
  “max-threads”              gint
-

The max number of threads handling clients for this service.

-

Flags: Read / Write / Construct Only

-

Allowed values: >= -1

-

Default value: 10

-
-
-
-

Signal Details

-
-

The “run” signal

-
gboolean
-user_function (GThreadedSocketService *service,
-               GSocketConnection      *connection,
-               GObject                *source_object,
-               gpointer                user_data)
-

The ::run signal is emitted in a worker thread in response to an -incoming connection. This thread is dedicated to handling -connection - and may perform blocking IO. The signal handler need -not return until the connection is closed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

service

the GThreadedSocketService.

 

connection

a new GSocketConnection object.

 

source_object

the source_object passed to g_socket_listener_add_address().

 

user_data

user data set when the signal handler was connected.

 
-
-
-

Returns

-

TRUE to stop further signal handlers from being called

-
-

Flags: Run Last

-
-
-
-

See Also

-

GSocketService.

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GTlsBackend.html b/docs/reference/gio/html/GTlsBackend.html deleted file mode 100644 index 6d508dc72..000000000 --- a/docs/reference/gio/html/GTlsBackend.html +++ /dev/null @@ -1,554 +0,0 @@ - - - - -GTlsBackend: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GTlsBackend

-

GTlsBackend — TLS backend implementation

-
- -
-

Types and Values

-
---- - - - - - - - - - - - - - - -
#defineG_TLS_BACKEND_EXTENSION_POINT_NAME
 GTlsBackend
structGTlsBackendInterface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GTlsBackend
-
-
-
-

Prerequisites

-

-GTlsBackend requires - GObject.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

TLS (Transport Layer Security, aka SSL) and DTLS backend.

-
-
-

Functions

-
-

g_tls_backend_get_default ()

-
GTlsBackend *
-g_tls_backend_get_default (void);
-

Gets the default GTlsBackend for the system.

-
-

Returns

-

a GTlsBackend.

-

[transfer none]

-
-

Since: 2.28

-
-
-
-

g_tls_backend_supports_tls ()

-
gboolean
-g_tls_backend_supports_tls (GTlsBackend *backend);
-

Checks if TLS is supported; if this returns FALSE for the default -GTlsBackend, it means no "real" TLS backend is available.

-
-

Parameters

-
----- - - - - - -

backend

the GTlsBackend

 
-
-
-

Returns

-

whether or not TLS is supported

-
-

Since: 2.28

-
-
-
-

g_tls_backend_supports_dtls ()

-
gboolean
-g_tls_backend_supports_dtls (GTlsBackend *backend);
-

Checks if DTLS is supported. DTLS support may not be available even if TLS -support is available, and vice-versa.

-
-

Parameters

-
----- - - - - - -

backend

the GTlsBackend

 
-
-
-

Returns

-

whether DTLS is supported

-
-

Since: 2.48

-
-
-
-

g_tls_backend_get_default_database ()

-
GTlsDatabase *
-g_tls_backend_get_default_database (GTlsBackend *backend);
-

Gets the default GTlsDatabase used to verify TLS connections.

-
-

Parameters

-
----- - - - - - -

backend

the GTlsBackend

 
-
-
-

Returns

-

the default database, which should be -unreffed when done.

-

[transfer full]

-
-

Since: 2.30

-
-
-
-

g_tls_backend_get_certificate_type ()

-
GType
-g_tls_backend_get_certificate_type (GTlsBackend *backend);
-

Gets the GType of backend -'s GTlsCertificate implementation.

-
-

Parameters

-
----- - - - - - -

backend

the GTlsBackend

 
-
-
-

Returns

-

the GType of backend -'s GTlsCertificate -implementation.

-
-

Since: 2.28

-
-
-
-

g_tls_backend_get_client_connection_type ()

-
GType
-g_tls_backend_get_client_connection_type
-                               (GTlsBackend *backend);
-

Gets the GType of backend -'s GTlsClientConnection implementation.

-
-

Parameters

-
----- - - - - - -

backend

the GTlsBackend

 
-
-
-

Returns

-

the GType of backend -'s GTlsClientConnection -implementation.

-
-

Since: 2.28

-
-
-
-

g_tls_backend_get_server_connection_type ()

-
GType
-g_tls_backend_get_server_connection_type
-                               (GTlsBackend *backend);
-

Gets the GType of backend -'s GTlsServerConnection implementation.

-
-

Parameters

-
----- - - - - - -

backend

the GTlsBackend

 
-
-
-

Returns

-

the GType of backend -'s GTlsServerConnection -implementation.

-
-

Since: 2.28

-
-
-
-

g_tls_backend_get_dtls_client_connection_type ()

-
GType
-g_tls_backend_get_dtls_client_connection_type
-                               (GTlsBackend *backend);
-

Gets the GType of backend -’s GDtlsClientConnection implementation.

-
-

Parameters

-
----- - - - - - -

backend

the GTlsBackend

 
-
-
-

Returns

-

the GType of backend -’s GDtlsClientConnection -implementation.

-
-

Since: 2.48

-
-
-
-

g_tls_backend_get_dtls_server_connection_type ()

-
GType
-g_tls_backend_get_dtls_server_connection_type
-                               (GTlsBackend *backend);
-

Gets the GType of backend -’s GDtlsServerConnection implementation.

-
-

Parameters

-
----- - - - - - -

backend

the GTlsBackend

 
-
-
-

Returns

-

the GType of backend -’s GDtlsServerConnection -implementation.

-
-

Since: 2.48

-
-
-
-

g_tls_backend_get_file_database_type ()

-
GType
-g_tls_backend_get_file_database_type (GTlsBackend *backend);
-

Gets the GType of backend -'s GTlsFileDatabase implementation.

-
-

Parameters

-
----- - - - - - -

backend

the GTlsBackend

 
-
-
-

Returns

-

the GType of backend's GTlsFileDatabase implementation.

-
-

Since: 2.30

-
-
-
-

Types and Values

-
-

G_TLS_BACKEND_EXTENSION_POINT_NAME

-
#define G_TLS_BACKEND_EXTENSION_POINT_NAME "gio-tls-backend"
-
-

Extension point for TLS functionality via GTlsBackend. -See Extending GIO.

-
-
-
-

GTlsBackend

-
typedef struct _GTlsBackend GTlsBackend;
-

TLS (Transport Layer Security, aka SSL) and DTLS backend. This is an -internal type used to coordinate the different classes implemented -by a TLS backend.

-

Since: 2.28

-
-
-
-

struct GTlsBackendInterface

-
struct GTlsBackendInterface {
-  GTypeInterface g_iface;
-
-  /* methods */
-  gboolean       ( *supports_tls)               (GTlsBackend *backend);
-  GType          ( *get_certificate_type)       (void);
-  GType          ( *get_client_connection_type) (void);
-  GType          ( *get_server_connection_type) (void);
-  GType          ( *get_file_database_type)     (void);
-  GTlsDatabase * ( *get_default_database)       (GTlsBackend *backend);
-  gboolean       ( *supports_dtls)              (GTlsBackend *backend);
-  GType          ( *get_dtls_client_connection_type) (void);
-  GType          ( *get_dtls_server_connection_type) (void);
-};
-
-

Provides an interface for describing TLS-related types.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

supports_tls ()

returns whether the backend supports TLS.

 

get_certificate_type ()

returns the GTlsCertificate implementation type

 

get_client_connection_type ()

returns the GTlsClientConnection implementation type

 

get_server_connection_type ()

returns the GTlsServerConnection implementation type

 

get_file_database_type ()

returns the GTlsFileDatabase implementation type.

 

get_default_database ()

returns a default GTlsDatabase instance.

 

supports_dtls ()

returns whether the backend supports DTLS

 

get_dtls_client_connection_type ()

returns the GDtlsClientConnection implementation type

 

get_dtls_server_connection_type ()

returns the GDtlsServerConnection implementation type

 
-
-

Since: 2.28

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GTlsCertificate.html b/docs/reference/gio/html/GTlsCertificate.html deleted file mode 100644 index 79ac221eb..000000000 --- a/docs/reference/gio/html/GTlsCertificate.html +++ /dev/null @@ -1,614 +0,0 @@ - - - - -GTlsCertificate: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GTlsCertificate

-

GTlsCertificate — TLS certificate

-
- -
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GByteArray *certificateRead / Write / Construct Only
-gchar *certificate-pemRead / Write / Construct Only
-GTlsCertificate *issuerRead / Write / Construct Only
-GByteArray *private-keyWrite / Construct Only
-gchar *private-key-pemWrite / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GTlsCertificate
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GTlsCertificate
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A certificate used for TLS authentication and encryption. -This can represent either a certificate only (eg, the certificate -received by a client from a server), or the combination of -a certificate and a private key (which is needed when acting as a -GTlsServerConnection).

-
-
-

Functions

-
-

g_tls_certificate_new_from_pem ()

-
GTlsCertificate *
-g_tls_certificate_new_from_pem (const gchar *data,
-                                gssize length,
-                                GError **error);
-

Creates a GTlsCertificate from the PEM-encoded data in data -. If -data - includes both a certificate and a private key, then the -returned certificate will include the private key data as well. (See -the “private-key-pem” property for information about -supported formats.)

-

The returned certificate will be the first certificate found in -data -. As of GLib 2.44, if data - contains more certificates it will -try to load a certificate chain. All certificates will be verified in -the order found (top-level certificate should be the last one in the -file) and the “issuer” property of each certificate -will be set accordingly if the verification succeeds. If any -certificate in the chain cannot be verified, the first certificate in -the file will still be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

data

PEM-encoded certificate data

 

length

the length of data -, or -1 if it's 0-terminated.

 

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

the new certificate, or NULL if data -is invalid

-
-

Since: 2.28

-
-
-
-

g_tls_certificate_new_from_file ()

-
GTlsCertificate *
-g_tls_certificate_new_from_file (const gchar *file,
-                                 GError **error);
-

Creates a GTlsCertificate from the PEM-encoded data in file -. The -returned certificate will be the first certificate found in file -. As -of GLib 2.44, if file - contains more certificates it will try to load -a certificate chain. All certificates will be verified in the order -found (top-level certificate should be the last one in the file) and -the “issuer” property of each certificate will be set -accordingly if the verification succeeds. If any certificate in the -chain cannot be verified, the first certificate in the file will -still be returned.

-

If file - cannot be read or parsed, the function will return NULL and -set error -. Otherwise, this behaves like -g_tls_certificate_new_from_pem().

-
-

Parameters

-
----- - - - - - - - - - - - - -

file

file containing a PEM-encoded certificate to import.

[type filename]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

the new certificate, or NULL on error

-
-

Since: 2.28

-
-
-
-

g_tls_certificate_new_from_files ()

-
GTlsCertificate *
-g_tls_certificate_new_from_files (const gchar *cert_file,
-                                  const gchar *key_file,
-                                  GError **error);
-

Creates a GTlsCertificate from the PEM-encoded data in cert_file - -and key_file -. The returned certificate will be the first certificate -found in cert_file -. As of GLib 2.44, if cert_file - contains more -certificates it will try to load a certificate chain. All -certificates will be verified in the order found (top-level -certificate should be the last one in the file) and the -“issuer” property of each certificate will be set -accordingly if the verification succeeds. If any certificate in the -chain cannot be verified, the first certificate in the file will -still be returned.

-

If either file cannot be read or parsed, the function will return -NULL and set error -. Otherwise, this behaves like -g_tls_certificate_new_from_pem().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cert_file

file containing one or more PEM-encoded -certificates to import.

[type filename]

key_file

file containing a PEM-encoded private key -to import.

[type filename]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

the new certificate, or NULL on error

-
-

Since: 2.28

-
-
-
-

g_tls_certificate_list_new_from_file ()

-
GList *
-g_tls_certificate_list_new_from_file (const gchar *file,
-                                      GError **error);
-

Creates one or more GTlsCertificates from the PEM-encoded -data in file -. If file - cannot be read or parsed, the function will -return NULL and set error -. If file - does not contain any -PEM-encoded certificates, this will return an empty list and not -set error -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

file

file containing PEM-encoded certificates to import.

[type filename]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

a -GList containing GTlsCertificate objects. You must free the list -and its contents when you are done with it.

-

[element-type Gio.TlsCertificate][transfer full]

-
-

Since: 2.28

-
-
-
-

g_tls_certificate_get_issuer ()

-
GTlsCertificate *
-g_tls_certificate_get_issuer (GTlsCertificate *cert);
-

Gets the GTlsCertificate representing cert -'s issuer, if known

-
-

Parameters

-
----- - - - - - -

cert

a GTlsCertificate

 
-
-
-

Returns

-

The certificate of cert -'s issuer, -or NULL if cert -is self-signed or signed with an unknown -certificate.

-

[transfer none]

-
-

Since: 2.28

-
-
-
-

g_tls_certificate_verify ()

-
GTlsCertificateFlags
-g_tls_certificate_verify (GTlsCertificate *cert,
-                          GSocketConnectable *identity,
-                          GTlsCertificate *trusted_ca);
-

This verifies cert - and returns a set of GTlsCertificateFlags -indicating any problems found with it. This can be used to verify a -certificate outside the context of making a connection, or to -check a certificate against a CA that is not part of the system -CA database.

-

If identity - is not NULL, cert -'s name(s) will be compared against -it, and G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return -value if it does not match. If identity - is NULL, that bit will -never be set in the return value.

-

If trusted_ca - is not NULL, then cert - (or one of the certificates -in its chain) must be signed by it, or else -G_TLS_CERTIFICATE_UNKNOWN_CA will be set in the return value. If -trusted_ca - is NULL, that bit will never be set in the return -value.

-

(All other GTlsCertificateFlags values will always be set or unset -as appropriate.)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cert

a GTlsCertificate

 

identity

the expected peer identity.

[nullable]

trusted_ca

the certificate of a trusted authority.

[nullable]
-
-
-

Returns

-

the appropriate GTlsCertificateFlags

-
-

Since: 2.28

-
-
-
-

g_tls_certificate_is_same ()

-
gboolean
-g_tls_certificate_is_same (GTlsCertificate *cert_one,
-                           GTlsCertificate *cert_two);
-

Check if two GTlsCertificate objects represent the same certificate. -The raw DER byte data of the two certificates are checked for equality. -This has the effect that two certificates may compare equal even if -their “issuer”, “private-key”, or -“private-key-pem” properties differ.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cert_one

first certificate to compare

 

cert_two

second certificate to compare

 
-
-
-

Returns

-

whether the same or not

-
-

Since: 2.34

-
-
-
-

Types and Values

-
-

GTlsCertificate

-
typedef struct _GTlsCertificate GTlsCertificate;
-

Abstract base class for TLS certificate types.

-

Since: 2.28

-
-
-
-

Property Details

-
-

The “certificate” property

-
  “certificate”              GByteArray *
-

The DER (binary) encoded representation of the certificate. -This property and the “certificate-pem” property -represent the same data, just in different forms.

-

Flags: Read / Write / Construct Only

-

Since: 2.28

-
-
-
-

The “certificate-pem” property

-
  “certificate-pem”          gchar *
-

The PEM (ASCII) encoded representation of the certificate. -This property and the “certificate” -property represent the same data, just in different forms.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.28

-
-
-
-

The “issuer” property

-
  “issuer”                   GTlsCertificate *
-

A GTlsCertificate representing the entity that issued this -certificate. If NULL, this means that the certificate is either -self-signed, or else the certificate of the issuer is not -available.

-

Flags: Read / Write / Construct Only

-

Since: 2.28

-
-
-
-

The “private-key” property

-
  “private-key”              GByteArray *
-

The DER (binary) encoded representation of the certificate's -private key, in either PKCS#1 format or unencrypted PKCS#8 -format. This property (or the “private-key-pem” -property) can be set when constructing a key (eg, from a file), -but cannot be read.

-

PKCS#8 format is supported since 2.32; earlier releases only -support PKCS#1. You can use the openssl rsa -tool to convert PKCS#8 keys to PKCS#1.

-

Flags: Write / Construct Only

-

Since: 2.28

-
-
-
-

The “private-key-pem” property

-
  “private-key-pem”          gchar *
-

The PEM (ASCII) encoded representation of the certificate's -private key in either PKCS#1 format ("BEGIN RSA PRIVATE -KEY") or unencrypted PKCS#8 format ("BEGIN -PRIVATE KEY"). This property (or the -“private-key” property) can be set when -constructing a key (eg, from a file), but cannot be read.

-

PKCS#8 format is supported since 2.32; earlier releases only -support PKCS#1. You can use the openssl rsa -tool to convert PKCS#8 keys to PKCS#1.

-

Flags: Write / Construct Only

-

Default value: NULL

-

Since: 2.28

-
-
-
-

See Also

-

GTlsConnection

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GTlsClientConnection.html b/docs/reference/gio/html/GTlsClientConnection.html deleted file mode 100644 index 7d42954f2..000000000 --- a/docs/reference/gio/html/GTlsClientConnection.html +++ /dev/null @@ -1,629 +0,0 @@ - - - - -GTlsClientConnection: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GTlsClientConnection

-

GTlsClientConnection — TLS client-side connection

-
- -
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - -
gpointeraccepted-casRead
-GSocketConnectable *server-identityRead / Write / Construct
gbooleanuse-ssl3Read / Write / Construct
GTlsCertificateFlagsvalidation-flagsRead / Write / Construct
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GTlsClientConnection
structGTlsClientConnectionInterface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GTlsClientConnection
-
-
-
-

Prerequisites

-

-GTlsClientConnection requires - GTlsConnection.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GTlsClientConnection is the client-side subclass of -GTlsConnection, representing a client-side TLS connection.

-
-
-

Functions

-
-

g_tls_client_connection_new ()

-
GIOStream *
-g_tls_client_connection_new (GIOStream *base_io_stream,
-                             GSocketConnectable *server_identity,
-                             GError **error);
-

Creates a new GTlsClientConnection wrapping base_io_stream - (which -must have pollable input and output streams) which is assumed to -communicate with the server identified by server_identity -.

-

See the documentation for “base-io-stream” for restrictions -on when application code can run operations on the base_io_stream - after -this function has returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

base_io_stream

the GIOStream to wrap

 

server_identity

the expected identity of the server.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

the new -GTlsClientConnection, or NULL on error.

-

[transfer full][type GTlsClientConnection]

-
-

Since: 2.28

-
-
-
-

g_tls_client_connection_set_server_identity ()

-
void
-g_tls_client_connection_set_server_identity
-                               (GTlsClientConnection *conn,
-                                GSocketConnectable *identity);
-

Sets conn -'s expected server identity, which is used both to tell -servers on virtual hosts which certificate to present, and also -to let conn - know what name to look for in the certificate when -performing G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled.

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

the GTlsClientConnection

 

identity

a GSocketConnectable describing the expected server identity

 
-
-

Since: 2.28

-
-
-
-

g_tls_client_connection_get_server_identity ()

-
GSocketConnectable *
-g_tls_client_connection_get_server_identity
-                               (GTlsClientConnection *conn);
-

Gets conn -'s expected server identity

-
-

Parameters

-
----- - - - - - -

conn

the GTlsClientConnection

 
-
-
-

Returns

-

a GSocketConnectable describing the -expected server identity, or NULL if the expected identity is not -known.

-

[transfer none]

-
-

Since: 2.28

-
-
-
-

g_tls_client_connection_set_validation_flags ()

-
void
-g_tls_client_connection_set_validation_flags
-                               (GTlsClientConnection *conn,
-                                GTlsCertificateFlags flags);
-

Sets conn -'s validation flags, to override the default set of -checks performed when validating a server certificate. By default, -G_TLS_CERTIFICATE_VALIDATE_ALL is used.

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

the GTlsClientConnection

 

flags

the GTlsCertificateFlags to use

 
-
-

Since: 2.28

-
-
-
-

g_tls_client_connection_get_validation_flags ()

-
GTlsCertificateFlags
-g_tls_client_connection_get_validation_flags
-                               (GTlsClientConnection *conn);
-

Gets conn -'s validation flags

-
-

Parameters

-
----- - - - - - -

conn

the GTlsClientConnection

 
-
-
-

Returns

-

the validation flags

-
-

Since: 2.28

-
-
-
-

g_tls_client_connection_set_use_ssl3 ()

-
void
-g_tls_client_connection_set_use_ssl3 (GTlsClientConnection *conn,
-                                      gboolean use_ssl3);
-

If use_ssl3 - is TRUE, this forces conn - to use SSL 3.0 rather than -trying to properly negotiate the right version of TLS or SSL to use. -This can be used when talking to servers that do not implement the -fallbacks correctly and which will therefore fail to handshake with -a "modern" TLS handshake attempt.

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

the GTlsClientConnection

 

use_ssl3

whether to use SSL 3.0

 
-
-

Since: 2.28

-
-
-
-

g_tls_client_connection_get_use_ssl3 ()

-
gboolean
-g_tls_client_connection_get_use_ssl3 (GTlsClientConnection *conn);
-

Gets whether conn - will use SSL 3.0 rather than the -highest-supported version of TLS; see -g_tls_client_connection_set_use_ssl3().

-
-

Parameters

-
----- - - - - - -

conn

the GTlsClientConnection

 
-
-
-

Returns

-

whether conn -will use SSL 3.0

-
-

Since: 2.28

-
-
-
-

g_tls_client_connection_get_accepted_cas ()

-
GList *
-g_tls_client_connection_get_accepted_cas
-                               (GTlsClientConnection *conn);
-

Gets the list of distinguished names of the Certificate Authorities -that the server will accept certificates from. This will be set -during the TLS handshake if the server requests a certificate. -Otherwise, it will be NULL.

-

Each item in the list is a GByteArray which contains the complete -subject DN of the certificate authority.

-
-

Parameters

-
----- - - - - - -

conn

the GTlsClientConnection

 
-
-
-

Returns

-

the list of -CA DNs. You should unref each element with g_byte_array_unref() and then -the free the list with g_list_free().

-

[element-type GByteArray][transfer full]

-
-

Since: 2.28

-
-
-
-

g_tls_client_connection_copy_session_state ()

-
void
-g_tls_client_connection_copy_session_state
-                               (GTlsClientConnection *conn,
-                                GTlsClientConnection *source);
-

Copies session state from one connection to another. This is -not normally needed, but may be used when the same session -needs to be used between different endpoints as is required -by some protocols such as FTP over TLS. source - should have -already completed a handshake, and conn - should not have -completed a handshake.

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

a GTlsClientConnection

 

source

a GTlsClientConnection

 
-
-

Since: 2.46

-
-
-
-

Types and Values

-
-

GTlsClientConnection

-
typedef struct _GTlsClientConnection GTlsClientConnection;
-

Abstract base class for the backend-specific client connection -type.

-

Since: 2.28

-
-
-
-

struct GTlsClientConnectionInterface

-
struct GTlsClientConnectionInterface {
-  GTypeInterface g_iface;
-
-  void     ( *copy_session_state )     (GTlsClientConnection       *conn,
-                                        GTlsClientConnection       *source);
-};
-
-

vtable for a GTlsClientConnection implementation.

-
-

Members

-
----- - - - - - -

copy_session_state ()

Copies session state from one GTlsClientConnection to another.

 
-
-

Since: 2.26

-
-
-
-

Property Details

-
-

The “accepted-cas” property

-
  “accepted-cas”             gpointer
-

A list of the distinguished names of the Certificate Authorities -that the server will accept client certificates signed by. If the -server requests a client certificate during the handshake, then -this property will be set after the handshake completes.

-

Each item in the list is a GByteArray which contains the complete -subject DN of the certificate authority.

-

[element-type GLib.ByteArray]

-

Flags: Read

-

Since: 2.28

-
-
-
-

The “server-identity” property

-
  “server-identity”          GSocketConnectable *
-

A GSocketConnectable describing the identity of the server that -is expected on the other end of the connection.

-

If the G_TLS_CERTIFICATE_BAD_IDENTITY flag is set in -“validation-flags”, this object will be used -to determine the expected identify of the remote end of the -connection; if “server-identity” is not set, -or does not match the identity presented by the server, then the -G_TLS_CERTIFICATE_BAD_IDENTITY validation will fail.

-

In addition to its use in verifying the server certificate, -this is also used to give a hint to the server about what -certificate we expect, which is useful for servers that serve -virtual hosts.

-

Flags: Read / Write / Construct

-

Since: 2.28

-
-
-
-

The “use-ssl3” property

-
  “use-ssl3”                 gboolean
-

If TRUE, tells the connection to use a fallback version of TLS -or SSL, rather than trying to negotiate the best version of TLS -to use. This can be used when talking to servers that don't -implement version negotiation correctly and therefore refuse to -handshake at all with a "modern" TLS handshake.

-

Despite the property name, the fallback version is not -necessarily SSL 3.0; if SSL 3.0 has been disabled, the -GTlsClientConnection will use the next highest available version -(normally TLS 1.0) as the fallback version.

-

Flags: Read / Write / Construct

-

Default value: FALSE

-

Since: 2.28

-
-
-
-

The “validation-flags” property

-
  “validation-flags”         GTlsCertificateFlags
-

What steps to perform when validating a certificate received from -a server. Server certificates that fail to validate in all of the -ways indicated here will be rejected unless the application -overrides the default via “accept-certificate”.

-

Flags: Read / Write / Construct

-

Default value: G_TLS_CERTIFICATE_UNKNOWN_CA | G_TLS_CERTIFICATE_BAD_IDENTITY | G_TLS_CERTIFICATE_NOT_ACTIVATED | G_TLS_CERTIFICATE_EXPIRED | G_TLS_CERTIFICATE_REVOKED | G_TLS_CERTIFICATE_INSECURE | G_TLS_CERTIFICATE_GENERIC_ERROR

-

Since: 2.28

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GTlsConnection.html b/docs/reference/gio/html/GTlsConnection.html deleted file mode 100644 index d532bbf00..000000000 --- a/docs/reference/gio/html/GTlsConnection.html +++ /dev/null @@ -1,1292 +0,0 @@ - - - - -GTlsConnection: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GTlsConnection

-

GTlsConnection — TLS connection type

-
- -
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GIOStream *base-io-streamRead / Write / Construct Only
-GTlsCertificate *certificateRead / Write
-GTlsDatabase *databaseRead / Write
-GTlsInteraction *interactionRead / Write
-GTlsCertificate *peer-certificateRead
GTlsCertificateFlagspeer-certificate-errorsRead
GTlsRehandshakeModerehandshake-modeRead / Write / Construct
gbooleanrequire-close-notifyRead / Write / Construct
gbooleanuse-system-certdbRead / Write / Construct
-
-
-

Signals

- -
-
-

Types and Values

-
---- - - - - - - - - - - -
 GTlsConnection
enumGTlsRehandshakeMode
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GIOStream
-        ╰── GTlsConnection
-
-
-
-

Known Derived Interfaces

-

-GTlsConnection is required by - GTlsClientConnection and GTlsServerConnection.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GTlsConnection is the base TLS connection class type, which wraps -a GIOStream and provides TLS encryption on top of it. Its -subclasses, GTlsClientConnection and GTlsServerConnection, -implement client-side and server-side TLS, respectively.

-

For DTLS (Datagram TLS) support, see GDtlsConnection.

-
-
-

Functions

-
-

g_tls_connection_set_certificate ()

-
void
-g_tls_connection_set_certificate (GTlsConnection *conn,
-                                  GTlsCertificate *certificate);
-

This sets the certificate that conn - will present to its peer -during the TLS handshake. For a GTlsServerConnection, it is -mandatory to set this, and that will normally be done at construct -time.

-

For a GTlsClientConnection, this is optional. If a handshake fails -with G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server -requires a certificate, and if you try connecting again, you should -call this method first. You can call -g_tls_client_connection_get_accepted_cas() on the failed connection -to get a list of Certificate Authorities that the server will -accept certificates from.

-

(It is also possible that a server will allow the connection with -or without a certificate; in that case, if you don't provide a -certificate, you can tell that the server requested one by the fact -that g_tls_client_connection_get_accepted_cas() will return -non-NULL.)

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

a GTlsConnection

 

certificate

the certificate to use for conn -

 
-
-

Since: 2.28

-
-
-
-

g_tls_connection_get_certificate ()

-
GTlsCertificate *
-g_tls_connection_get_certificate (GTlsConnection *conn);
-

Gets conn -'s certificate, as set by -g_tls_connection_set_certificate().

-
-

Parameters

-
----- - - - - - -

conn

a GTlsConnection

 
-
-
-

Returns

-

conn -'s certificate, or NULL.

-

[transfer none]

-
-

Since: 2.28

-
-
-
-

g_tls_connection_get_peer_certificate ()

-
GTlsCertificate *
-g_tls_connection_get_peer_certificate (GTlsConnection *conn);
-

Gets conn -'s peer's certificate after the handshake has completed. -(It is not set during the emission of -“accept-certificate”.)

-
-

Parameters

-
----- - - - - - -

conn

a GTlsConnection

 
-
-
-

Returns

-

conn -'s peer's certificate, or NULL.

-

[transfer none]

-
-

Since: 2.28

-
-
-
-

g_tls_connection_get_peer_certificate_errors ()

-
GTlsCertificateFlags
-g_tls_connection_get_peer_certificate_errors
-                               (GTlsConnection *conn);
-

Gets the errors associated with validating conn -'s peer's -certificate, after the handshake has completed. (It is not set -during the emission of “accept-certificate”.)

-
-

Parameters

-
----- - - - - - -

conn

a GTlsConnection

 
-
-
-

Returns

-

conn -'s peer's certificate errors

-
-

Since: 2.28

-
-
-
-

g_tls_connection_set_require_close_notify ()

-
void
-g_tls_connection_set_require_close_notify
-                               (GTlsConnection *conn,
-                                gboolean require_close_notify);
-

Sets whether or not conn - expects a proper TLS close notification -before the connection is closed. If this is TRUE (the default), -then conn - will expect to receive a TLS close notification from its -peer before the connection is closed, and will return a -G_TLS_ERROR_EOF error if the connection is closed without proper -notification (since this may indicate a network error, or -man-in-the-middle attack).

-

In some protocols, the application will know whether or not the -connection was closed cleanly based on application-level data -(because the application-level data includes a length field, or is -somehow self-delimiting); in this case, the close notify is -redundant and sometimes omitted. (TLS 1.1 explicitly allows this; -in TLS 1.0 it is technically an error, but often done anyway.) You -can use g_tls_connection_set_require_close_notify() to tell conn - -to allow an "unannounced" connection close, in which case the close -will show up as a 0-length read, as in a non-TLS -GSocketConnection, and it is up to the application to check that -the data has been fully received.

-

Note that this only affects the behavior when the peer closes the -connection; when the application calls g_io_stream_close() itself -on conn -, this will send a close notification regardless of the -setting of this property. If you explicitly want to do an unclean -close, you can close conn -'s “base-io-stream” rather -than closing conn - itself, but note that this may only be done when no other -operations are pending on conn - or the base I/O stream.

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

a GTlsConnection

 

require_close_notify

whether or not to require close notification

 
-
-

Since: 2.28

-
-
-
-

g_tls_connection_get_require_close_notify ()

-
gboolean
-g_tls_connection_get_require_close_notify
-                               (GTlsConnection *conn);
-

Tests whether or not conn - expects a proper TLS close notification -when the connection is closed. See -g_tls_connection_set_require_close_notify() for details.

-
-

Parameters

-
----- - - - - - -

conn

a GTlsConnection

 
-
-
-

Returns

-

TRUE if conn -requires a proper TLS close -notification.

-
-

Since: 2.28

-
-
-
-

g_tls_connection_set_rehandshake_mode ()

-
void
-g_tls_connection_set_rehandshake_mode (GTlsConnection *conn,
-                                       GTlsRehandshakeMode mode);
-

Sets how conn - behaves with respect to rehandshaking requests.

-

G_TLS_REHANDSHAKE_NEVER means that it will never agree to -rehandshake after the initial handshake is complete. (For a client, -this means it will refuse rehandshake requests from the server, and -for a server, this means it will close the connection with an error -if the client attempts to rehandshake.)

-

G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a -rehandshake only if the other end of the connection supports the -TLS renegotiation_info extension. This is the default behavior, -but means that rehandshaking will not work against older -implementations that do not support that extension.

-

G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow -rehandshaking even without the renegotiation_info extension. On -the server side in particular, this is not recommended, since it -leaves the server open to certain attacks. However, this mode is -necessary if you need to allow renegotiation with older client -software.

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

a GTlsConnection

 

mode

the rehandshaking mode

 
-
-

Since: 2.28

-
-
-
-

g_tls_connection_get_rehandshake_mode ()

-
GTlsRehandshakeMode
-g_tls_connection_get_rehandshake_mode (GTlsConnection *conn);
-

Gets conn - rehandshaking mode. See -g_tls_connection_set_rehandshake_mode() for details.

-
-

Parameters

-
----- - - - - - -

conn

a GTlsConnection

 
-
-
-

Returns

-

conn -'s rehandshaking mode

-
-

Since: 2.28

-
-
-
-

g_tls_connection_set_use_system_certdb ()

-
void
-g_tls_connection_set_use_system_certdb
-                               (GTlsConnection *conn,
-                                gboolean use_system_certdb);
-
-

g_tls_connection_set_use_system_certdb has been deprecated since version 2.30 and should not be used in newly-written code.

-

Use g_tls_connection_set_database() instead

-
-

Sets whether conn - uses the system certificate database to verify -peer certificates. This is TRUE by default. If set to FALSE, then -peer certificate validation will always set the -G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning -“accept-certificate” will always be emitted on -client-side connections, unless that bit is not set in -“validation-flags”).

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

a GTlsConnection

 

use_system_certdb

whether to use the system certificate database

 
-
-
-
-
-

g_tls_connection_get_use_system_certdb ()

-
gboolean
-g_tls_connection_get_use_system_certdb
-                               (GTlsConnection *conn);
-
-

g_tls_connection_get_use_system_certdb has been deprecated since version 2.30 and should not be used in newly-written code.

-

Use g_tls_connection_get_database() instead

-
-

Gets whether conn - uses the system certificate database to verify -peer certificates. See g_tls_connection_set_use_system_certdb().

-
-

Parameters

-
----- - - - - - -

conn

a GTlsConnection

 
-
-
-

Returns

-

whether conn -uses the system certificate database

-
-
-
-
-

g_tls_connection_get_database ()

-
GTlsDatabase *
-g_tls_connection_get_database (GTlsConnection *conn);
-

Gets the certificate database that conn - uses to verify -peer certificates. See g_tls_connection_set_database().

-
-

Parameters

-
----- - - - - - -

conn

a GTlsConnection

 
-
-
-

Returns

-

the certificate database that conn -uses or NULL.

-

[transfer none]

-
-

Since: 2.30

-
-
-
-

g_tls_connection_set_database ()

-
void
-g_tls_connection_set_database (GTlsConnection *conn,
-                               GTlsDatabase *database);
-

Sets the certificate database that is used to verify peer certificates. -This is set to the default database by default. See -g_tls_backend_get_default_database(). If set to NULL, then -peer certificate validation will always set the -G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning -“accept-certificate” will always be emitted on -client-side connections, unless that bit is not set in -“validation-flags”).

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

a GTlsConnection

 

database

a GTlsDatabase

 
-
-

Since: 2.30

-
-
-
-

g_tls_connection_get_interaction ()

-
GTlsInteraction *
-g_tls_connection_get_interaction (GTlsConnection *conn);
-

Get the object that will be used to interact with the user. It will be used -for things like prompting the user for passwords. If NULL is returned, then -no user interaction will occur for this connection.

-
-

Parameters

-
----- - - - - - -

conn

a connection

 
-
-
-

Returns

-

The interaction object.

-

[transfer none]

-
-

Since: 2.30

-
-
-
-

g_tls_connection_set_interaction ()

-
void
-g_tls_connection_set_interaction (GTlsConnection *conn,
-                                  GTlsInteraction *interaction);
-

Set the object that will be used to interact with the user. It will be used -for things like prompting the user for passwords.

-

The interaction - argument will normally be a derived subclass of -GTlsInteraction. NULL can also be provided if no user interaction -should occur for this connection.

-
-

Parameters

-
----- - - - - - - - - - - - - -

conn

a connection

 

interaction

an interaction object, or NULL.

[nullable]
-
-

Since: 2.30

-
-
-
-

g_tls_connection_handshake ()

-
gboolean
-g_tls_connection_handshake (GTlsConnection *conn,
-                            GCancellable *cancellable,
-                            GError **error);
-

Attempts a TLS handshake on conn -.

-

On the client side, it is never necessary to call this method; -although the connection needs to perform a handshake after -connecting (or after sending a "STARTTLS"-type command) and may -need to rehandshake later if the server requests it, -GTlsConnection will handle this for you automatically when you try -to send or receive data on the connection. However, you can call -g_tls_connection_handshake() manually if you want to know for sure -whether the initial handshake succeeded or failed (as opposed to -just immediately trying to write to conn -'s output stream, in which -case if it fails, it may not be possible to tell if it failed -before or after completing the handshake).

-

Likewise, on the server side, although a handshake is necessary at -the beginning of the communication, you do not need to call this -function explicitly unless you want clearer error reporting. -However, you may call g_tls_connection_handshake() later on to -renegotiate parameters (encryption methods, etc) with the client.

-

“accept_certificate” may be emitted during the -handshake.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

conn

a GTlsConnection

 

cancellable

a GCancellable, or NULL.

[nullable]

error

a GError, or NULL

 
-
-
-

Returns

-

success or failure

-
-

Since: 2.28

-
-
-
-

g_tls_connection_handshake_async ()

-
void
-g_tls_connection_handshake_async (GTlsConnection *conn,
-                                  int io_priority,
-                                  GCancellable *cancellable,
-                                  GAsyncReadyCallback callback,
-                                  gpointer user_data);
-

Asynchronously performs a TLS handshake on conn -. See -g_tls_connection_handshake() for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

conn

a GTlsConnection

 

io_priority

the I/O priority of the request

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

callback to call when the handshake is complete

 

user_data

the data to pass to the callback function

 
-
-

Since: 2.28

-
-
-
-

g_tls_connection_handshake_finish ()

-
gboolean
-g_tls_connection_handshake_finish (GTlsConnection *conn,
-                                   GAsyncResult *result,
-                                   GError **error);
-

Finish an asynchronous TLS handshake operation. See -g_tls_connection_handshake() for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

conn

a GTlsConnection

 

result

a GAsyncResult.

 

error

a GError pointer, or NULL

 
-
-
-

Returns

-

TRUE on success, FALSE on failure, in which -case error -will be set.

-
-

Since: 2.28

-
-
-
-

g_tls_connection_emit_accept_certificate ()

-
gboolean
-g_tls_connection_emit_accept_certificate
-                               (GTlsConnection *conn,
-                                GTlsCertificate *peer_cert,
-                                GTlsCertificateFlags errors);
-

Used by GTlsConnection implementations to emit the -“accept-certificate” signal.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

conn

a GTlsConnection

 

peer_cert

the peer's GTlsCertificate

 

errors

the problems with peer_cert -

 
-
-
-

Returns

-

TRUE if one of the signal handlers has returned -TRUE to accept peer_cert -

-
-

Since: 2.28

-
-
-
-

Types and Values

-
-

GTlsConnection

-
typedef struct _GTlsConnection GTlsConnection;
-

Abstract base class for the backend-specific GTlsClientConnection -and GTlsServerConnection types.

-

Since: 2.28

-
-
-
-

enum GTlsRehandshakeMode

-

When to allow rehandshaking. See -g_tls_connection_set_rehandshake_mode().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_TLS_REHANDSHAKE_NEVER

-

Never allow rehandshaking

-
 

G_TLS_REHANDSHAKE_SAFELY

-

Allow safe rehandshaking only

-
 

G_TLS_REHANDSHAKE_UNSAFELY

-

Allow unsafe rehandshaking

-
 
-
-

Since: 2.28

-
-
-
-

Property Details

-
-

The “base-io-stream” property

-
  “base-io-stream”           GIOStream *
-

The GIOStream that the connection wraps. The connection holds a reference -to this stream, and may run operations on the stream from other threads -throughout its lifetime. Consequently, after the GIOStream has been -constructed, application code may only run its own operations on this -stream when no GIOStream operations are running.

-

Flags: Read / Write / Construct Only

-

Since: 2.28

-
-
-
-

The “certificate” property

-
  “certificate”              GTlsCertificate *
-

The connection's certificate; see -g_tls_connection_set_certificate().

-

Flags: Read / Write

-

Since: 2.28

-
-
-
-

The “database” property

-
  “database”                 GTlsDatabase *
-

The certificate database to use when verifying this TLS connection. -If no certificate database is set, then the default database will be -used. See g_tls_backend_get_default_database().

-

Flags: Read / Write

-

Since: 2.30

-
-
-
-

The “interaction” property

-
  “interaction”              GTlsInteraction *
-

A GTlsInteraction object to be used when the connection or certificate -database need to interact with the user. This will be used to prompt the -user for passwords where necessary.

-

Flags: Read / Write

-

Since: 2.30

-
-
-
-

The “peer-certificate” property

-
  “peer-certificate”         GTlsCertificate *
-

The connection's peer's certificate, after the TLS handshake has -completed and the certificate has been accepted. Note in -particular that this is not yet set during the emission of -“accept-certificate”.

-

(You can watch for a “notify” signal on this property to -detect when a handshake has occurred.)

-

Flags: Read

-

Since: 2.28

-
-
-
-

The “peer-certificate-errors” property

-
  “peer-certificate-errors”  GTlsCertificateFlags
-

The errors noticed-and-ignored while verifying -“peer-certificate”. Normally this should be 0, but -it may not be if “validation-flags” is not -G_TLS_CERTIFICATE_VALIDATE_ALL, or if -“accept-certificate” overrode the default -behavior.

-

Flags: Read

-

Since: 2.28

-
-
-
-

The “rehandshake-mode” property

-
  “rehandshake-mode”         GTlsRehandshakeMode
-

The rehandshaking mode. See -g_tls_connection_set_rehandshake_mode().

-

Flags: Read / Write / Construct

-

Default value: G_TLS_REHANDSHAKE_SAFELY

-

Since: 2.28

-
-
-
-

The “require-close-notify” property

-
  “require-close-notify”     gboolean
-

Whether or not proper TLS close notification is required. -See g_tls_connection_set_require_close_notify().

-

Flags: Read / Write / Construct

-

Default value: TRUE

-

Since: 2.28

-
-
-
-

The “use-system-certdb” property

-
  “use-system-certdb”        gboolean
-

Whether or not the system certificate database will be used to -verify peer certificates. See -g_tls_connection_set_use_system_certdb().

-
-

GTlsConnection:use-system-certdb has been deprecated since version 2.30 and should not be used in newly-written code.

-

Use GTlsConnection:database instead

-
-

Flags: Read / Write / Construct

-

Default value: TRUE

-
-
-
-

Signal Details

-
-

The “accept-certificate” signal

-
gboolean
-user_function (GTlsConnection      *conn,
-               GTlsCertificate     *peer_cert,
-               GTlsCertificateFlags errors,
-               gpointer             user_data)
-

Emitted during the TLS handshake after the peer certificate has -been received. You can examine peer_cert -'s certification path by -calling g_tls_certificate_get_issuer() on it.

-

For a client-side connection, peer_cert - is the server's -certificate, and the signal will only be emitted if the -certificate was not acceptable according to conn -'s -“validation_flags”. If you would like the -certificate to be accepted despite errors -, return TRUE from the -signal handler. Otherwise, if no handler accepts the certificate, -the handshake will fail with G_TLS_ERROR_BAD_CERTIFICATE.

-

For a server-side connection, peer_cert - is the certificate -presented by the client, if this was requested via the server's -“authentication_mode”. On the server side, -the signal is always emitted when the client presents a -certificate, and the certificate will only be accepted if a -handler returns TRUE.

-

Note that if this signal is emitted as part of asynchronous I/O -in the main thread, then you should not attempt to interact with -the user before returning from the signal handler. If you want to -let the user decide whether or not to accept the certificate, you -would have to return FALSE from the signal handler on the first -attempt, and then after the connection attempt returns a -G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if -the user decides to accept the certificate, remember that fact, -create a new connection, and return TRUE from the signal handler -the next time.

-

If you are doing I/O in another thread, you do not -need to worry about this, and can simply block in the signal -handler until the UI thread returns an answer.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

conn

a GTlsConnection

 

peer_cert

the peer's GTlsCertificate

 

errors

the problems with peer_cert -.

 

user_data

user data set when the signal handler was connected.

 
-
-
-

Returns

-

TRUE to accept peer_cert -(which will also -immediately end the signal emission). FALSE to allow the signal -emission to continue, which will cause the handshake to fail if -no one else overrides it.

-
-

Flags: Run Last

-

Since: 2.28

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GTlsDatabase.html b/docs/reference/gio/html/GTlsDatabase.html deleted file mode 100644 index f3d5884c6..000000000 --- a/docs/reference/gio/html/GTlsDatabase.html +++ /dev/null @@ -1,1309 +0,0 @@ - - - - -GTlsDatabase: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GTlsDatabase

-

GTlsDatabase — TLS database type

-
- -
-

Types and Values

- -
-
-

Object Hierarchy

-
    GObject
-    ╰── GTlsDatabase
-
-
-
-

Known Derived Interfaces

-

-GTlsDatabase is required by - GTlsFileDatabase.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GTlsDatabase is used to lookup certificates and other information -from a certificate or key store. It is an abstract base class which -TLS library specific subtypes override.

-

Most common client applications will not directly interact with -GTlsDatabase. It is used internally by GTlsConnection.

-
-
-

Functions

-
-

g_tls_database_verify_chain ()

-
GTlsCertificateFlags
-g_tls_database_verify_chain (GTlsDatabase *self,
-                             GTlsCertificate *chain,
-                             const gchar *purpose,
-                             GSocketConnectable *identity,
-                             GTlsInteraction *interaction,
-                             GTlsDatabaseVerifyFlags flags,
-                             GCancellable *cancellable,
-                             GError **error);
-

Determines the validity of a certificate chain after looking up and -adding any missing certificates to the chain.

-

chain - is a chain of GTlsCertificate objects each pointing to the next -certificate in the chain by its issuer property. The chain may initially -consist of one or more certificates. After the verification process is -complete, chain - may be modified by adding missing certificates, or removing -extra certificates. If a certificate anchor was found, then it is added to -the chain -.

-

purpose - describes the purpose (or usage) for which the certificate -is being used. Typically purpose - will be set to G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER -which means that the certificate is being used to authenticate a server -(and we are acting as the client).

-

The identity - is used to check for pinned certificates (trust exceptions) -in the database. These will override the normal verification process on a -host by host basis.

-

Currently there are no flags -, and G_TLS_DATABASE_VERIFY_NONE should be -used.

-

If chain - is found to be valid, then the return value will be 0. If -chain - is found to be invalid, then the return value will indicate -the problems found. If the function is unable to determine whether -chain - is valid or not (eg, because cancellable - is triggered -before it completes) then the return value will be -G_TLS_CERTIFICATE_GENERIC_ERROR and error - will be set -accordingly. error - is not set when chain - is successfully analyzed -but found to be invalid.

-

This function can block, use g_tls_database_verify_chain_async() to perform -the verification operation asynchronously.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

self

a GTlsDatabase

 

chain

a GTlsCertificate chain

 

purpose

the purpose that this certificate chain will be used for.

 

identity

the expected peer identity.

[nullable]

interaction

used to interact with the user if necessary.

[nullable]

flags

additional verify flags

 

cancellable

a GCancellable, or NULL.

[nullable]

error

a GError, or NULL.

[nullable]
-
-
-

Returns

-

the appropriate GTlsCertificateFlags which represents the -result of verification.

-
-

Since: 2.30

-
-
-
-

g_tls_database_verify_chain_async ()

-
void
-g_tls_database_verify_chain_async (GTlsDatabase *self,
-                                   GTlsCertificate *chain,
-                                   const gchar *purpose,
-                                   GSocketConnectable *identity,
-                                   GTlsInteraction *interaction,
-                                   GTlsDatabaseVerifyFlags flags,
-                                   GCancellable *cancellable,
-                                   GAsyncReadyCallback callback,
-                                   gpointer user_data);
-

Asynchronously determines the validity of a certificate chain after -looking up and adding any missing certificates to the chain. See -g_tls_database_verify_chain() for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

self

a GTlsDatabase

 

chain

a GTlsCertificate chain

 

purpose

the purpose that this certificate chain will be used for.

 

identity

the expected peer identity.

[nullable]

interaction

used to interact with the user if necessary.

[nullable]

flags

additional verify flags

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

callback to call when the operation completes

 

user_data

the data to pass to the callback function

 
-
-

Since: 2.30

-
-
-
-

g_tls_database_verify_chain_finish ()

-
GTlsCertificateFlags
-g_tls_database_verify_chain_finish (GTlsDatabase *self,
-                                    GAsyncResult *result,
-                                    GError **error);
-

Finish an asynchronous verify chain operation. See -g_tls_database_verify_chain() for more information.

-

If chain - is found to be valid, then the return value will be 0. If -chain - is found to be invalid, then the return value will indicate -the problems found. If the function is unable to determine whether -chain - is valid or not (eg, because cancellable - is triggered -before it completes) then the return value will be -G_TLS_CERTIFICATE_GENERIC_ERROR and error - will be set -accordingly. error - is not set when chain - is successfully analyzed -but found to be invalid.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

self

a GTlsDatabase

 

result

a GAsyncResult.

 

error

a GError pointer, or NULL

 
-
-
-

Returns

-

the appropriate GTlsCertificateFlags which represents the -result of verification.

-
-

Since: 2.30

-
-
-
-

g_tls_database_lookup_certificate_issuer ()

-
GTlsCertificate *
-g_tls_database_lookup_certificate_issuer
-                               (GTlsDatabase *self,
-                                GTlsCertificate *certificate,
-                                GTlsInteraction *interaction,
-                                GTlsDatabaseLookupFlags flags,
-                                GCancellable *cancellable,
-                                GError **error);
-

Lookup the issuer of certificate - in the database.

-

The issuer property -of certificate - is not modified, and the two certificates are not hooked -into a chain.

-

This function can block, use g_tls_database_lookup_certificate_issuer_async() to perform -the lookup operation asynchronously.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

self

a GTlsDatabase

 

certificate

a GTlsCertificate

 

interaction

used to interact with the user if necessary.

[nullable]

flags

flags which affect the lookup operation

 

cancellable

a GCancellable, or NULL.

[nullable]

error

a GError, or NULL.

[nullable]
-
-
-

Returns

-

a newly allocated issuer GTlsCertificate, -or NULL. Use g_object_unref() to release the certificate.

-

[transfer full]

-
-

Since: 2.30

-
-
-
-

g_tls_database_lookup_certificate_issuer_async ()

-
void
-g_tls_database_lookup_certificate_issuer_async
-                               (GTlsDatabase *self,
-                                GTlsCertificate *certificate,
-                                GTlsInteraction *interaction,
-                                GTlsDatabaseLookupFlags flags,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

Asynchronously lookup the issuer of certificate - in the database. See -g_tls_database_lookup_certificate_issuer() for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

self

a GTlsDatabase

 

certificate

a GTlsCertificate

 

interaction

used to interact with the user if necessary.

[nullable]

flags

flags which affect the lookup operation

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

callback to call when the operation completes

 

user_data

the data to pass to the callback function

 
-
-

Since: 2.30

-
-
-
-

g_tls_database_lookup_certificate_issuer_finish ()

-
GTlsCertificate *
-g_tls_database_lookup_certificate_issuer_finish
-                               (GTlsDatabase *self,
-                                GAsyncResult *result,
-                                GError **error);
-

Finish an asynchronous lookup issuer operation. See -g_tls_database_lookup_certificate_issuer() for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

self

a GTlsDatabase

 

result

a GAsyncResult.

 

error

a GError pointer, or NULL

 
-
-
-

Returns

-

a newly allocated issuer GTlsCertificate, -or NULL. Use g_object_unref() to release the certificate.

-

[transfer full]

-
-

Since: 2.30

-
-
-
-

g_tls_database_lookup_certificates_issued_by ()

-
GList *
-g_tls_database_lookup_certificates_issued_by
-                               (GTlsDatabase *self,
-                                GByteArray *issuer_raw_dn,
-                                GTlsInteraction *interaction,
-                                GTlsDatabaseLookupFlags flags,
-                                GCancellable *cancellable,
-                                GError **error);
-

Lookup certificates issued by this issuer in the database.

-

This function can block, use g_tls_database_lookup_certificates_issued_by_async() to perform -the lookup operation asynchronously.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

self

a GTlsDatabase

 

issuer_raw_dn

a GByteArray which holds the DER encoded issuer DN.

 

interaction

used to interact with the user if necessary.

[nullable]

flags

Flags which affect the lookup operation.

 

cancellable

a GCancellable, or NULL.

[nullable]

error

a GError, or NULL.

[nullable]
-
-
-

Returns

-

a newly allocated list of GTlsCertificate -objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list.

-

[transfer full][element-type GTlsCertificate]

-
-

Since: 2.30

-
-
-
-

g_tls_database_lookup_certificates_issued_by_async ()

-
void
-g_tls_database_lookup_certificates_issued_by_async
-                               (GTlsDatabase *self,
-                                GByteArray *issuer_raw_dn,
-                                GTlsInteraction *interaction,
-                                GTlsDatabaseLookupFlags flags,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

Asynchronously lookup certificates issued by this issuer in the database. See -g_tls_database_lookup_certificates_issued_by() for more information.

-

The database may choose to hold a reference to the issuer byte array for the duration -of of this asynchronous operation. The byte array should not be modified during -this time.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

self

a GTlsDatabase

 

issuer_raw_dn

a GByteArray which holds the DER encoded issuer DN.

 

interaction

used to interact with the user if necessary.

[nullable]

flags

Flags which affect the lookup operation.

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

callback to call when the operation completes

 

user_data

the data to pass to the callback function

 
-
-

Since: 2.30

-
-
-
-

g_tls_database_lookup_certificates_issued_by_finish ()

-
GList *
-g_tls_database_lookup_certificates_issued_by_finish
-                               (GTlsDatabase *self,
-                                GAsyncResult *result,
-                                GError **error);
-

Finish an asynchronous lookup of certificates. See -g_tls_database_lookup_certificates_issued_by() for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

self

a GTlsDatabase

 

result

a GAsyncResult.

 

error

a GError pointer, or NULL

 
-
-
-

Returns

-

a newly allocated list of GTlsCertificate -objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list.

-

[transfer full][element-type GTlsCertificate]

-
-

Since: 2.30

-
-
-
-

g_tls_database_create_certificate_handle ()

-
gchar *
-g_tls_database_create_certificate_handle
-                               (GTlsDatabase *self,
-                                GTlsCertificate *certificate);
-

Create a handle string for the certificate. The database will only be able -to create a handle for certificates that originate from the database. In -cases where the database cannot create a handle for a certificate, NULL -will be returned.

-

This handle should be stable across various instances of the application, -and between applications. If a certificate is modified in the database, -then it is not guaranteed that this handle will continue to point to it.

-
-

Parameters

-
----- - - - - - - - - - - - - -

self

a GTlsDatabase

 

certificate

certificate for which to create a handle.

 
-
-
-

Returns

-

a newly allocated string containing the -handle.

-

[nullable]

-
-

Since: 2.30

-
-
-
-

g_tls_database_lookup_certificate_for_handle ()

-
GTlsCertificate *
-g_tls_database_lookup_certificate_for_handle
-                               (GTlsDatabase *self,
-                                const gchar *handle,
-                                GTlsInteraction *interaction,
-                                GTlsDatabaseLookupFlags flags,
-                                GCancellable *cancellable,
-                                GError **error);
-

Lookup a certificate by its handle.

-

The handle should have been created by calling -g_tls_database_create_certificate_handle() on a GTlsDatabase object of -the same TLS backend. The handle is designed to remain valid across -instantiations of the database.

-

If the handle is no longer valid, or does not point to a certificate in -this database, then NULL will be returned.

-

This function can block, use g_tls_database_lookup_certificate_for_handle_async() to perform -the lookup operation asynchronously.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

self

a GTlsDatabase

 

handle

a certificate handle

 

interaction

used to interact with the user if necessary.

[nullable]

flags

Flags which affect the lookup.

 

cancellable

a GCancellable, or NULL.

[nullable]

error

a GError, or NULL.

[nullable]
-
-
-

Returns

-

a newly allocated -GTlsCertificate, or NULL. Use g_object_unref() to release the certificate.

-

[transfer full][nullable]

-
-

Since: 2.30

-
-
-
-

g_tls_database_lookup_certificate_for_handle_async ()

-
void
-g_tls_database_lookup_certificate_for_handle_async
-                               (GTlsDatabase *self,
-                                const gchar *handle,
-                                GTlsInteraction *interaction,
-                                GTlsDatabaseLookupFlags flags,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

Asynchronously lookup a certificate by its handle in the database. See -g_tls_database_lookup_certificate_for_handle() for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

self

a GTlsDatabase

 

handle

a certificate handle

 

interaction

used to interact with the user if necessary.

[nullable]

flags

Flags which affect the lookup.

 

cancellable

a GCancellable, or NULL.

[nullable]

callback

callback to call when the operation completes

 

user_data

the data to pass to the callback function

 
-
-

Since: 2.30

-
-
-
-

g_tls_database_lookup_certificate_for_handle_finish ()

-
GTlsCertificate *
-g_tls_database_lookup_certificate_for_handle_finish
-                               (GTlsDatabase *self,
-                                GAsyncResult *result,
-                                GError **error);
-

Finish an asynchronous lookup of a certificate by its handle. See -g_tls_database_lookup_certificate_handle() for more information.

-

If the handle is no longer valid, or does not point to a certificate in -this database, then NULL will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

self

a GTlsDatabase

 

result

a GAsyncResult.

 

error

a GError pointer, or NULL

 
-
-
-

Returns

-

a newly allocated GTlsCertificate object. -Use g_object_unref() to release the certificate.

-

[transfer full]

-
-

Since: 2.30

-
-
-
-

Types and Values

-
-

GTlsDatabase

-
typedef struct _GTlsDatabase GTlsDatabase;
-

Abstract base class for the backend-specific database types.

-

Since: 2.30

-
-
-
-

struct GTlsDatabaseClass

-
struct GTlsDatabaseClass {
-  GObjectClass parent_class;
-
-  /* virtual methods */
-
-  GTlsCertificateFlags  (*verify_chain)                         (GTlsDatabase            *self,
-                                                                 GTlsCertificate         *chain,
-                                                                 const gchar             *purpose,
-                                                                 GSocketConnectable      *identity,
-                                                                 GTlsInteraction         *interaction,
-                                                                 GTlsDatabaseVerifyFlags  flags,
-                                                                 GCancellable            *cancellable,
-                                                                 GError                 **error);
-
-  void                  (*verify_chain_async)                   (GTlsDatabase            *self,
-                                                                 GTlsCertificate         *chain,
-                                                                 const gchar             *purpose,
-                                                                 GSocketConnectable      *identity,
-                                                                 GTlsInteraction         *interaction,
-                                                                 GTlsDatabaseVerifyFlags  flags,
-                                                                 GCancellable            *cancellable,
-                                                                 GAsyncReadyCallback      callback,
-                                                                 gpointer                 user_data);
-
-  GTlsCertificateFlags  (*verify_chain_finish)                  (GTlsDatabase            *self,
-                                                                 GAsyncResult            *result,
-                                                                 GError                 **error);
-
-  gchar*                (*create_certificate_handle)            (GTlsDatabase            *self,
-                                                                 GTlsCertificate         *certificate);
-
-  GTlsCertificate*      (*lookup_certificate_for_handle)        (GTlsDatabase            *self,
-                                                                 const gchar             *handle,
-                                                                 GTlsInteraction         *interaction,
-                                                                 GTlsDatabaseLookupFlags  flags,
-                                                                 GCancellable            *cancellable,
-                                                                 GError                 **error);
-
-  void                  (*lookup_certificate_for_handle_async)  (GTlsDatabase            *self,
-                                                                 const gchar             *handle,
-                                                                 GTlsInteraction         *interaction,
-                                                                 GTlsDatabaseLookupFlags  flags,
-                                                                 GCancellable            *cancellable,
-                                                                 GAsyncReadyCallback      callback,
-                                                                 gpointer                 user_data);
-
-  GTlsCertificate*      (*lookup_certificate_for_handle_finish) (GTlsDatabase            *self,
-                                                                 GAsyncResult            *result,
-                                                                 GError                 **error);
-
-  GTlsCertificate*      (*lookup_certificate_issuer)            (GTlsDatabase            *self,
-                                                                 GTlsCertificate         *certificate,
-                                                                 GTlsInteraction         *interaction,
-                                                                 GTlsDatabaseLookupFlags  flags,
-                                                                 GCancellable            *cancellable,
-                                                                 GError                 **error);
-
-  void                  (*lookup_certificate_issuer_async)      (GTlsDatabase            *self,
-                                                                 GTlsCertificate         *certificate,
-                                                                 GTlsInteraction         *interaction,
-                                                                 GTlsDatabaseLookupFlags  flags,
-                                                                 GCancellable            *cancellable,
-                                                                 GAsyncReadyCallback      callback,
-                                                                 gpointer                 user_data);
-
-  GTlsCertificate*      (*lookup_certificate_issuer_finish)     (GTlsDatabase            *self,
-                                                                 GAsyncResult            *result,
-                                                                 GError                 **error);
-
-  GList*                (*lookup_certificates_issued_by)        (GTlsDatabase            *self,
-                                                                 GByteArray              *issuer_raw_dn,
-                                                                 GTlsInteraction         *interaction,
-                                                                 GTlsDatabaseLookupFlags  flags,
-                                                                 GCancellable            *cancellable,
-                                                                 GError                 **error);
-
-  void                  (*lookup_certificates_issued_by_async)  (GTlsDatabase            *self,
-                                                                 GByteArray              *issuer_raw_dn,
-                                                                 GTlsInteraction         *interaction,
-                                                                 GTlsDatabaseLookupFlags  flags,
-                                                                 GCancellable            *cancellable,
-                                                                 GAsyncReadyCallback      callback,
-                                                                 gpointer                 user_data);
-
-  GList*                (*lookup_certificates_issued_by_finish) (GTlsDatabase            *self,
-                                                                 GAsyncResult            *result,
-                                                                 GError                 **error);
-};
-
-

The class for GTlsDatabase. Derived classes should implement the various -virtual methods. _async and _finish methods have a default -implementation that runs the corresponding sync method in a thread.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

verify_chain ()

Virtual method implementing -g_tls_database_verify_chain().

 

verify_chain_async ()

Virtual method implementing -g_tls_database_verify_chain_async().

 

verify_chain_finish ()

Virtual method implementing -g_tls_database_verify_chain_finish().

 

create_certificate_handle ()

Virtual method implementing -g_tls_database_create_certificate_handle().

 

lookup_certificate_for_handle ()

Virtual method implementing -g_tls_database_lookup_certificate_for_handle().

 

lookup_certificate_for_handle_async ()

Virtual method implementing -g_tls_database_lookup_certificate_for_handle_async().

 

lookup_certificate_for_handle_finish ()

Virtual method implementing -g_tls_database_lookup_certificate_for_handle_finish().

 

lookup_certificate_issuer ()

Virtual method implementing -g_tls_database_lookup_certificate_issuer().

 

lookup_certificate_issuer_async ()

Virtual method implementing -g_tls_database_lookup_certificate_issuer_async().

 

lookup_certificate_issuer_finish ()

Virtual method implementing -g_tls_database_lookup_certificate_issuer_finish().

 

lookup_certificates_issued_by ()

Virtual method implementing -g_tls_database_lookup_certificates_issued_by().

 

lookup_certificates_issued_by_async ()

Virtual method implementing -g_tls_database_lookup_certificates_issued_by_async().

 

lookup_certificates_issued_by_finish ()

Virtual method implementing -g_tls_database_lookup_certificates_issued_by_finish().

 
-
-

Since: 2.30

-
-
-
-

enum GTlsDatabaseVerifyFlags

-

Flags for g_tls_database_verify_chain().

-
-

Members

-
----- - - - - - -

G_TLS_DATABASE_VERIFY_NONE

-

No verification flags

-
 
-
-

Since: 2.30

-
-
-
-

G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER

-
#define G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER "1.3.6.1.5.5.7.3.1"
-
-

The purpose used to verify the server certificate in a TLS connection. This -is the most common purpose in use. Used by TLS clients.

-
-
-
-

G_TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT

-
#define G_TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT "1.3.6.1.5.5.7.3.2"
-
-

The purpose used to verify the client certificate in a TLS connection. -Used by TLS servers.

-
-
-
-

enum GTlsDatabaseLookupFlags

-

Flags for g_tls_database_lookup_certificate_handle(), -g_tls_database_lookup_certificate_issuer(), -and g_tls_database_lookup_certificates_issued_by().

-
-

Members

-
----- - - - - - - - - - - - - -

G_TLS_DATABASE_LOOKUP_NONE

-

No lookup flags

-
 

G_TLS_DATABASE_LOOKUP_KEYPAIR

-

Restrict lookup to certificates that have - a private key.

-
 
-
-

Since: 2.30

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GTlsFileDatabase.html b/docs/reference/gio/html/GTlsFileDatabase.html deleted file mode 100644 index df5e656e9..000000000 --- a/docs/reference/gio/html/GTlsFileDatabase.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - -GTlsFileDatabase: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GTlsFileDatabase

-

GTlsFileDatabase — TLS file based database type

-
-
-

Functions

-
---- - - - - -
-GTlsDatabase * - -g_tls_file_database_new () -
-
-
-

Properties

-
----- - - - - - -
-gchar *anchorsRead / Write / Construct
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GTlsFileDatabase
structGTlsFileDatabaseInterface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GTlsFileDatabase
-
-
-
-

Prerequisites

-

-GTlsFileDatabase requires - GTlsDatabase.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GTlsFileDatabase is implemented by GTlsDatabase objects which load -their certificate information from a file. It is an interface which -TLS library specific subtypes implement.

-
-
-

Functions

-
-

g_tls_file_database_new ()

-
GTlsDatabase *
-g_tls_file_database_new (const gchar *anchors,
-                         GError **error);
-

Creates a new GTlsFileDatabase which uses anchor certificate authorities -in anchors - to verify certificate chains.

-

The certificates in anchors - must be PEM encoded.

-
-

Parameters

-
----- - - - - - - - - - - - - -

anchors

filename of anchor certificate authorities.

[type filename]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

the new -GTlsFileDatabase, or NULL on error.

-

[transfer full][type GTlsFileDatabase]

-
-

Since: 2.30

-
-
-
-

Types and Values

-
-

GTlsFileDatabase

-
typedef struct _GTlsFileDatabase GTlsFileDatabase;
-

Implemented by a GTlsDatabase which allows you to load certificates -from a file.

-

Since: 2.30

-
-
-
-

struct GTlsFileDatabaseInterface

-
struct GTlsFileDatabaseInterface {
-  GTypeInterface g_iface;
-};
-
-

Provides an interface for GTlsFileDatabase implementations.

-
-

Members

-
----- - -
-
-
-
-
-

Property Details

-
-

The “anchors” property

-
  “anchors”                  gchar *
-

The path to a file containing PEM encoded certificate authority -root anchors. The certificates in this file will be treated as -root authorities for the purpose of verifying other certificates -via the g_tls_database_verify_chain() operation.

-

Flags: Read / Write / Construct

-

Default value: NULL

-

Since: 2.30

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GTlsInteraction.html b/docs/reference/gio/html/GTlsInteraction.html deleted file mode 100644 index c769bc74c..000000000 --- a/docs/reference/gio/html/GTlsInteraction.html +++ /dev/null @@ -1,836 +0,0 @@ - - - - -GTlsInteraction: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GTlsInteraction

-

GTlsInteraction — Interaction with the user during TLS operations.

-
- -
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
 GTlsInteraction
enumGTlsInteractionResult
enumGTlsCertificateRequestFlags
structGTlsInteractionClass
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GTlsInteraction
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GTlsInteraction provides a mechanism for the TLS connection and database -code to interact with the user. It can be used to ask the user for passwords.

-

To use a GTlsInteraction with a TLS connection use -g_tls_connection_set_interaction().

-

Callers should instantiate a derived class that implements the various -interaction methods to show the required dialogs.

-

Callers should use the 'invoke' functions like -g_tls_interaction_invoke_ask_password() to run interaction methods. These -functions make sure that the interaction is invoked in the main loop -and not in the current thread, if the current thread is not running the -main loop.

-

Derived classes can choose to implement whichever interactions methods they'd -like to support by overriding those virtual methods in their class -initialization function. Any interactions not implemented will return -G_TLS_INTERACTION_UNHANDLED. If a derived class implements an async method, -it must also implement the corresponding finish method.

-
-
-

Functions

-
-

g_tls_interaction_invoke_ask_password ()

-
GTlsInteractionResult
-g_tls_interaction_invoke_ask_password (GTlsInteraction *interaction,
-                                       GTlsPassword *password,
-                                       GCancellable *cancellable,
-                                       GError **error);
-

Invoke the interaction to ask the user for a password. It invokes this -interaction in the main loop, specifically the GMainContext returned by -g_main_context_get_thread_default() when the interaction is created. This -is called by called by GTlsConnection or GTlsDatabase to ask the user -for a password.

-

Derived subclasses usually implement a password prompt, although they may -also choose to provide a password from elsewhere. The password - value will -be filled in and then callback - will be called. Alternatively the user may -abort this password request, which will usually abort the TLS connection.

-

The implementation can either be a synchronous (eg: modal dialog) or an -asynchronous one (eg: modeless dialog). This function will take care of -calling which ever one correctly.

-

If the interaction is cancelled by the cancellation object, or by the -user then G_TLS_INTERACTION_FAILED will be returned with an error that -contains a G_IO_ERROR_CANCELLED error code. Certain implementations may -not support immediate cancellation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

interaction

a GTlsInteraction object

 

password

a GTlsPassword object

 

cancellable

an optional GCancellable cancellation object

 

error

an optional location to place an error on failure

 
-
-
-

Returns

-

The status of the ask password interaction.

-
-

Since: 2.30

-
-
-
-

g_tls_interaction_invoke_request_certificate ()

-
GTlsInteractionResult
-g_tls_interaction_invoke_request_certificate
-                               (GTlsInteraction *interaction,
-                                GTlsConnection *connection,
-                                GTlsCertificateRequestFlags flags,
-                                GCancellable *cancellable,
-                                GError **error);
-

Invoke the interaction to ask the user to choose a certificate to -use with the connection. It invokes this interaction in the main -loop, specifically the GMainContext returned by -g_main_context_get_thread_default() when the interaction is -created. This is called by called by GTlsConnection when the peer -requests a certificate during the handshake.

-

Derived subclasses usually implement a certificate selector, -although they may also choose to provide a certificate from -elsewhere. Alternatively the user may abort this certificate -request, which may or may not abort the TLS connection.

-

The implementation can either be a synchronous (eg: modal dialog) or an -asynchronous one (eg: modeless dialog). This function will take care of -calling which ever one correctly.

-

If the interaction is cancelled by the cancellation object, or by the -user then G_TLS_INTERACTION_FAILED will be returned with an error that -contains a G_IO_ERROR_CANCELLED error code. Certain implementations may -not support immediate cancellation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

interaction

a GTlsInteraction object

 

connection

a GTlsConnection object

 

flags

flags providing more information about the request

 

cancellable

an optional GCancellable cancellation object

 

error

an optional location to place an error on failure

 
-
-
-

Returns

-

The status of the certificate request interaction.

-
-

Since: 2.40

-
-
-
-

g_tls_interaction_ask_password ()

-
GTlsInteractionResult
-g_tls_interaction_ask_password (GTlsInteraction *interaction,
-                                GTlsPassword *password,
-                                GCancellable *cancellable,
-                                GError **error);
-

Run synchronous interaction to ask the user for a password. In general, -g_tls_interaction_invoke_ask_password() should be used instead of this -function.

-

Derived subclasses usually implement a password prompt, although they may -also choose to provide a password from elsewhere. The password - value will -be filled in and then callback - will be called. Alternatively the user may -abort this password request, which will usually abort the TLS connection.

-

If the interaction is cancelled by the cancellation object, or by the -user then G_TLS_INTERACTION_FAILED will be returned with an error that -contains a G_IO_ERROR_CANCELLED error code. Certain implementations may -not support immediate cancellation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

interaction

a GTlsInteraction object

 

password

a GTlsPassword object

 

cancellable

an optional GCancellable cancellation object

 

error

an optional location to place an error on failure

 
-
-
-

Returns

-

The status of the ask password interaction.

-
-

Since: 2.30

-
-
-
-

g_tls_interaction_ask_password_async ()

-
void
-g_tls_interaction_ask_password_async (GTlsInteraction *interaction,
-                                      GTlsPassword *password,
-                                      GCancellable *cancellable,
-                                      GAsyncReadyCallback callback,
-                                      gpointer user_data);
-

Run asynchronous interaction to ask the user for a password. In general, -g_tls_interaction_invoke_ask_password() should be used instead of this -function.

-

Derived subclasses usually implement a password prompt, although they may -also choose to provide a password from elsewhere. The password - value will -be filled in and then callback - will be called. Alternatively the user may -abort this password request, which will usually abort the TLS connection.

-

If the interaction is cancelled by the cancellation object, or by the -user then G_TLS_INTERACTION_FAILED will be returned with an error that -contains a G_IO_ERROR_CANCELLED error code. Certain implementations may -not support immediate cancellation.

-

Certain implementations may not support immediate cancellation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

interaction

a GTlsInteraction object

 

password

a GTlsPassword object

 

cancellable

an optional GCancellable cancellation object

 

callback

will be called when the interaction completes.

[nullable]

user_data

data to pass to the callback -.

[nullable]
-
-

Since: 2.30

-
-
-
-

g_tls_interaction_ask_password_finish ()

-
GTlsInteractionResult
-g_tls_interaction_ask_password_finish (GTlsInteraction *interaction,
-                                       GAsyncResult *result,
-                                       GError **error);
-

Complete an ask password user interaction request. This should be once -the g_tls_interaction_ask_password_async() completion callback is called.

-

If G_TLS_INTERACTION_HANDLED is returned, then the GTlsPassword passed -to g_tls_interaction_ask_password() will have its password filled in.

-

If the interaction is cancelled by the cancellation object, or by the -user then G_TLS_INTERACTION_FAILED will be returned with an error that -contains a G_IO_ERROR_CANCELLED error code.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

interaction

a GTlsInteraction object

 

result

the result passed to the callback

 

error

an optional location to place an error on failure

 
-
-
-

Returns

-

The status of the ask password interaction.

-
-

Since: 2.30

-
-
-
-

g_tls_interaction_request_certificate ()

-
GTlsInteractionResult
-g_tls_interaction_request_certificate (GTlsInteraction *interaction,
-                                       GTlsConnection *connection,
-                                       GTlsCertificateRequestFlags flags,
-                                       GCancellable *cancellable,
-                                       GError **error);
-

Run synchronous interaction to ask the user to choose a certificate to use -with the connection. In general, g_tls_interaction_invoke_request_certificate() -should be used instead of this function.

-

Derived subclasses usually implement a certificate selector, although they may -also choose to provide a certificate from elsewhere. Alternatively the user may -abort this certificate request, which will usually abort the TLS connection.

-

If G_TLS_INTERACTION_HANDLED is returned, then the GTlsConnection -passed to g_tls_interaction_request_certificate() will have had its -“certificate” filled in.

-

If the interaction is cancelled by the cancellation object, or by the -user then G_TLS_INTERACTION_FAILED will be returned with an error that -contains a G_IO_ERROR_CANCELLED error code. Certain implementations may -not support immediate cancellation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

interaction

a GTlsInteraction object

 

connection

a GTlsConnection object

 

flags

flags providing more information about the request

 

cancellable

an optional GCancellable cancellation object

 

error

an optional location to place an error on failure

 
-
-
-

Returns

-

The status of the request certificate interaction.

-
-

Since: 2.40

-
-
-
-

g_tls_interaction_request_certificate_async ()

-
void
-g_tls_interaction_request_certificate_async
-                               (GTlsInteraction *interaction,
-                                GTlsConnection *connection,
-                                GTlsCertificateRequestFlags flags,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

Run asynchronous interaction to ask the user for a certificate to use with -the connection. In general, g_tls_interaction_invoke_request_certificate() should -be used instead of this function.

-

Derived subclasses usually implement a certificate selector, although they may -also choose to provide a certificate from elsewhere. callback - will be called -when the operation completes. Alternatively the user may abort this certificate -request, which will usually abort the TLS connection.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

interaction

a GTlsInteraction object

 

connection

a GTlsConnection object

 

flags

flags providing more information about the request

 

cancellable

an optional GCancellable cancellation object

 

callback

will be called when the interaction completes.

[nullable]

user_data

data to pass to the callback -.

[nullable]
-
-

Since: 2.40

-
-
-
-

g_tls_interaction_request_certificate_finish ()

-
GTlsInteractionResult
-g_tls_interaction_request_certificate_finish
-                               (GTlsInteraction *interaction,
-                                GAsyncResult *result,
-                                GError **error);
-

Complete an request certificate user interaction request. This should be once -the g_tls_interaction_request_certificate_async() completion callback is called.

-

If G_TLS_INTERACTION_HANDLED is returned, then the GTlsConnection -passed to g_tls_interaction_request_certificate_async() will have had its -“certificate” filled in.

-

If the interaction is cancelled by the cancellation object, or by the -user then G_TLS_INTERACTION_FAILED will be returned with an error that -contains a G_IO_ERROR_CANCELLED error code.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

interaction

a GTlsInteraction object

 

result

the result passed to the callback

 

error

an optional location to place an error on failure

 
-
-
-

Returns

-

The status of the request certificate interaction.

-
-

Since: 2.40

-
-
-
-

Types and Values

-
-

GTlsInteraction

-
typedef struct _GTlsInteraction GTlsInteraction;
-

An object representing interaction that the TLS connection and database -might have with the user.

-

Since: 2.30

-
-
-
-

enum GTlsInteractionResult

-

GTlsInteractionResult is returned by various functions in GTlsInteraction -when finishing an interaction request.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_TLS_INTERACTION_UNHANDLED

-

The interaction was unhandled (i.e. not - implemented).

-
 

G_TLS_INTERACTION_HANDLED

-

The interaction completed, and resulting data - is available.

-
 

G_TLS_INTERACTION_FAILED

-

The interaction has failed, or was cancelled. - and the operation should be aborted.

-
 
-
-

Since: 2.30

-
-
-
-

enum GTlsCertificateRequestFlags

-

Flags for g_tls_interaction_request_certificate(), -g_tls_interaction_request_certificate_async(), and -g_tls_interaction_invoke_request_certificate().

-
-

Members

-
----- - - - - - -

G_TLS_CERTIFICATE_REQUEST_NONE

-

No flags

-
 
-
-

Since: 2.40

-
-
-
-

struct GTlsInteractionClass

-
struct GTlsInteractionClass {
-  GTlsInteractionResult  (* ask_password)        (GTlsInteraction    *interaction,
-                                                  GTlsPassword       *password,
-                                                  GCancellable       *cancellable,
-                                                  GError            **error);
-
-  void                   (* ask_password_async)  (GTlsInteraction    *interaction,
-                                                  GTlsPassword       *password,
-                                                  GCancellable       *cancellable,
-                                                  GAsyncReadyCallback callback,
-                                                  gpointer            user_data);
-
-  GTlsInteractionResult  (* ask_password_finish) (GTlsInteraction    *interaction,
-                                                  GAsyncResult       *result,
-                                                  GError            **error);
-
-  GTlsInteractionResult  (* request_certificate)        (GTlsInteraction              *interaction,
-                                                         GTlsConnection               *connection,
-                                                         GTlsCertificateRequestFlags   flags,
-                                                         GCancellable                 *cancellable,
-                                                         GError                      **error);
-
-  void                   (* request_certificate_async)  (GTlsInteraction              *interaction,
-                                                         GTlsConnection               *connection,
-                                                         GTlsCertificateRequestFlags   flags,
-                                                         GCancellable                 *cancellable,
-                                                         GAsyncReadyCallback           callback,
-                                                         gpointer                      user_data);
-
-  GTlsInteractionResult  (* request_certificate_finish) (GTlsInteraction              *interaction,
-                                                         GAsyncResult                 *result,
-                                                         GError                      **error);
-};
-
-

The class for GTlsInteraction. Derived classes implement the various -virtual interaction methods to handle TLS interactions.

-

Derived classes can choose to implement whichever interactions methods they'd -like to support by overriding those virtual methods in their class -initialization function. If a derived class implements an async method, -it must also implement the corresponding finish method.

-

The synchronous interaction methods should implement to display modal dialogs, -and the asynchronous methods to display modeless dialogs.

-

If the user cancels an interaction, then the result should be -G_TLS_INTERACTION_FAILED and the error should be set with a domain of -G_IO_ERROR and code of G_IO_ERROR_CANCELLED.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

ask_password ()

ask for a password synchronously. If the implementation -returns G_TLS_INTERACTION_HANDLED, then the password argument should -have been filled in by using g_tls_password_set_value() or a similar -function.

 

ask_password_async ()

ask for a password asynchronously.

 

ask_password_finish ()

complete operation to ask for a password asynchronously. -If the implementation returns G_TLS_INTERACTION_HANDLED, then the -password argument of the async method should have been filled in by using -g_tls_password_set_value() or a similar function.

 

request_certificate ()

ask for a certificate synchronously. If the -implementation returns G_TLS_INTERACTION_HANDLED, then the connection -argument should have been filled in by using -g_tls_connection_set_certificate().

 

request_certificate_async ()

ask for a certificate asyncronously.

 

request_certificate_finish ()

complete operation to ask for a certificate -asynchronously. If the implementation returns G_TLS_INTERACTION_HANDLED, -then the connection argument of the async method should have been -filled in by using g_tls_connection_set_certificate().

 
-
-

Since: 2.30

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GTlsPassword.html b/docs/reference/gio/html/GTlsPassword.html deleted file mode 100644 index 52e0a7957..000000000 --- a/docs/reference/gio/html/GTlsPassword.html +++ /dev/null @@ -1,684 +0,0 @@ - - - - -GTlsPassword: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GTlsPassword

-

GTlsPassword — TLS Passwords for prompting

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GTlsPassword * - -g_tls_password_new () -
const guchar * - -g_tls_password_get_value () -
-void - -g_tls_password_set_value () -
-void - -g_tls_password_set_value_full () -
const gchar * - -g_tls_password_get_description () -
-void - -g_tls_password_set_description () -
-GTlsPasswordFlags - -g_tls_password_get_flags () -
-void - -g_tls_password_set_flags () -
const gchar * - -g_tls_password_get_warning () -
-void - -g_tls_password_set_warning () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - -
-gchar *descriptionRead / Write
GTlsPasswordFlagsflagsRead / Write
-gchar *warningRead / Write
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
 GTlsPassword
structGTlsPasswordClass
enumGTlsPasswordFlags
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GTlsPassword
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Holds a password used in TLS.

-
-
-

Functions

-
-

g_tls_password_new ()

-
GTlsPassword *
-g_tls_password_new (GTlsPasswordFlags flags,
-                    const gchar *description);
-

Create a new GTlsPassword object.

-
-

Parameters

-
----- - - - - - - - - - - - - -

flags

the password flags

 

description

description of what the password is for

 
-
-
-

Returns

-

The newly allocated password object.

-

[transfer full]

-
-
-
-
-

g_tls_password_get_value ()

-
const guchar *
-g_tls_password_get_value (GTlsPassword *password,
-                          gsize *length);
-

Get the password value. If length - is not NULL then it will be -filled in with the length of the password value. (Note that the -password value is not nul-terminated, so you can only pass NULL -for length - in contexts where you know the password will have a -certain fixed length.)

-
-

Parameters

-
----- - - - - - - - - - - - - -

password

a GTlsPassword object

 

length

location to place the length of the password.

[nullable]
-
-
-

Returns

-

The password value (owned by the password object).

-
-

Since: 2.30

-
-
-
-

g_tls_password_set_value ()

-
void
-g_tls_password_set_value (GTlsPassword *password,
-                          const guchar *value,
-                          gssize length);
-

Set the value for this password. The value - will be copied by the password -object.

-

Specify the length -, for a non-nul-terminated password. Pass -1 as -length - if using a nul-terminated password, and length - will be -calculated automatically. (Note that the terminating nul is not -considered part of the password in this case.)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

password

a GTlsPassword object

 

value

the new password value

 

length

the length of the password, or -1

 
-
-

Since: 2.30

-
-
-
-

g_tls_password_set_value_full ()

-
void
-g_tls_password_set_value_full (GTlsPassword *password,
-                               guchar *value,
-                               gssize length,
-                               GDestroyNotify destroy);
-

Provide the value for this password.

-

The value - will be owned by the password object, and later freed using -the destroy - function callback.

-

Specify the length -, for a non-nul-terminated password. Pass -1 as -length - if using a nul-terminated password, and length - will be -calculated automatically. (Note that the terminating nul is not -considered part of the password in this case.)

-

Virtual: set_value

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

password

a GTlsPassword object

 

value

the value for the password

 

length

the length of the password, or -1

 

destroy

a function to use to free the password.

[nullable]
-
-

Since: 2.30

-
-
-
-

g_tls_password_get_description ()

-
const gchar *
-g_tls_password_get_description (GTlsPassword *password);
-

Get a description string about what the password will be used for.

-
-

Parameters

-
----- - - - - - -

password

a GTlsPassword object

 
-
-
-

Returns

-

The description of the password.

-
-

Since: 2.30

-
-
-
-

g_tls_password_set_description ()

-
void
-g_tls_password_set_description (GTlsPassword *password,
-                                const gchar *description);
-

Set a description string about what the password will be used for.

-
-

Parameters

-
----- - - - - - - - - - - - - -

password

a GTlsPassword object

 

description

The description of the password

 
-
-

Since: 2.30

-
-
-
-

g_tls_password_get_flags ()

-
GTlsPasswordFlags
-g_tls_password_get_flags (GTlsPassword *password);
-

Get flags about the password.

-
-

Parameters

-
----- - - - - - -

password

a GTlsPassword object

 
-
-
-

Returns

-

The flags about the password.

-
-

Since: 2.30

-
-
-
-

g_tls_password_set_flags ()

-
void
-g_tls_password_set_flags (GTlsPassword *password,
-                          GTlsPasswordFlags flags);
-

Set flags about the password.

-
-

Parameters

-
----- - - - - - - - - - - - - -

password

a GTlsPassword object

 

flags

The flags about the password

 
-
-

Since: 2.30

-
-
-
-

g_tls_password_get_warning ()

-
const gchar *
-g_tls_password_get_warning (GTlsPassword *password);
-

Get a user readable translated warning. Usually this warning is a -representation of the password flags returned from -g_tls_password_get_flags().

-
-

Parameters

-
----- - - - - - -

password

a GTlsPassword object

 
-
-
-

Returns

-

The warning.

-
-

Since: 2.30

-
-
-
-

g_tls_password_set_warning ()

-
void
-g_tls_password_set_warning (GTlsPassword *password,
-                            const gchar *warning);
-

Set a user readable translated warning. Usually this warning is a -representation of the password flags returned from -g_tls_password_get_flags().

-
-

Parameters

-
----- - - - - - - - - - - - - -

password

a GTlsPassword object

 

warning

The user readable warning

 
-
-

Since: 2.30

-
-
-
-

Types and Values

-
-

GTlsPassword

-
typedef struct _GTlsPassword GTlsPassword;
-

An abstract interface representing a password used in TLS. Often used in -user interaction such as unlocking a key storage token.

-

Since: 2.30

-
-
-
-

struct GTlsPasswordClass

-
struct GTlsPasswordClass {
-  GObjectClass parent_class;
-
-  /* methods */
-
-  const guchar *    ( *get_value)            (GTlsPassword  *password,
-                                              gsize         *length);
-
-  void              ( *set_value)            (GTlsPassword  *password,
-                                              guchar        *value,
-                                              gssize         length,
-                                              GDestroyNotify destroy);
-
-  const gchar*      ( *get_default_warning)  (GTlsPassword  *password);
-};
-
-

Class structure for GTlsPassword.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

get_value ()

virtual method for g_tls_password_get_value()

 

set_value ()

virtual method for g_tls_password_set_value()

 

get_default_warning ()

virtual method for g_tls_password_get_warning() if no -value has been set using g_tls_password_set_warning()

 
-
-
-
-
-

enum GTlsPasswordFlags

-

Various flags for the password.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_TLS_PASSWORD_NONE

-

No flags

-
 

G_TLS_PASSWORD_RETRY

-

The password was wrong, and the user should retry.

-
 

G_TLS_PASSWORD_MANY_TRIES

-

Hint to the user that the password has been - wrong many times, and the user may not have many chances left.

-
 

G_TLS_PASSWORD_FINAL_TRY

-

Hint to the user that this is the last try to get - this password right.

-
 
-
-

Since: 2.30

-
-
-
-

Property Details

-
-

The “description” property

-
  “description”              gchar *
-

Description of what the password is for.

-

Flags: Read / Write

-

Default value: NULL

-
-
-
-

The “flags” property

-
  “flags”                    GTlsPasswordFlags
-

Flags about the password.

-

Flags: Read / Write

-
-
-
-

The “warning” property

-
  “warning”                  gchar *
-

Warning about the password.

-

Flags: Read / Write

-

Default value: NULL

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GTlsServerConnection.html b/docs/reference/gio/html/GTlsServerConnection.html deleted file mode 100644 index 1bae1902c..000000000 --- a/docs/reference/gio/html/GTlsServerConnection.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - -GTlsServerConnection: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GTlsServerConnection

-

GTlsServerConnection — TLS server-side connection

-
-
-

Functions

-
---- - - - - -
-GIOStream * - -g_tls_server_connection_new () -
-
-
-

Properties

-
----- - - - - - -
GTlsAuthenticationModeauthentication-modeRead / Write
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GTlsServerConnection
structGTlsServerConnectionInterface
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GTlsServerConnection
-
-
-
-

Prerequisites

-

-GTlsServerConnection requires - GTlsConnection.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GTlsServerConnection is the server-side subclass of GTlsConnection, -representing a server-side TLS connection.

-
-
-

Functions

-
-

g_tls_server_connection_new ()

-
GIOStream *
-g_tls_server_connection_new (GIOStream *base_io_stream,
-                             GTlsCertificate *certificate,
-                             GError **error);
-

Creates a new GTlsServerConnection wrapping base_io_stream - (which -must have pollable input and output streams).

-

See the documentation for “base-io-stream” for restrictions -on when application code can run operations on the base_io_stream - after -this function has returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

base_io_stream

the GIOStream to wrap

 

certificate

the default server certificate, or NULL.

[nullable]

error

GError for error reporting, or NULL to ignore.

 
-
-
-

Returns

-

the new -GTlsServerConnection, or NULL on error.

-

[transfer full][type GTlsServerConnection]

-
-

Since: 2.28

-
-
-
-

Types and Values

-
-

GTlsServerConnection

-
typedef struct _GTlsServerConnection GTlsServerConnection;
-

TLS server-side connection. This is the server-side implementation -of a GTlsConnection.

-

Since: 2.28

-
-
-
-

struct GTlsServerConnectionInterface

-
struct GTlsServerConnectionInterface {
-  GTypeInterface g_iface;
-};
-
-

vtable for a GTlsServerConnection implementation.

-
-

Members

-
----- - -
-
-

Since: 2.26

-
-
-
-

Property Details

-
-

The “authentication-mode” property

-
  “authentication-mode”      GTlsAuthenticationMode
-

The GTlsAuthenticationMode for the server. This can be changed -before calling g_tls_connection_handshake() if you want to -rehandshake with a different mode from the initial handshake.

-

Flags: Read / Write

-

Default value: G_TLS_AUTHENTICATION_NONE

-

Since: 2.28

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GUnixConnection.html b/docs/reference/gio/html/GUnixConnection.html deleted file mode 100644 index 2b8d2dbf0..000000000 --- a/docs/reference/gio/html/GUnixConnection.html +++ /dev/null @@ -1,550 +0,0 @@ - - - - -GUnixConnection: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GUnixConnection

-

GUnixConnection — A UNIX domain GSocketConnection

-
- -
-

Types and Values

-
---- - - - - -
structGUnixConnection
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GIOStream
-        ╰── GSocketConnection
-            ╰── GUnixConnection
-
-
-
-

Includes

-
#include <gio/gunixconnection.h>
-
-
-
-

Description

-

This is the subclass of GSocketConnection that is created -for UNIX domain sockets.

-

It contains functions to do some of the UNIX socket specific -functionality like passing file descriptors.

-

Note that <gio/gunixconnection.h> belongs to the UNIX-specific -GIO interfaces, thus you have to use the gio-unix-2.0.pc -pkg-config file when using it.

-
-
-

Functions

-
-

g_unix_connection_receive_fd ()

-
gint
-g_unix_connection_receive_fd (GUnixConnection *connection,
-                              GCancellable *cancellable,
-                              GError **error);
-

Receives a file descriptor from the sending end of the connection. -The sending end has to call g_unix_connection_send_fd() for this -to work.

-

As well as reading the fd this also reads a single byte from the -stream, as this is required for fd passing to work on some -implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

a GUnixConnection

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

GError for error reporting, or NULL to ignore.

[nullable]
-
-
-

Returns

-

a file descriptor on success, -1 on error.

-
-

Since: 2.22

-
-
-
-

g_unix_connection_send_fd ()

-
gboolean
-g_unix_connection_send_fd (GUnixConnection *connection,
-                           gint fd,
-                           GCancellable *cancellable,
-                           GError **error);
-

Passes a file descriptor to the receiving side of the -connection. The receiving end has to call g_unix_connection_receive_fd() -to accept the file descriptor.

-

As well as sending the fd this also writes a single byte to the -stream, as this is required for fd passing to work on some -implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

connection

a GUnixConnection

 

fd

a file descriptor

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

GError for error reporting, or NULL to ignore.

[nullable]
-
-
-

Returns

-

a TRUE on success, NULL on error.

-
-

Since: 2.22

-
-
-
-

g_unix_connection_receive_credentials ()

-
GCredentials *
-g_unix_connection_receive_credentials (GUnixConnection *connection,
-                                       GCancellable *cancellable,
-                                       GError **error);
-

Receives credentials from the sending end of the connection. The -sending end has to call g_unix_connection_send_credentials() (or -similar) for this to work.

-

As well as reading the credentials this also reads (and discards) a -single byte from the stream, as this is required for credentials -passing to work on some implementations.

-

Other ways to exchange credentials with a foreign peer includes the -GUnixCredentialsMessage type and g_socket_get_credentials() function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

A GUnixConnection.

 

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL.

 
-
-
-

Returns

-

Received credentials on success (free with -g_object_unref()), NULL if error -is set.

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_unix_connection_receive_credentials_async ()

-
void
-g_unix_connection_receive_credentials_async
-                               (GUnixConnection *connection,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

Asynchronously receive credentials.

-

For more details, see g_unix_connection_receive_credentials() which is -the synchronous version of this call.

-

When the operation is finished, callback - will be called. You can then call -g_unix_connection_receive_credentials_finish() to get the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

connection

A GUnixConnection.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-

Since: 2.32

-
-
-
-

g_unix_connection_receive_credentials_finish ()

-
GCredentials *
-g_unix_connection_receive_credentials_finish
-                               (GUnixConnection *connection,
-                                GAsyncResult *result,
-                                GError **error);
-

Finishes an asynchronous receive credentials operation started with -g_unix_connection_receive_credentials_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

A GUnixConnection.

 

result

a GAsyncResult.

 

error

a GError, or NULL

 
-
-
-

Returns

-

a GCredentials, or NULL on error. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_unix_connection_send_credentials ()

-
gboolean
-g_unix_connection_send_credentials (GUnixConnection *connection,
-                                    GCancellable *cancellable,
-                                    GError **error);
-

Passes the credentials of the current user the receiving side -of the connection. The receiving end has to call -g_unix_connection_receive_credentials() (or similar) to accept the -credentials.

-

As well as sending the credentials this also writes a single NUL -byte to the stream, as this is required for credentials passing to -work on some implementations.

-

Other ways to exchange credentials with a foreign peer includes the -GUnixCredentialsMessage type and g_socket_get_credentials() function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

A GUnixConnection.

 

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL.

 
-
-
-

Returns

-

TRUE on success, FALSE if error -is set.

-
-

Since: 2.26

-
-
-
-

g_unix_connection_send_credentials_async ()

-
void
-g_unix_connection_send_credentials_async
-                               (GUnixConnection *connection,
-                                GCancellable *cancellable,
-                                GAsyncReadyCallback callback,
-                                gpointer user_data);
-

Asynchronously send credentials.

-

For more details, see g_unix_connection_send_credentials() which is -the synchronous version of this call.

-

When the operation is finished, callback - will be called. You can then call -g_unix_connection_send_credentials_finish() to get the result of the operation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

connection

A GUnixConnection.

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback to call when the request is satisfied.

[scope async]

user_data

the data to pass to callback function.

[closure]
-
-

Since: 2.32

-
-
-
-

g_unix_connection_send_credentials_finish ()

-
gboolean
-g_unix_connection_send_credentials_finish
-                               (GUnixConnection *connection,
-                                GAsyncResult *result,
-                                GError **error);
-

Finishes an asynchronous send credentials operation started with -g_unix_connection_send_credentials_async().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

A GUnixConnection.

 

result

a GAsyncResult.

 

error

a GError, or NULL

 
-
-
-

Returns

-

TRUE if the operation was successful, otherwise FALSE.

-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

struct GUnixConnection

-
struct GUnixConnection;
-

GUnixConnection is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

See Also

-

GSocketConnection.

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GUnixCredentialsMessage.html b/docs/reference/gio/html/GUnixCredentialsMessage.html deleted file mode 100644 index de3bbf360..000000000 --- a/docs/reference/gio/html/GUnixCredentialsMessage.html +++ /dev/null @@ -1,264 +0,0 @@ - - - - -GUnixCredentialsMessage: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GUnixCredentialsMessage

-

GUnixCredentialsMessage — A GSocketControlMessage containing credentials

-
- -
-

Properties

-
----- - - - - - -
-GCredentials *credentialsRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GUnixCredentialsMessage
structGUnixCredentialsMessageClass
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSocketControlMessage
-        ╰── GUnixCredentialsMessage
-
-
-
-

Includes

-
#include <gio/gunixcredentialsmessage.h>
-
-
-
-

Description

-

This GSocketControlMessage contains a GCredentials instance. It -may be sent using g_socket_send_message() and received using -g_socket_receive_message() over UNIX sockets (ie: sockets in the -G_SOCKET_FAMILY_UNIX family).

-

For an easier way to send and receive credentials over -stream-oriented UNIX sockets, see -g_unix_connection_send_credentials() and -g_unix_connection_receive_credentials(). To receive credentials of -a foreign process connected to a socket, use -g_socket_get_credentials().

-
-
-

Functions

-
-

g_unix_credentials_message_new ()

-
GSocketControlMessage *
-g_unix_credentials_message_new (void);
-

Creates a new GUnixCredentialsMessage with credentials matching the current processes.

-
-

Returns

-

a new GUnixCredentialsMessage

-
-

Since: 2.26

-
-
-
-

g_unix_credentials_message_new_with_credentials ()

-
GSocketControlMessage *
-g_unix_credentials_message_new_with_credentials
-                               (GCredentials *credentials);
-

Creates a new GUnixCredentialsMessage holding credentials -.

-
-

Parameters

-
----- - - - - - -

credentials

A GCredentials object.

 
-
-
-

Returns

-

a new GUnixCredentialsMessage

-
-

Since: 2.26

-
-
-
-

g_unix_credentials_message_get_credentials ()

-
GCredentials *
-g_unix_credentials_message_get_credentials
-                               (GUnixCredentialsMessage *message);
-

Gets the credentials stored in message -.

-
-

Parameters

-
----- - - - - - -

message

A GUnixCredentialsMessage.

 
-
-
-

Returns

-

A GCredentials instance. Do not free, it is owned by message -.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_unix_credentials_message_is_supported ()

-
gboolean
-g_unix_credentials_message_is_supported
-                               (void);
-

Checks if passing GCredentials on a GSocket is supported on this platform.

-
-

Returns

-

TRUE if supported, FALSE otherwise

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GUnixCredentialsMessage

-
typedef struct _GUnixCredentialsMessage GUnixCredentialsMessage;
-

The GUnixCredentialsMessage structure contains only private data -and should only be accessed using the provided API.

-

Since: 2.26

-
-
-
-

struct GUnixCredentialsMessageClass

-
struct GUnixCredentialsMessageClass {
-  GSocketControlMessageClass parent_class;
-};
-
-

Class structure for GUnixCredentialsMessage.

-

Since: 2.26

-
-
-
-

Property Details

-
-

The “credentials” property

-
  “credentials”              GCredentials *
-

The credentials stored in the message.

-

Flags: Read / Write / Construct Only

-

Since: 2.26

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GUnixFDList.html b/docs/reference/gio/html/GUnixFDList.html deleted file mode 100644 index fe99a4867..000000000 --- a/docs/reference/gio/html/GUnixFDList.html +++ /dev/null @@ -1,451 +0,0 @@ - - - - -GUnixFDList: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GUnixFDList

-

GUnixFDList — An object containing a set of UNIX file descriptors

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GUnixFDList * - -g_unix_fd_list_new_from_array () -
-GUnixFDList * - -g_unix_fd_list_new () -
-gint - -g_unix_fd_list_get_length () -
-gint - -g_unix_fd_list_get () -
const gint * - -g_unix_fd_list_peek_fds () -
-gint * - -g_unix_fd_list_steal_fds () -
-gint - -g_unix_fd_list_append () -
-
-
-

Types and Values

-
---- - - - - -
 GUnixFDList
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GUnixFDList
-
-
-
-

Includes

-
#include <gio/gunixfdlist.h>
-
-
-
-

Description

-

A GUnixFDList contains a list of file descriptors. It owns the file -descriptors that it contains, closing them when finalized.

-

It may be wrapped in a GUnixFDMessage and sent over a GSocket in -the G_SOCKET_ADDRESS_UNIX family by using g_socket_send_message() -and received using g_socket_receive_message().

-

Note that <gio/gunixfdlist.h> belongs to the UNIX-specific GIO -interfaces, thus you have to use the gio-unix-2.0.pc pkg-config -file when using it.

-
-
-

Functions

-
-

g_unix_fd_list_new_from_array ()

-
GUnixFDList *
-g_unix_fd_list_new_from_array (const gint *fds,
-                               gint n_fds);
-

Creates a new GUnixFDList containing the file descriptors given in -fds -. The file descriptors become the property of the new list and -may no longer be used by the caller. The array itself is owned by -the caller.

-

Each file descriptor in the array should be set to close-on-exec.

-

If n_fds - is -1 then fds - must be terminated with -1.

-
-

Parameters

-
----- - - - - - - - - - - - - -

fds

the initial list of file descriptors.

[array length=n_fds]

n_fds

the length of fds, or -1

 
-
-
-

Returns

-

a new GUnixFDList

-
-

Since: 2.24

-
-
-
-

g_unix_fd_list_new ()

-
GUnixFDList *
-g_unix_fd_list_new (void);
-

Creates a new GUnixFDList containing no file descriptors.

-
-

Returns

-

a new GUnixFDList

-
-

Since: 2.24

-
-
-
-

g_unix_fd_list_get_length ()

-
gint
-g_unix_fd_list_get_length (GUnixFDList *list);
-

Gets the length of list - (ie: the number of file descriptors -contained within).

-
-

Parameters

-
----- - - - - - -

list

a GUnixFDList

 
-
-
-

Returns

-

the length of list -

-
-

Since: 2.24

-
-
-
-

g_unix_fd_list_get ()

-
gint
-g_unix_fd_list_get (GUnixFDList *list,
-                    gint index_,
-                    GError **error);
-

Gets a file descriptor out of list -.

-

index_ - specifies the index of the file descriptor to get. It is a -programmer error for index_ - to be out of range; see -g_unix_fd_list_get_length().

-

The file descriptor is duplicated using dup() and set as -close-on-exec before being returned. You must call close() on it -when you are done.

-

A possible cause of failure is exceeding the per-process or -system-wide file descriptor limit.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

list

a GUnixFDList

 

index_

the index into the list

 

error

a GError pointer

 
-
-
-

Returns

-

the file descriptor, or -1 in case of error

-
-

Since: 2.24

-
-
-
-

g_unix_fd_list_peek_fds ()

-
const gint *
-g_unix_fd_list_peek_fds (GUnixFDList *list,
-                         gint *length);
-

Returns the array of file descriptors that is contained in this -object.

-

After this call, the descriptors remain the property of list -. The -caller must not close them and must not free the array. The array is -valid only until list - is changed in any way.

-

If length - is non-NULL then it is set to the number of file -descriptors in the returned array. The returned array is also -terminated with -1.

-

This function never returns NULL. In case there are no file -descriptors contained in list -, an empty array is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GUnixFDList

 

length

pointer to the length of the returned -array, or NULL.

[out][optional]
-
-
-

Returns

-

an array of file -descriptors.

-

[array length=length][transfer none]

-
-

Since: 2.24

-
-
-
-

g_unix_fd_list_steal_fds ()

-
gint *
-g_unix_fd_list_steal_fds (GUnixFDList *list,
-                          gint *length);
-

Returns the array of file descriptors that is contained in this -object.

-

After this call, the descriptors are no longer contained in -list -. Further calls will return an empty list (unless more -descriptors have been added).

-

The return result of this function must be freed with g_free(). -The caller is also responsible for closing all of the file -descriptors. The file descriptors in the array are set to -close-on-exec.

-

If length - is non-NULL then it is set to the number of file -descriptors in the returned array. The returned array is also -terminated with -1.

-

This function never returns NULL. In case there are no file -descriptors contained in list -, an empty array is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GUnixFDList

 

length

pointer to the length of the returned -array, or NULL.

[out][optional]
-
-
-

Returns

-

an array of file -descriptors.

-

[array length=length][transfer full]

-
-

Since: 2.24

-
-
-
-

g_unix_fd_list_append ()

-
gint
-g_unix_fd_list_append (GUnixFDList *list,
-                       gint fd,
-                       GError **error);
-

Adds a file descriptor to list -.

-

The file descriptor is duplicated using dup(). You keep your copy -of the descriptor and the copy contained in list - will be closed -when list - is finalized.

-

A possible cause of failure is exceeding the per-process or -system-wide file descriptor limit.

-

The index of the file descriptor in the list is returned. If you use -this index with g_unix_fd_list_get() then you will receive back a -duplicated copy of the same file descriptor.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

list

a GUnixFDList

 

fd

a valid open file descriptor

 

error

a GError pointer

 
-
-
-

Returns

-

the index of the appended fd in case of success, else -1 -(and error -is set)

-
-

Since: 2.24

-
-
-
-

Types and Values

-
-

GUnixFDList

-
typedef struct _GUnixFDList GUnixFDList;
-

GUnixFDList is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

See Also

-

GUnixFDMessage

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GUnixFDMessage.html b/docs/reference/gio/html/GUnixFDMessage.html deleted file mode 100644 index 36f08e37d..000000000 --- a/docs/reference/gio/html/GUnixFDMessage.html +++ /dev/null @@ -1,347 +0,0 @@ - - - - -GUnixFDMessage: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GUnixFDMessage

-

GUnixFDMessage — A GSocketControlMessage containing a GUnixFDList

-
-
-

Functions

- -
-
-

Properties

-
----- - - - - - -
-GUnixFDList *fd-listRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
structGUnixFDMessage
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSocketControlMessage
-        ╰── GUnixFDMessage
-
-
-
-

Includes

-
#include <gio/gunixfdmessage.h>
-
-
-
-

Description

-

This GSocketControlMessage contains a GUnixFDList. -It may be sent using g_socket_send_message() and received using -g_socket_receive_message() over UNIX sockets (ie: sockets in the -G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied -between processes by the kernel.

-

For an easier way to send and receive file descriptors over -stream-oriented UNIX sockets, see g_unix_connection_send_fd() and -g_unix_connection_receive_fd().

-

Note that <gio/gunixfdmessage.h> belongs to the UNIX-specific GIO -interfaces, thus you have to use the gio-unix-2.0.pc pkg-config -file when using it.

-
-
-

Functions

-
-

g_unix_fd_message_new_with_fd_list ()

-
GSocketControlMessage *
-g_unix_fd_message_new_with_fd_list (GUnixFDList *fd_list);
-

Creates a new GUnixFDMessage containing list -.

-
-

Parameters

-
----- - - - - - -

fd_list

a GUnixFDList

 
-
-
-

Returns

-

a new GUnixFDMessage

-
-

Since: 2.24

-
-
-
-

g_unix_fd_message_new ()

-
GSocketControlMessage *
-g_unix_fd_message_new (void);
-

Creates a new GUnixFDMessage containing an empty file descriptor -list.

-
-

Returns

-

a new GUnixFDMessage

-
-

Since: 2.22

-
-
-
-

g_unix_fd_message_get_fd_list ()

-
GUnixFDList *
-g_unix_fd_message_get_fd_list (GUnixFDMessage *message);
-

Gets the GUnixFDList contained in message -. This function does not -return a reference to the caller, but the returned list is valid for -the lifetime of message -.

-
-

Parameters

-
----- - - - - - -

message

a GUnixFDMessage

 
-
-
-

Returns

-

the GUnixFDList from message -.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_unix_fd_message_append_fd ()

-
gboolean
-g_unix_fd_message_append_fd (GUnixFDMessage *message,
-                             gint fd,
-                             GError **error);
-

Adds a file descriptor to message -.

-

The file descriptor is duplicated using dup(). You keep your copy -of the descriptor and the copy contained in message - will be closed -when message - is finalized.

-

A possible cause of failure is exceeding the per-process or -system-wide file descriptor limit.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

message

a GUnixFDMessage

 

fd

a valid open file descriptor

 

error

a GError pointer

 
-
-
-

Returns

-

TRUE in case of success, else FALSE (and error -is set)

-
-

Since: 2.22

-
-
-
-

g_unix_fd_message_steal_fds ()

-
gint *
-g_unix_fd_message_steal_fds (GUnixFDMessage *message,
-                             gint *length);
-

Returns the array of file descriptors that is contained in this -object.

-

After this call, the descriptors are no longer contained in -message -. Further calls will return an empty list (unless more -descriptors have been added).

-

The return result of this function must be freed with g_free(). -The caller is also responsible for closing all of the file -descriptors.

-

If length - is non-NULL then it is set to the number of file -descriptors in the returned array. The returned array is also -terminated with -1.

-

This function never returns NULL. In case there are no file -descriptors contained in message -, an empty array is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

message

a GUnixFDMessage

 

length

pointer to the length of the returned -array, or NULL.

[out][optional]
-
-
-

Returns

-

an array of file -descriptors.

-

[array length=length][transfer full]

-
-

Since: 2.22

-
-
-
-

Types and Values

-
-

struct GUnixFDMessage

-
struct GUnixFDMessage;
-

GUnixFDMessage is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

Property Details

-
-

The “fd-list” property

-
  “fd-list”                  GUnixFDList *
-

The GUnixFDList object to send with the message.

-

Flags: Read / Write / Construct Only

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GUnixInputStream.html b/docs/reference/gio/html/GUnixInputStream.html deleted file mode 100644 index 72c31e65f..000000000 --- a/docs/reference/gio/html/GUnixInputStream.html +++ /dev/null @@ -1,310 +0,0 @@ - - - - -GUnixInputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GUnixInputStream

-

GUnixInputStream — Streaming input operations for UNIX file descriptors

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
-GInputStream * - -g_unix_input_stream_new () -
-void - -g_unix_input_stream_set_close_fd () -
-gboolean - -g_unix_input_stream_get_close_fd () -
-gint - -g_unix_input_stream_get_fd () -
-
-
-

Properties

-
----- - - - - - - - - - - - - -
gbooleanclose-fdRead / Write
gintfdRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
structGUnixInputStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GInputStream
-        ╰── GUnixInputStream
-
-
-
-

Implemented Interfaces

-

-GUnixInputStream implements - GPollableInputStream and GFileDescriptorBased.

-
-
-

Includes

-
#include <gio/gunixinputstream.h>
-
-
-
-

Description

-

GUnixInputStream implements GInputStream for reading from a UNIX -file descriptor, including asynchronous operations. (If the file -descriptor refers to a socket or pipe, this will use poll() to do -asynchronous I/O. If it refers to a regular file, it will fall back -to doing asynchronous I/O in another thread.)

-

Note that <gio/gunixinputstream.h> belongs to the UNIX-specific GIO -interfaces, thus you have to use the gio-unix-2.0.pc pkg-config -file when using it.

-
-
-

Functions

-
-

g_unix_input_stream_new ()

-
GInputStream *
-g_unix_input_stream_new (gint fd,
-                         gboolean close_fd);
-

Creates a new GUnixInputStream for the given fd -.

-

If close_fd - is TRUE, the file descriptor will be closed -when the stream is closed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

fd

a UNIX file descriptor

 

close_fd

TRUE to close the file descriptor when done

 
-
-
-

Returns

-

a new GUnixInputStream

-
-
-
-
-

g_unix_input_stream_set_close_fd ()

-
void
-g_unix_input_stream_set_close_fd (GUnixInputStream *stream,
-                                  gboolean close_fd);
-

Sets whether the file descriptor of stream - shall be closed -when the stream is closed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GUnixInputStream

 

close_fd

TRUE to close the file descriptor when done

 
-
-

Since: 2.20

-
-
-
-

g_unix_input_stream_get_close_fd ()

-
gboolean
-g_unix_input_stream_get_close_fd (GUnixInputStream *stream);
-

Returns whether the file descriptor of stream - will be -closed when the stream is closed.

-
-

Parameters

-
----- - - - - - -

stream

a GUnixInputStream

 
-
-
-

Returns

-

TRUE if the file descriptor is closed when done

-
-

Since: 2.20

-
-
-
-

g_unix_input_stream_get_fd ()

-
gint
-g_unix_input_stream_get_fd (GUnixInputStream *stream);
-

Return the UNIX file descriptor that the stream reads from.

-
-

Parameters

-
----- - - - - - -

stream

a GUnixInputStream

 
-
-
-

Returns

-

The file descriptor of stream -

-
-

Since: 2.20

-
-
-
-

Types and Values

-
-

struct GUnixInputStream

-
struct GUnixInputStream;
-

Implements GInputStream for reading from selectable unix file descriptors

-
-
-
-

Property Details

-
-

The “close-fd” property

-
  “close-fd”                 gboolean
-

Whether to close the file descriptor when the stream is closed.

-

Flags: Read / Write

-

Default value: TRUE

-

Since: 2.20

-
-
-
-

The “fd” property

-
  “fd”                       gint
-

The file descriptor that the stream reads from.

-

Flags: Read / Write / Construct Only

-

Default value: -1

-

Since: 2.20

-
-
-
-

See Also

-

GInputStream

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GUnixOutputStream.html b/docs/reference/gio/html/GUnixOutputStream.html deleted file mode 100644 index 4f420ed62..000000000 --- a/docs/reference/gio/html/GUnixOutputStream.html +++ /dev/null @@ -1,310 +0,0 @@ - - - - -GUnixOutputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GUnixOutputStream

-

GUnixOutputStream — Streaming output operations for UNIX file descriptors

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
-GOutputStream * - -g_unix_output_stream_new () -
-void - -g_unix_output_stream_set_close_fd () -
-gboolean - -g_unix_output_stream_get_close_fd () -
-gint - -g_unix_output_stream_get_fd () -
-
-
-

Properties

-
----- - - - - - - - - - - - - -
gbooleanclose-fdRead / Write
gintfdRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
structGUnixOutputStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GOutputStream
-        ╰── GUnixOutputStream
-
-
-
-

Implemented Interfaces

-

-GUnixOutputStream implements - GPollableOutputStream and GFileDescriptorBased.

-
-
-

Includes

-
#include <gio/gunixoutputstream.h>
-
-
-
-

Description

-

GUnixOutputStream implements GOutputStream for writing to a UNIX -file descriptor, including asynchronous operations. (If the file -descriptor refers to a socket or pipe, this will use poll() to do -asynchronous I/O. If it refers to a regular file, it will fall back -to doing asynchronous I/O in another thread.)

-

Note that <gio/gunixoutputstream.h> belongs to the UNIX-specific GIO -interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file -when using it.

-
-
-

Functions

-
-

g_unix_output_stream_new ()

-
GOutputStream *
-g_unix_output_stream_new (gint fd,
-                          gboolean close_fd);
-

Creates a new GUnixOutputStream for the given fd -.

-

If close_fd -, is TRUE, the file descriptor will be closed when -the output stream is destroyed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

fd

a UNIX file descriptor

 

close_fd

TRUE to close the file descriptor when done

 
-
-
-

Returns

-

a new GOutputStream

-
-
-
-
-

g_unix_output_stream_set_close_fd ()

-
void
-g_unix_output_stream_set_close_fd (GUnixOutputStream *stream,
-                                   gboolean close_fd);
-

Sets whether the file descriptor of stream - shall be closed -when the stream is closed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GUnixOutputStream

 

close_fd

TRUE to close the file descriptor when done

 
-
-

Since: 2.20

-
-
-
-

g_unix_output_stream_get_close_fd ()

-
gboolean
-g_unix_output_stream_get_close_fd (GUnixOutputStream *stream);
-

Returns whether the file descriptor of stream - will be -closed when the stream is closed.

-
-

Parameters

-
----- - - - - - -

stream

a GUnixOutputStream

 
-
-
-

Returns

-

TRUE if the file descriptor is closed when done

-
-

Since: 2.20

-
-
-
-

g_unix_output_stream_get_fd ()

-
gint
-g_unix_output_stream_get_fd (GUnixOutputStream *stream);
-

Return the UNIX file descriptor that the stream writes to.

-
-

Parameters

-
----- - - - - - -

stream

a GUnixOutputStream

 
-
-
-

Returns

-

The file descriptor of stream -

-
-

Since: 2.20

-
-
-
-

Types and Values

-
-

struct GUnixOutputStream

-
struct GUnixOutputStream;
-

Implements GOutputStream for outputting to selectable unix file descriptors

-
-
-
-

Property Details

-
-

The “close-fd” property

-
  “close-fd”                 gboolean
-

Whether to close the file descriptor when the stream is closed.

-

Flags: Read / Write

-

Default value: TRUE

-

Since: 2.20

-
-
-
-

The “fd” property

-
  “fd”                       gint
-

The file descriptor that the stream writes to.

-

Flags: Read / Write / Construct Only

-

Default value: -1

-

Since: 2.20

-
-
-
-

See Also

-

GOutputStream

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GUnixSocketAddress.html b/docs/reference/gio/html/GUnixSocketAddress.html deleted file mode 100644 index ffcb03232..000000000 --- a/docs/reference/gio/html/GUnixSocketAddress.html +++ /dev/null @@ -1,608 +0,0 @@ - - - - -GUnixSocketAddress: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GUnixSocketAddress

-

GUnixSocketAddress — UNIX GSocketAddress

-
- -
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - -
gbooleanabstractRead / Write / Construct Only
GUnixSocketAddressTypeaddress-typeRead / Write / Construct Only
-gchar *pathRead / Write / Construct Only
-GByteArray *path-as-arrayRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - - - - - - - -
structGUnixSocketAddress
enumGUnixSocketAddressType
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GSocketAddress
-        ╰── GUnixSocketAddress
-
-
-
-

Implemented Interfaces

-

-GUnixSocketAddress implements - GSocketConnectable.

-
-
-

Includes

-
#include <gio/gunixsocketaddress.h>
-
-
-
-

Description

-

Support for UNIX-domain (also known as local) sockets.

-

UNIX domain sockets are generally visible in the filesystem. -However, some systems support abstract socket names which are not -visible in the filesystem and not affected by the filesystem -permissions, visibility, etc. Currently this is only supported -under Linux. If you attempt to use abstract sockets on other -systems, function calls may return G_IO_ERROR_NOT_SUPPORTED -errors. You can use g_unix_socket_address_abstract_names_supported() -to see if abstract names are supported.

-

Note that <gio/gunixsocketaddress.h> belongs to the UNIX-specific GIO -interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file -when using it.

-
-
-

Functions

-
-

g_unix_socket_address_new ()

-
GSocketAddress *
-g_unix_socket_address_new (const gchar *path);
-

Creates a new GUnixSocketAddress for path -.

-

To create abstract socket addresses, on systems that support that, -use g_unix_socket_address_new_abstract().

-
-

Parameters

-
----- - - - - - -

path

the socket path

 
-
-
-

Returns

-

a new GUnixSocketAddress

-
-

Since: 2.22

-
-
-
-

g_unix_socket_address_new_abstract ()

-
GSocketAddress *
-g_unix_socket_address_new_abstract (const gchar *path,
-                                    gint path_len);
-
-

g_unix_socket_address_new_abstract is deprecated and should not be used in newly-written code.

-

Use g_unix_socket_address_new_with_type().

-
-

Creates a new G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED -GUnixSocketAddress for path -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

path

the abstract name.

[array length=path_len][element-type gchar]

path_len

the length of path -, or -1

 
-
-
-

Returns

-

a new GUnixSocketAddress

-
-
-
-
-

g_unix_socket_address_new_with_type ()

-
GSocketAddress *
-g_unix_socket_address_new_with_type (const gchar *path,
-                                     gint path_len,
-                                     GUnixSocketAddressType type);
-

Creates a new GUnixSocketAddress of type type - with name path -.

-

If type - is G_UNIX_SOCKET_ADDRESS_PATH, this is equivalent to -calling g_unix_socket_address_new().

-

If type - is G_UNIX_SOCKET_ADDRESS_ANONYMOUS, path - and path_len - will be -ignored.

-

If path_type - is G_UNIX_SOCKET_ADDRESS_ABSTRACT, then path_len - -bytes of path - will be copied to the socket's path, and only those -bytes will be considered part of the name. (If path_len - is -1, -then path - is assumed to be NUL-terminated.) For example, if path - -was "test", then calling g_socket_address_get_native_size() on the -returned socket would return 7 (2 bytes of overhead, 1 byte for the -abstract-socket indicator byte, and 4 bytes for the name "test").

-

If path_type - is G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED, then -path_len - bytes of path - will be copied to the socket's path, the -rest of the path will be padded with 0 bytes, and the entire -zero-padded buffer will be considered the name. (As above, if -path_len - is -1, then path - is assumed to be NUL-terminated.) In -this case, g_socket_address_get_native_size() will always return -the full size of a struct sockaddr_un, although -g_unix_socket_address_get_path_len() will still return just the -length of path -.

-

G_UNIX_SOCKET_ADDRESS_ABSTRACT is preferred over -G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED for new programs. Of course, -when connecting to a server created by another process, you must -use the appropriate type corresponding to how that process created -its listening socket.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

path

the name.

[array length=path_len][element-type gchar]

path_len

the length of path -, or -1

 

type

a GUnixSocketAddressType

 
-
-
-

Returns

-

a new GUnixSocketAddress

-
-

Since: 2.26

-
-
-
-

g_unix_socket_address_get_is_abstract ()

-
gboolean
-g_unix_socket_address_get_is_abstract (GUnixSocketAddress *address);
-
-

g_unix_socket_address_get_is_abstract is deprecated and should not be used in newly-written code.

-

Use g_unix_socket_address_get_address_type()

-
-

Tests if address - is abstract.

-
-

Parameters

-
----- - - - - - -

address

a GInetSocketAddress

 
-
-
-

Returns

-

TRUE if the address is abstract, FALSE otherwise

-
-

Since: 2.22

-
-
-
-

g_unix_socket_address_get_address_type ()

-
GUnixSocketAddressType
-g_unix_socket_address_get_address_type
-                               (GUnixSocketAddress *address);
-

Gets address -'s type.

-
-

Parameters

-
----- - - - - - -

address

a GInetSocketAddress

 
-
-
-

Returns

-

a GUnixSocketAddressType

-
-

Since: 2.26

-
-
-
-

g_unix_socket_address_get_path ()

-
const char *
-g_unix_socket_address_get_path (GUnixSocketAddress *address);
-

Gets address -'s path, or for abstract sockets the "name".

-

Guaranteed to be zero-terminated, but an abstract socket -may contain embedded zeros, and thus you should use -g_unix_socket_address_get_path_len() to get the true length -of this string.

-
-

Parameters

-
----- - - - - - -

address

a GInetSocketAddress

 
-
-
-

Returns

-

the path for address -

-
-

Since: 2.22

-
-
-
-

g_unix_socket_address_get_path_len ()

-
gsize
-g_unix_socket_address_get_path_len (GUnixSocketAddress *address);
-

Gets the length of address -'s path.

-

For details, see g_unix_socket_address_get_path().

-
-

Parameters

-
----- - - - - - -

address

a GInetSocketAddress

 
-
-
-

Returns

-

the length of the path

-
-

Since: 2.22

-
-
-
-

g_unix_socket_address_abstract_names_supported ()

-
gboolean
-g_unix_socket_address_abstract_names_supported
-                               (void);
-

Checks if abstract UNIX domain socket names are supported.

-
-

Returns

-

TRUE if supported, FALSE otherwise

-
-

Since: 2.22

-
-
-
-

Types and Values

-
-

struct GUnixSocketAddress

-
struct GUnixSocketAddress;
-

A UNIX-domain (local) socket address, corresponding to a -struct sockaddr_un.

-
-
-
-

enum GUnixSocketAddressType

-

The type of name used by a GUnixSocketAddress. -G_UNIX_SOCKET_ADDRESS_PATH indicates a traditional unix domain -socket bound to a filesystem path. G_UNIX_SOCKET_ADDRESS_ANONYMOUS -indicates a socket not bound to any name (eg, a client-side socket, -or a socket created with socketpair()).

-

For abstract sockets, there are two incompatible ways of naming -them; the man pages suggest using the entire struct sockaddr_un -as the name, padding the unused parts of the sun_path field with -zeroes; this corresponds to G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED. -However, many programs instead just use a portion of sun_path, and -pass an appropriate smaller length to bind() or connect(). This is -G_UNIX_SOCKET_ADDRESS_ABSTRACT.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_UNIX_SOCKET_ADDRESS_INVALID

-

invalid

-
 

G_UNIX_SOCKET_ADDRESS_ANONYMOUS

-

anonymous

-
 

G_UNIX_SOCKET_ADDRESS_PATH

-

a filesystem path

-
 

G_UNIX_SOCKET_ADDRESS_ABSTRACT

-

an abstract name

-
 

G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED

-

an abstract name, 0-padded - to the full length of a unix socket name

-
 
-
-

Since: 2.26

-
-
-
-

Property Details

-
-

The “abstract” property

-
  “abstract”                 gboolean
-

Whether or not this is an abstract address

-
-

GUnixSocketAddress:abstract is deprecated and should not be used in newly-written code.

-

Use “address-type”, which -distinguishes between zero-padded and non-zero-padded -abstract addresses.

-
-

Flags: Read / Write / Construct Only

-

Default value: FALSE

-
-
-
-

The “address-type” property

-
  “address-type”             GUnixSocketAddressType
-

The type of UNIX socket address.

-

Flags: Read / Write / Construct Only

-

Default value: G_UNIX_SOCKET_ADDRESS_PATH

-
-
-
-

The “path” property

-
  “path”                     gchar *
-

UNIX socket path.

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
-

The “path-as-array” property

-
  “path-as-array”            GByteArray *
-

UNIX socket path, as byte array.

-

Flags: Read / Write / Construct Only

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GVfs.html b/docs/reference/gio/html/GVfs.html deleted file mode 100644 index 0916d8cf4..000000000 --- a/docs/reference/gio/html/GVfs.html +++ /dev/null @@ -1,578 +0,0 @@ - - - - -GVfs: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GVfs

-

GVfs — Virtual File System

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GFile * - -(*GVfsFileLookupFunc) () -
-GFile * - -g_vfs_get_file_for_path () -
-GFile * - -g_vfs_get_file_for_uri () -
-GFile * - -g_vfs_parse_name () -
-GVfs * - -g_vfs_get_default () -
-GVfs * - -g_vfs_get_local () -
-gboolean - -g_vfs_is_active () -
const gchar * const * - -g_vfs_get_supported_uri_schemes () -
-gboolean - -g_vfs_register_uri_scheme () -
-gboolean - -g_vfs_unregister_uri_scheme () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GVfs
#defineG_VFS_EXTENSION_POINT_NAME
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GVfs
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Entry point for using GIO functionality.

-
-
-

Functions

-
-

GVfsFileLookupFunc ()

-
GFile *
-(*GVfsFileLookupFunc) (GVfs *vfs,
-                       const char *identifier,
-                       gpointer user_data);
-

This function type is used by g_vfs_register_uri_scheme() to make it -possible for a client to associate an URI scheme to a different GFile -implementation.

-

The client should return a reference to the new file that has been -created for uri -, or NULL to continue with the default implementation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

vfs

a GVfs

 

identifier

the identifier to lookup a GFile for. This can either -be an URI or a parse name as returned by g_file_get_parse_name()

 

user_data

user data passed to the function

 
-
-
-

Returns

-

a GFile for identifier -.

-

[transfer full]

-
-

Since: 2.50

-
-
-
-

g_vfs_get_file_for_path ()

-
GFile *
-g_vfs_get_file_for_path (GVfs *vfs,
-                         const char *path);
-

Gets a GFile for path -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

vfs

a GVfs.

 

path

a string containing a VFS path.

 
-
-
-

Returns

-

a GFile. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_vfs_get_file_for_uri ()

-
GFile *
-g_vfs_get_file_for_uri (GVfs *vfs,
-                        const char *uri);
-

Gets a GFile for uri -.

-

This operation never fails, but the returned object -might not support any I/O operation if the URI -is malformed or if the URI scheme is not supported.

-
-

Parameters

-
----- - - - - - - - - - - - - -

vfs

aGVfs.

 

uri

a string containing a URI

 
-
-
-

Returns

-

a GFile. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_vfs_parse_name ()

-
GFile *
-g_vfs_parse_name (GVfs *vfs,
-                  const char *parse_name);
-

This operation never fails, but the returned object might -not support any I/O operations if the parse_name - cannot -be parsed by the GVfs module.

-
-

Parameters

-
----- - - - - - - - - - - - - -

vfs

a GVfs.

 

parse_name

a string to be parsed by the VFS module.

 
-
-
-

Returns

-

a GFile for the given parse_name -. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_vfs_get_default ()

-
GVfs *
-g_vfs_get_default (void);
-

Gets the default GVfs for the system.

-
-

Returns

-

a GVfs.

-

[transfer none]

-
-
-
-
-

g_vfs_get_local ()

-
GVfs *
-g_vfs_get_local (void);
-

Gets the local GVfs for the system.

-
-

Returns

-

a GVfs.

-

[transfer none]

-
-
-
-
-

g_vfs_is_active ()

-
gboolean
-g_vfs_is_active (GVfs *vfs);
-

Checks if the VFS is active.

-
-

Parameters

-
----- - - - - - -

vfs

a GVfs.

 
-
-
-

Returns

-

TRUE if construction of the vfs -was successful -and it is now active.

-
-
-
-
-

g_vfs_get_supported_uri_schemes ()

-
const gchar * const *
-g_vfs_get_supported_uri_schemes (GVfs *vfs);
-

Gets a list of URI schemes supported by vfs -.

-
-

Parameters

-
----- - - - - - -

vfs

a GVfs.

 
-
-
-

Returns

-

a NULL-terminated array of strings. -The returned array belongs to GIO and must -not be freed or modified.

-

[transfer none]

-
-
-
-
-

g_vfs_register_uri_scheme ()

-
gboolean
-g_vfs_register_uri_scheme (GVfs *vfs,
-                           const char *scheme,
-                           GVfsFileLookupFunc uri_func,
-                           gpointer uri_data,
-                           GDestroyNotify uri_destroy,
-                           GVfsFileLookupFunc parse_name_func,
-                           gpointer parse_name_data,
-                           GDestroyNotify parse_name_destroy);
-

Registers uri_func - and parse_name_func - as the GFile URI and parse name -lookup functions for URIs with a scheme matching scheme -. -Note that scheme - is registered only within the running application, as -opposed to desktop-wide as it happens with GVfs backends.

-

When a GFile is requested with an URI containing scheme - (e.g. through -g_file_new_for_uri()), uri_func - will be called to allow a custom -constructor. The implementation of uri_func - should not be blocking, and -must not call g_vfs_register_uri_scheme() or g_vfs_unregister_uri_scheme().

-

When g_file_parse_name() is called with a parse name obtained from such file, -parse_name_func - will be called to allow the GFile to be created again. In -that case, it's responsibility of parse_name_func - to make sure the parse -name matches what the custom GFile implementation returned when -g_file_get_parse_name() was previously called. The implementation of -parse_name_func - should not be blocking, and must not call -g_vfs_register_uri_scheme() or g_vfs_unregister_uri_scheme().

-

It's an error to call this function twice with the same scheme. To unregister -a custom URI scheme, use g_vfs_unregister_uri_scheme().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

vfs

a GVfs

 

scheme

an URI scheme, e.g. "http"

 

uri_func

a GVfsFileLookupFunc.

[scope notified][nullable]

uri_data

custom data passed to be passed to uri_func -, or NULL.

[nullable]

uri_destroy

function to be called when unregistering the -URI scheme, or when vfs -is disposed, to free the resources used -by the URI lookup function.

[nullable]

parse_name_func

a GVfsFileLookupFunc.

[scope notified][nullable]

parse_name_data

custom data passed to be passed to -parse_name_func -, or NULL.

[nullable]

parse_name_destroy

function to be called when unregistering the -URI scheme, or when vfs -is disposed, to free the resources used -by the parse name lookup function.

[nullable]
-
-
-

Returns

-

TRUE if scheme -was successfully registered, or FALSE if a handler -for scheme -already exists.

-
-

Since: 2.50

-
-
-
-

g_vfs_unregister_uri_scheme ()

-
gboolean
-g_vfs_unregister_uri_scheme (GVfs *vfs,
-                             const char *scheme);
-

Unregisters the URI handler for scheme - previously registered with -g_vfs_register_uri_scheme().

-
-

Parameters

-
----- - - - - - - - - - - - - -

vfs

a GVfs

 

scheme

an URI scheme, e.g. "http"

 
-
-
-

Returns

-

TRUE if scheme -was successfully unregistered, or FALSE if a -handler for scheme -does not exist.

-
-

Since: 2.50

-
-
-
-

Types and Values

-
-

GVfs

-
typedef struct _GVfs GVfs;
-

Virtual File System object.

-
-
-
-

G_VFS_EXTENSION_POINT_NAME

-
#define G_VFS_EXTENSION_POINT_NAME "gio-vfs"
-
-

Extension point for GVfs functionality. -See Extending GIO.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GVolume.html b/docs/reference/gio/html/GVolume.html deleted file mode 100644 index f21fcc8cf..000000000 --- a/docs/reference/gio/html/GVolume.html +++ /dev/null @@ -1,1375 +0,0 @@ - - - - -GVolume: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GVolume

-

GVolume — Volume management

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-char * - -g_volume_get_name () -
-char * - -g_volume_get_uuid () -
-GIcon * - -g_volume_get_icon () -
-GIcon * - -g_volume_get_symbolic_icon () -
-GDrive * - -g_volume_get_drive () -
-GMount * - -g_volume_get_mount () -
-gboolean - -g_volume_can_mount () -
-gboolean - -g_volume_should_automount () -
-GFile * - -g_volume_get_activation_root () -
-void - -g_volume_mount () -
-gboolean - -g_volume_mount_finish () -
-gboolean - -g_volume_can_eject () -
-void - -g_volume_eject () -
-gboolean - -g_volume_eject_finish () -
-void - -g_volume_eject_with_operation () -
-gboolean - -g_volume_eject_with_operation_finish () -
-char ** - -g_volume_enumerate_identifiers () -
-char * - -g_volume_get_identifier () -
const gchar * - -g_volume_get_sort_key () -
-
-
-

Signals

-
----- - - - - - - - - - - - - -
voidchangedRun Last
voidremovedRun Last
-
-
-

Types and Values

- -
-
-

Object Hierarchy

-
    GInterface
-    ╰── GVolume
-
-
-
-

Prerequisites

-

-GVolume requires - GObject.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

The GVolume interface represents user-visible objects that can be -mounted. Note, when porting from GnomeVFS, GVolume is the moral -equivalent of GnomeVFSDrive.

-

Mounting a GVolume instance is an asynchronous operation. For more -information about asynchronous operations, see GAsyncResult and -GTask. To mount a GVolume, first call g_volume_mount() with (at -least) the GVolume instance, optionally a GMountOperation object -and a GAsyncReadyCallback.

-

Typically, one will only want to pass NULL for the -GMountOperation if automounting all volumes when a desktop session -starts since it's not desirable to put up a lot of dialogs asking -for credentials.

-

The callback will be fired when the operation has resolved (either -with success or failure), and a GAsyncReady structure will be -passed to the callback. That callback should then call -g_volume_mount_finish() with the GVolume instance and the -GAsyncReady data to see if the operation was completed -successfully. If an error - is present when g_volume_mount_finish() -is called, then it will be filled with any error information.

-
-

Volume Identifiers

-

It is sometimes necessary to directly access the underlying -operating system object behind a volume (e.g. for passing a volume -to an application via the commandline). For this purpose, GIO -allows to obtain an 'identifier' for the volume. There can be -different kinds of identifiers, such as Hal UDIs, filesystem labels, -traditional Unix devices (e.g. /dev/sda2), UUIDs. GIO uses predefined -strings as names for the different kinds of identifiers: -G_VOLUME_IDENTIFIER_KIND_HAL_UDI, G_VOLUME_IDENTIFIER_KIND_LABEL, etc. -Use g_volume_get_identifier() to obtain an identifier for a volume.

-

Note that G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available -when the gvfs hal volume monitor is in use. Other volume monitors -will generally be able to provide the G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE -identifier, which can be used to obtain a hal device by means of -libhal_manager_find_device_string_match().

-
-
-
-

Functions

-
-

g_volume_get_name ()

-
char *
-g_volume_get_name (GVolume *volume);
-

Gets the name of volume -.

-
-

Parameters

-
----- - - - - - -

volume

a GVolume

 
-
-
-

Returns

-

the name for the given volume -. The returned string should -be freed with g_free() when no longer needed.

-
-
-
-
-

g_volume_get_uuid ()

-
char *
-g_volume_get_uuid (GVolume *volume);
-

Gets the UUID for the volume -. The reference is typically based on -the file system UUID for the volume in question and should be -considered an opaque string. Returns NULL if there is no UUID -available.

-
-

Parameters

-
----- - - - - - -

volume

a GVolume

 
-
-
-

Returns

-

the UUID for volume -or NULL if no UUID can be computed. -The returned string should be freed with g_free() -when no longer needed.

-
-
-
-
-

g_volume_get_icon ()

-
GIcon *
-g_volume_get_icon (GVolume *volume);
-

Gets the icon for volume -.

-
-

Parameters

-
----- - - - - - -

volume

a GVolume

 
-
-
-

Returns

-

a GIcon. -The returned object should be unreffed with g_object_unref() -when no longer needed.

-

[transfer full]

-
-
-
-
-

g_volume_get_symbolic_icon ()

-
GIcon *
-g_volume_get_symbolic_icon (GVolume *volume);
-

Gets the symbolic icon for volume -.

-
-

Parameters

-
----- - - - - - -

volume

a GVolume

 
-
-
-

Returns

-

a GIcon. -The returned object should be unreffed with g_object_unref() -when no longer needed.

-

[transfer full]

-
-

Since: 2.34

-
-
-
-

g_volume_get_drive ()

-
GDrive *
-g_volume_get_drive (GVolume *volume);
-

Gets the drive for the volume -.

-
-

Parameters

-
----- - - - - - -

volume

a GVolume

 
-
-
-

Returns

-

a GDrive or NULL if volume -is not -associated with a drive. The returned object should be unreffed -with g_object_unref() when no longer needed.

-

[transfer full]

-
-
-
-
-

g_volume_get_mount ()

-
GMount *
-g_volume_get_mount (GVolume *volume);
-

Gets the mount for the volume -.

-
-

Parameters

-
----- - - - - - -

volume

a GVolume

 
-
-
-

Returns

-

a GMount or NULL if volume -isn't mounted. -The returned object should be unreffed with g_object_unref() -when no longer needed.

-

[transfer full]

-
-
-
-
-

g_volume_can_mount ()

-
gboolean
-g_volume_can_mount (GVolume *volume);
-

Checks if a volume can be mounted.

-
-

Parameters

-
----- - - - - - -

volume

a GVolume

 
-
-
-

Returns

-

TRUE if the volume -can be mounted. FALSE otherwise

-
-
-
-
-

g_volume_should_automount ()

-
gboolean
-g_volume_should_automount (GVolume *volume);
-

Returns whether the volume should be automatically mounted.

-
-

Parameters

-
----- - - - - - -

volume

a GVolume

 
-
-
-

Returns

-

TRUE if the volume should be automatically mounted

-
-
-
-
-

g_volume_get_activation_root ()

-
GFile *
-g_volume_get_activation_root (GVolume *volume);
-

Gets the activation root for a GVolume if it is known ahead of -mount time. Returns NULL otherwise. If not NULL and if volume - -is mounted, then the result of g_mount_get_root() on the -GMount object obtained from g_volume_get_mount() will always -either be equal or a prefix of what this function returns. In -other words, in code

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
GMount *mount;
-GFile *mount_root
-GFile *volume_activation_root;
-
-mount = g_volume_get_mount (volume); // mounted, so never NULL
-mount_root = g_mount_get_root (mount);
-volume_activation_root = g_volume_get_activation_root (volume); // assume not NULL
-
- -

-then the expression

-
- - - - - - - -
1
-2
(g_file_has_prefix (volume_activation_root, mount_root) ||
-    g_file_equal (volume_activation_root, mount_root))
-
- -

-will always be TRUE.

-

Activation roots are typically used in GVolumeMonitor -implementations to find the underlying mount to shadow, see -g_mount_is_shadowed() for more details.

-
-

Parameters

-
----- - - - - - -

volume

a GVolume

 
-
-
-

Returns

-

the activation root of volume -or NULL. Use g_object_unref() to free.

-

[nullable][transfer full]

-
-

Since: 2.18

-
-
-
-

g_volume_mount ()

-
void
-g_volume_mount (GVolume *volume,
-                GMountMountFlags flags,
-                GMountOperation *mount_operation,
-                GCancellable *cancellable,
-                GAsyncReadyCallback callback,
-                gpointer user_data);
-

Mounts a volume. This is an asynchronous operation, and is -finished by calling g_volume_mount_finish() with the volume - -and GAsyncResult returned in the callback -.

-

Virtual: mount_fn

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

volume

a GVolume

 

flags

flags affecting the operation

 

mount_operation

a GMountOperation or NULL to avoid user interaction.

[nullable]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback, or NULL.

[nullable]

user_data

user data that gets passed to callback -

 
-
-
-
-
-

g_volume_mount_finish ()

-
gboolean
-g_volume_mount_finish (GVolume *volume,
-                       GAsyncResult *result,
-                       GError **error);
-

Finishes mounting a volume. If any errors occurred during the operation, -error - will be set to contain the errors and FALSE will be returned.

-

If the mount operation succeeded, g_volume_get_mount() on volume - -is guaranteed to return the mount right after calling this -function; there's no need to listen for the 'mount-added' signal on -GVolumeMonitor.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

volume

a GVolume

 

result

a GAsyncResult

 

error

a GError location to store an error, or NULL to ignore

 
-
-
-

Returns

-

TRUE, FALSE if operation failed

-
-
-
-
-

g_volume_can_eject ()

-
gboolean
-g_volume_can_eject (GVolume *volume);
-

Checks if a volume can be ejected.

-
-

Parameters

-
----- - - - - - -

volume

a GVolume

 
-
-
-

Returns

-

TRUE if the volume -can be ejected. FALSE otherwise

-
-
-
-
-

g_volume_eject ()

-
void
-g_volume_eject (GVolume *volume,
-                GMountUnmountFlags flags,
-                GCancellable *cancellable,
-                GAsyncReadyCallback callback,
-                gpointer user_data);
-
-

g_volume_eject has been deprecated since version 2.22 and should not be used in newly-written code.

-

Use g_volume_eject_with_operation() instead.

-
-

Ejects a volume. This is an asynchronous operation, and is -finished by calling g_volume_eject_finish() with the volume - -and GAsyncResult returned in the callback -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

volume

a GVolume

 

flags

flags affecting the unmount if required for eject

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback, or NULL.

[nullable]

user_data

user data that gets passed to callback -

 
-
-
-
-
-

g_volume_eject_finish ()

-
gboolean
-g_volume_eject_finish (GVolume *volume,
-                       GAsyncResult *result,
-                       GError **error);
-
-

g_volume_eject_finish has been deprecated since version 2.22 and should not be used in newly-written code.

-

Use g_volume_eject_with_operation_finish() instead.

-
-

Finishes ejecting a volume. If any errors occurred during the operation, -error - will be set to contain the errors and FALSE will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

volume

pointer to a GVolume

 

result

a GAsyncResult

 

error

a GError location to store an error, or NULL to ignore

 
-
-
-

Returns

-

TRUE, FALSE if operation failed

-
-
-
-
-

g_volume_eject_with_operation ()

-
void
-g_volume_eject_with_operation (GVolume *volume,
-                               GMountUnmountFlags flags,
-                               GMountOperation *mount_operation,
-                               GCancellable *cancellable,
-                               GAsyncReadyCallback callback,
-                               gpointer user_data);
-

Ejects a volume. This is an asynchronous operation, and is -finished by calling g_volume_eject_with_operation_finish() with the volume - -and GAsyncResult data returned in the callback -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

volume

a GVolume

 

flags

flags affecting the unmount if required for eject

 

mount_operation

a GMountOperation or NULL to -avoid user interaction.

[nullable]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

callback

a GAsyncReadyCallback, or NULL.

[nullable]

user_data

user data passed to callback -

 
-
-

Since: 2.22

-
-
-
-

g_volume_eject_with_operation_finish ()

-
gboolean
-g_volume_eject_with_operation_finish (GVolume *volume,
-                                      GAsyncResult *result,
-                                      GError **error);
-

Finishes ejecting a volume. If any errors occurred during the operation, -error - will be set to contain the errors and FALSE will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

volume

a GVolume

 

result

a GAsyncResult

 

error

a GError location to store the error occurring, or NULL

 
-
-
-

Returns

-

TRUE if the volume was successfully ejected. FALSE otherwise

-
-

Since: 2.22

-
-
-
-

g_volume_enumerate_identifiers ()

-
char **
-g_volume_enumerate_identifiers (GVolume *volume);
-

Gets the kinds of identifiers that volume - has. -Use g_volume_get_identifier() to obtain the identifiers themselves.

-
-

Parameters

-
----- - - - - - -

volume

a GVolume

 
-
-
-

Returns

-

a NULL-terminated array -of strings containing kinds of identifiers. Use g_strfreev() to free.

-

[array zero-terminated=1][transfer full]

-
-
-
-
-

g_volume_get_identifier ()

-
char *
-g_volume_get_identifier (GVolume *volume,
-                         const char *kind);
-

Gets the identifier of the given kind for volume -. -See the introduction for more -information about volume identifiers.

-
-

Parameters

-
----- - - - - - - - - - - - - -

volume

a GVolume

 

kind

the kind of identifier to return

 
-
-
-

Returns

-

a newly allocated string containing the -requested identfier, or NULL if the GVolume -doesn't have this kind of identifier

-
-
-
-
-

g_volume_get_sort_key ()

-
const gchar *
-g_volume_get_sort_key (GVolume *volume);
-

Gets the sort key for volume -, if any.

-
-

Parameters

-
----- - - - - - -

volume

a GVolume

 
-
-
-

Returns

-

Sorting key for volume -or NULL if no such key is available

-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

GVolume

-
typedef struct _GVolume GVolume;
-

Opaque mountable volume object.

-
-
-
-

struct GVolumeIface

-
struct GVolumeIface {
-  GTypeInterface g_iface;
-
-  /* signals */
-
-  void        (* changed)               (GVolume             *volume);
-  void        (* removed)               (GVolume             *volume);
-
-  /* Virtual Table */
-
-  char      * (* get_name)              (GVolume             *volume);
-  GIcon     * (* get_icon)              (GVolume             *volume);
-  char      * (* get_uuid)              (GVolume             *volume);
-  GDrive    * (* get_drive)             (GVolume             *volume);
-  GMount    * (* get_mount)             (GVolume             *volume);
-  gboolean    (* can_mount)             (GVolume             *volume);
-  gboolean    (* can_eject)             (GVolume             *volume);
-  void        (* mount_fn)              (GVolume             *volume,
-                                         GMountMountFlags     flags,
-                                         GMountOperation     *mount_operation,
-                                         GCancellable        *cancellable,
-                                         GAsyncReadyCallback  callback,
-                                         gpointer             user_data);
-  gboolean    (* mount_finish)          (GVolume             *volume,
-                                         GAsyncResult        *result,
-                                         GError             **error);
-  void        (* eject)                 (GVolume             *volume,
-                                         GMountUnmountFlags   flags,
-                                         GCancellable        *cancellable,
-                                         GAsyncReadyCallback  callback,
-                                         gpointer             user_data);
-  gboolean    (* eject_finish)          (GVolume             *volume,
-                                         GAsyncResult        *result,
-                                         GError             **error);
-
-  char      * (* get_identifier)        (GVolume             *volume,
-                                         const char          *kind);
-  char     ** (* enumerate_identifiers) (GVolume             *volume);
-
-  gboolean    (* should_automount)      (GVolume             *volume);
-
-  GFile     * (* get_activation_root)   (GVolume             *volume);
-
-  void        (* eject_with_operation)      (GVolume             *volume,
-                                             GMountUnmountFlags   flags,
-                                             GMountOperation     *mount_operation,
-                                             GCancellable        *cancellable,
-                                             GAsyncReadyCallback  callback,
-                                             gpointer             user_data);
-  gboolean    (* eject_with_operation_finish) (GVolume           *volume,
-                                             GAsyncResult        *result,
-                                             GError             **error);
-
-  const gchar * (* get_sort_key)        (GVolume             *volume);
-  GIcon       * (* get_symbolic_icon)   (GVolume             *volume);
-};
-
-

Interface for implementing operations for mountable volumes.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

changed ()

Changed signal that is emitted when the volume's state has changed.

 

removed ()

The removed signal that is emitted when the GVolume have been removed. If the recipient is holding references to the object they should release them so the object can be finalized.

 

get_name ()

Gets a string containing the name of the GVolume.

 

get_icon ()

Gets a GIcon for the GVolume.

 

get_uuid ()

Gets the UUID for the GVolume. The reference is typically based on the file system UUID for the mount in question and should be considered an opaque string. Returns NULL if there is no UUID available.

 

get_drive ()

Gets a GDrive the volume is located on. Returns NULL if the GVolume is not associated with a GDrive.

 

get_mount ()

Gets a GMount representing the mounted volume. Returns NULL if the GVolume is not mounted.

 

can_mount ()

Returns TRUE if the GVolume can be mounted.

 

can_eject ()

Checks if a GVolume can be ejected.

 

mount_fn ()

Mounts a given GVolume. -GVolume implementations must emit the “aborted” -signal before completing a mount operation that is aborted while -awaiting input from the user through a GMountOperation instance.

 

mount_finish ()

Finishes a mount operation.

 

eject ()

Ejects a given GVolume.

 

eject_finish ()

Finishes an eject operation.

 

get_identifier ()

Returns the identifier of the given kind, or NULL if -the GVolume doesn't have one.

 

enumerate_identifiers ()

Returns an array strings listing the kinds -of identifiers which the GVolume has.

 

should_automount ()

Returns TRUE if the GVolume should be automatically mounted.

 

get_activation_root ()

Returns the activation root for the GVolume if it is known in advance or NULL if -it is not known.

 

eject_with_operation ()

Starts ejecting a GVolume using a GMountOperation. Since 2.22.

 

eject_with_operation_finish ()

Finishes an eject operation using a GMountOperation. Since 2.22.

 

get_sort_key ()

Gets a key used for sorting GVolume instance or NULL if no such key exists. Since 2.32.

 

get_symbolic_icon ()

Gets a symbolic GIcon for the GVolume. Since 2.34.

 
-
-
-
-
-

G_VOLUME_IDENTIFIER_KIND_HAL_UDI

-
#define G_VOLUME_IDENTIFIER_KIND_HAL_UDI "hal-udi"
-
-

The string used to obtain a Hal UDI with g_volume_get_identifier().

-
-
-
-

G_VOLUME_IDENTIFIER_KIND_LABEL

-
#define G_VOLUME_IDENTIFIER_KIND_LABEL "label"
-
-

The string used to obtain a filesystem label with g_volume_get_identifier().

-
-
-
-

G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT

-
#define G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT "nfs-mount"
-
-

The string used to obtain a NFS mount with g_volume_get_identifier().

-
-
-
-

G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE

-
#define G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE "unix-device"
-
-

The string used to obtain a Unix device path with g_volume_get_identifier().

-
-
-
-

G_VOLUME_IDENTIFIER_KIND_UUID

-
#define G_VOLUME_IDENTIFIER_KIND_UUID "uuid"
-
-

The string used to obtain a UUID with g_volume_get_identifier().

-
-
-
-

G_VOLUME_IDENTIFIER_KIND_CLASS

-
#define G_VOLUME_IDENTIFIER_KIND_CLASS "class"
-
-

The string used to obtain the volume class with g_volume_get_identifier().

-

Known volume classes include device and network. Other classes may -be added in the future.

-

This is intended to be used by applications to classify GVolume -instances into different sections - for example a file manager or -file chooser can use this information to show network volumes under -a "Network" heading and device volumes under a "Devices" heading.

-
-
-
-

Signal Details

-
-

The “changed” signal

-
void
-user_function (GVolume *arg0,
-               gpointer user_data)
-

Emitted when the volume has been changed.

-
-

Parameters

-
----- - - - - - -

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “removed” signal

-
void
-user_function (GVolume *arg0,
-               gpointer user_data)
-

This signal is emitted when the GVolume have been removed. If -the recipient is holding references to the object they should -release them so the object can be finalized.

-
-

Parameters

-
----- - - - - - -

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GVolumeMonitor.html b/docs/reference/gio/html/GVolumeMonitor.html deleted file mode 100644 index 563a5d025..000000000 --- a/docs/reference/gio/html/GVolumeMonitor.html +++ /dev/null @@ -1,925 +0,0 @@ - - - - -GVolumeMonitor: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GVolumeMonitor

-

GVolumeMonitor — Volume Monitor

-
-
-

Functions

- -
-
-

Signals

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
voiddrive-changedRun Last
voiddrive-connectedRun Last
voiddrive-disconnectedRun Last
voiddrive-eject-buttonRun Last
voiddrive-stop-buttonRun Last
voidmount-addedRun Last
voidmount-changedRun Last
voidmount-pre-unmountRun Last
voidmount-removedRun Last
voidvolume-addedRun Last
voidvolume-changedRun Last
voidvolume-removedRun Last
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GVolumeMonitor
#defineG_VOLUME_MONITOR_EXTENSION_POINT_NAME
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GVolumeMonitor
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GVolumeMonitor is for listing the user interesting devices and volumes -on the computer. In other words, what a file selector or file manager -would show in a sidebar.

-

GVolumeMonitor is not -thread-default-context aware, -and so should not be used other than from the main thread, with no -thread-default-context active.

-
-
-

Functions

-
-

g_volume_monitor_get ()

-
GVolumeMonitor *
-g_volume_monitor_get (void);
-

Gets the volume monitor used by gio.

-
-

Returns

-

a reference to the GVolumeMonitor used by gio. Call -g_object_unref() when done with it.

-

[transfer full]

-
-
-
-
-

g_volume_monitor_get_connected_drives ()

-
GList *
-g_volume_monitor_get_connected_drives (GVolumeMonitor *volume_monitor);
-

Gets a list of drives connected to the system.

-

The returned list should be freed with g_list_free(), after -its elements have been unreffed with g_object_unref().

-
-

Parameters

-
----- - - - - - -

volume_monitor

a GVolumeMonitor.

 
-
-
-

Returns

-

a GList of connected GDrive objects.

-

[element-type GDrive][transfer full]

-
-
-
-
-

g_volume_monitor_get_volumes ()

-
GList *
-g_volume_monitor_get_volumes (GVolumeMonitor *volume_monitor);
-

Gets a list of the volumes on the system.

-

The returned list should be freed with g_list_free(), after -its elements have been unreffed with g_object_unref().

-
-

Parameters

-
----- - - - - - -

volume_monitor

a GVolumeMonitor.

 
-
-
-

Returns

-

a GList of GVolume objects.

-

[element-type GVolume][transfer full]

-
-
-
-
-

g_volume_monitor_get_mounts ()

-
GList *
-g_volume_monitor_get_mounts (GVolumeMonitor *volume_monitor);
-

Gets a list of the mounts on the system.

-

The returned list should be freed with g_list_free(), after -its elements have been unreffed with g_object_unref().

-
-

Parameters

-
----- - - - - - -

volume_monitor

a GVolumeMonitor.

 
-
-
-

Returns

-

a GList of GMount objects.

-

[element-type GMount][transfer full]

-
-
-
-
-

g_volume_monitor_adopt_orphan_mount ()

-
GVolume *
-g_volume_monitor_adopt_orphan_mount (GMount *mount);
-
-

g_volume_monitor_adopt_orphan_mount has been deprecated since version 2.20 and should not be used in newly-written code.

-

Instead of using this function, GVolumeMonitor -implementations should instead create shadow mounts with the URI of -the mount they intend to adopt. See the proxy volume monitor in -gvfs for an example of this. Also see g_mount_is_shadowed(), -g_mount_shadow() and g_mount_unshadow() functions.

-
-

This function should be called by any GVolumeMonitor -implementation when a new GMount object is created that is not -associated with a GVolume object. It must be called just before -emitting the mount_added - signal.

-

If the return value is not NULL, the caller must associate the -returned GVolume object with the GMount. This involves returning -it in its g_mount_get_volume() implementation. The caller must -also listen for the "removed" signal on the returned object -and give up its reference when handling that signal

-

Similary, if implementing g_volume_monitor_adopt_orphan_mount(), -the implementor must take a reference to mount - and return it in -its g_volume_get_mount() implemented. Also, the implementor must -listen for the "unmounted" signal on mount - and give up its -reference upon handling that signal.

-

There are two main use cases for this function.

-

One is when implementing a user space file system driver that reads -blocks of a block device that is already represented by the native -volume monitor (for example a CD Audio file system driver). Such -a driver will generate its own GMount object that needs to be -associated with the GVolume object that represents the volume.

-

The other is for implementing a GVolumeMonitor whose sole purpose -is to return GVolume objects representing entries in the users -"favorite servers" list or similar.

-
-

Parameters

-
----- - - - - - -

mount

a GMount object to find a parent for

 
-
-
-

Returns

-

the GVolume object that is the parent for mount -or NULL -if no wants to adopt the GMount.

-

[transfer full]

-
-
-
-
-

g_volume_monitor_get_mount_for_uuid ()

-
GMount *
-g_volume_monitor_get_mount_for_uuid (GVolumeMonitor *volume_monitor,
-                                     const char *uuid);
-

Finds a GMount object by its UUID (see g_mount_get_uuid())

-
-

Parameters

-
----- - - - - - - - - - - - - -

volume_monitor

a GVolumeMonitor.

 

uuid

the UUID to look for

 
-
-
-

Returns

-

a GMount or NULL if no such mount is available. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_volume_monitor_get_volume_for_uuid ()

-
GVolume *
-g_volume_monitor_get_volume_for_uuid (GVolumeMonitor *volume_monitor,
-                                      const char *uuid);
-

Finds a GVolume object by its UUID (see g_volume_get_uuid())

-
-

Parameters

-
----- - - - - - - - - - - - - -

volume_monitor

a GVolumeMonitor.

 

uuid

the UUID to look for

 
-
-
-

Returns

-

a GVolume or NULL if no such volume is available. -Free the returned object with g_object_unref().

-

[transfer full]

-
-
-
-
-

Types and Values

-
-

GVolumeMonitor

-
typedef struct _GVolumeMonitor GVolumeMonitor;
-

A Volume Monitor that watches for volume events.

-
-
-
-

G_VOLUME_MONITOR_EXTENSION_POINT_NAME

-
#define G_VOLUME_MONITOR_EXTENSION_POINT_NAME "gio-volume-monitor"
-
-

Extension point for volume monitor functionality. -See Extending GIO.

-
-
-
-

Signal Details

-
-

The “drive-changed” signal

-
void
-user_function (GVolumeMonitor *volume_monitor,
-               GDrive         *drive,
-               gpointer        user_data)
-

Emitted when a drive changes.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

volume_monitor

The volume monitor emitting the signal.

 

drive

the drive that changed

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “drive-connected” signal

-
void
-user_function (GVolumeMonitor *volume_monitor,
-               GDrive         *drive,
-               gpointer        user_data)
-

Emitted when a drive is connected to the system.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

volume_monitor

The volume monitor emitting the signal.

 

drive

a GDrive that was connected.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “drive-disconnected” signal

-
void
-user_function (GVolumeMonitor *volume_monitor,
-               GDrive         *drive,
-               gpointer        user_data)
-

Emitted when a drive is disconnected from the system.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

volume_monitor

The volume monitor emitting the signal.

 

drive

a GDrive that was disconnected.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “drive-eject-button” signal

-
void
-user_function (GVolumeMonitor *volume_monitor,
-               GDrive         *drive,
-               gpointer        user_data)
-

Emitted when the eject button is pressed on drive -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

volume_monitor

The volume monitor emitting the signal.

 

drive

the drive where the eject button was pressed

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.18

-
-
-
-

The “drive-stop-button” signal

-
void
-user_function (GVolumeMonitor *volume_monitor,
-               GDrive         *drive,
-               gpointer        user_data)
-

Emitted when the stop button is pressed on drive -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

volume_monitor

The volume monitor emitting the signal.

 

drive

the drive where the stop button was pressed

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-

Since: 2.22

-
-
-
-

The “mount-added” signal

-
void
-user_function (GVolumeMonitor *volume_monitor,
-               GMount         *mount,
-               gpointer        user_data)
-

Emitted when a mount is added.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

volume_monitor

The volume monitor emitting the signal.

 

mount

a GMount that was added.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “mount-changed” signal

-
void
-user_function (GVolumeMonitor *volume_monitor,
-               GMount         *mount,
-               gpointer        user_data)
-

Emitted when a mount changes.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

volume_monitor

The volume monitor emitting the signal.

 

mount

a GMount that changed.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “mount-pre-unmount” signal

-
void
-user_function (GVolumeMonitor *volume_monitor,
-               GMount         *mount,
-               gpointer        user_data)
-

Emitted when a mount is about to be removed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

volume_monitor

The volume monitor emitting the signal.

 

mount

a GMount that is being unmounted.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “mount-removed” signal

-
void
-user_function (GVolumeMonitor *volume_monitor,
-               GMount         *mount,
-               gpointer        user_data)
-

Emitted when a mount is removed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

volume_monitor

The volume monitor emitting the signal.

 

mount

a GMount that was removed.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “volume-added” signal

-
void
-user_function (GVolumeMonitor *volume_monitor,
-               GVolume        *volume,
-               gpointer        user_data)
-

Emitted when a mountable volume is added to the system.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

volume_monitor

The volume monitor emitting the signal.

 

volume

a GVolume that was added.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “volume-changed” signal

-
void
-user_function (GVolumeMonitor *volume_monitor,
-               GVolume        *volume,
-               gpointer        user_data)
-

Emitted when mountable volume is changed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

volume_monitor

The volume monitor emitting the signal.

 

volume

a GVolume that changed.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “volume-removed” signal

-
void
-user_function (GVolumeMonitor *volume_monitor,
-               GVolume        *volume,
-               gpointer        user_data)
-

Emitted when a mountable volume is removed from the system.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

volume_monitor

The volume monitor emitting the signal.

 

volume

a GVolume that was removed.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

See Also

-

GFileMonitor

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GZlibCompressor.html b/docs/reference/gio/html/GZlibCompressor.html deleted file mode 100644 index d7223c63e..000000000 --- a/docs/reference/gio/html/GZlibCompressor.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - -GZlibCompressor: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GZlibCompressor

-

GZlibCompressor — Zlib compressor

-
-
-

Functions

-
---- - - - - - - - - - - - - - - -
-GZlibCompressor * - -g_zlib_compressor_new () -
-GFileInfo * - -g_zlib_compressor_get_file_info () -
-void - -g_zlib_compressor_set_file_info () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - -
-GFileInfo *file-infoRead / Write
GZlibCompressorFormatformatRead / Write / Construct Only
gintlevelRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GZlibCompressor
enumGZlibCompressorFormat
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GZlibCompressor
-
-
-
-

Implemented Interfaces

-

-GZlibCompressor implements - GConverter.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GZlibCompressor is an implementation of GConverter that -compresses data using zlib.

-
-
-

Functions

-
-

g_zlib_compressor_new ()

-
GZlibCompressor *
-g_zlib_compressor_new (GZlibCompressorFormat format,
-                       int level);
-

Creates a new GZlibCompressor.

-
-

Parameters

-
----- - - - - - - - - - - - - -

format

The format to use for the compressed data

 

level

compression level (0-9), -1 for default

 
-
-
-

Returns

-

a new GZlibCompressor

-
-

Since: 2.24

-
-
-
-

g_zlib_compressor_get_file_info ()

-
GFileInfo *
-g_zlib_compressor_get_file_info (GZlibCompressor *compressor);
-

Returns the “file-info” property.

-
-

Parameters

-
----- - - - - - -

compressor

a GZlibCompressor

 
-
-
-

Returns

-

a GFileInfo, or NULL.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_zlib_compressor_set_file_info ()

-
void
-g_zlib_compressor_set_file_info (GZlibCompressor *compressor,
-                                 GFileInfo *file_info);
-

Sets file_info - in compressor -. If non-NULL, and compressor -'s -“format” property is G_ZLIB_COMPRESSOR_FORMAT_GZIP, -it will be used to set the file name and modification time in -the GZIP header of the compressed data.

-

Note: it is an error to call this function while a compression is in -progress; it may only be called immediately after creation of compressor -, -or after resetting it with g_converter_reset().

-
-

Parameters

-
----- - - - - - - - - - - - - -

compressor

a GZlibCompressor

 

file_info

a GFileInfo.

[nullable]
-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GZlibCompressor

-
typedef struct _GZlibCompressor GZlibCompressor;
-

Zlib decompression

-
-
-
-

enum GZlibCompressorFormat

-

Used to select the type of data format to use for GZlibDecompressor -and GZlibCompressor.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_ZLIB_COMPRESSOR_FORMAT_ZLIB

-

deflate compression with zlib header

-
 

G_ZLIB_COMPRESSOR_FORMAT_GZIP

-

gzip file format

-
 

G_ZLIB_COMPRESSOR_FORMAT_RAW

-

deflate compression with no header

-
 
-
-

Since: 2.24

-
-
-
-

Property Details

-
-

The “file-info” property

-
  “file-info”                GFileInfo *
-

If set to a non-NULL GFileInfo object, and “format” is -G_ZLIB_COMPRESSOR_FORMAT_GZIP, the compressor will write the file name -and modification time from the file info to the GZIP header.

-

Flags: Read / Write

-

Since: 2.26

-
-
-
-

The “format” property

-
  “format”                   GZlibCompressorFormat
-

The format of the compressed data.

-

Flags: Read / Write / Construct Only

-

Default value: G_ZLIB_COMPRESSOR_FORMAT_ZLIB

-
-
-
-

The “level” property

-
  “level”                    gint
-

The level of compression from 0 (no compression) to 9 (most compression), -1 for the default level.

-

Flags: Read / Write / Construct Only

-

Allowed values: [-1,9]

-

Default value: -1

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/GZlibDecompressor.html b/docs/reference/gio/html/GZlibDecompressor.html deleted file mode 100644 index 6873bfe3b..000000000 --- a/docs/reference/gio/html/GZlibDecompressor.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - -GZlibDecompressor: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GZlibDecompressor

-

GZlibDecompressor — Zlib decompressor

-
-
-

Functions

-
---- - - - - - - - - - - -
-GZlibDecompressor * - -g_zlib_decompressor_new () -
-GFileInfo * - -g_zlib_decompressor_get_file_info () -
-
-
-

Properties

-
----- - - - - - - - - - - - - -
-GFileInfo *file-infoRead
GZlibCompressorFormatformatRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GZlibDecompressor
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GZlibDecompressor
-
-
-
-

Implemented Interfaces

-

-GZlibDecompressor implements - GConverter.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GZlibDecompressor is an implementation of GConverter that -decompresses data compressed with zlib.

-
-
-

Functions

-
-

g_zlib_decompressor_new ()

-
GZlibDecompressor *
-g_zlib_decompressor_new (GZlibCompressorFormat format);
-

Creates a new GZlibDecompressor.

-
-

Parameters

-
----- - - - - - -

format

The format to use for the compressed data

 
-
-
-

Returns

-

a new GZlibDecompressor

-
-

Since: 2.24

-
-
-
-

g_zlib_decompressor_get_file_info ()

-
GFileInfo *
-g_zlib_decompressor_get_file_info (GZlibDecompressor *decompressor);
-

Retrieves the GFileInfo constructed from the GZIP header data -of compressed data processed by compressor -, or NULL if decompressor -'s -“format” property is not G_ZLIB_COMPRESSOR_FORMAT_GZIP, -or the header data was not fully processed yet, or it not present in the -data stream at all.

-
-

Parameters

-
----- - - - - - -

decompressor

a GZlibDecompressor

 
-
-
-

Returns

-

a GFileInfo, or NULL.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GZlibDecompressor

-
typedef struct _GZlibDecompressor GZlibDecompressor;
-

Zlib decompression

-
-
-
-

Property Details

-
-

The “file-info” property

-
  “file-info”                GFileInfo *
-

A GFileInfo containing the information found in the GZIP header -of the data stream processed, or NULL if the header was not yet -fully processed, is not present at all, or the compressor's -“format” property is not G_ZLIB_COMPRESSOR_FORMAT_GZIP.

-

Flags: Read

-

Since: 2.26

-
-
-
-

The “format” property

-
  “format”                   GZlibCompressorFormat
-

The format of the compressed data.

-

Flags: Read / Write / Construct Only

-

Default value: G_ZLIB_COMPRESSOR_FORMAT_ZLIB

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/annotation-glossary.html b/docs/reference/gio/html/annotation-glossary.html deleted file mode 100644 index 4b1cec818..000000000 --- a/docs/reference/gio/html/annotation-glossary.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - -Annotation Glossary: GIO Reference Manual - - - - - - - - - - - - - - - -
-

-Annotation Glossary

-

A

-
array
-

Parameter points to an array of items.

-

C

-
closure
-

This parameter is a 'user_data', for callbacks; many bindings can pass NULL here.

-

E

-
element-type
-

Generics and defining elements of containers and arrays.

-

I

-
in
-

Parameter for input. Default is transfer none.

-
inout
-

Parameter for input and for returning results. Default is transfer full.

-

N

-
not nullable
-

NULL must not be passed as the value in, out, in-out; or as a return value.

-
nullable
-

NULL may be passed as the value in, out, in-out; or as a return value.

-

O

-
optional
-

NULL may be passed instead of a pointer to a location.

-
out
-

Parameter for returning results. Default is transfer full.

-
out callee-allocates
-

Out parameter, where caller must allocate storage.

-
out caller-allocates
-

Out parameter, where caller must allocate storage.

-

R

-
rename-to
-

Rename the original symbol's name to SYMBOL.

-

S

-
scope async
-

The callback is valid until first called.

-
scope call
-

The callback is valid only during the call to the method.

-
scope notified
-

The callback is valid until the GDestroyNotify argument is called.

-
skip
-

Exposed in C code, not necessarily available in other languages.

-

T

-
transfer container
-

Free data container after the code is done.

-
transfer full
-

Free data after the code is done.

-
transfer none
-

Don't free data after the code is done.

-
type
-

Override the parsed C type with given type.

-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/api-index-full.html b/docs/reference/gio/html/api-index-full.html deleted file mode 100644 index f4dd3ff34..000000000 --- a/docs/reference/gio/html/api-index-full.html +++ /dev/null @@ -1,10275 +0,0 @@ - - - - -Index: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Index

-

A

-
-GAction, struct in GAction -
-
-
-GAction:enabled, object property in GAction -
-
-
-GAction:name, object property in GAction -
-
-
-GAction:parameter-type, object property in GAction -
-
-
-GAction:state, object property in GAction -
-
-
-GAction:state-type, object property in GAction -
-
-
-GActionEntry, struct in GActionMap -
-
-
-GActionGroup, struct in GActionGroup -
-
-
-GActionGroup::action-added, object signal in GActionGroup -
-
-
-GActionGroup::action-enabled-changed, object signal in GActionGroup -
-
-
-GActionGroup::action-removed, object signal in GActionGroup -
-
-
-GActionGroup::action-state-changed, object signal in GActionGroup -
-
-
-GActionGroupInterface, struct in GActionGroup -
-
-
-GActionInterface, struct in GAction -
-
-
-GActionMap, struct in GActionMap -
-
-
-GActionMapInterface, struct in GActionMap -
-
-
-g_action_activate, function in GAction -
-
-
-g_action_change_state, function in GAction -
-
-
-g_action_get_enabled, function in GAction -
-
-
-g_action_get_name, function in GAction -
-
-
-g_action_get_parameter_type, function in GAction -
-
-
-g_action_get_state, function in GAction -
-
-
-g_action_get_state_hint, function in GAction -
-
-
-g_action_get_state_type, function in GAction -
-
-
-g_action_group_action_added, function in GActionGroup -
-
-
-g_action_group_action_enabled_changed, function in GActionGroup -
-
-
-g_action_group_action_removed, function in GActionGroup -
-
-
-g_action_group_action_state_changed, function in GActionGroup -
-
-
-g_action_group_activate_action, function in GActionGroup -
-
-
-g_action_group_change_action_state, function in GActionGroup -
-
-
-g_action_group_get_action_enabled, function in GActionGroup -
-
-
-g_action_group_get_action_parameter_type, function in GActionGroup -
-
-
-g_action_group_get_action_state, function in GActionGroup -
-
-
-g_action_group_get_action_state_hint, function in GActionGroup -
-
-
-g_action_group_get_action_state_type, function in GActionGroup -
-
-
-g_action_group_has_action, function in GActionGroup -
-
-
-g_action_group_list_actions, function in GActionGroup -
-
-
-g_action_group_query_action, function in GActionGroup -
-
-
-g_action_map_add_action, function in GActionMap -
-
-
-g_action_map_add_action_entries, function in GActionMap -
-
-
-g_action_map_lookup_action, function in GActionMap -
-
-
-g_action_map_remove_action, function in GActionMap -
-
-
-g_action_name_is_valid, function in GAction -
-
-
-g_action_parse_detailed_name, function in GAction -
-
-
-g_action_print_detailed_name, function in GAction -
-
-
-GAppInfo, struct in GAppInfo -
-
-
-GAppInfoCreateFlags, enum in GAppInfo -
-
-
-GAppInfoIface, struct in GAppInfo -
-
-
-GAppInfoMonitor::changed, object signal in GAppInfoMonitor -
-
-
-GAppLaunchContext, struct in GAppInfo -
-
-
-GAppLaunchContext::launch-failed, object signal in GAppInfo -
-
-
-GAppLaunchContext::launched, object signal in GAppInfo -
-
-
-GApplication, struct in GApplication -
-
-
-GApplication::activate, object signal in GApplication -
-
-
-GApplication::command-line, object signal in GApplication -
-
-
-GApplication::handle-local-options, object signal in GApplication -
-
-
-GApplication::open, object signal in GApplication -
-
-
-GApplication::shutdown, object signal in GApplication -
-
-
-GApplication::startup, object signal in GApplication -
-
-
-GApplication:action-group, object property in GApplication -
-
-
-GApplication:application-id, object property in GApplication -
-
-
-GApplication:flags, object property in GApplication -
-
-
-GApplication:inactivity-timeout, object property in GApplication -
-
-
-GApplication:is-busy, object property in GApplication -
-
-
-GApplication:is-registered, object property in GApplication -
-
-
-GApplication:is-remote, object property in GApplication -
-
-
-GApplication:resource-base-path, object property in GApplication -
-
-
-GApplicationClass, struct in GApplication -
-
-
-GApplicationCommandLine, struct in GApplicationCommandLine -
-
-
-GApplicationCommandLine:arguments, object property in GApplicationCommandLine -
-
-
-GApplicationCommandLine:is-remote, object property in GApplicationCommandLine -
-
-
-GApplicationCommandLine:options, object property in GApplicationCommandLine -
-
-
-GApplicationCommandLine:platform-data, object property in GApplicationCommandLine -
-
-
-GApplicationCommandLineClass, struct in GApplicationCommandLine -
-
-
-GApplicationFlags, enum in GApplication -
-
-
-g_application_activate, function in GApplication -
-
-
-g_application_add_main_option, function in GApplication -
-
-
-g_application_add_main_option_entries, function in GApplication -
-
-
-g_application_add_option_group, function in GApplication -
-
-
-g_application_bind_busy_property, function in GApplication -
-
-
-g_application_command_line_create_file_for_arg, function in GApplicationCommandLine -
-
-
-g_application_command_line_getenv, function in GApplicationCommandLine -
-
-
-g_application_command_line_get_arguments, function in GApplicationCommandLine -
-
-
-g_application_command_line_get_cwd, function in GApplicationCommandLine -
-
-
-g_application_command_line_get_environ, function in GApplicationCommandLine -
-
-
-g_application_command_line_get_exit_status, function in GApplicationCommandLine -
-
-
-g_application_command_line_get_is_remote, function in GApplicationCommandLine -
-
-
-g_application_command_line_get_options_dict, function in GApplicationCommandLine -
-
-
-g_application_command_line_get_platform_data, function in GApplicationCommandLine -
-
-
-g_application_command_line_get_stdin, function in GApplicationCommandLine -
-
-
-g_application_command_line_print, function in GApplicationCommandLine -
-
-
-g_application_command_line_printerr, function in GApplicationCommandLine -
-
-
-g_application_command_line_set_exit_status, function in GApplicationCommandLine -
-
-
-g_application_get_application_id, function in GApplication -
-
-
-g_application_get_dbus_connection, function in GApplication -
-
-
-g_application_get_dbus_object_path, function in GApplication -
-
-
-g_application_get_default, function in GApplication -
-
-
-g_application_get_flags, function in GApplication -
-
-
-g_application_get_inactivity_timeout, function in GApplication -
-
-
-g_application_get_is_busy, function in GApplication -
-
-
-g_application_get_is_registered, function in GApplication -
-
-
-g_application_get_is_remote, function in GApplication -
-
-
-g_application_get_resource_base_path, function in GApplication -
-
-
-g_application_hold, function in GApplication -
-
-
-g_application_id_is_valid, function in GApplication -
-
-
-g_application_mark_busy, function in GApplication -
-
-
-g_application_new, function in GApplication -
-
-
-g_application_open, function in GApplication -
-
-
-g_application_quit, function in GApplication -
-
-
-g_application_register, function in GApplication -
-
-
-g_application_release, function in GApplication -
-
-
-g_application_run, function in GApplication -
-
-
-g_application_send_notification, function in GApplication -
-
-
-g_application_set_action_group, function in GApplication -
-
-
-g_application_set_application_id, function in GApplication -
-
-
-g_application_set_default, function in GApplication -
-
-
-g_application_set_flags, function in GApplication -
-
-
-g_application_set_inactivity_timeout, function in GApplication -
-
-
-g_application_set_resource_base_path, function in GApplication -
-
-
-g_application_unbind_busy_property, function in GApplication -
-
-
-g_application_unmark_busy, function in GApplication -
-
-
-g_application_withdraw_notification, function in GApplication -
-
-
-g_app_info_add_supports_type, function in GAppInfo -
-
-
-g_app_info_can_delete, function in GAppInfo -
-
-
-g_app_info_can_remove_supports_type, function in GAppInfo -
-
-
-g_app_info_create_from_commandline, function in GAppInfo -
-
-
-g_app_info_delete, function in GAppInfo -
-
-
-g_app_info_dup, function in GAppInfo -
-
-
-g_app_info_equal, function in GAppInfo -
-
-
-g_app_info_get_all, function in GAppInfo -
-
-
-g_app_info_get_all_for_type, function in GAppInfo -
-
-
-g_app_info_get_commandline, function in GAppInfo -
-
-
-g_app_info_get_default_for_type, function in GAppInfo -
-
-
-g_app_info_get_default_for_uri_scheme, function in GAppInfo -
-
-
-g_app_info_get_description, function in GAppInfo -
-
-
-g_app_info_get_display_name, function in GAppInfo -
-
-
-g_app_info_get_executable, function in GAppInfo -
-
-
-g_app_info_get_fallback_for_type, function in GAppInfo -
-
-
-g_app_info_get_icon, function in GAppInfo -
-
-
-g_app_info_get_id, function in GAppInfo -
-
-
-g_app_info_get_name, function in GAppInfo -
-
-
-g_app_info_get_recommended_for_type, function in GAppInfo -
-
-
-g_app_info_get_supported_types, function in GAppInfo -
-
-
-g_app_info_launch, function in GAppInfo -
-
-
-g_app_info_launch_default_for_uri, function in GAppInfo -
-
-
-g_app_info_launch_default_for_uri_async, function in GAppInfo -
-
-
-g_app_info_launch_default_for_uri_finish, function in GAppInfo -
-
-
-g_app_info_launch_uris, function in GAppInfo -
-
-
-g_app_info_monitor_get, function in GAppInfoMonitor -
-
-
-g_app_info_remove_supports_type, function in GAppInfo -
-
-
-g_app_info_reset_type_associations, function in GAppInfo -
-
-
-g_app_info_set_as_default_for_extension, function in GAppInfo -
-
-
-g_app_info_set_as_default_for_type, function in GAppInfo -
-
-
-g_app_info_set_as_last_used_for_type, function in GAppInfo -
-
-
-g_app_info_should_show, function in GAppInfo -
-
-
-g_app_info_supports_files, function in GAppInfo -
-
-
-g_app_info_supports_uris, function in GAppInfo -
-
-
-g_app_launch_context_get_display, function in GAppInfo -
-
-
-g_app_launch_context_get_environment, function in GAppInfo -
-
-
-g_app_launch_context_get_startup_notify_id, function in GAppInfo -
-
-
-g_app_launch_context_launch_failed, function in GAppInfo -
-
-
-g_app_launch_context_new, function in GAppInfo -
-
-
-g_app_launch_context_setenv, function in GAppInfo -
-
-
-g_app_launch_context_unsetenv, function in GAppInfo -
-
-
-GAskPasswordFlags, enum in GMountOperation -
-
-
-GAsyncInitable, struct in GAsyncInitable -
-
-
-GAsyncInitableIface, struct in GAsyncInitable -
-
-
-GAsyncReadyCallback, user_function in GAsyncResult -
-
-
-GAsyncResult, struct in GAsyncResult -
-
-
-GAsyncResultIface, struct in GAsyncResult -
-
-
-g_async_initable_init_async, function in GAsyncInitable -
-
-
-g_async_initable_init_finish, function in GAsyncInitable -
-
-
-g_async_initable_newv_async, function in GAsyncInitable -
-
-
-g_async_initable_new_async, function in GAsyncInitable -
-
-
-g_async_initable_new_finish, function in GAsyncInitable -
-
-
-g_async_initable_new_valist_async, function in GAsyncInitable -
-
-
-g_async_result_get_source_object, function in GAsyncResult -
-
-
-g_async_result_get_user_data, function in GAsyncResult -
-
-
-g_async_result_is_tagged, function in GAsyncResult -
-
-
-g_async_result_legacy_propagate_error, function in GAsyncResult -
-
-

B

-
-GBufferedInputStream, struct in GBufferedInputStream -
-
-
-GBufferedInputStream:buffer-size, object property in GBufferedInputStream -
-
-
-GBufferedOutputStream, struct in GBufferedOutputStream -
-
-
-GBufferedOutputStream:auto-grow, object property in GBufferedOutputStream -
-
-
-GBufferedOutputStream:buffer-size, object property in GBufferedOutputStream -
-
-
-g_buffered_input_stream_fill, function in GBufferedInputStream -
-
-
-g_buffered_input_stream_fill_async, function in GBufferedInputStream -
-
-
-g_buffered_input_stream_fill_finish, function in GBufferedInputStream -
-
-
-g_buffered_input_stream_get_available, function in GBufferedInputStream -
-
-
-g_buffered_input_stream_get_buffer_size, function in GBufferedInputStream -
-
-
-g_buffered_input_stream_new, function in GBufferedInputStream -
-
-
-g_buffered_input_stream_new_sized, function in GBufferedInputStream -
-
-
-g_buffered_input_stream_peek, function in GBufferedInputStream -
-
-
-g_buffered_input_stream_peek_buffer, function in GBufferedInputStream -
-
-
-g_buffered_input_stream_read_byte, function in GBufferedInputStream -
-
-
-g_buffered_input_stream_set_buffer_size, function in GBufferedInputStream -
-
-
-g_buffered_output_stream_get_auto_grow, function in GBufferedOutputStream -
-
-
-g_buffered_output_stream_get_buffer_size, function in GBufferedOutputStream -
-
-
-g_buffered_output_stream_new, function in GBufferedOutputStream -
-
-
-g_buffered_output_stream_new_sized, function in GBufferedOutputStream -
-
-
-g_buffered_output_stream_set_auto_grow, function in GBufferedOutputStream -
-
-
-g_buffered_output_stream_set_buffer_size, function in GBufferedOutputStream -
-
-
-GBusAcquiredCallback, user_function in Owning Bus Names -
-
-
-GBusNameAcquiredCallback, user_function in Owning Bus Names -
-
-
-GBusNameAppearedCallback, user_function in Watching Bus Names -
-
-
-GBusNameLostCallback, user_function in Owning Bus Names -
-
-
-GBusNameOwnerFlags, enum in Owning Bus Names -
-
-
-GBusNameVanishedCallback, user_function in Watching Bus Names -
-
-
-GBusNameWatcherFlags, enum in Watching Bus Names -
-
-
-GBusType, enum in GDBusConnection -
-
-
-g_bus_get, function in GDBusConnection -
-
-
-g_bus_get_finish, function in GDBusConnection -
-
-
-g_bus_get_sync, function in GDBusConnection -
-
-
-g_bus_own_name, function in Owning Bus Names -
-
-
-g_bus_own_name_on_connection, function in Owning Bus Names -
-
-
-g_bus_own_name_on_connection_with_closures, function in Owning Bus Names -
-
-
-g_bus_own_name_with_closures, function in Owning Bus Names -
-
-
-g_bus_unown_name, function in Owning Bus Names -
-
-
-g_bus_unwatch_name, function in Watching Bus Names -
-
-
-g_bus_watch_name, function in Watching Bus Names -
-
-
-g_bus_watch_name_on_connection, function in Watching Bus Names -
-
-
-g_bus_watch_name_on_connection_with_closures, function in Watching Bus Names -
-
-
-g_bus_watch_name_with_closures, function in Watching Bus Names -
-
-
-GBytesIcon, struct in GBytesIcon -
-
-
-GBytesIcon:bytes, object property in GBytesIcon -
-
-
-g_bytes_icon_get_bytes, function in GBytesIcon -
-
-
-g_bytes_icon_new, function in GBytesIcon -
-
-

C

-
-GCancellable, struct in GCancellable -
-
-
-GCancellable::cancelled, object signal in GCancellable -
-
-
-GCancellableSourceFunc, user_function in GCancellable -
-
-
-g_cancellable_cancel, function in GCancellable -
-
-
-g_cancellable_connect, function in GCancellable -
-
-
-g_cancellable_disconnect, function in GCancellable -
-
-
-g_cancellable_get_current, function in GCancellable -
-
-
-g_cancellable_get_fd, function in GCancellable -
-
-
-g_cancellable_is_cancelled, function in GCancellable -
-
-
-g_cancellable_make_pollfd, function in GCancellable -
-
-
-g_cancellable_new, function in GCancellable -
-
-
-g_cancellable_pop_current, function in GCancellable -
-
-
-g_cancellable_push_current, function in GCancellable -
-
-
-g_cancellable_release_fd, function in GCancellable -
-
-
-g_cancellable_reset, function in GCancellable -
-
-
-g_cancellable_set_error_if_cancelled, function in GCancellable -
-
-
-g_cancellable_source_new, function in GCancellable -
-
-
-GCharsetConverter, struct in GCharsetConverter -
-
-
-GCharsetConverter:from-charset, object property in GCharsetConverter -
-
-
-GCharsetConverter:to-charset, object property in GCharsetConverter -
-
-
-GCharsetConverter:use-fallback, object property in GCharsetConverter -
-
-
-g_charset_converter_get_num_fallbacks, function in GCharsetConverter -
-
-
-g_charset_converter_get_use_fallback, function in GCharsetConverter -
-
-
-g_charset_converter_new, function in GCharsetConverter -
-
-
-g_charset_converter_set_use_fallback, function in GCharsetConverter -
-
-
-g_content_types_get_registered, function in GContentType -
-
-
-g_content_type_can_be_executable, function in GContentType -
-
-
-g_content_type_equals, function in GContentType -
-
-
-g_content_type_from_mime_type, function in GContentType -
-
-
-g_content_type_get_description, function in GContentType -
-
-
-g_content_type_get_generic_icon_name, function in GContentType -
-
-
-g_content_type_get_icon, function in GContentType -
-
-
-g_content_type_get_mime_type, function in GContentType -
-
-
-g_content_type_get_symbolic_icon, function in GContentType -
-
-
-g_content_type_guess, function in GContentType -
-
-
-g_content_type_guess_for_tree, function in GContentType -
-
-
-g_content_type_is_a, function in GContentType -
-
-
-g_content_type_is_mime_type, function in GContentType -
-
-
-g_content_type_is_unknown, function in GContentType -
-
-
-GConverter, struct in GConverter -
-
-
-GConverterFlags, enum in GConverter -
-
-
-GConverterIface, struct in GConverter -
-
-
-GConverterInputStream, struct in GConverterInputstream -
-
-
-GConverterInputStream:converter, object property in GConverterInputstream -
-
-
-GConverterOutputStream, struct in GConverterOutputstream -
-
-
-GConverterOutputStream:converter, object property in GConverterOutputstream -
-
-
-GConverterResult, enum in GConverter -
-
-
-g_converter_convert, function in GConverter -
-
-
-g_converter_input_stream_get_converter, function in GConverterInputstream -
-
-
-g_converter_input_stream_new, function in GConverterInputstream -
-
-
-g_converter_output_stream_get_converter, function in GConverterOutputstream -
-
-
-g_converter_output_stream_new, function in GConverterOutputstream -
-
-
-g_converter_reset, function in GConverter -
-
-
-GCredentials, struct in GCredentials -
-
-
-GCredentialsType, enum in GCredentials -
-
-
-g_credentials_get_native, function in GCredentials -
-
-
-g_credentials_get_unix_pid, function in GCredentials -
-
-
-g_credentials_get_unix_user, function in GCredentials -
-
-
-g_credentials_is_same_user, function in GCredentials -
-
-
-g_credentials_new, function in GCredentials -
-
-
-g_credentials_set_native, function in GCredentials -
-
-
-g_credentials_set_unix_user, function in GCredentials -
-
-
-g_credentials_to_string, function in GCredentials -
-
-

D

-
-GDatagramBased, struct in GDatagramBased -
-
-
-GDatagramBasedInterface, struct in GDatagramBased -
-
-
-GDatagramBasedSourceFunc, user_function in GDatagramBased -
-
-
-g_datagram_based_condition_check, function in GDatagramBased -
-
-
-g_datagram_based_condition_wait, function in GDatagramBased -
-
-
-g_datagram_based_create_source, function in GDatagramBased -
-
-
-g_datagram_based_receive_messages, function in GDatagramBased -
-
-
-g_datagram_based_send_messages, function in GDatagramBased -
-
-
-GDataInputStream, struct in GDataInputStream -
-
-
-GDataInputStream:byte-order, object property in GDataInputStream -
-
-
-GDataInputStream:newline-type, object property in GDataInputStream -
-
-
-GDataOutputStream, struct in GDataOutputStream -
-
-
-GDataOutputStream:byte-order, object property in GDataOutputStream -
-
-
-GDataStreamByteOrder, enum in GDataInputStream -
-
-
-GDataStreamNewlineType, enum in GDataInputStream -
-
-
-g_data_input_stream_get_byte_order, function in GDataInputStream -
-
-
-g_data_input_stream_get_newline_type, function in GDataInputStream -
-
-
-g_data_input_stream_new, function in GDataInputStream -
-
-
-g_data_input_stream_read_byte, function in GDataInputStream -
-
-
-g_data_input_stream_read_int16, function in GDataInputStream -
-
-
-g_data_input_stream_read_int32, function in GDataInputStream -
-
-
-g_data_input_stream_read_int64, function in GDataInputStream -
-
-
-g_data_input_stream_read_line, function in GDataInputStream -
-
-
-g_data_input_stream_read_line_async, function in GDataInputStream -
-
-
-g_data_input_stream_read_line_finish, function in GDataInputStream -
-
-
-g_data_input_stream_read_line_finish_utf8, function in GDataInputStream -
-
-
-g_data_input_stream_read_line_utf8, function in GDataInputStream -
-
-
-g_data_input_stream_read_uint16, function in GDataInputStream -
-
-
-g_data_input_stream_read_uint32, function in GDataInputStream -
-
-
-g_data_input_stream_read_uint64, function in GDataInputStream -
-
-
-g_data_input_stream_read_until, function in GDataInputStream -
-
-
-g_data_input_stream_read_until_async, function in GDataInputStream -
-
-
-g_data_input_stream_read_until_finish, function in GDataInputStream -
-
-
-g_data_input_stream_read_upto, function in GDataInputStream -
-
-
-g_data_input_stream_read_upto_async, function in GDataInputStream -
-
-
-g_data_input_stream_read_upto_finish, function in GDataInputStream -
-
-
-g_data_input_stream_set_byte_order, function in GDataInputStream -
-
-
-g_data_input_stream_set_newline_type, function in GDataInputStream -
-
-
-g_data_output_stream_get_byte_order, function in GDataOutputStream -
-
-
-g_data_output_stream_new, function in GDataOutputStream -
-
-
-g_data_output_stream_put_byte, function in GDataOutputStream -
-
-
-g_data_output_stream_put_int16, function in GDataOutputStream -
-
-
-g_data_output_stream_put_int32, function in GDataOutputStream -
-
-
-g_data_output_stream_put_int64, function in GDataOutputStream -
-
-
-g_data_output_stream_put_string, function in GDataOutputStream -
-
-
-g_data_output_stream_put_uint16, function in GDataOutputStream -
-
-
-g_data_output_stream_put_uint32, function in GDataOutputStream -
-
-
-g_data_output_stream_put_uint64, function in GDataOutputStream -
-
-
-g_data_output_stream_set_byte_order, function in GDataOutputStream -
-
-
-GDBusActionGroup, struct in GDBusActionGroup -
-
-
-GDBusAnnotationInfo, struct in D-Bus Introspection Data -
-
-
-GDBusArgInfo, struct in D-Bus Introspection Data -
-
-
-GDBusAuthObserver, struct in GDBusAuthObserver -
-
-
-GDBusAuthObserver::allow-mechanism, object signal in GDBusAuthObserver -
-
-
-GDBusAuthObserver::authorize-authenticated-peer, object signal in GDBusAuthObserver -
-
-
-GDBusCallFlags, enum in GDBusConnection -
-
-
-GDBusCapabilityFlags, enum in GDBusConnection -
-
-
-GDBusConnection, struct in GDBusConnection -
-
-
-GDBusConnection::closed, object signal in GDBusConnection -
-
-
-GDBusConnection:address, object property in GDBusConnection -
-
-
-GDBusConnection:authentication-observer, object property in GDBusConnection -
-
-
-GDBusConnection:capabilities, object property in GDBusConnection -
-
-
-GDBusConnection:closed, object property in GDBusConnection -
-
-
-GDBusConnection:exit-on-close, object property in GDBusConnection -
-
-
-GDBusConnection:flags, object property in GDBusConnection -
-
-
-GDBusConnection:guid, object property in GDBusConnection -
-
-
-GDBusConnection:stream, object property in GDBusConnection -
-
-
-GDBusConnection:unique-name, object property in GDBusConnection -
-
-
-GDBusConnectionFlags, enum in GDBusConnection -
-
-
-GDBusError, enum in GDBusError -
-
-
-GDBusErrorEntry, struct in GDBusError -
-
-
-GDBusInterface, struct in GDBusInterface -
-
-
-GDBusInterfaceGetPropertyFunc, user_function in GDBusConnection -
-
-
-GDBusInterfaceIface, struct in GDBusInterface -
-
-
-GDBusInterfaceInfo, struct in D-Bus Introspection Data -
-
-
-GDBusInterfaceMethodCallFunc, user_function in GDBusConnection -
-
-
-GDBusInterfaceSetPropertyFunc, user_function in GDBusConnection -
-
-
-GDBusInterfaceSkeleton, struct in GDBusInterfaceSkeleton -
-
-
-GDBusInterfaceSkeleton::g-authorize-method, object signal in GDBusInterfaceSkeleton -
-
-
-GDBusInterfaceSkeleton:g-flags, object property in GDBusInterfaceSkeleton -
-
-
-GDBusInterfaceSkeletonClass, struct in GDBusInterfaceSkeleton -
-
-
-GDBusInterfaceSkeletonFlags, enum in GDBusInterfaceSkeleton -
-
-
-GDBusInterfaceVTable, struct in GDBusConnection -
-
-
-GDBusMenuModel, struct in GDBusMenuModel -
-
-
-GDBusMessage, struct in GDBusMessage -
-
-
-GDBusMessage:locked, object property in GDBusMessage -
-
-
-GDBusMessageByteOrder, enum in GDBusMessage -
-
-
-GDBusMessageFilterFunction, user_function in GDBusConnection -
-
-
-GDBusMessageFlags, enum in GDBusMessage -
-
-
-GDBusMessageHeaderField, enum in GDBusMessage -
-
-
-GDBusMessageType, enum in GDBusMessage -
-
-
-GDBusMethodInfo, struct in D-Bus Introspection Data -
-
-
-GDBusMethodInvocation, struct in GDBusMethodInvocation -
-
-
-GDBusNodeInfo, struct in D-Bus Introspection Data -
-
-
-GDBusObject, struct in GDBusObject -
-
-
-GDBusObject::interface-added, object signal in GDBusObject -
-
-
-GDBusObject::interface-removed, object signal in GDBusObject -
-
-
-GDBusObjectIface, struct in GDBusObject -
-
-
-GDBusObjectManager, struct in GDBusObjectManager -
-
-
-GDBusObjectManager::interface-added, object signal in GDBusObjectManager -
-
-
-GDBusObjectManager::interface-removed, object signal in GDBusObjectManager -
-
-
-GDBusObjectManager::object-added, object signal in GDBusObjectManager -
-
-
-GDBusObjectManager::object-removed, object signal in GDBusObjectManager -
-
-
-GDBusObjectManagerClient, struct in GDBusObjectManagerClient -
-
-
-GDBusObjectManagerClient::interface-proxy-properties-changed, object signal in GDBusObjectManagerClient -
-
-
-GDBusObjectManagerClient::interface-proxy-signal, object signal in GDBusObjectManagerClient -
-
-
-GDBusObjectManagerClient:bus-type, object property in GDBusObjectManagerClient -
-
-
-GDBusObjectManagerClient:connection, object property in GDBusObjectManagerClient -
-
-
-GDBusObjectManagerClient:flags, object property in GDBusObjectManagerClient -
-
-
-GDBusObjectManagerClient:get-proxy-type-destroy-notify, object property in GDBusObjectManagerClient -
-
-
-GDBusObjectManagerClient:get-proxy-type-func, object property in GDBusObjectManagerClient -
-
-
-GDBusObjectManagerClient:get-proxy-type-user-data, object property in GDBusObjectManagerClient -
-
-
-GDBusObjectManagerClient:name, object property in GDBusObjectManagerClient -
-
-
-GDBusObjectManagerClient:name-owner, object property in GDBusObjectManagerClient -
-
-
-GDBusObjectManagerClient:object-path, object property in GDBusObjectManagerClient -
-
-
-GDBusObjectManagerClientClass, struct in GDBusObjectManagerClient -
-
-
-GDBusObjectManagerClientFlags, enum in GDBusObjectManagerClient -
-
-
-GDBusObjectManagerIface, struct in GDBusObjectManager -
-
-
-GDBusObjectManagerServer, struct in GDBusObjectManagerServer -
-
-
-GDBusObjectManagerServer:connection, object property in GDBusObjectManagerServer -
-
-
-GDBusObjectManagerServer:object-path, object property in GDBusObjectManagerServer -
-
-
-GDBusObjectManagerServerClass, struct in GDBusObjectManagerServer -
-
-
-GDBusObjectProxy, struct in GDBusObjectProxy -
-
-
-GDBusObjectProxy:g-connection, object property in GDBusObjectProxy -
-
-
-GDBusObjectProxy:g-object-path, object property in GDBusObjectProxy -
-
-
-GDBusObjectProxyClass, struct in GDBusObjectProxy -
-
-
-GDBusObjectSkeleton, struct in GDBusObjectSkeleton -
-
-
-GDBusObjectSkeleton::authorize-method, object signal in GDBusObjectSkeleton -
-
-
-GDBusObjectSkeleton:g-object-path, object property in GDBusObjectSkeleton -
-
-
-GDBusObjectSkeletonClass, struct in GDBusObjectSkeleton -
-
-
-GDBusPropertyInfo, struct in D-Bus Introspection Data -
-
-
-GDBusPropertyInfoFlags, enum in D-Bus Introspection Data -
-
-
-GDBusProxy, struct in GDBusProxy -
-
-
-GDBusProxy::g-properties-changed, object signal in GDBusProxy -
-
-
-GDBusProxy::g-signal, object signal in GDBusProxy -
-
-
-GDBusProxy:g-bus-type, object property in GDBusProxy -
-
-
-GDBusProxy:g-connection, object property in GDBusProxy -
-
-
-GDBusProxy:g-default-timeout, object property in GDBusProxy -
-
-
-GDBusProxy:g-flags, object property in GDBusProxy -
-
-
-GDBusProxy:g-interface-info, object property in GDBusProxy -
-
-
-GDBusProxy:g-interface-name, object property in GDBusProxy -
-
-
-GDBusProxy:g-name, object property in GDBusProxy -
-
-
-GDBusProxy:g-name-owner, object property in GDBusProxy -
-
-
-GDBusProxy:g-object-path, object property in GDBusProxy -
-
-
-GDBusProxyClass, struct in GDBusProxy -
-
-
-GDBusProxyFlags, enum in GDBusProxy -
-
-
-GDBusProxyTypeFunc, user_function in GDBusObjectManagerClient -
-
-
-GDBusSendMessageFlags, enum in GDBusConnection -
-
-
-GDBusServer, struct in GDBusServer -
-
-
-GDBusServer::new-connection, object signal in GDBusServer -
-
-
-GDBusServer:active, object property in GDBusServer -
-
-
-GDBusServer:address, object property in GDBusServer -
-
-
-GDBusServer:authentication-observer, object property in GDBusServer -
-
-
-GDBusServer:client-address, object property in GDBusServer -
-
-
-GDBusServer:flags, object property in GDBusServer -
-
-
-GDBusServer:guid, object property in GDBusServer -
-
-
-GDBusServerFlags, enum in GDBusServer -
-
-
-GDBusSignalCallback, user_function in GDBusConnection -
-
-
-GDBusSignalFlags, enum in GDBusConnection -
-
-
-GDBusSignalInfo, struct in D-Bus Introspection Data -
-
-
-GDBusSubtreeDispatchFunc, user_function in GDBusConnection -
-
-
-GDBusSubtreeEnumerateFunc, user_function in GDBusConnection -
-
-
-GDBusSubtreeFlags, enum in GDBusConnection -
-
-
-GDBusSubtreeIntrospectFunc, user_function in GDBusConnection -
-
-
-GDBusSubtreeVTable, struct in GDBusConnection -
-
-
-g_dbus_action_group_get, function in GDBusActionGroup -
-
-
-g_dbus_address_escape_value, function in D-Bus Addresses -
-
-
-g_dbus_address_get_for_bus_sync, function in D-Bus Addresses -
-
-
-g_dbus_address_get_stream, function in D-Bus Addresses -
-
-
-g_dbus_address_get_stream_finish, function in D-Bus Addresses -
-
-
-g_dbus_address_get_stream_sync, function in D-Bus Addresses -
-
-
-g_dbus_annotation_info_lookup, function in D-Bus Introspection Data -
-
-
-g_dbus_annotation_info_ref, function in D-Bus Introspection Data -
-
-
-g_dbus_annotation_info_unref, function in D-Bus Introspection Data -
-
-
-g_dbus_arg_info_ref, function in D-Bus Introspection Data -
-
-
-g_dbus_arg_info_unref, function in D-Bus Introspection Data -
-
-
-g_dbus_auth_observer_allow_mechanism, function in GDBusAuthObserver -
-
-
-g_dbus_auth_observer_authorize_authenticated_peer, function in GDBusAuthObserver -
-
-
-g_dbus_auth_observer_new, function in GDBusAuthObserver -
-
-
-g_dbus_connection_add_filter, function in GDBusConnection -
-
-
-g_dbus_connection_call, function in GDBusConnection -
-
-
-g_dbus_connection_call_finish, function in GDBusConnection -
-
-
-g_dbus_connection_call_sync, function in GDBusConnection -
-
-
-g_dbus_connection_call_with_unix_fd_list, function in GDBusConnection -
-
-
-g_dbus_connection_call_with_unix_fd_list_finish, function in GDBusConnection -
-
-
-g_dbus_connection_call_with_unix_fd_list_sync, function in GDBusConnection -
-
-
-g_dbus_connection_close, function in GDBusConnection -
-
-
-g_dbus_connection_close_finish, function in GDBusConnection -
-
-
-g_dbus_connection_close_sync, function in GDBusConnection -
-
-
-g_dbus_connection_emit_signal, function in GDBusConnection -
-
-
-g_dbus_connection_export_action_group, function in GActionGroup exporter -
-
-
-g_dbus_connection_export_menu_model, function in GMenuModel exporter -
-
-
-g_dbus_connection_flush, function in GDBusConnection -
-
-
-g_dbus_connection_flush_finish, function in GDBusConnection -
-
-
-g_dbus_connection_flush_sync, function in GDBusConnection -
-
-
-g_dbus_connection_get_capabilities, function in GDBusConnection -
-
-
-g_dbus_connection_get_exit_on_close, function in GDBusConnection -
-
-
-g_dbus_connection_get_guid, function in GDBusConnection -
-
-
-g_dbus_connection_get_last_serial, function in GDBusConnection -
-
-
-g_dbus_connection_get_peer_credentials, function in GDBusConnection -
-
-
-g_dbus_connection_get_stream, function in GDBusConnection -
-
-
-g_dbus_connection_get_unique_name, function in GDBusConnection -
-
-
-g_dbus_connection_is_closed, function in GDBusConnection -
-
-
-g_dbus_connection_new, function in GDBusConnection -
-
-
-g_dbus_connection_new_finish, function in GDBusConnection -
-
-
-g_dbus_connection_new_for_address, function in GDBusConnection -
-
-
-g_dbus_connection_new_for_address_finish, function in GDBusConnection -
-
-
-g_dbus_connection_new_for_address_sync, function in GDBusConnection -
-
-
-g_dbus_connection_new_sync, function in GDBusConnection -
-
-
-g_dbus_connection_register_object, function in GDBusConnection -
-
-
-g_dbus_connection_register_object_with_closures, function in GDBusConnection -
-
-
-g_dbus_connection_register_subtree, function in GDBusConnection -
-
-
-g_dbus_connection_remove_filter, function in GDBusConnection -
-
-
-g_dbus_connection_send_message, function in GDBusConnection -
-
-
-g_dbus_connection_send_message_with_reply, function in GDBusConnection -
-
-
-g_dbus_connection_send_message_with_reply_finish, function in GDBusConnection -
-
-
-g_dbus_connection_send_message_with_reply_sync, function in GDBusConnection -
-
-
-g_dbus_connection_set_exit_on_close, function in GDBusConnection -
-
-
-g_dbus_connection_signal_subscribe, function in GDBusConnection -
-
-
-g_dbus_connection_signal_unsubscribe, function in GDBusConnection -
-
-
-g_dbus_connection_start_message_processing, function in GDBusConnection -
-
-
-g_dbus_connection_unexport_action_group, function in GActionGroup exporter -
-
-
-g_dbus_connection_unexport_menu_model, function in GMenuModel exporter -
-
-
-g_dbus_connection_unregister_object, function in GDBusConnection -
-
-
-g_dbus_connection_unregister_subtree, function in GDBusConnection -
-
-
-G_DBUS_ERROR, macro in GDBusError -
-
-
-g_dbus_error_encode_gerror, function in GDBusError -
-
-
-g_dbus_error_get_remote_error, function in GDBusError -
-
-
-g_dbus_error_is_remote_error, function in GDBusError -
-
-
-g_dbus_error_new_for_dbus_error, function in GDBusError -
-
-
-g_dbus_error_register_error, function in GDBusError -
-
-
-g_dbus_error_register_error_domain, function in GDBusError -
-
-
-g_dbus_error_set_dbus_error, function in GDBusError -
-
-
-g_dbus_error_set_dbus_error_valist, function in GDBusError -
-
-
-g_dbus_error_strip_remote_error, function in GDBusError -
-
-
-g_dbus_error_unregister_error, function in GDBusError -
-
-
-g_dbus_generate_guid, function in D-Bus Utilities -
-
-
-g_dbus_gvalue_to_gvariant, function in D-Bus Utilities -
-
-
-g_dbus_gvariant_to_gvalue, function in D-Bus Utilities -
-
-
-g_dbus_interface_dup_object, function in GDBusInterface -
-
-
-g_dbus_interface_get_info, function in GDBusInterface -
-
-
-g_dbus_interface_get_object, function in GDBusInterface -
-
-
-g_dbus_interface_info_cache_build, function in D-Bus Introspection Data -
-
-
-g_dbus_interface_info_cache_release, function in D-Bus Introspection Data -
-
-
-g_dbus_interface_info_generate_xml, function in D-Bus Introspection Data -
-
-
-g_dbus_interface_info_lookup_method, function in D-Bus Introspection Data -
-
-
-g_dbus_interface_info_lookup_property, function in D-Bus Introspection Data -
-
-
-g_dbus_interface_info_lookup_signal, function in D-Bus Introspection Data -
-
-
-g_dbus_interface_info_ref, function in D-Bus Introspection Data -
-
-
-g_dbus_interface_info_unref, function in D-Bus Introspection Data -
-
-
-g_dbus_interface_set_object, function in GDBusInterface -
-
-
-g_dbus_interface_skeleton_export, function in GDBusInterfaceSkeleton -
-
-
-g_dbus_interface_skeleton_flush, function in GDBusInterfaceSkeleton -
-
-
-g_dbus_interface_skeleton_get_connection, function in GDBusInterfaceSkeleton -
-
-
-g_dbus_interface_skeleton_get_connections, function in GDBusInterfaceSkeleton -
-
-
-g_dbus_interface_skeleton_get_flags, function in GDBusInterfaceSkeleton -
-
-
-g_dbus_interface_skeleton_get_info, function in GDBusInterfaceSkeleton -
-
-
-g_dbus_interface_skeleton_get_object_path, function in GDBusInterfaceSkeleton -
-
-
-g_dbus_interface_skeleton_get_properties, function in GDBusInterfaceSkeleton -
-
-
-g_dbus_interface_skeleton_get_vtable, function in GDBusInterfaceSkeleton -
-
-
-g_dbus_interface_skeleton_has_connection, function in GDBusInterfaceSkeleton -
-
-
-g_dbus_interface_skeleton_set_flags, function in GDBusInterfaceSkeleton -
-
-
-g_dbus_interface_skeleton_unexport, function in GDBusInterfaceSkeleton -
-
-
-g_dbus_interface_skeleton_unexport_from_connection, function in GDBusInterfaceSkeleton -
-
-
-g_dbus_is_address, function in D-Bus Addresses -
-
-
-g_dbus_is_guid, function in D-Bus Utilities -
-
-
-g_dbus_is_interface_name, function in D-Bus Utilities -
-
-
-g_dbus_is_member_name, function in D-Bus Utilities -
-
-
-g_dbus_is_name, function in D-Bus Utilities -
-
-
-g_dbus_is_supported_address, function in D-Bus Addresses -
-
-
-g_dbus_is_unique_name, function in D-Bus Utilities -
-
-
-g_dbus_menu_model_get, function in GDBusMenuModel -
-
-
-g_dbus_message_bytes_needed, function in GDBusMessage -
-
-
-g_dbus_message_copy, function in GDBusMessage -
-
-
-g_dbus_message_get_arg0, function in GDBusMessage -
-
-
-g_dbus_message_get_body, function in GDBusMessage -
-
-
-g_dbus_message_get_byte_order, function in GDBusMessage -
-
-
-g_dbus_message_get_destination, function in GDBusMessage -
-
-
-g_dbus_message_get_error_name, function in GDBusMessage -
-
-
-g_dbus_message_get_flags, function in GDBusMessage -
-
-
-g_dbus_message_get_header, function in GDBusMessage -
-
-
-g_dbus_message_get_header_fields, function in GDBusMessage -
-
-
-g_dbus_message_get_interface, function in GDBusMessage -
-
-
-g_dbus_message_get_locked, function in GDBusMessage -
-
-
-g_dbus_message_get_member, function in GDBusMessage -
-
-
-g_dbus_message_get_message_type, function in GDBusMessage -
-
-
-g_dbus_message_get_num_unix_fds, function in GDBusMessage -
-
-
-g_dbus_message_get_path, function in GDBusMessage -
-
-
-g_dbus_message_get_reply_serial, function in GDBusMessage -
-
-
-g_dbus_message_get_sender, function in GDBusMessage -
-
-
-g_dbus_message_get_serial, function in GDBusMessage -
-
-
-g_dbus_message_get_signature, function in GDBusMessage -
-
-
-g_dbus_message_get_unix_fd_list, function in GDBusMessage -
-
-
-g_dbus_message_lock, function in GDBusMessage -
-
-
-g_dbus_message_new, function in GDBusMessage -
-
-
-g_dbus_message_new_from_blob, function in GDBusMessage -
-
-
-g_dbus_message_new_method_call, function in GDBusMessage -
-
-
-g_dbus_message_new_method_error, function in GDBusMessage -
-
-
-g_dbus_message_new_method_error_literal, function in GDBusMessage -
-
-
-g_dbus_message_new_method_error_valist, function in GDBusMessage -
-
-
-g_dbus_message_new_method_reply, function in GDBusMessage -
-
-
-g_dbus_message_new_signal, function in GDBusMessage -
-
-
-g_dbus_message_print, function in GDBusMessage -
-
-
-g_dbus_message_set_body, function in GDBusMessage -
-
-
-g_dbus_message_set_byte_order, function in GDBusMessage -
-
-
-g_dbus_message_set_destination, function in GDBusMessage -
-
-
-g_dbus_message_set_error_name, function in GDBusMessage -
-
-
-g_dbus_message_set_flags, function in GDBusMessage -
-
-
-g_dbus_message_set_header, function in GDBusMessage -
-
-
-g_dbus_message_set_interface, function in GDBusMessage -
-
-
-g_dbus_message_set_member, function in GDBusMessage -
-
-
-g_dbus_message_set_message_type, function in GDBusMessage -
-
-
-g_dbus_message_set_num_unix_fds, function in GDBusMessage -
-
-
-g_dbus_message_set_path, function in GDBusMessage -
-
-
-g_dbus_message_set_reply_serial, function in GDBusMessage -
-
-
-g_dbus_message_set_sender, function in GDBusMessage -
-
-
-g_dbus_message_set_serial, function in GDBusMessage -
-
-
-g_dbus_message_set_signature, function in GDBusMessage -
-
-
-g_dbus_message_set_unix_fd_list, function in GDBusMessage -
-
-
-g_dbus_message_to_blob, function in GDBusMessage -
-
-
-g_dbus_message_to_gerror, function in GDBusMessage -
-
-
-g_dbus_method_info_ref, function in D-Bus Introspection Data -
-
-
-g_dbus_method_info_unref, function in D-Bus Introspection Data -
-
-
-g_dbus_method_invocation_get_connection, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_get_interface_name, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_get_message, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_get_method_info, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_get_method_name, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_get_object_path, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_get_parameters, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_get_property_info, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_get_sender, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_get_user_data, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_return_dbus_error, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_return_error, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_return_error_literal, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_return_error_valist, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_return_gerror, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_return_value, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_return_value_with_unix_fd_list, function in GDBusMethodInvocation -
-
-
-g_dbus_method_invocation_take_error, function in GDBusMethodInvocation -
-
-
-g_dbus_node_info_generate_xml, function in D-Bus Introspection Data -
-
-
-g_dbus_node_info_lookup_interface, function in D-Bus Introspection Data -
-
-
-g_dbus_node_info_new_for_xml, function in D-Bus Introspection Data -
-
-
-g_dbus_node_info_ref, function in D-Bus Introspection Data -
-
-
-g_dbus_node_info_unref, function in D-Bus Introspection Data -
-
-
-g_dbus_object_get_interface, function in GDBusObject -
-
-
-g_dbus_object_get_interfaces, function in GDBusObject -
-
-
-g_dbus_object_get_object_path, function in GDBusObject -
-
-
-g_dbus_object_manager_client_get_connection, function in GDBusObjectManagerClient -
-
-
-g_dbus_object_manager_client_get_flags, function in GDBusObjectManagerClient -
-
-
-g_dbus_object_manager_client_get_name, function in GDBusObjectManagerClient -
-
-
-g_dbus_object_manager_client_get_name_owner, function in GDBusObjectManagerClient -
-
-
-g_dbus_object_manager_client_new, function in GDBusObjectManagerClient -
-
-
-g_dbus_object_manager_client_new_finish, function in GDBusObjectManagerClient -
-
-
-g_dbus_object_manager_client_new_for_bus, function in GDBusObjectManagerClient -
-
-
-g_dbus_object_manager_client_new_for_bus_finish, function in GDBusObjectManagerClient -
-
-
-g_dbus_object_manager_client_new_for_bus_sync, function in GDBusObjectManagerClient -
-
-
-g_dbus_object_manager_client_new_sync, function in GDBusObjectManagerClient -
-
-
-g_dbus_object_manager_get_interface, function in GDBusObjectManager -
-
-
-g_dbus_object_manager_get_object, function in GDBusObjectManager -
-
-
-g_dbus_object_manager_get_objects, function in GDBusObjectManager -
-
-
-g_dbus_object_manager_get_object_path, function in GDBusObjectManager -
-
-
-g_dbus_object_manager_server_export, function in GDBusObjectManagerServer -
-
-
-g_dbus_object_manager_server_export_uniquely, function in GDBusObjectManagerServer -
-
-
-g_dbus_object_manager_server_get_connection, function in GDBusObjectManagerServer -
-
-
-g_dbus_object_manager_server_is_exported, function in GDBusObjectManagerServer -
-
-
-g_dbus_object_manager_server_new, function in GDBusObjectManagerServer -
-
-
-g_dbus_object_manager_server_set_connection, function in GDBusObjectManagerServer -
-
-
-g_dbus_object_manager_server_unexport, function in GDBusObjectManagerServer -
-
-
-g_dbus_object_proxy_get_connection, function in GDBusObjectProxy -
-
-
-g_dbus_object_proxy_new, function in GDBusObjectProxy -
-
-
-g_dbus_object_skeleton_add_interface, function in GDBusObjectSkeleton -
-
-
-g_dbus_object_skeleton_flush, function in GDBusObjectSkeleton -
-
-
-g_dbus_object_skeleton_new, function in GDBusObjectSkeleton -
-
-
-g_dbus_object_skeleton_remove_interface, function in GDBusObjectSkeleton -
-
-
-g_dbus_object_skeleton_remove_interface_by_name, function in GDBusObjectSkeleton -
-
-
-g_dbus_object_skeleton_set_object_path, function in GDBusObjectSkeleton -
-
-
-g_dbus_property_info_ref, function in D-Bus Introspection Data -
-
-
-g_dbus_property_info_unref, function in D-Bus Introspection Data -
-
-
-g_dbus_proxy_call, function in GDBusProxy -
-
-
-g_dbus_proxy_call_finish, function in GDBusProxy -
-
-
-g_dbus_proxy_call_sync, function in GDBusProxy -
-
-
-g_dbus_proxy_call_with_unix_fd_list, function in GDBusProxy -
-
-
-g_dbus_proxy_call_with_unix_fd_list_finish, function in GDBusProxy -
-
-
-g_dbus_proxy_call_with_unix_fd_list_sync, function in GDBusProxy -
-
-
-g_dbus_proxy_get_cached_property, function in GDBusProxy -
-
-
-g_dbus_proxy_get_cached_property_names, function in GDBusProxy -
-
-
-g_dbus_proxy_get_connection, function in GDBusProxy -
-
-
-g_dbus_proxy_get_default_timeout, function in GDBusProxy -
-
-
-g_dbus_proxy_get_flags, function in GDBusProxy -
-
-
-g_dbus_proxy_get_interface_info, function in GDBusProxy -
-
-
-g_dbus_proxy_get_interface_name, function in GDBusProxy -
-
-
-g_dbus_proxy_get_name, function in GDBusProxy -
-
-
-g_dbus_proxy_get_name_owner, function in GDBusProxy -
-
-
-g_dbus_proxy_get_object_path, function in GDBusProxy -
-
-
-g_dbus_proxy_new, function in GDBusProxy -
-
-
-g_dbus_proxy_new_finish, function in GDBusProxy -
-
-
-g_dbus_proxy_new_for_bus, function in GDBusProxy -
-
-
-g_dbus_proxy_new_for_bus_finish, function in GDBusProxy -
-
-
-g_dbus_proxy_new_for_bus_sync, function in GDBusProxy -
-
-
-g_dbus_proxy_new_sync, function in GDBusProxy -
-
-
-g_dbus_proxy_set_cached_property, function in GDBusProxy -
-
-
-g_dbus_proxy_set_default_timeout, function in GDBusProxy -
-
-
-g_dbus_proxy_set_interface_info, function in GDBusProxy -
-
-
-g_dbus_server_get_client_address, function in GDBusServer -
-
-
-g_dbus_server_get_flags, function in GDBusServer -
-
-
-g_dbus_server_get_guid, function in GDBusServer -
-
-
-g_dbus_server_is_active, function in GDBusServer -
-
-
-g_dbus_server_new_sync, function in GDBusServer -
-
-
-g_dbus_server_start, function in GDBusServer -
-
-
-g_dbus_server_stop, function in GDBusServer -
-
-
-g_dbus_signal_info_ref, function in D-Bus Introspection Data -
-
-
-g_dbus_signal_info_unref, function in D-Bus Introspection Data -
-
-
-GDesktopAppInfo, struct in Desktop file based GAppInfo -
-
-
-GDesktopAppInfo:filename, object property in Desktop file based GAppInfo -
-
-
-GDesktopAppInfoLookup, struct in Desktop file based GAppInfo -
-
-
-GDesktopAppInfoLookupIface, struct in Desktop file based GAppInfo -
-
-
-GDesktopAppLaunchCallback, user_function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_get_action_name, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_get_boolean, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_get_categories, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_get_filename, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_get_generic_name, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_get_implementations, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_get_is_hidden, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_get_keywords, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_get_nodisplay, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_get_show_in, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_get_startup_wm_class, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_get_string, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_has_key, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_launch_action, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_launch_uris_as_manager, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_list_actions, function in Desktop file based GAppInfo -
-
-
-G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME, macro in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_new, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_new_from_filename, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_new_from_keyfile, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_search, function in Desktop file based GAppInfo -
-
-
-g_desktop_app_info_set_desktop_env, function in Desktop file based GAppInfo -
-
-
-GDrive, struct in GDrive -
-
-
-GDrive::changed, object signal in GDrive -
-
-
-GDrive::disconnected, object signal in GDrive -
-
-
-GDrive::eject-button, object signal in GDrive -
-
-
-GDrive::stop-button, object signal in GDrive -
-
-
-GDriveIface, struct in GDrive -
-
-
-GDriveStartFlags, enum in GDrive -
-
-
-GDriveStartStopType, enum in GDrive -
-
-
-g_drive_can_eject, function in GDrive -
-
-
-g_drive_can_poll_for_media, function in GDrive -
-
-
-g_drive_can_start, function in GDrive -
-
-
-g_drive_can_start_degraded, function in GDrive -
-
-
-g_drive_can_stop, function in GDrive -
-
-
-g_drive_eject, function in GDrive -
-
-
-g_drive_eject_finish, function in GDrive -
-
-
-g_drive_eject_with_operation, function in GDrive -
-
-
-g_drive_eject_with_operation_finish, function in GDrive -
-
-
-g_drive_enumerate_identifiers, function in GDrive -
-
-
-g_drive_get_icon, function in GDrive -
-
-
-g_drive_get_identifier, function in GDrive -
-
-
-g_drive_get_name, function in GDrive -
-
-
-g_drive_get_sort_key, function in GDrive -
-
-
-g_drive_get_start_stop_type, function in GDrive -
-
-
-g_drive_get_symbolic_icon, function in GDrive -
-
-
-g_drive_get_volumes, function in GDrive -
-
-
-g_drive_has_media, function in GDrive -
-
-
-g_drive_has_volumes, function in GDrive -
-
-
-g_drive_is_media_check_automatic, function in GDrive -
-
-
-g_drive_is_media_removable, function in GDrive -
-
-
-g_drive_is_removable, function in GDrive -
-
-
-g_drive_poll_for_media, function in GDrive -
-
-
-g_drive_poll_for_media_finish, function in GDrive -
-
-
-g_drive_start, function in GDrive -
-
-
-g_drive_start_finish, function in GDrive -
-
-
-g_drive_stop, function in GDrive -
-
-
-g_drive_stop_finish, function in GDrive -
-
-
-GDtlsClientConnection, struct in GDtlsClientConnection -
-
-
-GDtlsClientConnection:accepted-cas, object property in GDtlsClientConnection -
-
-
-GDtlsClientConnection:server-identity, object property in GDtlsClientConnection -
-
-
-GDtlsClientConnection:validation-flags, object property in GDtlsClientConnection -
-
-
-GDtlsClientConnectionInterface, struct in GDtlsClientConnection -
-
-
-GDtlsConnection, struct in GDtlsConnection -
-
-
-GDtlsConnection::accept-certificate, object signal in GDtlsConnection -
-
-
-GDtlsConnection:base-socket, object property in GDtlsConnection -
-
-
-GDtlsConnection:certificate, object property in GDtlsConnection -
-
-
-GDtlsConnection:database, object property in GDtlsConnection -
-
-
-GDtlsConnection:interaction, object property in GDtlsConnection -
-
-
-GDtlsConnection:peer-certificate, object property in GDtlsConnection -
-
-
-GDtlsConnection:peer-certificate-errors, object property in GDtlsConnection -
-
-
-GDtlsConnection:rehandshake-mode, object property in GDtlsConnection -
-
-
-GDtlsConnection:require-close-notify, object property in GDtlsConnection -
-
-
-GDtlsServerConnection, struct in GDtlsServerConnection -
-
-
-GDtlsServerConnection:authentication-mode, object property in GDtlsServerConnection -
-
-
-GDtlsServerConnectionInterface, struct in GDtlsServerConnection -
-
-
-g_dtls_client_connection_get_accepted_cas, function in GDtlsClientConnection -
-
-
-g_dtls_client_connection_get_server_identity, function in GDtlsClientConnection -
-
-
-g_dtls_client_connection_get_validation_flags, function in GDtlsClientConnection -
-
-
-g_dtls_client_connection_new, function in GDtlsClientConnection -
-
-
-g_dtls_client_connection_set_server_identity, function in GDtlsClientConnection -
-
-
-g_dtls_client_connection_set_validation_flags, function in GDtlsClientConnection -
-
-
-g_dtls_connection_close, function in GDtlsConnection -
-
-
-g_dtls_connection_close_async, function in GDtlsConnection -
-
-
-g_dtls_connection_close_finish, function in GDtlsConnection -
-
-
-g_dtls_connection_emit_accept_certificate, function in GDtlsConnection -
-
-
-g_dtls_connection_get_certificate, function in GDtlsConnection -
-
-
-g_dtls_connection_get_database, function in GDtlsConnection -
-
-
-g_dtls_connection_get_interaction, function in GDtlsConnection -
-
-
-g_dtls_connection_get_peer_certificate, function in GDtlsConnection -
-
-
-g_dtls_connection_get_peer_certificate_errors, function in GDtlsConnection -
-
-
-g_dtls_connection_get_rehandshake_mode, function in GDtlsConnection -
-
-
-g_dtls_connection_get_require_close_notify, function in GDtlsConnection -
-
-
-g_dtls_connection_handshake, function in GDtlsConnection -
-
-
-g_dtls_connection_handshake_async, function in GDtlsConnection -
-
-
-g_dtls_connection_handshake_finish, function in GDtlsConnection -
-
-
-g_dtls_connection_set_certificate, function in GDtlsConnection -
-
-
-g_dtls_connection_set_database, function in GDtlsConnection -
-
-
-g_dtls_connection_set_interaction, function in GDtlsConnection -
-
-
-g_dtls_connection_set_rehandshake_mode, function in GDtlsConnection -
-
-
-g_dtls_connection_set_require_close_notify, function in GDtlsConnection -
-
-
-g_dtls_connection_shutdown, function in GDtlsConnection -
-
-
-g_dtls_connection_shutdown_async, function in GDtlsConnection -
-
-
-g_dtls_connection_shutdown_finish, function in GDtlsConnection -
-
-
-g_dtls_server_connection_new, function in GDtlsServerConnection -
-
-

E

-
-GEmblem, struct in GEmblem -
-
-
-GEmblem:icon, object property in GEmblem -
-
-
-GEmblem:origin, object property in GEmblem -
-
-
-GEmblemedIcon, struct in GEmblemedIcon -
-
-
-GEmblemedIcon:gicon, object property in GEmblemedIcon -
-
-
-g_emblemed_icon_add_emblem, function in GEmblemedIcon -
-
-
-g_emblemed_icon_clear_emblems, function in GEmblemedIcon -
-
-
-g_emblemed_icon_get_emblems, function in GEmblemedIcon -
-
-
-g_emblemed_icon_get_icon, function in GEmblemedIcon -
-
-
-g_emblemed_icon_new, function in GEmblemedIcon -
-
-
-GEmblemOrigin, enum in GEmblem -
-
-
-g_emblem_get_icon, function in GEmblem -
-
-
-g_emblem_get_origin, function in GEmblem -
-
-
-g_emblem_new, function in GEmblem -
-
-
-g_emblem_new_with_origin, function in GEmblem -
-
-

F

-
-GFile, struct in GFile -
-
-
-GFileAttributeInfo, struct in GFileAttribute -
-
-
-GFileAttributeInfoFlags, enum in GFileAttribute -
-
-
-GFileAttributeInfoList, struct in GFileAttribute -
-
-
-GFileAttributeMatcher, struct in GFileInfo -
-
-
-GFileAttributeStatus, enum in GFileAttribute -
-
-
-GFileAttributeType, enum in GFileAttribute -
-
-
-GFileCopyFlags, enum in GFile -
-
-
-GFileCreateFlags, enum in GFile -
-
-
-GFileDescriptorBased, struct in GFileDescriptorBased -
-
-
-GFileDescriptorBasedIface, struct in GFileDescriptorBased -
-
-
-GFileEnumerator, struct in GFileEnumerator -
-
-
-GFileEnumerator:container, object property in GFileEnumerator -
-
-
-GFileIcon, struct in GFileIcon -
-
-
-GFileIcon:file, object property in GFileIcon -
-
-
-GFileIface, struct in GFile -
-
-
-GFileInfo, struct in GFileInfo -
-
-
-GFileInputStream, struct in GFileInputStream -
-
-
-GFileIOStream, struct in GFileIOStream -
-
-
-GFileMeasureFlags, enum in GFile -
-
-
-GFileMeasureProgressCallback, user_function in GFile -
-
-
-GFileMonitor, struct in GFileMonitor -
-
-
-GFileMonitor::changed, object signal in GFileMonitor -
-
-
-GFileMonitor:cancelled, object property in GFileMonitor -
-
-
-GFileMonitor:rate-limit, object property in GFileMonitor -
-
-
-GFileMonitorEvent, enum in GFileMonitor -
-
-
-GFileMonitorFlags, enum in GFile -
-
-
-GFilenameCompleter, struct in GFilenameCompleter -
-
-
-GFilenameCompleter::got-completion-data, object signal in GFilenameCompleter -
-
-
-g_filename_completer_get_completions, function in GFilenameCompleter -
-
-
-g_filename_completer_get_completion_suffix, function in GFilenameCompleter -
-
-
-g_filename_completer_new, function in GFilenameCompleter -
-
-
-g_filename_completer_set_dirs_only, function in GFilenameCompleter -
-
-
-GFileOutputStream, struct in GFileOutputStream -
-
-
-GFileProgressCallback, user_function in GFile -
-
-
-GFileQueryInfoFlags, enum in GFile -
-
-
-GFileReadMoreCallback, user_function in GFile -
-
-
-GFilesystemPreviewType, enum in GFile -
-
-
-GFileType, enum in GFileInfo -
-
-
-g_file_append_to, function in GFile -
-
-
-g_file_append_to_async, function in GFile -
-
-
-g_file_append_to_finish, function in GFile -
-
-
-G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_ACCESS_CAN_READ, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_DOS_IS_SYSTEM, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_ETAG_VALUE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_FILESYSTEM_FREE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_FILESYSTEM_READONLY, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_FILESYSTEM_SIZE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_FILESYSTEM_TYPE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_FILESYSTEM_USED, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_GVFS_BACKEND, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_ID_FILE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_ID_FILESYSTEM, macro in GFileInfo -
-
-
-g_file_attribute_info_list_add, function in GFileAttribute -
-
-
-g_file_attribute_info_list_dup, function in GFileAttribute -
-
-
-g_file_attribute_info_list_lookup, function in GFileAttribute -
-
-
-g_file_attribute_info_list_new, function in GFileAttribute -
-
-
-g_file_attribute_info_list_ref, function in GFileAttribute -
-
-
-g_file_attribute_info_list_unref, function in GFileAttribute -
-
-
-g_file_attribute_matcher_enumerate_namespace, function in GFileInfo -
-
-
-g_file_attribute_matcher_enumerate_next, function in GFileInfo -
-
-
-g_file_attribute_matcher_matches, function in GFileInfo -
-
-
-g_file_attribute_matcher_matches_only, function in GFileInfo -
-
-
-g_file_attribute_matcher_new, function in GFileInfo -
-
-
-g_file_attribute_matcher_ref, function in GFileInfo -
-
-
-g_file_attribute_matcher_subtract, function in GFileInfo -
-
-
-g_file_attribute_matcher_to_string, function in GFileInfo -
-
-
-g_file_attribute_matcher_unref, function in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_OWNER_GROUP, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_OWNER_USER, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_OWNER_USER_REAL, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_PREVIEW_ICON, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_RECENT_MODIFIED, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_SELINUX_CONTEXT, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_COPY_NAME, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_ICON, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_NAME, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_SIZE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_TARGET_URI, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_STANDARD_TYPE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_THUMBNAILING_FAILED, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_THUMBNAIL_PATH, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_TIME_ACCESS, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_TIME_ACCESS_USEC, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_TIME_CHANGED, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_TIME_CHANGED_USEC, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_TIME_CREATED, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_TIME_CREATED_USEC, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_TIME_MODIFIED, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_TRASH_DELETION_DATE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_TRASH_ORIG_PATH, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_UNIX_BLOCKS, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_UNIX_DEVICE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_UNIX_GID, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_UNIX_INODE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_UNIX_MODE, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_UNIX_NLINK, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_UNIX_RDEV, macro in GFileInfo -
-
-
-G_FILE_ATTRIBUTE_UNIX_UID, macro in GFileInfo -
-
-
-g_file_copy, function in GFile -
-
-
-g_file_copy_async, function in GFile -
-
-
-g_file_copy_attributes, function in GFile -
-
-
-g_file_copy_finish, function in GFile -
-
-
-g_file_create, function in GFile -
-
-
-g_file_create_async, function in GFile -
-
-
-g_file_create_finish, function in GFile -
-
-
-g_file_create_readwrite, function in GFile -
-
-
-g_file_create_readwrite_async, function in GFile -
-
-
-g_file_create_readwrite_finish, function in GFile -
-
-
-g_file_delete, function in GFile -
-
-
-g_file_delete_async, function in GFile -
-
-
-g_file_delete_finish, function in GFile -
-
-
-g_file_descriptor_based_get_fd, function in GFileDescriptorBased -
-
-
-g_file_dup, function in GFile -
-
-
-g_file_eject_mountable, function in GFile -
-
-
-g_file_eject_mountable_finish, function in GFile -
-
-
-g_file_eject_mountable_with_operation, function in GFile -
-
-
-g_file_eject_mountable_with_operation_finish, function in GFile -
-
-
-g_file_enumerate_children, function in GFile -
-
-
-g_file_enumerate_children_async, function in GFile -
-
-
-g_file_enumerate_children_finish, function in GFile -
-
-
-g_file_enumerator_close, function in GFileEnumerator -
-
-
-g_file_enumerator_close_async, function in GFileEnumerator -
-
-
-g_file_enumerator_close_finish, function in GFileEnumerator -
-
-
-g_file_enumerator_get_child, function in GFileEnumerator -
-
-
-g_file_enumerator_get_container, function in GFileEnumerator -
-
-
-g_file_enumerator_has_pending, function in GFileEnumerator -
-
-
-g_file_enumerator_is_closed, function in GFileEnumerator -
-
-
-g_file_enumerator_iterate, function in GFileEnumerator -
-
-
-g_file_enumerator_next_file, function in GFileEnumerator -
-
-
-g_file_enumerator_next_files_async, function in GFileEnumerator -
-
-
-g_file_enumerator_next_files_finish, function in GFileEnumerator -
-
-
-g_file_enumerator_set_pending, function in GFileEnumerator -
-
-
-g_file_equal, function in GFile -
-
-
-g_file_find_enclosing_mount, function in GFile -
-
-
-g_file_find_enclosing_mount_async, function in GFile -
-
-
-g_file_find_enclosing_mount_finish, function in GFile -
-
-
-g_file_get_basename, function in GFile -
-
-
-g_file_get_child, function in GFile -
-
-
-g_file_get_child_for_display_name, function in GFile -
-
-
-g_file_get_parent, function in GFile -
-
-
-g_file_get_parse_name, function in GFile -
-
-
-g_file_get_path, function in GFile -
-
-
-g_file_get_relative_path, function in GFile -
-
-
-g_file_get_uri, function in GFile -
-
-
-g_file_get_uri_scheme, function in GFile -
-
-
-g_file_hash, function in GFile -
-
-
-g_file_has_parent, function in GFile -
-
-
-g_file_has_prefix, function in GFile -
-
-
-g_file_has_uri_scheme, function in GFile -
-
-
-g_file_icon_get_file, function in GFileIcon -
-
-
-g_file_icon_new, function in GFileIcon -
-
-
-g_file_info_clear_status, function in GFileInfo -
-
-
-g_file_info_copy_into, function in GFileInfo -
-
-
-g_file_info_dup, function in GFileInfo -
-
-
-g_file_info_get_attribute_as_string, function in GFileInfo -
-
-
-g_file_info_get_attribute_boolean, function in GFileInfo -
-
-
-g_file_info_get_attribute_byte_string, function in GFileInfo -
-
-
-g_file_info_get_attribute_data, function in GFileInfo -
-
-
-g_file_info_get_attribute_int32, function in GFileInfo -
-
-
-g_file_info_get_attribute_int64, function in GFileInfo -
-
-
-g_file_info_get_attribute_object, function in GFileInfo -
-
-
-g_file_info_get_attribute_status, function in GFileInfo -
-
-
-g_file_info_get_attribute_string, function in GFileInfo -
-
-
-g_file_info_get_attribute_stringv, function in GFileInfo -
-
-
-g_file_info_get_attribute_type, function in GFileInfo -
-
-
-g_file_info_get_attribute_uint32, function in GFileInfo -
-
-
-g_file_info_get_attribute_uint64, function in GFileInfo -
-
-
-g_file_info_get_content_type, function in GFileInfo -
-
-
-g_file_info_get_deletion_date, function in GFileInfo -
-
-
-g_file_info_get_display_name, function in GFileInfo -
-
-
-g_file_info_get_edit_name, function in GFileInfo -
-
-
-g_file_info_get_etag, function in GFileInfo -
-
-
-g_file_info_get_file_type, function in GFileInfo -
-
-
-g_file_info_get_icon, function in GFileInfo -
-
-
-g_file_info_get_is_backup, function in GFileInfo -
-
-
-g_file_info_get_is_hidden, function in GFileInfo -
-
-
-g_file_info_get_is_symlink, function in GFileInfo -
-
-
-g_file_info_get_modification_time, function in GFileInfo -
-
-
-g_file_info_get_name, function in GFileInfo -
-
-
-g_file_info_get_size, function in GFileInfo -
-
-
-g_file_info_get_sort_order, function in GFileInfo -
-
-
-g_file_info_get_symbolic_icon, function in GFileInfo -
-
-
-g_file_info_get_symlink_target, function in GFileInfo -
-
-
-g_file_info_has_attribute, function in GFileInfo -
-
-
-g_file_info_has_namespace, function in GFileInfo -
-
-
-g_file_info_list_attributes, function in GFileInfo -
-
-
-g_file_info_new, function in GFileInfo -
-
-
-g_file_info_remove_attribute, function in GFileInfo -
-
-
-g_file_info_set_attribute, function in GFileInfo -
-
-
-g_file_info_set_attribute_boolean, function in GFileInfo -
-
-
-g_file_info_set_attribute_byte_string, function in GFileInfo -
-
-
-g_file_info_set_attribute_int32, function in GFileInfo -
-
-
-g_file_info_set_attribute_int64, function in GFileInfo -
-
-
-g_file_info_set_attribute_mask, function in GFileInfo -
-
-
-g_file_info_set_attribute_object, function in GFileInfo -
-
-
-g_file_info_set_attribute_status, function in GFileInfo -
-
-
-g_file_info_set_attribute_string, function in GFileInfo -
-
-
-g_file_info_set_attribute_stringv, function in GFileInfo -
-
-
-g_file_info_set_attribute_uint32, function in GFileInfo -
-
-
-g_file_info_set_attribute_uint64, function in GFileInfo -
-
-
-g_file_info_set_content_type, function in GFileInfo -
-
-
-g_file_info_set_display_name, function in GFileInfo -
-
-
-g_file_info_set_edit_name, function in GFileInfo -
-
-
-g_file_info_set_file_type, function in GFileInfo -
-
-
-g_file_info_set_icon, function in GFileInfo -
-
-
-g_file_info_set_is_hidden, function in GFileInfo -
-
-
-g_file_info_set_is_symlink, function in GFileInfo -
-
-
-g_file_info_set_modification_time, function in GFileInfo -
-
-
-g_file_info_set_name, function in GFileInfo -
-
-
-g_file_info_set_size, function in GFileInfo -
-
-
-g_file_info_set_sort_order, function in GFileInfo -
-
-
-g_file_info_set_symbolic_icon, function in GFileInfo -
-
-
-g_file_info_set_symlink_target, function in GFileInfo -
-
-
-g_file_info_unset_attribute_mask, function in GFileInfo -
-
-
-g_file_input_stream_query_info, function in GFileInputStream -
-
-
-g_file_input_stream_query_info_async, function in GFileInputStream -
-
-
-g_file_input_stream_query_info_finish, function in GFileInputStream -
-
-
-g_file_io_stream_get_etag, function in GFileIOStream -
-
-
-g_file_io_stream_query_info, function in GFileIOStream -
-
-
-g_file_io_stream_query_info_async, function in GFileIOStream -
-
-
-g_file_io_stream_query_info_finish, function in GFileIOStream -
-
-
-g_file_is_native, function in GFile -
-
-
-g_file_load_contents, function in GFile -
-
-
-g_file_load_contents_async, function in GFile -
-
-
-g_file_load_contents_finish, function in GFile -
-
-
-g_file_load_partial_contents_async, function in GFile -
-
-
-g_file_load_partial_contents_finish, function in GFile -
-
-
-g_file_make_directory, function in GFile -
-
-
-g_file_make_directory_async, function in GFile -
-
-
-g_file_make_directory_finish, function in GFile -
-
-
-g_file_make_directory_with_parents, function in GFile -
-
-
-g_file_make_symbolic_link, function in GFile -
-
-
-g_file_measure_disk_usage, function in GFile -
-
-
-g_file_measure_disk_usage_async, function in GFile -
-
-
-g_file_measure_disk_usage_finish, function in GFile -
-
-
-g_file_monitor, function in GFile -
-
-
-g_file_monitor_cancel, function in GFileMonitor -
-
-
-g_file_monitor_directory, function in GFile -
-
-
-g_file_monitor_emit_event, function in GFileMonitor -
-
-
-g_file_monitor_file, function in GFile -
-
-
-g_file_monitor_is_cancelled, function in GFileMonitor -
-
-
-g_file_monitor_set_rate_limit, function in GFileMonitor -
-
-
-g_file_mount_enclosing_volume, function in GFile -
-
-
-g_file_mount_enclosing_volume_finish, function in GFile -
-
-
-g_file_mount_mountable, function in GFile -
-
-
-g_file_mount_mountable_finish, function in GFile -
-
-
-g_file_move, function in GFile -
-
-
-g_file_new_for_commandline_arg, function in GFile -
-
-
-g_file_new_for_commandline_arg_and_cwd, function in GFile -
-
-
-g_file_new_for_path, function in GFile -
-
-
-g_file_new_for_uri, function in GFile -
-
-
-g_file_new_tmp, function in GFile -
-
-
-g_file_open_readwrite, function in GFile -
-
-
-g_file_open_readwrite_async, function in GFile -
-
-
-g_file_open_readwrite_finish, function in GFile -
-
-
-g_file_output_stream_get_etag, function in GFileOutputStream -
-
-
-g_file_output_stream_query_info, function in GFileOutputStream -
-
-
-g_file_output_stream_query_info_async, function in GFileOutputStream -
-
-
-g_file_output_stream_query_info_finish, function in GFileOutputStream -
-
-
-g_file_parse_name, function in GFile -
-
-
-g_file_poll_mountable, function in GFile -
-
-
-g_file_poll_mountable_finish, function in GFile -
-
-
-g_file_query_default_handler, function in GFile -
-
-
-g_file_query_exists, function in GFile -
-
-
-g_file_query_filesystem_info, function in GFile -
-
-
-g_file_query_filesystem_info_async, function in GFile -
-
-
-g_file_query_filesystem_info_finish, function in GFile -
-
-
-g_file_query_file_type, function in GFile -
-
-
-g_file_query_info, function in GFile -
-
-
-g_file_query_info_async, function in GFile -
-
-
-g_file_query_info_finish, function in GFile -
-
-
-g_file_query_settable_attributes, function in GFile -
-
-
-g_file_query_writable_namespaces, function in GFile -
-
-
-g_file_read, function in GFile -
-
-
-g_file_read_async, function in GFile -
-
-
-g_file_read_finish, function in GFile -
-
-
-g_file_replace, function in GFile -
-
-
-g_file_replace_async, function in GFile -
-
-
-g_file_replace_contents, function in GFile -
-
-
-g_file_replace_contents_async, function in GFile -
-
-
-g_file_replace_contents_bytes_async, function in GFile -
-
-
-g_file_replace_contents_finish, function in GFile -
-
-
-g_file_replace_finish, function in GFile -
-
-
-g_file_replace_readwrite, function in GFile -
-
-
-g_file_replace_readwrite_async, function in GFile -
-
-
-g_file_replace_readwrite_finish, function in GFile -
-
-
-g_file_resolve_relative_path, function in GFile -
-
-
-g_file_set_attribute, function in GFile -
-
-
-g_file_set_attributes_async, function in GFile -
-
-
-g_file_set_attributes_finish, function in GFile -
-
-
-g_file_set_attributes_from_info, function in GFile -
-
-
-g_file_set_attribute_byte_string, function in GFile -
-
-
-g_file_set_attribute_int32, function in GFile -
-
-
-g_file_set_attribute_int64, function in GFile -
-
-
-g_file_set_attribute_string, function in GFile -
-
-
-g_file_set_attribute_uint32, function in GFile -
-
-
-g_file_set_attribute_uint64, function in GFile -
-
-
-g_file_set_display_name, function in GFile -
-
-
-g_file_set_display_name_async, function in GFile -
-
-
-g_file_set_display_name_finish, function in GFile -
-
-
-g_file_start_mountable, function in GFile -
-
-
-g_file_start_mountable_finish, function in GFile -
-
-
-g_file_stop_mountable, function in GFile -
-
-
-g_file_stop_mountable_finish, function in GFile -
-
-
-g_file_supports_thread_contexts, function in GFile -
-
-
-g_file_trash, function in GFile -
-
-
-g_file_trash_async, function in GFile -
-
-
-g_file_trash_finish, function in GFile -
-
-
-g_file_unmount_mountable, function in GFile -
-
-
-g_file_unmount_mountable_finish, function in GFile -
-
-
-g_file_unmount_mountable_with_operation, function in GFile -
-
-
-g_file_unmount_mountable_with_operation_finish, function in GFile -
-
-
-GFilterInputStream, struct in GFilterInputStream -
-
-
-GFilterInputStream:base-stream, object property in GFilterInputStream -
-
-
-GFilterInputStream:close-base-stream, object property in GFilterInputStream -
-
-
-GFilterOutputStream, struct in GFilterOutputStream -
-
-
-GFilterOutputStream:base-stream, object property in GFilterOutputStream -
-
-
-GFilterOutputStream:close-base-stream, object property in GFilterOutputStream -
-
-
-g_filter_input_stream_get_base_stream, function in GFilterInputStream -
-
-
-g_filter_input_stream_get_close_base_stream, function in GFilterInputStream -
-
-
-g_filter_input_stream_set_close_base_stream, function in GFilterInputStream -
-
-
-g_filter_output_stream_get_base_stream, function in GFilterOutputStream -
-
-
-g_filter_output_stream_get_close_base_stream, function in GFilterOutputStream -
-
-
-g_filter_output_stream_set_close_base_stream, function in GFilterOutputStream -
-
-

I

-
-GIcon, struct in GIcon -
-
-
-GIconIface, struct in GIcon -
-
-
-g_icon_deserialize, function in GIcon -
-
-
-g_icon_equal, function in GIcon -
-
-
-g_icon_hash, function in GIcon -
-
-
-g_icon_new_for_string, function in GIcon -
-
-
-g_icon_serialize, function in GIcon -
-
-
-g_icon_to_string, function in GIcon -
-
-
-GInetAddress, struct in GInetAddress -
-
-
-GInetAddress:bytes, object property in GInetAddress -
-
-
-GInetAddress:family, object property in GInetAddress -
-
-
-GInetAddress:is-any, object property in GInetAddress -
-
-
-GInetAddress:is-link-local, object property in GInetAddress -
-
-
-GInetAddress:is-loopback, object property in GInetAddress -
-
-
-GInetAddress:is-mc-global, object property in GInetAddress -
-
-
-GInetAddress:is-mc-link-local, object property in GInetAddress -
-
-
-GInetAddress:is-mc-node-local, object property in GInetAddress -
-
-
-GInetAddress:is-mc-org-local, object property in GInetAddress -
-
-
-GInetAddress:is-mc-site-local, object property in GInetAddress -
-
-
-GInetAddress:is-multicast, object property in GInetAddress -
-
-
-GInetAddress:is-site-local, object property in GInetAddress -
-
-
-GInetAddressMask, struct in GInetAddressMask -
-
-
-GInetAddressMask:address, object property in GInetAddressMask -
-
-
-GInetAddressMask:family, object property in GInetAddressMask -
-
-
-GInetAddressMask:length, object property in GInetAddressMask -
-
-
-GInetSocketAddress, struct in GInetSocketAddress -
-
-
-GInetSocketAddress:address, object property in GInetSocketAddress -
-
-
-GInetSocketAddress:flowinfo, object property in GInetSocketAddress -
-
-
-GInetSocketAddress:port, object property in GInetSocketAddress -
-
-
-GInetSocketAddress:scope-id, object property in GInetSocketAddress -
-
-
-g_inet_address_equal, function in GInetAddress -
-
-
-g_inet_address_get_family, function in GInetAddress -
-
-
-g_inet_address_get_is_any, function in GInetAddress -
-
-
-g_inet_address_get_is_link_local, function in GInetAddress -
-
-
-g_inet_address_get_is_loopback, function in GInetAddress -
-
-
-g_inet_address_get_is_mc_global, function in GInetAddress -
-
-
-g_inet_address_get_is_mc_link_local, function in GInetAddress -
-
-
-g_inet_address_get_is_mc_node_local, function in GInetAddress -
-
-
-g_inet_address_get_is_mc_org_local, function in GInetAddress -
-
-
-g_inet_address_get_is_mc_site_local, function in GInetAddress -
-
-
-g_inet_address_get_is_multicast, function in GInetAddress -
-
-
-g_inet_address_get_is_site_local, function in GInetAddress -
-
-
-g_inet_address_get_native_size, function in GInetAddress -
-
-
-g_inet_address_mask_equal, function in GInetAddressMask -
-
-
-g_inet_address_mask_get_address, function in GInetAddressMask -
-
-
-g_inet_address_mask_get_family, function in GInetAddressMask -
-
-
-g_inet_address_mask_get_length, function in GInetAddressMask -
-
-
-g_inet_address_mask_matches, function in GInetAddressMask -
-
-
-g_inet_address_mask_new, function in GInetAddressMask -
-
-
-g_inet_address_mask_new_from_string, function in GInetAddressMask -
-
-
-g_inet_address_mask_to_string, function in GInetAddressMask -
-
-
-g_inet_address_new_any, function in GInetAddress -
-
-
-g_inet_address_new_from_bytes, function in GInetAddress -
-
-
-g_inet_address_new_from_string, function in GInetAddress -
-
-
-g_inet_address_new_loopback, function in GInetAddress -
-
-
-g_inet_address_to_bytes, function in GInetAddress -
-
-
-g_inet_address_to_string, function in GInetAddress -
-
-
-g_inet_socket_address_get_address, function in GInetSocketAddress -
-
-
-g_inet_socket_address_get_flowinfo, function in GInetSocketAddress -
-
-
-g_inet_socket_address_get_port, function in GInetSocketAddress -
-
-
-g_inet_socket_address_get_scope_id, function in GInetSocketAddress -
-
-
-g_inet_socket_address_new, function in GInetSocketAddress -
-
-
-g_inet_socket_address_new_from_string, function in GInetSocketAddress -
-
-
-GInitable, struct in GInitable -
-
-
-GInitableIface, struct in GInitable -
-
-
-g_initable_init, function in GInitable -
-
-
-g_initable_new, function in GInitable -
-
-
-g_initable_newv, function in GInitable -
-
-
-g_initable_new_valist, function in GInitable -
-
-
-GInputMessage, struct in GSocket -
-
-
-GInputStream, struct in GInputStream -
-
-
-GInputVector, struct in GSocket -
-
-
-g_input_stream_clear_pending, function in GInputStream -
-
-
-g_input_stream_close, function in GInputStream -
-
-
-g_input_stream_close_async, function in GInputStream -
-
-
-g_input_stream_close_finish, function in GInputStream -
-
-
-g_input_stream_has_pending, function in GInputStream -
-
-
-g_input_stream_is_closed, function in GInputStream -
-
-
-g_input_stream_read, function in GInputStream -
-
-
-g_input_stream_read_all, function in GInputStream -
-
-
-g_input_stream_read_all_async, function in GInputStream -
-
-
-g_input_stream_read_all_finish, function in GInputStream -
-
-
-g_input_stream_read_async, function in GInputStream -
-
-
-g_input_stream_read_bytes, function in GInputStream -
-
-
-g_input_stream_read_bytes_async, function in GInputStream -
-
-
-g_input_stream_read_bytes_finish, function in GInputStream -
-
-
-g_input_stream_read_finish, function in GInputStream -
-
-
-g_input_stream_set_pending, function in GInputStream -
-
-
-g_input_stream_skip, function in GInputStream -
-
-
-g_input_stream_skip_async, function in GInputStream -
-
-
-g_input_stream_skip_finish, function in GInputStream -
-
-
-GIOErrorEnum, enum in GIOError -
-
-
-GIOExtension, struct in Extension Points -
-
-
-GIOExtensionPoint, struct in Extension Points -
-
-
-GIOModule, struct in GIOModule -
-
-
-GIOModuleScope, struct in GIOModule -
-
-
-GIOModuleScopeFlags, enum in GIOModule -
-
-
-GIOSchedulerJob, struct in GIOScheduler -
-
-
-GIOSchedulerJobFunc, user_function in GIOScheduler -
-
-
-GIOStream, struct in GIOStream -
-
-
-GIOStream:closed, object property in GIOStream -
-
-
-GIOStream:input-stream, object property in GIOStream -
-
-
-GIOStream:output-stream, object property in GIOStream -
-
-
-GIOStreamSpliceFlags, enum in GIOStream -
-
-
-G_IO_ERROR, macro in GIOError -
-
-
-g_io_error_from_errno, function in GIOError -
-
-
-g_io_error_from_win32_error, function in GIOError -
-
-
-g_io_extension_get_name, function in Extension Points -
-
-
-g_io_extension_get_priority, function in Extension Points -
-
-
-g_io_extension_get_type, function in Extension Points -
-
-
-g_io_extension_point_get_extensions, function in Extension Points -
-
-
-g_io_extension_point_get_extension_by_name, function in Extension Points -
-
-
-g_io_extension_point_get_required_type, function in Extension Points -
-
-
-g_io_extension_point_implement, function in Extension Points -
-
-
-g_io_extension_point_lookup, function in Extension Points -
-
-
-g_io_extension_point_register, function in Extension Points -
-
-
-g_io_extension_point_set_required_type, function in Extension Points -
-
-
-g_io_extension_ref_class, function in Extension Points -
-
-
-g_io_modules_load_all_in_directory, function in GIOModule -
-
-
-g_io_modules_load_all_in_directory_with_scope, function in GIOModule -
-
-
-g_io_modules_scan_all_in_directory, function in GIOModule -
-
-
-g_io_modules_scan_all_in_directory_with_scope, function in GIOModule -
-
-
-g_io_module_load, function in GIOModule -
-
-
-g_io_module_new, function in GIOModule -
-
-
-g_io_module_query, function in GIOModule -
-
-
-g_io_module_scope_block, function in GIOModule -
-
-
-g_io_module_scope_free, function in GIOModule -
-
-
-g_io_module_scope_new, function in GIOModule -
-
-
-g_io_module_unload, function in GIOModule -
-
-
-g_io_scheduler_cancel_all_jobs, function in GIOScheduler -
-
-
-g_io_scheduler_job_send_to_mainloop, function in GIOScheduler -
-
-
-g_io_scheduler_job_send_to_mainloop_async, function in GIOScheduler -
-
-
-g_io_scheduler_push_job, function in GIOScheduler -
-
-
-g_io_stream_clear_pending, function in GIOStream -
-
-
-g_io_stream_close, function in GIOStream -
-
-
-g_io_stream_close_async, function in GIOStream -
-
-
-g_io_stream_close_finish, function in GIOStream -
-
-
-g_io_stream_get_input_stream, function in GIOStream -
-
-
-g_io_stream_get_output_stream, function in GIOStream -
-
-
-g_io_stream_has_pending, function in GIOStream -
-
-
-g_io_stream_is_closed, function in GIOStream -
-
-
-g_io_stream_set_pending, function in GIOStream -
-
-
-g_io_stream_splice_async, function in GIOStream -
-
-
-g_io_stream_splice_finish, function in GIOStream -
-
-

K

-
-g_keyfile_settings_backend_new, function in GSettingsBackend -
-
-

L

-
-GListModel, struct in GListModel -
-
-
-GListModel::items-changed, object signal in GListModel -
-
-
-GListModelInterface, struct in GListModel -
-
-
-GListStore, struct in GListStore -
-
-
-GListStore:item-type, object property in GListStore -
-
-
-g_list_model_get_item, function in GListModel -
-
-
-g_list_model_get_item_type, function in GListModel -
-
-
-g_list_model_get_n_items, function in GListModel -
-
-
-g_list_model_get_object, function in GListModel -
-
-
-g_list_model_items_changed, function in GListModel -
-
-
-g_list_store_append, function in GListStore -
-
-
-g_list_store_insert, function in GListStore -
-
-
-g_list_store_insert_sorted, function in GListStore -
-
-
-g_list_store_new, function in GListStore -
-
-
-g_list_store_remove, function in GListStore -
-
-
-g_list_store_remove_all, function in GListStore -
-
-
-g_list_store_sort, function in GListStore -
-
-
-g_list_store_splice, function in GListStore -
-
-
-GLoadableIcon, struct in GLoadableIcon -
-
-
-GLoadableIconIface, struct in GLoadableIcon -
-
-
-g_loadable_icon_load, function in GLoadableIcon -
-
-
-g_loadable_icon_load_async, function in GLoadableIcon -
-
-
-g_loadable_icon_load_finish, function in GLoadableIcon -
-
-

M

-
-GMemoryInputStream, struct in GMemoryInputStream -
-
-
-GMemoryOutputStream, struct in GMemoryOutputStream -
-
-
-GMemoryOutputStream:data, object property in GMemoryOutputStream -
-
-
-GMemoryOutputStream:data-size, object property in GMemoryOutputStream -
-
-
-GMemoryOutputStream:destroy-function, object property in GMemoryOutputStream -
-
-
-GMemoryOutputStream:realloc-function, object property in GMemoryOutputStream -
-
-
-GMemoryOutputStream:size, object property in GMemoryOutputStream -
-
-
-g_memory_input_stream_add_bytes, function in GMemoryInputStream -
-
-
-g_memory_input_stream_add_data, function in GMemoryInputStream -
-
-
-g_memory_input_stream_new, function in GMemoryInputStream -
-
-
-g_memory_input_stream_new_from_bytes, function in GMemoryInputStream -
-
-
-g_memory_input_stream_new_from_data, function in GMemoryInputStream -
-
-
-g_memory_output_stream_get_data, function in GMemoryOutputStream -
-
-
-g_memory_output_stream_get_data_size, function in GMemoryOutputStream -
-
-
-g_memory_output_stream_get_size, function in GMemoryOutputStream -
-
-
-g_memory_output_stream_new, function in GMemoryOutputStream -
-
-
-g_memory_output_stream_new_resizable, function in GMemoryOutputStream -
-
-
-g_memory_output_stream_steal_as_bytes, function in GMemoryOutputStream -
-
-
-g_memory_output_stream_steal_data, function in GMemoryOutputStream -
-
-
-g_memory_settings_backend_new, function in GSettingsBackend -
-
-
-GMenu, struct in GMenu -
-
-
-GMenuAttributeIter, struct in GMenuModel -
-
-
-GMenuItem, struct in GMenu -
-
-
-GMenuLinkIter, struct in GMenuModel -
-
-
-GMenuModel, struct in GMenuModel -
-
-
-GMenuModel::items-changed, object signal in GMenuModel -
-
-
-g_menu_append, function in GMenu -
-
-
-g_menu_append_item, function in GMenu -
-
-
-g_menu_append_section, function in GMenu -
-
-
-g_menu_append_submenu, function in GMenu -
-
-
-G_MENU_ATTRIBUTE_ACTION, macro in GMenuModel -
-
-
-G_MENU_ATTRIBUTE_ACTION_NAMESPACE, macro in GMenuModel -
-
-
-G_MENU_ATTRIBUTE_ICON, macro in GMenuModel -
-
-
-g_menu_attribute_iter_get_name, function in GMenuModel -
-
-
-g_menu_attribute_iter_get_next, function in GMenuModel -
-
-
-g_menu_attribute_iter_get_value, function in GMenuModel -
-
-
-g_menu_attribute_iter_next, function in GMenuModel -
-
-
-G_MENU_ATTRIBUTE_LABEL, macro in GMenuModel -
-
-
-G_MENU_ATTRIBUTE_TARGET, macro in GMenuModel -
-
-
-g_menu_freeze, function in GMenu -
-
-
-g_menu_insert, function in GMenu -
-
-
-g_menu_insert_item, function in GMenu -
-
-
-g_menu_insert_section, function in GMenu -
-
-
-g_menu_insert_submenu, function in GMenu -
-
-
-g_menu_item_get_attribute, function in GMenu -
-
-
-g_menu_item_get_attribute_value, function in GMenu -
-
-
-g_menu_item_get_link, function in GMenu -
-
-
-g_menu_item_new, function in GMenu -
-
-
-g_menu_item_new_from_model, function in GMenu -
-
-
-g_menu_item_new_section, function in GMenu -
-
-
-g_menu_item_new_submenu, function in GMenu -
-
-
-g_menu_item_set_action_and_target, function in GMenu -
-
-
-g_menu_item_set_action_and_target_value, function in GMenu -
-
-
-g_menu_item_set_attribute, function in GMenu -
-
-
-g_menu_item_set_attribute_value, function in GMenu -
-
-
-g_menu_item_set_detailed_action, function in GMenu -
-
-
-g_menu_item_set_icon, function in GMenu -
-
-
-g_menu_item_set_label, function in GMenu -
-
-
-g_menu_item_set_link, function in GMenu -
-
-
-g_menu_item_set_section, function in GMenu -
-
-
-g_menu_item_set_submenu, function in GMenu -
-
-
-g_menu_link_iter_get_name, function in GMenuModel -
-
-
-g_menu_link_iter_get_next, function in GMenuModel -
-
-
-g_menu_link_iter_get_value, function in GMenuModel -
-
-
-g_menu_link_iter_next, function in GMenuModel -
-
-
-G_MENU_LINK_SECTION, macro in GMenuModel -
-
-
-G_MENU_LINK_SUBMENU, macro in GMenuModel -
-
-
-g_menu_model_get_item_attribute, function in GMenuModel -
-
-
-g_menu_model_get_item_attribute_value, function in GMenuModel -
-
-
-g_menu_model_get_item_link, function in GMenuModel -
-
-
-g_menu_model_get_n_items, function in GMenuModel -
-
-
-g_menu_model_is_mutable, function in GMenuModel -
-
-
-g_menu_model_items_changed, function in GMenuModel -
-
-
-g_menu_model_iterate_item_attributes, function in GMenuModel -
-
-
-g_menu_model_iterate_item_links, function in GMenuModel -
-
-
-g_menu_new, function in GMenu -
-
-
-g_menu_prepend, function in GMenu -
-
-
-g_menu_prepend_item, function in GMenu -
-
-
-g_menu_prepend_section, function in GMenu -
-
-
-g_menu_prepend_submenu, function in GMenu -
-
-
-g_menu_remove, function in GMenu -
-
-
-g_menu_remove_all, function in GMenu -
-
-
-GMount, struct in GMount -
-
-
-GMount::changed, object signal in GMount -
-
-
-GMount::pre-unmount, object signal in GMount -
-
-
-GMount::unmounted, object signal in GMount -
-
-
-GMountIface, struct in GMount -
-
-
-GMountMountFlags, enum in GMount -
-
-
-GMountOperation, struct in GMountOperation -
-
-
-GMountOperation::aborted, object signal in GMountOperation -
-
-
-GMountOperation::ask-password, object signal in GMountOperation -
-
-
-GMountOperation::ask-question, object signal in GMountOperation -
-
-
-GMountOperation::reply, object signal in GMountOperation -
-
-
-GMountOperation::show-processes, object signal in GMountOperation -
-
-
-GMountOperation::show-unmount-progress, object signal in GMountOperation -
-
-
-GMountOperation:anonymous, object property in GMountOperation -
-
-
-GMountOperation:choice, object property in GMountOperation -
-
-
-GMountOperation:domain, object property in GMountOperation -
-
-
-GMountOperation:password, object property in GMountOperation -
-
-
-GMountOperation:password-save, object property in GMountOperation -
-
-
-GMountOperation:username, object property in GMountOperation -
-
-
-GMountOperationResult, enum in GMountOperation -
-
-
-GMountUnmountFlags, enum in GMount -
-
-
-g_mount_can_eject, function in GMount -
-
-
-g_mount_can_unmount, function in GMount -
-
-
-g_mount_eject, function in GMount -
-
-
-g_mount_eject_finish, function in GMount -
-
-
-g_mount_eject_with_operation, function in GMount -
-
-
-g_mount_eject_with_operation_finish, function in GMount -
-
-
-g_mount_get_default_location, function in GMount -
-
-
-g_mount_get_drive, function in GMount -
-
-
-g_mount_get_icon, function in GMount -
-
-
-g_mount_get_name, function in GMount -
-
-
-g_mount_get_root, function in GMount -
-
-
-g_mount_get_sort_key, function in GMount -
-
-
-g_mount_get_symbolic_icon, function in GMount -
-
-
-g_mount_get_uuid, function in GMount -
-
-
-g_mount_get_volume, function in GMount -
-
-
-g_mount_guess_content_type, function in GMount -
-
-
-g_mount_guess_content_type_finish, function in GMount -
-
-
-g_mount_guess_content_type_sync, function in GMount -
-
-
-g_mount_is_shadowed, function in GMount -
-
-
-g_mount_operation_get_anonymous, function in GMountOperation -
-
-
-g_mount_operation_get_choice, function in GMountOperation -
-
-
-g_mount_operation_get_domain, function in GMountOperation -
-
-
-g_mount_operation_get_password, function in GMountOperation -
-
-
-g_mount_operation_get_password_save, function in GMountOperation -
-
-
-g_mount_operation_get_username, function in GMountOperation -
-
-
-g_mount_operation_new, function in GMountOperation -
-
-
-g_mount_operation_reply, function in GMountOperation -
-
-
-g_mount_operation_set_anonymous, function in GMountOperation -
-
-
-g_mount_operation_set_choice, function in GMountOperation -
-
-
-g_mount_operation_set_domain, function in GMountOperation -
-
-
-g_mount_operation_set_password, function in GMountOperation -
-
-
-g_mount_operation_set_password_save, function in GMountOperation -
-
-
-g_mount_operation_set_username, function in GMountOperation -
-
-
-g_mount_remount, function in GMount -
-
-
-g_mount_remount_finish, function in GMount -
-
-
-g_mount_shadow, function in GMount -
-
-
-g_mount_unmount, function in GMount -
-
-
-g_mount_unmount_finish, function in GMount -
-
-
-g_mount_unmount_with_operation, function in GMount -
-
-
-g_mount_unmount_with_operation_finish, function in GMount -
-
-
-g_mount_unshadow, function in GMount -
-
-

N

-
-GNativeSocketAddress, struct in GNativeSocketAddress -
-
-
-g_native_socket_address_new, function in GNativeSocketAddress -
-
-
-GNetworkAddress, struct in GNetworkAddress -
-
-
-GNetworkAddress:hostname, object property in GNetworkAddress -
-
-
-GNetworkAddress:port, object property in GNetworkAddress -
-
-
-GNetworkAddress:scheme, object property in GNetworkAddress -
-
-
-GNetworkConnectivity, enum in GNetworkMonitor -
-
-
-g_networking_init, function in gnetworking.h -
-
-
-GNetworkMonitor, struct in GNetworkMonitor -
-
-
-GNetworkMonitor::network-changed, object signal in GNetworkMonitor -
-
-
-GNetworkMonitor:connectivity, object property in GNetworkMonitor -
-
-
-GNetworkMonitor:network-available, object property in GNetworkMonitor -
-
-
-GNetworkMonitor:network-metered, object property in GNetworkMonitor -
-
-
-GNetworkMonitorInterface, struct in GNetworkMonitor -
-
-
-GNetworkService, struct in GNetworkService -
-
-
-GNetworkService:domain, object property in GNetworkService -
-
-
-GNetworkService:protocol, object property in GNetworkService -
-
-
-GNetworkService:scheme, object property in GNetworkService -
-
-
-GNetworkService:service, object property in GNetworkService -
-
-
-g_network_address_get_hostname, function in GNetworkAddress -
-
-
-g_network_address_get_port, function in GNetworkAddress -
-
-
-g_network_address_get_scheme, function in GNetworkAddress -
-
-
-g_network_address_new, function in GNetworkAddress -
-
-
-g_network_address_new_loopback, function in GNetworkAddress -
-
-
-g_network_address_parse, function in GNetworkAddress -
-
-
-g_network_address_parse_uri, function in GNetworkAddress -
-
-
-g_network_monitor_can_reach, function in GNetworkMonitor -
-
-
-g_network_monitor_can_reach_async, function in GNetworkMonitor -
-
-
-g_network_monitor_can_reach_finish, function in GNetworkMonitor -
-
-
-G_NETWORK_MONITOR_EXTENSION_POINT_NAME, macro in GNetworkMonitor -
-
-
-g_network_monitor_get_connectivity, function in GNetworkMonitor -
-
-
-g_network_monitor_get_default, function in GNetworkMonitor -
-
-
-g_network_monitor_get_network_available, function in GNetworkMonitor -
-
-
-g_network_monitor_get_network_metered, function in GNetworkMonitor -
-
-
-g_network_service_get_domain, function in GNetworkService -
-
-
-g_network_service_get_protocol, function in GNetworkService -
-
-
-g_network_service_get_scheme, function in GNetworkService -
-
-
-g_network_service_get_service, function in GNetworkService -
-
-
-g_network_service_new, function in GNetworkService -
-
-
-g_network_service_set_scheme, function in GNetworkService -
-
-
-GNotification, struct in GNotification -
-
-
-GNotificationPriority, enum in GNotification -
-
-
-g_notification_add_button, function in GNotification -
-
-
-g_notification_add_button_with_target, function in GNotification -
-
-
-g_notification_add_button_with_target_value, function in GNotification -
-
-
-g_notification_new, function in GNotification -
-
-
-g_notification_set_body, function in GNotification -
-
-
-g_notification_set_default_action, function in GNotification -
-
-
-g_notification_set_default_action_and_target, function in GNotification -
-
-
-g_notification_set_default_action_and_target_value, function in GNotification -
-
-
-g_notification_set_icon, function in GNotification -
-
-
-g_notification_set_priority, function in GNotification -
-
-
-g_notification_set_title, function in GNotification -
-
-
-g_notification_set_urgent, function in GNotification -
-
-
-g_null_settings_backend_new, function in GSettingsBackend -
-
-

O

-
-GOutputMessage, struct in GSocket -
-
-
-GOutputStream, struct in GOutputStream -
-
-
-GOutputStreamSpliceFlags, enum in GOutputStream -
-
-
-GOutputVector, struct in GSocket -
-
-
-g_output_stream_clear_pending, function in GOutputStream -
-
-
-g_output_stream_close, function in GOutputStream -
-
-
-g_output_stream_close_async, function in GOutputStream -
-
-
-g_output_stream_close_finish, function in GOutputStream -
-
-
-g_output_stream_flush, function in GOutputStream -
-
-
-g_output_stream_flush_async, function in GOutputStream -
-
-
-g_output_stream_flush_finish, function in GOutputStream -
-
-
-g_output_stream_has_pending, function in GOutputStream -
-
-
-g_output_stream_is_closed, function in GOutputStream -
-
-
-g_output_stream_is_closing, function in GOutputStream -
-
-
-g_output_stream_printf, function in GOutputStream -
-
-
-g_output_stream_set_pending, function in GOutputStream -
-
-
-g_output_stream_splice, function in GOutputStream -
-
-
-g_output_stream_splice_async, function in GOutputStream -
-
-
-g_output_stream_splice_finish, function in GOutputStream -
-
-
-g_output_stream_vprintf, function in GOutputStream -
-
-
-g_output_stream_write, function in GOutputStream -
-
-
-g_output_stream_write_all, function in GOutputStream -
-
-
-g_output_stream_write_all_async, function in GOutputStream -
-
-
-g_output_stream_write_all_finish, function in GOutputStream -
-
-
-g_output_stream_write_async, function in GOutputStream -
-
-
-g_output_stream_write_bytes, function in GOutputStream -
-
-
-g_output_stream_write_bytes_async, function in GOutputStream -
-
-
-g_output_stream_write_bytes_finish, function in GOutputStream -
-
-
-g_output_stream_write_finish, function in GOutputStream -
-
-

P

-
-GPasswordSave, enum in GMountOperation -
-
-
-GPermission, struct in GPermission -
-
-
-GPermission:allowed, object property in GPermission -
-
-
-GPermission:can-acquire, object property in GPermission -
-
-
-GPermission:can-release, object property in GPermission -
-
-
-g_permission_acquire, function in GPermission -
-
-
-g_permission_acquire_async, function in GPermission -
-
-
-g_permission_acquire_finish, function in GPermission -
-
-
-g_permission_get_allowed, function in GPermission -
-
-
-g_permission_get_can_acquire, function in GPermission -
-
-
-g_permission_get_can_release, function in GPermission -
-
-
-g_permission_impl_update, function in GPermission -
-
-
-g_permission_release, function in GPermission -
-
-
-g_permission_release_async, function in GPermission -
-
-
-g_permission_release_finish, function in GPermission -
-
-
-GPollableInputStream, struct in GPollableInputStream -
-
-
-GPollableInputStreamInterface, struct in GPollableInputStream -
-
-
-GPollableOutputStream, struct in GPollableOutputStream -
-
-
-GPollableOutputStreamInterface, struct in GPollableOutputStream -
-
-
-GPollableSourceFunc, user_function in gpollableutils -
-
-
-g_pollable_input_stream_can_poll, function in GPollableInputStream -
-
-
-g_pollable_input_stream_create_source, function in GPollableInputStream -
-
-
-g_pollable_input_stream_is_readable, function in GPollableInputStream -
-
-
-g_pollable_input_stream_read_nonblocking, function in GPollableInputStream -
-
-
-g_pollable_output_stream_can_poll, function in GPollableOutputStream -
-
-
-g_pollable_output_stream_create_source, function in GPollableOutputStream -
-
-
-g_pollable_output_stream_is_writable, function in GPollableOutputStream -
-
-
-g_pollable_output_stream_write_nonblocking, function in GPollableOutputStream -
-
-
-g_pollable_source_new, function in gpollableutils -
-
-
-g_pollable_source_new_full, function in gpollableutils -
-
-
-g_pollable_stream_read, function in gpollableutils -
-
-
-g_pollable_stream_write, function in gpollableutils -
-
-
-g_pollable_stream_write_all, function in gpollableutils -
-
-
-GPropertyAction, struct in GPropertyAction -
-
-
-GPropertyAction:enabled, object property in GPropertyAction -
-
-
-GPropertyAction:invert-boolean, object property in GPropertyAction -
-
-
-GPropertyAction:name, object property in GPropertyAction -
-
-
-GPropertyAction:object, object property in GPropertyAction -
-
-
-GPropertyAction:parameter-type, object property in GPropertyAction -
-
-
-GPropertyAction:property-name, object property in GPropertyAction -
-
-
-GPropertyAction:state, object property in GPropertyAction -
-
-
-GPropertyAction:state-type, object property in GPropertyAction -
-
-
-g_property_action_new, function in GPropertyAction -
-
-
-GProxy, struct in GProxy -
-
-
-GProxyAddress, struct in GProxyAddress -
-
-
-GProxyAddress:destination-hostname, object property in GProxyAddress -
-
-
-GProxyAddress:destination-port, object property in GProxyAddress -
-
-
-GProxyAddress:destination-protocol, object property in GProxyAddress -
-
-
-GProxyAddress:password, object property in GProxyAddress -
-
-
-GProxyAddress:protocol, object property in GProxyAddress -
-
-
-GProxyAddress:uri, object property in GProxyAddress -
-
-
-GProxyAddress:username, object property in GProxyAddress -
-
-
-GProxyAddressClass, struct in GProxyAddress -
-
-
-GProxyAddressEnumerator, struct in GSocketConnectable -
-
-
-GProxyAddressEnumerator:connectable, object property in GSocketConnectable -
-
-
-GProxyAddressEnumerator:default-port, object property in GSocketConnectable -
-
-
-GProxyAddressEnumerator:proxy-resolver, object property in GSocketConnectable -
-
-
-GProxyAddressEnumerator:uri, object property in GSocketConnectable -
-
-
-GProxyInterface, struct in GProxy -
-
-
-GProxyResolver, struct in GProxyResolver -
-
-
-GProxyResolverInterface, struct in GProxyResolver -
-
-
-g_proxy_address_get_destination_hostname, function in GProxyAddress -
-
-
-g_proxy_address_get_destination_port, function in GProxyAddress -
-
-
-g_proxy_address_get_destination_protocol, function in GProxyAddress -
-
-
-g_proxy_address_get_password, function in GProxyAddress -
-
-
-g_proxy_address_get_protocol, function in GProxyAddress -
-
-
-g_proxy_address_get_uri, function in GProxyAddress -
-
-
-g_proxy_address_get_username, function in GProxyAddress -
-
-
-g_proxy_address_new, function in GProxyAddress -
-
-
-g_proxy_connect, function in GProxy -
-
-
-g_proxy_connect_async, function in GProxy -
-
-
-g_proxy_connect_finish, function in GProxy -
-
-
-G_PROXY_EXTENSION_POINT_NAME, macro in GProxy -
-
-
-g_proxy_get_default_for_protocol, function in GProxy -
-
-
-G_PROXY_RESOLVER_EXTENSION_POINT_NAME, macro in GProxyResolver -
-
-
-g_proxy_resolver_get_default, function in GProxyResolver -
-
-
-g_proxy_resolver_is_supported, function in GProxyResolver -
-
-
-g_proxy_resolver_lookup, function in GProxyResolver -
-
-
-g_proxy_resolver_lookup_async, function in GProxyResolver -
-
-
-g_proxy_resolver_lookup_finish, function in GProxyResolver -
-
-
-g_proxy_supports_hostname, function in GProxy -
-
-

R

-
-GReallocFunc, user_function in GMemoryOutputStream -
-
-
-GRemoteActionGroup, struct in GRemoteActionGroup -
-
-
-GRemoteActionGroupInterface, struct in GRemoteActionGroup -
-
-
-g_remote_action_group_activate_action_full, function in GRemoteActionGroup -
-
-
-g_remote_action_group_change_action_state_full, function in GRemoteActionGroup -
-
-
-GResolver, struct in GResolver -
-
-
-GResolver::reload, object signal in GResolver -
-
-
-GResolverError, enum in GResolver -
-
-
-GResolverRecordType, enum in GResolver -
-
-
-G_RESOLVER_ERROR, macro in GResolver -
-
-
-g_resolver_free_addresses, function in GResolver -
-
-
-g_resolver_free_targets, function in GResolver -
-
-
-g_resolver_get_default, function in GResolver -
-
-
-g_resolver_lookup_by_address, function in GResolver -
-
-
-g_resolver_lookup_by_address_async, function in GResolver -
-
-
-g_resolver_lookup_by_address_finish, function in GResolver -
-
-
-g_resolver_lookup_by_name, function in GResolver -
-
-
-g_resolver_lookup_by_name_async, function in GResolver -
-
-
-g_resolver_lookup_by_name_finish, function in GResolver -
-
-
-g_resolver_lookup_records, function in GResolver -
-
-
-g_resolver_lookup_records_async, function in GResolver -
-
-
-g_resolver_lookup_records_finish, function in GResolver -
-
-
-g_resolver_lookup_service, function in GResolver -
-
-
-g_resolver_lookup_service_async, function in GResolver -
-
-
-g_resolver_lookup_service_finish, function in GResolver -
-
-
-g_resolver_set_default, function in GResolver -
-
-
-GResource, struct in GResource -
-
-
-GResourceError, enum in GResource -
-
-
-GResourceFlags, enum in GResource -
-
-
-GResourceLookupFlags, enum in GResource -
-
-
-g_resources_enumerate_children, function in GResource -
-
-
-g_resources_get_info, function in GResource -
-
-
-g_resources_lookup_data, function in GResource -
-
-
-g_resources_open_stream, function in GResource -
-
-
-g_resources_register, function in GResource -
-
-
-g_resources_unregister, function in GResource -
-
-
-g_resource_enumerate_children, function in GResource -
-
-
-G_RESOURCE_ERROR, macro in GResource -
-
-
-g_resource_get_info, function in GResource -
-
-
-g_resource_load, function in GResource -
-
-
-g_resource_lookup_data, function in GResource -
-
-
-g_resource_new_from_data, function in GResource -
-
-
-g_resource_open_stream, function in GResource -
-
-
-g_resource_ref, function in GResource -
-
-
-g_resource_unref, function in GResource -
-
-

S

-
-GSeekable, struct in GSeekable -
-
-
-GSeekableIface, struct in GSeekable -
-
-
-g_seekable_can_seek, function in GSeekable -
-
-
-g_seekable_can_truncate, function in GSeekable -
-
-
-g_seekable_seek, function in GSeekable -
-
-
-g_seekable_tell, function in GSeekable -
-
-
-g_seekable_truncate, function in GSeekable -
-
-
-GSettings, struct in GSettings -
-
-
-GSettings::change-event, object signal in GSettings -
-
-
-GSettings::changed, object signal in GSettings -
-
-
-GSettings::writable-change-event, object signal in GSettings -
-
-
-GSettings::writable-changed, object signal in GSettings -
-
-
-GSettings:backend, object property in GSettings -
-
-
-GSettings:delay-apply, object property in GSettings -
-
-
-GSettings:has-unapplied, object property in GSettings -
-
-
-GSettings:path, object property in GSettings -
-
-
-GSettings:schema, object property in GSettings -
-
-
-GSettings:schema-id, object property in GSettings -
-
-
-GSettings:settings-schema, object property in GSettings -
-
-
-GSettingsBackend, struct in GSettingsBackend -
-
-
-GSettingsBackendClass, struct in GSettingsBackend -
-
-
-GSettingsBindFlags, enum in GSettings -
-
-
-GSettingsBindGetMapping, user_function in GSettings -
-
-
-GSettingsBindSetMapping, user_function in GSettings -
-
-
-GSettingsGetMapping, user_function in GSettings -
-
-
-GSettingsSchema, struct in GSettingsSchema, GSettingsSchemaSource -
-
-
-GSettingsSchemaKey, struct in GSettingsSchema, GSettingsSchemaSource -
-
-
-GSettingsSchemaSource, struct in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_apply, function in GSettings -
-
-
-g_settings_backend_changed, function in GSettingsBackend -
-
-
-g_settings_backend_changed_tree, function in GSettingsBackend -
-
-
-G_SETTINGS_BACKEND_EXTENSION_POINT_NAME, macro in GSettingsBackend -
-
-
-g_settings_backend_flatten_tree, function in GSettingsBackend -
-
-
-g_settings_backend_get_default, function in GSettingsBackend -
-
-
-g_settings_backend_keys_changed, function in GSettingsBackend -
-
-
-g_settings_backend_path_changed, function in GSettingsBackend -
-
-
-g_settings_backend_path_writable_changed, function in GSettingsBackend -
-
-
-g_settings_backend_writable_changed, function in GSettingsBackend -
-
-
-g_settings_bind, function in GSettings -
-
-
-g_settings_bind_with_mapping, function in GSettings -
-
-
-g_settings_bind_writable, function in GSettings -
-
-
-g_settings_create_action, function in GSettings -
-
-
-g_settings_delay, function in GSettings -
-
-
-g_settings_get, function in GSettings -
-
-
-g_settings_get_boolean, function in GSettings -
-
-
-g_settings_get_child, function in GSettings -
-
-
-g_settings_get_default_value, function in GSettings -
-
-
-g_settings_get_double, function in GSettings -
-
-
-g_settings_get_enum, function in GSettings -
-
-
-g_settings_get_flags, function in GSettings -
-
-
-g_settings_get_has_unapplied, function in GSettings -
-
-
-g_settings_get_int, function in GSettings -
-
-
-g_settings_get_int64, function in GSettings -
-
-
-g_settings_get_mapped, function in GSettings -
-
-
-g_settings_get_range, function in GSettings -
-
-
-g_settings_get_string, function in GSettings -
-
-
-g_settings_get_strv, function in GSettings -
-
-
-g_settings_get_uint, function in GSettings -
-
-
-g_settings_get_uint64, function in GSettings -
-
-
-g_settings_get_user_value, function in GSettings -
-
-
-g_settings_get_value, function in GSettings -
-
-
-g_settings_is_writable, function in GSettings -
-
-
-g_settings_list_children, function in GSettings -
-
-
-g_settings_list_keys, function in GSettings -
-
-
-g_settings_list_relocatable_schemas, function in GSettings -
-
-
-g_settings_list_schemas, function in GSettings -
-
-
-g_settings_new, function in GSettings -
-
-
-g_settings_new_full, function in GSettings -
-
-
-g_settings_new_with_backend, function in GSettings -
-
-
-g_settings_new_with_backend_and_path, function in GSettings -
-
-
-g_settings_new_with_path, function in GSettings -
-
-
-g_settings_range_check, function in GSettings -
-
-
-g_settings_reset, function in GSettings -
-
-
-g_settings_revert, function in GSettings -
-
-
-g_settings_schema_get_id, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_get_key, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_get_path, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_has_key, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_key_get_default_value, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_key_get_description, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_key_get_name, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_key_get_range, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_key_get_summary, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_key_get_value_type, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_key_range_check, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_key_ref, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_key_unref, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_list_children, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_list_keys, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_ref, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_source_get_default, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_source_list_schemas, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_source_lookup, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_source_new_from_directory, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_source_ref, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_source_unref, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_schema_unref, function in GSettingsSchema, GSettingsSchemaSource -
-
-
-g_settings_set, function in GSettings -
-
-
-g_settings_set_boolean, function in GSettings -
-
-
-g_settings_set_double, function in GSettings -
-
-
-g_settings_set_enum, function in GSettings -
-
-
-g_settings_set_flags, function in GSettings -
-
-
-g_settings_set_int, function in GSettings -
-
-
-g_settings_set_int64, function in GSettings -
-
-
-g_settings_set_string, function in GSettings -
-
-
-g_settings_set_strv, function in GSettings -
-
-
-g_settings_set_uint, function in GSettings -
-
-
-g_settings_set_uint64, function in GSettings -
-
-
-g_settings_set_value, function in GSettings -
-
-
-g_settings_sync, function in GSettings -
-
-
-g_settings_unbind, function in GSettings -
-
-
-GSimpleAction, struct in GSimpleAction -
-
-
-GSimpleAction::activate, object signal in GSimpleAction -
-
-
-GSimpleAction::change-state, object signal in GSimpleAction -
-
-
-GSimpleAction:enabled, object property in GSimpleAction -
-
-
-GSimpleAction:name, object property in GSimpleAction -
-
-
-GSimpleAction:parameter-type, object property in GSimpleAction -
-
-
-GSimpleAction:state, object property in GSimpleAction -
-
-
-GSimpleAction:state-type, object property in GSimpleAction -
-
-
-GSimpleActionGroup, struct in GSimpleActionGroup -
-
-
-GSimpleAsyncResult, struct in GSimpleAsyncResult -
-
-
-GSimpleAsyncThreadFunc, user_function in GSimpleAsyncResult -
-
-
-GSimpleIOStream, struct in GSimpleIOStream -
-
-
-GSimpleIOStream:input-stream, object property in GSimpleIOStream -
-
-
-GSimpleIOStream:output-stream, object property in GSimpleIOStream -
-
-
-GSimplePermission, struct in GSimplePermission -
-
-
-GSimpleProxyResolver, struct in GSimpleProxyResolver -
-
-
-GSimpleProxyResolver:default-proxy, object property in GSimpleProxyResolver -
-
-
-GSimpleProxyResolver:ignore-hosts, object property in GSimpleProxyResolver -
-
-
-g_simple_action_group_add_entries, function in GSimpleActionGroup -
-
-
-g_simple_action_group_insert, function in GSimpleActionGroup -
-
-
-g_simple_action_group_lookup, function in GSimpleActionGroup -
-
-
-g_simple_action_group_new, function in GSimpleActionGroup -
-
-
-g_simple_action_group_remove, function in GSimpleActionGroup -
-
-
-g_simple_action_new, function in GSimpleAction -
-
-
-g_simple_action_new_stateful, function in GSimpleAction -
-
-
-g_simple_action_set_enabled, function in GSimpleAction -
-
-
-g_simple_action_set_state, function in GSimpleAction -
-
-
-g_simple_action_set_state_hint, function in GSimpleAction -
-
-
-g_simple_async_report_error_in_idle, function in GSimpleAsyncResult -
-
-
-g_simple_async_report_gerror_in_idle, function in GSimpleAsyncResult -
-
-
-g_simple_async_report_take_gerror_in_idle, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_complete, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_complete_in_idle, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_get_op_res_gboolean, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_get_op_res_gpointer, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_get_op_res_gssize, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_get_source_tag, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_is_valid, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_new, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_new_error, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_new_from_error, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_new_take_error, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_propagate_error, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_run_in_thread, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_set_check_cancellable, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_set_error, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_set_error_va, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_set_from_error, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_set_handle_cancellation, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_set_op_res_gboolean, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_set_op_res_gpointer, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_set_op_res_gssize, function in GSimpleAsyncResult -
-
-
-g_simple_async_result_take_error, function in GSimpleAsyncResult -
-
-
-g_simple_io_stream_new, function in GSimpleIOStream -
-
-
-g_simple_permission_new, function in GSimplePermission -
-
-
-g_simple_proxy_resolver_new, function in GSimpleProxyResolver -
-
-
-g_simple_proxy_resolver_set_default_proxy, function in GSimpleProxyResolver -
-
-
-g_simple_proxy_resolver_set_ignore_hosts, function in GSimpleProxyResolver -
-
-
-g_simple_proxy_resolver_set_uri_proxy, function in GSimpleProxyResolver -
-
-
-GSocket, struct in GSocket -
-
-
-GSocket:blocking, object property in GSocket -
-
-
-GSocket:broadcast, object property in GSocket -
-
-
-GSocket:family, object property in GSocket -
-
-
-GSocket:fd, object property in GSocket -
-
-
-GSocket:keepalive, object property in GSocket -
-
-
-GSocket:listen-backlog, object property in GSocket -
-
-
-GSocket:local-address, object property in GSocket -
-
-
-GSocket:multicast-loopback, object property in GSocket -
-
-
-GSocket:multicast-ttl, object property in GSocket -
-
-
-GSocket:protocol, object property in GSocket -
-
-
-GSocket:remote-address, object property in GSocket -
-
-
-GSocket:timeout, object property in GSocket -
-
-
-GSocket:ttl, object property in GSocket -
-
-
-GSocket:type, object property in GSocket -
-
-
-GSocketAddress, struct in GSocketAddress -
-
-
-GSocketAddress:family, object property in GSocketAddress -
-
-
-GSocketAddressEnumerator, struct in GSocketConnectable -
-
-
-GSocketClient, struct in GSocketClient -
-
-
-GSocketClient::event, object signal in GSocketClient -
-
-
-GSocketClient:enable-proxy, object property in GSocketClient -
-
-
-GSocketClient:family, object property in GSocketClient -
-
-
-GSocketClient:local-address, object property in GSocketClient -
-
-
-GSocketClient:protocol, object property in GSocketClient -
-
-
-GSocketClient:proxy-resolver, object property in GSocketClient -
-
-
-GSocketClient:timeout, object property in GSocketClient -
-
-
-GSocketClient:tls, object property in GSocketClient -
-
-
-GSocketClient:tls-validation-flags, object property in GSocketClient -
-
-
-GSocketClient:type, object property in GSocketClient -
-
-
-GSocketClientEvent, enum in GSocketClient -
-
-
-GSocketConnectable, struct in GSocketConnectable -
-
-
-GSocketConnectableIface, struct in GSocketConnectable -
-
-
-GSocketConnection, struct in GSocketConnection -
-
-
-GSocketConnection:socket, object property in GSocketConnection -
-
-
-GSocketControlMessage, struct in GSocketControlMessage -
-
-
-GSocketFamily, enum in GSocketAddress -
-
-
-GSocketListener, struct in GSocketListener -
-
-
-GSocketListener::event, object signal in GSocketListener -
-
-
-GSocketListener:listen-backlog, object property in GSocketListener -
-
-
-GSocketListenerEvent, enum in GSocketListener -
-
-
-GSocketMsgFlags, enum in GSocket -
-
-
-GSocketProtocol, enum in GSocket -
-
-
-GSocketService, struct in GSocketService -
-
-
-GSocketService::incoming, object signal in GSocketService -
-
-
-GSocketService:active, object property in GSocketService -
-
-
-GSocketSourceFunc, user_function in GSocket -
-
-
-GSocketType, enum in GSocket -
-
-
-g_socket_accept, function in GSocket -
-
-
-g_socket_address_enumerator_next, function in GSocketConnectable -
-
-
-g_socket_address_enumerator_next_async, function in GSocketConnectable -
-
-
-g_socket_address_enumerator_next_finish, function in GSocketConnectable -
-
-
-g_socket_address_get_family, function in GSocketAddress -
-
-
-g_socket_address_get_native_size, function in GSocketAddress -
-
-
-g_socket_address_new_from_native, function in GSocketAddress -
-
-
-g_socket_address_to_native, function in GSocketAddress -
-
-
-g_socket_bind, function in GSocket -
-
-
-g_socket_check_connect_result, function in GSocket -
-
-
-g_socket_client_add_application_proxy, function in GSocketClient -
-
-
-g_socket_client_connect, function in GSocketClient -
-
-
-g_socket_client_connect_async, function in GSocketClient -
-
-
-g_socket_client_connect_finish, function in GSocketClient -
-
-
-g_socket_client_connect_to_host, function in GSocketClient -
-
-
-g_socket_client_connect_to_host_async, function in GSocketClient -
-
-
-g_socket_client_connect_to_host_finish, function in GSocketClient -
-
-
-g_socket_client_connect_to_service, function in GSocketClient -
-
-
-g_socket_client_connect_to_service_async, function in GSocketClient -
-
-
-g_socket_client_connect_to_service_finish, function in GSocketClient -
-
-
-g_socket_client_connect_to_uri, function in GSocketClient -
-
-
-g_socket_client_connect_to_uri_async, function in GSocketClient -
-
-
-g_socket_client_connect_to_uri_finish, function in GSocketClient -
-
-
-g_socket_client_get_enable_proxy, function in GSocketClient -
-
-
-g_socket_client_get_family, function in GSocketClient -
-
-
-g_socket_client_get_local_address, function in GSocketClient -
-
-
-g_socket_client_get_protocol, function in GSocketClient -
-
-
-g_socket_client_get_proxy_resolver, function in GSocketClient -
-
-
-g_socket_client_get_socket_type, function in GSocketClient -
-
-
-g_socket_client_get_timeout, function in GSocketClient -
-
-
-g_socket_client_get_tls, function in GSocketClient -
-
-
-g_socket_client_get_tls_validation_flags, function in GSocketClient -
-
-
-g_socket_client_new, function in GSocketClient -
-
-
-g_socket_client_set_enable_proxy, function in GSocketClient -
-
-
-g_socket_client_set_family, function in GSocketClient -
-
-
-g_socket_client_set_local_address, function in GSocketClient -
-
-
-g_socket_client_set_protocol, function in GSocketClient -
-
-
-g_socket_client_set_proxy_resolver, function in GSocketClient -
-
-
-g_socket_client_set_socket_type, function in GSocketClient -
-
-
-g_socket_client_set_timeout, function in GSocketClient -
-
-
-g_socket_client_set_tls, function in GSocketClient -
-
-
-g_socket_client_set_tls_validation_flags, function in GSocketClient -
-
-
-g_socket_close, function in GSocket -
-
-
-g_socket_condition_check, function in GSocket -
-
-
-g_socket_condition_timed_wait, function in GSocket -
-
-
-g_socket_condition_wait, function in GSocket -
-
-
-g_socket_connect, function in GSocket -
-
-
-g_socket_connectable_enumerate, function in GSocketConnectable -
-
-
-g_socket_connectable_proxy_enumerate, function in GSocketConnectable -
-
-
-g_socket_connectable_to_string, function in GSocketConnectable -
-
-
-g_socket_connection_connect, function in GSocketConnection -
-
-
-g_socket_connection_connect_async, function in GSocketConnection -
-
-
-g_socket_connection_connect_finish, function in GSocketConnection -
-
-
-g_socket_connection_factory_create_connection, function in GSocketConnection -
-
-
-g_socket_connection_factory_lookup_type, function in GSocketConnection -
-
-
-g_socket_connection_factory_register_type, function in GSocketConnection -
-
-
-g_socket_connection_get_local_address, function in GSocketConnection -
-
-
-g_socket_connection_get_remote_address, function in GSocketConnection -
-
-
-g_socket_connection_get_socket, function in GSocketConnection -
-
-
-g_socket_connection_is_connected, function in GSocketConnection -
-
-
-g_socket_control_message_deserialize, function in GSocketControlMessage -
-
-
-g_socket_control_message_get_level, function in GSocketControlMessage -
-
-
-g_socket_control_message_get_msg_type, function in GSocketControlMessage -
-
-
-g_socket_control_message_get_size, function in GSocketControlMessage -
-
-
-g_socket_control_message_serialize, function in GSocketControlMessage -
-
-
-g_socket_create_source, function in GSocket -
-
-
-g_socket_get_available_bytes, function in GSocket -
-
-
-g_socket_get_blocking, function in GSocket -
-
-
-g_socket_get_broadcast, function in GSocket -
-
-
-g_socket_get_credentials, function in GSocket -
-
-
-g_socket_get_family, function in GSocket -
-
-
-g_socket_get_fd, function in GSocket -
-
-
-g_socket_get_keepalive, function in GSocket -
-
-
-g_socket_get_listen_backlog, function in GSocket -
-
-
-g_socket_get_local_address, function in GSocket -
-
-
-g_socket_get_multicast_loopback, function in GSocket -
-
-
-g_socket_get_multicast_ttl, function in GSocket -
-
-
-g_socket_get_option, function in GSocket -
-
-
-g_socket_get_protocol, function in GSocket -
-
-
-g_socket_get_remote_address, function in GSocket -
-
-
-g_socket_get_socket_type, function in GSocket -
-
-
-g_socket_get_timeout, function in GSocket -
-
-
-g_socket_get_ttl, function in GSocket -
-
-
-g_socket_is_closed, function in GSocket -
-
-
-g_socket_is_connected, function in GSocket -
-
-
-g_socket_join_multicast_group, function in GSocket -
-
-
-g_socket_leave_multicast_group, function in GSocket -
-
-
-g_socket_listen, function in GSocket -
-
-
-g_socket_listener_accept, function in GSocketListener -
-
-
-g_socket_listener_accept_async, function in GSocketListener -
-
-
-g_socket_listener_accept_finish, function in GSocketListener -
-
-
-g_socket_listener_accept_socket, function in GSocketListener -
-
-
-g_socket_listener_accept_socket_async, function in GSocketListener -
-
-
-g_socket_listener_accept_socket_finish, function in GSocketListener -
-
-
-g_socket_listener_add_address, function in GSocketListener -
-
-
-g_socket_listener_add_any_inet_port, function in GSocketListener -
-
-
-g_socket_listener_add_inet_port, function in GSocketListener -
-
-
-g_socket_listener_add_socket, function in GSocketListener -
-
-
-g_socket_listener_close, function in GSocketListener -
-
-
-g_socket_listener_new, function in GSocketListener -
-
-
-g_socket_listener_set_backlog, function in GSocketListener -
-
-
-g_socket_new, function in GSocket -
-
-
-g_socket_new_from_fd, function in GSocket -
-
-
-g_socket_receive, function in GSocket -
-
-
-g_socket_receive_from, function in GSocket -
-
-
-g_socket_receive_message, function in GSocket -
-
-
-g_socket_receive_messages, function in GSocket -
-
-
-g_socket_receive_with_blocking, function in GSocket -
-
-
-g_socket_send, function in GSocket -
-
-
-g_socket_send_message, function in GSocket -
-
-
-g_socket_send_messages, function in GSocket -
-
-
-g_socket_send_to, function in GSocket -
-
-
-g_socket_send_with_blocking, function in GSocket -
-
-
-g_socket_service_is_active, function in GSocketService -
-
-
-g_socket_service_new, function in GSocketService -
-
-
-g_socket_service_start, function in GSocketService -
-
-
-g_socket_service_stop, function in GSocketService -
-
-
-g_socket_set_blocking, function in GSocket -
-
-
-g_socket_set_broadcast, function in GSocket -
-
-
-g_socket_set_keepalive, function in GSocket -
-
-
-g_socket_set_listen_backlog, function in GSocket -
-
-
-g_socket_set_multicast_loopback, function in GSocket -
-
-
-g_socket_set_multicast_ttl, function in GSocket -
-
-
-g_socket_set_option, function in GSocket -
-
-
-g_socket_set_timeout, function in GSocket -
-
-
-g_socket_set_ttl, function in GSocket -
-
-
-g_socket_shutdown, function in GSocket -
-
-
-g_socket_speaks_ipv4, function in GSocket -
-
-
-GSrvTarget, struct in GSrvTarget -
-
-
-g_srv_target_copy, function in GSrvTarget -
-
-
-g_srv_target_free, function in GSrvTarget -
-
-
-g_srv_target_get_hostname, function in GSrvTarget -
-
-
-g_srv_target_get_port, function in GSrvTarget -
-
-
-g_srv_target_get_priority, function in GSrvTarget -
-
-
-g_srv_target_get_weight, function in GSrvTarget -
-
-
-g_srv_target_list_sort, function in GSrvTarget -
-
-
-g_srv_target_new, function in GSrvTarget -
-
-
-GStaticResource, struct in GResource -
-
-
-g_static_resource_fini, function in GResource -
-
-
-g_static_resource_get_resource, function in GResource -
-
-
-g_static_resource_init, function in GResource -
-
-
-GSubprocess, struct in GSubprocess -
-
-
-GSubprocess:argv, object property in GSubprocess -
-
-
-GSubprocess:flags, object property in GSubprocess -
-
-
-GSubprocessFlags, enum in GSubprocess -
-
-
-GSubprocessLauncher, struct in GSubprocessLauncher -
-
-
-GSubprocessLauncher:flags, object property in GSubprocessLauncher -
-
-
-g_subprocess_communicate, function in GSubprocess -
-
-
-g_subprocess_communicate_async, function in GSubprocess -
-
-
-g_subprocess_communicate_finish, function in GSubprocess -
-
-
-g_subprocess_communicate_utf8, function in GSubprocess -
-
-
-g_subprocess_communicate_utf8_async, function in GSubprocess -
-
-
-g_subprocess_communicate_utf8_finish, function in GSubprocess -
-
-
-g_subprocess_force_exit, function in GSubprocess -
-
-
-g_subprocess_get_exit_status, function in GSubprocess -
-
-
-g_subprocess_get_identifier, function in GSubprocess -
-
-
-g_subprocess_get_if_exited, function in GSubprocess -
-
-
-g_subprocess_get_if_signaled, function in GSubprocess -
-
-
-g_subprocess_get_status, function in GSubprocess -
-
-
-g_subprocess_get_stderr_pipe, function in GSubprocess -
-
-
-g_subprocess_get_stdin_pipe, function in GSubprocess -
-
-
-g_subprocess_get_stdout_pipe, function in GSubprocess -
-
-
-g_subprocess_get_successful, function in GSubprocess -
-
-
-g_subprocess_get_term_sig, function in GSubprocess -
-
-
-g_subprocess_launcher_getenv, function in GSubprocessLauncher -
-
-
-g_subprocess_launcher_new, function in GSubprocessLauncher -
-
-
-g_subprocess_launcher_setenv, function in GSubprocessLauncher -
-
-
-g_subprocess_launcher_set_child_setup, function in GSubprocessLauncher -
-
-
-g_subprocess_launcher_set_cwd, function in GSubprocessLauncher -
-
-
-g_subprocess_launcher_set_environ, function in GSubprocessLauncher -
-
-
-g_subprocess_launcher_set_flags, function in GSubprocessLauncher -
-
-
-g_subprocess_launcher_set_stderr_file_path, function in GSubprocessLauncher -
-
-
-g_subprocess_launcher_set_stdin_file_path, function in GSubprocessLauncher -
-
-
-g_subprocess_launcher_set_stdout_file_path, function in GSubprocessLauncher -
-
-
-g_subprocess_launcher_spawn, function in GSubprocessLauncher -
-
-
-g_subprocess_launcher_spawnv, function in GSubprocessLauncher -
-
-
-g_subprocess_launcher_take_fd, function in GSubprocessLauncher -
-
-
-g_subprocess_launcher_take_stderr_fd, function in GSubprocessLauncher -
-
-
-g_subprocess_launcher_take_stdin_fd, function in GSubprocessLauncher -
-
-
-g_subprocess_launcher_take_stdout_fd, function in GSubprocessLauncher -
-
-
-g_subprocess_launcher_unsetenv, function in GSubprocessLauncher -
-
-
-g_subprocess_new, function in GSubprocess -
-
-
-g_subprocess_newv, function in GSubprocess -
-
-
-g_subprocess_send_signal, function in GSubprocess -
-
-
-g_subprocess_wait, function in GSubprocess -
-
-
-g_subprocess_wait_async, function in GSubprocess -
-
-
-g_subprocess_wait_check, function in GSubprocess -
-
-
-g_subprocess_wait_check_async, function in GSubprocess -
-
-
-g_subprocess_wait_check_finish, function in GSubprocess -
-
-
-g_subprocess_wait_finish, function in GSubprocess -
-
-

T

-
-GTask, struct in GTask -
-
-
-GTask:completed, object property in GTask -
-
-
-GTaskThreadFunc, user_function in GTask -
-
-
-g_task_attach_source, function in GTask -
-
-
-g_task_get_cancellable, function in GTask -
-
-
-g_task_get_check_cancellable, function in GTask -
-
-
-g_task_get_completed, function in GTask -
-
-
-g_task_get_context, function in GTask -
-
-
-g_task_get_priority, function in GTask -
-
-
-g_task_get_return_on_cancel, function in GTask -
-
-
-g_task_get_source_object, function in GTask -
-
-
-g_task_get_source_tag, function in GTask -
-
-
-g_task_get_task_data, function in GTask -
-
-
-g_task_had_error, function in GTask -
-
-
-g_task_is_valid, function in GTask -
-
-
-g_task_new, function in GTask -
-
-
-g_task_propagate_boolean, function in GTask -
-
-
-g_task_propagate_int, function in GTask -
-
-
-g_task_propagate_pointer, function in GTask -
-
-
-g_task_report_error, function in GTask -
-
-
-g_task_report_new_error, function in GTask -
-
-
-g_task_return_boolean, function in GTask -
-
-
-g_task_return_error, function in GTask -
-
-
-g_task_return_error_if_cancelled, function in GTask -
-
-
-g_task_return_int, function in GTask -
-
-
-g_task_return_new_error, function in GTask -
-
-
-g_task_return_pointer, function in GTask -
-
-
-g_task_run_in_thread, function in GTask -
-
-
-g_task_run_in_thread_sync, function in GTask -
-
-
-g_task_set_check_cancellable, function in GTask -
-
-
-g_task_set_priority, function in GTask -
-
-
-g_task_set_return_on_cancel, function in GTask -
-
-
-g_task_set_source_tag, function in GTask -
-
-
-g_task_set_task_data, function in GTask -
-
-
-GTcpConnection, struct in GTcpConnection -
-
-
-GTcpConnection:graceful-disconnect, object property in GTcpConnection -
-
-
-GTcpWrapperConnection, struct in GTcpWrapperConnection -
-
-
-GTcpWrapperConnection:base-io-stream, object property in GTcpWrapperConnection -
-
-
-g_tcp_connection_get_graceful_disconnect, function in GTcpConnection -
-
-
-g_tcp_connection_set_graceful_disconnect, function in GTcpConnection -
-
-
-g_tcp_wrapper_connection_get_base_io_stream, function in GTcpWrapperConnection -
-
-
-g_tcp_wrapper_connection_new, function in GTcpWrapperConnection -
-
-
-GTestDBus, struct in GTestDBus -
-
-
-GTestDBus:flags, object property in GTestDBus -
-
-
-GTestDBusFlags, enum in GTestDBus -
-
-
-g_test_dbus_add_service_dir, function in GTestDBus -
-
-
-g_test_dbus_down, function in GTestDBus -
-
-
-g_test_dbus_get_bus_address, function in GTestDBus -
-
-
-g_test_dbus_get_flags, function in GTestDBus -
-
-
-g_test_dbus_new, function in GTestDBus -
-
-
-g_test_dbus_stop, function in GTestDBus -
-
-
-g_test_dbus_unset, function in GTestDBus -
-
-
-g_test_dbus_up, function in GTestDBus -
-
-
-GThemedIcon, struct in GThemedIcon -
-
-
-GThemedIcon:name, object property in GThemedIcon -
-
-
-GThemedIcon:names, object property in GThemedIcon -
-
-
-GThemedIcon:use-default-fallbacks, object property in GThemedIcon -
-
-
-g_themed_icon_append_name, function in GThemedIcon -
-
-
-g_themed_icon_get_names, function in GThemedIcon -
-
-
-g_themed_icon_new, function in GThemedIcon -
-
-
-g_themed_icon_new_from_names, function in GThemedIcon -
-
-
-g_themed_icon_new_with_default_fallbacks, function in GThemedIcon -
-
-
-g_themed_icon_prepend_name, function in GThemedIcon -
-
-
-GThreadedSocketService, struct in GThreadedSocketService -
-
-
-GThreadedSocketService::run, object signal in GThreadedSocketService -
-
-
-GThreadedSocketService:max-threads, object property in GThreadedSocketService -
-
-
-g_threaded_socket_service_new, function in GThreadedSocketService -
-
-
-GTlsAuthenticationMode, enum in TLS Overview -
-
-
-GTlsBackend, struct in GTlsBackend -
-
-
-GTlsBackendInterface, struct in GTlsBackend -
-
-
-GTlsCertificate, struct in GTlsCertificate -
-
-
-GTlsCertificate:certificate, object property in GTlsCertificate -
-
-
-GTlsCertificate:certificate-pem, object property in GTlsCertificate -
-
-
-GTlsCertificate:issuer, object property in GTlsCertificate -
-
-
-GTlsCertificate:private-key, object property in GTlsCertificate -
-
-
-GTlsCertificate:private-key-pem, object property in GTlsCertificate -
-
-
-GTlsCertificateFlags, enum in TLS Overview -
-
-
-GTlsCertificateRequestFlags, enum in GTlsInteraction -
-
-
-GTlsClientConnection, struct in GTlsClientConnection -
-
-
-GTlsClientConnection:accepted-cas, object property in GTlsClientConnection -
-
-
-GTlsClientConnection:server-identity, object property in GTlsClientConnection -
-
-
-GTlsClientConnection:use-ssl3, object property in GTlsClientConnection -
-
-
-GTlsClientConnection:validation-flags, object property in GTlsClientConnection -
-
-
-GTlsClientConnectionInterface, struct in GTlsClientConnection -
-
-
-GTlsConnection, struct in GTlsConnection -
-
-
-GTlsConnection::accept-certificate, object signal in GTlsConnection -
-
-
-GTlsConnection:base-io-stream, object property in GTlsConnection -
-
-
-GTlsConnection:certificate, object property in GTlsConnection -
-
-
-GTlsConnection:database, object property in GTlsConnection -
-
-
-GTlsConnection:interaction, object property in GTlsConnection -
-
-
-GTlsConnection:peer-certificate, object property in GTlsConnection -
-
-
-GTlsConnection:peer-certificate-errors, object property in GTlsConnection -
-
-
-GTlsConnection:rehandshake-mode, object property in GTlsConnection -
-
-
-GTlsConnection:require-close-notify, object property in GTlsConnection -
-
-
-GTlsConnection:use-system-certdb, object property in GTlsConnection -
-
-
-GTlsDatabase, struct in GTlsDatabase -
-
-
-GTlsDatabaseClass, struct in GTlsDatabase -
-
-
-GTlsDatabaseLookupFlags, enum in GTlsDatabase -
-
-
-GTlsDatabaseVerifyFlags, enum in GTlsDatabase -
-
-
-GTlsError, enum in TLS Overview -
-
-
-GTlsFileDatabase, struct in GTlsFileDatabase -
-
-
-GTlsFileDatabase:anchors, object property in GTlsFileDatabase -
-
-
-GTlsFileDatabaseInterface, struct in GTlsFileDatabase -
-
-
-GTlsInteraction, struct in GTlsInteraction -
-
-
-GTlsInteractionClass, struct in GTlsInteraction -
-
-
-GTlsInteractionResult, enum in GTlsInteraction -
-
-
-GTlsPassword, struct in GTlsPassword -
-
-
-GTlsPassword:description, object property in GTlsPassword -
-
-
-GTlsPassword:flags, object property in GTlsPassword -
-
-
-GTlsPassword:warning, object property in GTlsPassword -
-
-
-GTlsPasswordClass, struct in GTlsPassword -
-
-
-GTlsPasswordFlags, enum in GTlsPassword -
-
-
-GTlsRehandshakeMode, enum in GTlsConnection -
-
-
-GTlsServerConnection, struct in GTlsServerConnection -
-
-
-GTlsServerConnection:authentication-mode, object property in GTlsServerConnection -
-
-
-GTlsServerConnectionInterface, struct in GTlsServerConnection -
-
-
-G_TLS_BACKEND_EXTENSION_POINT_NAME, macro in GTlsBackend -
-
-
-g_tls_backend_get_certificate_type, function in GTlsBackend -
-
-
-g_tls_backend_get_client_connection_type, function in GTlsBackend -
-
-
-g_tls_backend_get_default, function in GTlsBackend -
-
-
-g_tls_backend_get_default_database, function in GTlsBackend -
-
-
-g_tls_backend_get_dtls_client_connection_type, function in GTlsBackend -
-
-
-g_tls_backend_get_dtls_server_connection_type, function in GTlsBackend -
-
-
-g_tls_backend_get_file_database_type, function in GTlsBackend -
-
-
-g_tls_backend_get_server_connection_type, function in GTlsBackend -
-
-
-g_tls_backend_supports_dtls, function in GTlsBackend -
-
-
-g_tls_backend_supports_tls, function in GTlsBackend -
-
-
-g_tls_certificate_get_issuer, function in GTlsCertificate -
-
-
-g_tls_certificate_is_same, function in GTlsCertificate -
-
-
-g_tls_certificate_list_new_from_file, function in GTlsCertificate -
-
-
-g_tls_certificate_new_from_file, function in GTlsCertificate -
-
-
-g_tls_certificate_new_from_files, function in GTlsCertificate -
-
-
-g_tls_certificate_new_from_pem, function in GTlsCertificate -
-
-
-g_tls_certificate_verify, function in GTlsCertificate -
-
-
-g_tls_client_connection_copy_session_state, function in GTlsClientConnection -
-
-
-g_tls_client_connection_get_accepted_cas, function in GTlsClientConnection -
-
-
-g_tls_client_connection_get_server_identity, function in GTlsClientConnection -
-
-
-g_tls_client_connection_get_use_ssl3, function in GTlsClientConnection -
-
-
-g_tls_client_connection_get_validation_flags, function in GTlsClientConnection -
-
-
-g_tls_client_connection_new, function in GTlsClientConnection -
-
-
-g_tls_client_connection_set_server_identity, function in GTlsClientConnection -
-
-
-g_tls_client_connection_set_use_ssl3, function in GTlsClientConnection -
-
-
-g_tls_client_connection_set_validation_flags, function in GTlsClientConnection -
-
-
-g_tls_connection_emit_accept_certificate, function in GTlsConnection -
-
-
-g_tls_connection_get_certificate, function in GTlsConnection -
-
-
-g_tls_connection_get_database, function in GTlsConnection -
-
-
-g_tls_connection_get_interaction, function in GTlsConnection -
-
-
-g_tls_connection_get_peer_certificate, function in GTlsConnection -
-
-
-g_tls_connection_get_peer_certificate_errors, function in GTlsConnection -
-
-
-g_tls_connection_get_rehandshake_mode, function in GTlsConnection -
-
-
-g_tls_connection_get_require_close_notify, function in GTlsConnection -
-
-
-g_tls_connection_get_use_system_certdb, function in GTlsConnection -
-
-
-g_tls_connection_handshake, function in GTlsConnection -
-
-
-g_tls_connection_handshake_async, function in GTlsConnection -
-
-
-g_tls_connection_handshake_finish, function in GTlsConnection -
-
-
-g_tls_connection_set_certificate, function in GTlsConnection -
-
-
-g_tls_connection_set_database, function in GTlsConnection -
-
-
-g_tls_connection_set_interaction, function in GTlsConnection -
-
-
-g_tls_connection_set_rehandshake_mode, function in GTlsConnection -
-
-
-g_tls_connection_set_require_close_notify, function in GTlsConnection -
-
-
-g_tls_connection_set_use_system_certdb, function in GTlsConnection -
-
-
-g_tls_database_create_certificate_handle, function in GTlsDatabase -
-
-
-g_tls_database_lookup_certificates_issued_by, function in GTlsDatabase -
-
-
-g_tls_database_lookup_certificates_issued_by_async, function in GTlsDatabase -
-
-
-g_tls_database_lookup_certificates_issued_by_finish, function in GTlsDatabase -
-
-
-g_tls_database_lookup_certificate_for_handle, function in GTlsDatabase -
-
-
-g_tls_database_lookup_certificate_for_handle_async, function in GTlsDatabase -
-
-
-g_tls_database_lookup_certificate_for_handle_finish, function in GTlsDatabase -
-
-
-g_tls_database_lookup_certificate_issuer, function in GTlsDatabase -
-
-
-g_tls_database_lookup_certificate_issuer_async, function in GTlsDatabase -
-
-
-g_tls_database_lookup_certificate_issuer_finish, function in GTlsDatabase -
-
-
-G_TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT, macro in GTlsDatabase -
-
-
-G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER, macro in GTlsDatabase -
-
-
-g_tls_database_verify_chain, function in GTlsDatabase -
-
-
-g_tls_database_verify_chain_async, function in GTlsDatabase -
-
-
-g_tls_database_verify_chain_finish, function in GTlsDatabase -
-
-
-G_TLS_ERROR, macro in TLS Overview -
-
-
-g_tls_file_database_new, function in GTlsFileDatabase -
-
-
-g_tls_interaction_ask_password, function in GTlsInteraction -
-
-
-g_tls_interaction_ask_password_async, function in GTlsInteraction -
-
-
-g_tls_interaction_ask_password_finish, function in GTlsInteraction -
-
-
-g_tls_interaction_invoke_ask_password, function in GTlsInteraction -
-
-
-g_tls_interaction_invoke_request_certificate, function in GTlsInteraction -
-
-
-g_tls_interaction_request_certificate, function in GTlsInteraction -
-
-
-g_tls_interaction_request_certificate_async, function in GTlsInteraction -
-
-
-g_tls_interaction_request_certificate_finish, function in GTlsInteraction -
-
-
-g_tls_password_get_description, function in GTlsPassword -
-
-
-g_tls_password_get_flags, function in GTlsPassword -
-
-
-g_tls_password_get_value, function in GTlsPassword -
-
-
-g_tls_password_get_warning, function in GTlsPassword -
-
-
-g_tls_password_new, function in GTlsPassword -
-
-
-g_tls_password_set_description, function in GTlsPassword -
-
-
-g_tls_password_set_flags, function in GTlsPassword -
-
-
-g_tls_password_set_value, function in GTlsPassword -
-
-
-g_tls_password_set_value_full, function in GTlsPassword -
-
-
-g_tls_password_set_warning, function in GTlsPassword -
-
-
-g_tls_server_connection_new, function in GTlsServerConnection -
-
-
-G_TYPE_DBUS_ANNOTATION_INFO, macro in D-Bus Introspection Data -
-
-
-G_TYPE_DBUS_ARG_INFO, macro in D-Bus Introspection Data -
-
-
-G_TYPE_DBUS_INTERFACE_INFO, macro in D-Bus Introspection Data -
-
-
-G_TYPE_DBUS_METHOD_INFO, macro in D-Bus Introspection Data -
-
-
-G_TYPE_DBUS_NODE_INFO, macro in D-Bus Introspection Data -
-
-
-G_TYPE_DBUS_PROPERTY_INFO, macro in D-Bus Introspection Data -
-
-
-G_TYPE_DBUS_SIGNAL_INFO, macro in D-Bus Introspection Data -
-
-

U

-
-GUnixConnection, struct in GUnixConnection -
-
-
-GUnixCredentialsMessage, struct in GUnixCredentialsMessage -
-
-
-GUnixCredentialsMessage:credentials, object property in GUnixCredentialsMessage -
-
-
-GUnixCredentialsMessageClass, struct in GUnixCredentialsMessage -
-
-
-GUnixFDList, struct in GUnixFDList -
-
-
-GUnixFDMessage, struct in GUnixFDMessage -
-
-
-GUnixFDMessage:fd-list, object property in GUnixFDMessage -
-
-
-GUnixInputStream, struct in GUnixInputStream -
-
-
-GUnixInputStream:close-fd, object property in GUnixInputStream -
-
-
-GUnixInputStream:fd, object property in GUnixInputStream -
-
-
-GUnixMountEntry, struct in Unix Mounts -
-
-
-GUnixMountMonitor, struct in Unix Mounts -
-
-
-GUnixMountMonitor::mountpoints-changed, object signal in Unix Mounts -
-
-
-GUnixMountMonitor::mounts-changed, object signal in Unix Mounts -
-
-
-GUnixMountPoint, struct in Unix Mounts -
-
-
-GUnixOutputStream, struct in GUnixOutputStream -
-
-
-GUnixOutputStream:close-fd, object property in GUnixOutputStream -
-
-
-GUnixOutputStream:fd, object property in GUnixOutputStream -
-
-
-GUnixSocketAddress, struct in GUnixSocketAddress -
-
-
-GUnixSocketAddress:abstract, object property in GUnixSocketAddress -
-
-
-GUnixSocketAddress:address-type, object property in GUnixSocketAddress -
-
-
-GUnixSocketAddress:path, object property in GUnixSocketAddress -
-
-
-GUnixSocketAddress:path-as-array, object property in GUnixSocketAddress -
-
-
-GUnixSocketAddressType, enum in GUnixSocketAddress -
-
-
-g_unix_connection_receive_credentials, function in GUnixConnection -
-
-
-g_unix_connection_receive_credentials_async, function in GUnixConnection -
-
-
-g_unix_connection_receive_credentials_finish, function in GUnixConnection -
-
-
-g_unix_connection_receive_fd, function in GUnixConnection -
-
-
-g_unix_connection_send_credentials, function in GUnixConnection -
-
-
-g_unix_connection_send_credentials_async, function in GUnixConnection -
-
-
-g_unix_connection_send_credentials_finish, function in GUnixConnection -
-
-
-g_unix_connection_send_fd, function in GUnixConnection -
-
-
-g_unix_credentials_message_get_credentials, function in GUnixCredentialsMessage -
-
-
-g_unix_credentials_message_is_supported, function in GUnixCredentialsMessage -
-
-
-g_unix_credentials_message_new, function in GUnixCredentialsMessage -
-
-
-g_unix_credentials_message_new_with_credentials, function in GUnixCredentialsMessage -
-
-
-g_unix_fd_list_append, function in GUnixFDList -
-
-
-g_unix_fd_list_get, function in GUnixFDList -
-
-
-g_unix_fd_list_get_length, function in GUnixFDList -
-
-
-g_unix_fd_list_new, function in GUnixFDList -
-
-
-g_unix_fd_list_new_from_array, function in GUnixFDList -
-
-
-g_unix_fd_list_peek_fds, function in GUnixFDList -
-
-
-g_unix_fd_list_steal_fds, function in GUnixFDList -
-
-
-g_unix_fd_message_append_fd, function in GUnixFDMessage -
-
-
-g_unix_fd_message_get_fd_list, function in GUnixFDMessage -
-
-
-g_unix_fd_message_new, function in GUnixFDMessage -
-
-
-g_unix_fd_message_new_with_fd_list, function in GUnixFDMessage -
-
-
-g_unix_fd_message_steal_fds, function in GUnixFDMessage -
-
-
-g_unix_input_stream_get_close_fd, function in GUnixInputStream -
-
-
-g_unix_input_stream_get_fd, function in GUnixInputStream -
-
-
-g_unix_input_stream_new, function in GUnixInputStream -
-
-
-g_unix_input_stream_set_close_fd, function in GUnixInputStream -
-
-
-g_unix_is_mount_path_system_internal, function in Unix Mounts -
-
-
-g_unix_mounts_changed_since, function in Unix Mounts -
-
-
-g_unix_mounts_get, function in Unix Mounts -
-
-
-g_unix_mount_at, function in Unix Mounts -
-
-
-g_unix_mount_compare, function in Unix Mounts -
-
-
-g_unix_mount_free, function in Unix Mounts -
-
-
-g_unix_mount_get_device_path, function in Unix Mounts -
-
-
-g_unix_mount_get_fs_type, function in Unix Mounts -
-
-
-g_unix_mount_get_mount_path, function in Unix Mounts -
-
-
-g_unix_mount_guess_can_eject, function in Unix Mounts -
-
-
-g_unix_mount_guess_icon, function in Unix Mounts -
-
-
-g_unix_mount_guess_name, function in Unix Mounts -
-
-
-g_unix_mount_guess_should_display, function in Unix Mounts -
-
-
-g_unix_mount_guess_symbolic_icon, function in Unix Mounts -
-
-
-g_unix_mount_is_readonly, function in Unix Mounts -
-
-
-g_unix_mount_is_system_internal, function in Unix Mounts -
-
-
-g_unix_mount_monitor_get, function in Unix Mounts -
-
-
-g_unix_mount_monitor_new, function in Unix Mounts -
-
-
-g_unix_mount_monitor_set_rate_limit, function in Unix Mounts -
-
-
-g_unix_mount_points_changed_since, function in Unix Mounts -
-
-
-g_unix_mount_points_get, function in Unix Mounts -
-
-
-g_unix_mount_point_compare, function in Unix Mounts -
-
-
-g_unix_mount_point_free, function in Unix Mounts -
-
-
-g_unix_mount_point_get_device_path, function in Unix Mounts -
-
-
-g_unix_mount_point_get_fs_type, function in Unix Mounts -
-
-
-g_unix_mount_point_get_mount_path, function in Unix Mounts -
-
-
-g_unix_mount_point_get_options, function in Unix Mounts -
-
-
-g_unix_mount_point_guess_can_eject, function in Unix Mounts -
-
-
-g_unix_mount_point_guess_icon, function in Unix Mounts -
-
-
-g_unix_mount_point_guess_name, function in Unix Mounts -
-
-
-g_unix_mount_point_guess_symbolic_icon, function in Unix Mounts -
-
-
-g_unix_mount_point_is_loopback, function in Unix Mounts -
-
-
-g_unix_mount_point_is_readonly, function in Unix Mounts -
-
-
-g_unix_mount_point_is_user_mountable, function in Unix Mounts -
-
-
-g_unix_output_stream_get_close_fd, function in GUnixOutputStream -
-
-
-g_unix_output_stream_get_fd, function in GUnixOutputStream -
-
-
-g_unix_output_stream_new, function in GUnixOutputStream -
-
-
-g_unix_output_stream_set_close_fd, function in GUnixOutputStream -
-
-
-g_unix_socket_address_abstract_names_supported, function in GUnixSocketAddress -
-
-
-g_unix_socket_address_get_address_type, function in GUnixSocketAddress -
-
-
-g_unix_socket_address_get_is_abstract, function in GUnixSocketAddress -
-
-
-g_unix_socket_address_get_path, function in GUnixSocketAddress -
-
-
-g_unix_socket_address_get_path_len, function in GUnixSocketAddress -
-
-
-g_unix_socket_address_new, function in GUnixSocketAddress -
-
-
-g_unix_socket_address_new_abstract, function in GUnixSocketAddress -
-
-
-g_unix_socket_address_new_with_type, function in GUnixSocketAddress -
-
-

V

-
-GVfs, struct in GVfs -
-
-
-GVfsFileLookupFunc, user_function in GVfs -
-
-
-G_VFS_EXTENSION_POINT_NAME, macro in GVfs -
-
-
-g_vfs_get_default, function in GVfs -
-
-
-g_vfs_get_file_for_path, function in GVfs -
-
-
-g_vfs_get_file_for_uri, function in GVfs -
-
-
-g_vfs_get_local, function in GVfs -
-
-
-g_vfs_get_supported_uri_schemes, function in GVfs -
-
-
-g_vfs_is_active, function in GVfs -
-
-
-g_vfs_parse_name, function in GVfs -
-
-
-g_vfs_register_uri_scheme, function in GVfs -
-
-
-g_vfs_unregister_uri_scheme, function in GVfs -
-
-
-GVolume, struct in GVolume -
-
-
-GVolume::changed, object signal in GVolume -
-
-
-GVolume::removed, object signal in GVolume -
-
-
-GVolumeIface, struct in GVolume -
-
-
-GVolumeMonitor, struct in GVolumeMonitor -
-
-
-GVolumeMonitor::drive-changed, object signal in GVolumeMonitor -
-
-
-GVolumeMonitor::drive-connected, object signal in GVolumeMonitor -
-
-
-GVolumeMonitor::drive-disconnected, object signal in GVolumeMonitor -
-
-
-GVolumeMonitor::drive-eject-button, object signal in GVolumeMonitor -
-
-
-GVolumeMonitor::drive-stop-button, object signal in GVolumeMonitor -
-
-
-GVolumeMonitor::mount-added, object signal in GVolumeMonitor -
-
-
-GVolumeMonitor::mount-changed, object signal in GVolumeMonitor -
-
-
-GVolumeMonitor::mount-pre-unmount, object signal in GVolumeMonitor -
-
-
-GVolumeMonitor::mount-removed, object signal in GVolumeMonitor -
-
-
-GVolumeMonitor::volume-added, object signal in GVolumeMonitor -
-
-
-GVolumeMonitor::volume-changed, object signal in GVolumeMonitor -
-
-
-GVolumeMonitor::volume-removed, object signal in GVolumeMonitor -
-
-
-g_volume_can_eject, function in GVolume -
-
-
-g_volume_can_mount, function in GVolume -
-
-
-g_volume_eject, function in GVolume -
-
-
-g_volume_eject_finish, function in GVolume -
-
-
-g_volume_eject_with_operation, function in GVolume -
-
-
-g_volume_eject_with_operation_finish, function in GVolume -
-
-
-g_volume_enumerate_identifiers, function in GVolume -
-
-
-g_volume_get_activation_root, function in GVolume -
-
-
-g_volume_get_drive, function in GVolume -
-
-
-g_volume_get_icon, function in GVolume -
-
-
-g_volume_get_identifier, function in GVolume -
-
-
-g_volume_get_mount, function in GVolume -
-
-
-g_volume_get_name, function in GVolume -
-
-
-g_volume_get_sort_key, function in GVolume -
-
-
-g_volume_get_symbolic_icon, function in GVolume -
-
-
-g_volume_get_uuid, function in GVolume -
-
-
-G_VOLUME_IDENTIFIER_KIND_CLASS, macro in GVolume -
-
-
-G_VOLUME_IDENTIFIER_KIND_HAL_UDI, macro in GVolume -
-
-
-G_VOLUME_IDENTIFIER_KIND_LABEL, macro in GVolume -
-
-
-G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT, macro in GVolume -
-
-
-G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE, macro in GVolume -
-
-
-G_VOLUME_IDENTIFIER_KIND_UUID, macro in GVolume -
-
-
-g_volume_monitor_adopt_orphan_mount, function in GVolumeMonitor -
-
-
-G_VOLUME_MONITOR_EXTENSION_POINT_NAME, macro in GVolumeMonitor -
-
-
-g_volume_monitor_get, function in GVolumeMonitor -
-
-
-g_volume_monitor_get_connected_drives, function in GVolumeMonitor -
-
-
-g_volume_monitor_get_mounts, function in GVolumeMonitor -
-
-
-g_volume_monitor_get_mount_for_uuid, function in GVolumeMonitor -
-
-
-g_volume_monitor_get_volumes, function in GVolumeMonitor -
-
-
-g_volume_monitor_get_volume_for_uuid, function in GVolumeMonitor -
-
-
-g_volume_mount, function in GVolume -
-
-
-g_volume_mount_finish, function in GVolume -
-
-
-g_volume_should_automount, function in GVolume -
-
-

W

-
-GWin32InputStream, struct in GWin32InputStream -
-
-
-GWin32OutputStream, struct in GWin32OutputStream -
-
-
-GWin32RegistryKey, struct in GWin32RegistryKey -
-
-
-GWin32RegistryKeyWatchCallbackFunc, user_function in GWin32RegistryKey -
-
-
-GWin32RegistryKeyWatcherFlags, enum in GWin32RegistryKey -
-
-
-GWin32RegistrySubkeyIter, struct in GWin32RegistryKey -
-
-
-GWin32RegistryValueIter, struct in GWin32RegistryKey -
-
-
-GWin32RegistryValueType, enum in GWin32RegistryKey -
-
-
-g_win32_input_stream_get_close_handle, function in GWin32InputStream -
-
-
-g_win32_input_stream_get_handle, function in GWin32InputStream -
-
-
-g_win32_input_stream_new, function in GWin32InputStream -
-
-
-g_win32_input_stream_set_close_handle, function in GWin32InputStream -
-
-
-g_win32_output_stream_get_close_handle, function in GWin32OutputStream -
-
-
-g_win32_output_stream_get_handle, function in GWin32OutputStream -
-
-
-g_win32_output_stream_new, function in GWin32OutputStream -
-
-
-g_win32_output_stream_set_close_handle, function in GWin32OutputStream -
-
-
-g_win32_registry_key_erase_change_indicator, function in GWin32RegistryKey -
-
-
-g_win32_registry_key_get_child, function in GWin32RegistryKey -
-
-
-g_win32_registry_key_get_child_w, function in GWin32RegistryKey -
-
-
-g_win32_registry_key_get_path, function in GWin32RegistryKey -
-
-
-g_win32_registry_key_get_path_w, function in GWin32RegistryKey -
-
-
-g_win32_registry_key_get_value, function in GWin32RegistryKey -
-
-
-g_win32_registry_key_get_value_w, function in GWin32RegistryKey -
-
-
-g_win32_registry_key_has_changed, function in GWin32RegistryKey -
-
-
-g_win32_registry_key_new, function in GWin32RegistryKey -
-
-
-g_win32_registry_key_new_w, function in GWin32RegistryKey -
-
-
-g_win32_registry_key_watch, function in GWin32RegistryKey -
-
-
-g_win32_registry_subkey_iter_assign, function in GWin32RegistryKey -
-
-
-g_win32_registry_subkey_iter_clear, function in GWin32RegistryKey -
-
-
-g_win32_registry_subkey_iter_copy, function in GWin32RegistryKey -
-
-
-g_win32_registry_subkey_iter_free, function in GWin32RegistryKey -
-
-
-g_win32_registry_subkey_iter_get_name, function in GWin32RegistryKey -
-
-
-g_win32_registry_subkey_iter_get_name_w, function in GWin32RegistryKey -
-
-
-g_win32_registry_subkey_iter_init, function in GWin32RegistryKey -
-
-
-g_win32_registry_subkey_iter_next, function in GWin32RegistryKey -
-
-
-g_win32_registry_subkey_iter_n_subkeys, function in GWin32RegistryKey -
-
-
-g_win32_registry_value_iter_assign, function in GWin32RegistryKey -
-
-
-g_win32_registry_value_iter_clear, function in GWin32RegistryKey -
-
-
-g_win32_registry_value_iter_copy, function in GWin32RegistryKey -
-
-
-g_win32_registry_value_iter_free, function in GWin32RegistryKey -
-
-
-g_win32_registry_value_iter_get_data, function in GWin32RegistryKey -
-
-
-g_win32_registry_value_iter_get_data_w, function in GWin32RegistryKey -
-
-
-g_win32_registry_value_iter_get_name, function in GWin32RegistryKey -
-
-
-g_win32_registry_value_iter_get_name_w, function in GWin32RegistryKey -
-
-
-g_win32_registry_value_iter_get_value_type, function in GWin32RegistryKey -
-
-
-g_win32_registry_value_iter_init, function in GWin32RegistryKey -
-
-
-g_win32_registry_value_iter_next, function in GWin32RegistryKey -
-
-
-g_win32_registry_value_iter_n_values, function in GWin32RegistryKey -
-
-

Z

-
-GZlibCompressor, struct in GZlibCompressor -
-
-
-GZlibCompressor:file-info, object property in GZlibCompressor -
-
-
-GZlibCompressor:format, object property in GZlibCompressor -
-
-
-GZlibCompressor:level, object property in GZlibCompressor -
-
-
-GZlibCompressorFormat, enum in GZlibCompressor -
-
-
-GZlibDecompressor, struct in GZlibDecompressor -
-
-
-GZlibDecompressor:file-info, object property in GZlibDecompressor -
-
-
-GZlibDecompressor:format, object property in GZlibDecompressor -
-
-
-g_zlib_compressor_get_file_info, function in GZlibCompressor -
-
-
-g_zlib_compressor_new, function in GZlibCompressor -
-
-
-g_zlib_compressor_set_file_info, function in GZlibCompressor -
-
-
-g_zlib_decompressor_get_file_info, function in GZlibDecompressor -
-
-
-g_zlib_decompressor_new, function in GZlibDecompressor -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/application.html b/docs/reference/gio/html/application.html deleted file mode 100644 index 49147e300..000000000 --- a/docs/reference/gio/html/application.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - -Application support: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Application support

-
-
-GApplication — Core application class -
-
-GApplicationCommandLine — A command-line invocation of an application -
-
-GActionGroup — A group of actions -
-
-GActionMap — Interface for action containers -
-
-GSimpleActionGroup — A simple GActionGroup implementation -
-
-GAction — An action interface -
-
-GSimpleAction — A simple GAction implementation -
-
-GPropertyAction — A GAction reflecting a GObject property -
-
-GRemoteActionGroup — A GActionGroup that interacts with other processes -
-
-GActionGroup exporter — Export GActionGroups on D-Bus -
-
-GDBusActionGroup — A D-Bus GActionGroup implementation -
-
-GMenuModel — An abstract class representing the contents of a menu -
-
-GMenu — A simple implementation of GMenuModel -
-
-GMenuModel exporter — Export GMenuModels on D-Bus -
-
-GDBusMenuModel — A D-Bus GMenuModel implementation -
-
-GNotification — User Notifications (pop up messages) -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/async.html b/docs/reference/gio/html/async.html deleted file mode 100644 index f0f2affed..000000000 --- a/docs/reference/gio/html/async.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - -Asynchronous I/O: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Asynchronous I/O

-
-
-GCancellable — Thread-safe Operation Cancellation Stack -
-
-GAsyncResult — Asynchronous Function Results -
-
-GTask — Cancellable synchronous or asynchronous task - and result -
-
-GIOScheduler — I/O Scheduler -
-
-GSimpleAsyncResult — Simple asynchronous results implementation -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch01.html b/docs/reference/gio/html/ch01.html deleted file mode 100644 index 9c3145355..000000000 --- a/docs/reference/gio/html/ch01.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - -Introduction: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Introduction

-

- GIO is striving to provide a modern, easy-to-use VFS API that sits - at the right level in the library stack, as well as other generally - useful APIs for desktop applications (such as networking and - D-Bus support). The goal is to overcome the shortcomings of GnomeVFS - and provide an API that is so good that developers prefer it over raw - POSIX calls. Among other things that means using GObject. It also means - not cloning the POSIX API, but providing higher-level, document-centric - interfaces. -

-

- The abstract file system model of GIO consists of a number of - interfaces and base classes for I/O and files: -

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -

GFile

reference to a file

GFileInfo

information about a file or filesystem

GFileEnumerator

list files in directories

GDrive

represents a drive

GVolume

represents a file system in an abstract way

GMount

represents a mounted file system

-

- Then there is a number of stream classes, similar to the input and - output stream hierarchies that can be found in frameworks like Java: -

-
---- - - - - - - - - - - - - - - - - - - -

GInputStream

read data

GOutputStream

write data

GIOStream

read and write data

GSeekable

interface optionally implemented by streams to support seeking

-

- There are interfaces related to applications and the types - of files they handle: -

-
---- - - - - - - - - - - -

GAppInfo

information about an installed application

GIcon

abstract type for file and application icons

-

- There is a framework for storing and retrieving application settings: -

-
---- - - - - -

GSettings

stores and retrieves application settings

-

- There is support for network programming, including connectivity monitoring, - name resolution, lowlevel socket APIs and highlevel client and server - helper classes: -

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -

GSocket

lowlevel platform independent socket object

GResolver

asynchronous and cancellable DNS resolver

GSocketClient

high-level network client helper

GSocketService

high-level network server helper

GSocketConnection

network connection stream

GNetworkMonitor

network connectivity monitoring

-

- There is support for connecting to D-Bus, - sending and receiving messages, owning and watching bus names, - and making objects available on the bus: -

-
---- - - - - - - - - - - - - - - - - - - -

GDBusConnection

a D-Bus connection

GDBusMethodInvocation

for handling remote calls

GDBusServer

helper for accepting connections

GDBusProxy

proxy to access D-Bus interfaces on a remote object

-

- Beyond these, GIO provides facilities for file monitoring, - asynchronous I/O and filename completion. In addition to the - interfaces, GIO provides implementations for the local case. - Implementations for various network file systems are provided - by the GVFS package as loadable modules. -

-

- Other design choices which consciously break with the GnomeVFS - design are to move backends out-of-process, which minimizes the - dependency bloat and makes the whole system more robust. The backends - are not included in GIO, but in the separate GVFS package. The GVFS - package also contains the GVFS daemon, which spawn further mount - daemons for each individual connection. -

-
-

Figure 1. GIO in the GTK+ library stack

-
GIO in the GTK+ library stack
-
-

- The GIO model of I/O is stateful: if an application establishes e.g. - a SFTP connection to a server, it becomes available to all applications - in the session; the user does not have to enter his password over - and over again. -

-

- One of the big advantages of putting the VFS in the GLib layer - is that GTK+ can directly use it, e.g. in the filechooser. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch02.html b/docs/reference/gio/html/ch02.html deleted file mode 100644 index 8997c415e..000000000 --- a/docs/reference/gio/html/ch02.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - -Writing GIO applications: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Writing GIO applications

-

- The information in the GLib documentation about writing GLib - applications is generally applicable when writing GIO applications. -

-
-

-Threads

-

- GDBus has its own private worker thread, so applications using - GDBus have at least 3 threads. GIO makes heavy use of the concept - of a thread-default - main context to execute callbacks of asynchronous - methods in the same context in which the operation was started. -

-
-
-

-Asynchronous Programming

-

- Many GIO functions come in two versions: synchronous and asynchronous, - denoted by an _async suffix. It is important to use these - appropriately: synchronous calls should not be used from - within a main loop which is shared with other code, such as one in the - application’s main thread. Synchronous calls block until they complete, - and I/O operations can take noticeable amounts of time (even on ‘fast’ - SSDs). Blocking a main loop iteration while waiting for I/O means that - other sources in the main loop will not be dispatched, such as input and - redraw handlers for the application’s UI. This can cause the application - to ‘freeze’ until I/O completes. -

-

- A few self-contained groups of functions, such as code generated by - gdbus-codegen, - use a different convention: functions are asynchronous default, and it is - the synchronous version which has a - _sync - suffix. Aside from naming differences, they should be treated the same - way as functions following the normal convention above. -

-

- The asynchronous (_async) versions of functions return - control to the caller immediately, after scheduling the I/O in the kernel - and adding a callback for it to the main loop. This callback will be - invoked when the operation has completed. From the callback, the paired - _finish function should be called to retrieve the return - value of the I/O operation, and any errors which occurred. For more - information on using and implementing asynchronous functions, see - GAsyncResult - and GTask. -

-

- By starting multiple asynchronous operations in succession, they will be - executed in parallel (up to an arbitrary limit imposed by GIO’s internal - worker thread pool). -

-

- The synchronous versions of functions can be used early in application - startup when there is no main loop to block, for example to load initial - configuration files. They can also be used for I/O on files which are - guaranteed to be small and on the local disk. Note that the user’s home - directory is not guaranteed to be on the local disk. -

-
-
-

-Security

-

-When your program needs to carry out some privileged operation (say, -create a new user account), there are various ways in which you can go -about this: -

-
    -
  • -Implement a daemon that offers the privileged operation. A convenient -way to do this is as a D-Bus system-bus service. The daemon will probably -need ways to check the identity and authorization of the caller before -executing the operation. polkit is a framework that allows this. -

  • -
  • -Use a small helper that is executed with elevated privileges via -pkexec. pkexec is a small program launcher that is part of polkit. -

  • -
  • -Use a small helper that is executed with elevated privileges by -being suid root. -

  • -
-

-None of these approaches is the clear winner, they all have their -advantages and disadvantages. -

-

-When writing code that runs with elevated privileges, it is important -to follow some basic rules of secure programming. David Wheeler has an -excellent book on this topic, -Secure Programming for Linux and Unix HOWTO. -

-

-When using GIO in code that runs with elevated privileges, you have to -be careful. GIO has extension points whose implementations get loaded -from modules (executable code in shared objects), which could allow -an attacker to sneak his own code into your application by tricking it -into loading the code as a module. However, GIO will never load modules -from your home directory except when explictly asked to do so via an -environment variable. -

-

-In most cases, your helper program should be so small that you don't -need GIO, whose APIs are largely designed to support full-blown desktop -applications. If you can't resist the convenience of these APIs, here -are some steps you should take: -

-
    -
  • -Clear the environment, e.g. using the clearenv() -function. -David Wheeler has a good explanation for why it is -important to sanitize the environment. -See Running GIO applications -for a list of all environment variables affecting GIO. In particular, -PATH (used to locate binaries), GIO_EXTRA_MODULES (used to locate loadable modules) and DBUS_{SYSTEM,SESSION}_BUS_ADDRESS (used to locate the D-Bus system and session bus) are important. -

  • -
  • -Don't use GVfs, by setting GIO_USE_VFS=local in the environment. -The reason to avoid GVfs in security-sensitive programs is that it uses -many libraries which have not necessarily been audited for security problems. -Gvfs is also heavily distributed and relies on a session bus to be present. -

  • -
-

-

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch03.html b/docs/reference/gio/html/ch03.html deleted file mode 100644 index 994a8a7ff..000000000 --- a/docs/reference/gio/html/ch03.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - -Compiling GIO applications: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Compiling GIO applications

-

- GIO comes with a gio-2.0.pc file that you - should use together with pkg-config to obtain - the necessary information about header files and libraries. See - the pkg-config man page or the GLib documentation - for more information on how to use pkg-config - to compile your application. -

-

- If you are using GIO on UNIX-like systems, you may want to use - UNIX-specific GIO interfaces such as GUnixInputStream, - GUnixOutputStream, GUnixMount or GDesktopAppInfo. - To do so, use the gio-unix-2.0.pc file - instead of gio-2.0.pc -

-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch32.html b/docs/reference/gio/html/ch32.html deleted file mode 100644 index 1a7e8266e..000000000 --- a/docs/reference/gio/html/ch32.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - -Migrating from POSIX to GIO: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Migrating from POSIX to GIO

-
-

Table 1. Comparison of POSIX and GIO concepts

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POSIXGIO
char *pathGFile *file
struct stat *bufGFileInfo *info
struct statvfs *bufGFileInfo *info
int fdGInputStream *in
GOutputStream *out
DIR *GFileEnumerator *enum
fstab entryGUnixMountPoint *mount_point
mtab entryGUnixMountEntry *mount_entry
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch33.html b/docs/reference/gio/html/ch33.html deleted file mode 100644 index 7d8459884..000000000 --- a/docs/reference/gio/html/ch33.html +++ /dev/null @@ -1,216 +0,0 @@ - - - - -Migrating from GnomeVFS to GIO: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Migrating from GnomeVFS to GIO

- -
-

Table 2. Comparison of GnomeVFS and GIO concepts

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GnomeVFSGIO
GnomeVFSURIGFile
GnomeVFSFileInfoGFileInfo
GnomeVFSResultGError, with G_IO_ERROR values
GnomeVFSHandle & GnomeVFSAsyncHandleGInputStream or GOutputStream
GnomeVFSDirectoryHandleGFileEnumerator
mime typecontent type
GnomeVFSMonitorGFileMonitor
GnomeVFSVolumeMonitorGVolumeMonitor
GnomeVFSVolumeGMount
GnomeVFSDriveGVolume
-GDrive
GnomeVFSContextGCancellable
gnome_vfs_async_cancelg_cancellable_cancel
-
-
-

-Trash handling

-

- The handling of trashed files has been changed in GIO, compared - to gnome-vfs. gnome-vfs has a home-grown trash implementation that - predates the freedesktop.org Desktop Trash Can specification - that is implemented in GIO. The location for storing trashed files - has changed from $HOME/.Trash to - $HOME/.local/share/Trash (or more correctly - $XDG_DATA_HOME/Trash), which means that - there is a need for migrating files that have been trashed by - gnome-vfs to the new location. -

-

- In gnome-vfs, the trash:// scheme offering a - merged view of all trash directories was implemented in nautilus, - and trash-handling applications had to find and monitor all trash - directories themselves. With GIO, the trash:// - implementation has been moved to gvfs and applications can simply - monitor that location: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
static void
-file_changed (GFileMonitor      *file_monitor,
-              GFile             *child,
-              GFile             *other_file,
-              GFileMonitorEvent  event_type,
-              gpointer           user_data)
-{
-  switch (event_type)
-  {
-  case G_FILE_MONITOR_EVENT_DELETED:
-    g_print ("'%s' removed from trash\n", g_file_get_basename (child));
-    break;
-  case G_FILE_MONITOR_EVENT_CREATED:
-    g_print ("'%s' added to trash\n", g_file_get_basename (child));
-    break;
-  default: ;
-  }
-}
-
-static void
-start_monitoring_trash (void)
-{
-  GFile *file;
-  GFileMonitor *monitor;
-
-  file = g_file_new_for_uri ("trash://");
-  monitor = g_file_monitor_directory (file, 0, NULL, NULL);
-  g_object_unref (file);
-
-  g_signal_connect (monitor, "changed", G_CALLBACK (file_changed), NULL);
-
-  /* ... */
-
-}
-
- -

- GIO exposes some useful metadata about trashed files. There are - trash::orig-path and trash::deletion-date attributes. The - standard::icon attribute of the trash:// - itself provides a suitable icon for displaying the trash can on - the desktop. If you are using this icon, make sure to monitor - this attribute for changes, since the icon may be updated to - reflect that state of the trash can. -

-

- Moving a file to the trash is much simpler with GIO. Instead of - using gnome_vfs_find_directory() with GNOME_VFS_DIRECTORY_KIND_TRASH - to find out where to move the trashed file, just use the g_file_trash() - function. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch33s02.html b/docs/reference/gio/html/ch33s02.html deleted file mode 100644 index e34434717..000000000 --- a/docs/reference/gio/html/ch33s02.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - -Operations on multiple files: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Operations on multiple files

-

- gnome-vfs has the dreaded gnome_vfs_xfer_uri_list() function which - has tons of options and offers the equivalent of cp, mv, ln, mkdir - and rm at the same time. -

-

- GIO offers a much simpler I/O scheduler functionality instead, that - lets you schedule a function to be called in a separate thread, or - if threads are not available, as an idle in the mainloop. - See g_io_scheduler_push_job(). -

-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch33s03.html b/docs/reference/gio/html/ch33s03.html deleted file mode 100644 index 98e392c7f..000000000 --- a/docs/reference/gio/html/ch33s03.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - -Mime monitoring: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Mime monitoring

-

- gnome-vfs offered a way to monitor the association between mime types - and default handlers for changes, with the GnomeVFSMIMEMonitor object. - GIO does not offer a replacement for this functionality at this time, - since we have not found a compelling use case where - GnomeVFSMIMEMonitor was used. If you think you have such a use - case, please report it at - bugzilla.gnome.org. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch34.html b/docs/reference/gio/html/ch34.html deleted file mode 100644 index 820f83d37..000000000 --- a/docs/reference/gio/html/ch34.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - -Migrating from GConf to GSettings: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Migrating from GConf to GSettings

- -
-

-Before you start

-

- Converting individual applications and their settings from GConf to - GSettings can be done at will. But desktop-wide settings like font or - theme settings often have consumers in multiple modules. Therefore, - some consideration has to go into making sure that all users of a setting - are converted to GSettings at the same time or that the program - responsible for configuring that setting continues to update the value in - both places. -

-

- It is always a good idea to have a look at how others have handled - similar problems before. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch34s02.html b/docs/reference/gio/html/ch34s02.html deleted file mode 100644 index bf367ec74..000000000 --- a/docs/reference/gio/html/ch34s02.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - -Conceptual differences: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Conceptual differences

-

- Conceptually, GConf and GSettings are fairly similar. Both - have a concept of pluggable backends. Both keep information - about keys and their types in schemas. Both have a concept of - mandatory values, which lets you implement lock-down. -

-

- There are some differences in the approach to schemas. GConf - installs the schemas into the database and has API to handle - schema information (gconf_client_get_default_from_schema(), - gconf_value_get_schema(), etc). GSettings on the other hand - assumes that an application knows its own schemas, and does - not provide API to handle schema information at runtime. - GSettings is also more strict about requiring a schema whenever - you want to read or write a key. To deal with more free-form - information that would appear in schema-less entries in GConf, - GSettings allows for schemas to be 'relocatable'. -

-

- One difference in the way applications interact with their - settings is that with GConf you interact with a tree of - settings (ie the keys you pass to functions when reading - or writing values are actually paths with the actual name - of the key as the last element. With GSettings, you create - a GSettings object which has an implicit prefix that determines - where the settings get stored in the global tree of settings, - but the keys you pass when reading or writing values are just - the key names, not the full path. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch34s03.html b/docs/reference/gio/html/ch34s03.html deleted file mode 100644 index 8456606b7..000000000 --- a/docs/reference/gio/html/ch34s03.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - -GConfClient (and GConfBridge) API conversion: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-GConfClient (and GConfBridge) API conversion

-

- Most people use GConf via the high-level GConfClient API. - The corresponding API is the GSettings object. While not - every GConfClient function has a direct GSettings equivalent, - many do: -

-
-

Table 3. 

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GConfClientGSettings
gconf_client_get_default()no direct equivalent, - instead you call g_settings_new() for the schemas you use
gconf_client_set()g_settings_set()
gconf_client_get()g_settings_get()
gconf_client_get_bool()g_settings_get_boolean()
gconf_client_set_bool()g_settings_set_boolean()
gconf_client_get_int()g_settings_get_int()
gconf_client_set_int()g_settings_set_int()
gconf_client_get_float()g_settings_get_double()
gconf_client_set_float()g_settings_set_double()
gconf_client_get_string()g_settings_get_string()
gconf_client_set_string()g_settings_set_string()
gconf_client_get_list()for string lists, see g_settings_get_strv(), else see g_settings_get_value() and GVariant API
gconf_client_set_list()for string lists, see g_settings_set_strv(), else see g_settings_set_value() and GVariant API
gconf_entry_get_is_writable()g_settings_is_writable()
gconf_client_notify_add()not required, the “changed” signal is emitted automatically
gconf_client_add_dir()not required, each GSettings instance automatically watches all keys in its path
GConfChangeSet -g_settings_delay(), g_settings_apply() -
gconf_client_get_default_from_schema()no equivalent, applications are expected to know their schema
gconf_client_all_entries()no equivalent, applications are expected to know their schema, and GSettings does not allow schema-less entries
gconf_client_get_without_default()no equivalent
gconf_bridge_bind_property()g_settings_bind()
gconf_bridge_bind_property_full()g_settings_bind_with_mapping()
-
-


-

-

- GConfBridge was a third-party library that used GConf to bind an object property - to a particular configuration key. GSettings offers this service itself. -

-

- There is a pattern that is sometimes used for GConf, where a setting can have - explicit 'value A', explicit 'value B' or 'use the system default'. With GConf, - 'use the system default' is sometimes implemented by unsetting the user value. -

-

- This is not possible in GSettings, since it does not have API to determine if a value - is the default and does not let you unset values. The recommended way (and much - clearer) way in which this can be implemented in GSettings is to have a separate - 'use-system-default' boolean setting. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch34s04.html b/docs/reference/gio/html/ch34s04.html deleted file mode 100644 index f289c5499..000000000 --- a/docs/reference/gio/html/ch34s04.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - -Change notification: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Change notification

-

- GConf requires you to call gconf_client_add_dir() and - gconf_client_notify_add() to get change notification. With - GSettings, this is not necessary; signals get emitted automatically - for every change. -

-

- The “changed” signal is emitted for each changed key. - There is also a “change-event” signal that you can handle - if you need to see groups of keys that get changed at the same time. -

-

- GSettings also notifies you about changes in writability of keys, - with the “writable-changed” signal (and the - “writable-change-event” signal). -

-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch34s05.html b/docs/reference/gio/html/ch34s05.html deleted file mode 100644 index 12213427a..000000000 --- a/docs/reference/gio/html/ch34s05.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - -Change sets: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Change sets

-

- GConf has a a concept of a set of changes which can be applied or reverted - at once: GConfChangeSet (GConf doesn't actually apply changes atomically, - which is one of its shortcomings). -

-

- Instead of a separate object to represent a change set, GSettings has a - 'delayed-apply' mode, which can be turned on for a GSettings object by - calling g_settings_delay(). In this mode, changes done to the GSettings - object are not applied - they are still visible when calling g_settings_get() - on the same object, but not to other GSettings instances - or even other processes. -

-

- To apply the pending changes all at once (GSettings does - atomicity here), call g_settings_apply(). To revert the pending changes, - call g_settings_revert() or just drop the reference to the GSettings object. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch34s06.html b/docs/reference/gio/html/ch34s06.html deleted file mode 100644 index b54a6b2fc..000000000 --- a/docs/reference/gio/html/ch34s06.html +++ /dev/null @@ -1,277 +0,0 @@ - - - - -Schema conversion: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Schema conversion

-

- If you are porting your application from GConf, most likely you already - have a GConf schema. GConf comes with a commandline tool - gsettings-schema-convert that can help with the task of converting - a GConf schema into an equivalent GSettings schema. The tool is not - perfect and may need assistence in some cases. -

-
-

Example 1. An example for using gsettings-schema-convert

-
-

Running gsettings-schema-convert --gconf --xml --schema-id "org.gnome.font-rendering" --output org.gnome.font-rendering.gschema.xml destop_gnome_font_rendering.schemas on the following desktop_gnome_font_rendering.schemas file: -

-
-
-<?xml version="1.0"?>
-<gconfschemafile>
-    <schemalist>
-        <schema>
-            <key>/schemas/desktop/gnome/font_rendering/dpi</key>
-            <applyto>/desktop/gnome/font_rendering/dpi</applyto>
-            <owner>gnome</owner>
-            <type>int</type>
-            <default>96</default>
-            <locale name="C">
-                <short>DPI</short>
-                <long>The resolution used for converting font sizes to pixel sizes, in dots per inch.</long>
-            </locale>
-        </schema>
-    </schemalist>
-</gconfschemafile>
-
-
-

-produces a org.gnome.font-rendering.gschema.xml file with the following content: -

-
-
-<schemalist>
-  <schema id="org.gnome.font-rendering" path="/desktop/gnome/font_rendering/">
-    <key name="dpi" type="i">
-      <default>96</default>
-      <summary>DPI</summary>
-      <description>The resolution used for converting font sizes to pixel sizes, in dots per inch.</description>
-    </key>
-  </schema>
-</schemalist>
-
-
-

-

-
-
-

- GSettings schemas are identified at runtime by their id (as specified - in the XML source file). It is recommended to use a dotted name as schema - id, similar in style to a D-Bus bus name, e.g. "org.gnome.SessionManager". - In cases where the settings are general and not specific to one application, - the id should not use StudlyCaps, e.g. "org.gnome.font-rendering". - The filename used for the XML schema source is immaterial, but - schema compiler expects the files to have the extension - .gschema.xml. It is recommended to simply - use the schema id as the filename, followed by this extension, - e.g. org.gnome.SessionManager.gschema.xml. -

-

- The XML source file for your GSettings schema needs to get installed - into $datadir/glib-2.0/schemas, and needs to be - compiled into a binary form. At runtime, GSettings looks for compiled - schemas in the glib-2.0/schemas subdirectories - of all XDG_DATA_DIRS directories, so if you install - your schema in a different location, you need to set the - XDG_DATA_DIRS environment variable appropriately. -

-

- Schemas are compiled into binary form by the - glib-compile-schemas utility. - GIO provides a glib_compile_schemas - variable for the schema compiler. -

-

- You can ignore all of this by using the provided m4 macros. To - do this, add to your configure.ac: -

-
-GLIB_GSETTINGS
-
-

- The corresponding Makefile.am fragment looks like - this: -

-
-# gsettings_SCHEMAS is a list of all the schemas you want to install
-gsettings_SCHEMAS = my.app.gschema.xml
-
-# include the appropriate makefile rules for schema handling
-@GSETTINGS_RULES@
-
-

-

-

- This is not sufficient on its own. You need to mention what the source - of the my.app.gschema.xml file is. If the schema - file is distributed directly with your project's tarball then a mention - in EXTRA_DIST is appropriate. If the schema file is - generated from another source then you will need the appropriate rule - for that, plus probably an item in EXTRA_DIST for the - source files used by that rule. -

-

- One possible pitfall in doing schema conversion is that the default - values in GSettings schemas are parsed by the GVariant parser. - This means that strings need to include quotes in the XML. Also note - that the types are now specified as GVariant type strings. -

-
-
-<type>string</type>
-<default>rgb</default>
-
-        
-

- becomes -

-
-
-<key name="rgba-order" type="s">
-  <default>'rgb'</default> <!-- note quotes -->
-</key>
-
-        
-

-

-

- Another possible complication is that GConf specifies full paths - for each key, while a GSettings schema has a 'path' attribute that - contains the prefix for all the keys in the schema, and individual - keys just have a simple name. So -

-
-
-<key>/schemas/desktop/gnome/font_rendering/antialiasing</key>
-
-        
-

- becomes -

-
-
-<schema id="org.gnome.font" path="/desktop/gnome/font_rendering/">
-  <key name="antialiasing" type="s">
-
-        
-

-

-

- Default values can be localized in both GConf and GSettings schemas, - but GSettings uses gettext for the localization. You can specify - the gettext domain to use in the gettext-domain - attribute. Therefore, when converting localized defaults in GConf, -

-
-
-<key>/schemas/apps/my_app/font_size</key>
-  <locale name="C">
-    <default>18</default>
-  </locale>
-  <locale name="be">
-    <default>24</default>
-  </locale>
-</key>
-
-        
-

- becomes -

-
-
-<schema id="..." gettext-domain="your-domain">
- ...
-<key name="font-size" type="i">
-  <default l10n="messages" context="font_size">18</default>
-</key>
-
-        
-

-

-

- GSettings uses gettext for translation of default values. - The string that is translated is exactly the string that appears - inside of the <default> element. This - includes the quotation marks that appear around strings. - Default values must be marked with the l10n - attribute in the <default> tag, which - should be set as equal to 'messages' or - 'time' depending on the desired category. An - optional translation context can also be specified with the - context attribute, as in the example. This - is usually recommended, since the string "18" - is not particularly easy to translate without context. The - translated version of the default value should be stored in the - specified gettext-domain. Care must be taken - during translation to ensure that all translated values remain - syntactically valid; mistakes here will cause runtime errors. -

-

- GSettings schemas have optional <summary> and - <description> elements for each key which - correspond to the <short> and - <long> elements in the GConf schema and - will be used in similar ways by a future gsettings-editor, so you - should use the same conventions for them: The summary is just a short - label with no punctuation, the description can be one or more complete - sentences. If multiple paragraphs are desired for the description, the - paragraphs should be separated by a completely empty line. -

-

- Translations for these strings will also be handled - via gettext, so you should arrange for these strings to be - extracted into your gettext catalog. One way to do that is to use - intltool. Since intltool 0.50.1, schema files are - supported, so all you have to do is to add your .gschema.xml - files to POTFILES.in with a line like -

-
-        [type: gettext/gsettings]data/org.foo.MyApp.gschema.xml
-        
-

-

-

- GSettings is a bit more restrictive about key names than GConf. Key - names in GSettings can be at most 32 characters long, and must only - consist of lowercase characters, numbers and dashes, with no - consecutive dashes. The first character must not be a number or dash, - and the last character cannot be '-'. -

-

- If you are using the GConf backend for GSettings during the - transition, you may want to keep your key names the same they - were in GConf, so that existing settings in the users GConf - database are preserved. You can achieve this by using the - --allow-any-name with the - glib-compile-schemas schema - compiler. Note that this option is only meant - to ease the process of porting your application, allowing parts - of your application to continue to access GConf and parts to use - GSettings. By the time you have finished porting your application - you must ensure that all key names are valid. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch34s07.html b/docs/reference/gio/html/ch34s07.html deleted file mode 100644 index b6141cef0..000000000 --- a/docs/reference/gio/html/ch34s07.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - -Data conversion: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Data conversion

-

- GConf comes with a GSettings backend that can be used to - facility the transition to the GSettings API until you are - ready to make the jump to a different backend (most likely - dconf). To use it, you need to set the GSETTINGS_BACKEND - to 'gconf', e.g. by using -

-
-  g_setenv ("GSETTINGS_BACKEND", "gconf", TRUE);
-
-

- early on in your program. Note that this backend is meant purely - as a transition tool, and should not be used in production. -

-

- GConf also comes with a utility called - gsettings-data-convert, which is designed to help - with the task of migrating user settings from GConf into another - GSettings backend. It can be run manually, but it is designed to be - executed automatically, every time a user logs in. It keeps track of - the data migrations that it has already done, and it is harmless to - run it more than once. -

-

- To make use of this utility, you must install a keyfile in the - directory /usr/share/GConf/gsettings which - lists the GSettings keys and GConf paths to map to each other, for - each schema that you want to migrate user data for. -

-

- Here is an example: -

-
-
-[org.gnome.fonts]
-antialiasing = /desktop/gnome/font_rendering/antialiasing
-dpi = /desktop/gnome/font_rendering/dpi
-hinting = /desktop/gnome/font_rendering/hinting
-rgba-order = /desktop/gnome/font_rendering/rgba_order
-
-[apps.myapp:/path/to/myapps/]
-some-odd-key1 = /apps/myapp/some_ODD-key1
-
-        
-

- The last key demonstrates that it may be necessary to modify the key - name to comply with stricter GSettings key name rules. Of course, - that means your application must use the new key names when looking - up settings in GSettings. -

-

- The last group in the example also shows how to handle the case - of 'relocatable' schemas, which don't have a fixed path. You can - specify the path to use in the group name, separated by a colon. -

-

- There are some limitations: gsettings-data-convert - does not do any transformation of the values. And it does not handle - complex GConf types other than lists of strings or integers. -

-

- Don't forget to require GConf 2.31.1 or newer in your configure - script if you are making use of the GConf backend or the conversion - utility. -

-

- If, as an application developer, you are interested in manually - ensuring that gsettings-data-convert has been - invoked (for example, to deal with the case where the user is - logged in during a distribution upgrade or for non-XDG desktop - environments which do not run the command as an autostart) you - may invoke it manually during your program initialisation. This - is not recommended for all application authors -- it is your - choice if this use case concerns you enough. -

-

- Internally, gsettings-data-convert uses a - keyfile to track which settings have been migrated. The - following code fragment will check that keyfile to see if your - data conversion script has been run yet and, if not, will - attempt to invoke the tool to run it. You should adapt it to - your application as you see fit. -

-

-

-
-
-static void
-ensure_migrated (const gchar *name)
-{
-  gboolean needed = TRUE;
-  GKeyFile *kf;
-  gchar **list;
-  gsize i, n;
-
-  kf = g_key_file_new ();
-
-  g_key_file_load_from_data_dirs (kf, "gsettings-data-convert",
-                                  NULL, G_KEY_FILE_NONE, NULL);
-  list = g_key_file_get_string_list (kf, "State", "converted", &n, NULL);
-
-  if (list)
-    {
-      for (i = 0; i < n; i++)
-        if (strcmp (list[i], name) == 0)
-          {
-            needed = FALSE;
-            break;
-          }
-
-      g_strfreev (list);
-    }
-
-  g_key_file_free (kf);
-
-  if (needed)
-    g_spawn_command_line_sync ("gsettings-data-convert",
-                               NULL, NULL, NULL, NULL);
-}
-
-
-        
-

-

-

- Although there is the possibility that the - gsettings-data-convert script will end up - running multiple times concurrently with this approach, it is - believed that this is safe. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch35.html b/docs/reference/gio/html/ch35.html deleted file mode 100644 index 309b1c297..000000000 --- a/docs/reference/gio/html/ch35.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - -Migrating to GDBus: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Migrating to GDBus

- -
-

-Conceptual differences

-

- The central concepts of D-Bus are modelled in a very similar way - in dbus-glib and GDBus. Both have a objects representing connections, - proxies and method invocations. But there are some important - differences: -

-
    -
  • - dbus-glib uses the libdbus - reference implementation, GDBus doesn't. Instead, it - relies on GIO streams as transport layer, and has its own - implementation for the D-Bus connection setup and - authentication. Apart from using streams as transport, - avoiding libdbus also lets GDBus avoid some thorny - multithreading issues. -

  • -
  • - dbus-glib uses the GObject type system for method arguments and - return values, including a homegrown container specialization - mechanism. GDBus relies on the GVariant type system which is - explicitly designed to match D-Bus types. -

  • -
  • - dbus-glib models only D-Bus interfaces and does not provide - any types for objects. GDBus models both D-Bus interfaces - (via the GDBusInterface, GDBusProxy and - GDBusInterfaceSkeleton types) and objects (via the - GDBusObject, GDBusObjectSkeleton and GDBusObjectProxy types). -

  • -
  • - GDBus includes native support for the org.freedesktop.DBus.Properties (via the GDBusProxy type) and org.freedesktop.DBus.ObjectManager D-Bus interfaces, dbus-glib doesn't. -

  • -
  • - The typical way to export an object in dbus-glib involves - generating glue code from XML introspection data using - dbus-binding-tool. GDBus provides a - similar tool called gdbus-codegen that - can also generate Docbook D-Bus interface documentation. -

  • -
  • - dbus-glib doesn't provide any convenience API for owning and - watching bus names, GDBus provides the g_bus_own_name() and - g_bus_watch_name() family of convenience functions. -

  • -
  • - GDBus provides API to parse, generate and work with Introspection - XML, dbus-glib doesn't. -

  • -
  • - GTestDBus provides API to create isolated unit tests GDBus Test Scaffolding. -

  • -
-

-

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch35s02.html b/docs/reference/gio/html/ch35s02.html deleted file mode 100644 index 836550d1a..000000000 --- a/docs/reference/gio/html/ch35s02.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - -API comparison: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-API comparison

-
-

Table 4. dbus-glib APIs and their GDBus counterparts

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
dbus-glibGDBus
DBusGConnectionGDBusConnection
DBusGProxy -GDBusProxy, GDBusInterface - also see GDBusObjectProxy -
DBusGObject -GDBusInterfaceSkeleton, GDBusInterface - also see GDBusObjectSkeleton -
DBusGMethodInvocationGDBusMethodInvocation
dbus_g_bus_get() -g_bus_get_sync(), also see - g_bus_get() -
dbus_g_proxy_new_for_name() -g_dbus_proxy_new_sync() and - g_dbus_proxy_new_for_bus_sync(), also see g_dbus_proxy_new() -
dbus_g_proxy_add_signal()not needed, use the generic “g-signal” -
dbus_g_proxy_connect_signal()use g_signal_connect() with “g-signal” -
dbus_g_connection_register_g_object() -g_dbus_connection_register_object() - also see g_dbus_object_manager_server_export() -
dbus_g_connection_unregister_g_object() -g_dbus_connection_unregister_object() - also see g_dbus_object_manager_server_unexport() -
dbus_g_object_type_install_info()introspection data is installed while registering - an object, see g_dbus_connection_register_object() -
dbus_g_proxy_begin_call()g_dbus_proxy_call()
dbus_g_proxy_end_call()g_dbus_proxy_call_finish()
dbus_g_proxy_call()g_dbus_proxy_call_sync()
dbus_g_error_domain_register()g_dbus_error_register_error_domain()
dbus_g_error_has_name()no direct equivalent, see g_dbus_error_get_remote_error() -
dbus_g_method_return()g_dbus_method_invocation_return_value()
dbus_g_method_return_error() -g_dbus_method_invocation_return_error() and variants
dbus_g_method_get_sender()g_dbus_method_invocation_get_sender()
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch35s03.html b/docs/reference/gio/html/ch35s03.html deleted file mode 100644 index 63674547e..000000000 --- a/docs/reference/gio/html/ch35s03.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - -Owning bus names: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Owning bus names

-

- Using dbus-glib, you typically call RequestName manually - to own a name, like in the following excerpt: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
error = NULL;
-res = dbus_g_proxy_call (system_bus_proxy,
-                         "RequestName",
-                         &error,
-                         G_TYPE_STRING, NAME_TO_CLAIM,
-                         G_TYPE_UINT,   DBUS_NAME_FLAG_ALLOW_REPLACEMENT,
-                         G_TYPE_INVALID,
-                         G_TYPE_UINT,   &result,
-                         G_TYPE_INVALID);
-if (!res)
-  {
-    if (error != NULL)
-      {
-        g_warning ("Failed to acquire %s: %s",
-                   NAME_TO_CLAIM, error->message);
-        g_error_free (error);
-      }
-    else
-      {
-        g_warning ("Failed to acquire %s", NAME_TO_CLAIM);
-      }
-    goto out;
-  }
-
-if (result != DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER)
-  {
-    if (error != NULL)
-      {
-        g_warning ("Failed to acquire %s: %s",
-                   NAME_TO_CLAIM, error->message);
-        g_error_free (error);
-      }
-    else
-      {
-        g_warning ("Failed to acquire %s", NAME_TO_CLAIM);
-      }
-    exit (1);
-  }
-
-dbus_g_proxy_add_signal (system_bus_proxy, "NameLost",
-                         G_TYPE_STRING, G_TYPE_INVALID);
-dbus_g_proxy_connect_signal (system_bus_proxy, "NameLost",
-                             G_CALLBACK (on_name_lost), NULL, NULL);
-
-/* further setup ... */
-
- -

-

-

- While you can do things this way with GDBus too, using - g_dbus_proxy_call_sync(), it is much nicer to use the high-level API - for this: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
static void
-on_name_acquired (GDBusConnection *connection,
-                  const gchar     *name,
-                  gpointer         user_data)
-{
-  /* further setup ... */
-}
-
-/* ... */
-
-  owner_id = g_bus_own_name (G_BUS_TYPE_SYSTEM,
-                             NAME_TO_CLAIM,
-                             G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT,
-                             on_bus_acquired,
-                             on_name_acquired,
-                             on_name_lost,
-                             NULL,
-                             NULL);
-
-  g_main_loop_run (loop);
-
-  g_bus_unown_name (owner_id);
-
- -

- Note that g_bus_own_name() works asynchronously and requires - you to enter your mainloop to await the on_name_aquired() - callback. Also note that in order to avoid race conditions (e.g. - when your service is activated by a method call), you have to export - your manager object before acquiring the - name. The on_bus_acquired() callback is the right place to do - such preparations. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/ch35s04.html b/docs/reference/gio/html/ch35s04.html deleted file mode 100644 index 8a1a43190..000000000 --- a/docs/reference/gio/html/ch35s04.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - -Creating proxies for well-known names: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Creating proxies for well-known names

-

- dbus-glib lets you create proxy objects for well-known names, like the - following example: -

-
- - - - - - - -
1
-2
-3
-4
proxy = dbus_g_proxy_new_for_name (system_bus_connection,
-                                   "org.freedesktop.Accounts",
-                                   "/org/freedesktop/Accounts",
-                                   "org.freedesktop.Accounts");
-
- -

- For a DBusGProxy constructed like this, method calls will be sent to - the current owner of the name, and that owner can change over time. -

-

- The same can be achieved with GDBusProxy: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
error = NULL;
-proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
-                                       G_DBUS_PROXY_FLAGS_NONE,
-                                       NULL, /* GDBusInterfaceInfo */
-                                       "org.freedesktop.Accounts",
-                                       "/org/freedesktop/Accounts",
-                                       "org.freedesktop.Accounts",
-                                       NULL, /* GCancellable */
-                                       &error);
-
- -

- For an added layer of safety, you can specify what D-Bus - interface the proxy is expected to conform to by using the - GDBusInterfaceInfo type. Additionally, GDBusProxy loads, - caches and tracks changes to the D-Bus properties on the remote - object. It also sets up match rules so D-Bus signals from the - remote object are delivered locally. -

-

- The GDBusProxy type normally isn't used directly - instead - proxies subclassing GDBusProxy generated by gdbus-codegen is used, see the section called “Using gdbus-codegen” -

-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/conversion.html b/docs/reference/gio/html/conversion.html deleted file mode 100644 index db1204eb6..000000000 --- a/docs/reference/gio/html/conversion.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - -Data conversion: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Data conversion

-
-
-GConverter — Data conversion interface -
-
-GCharsetConverter — Convert between charsets -
-
-GZlibCompressor — Zlib compressor -
-
-GZlibDecompressor — Zlib decompressor -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/data-models.html b/docs/reference/gio/html/data-models.html deleted file mode 100644 index 72ac3183f..000000000 --- a/docs/reference/gio/html/data-models.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - -Data Models: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Data Models

-
-
-GListModel — An interface describing a dynamic list of objects -
-
-GListStore — A simple implementation of GListModel -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/extending-gio.html b/docs/reference/gio/html/extending-gio.html deleted file mode 100644 index d35c37122..000000000 --- a/docs/reference/gio/html/extending-gio.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - -Extending GIO: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Extending GIO

-

- A lot of the functionality that is accessible through GIO - is implemented in loadable modules, and modules provide a convenient - way to extend GIO. In addition to the GIOModule API which supports - writing such modules, GIO has a mechanism to define extension points, - and register implementations thereof, see GIOExtensionPoint. -

-

- The following extension points are currently defined by GIO: -

-

G_VFS_EXTENSION_POINT_NAME.  - Allows to override the functionality of the GVfs class. - Implementations of this extension point must be derived from GVfs. - GIO uses the implementation with the highest priority that is active, - see g_vfs_is_active(). - - GIO implements this extension point for local files, gvfs contains - an implementation that supports all the backends in gvfs. -

-

G_VOLUME_MONITOR_EXTENSION_POINT_NAME.  - Allows to add more volume monitors. - Implementations of this extension point must be derived from - GVolumeMonitor. GIO uses all registered extensions. - - gvfs contains an implementation that works together with the GVfs - implementation in gvfs. -

-

G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME.  - Allows to override the 'native' volume monitor. - Implementations of this extension point must be derived from - GNativeVolumeMonitor. GIO uses the implementation with - the highest priority that is supported, as determined by the - is_supported() vfunc in GVolumeMonitorClass. - - GIO implements this extension point for local mounts, - gvfs contains a udisks2-based implementation. -

-

G_LOCAL_FILE_MONITOR_EXTENSION_POINT_NAME.  - Allows to override the file monitor implementation for - local files. Implementations of this extension point must - be derived from GLocalFileMonitor. GIO uses the implementation - with the highest priority that is supported, as determined by the - is_supported() vfunc in GLocalFileMonitorClass. - - GIO uses this extension point internally, to switch between - its fam-based and inotify-based file monitoring implementations. -

-

G_LOCAL_DIRECTORY_MONITOR_EXTENSION_POINT_NAME.  - Allows to override the directory monitor implementation for - local files. Implementations of this extension point must be - derived from GLocalDirectoryMonitor. GIO uses the implementation - with the highest priority that is supported, as determined by the - is_supported() vfunc in GLocalDirectoryMonitorClass. - - GIO uses this extension point internally, to switch between - its fam-based and inotify-based directory monitoring implementations. -

-

G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME.  - Unix-only. Allows to provide a way to associate default handlers - with URI schemes. Implementations of this extension point must - implement the GDesktopAppInfoLookup interface. GIO uses the - implementation with the highest priority. - - This extension point has been discontinued in GLib 2.28. It is - still available to keep API and ABI stability, but GIO is no - longer using it for default handlers. Instead, the mime handler - mechanism is used, together with x-scheme-handler pseudo-mimetypes. -

-

G_SETTINGS_BACKEND_EXTENSION_POINT_NAME.  - Allows to provide an alternative storage for GSettings. - Implementations of this extension point must derive from the - GSettingsBackend type. GIO contains a keyfile-based - implementation of this extension point, another one is provided - by dconf. -

-

G_PROXY_EXTENSION_POINT_NAME.  - Allows to provide implementations for network proxying. - Implementations of this extension point must provide the - GProxy interface, and must be named after the network - protocol they are proxying. - - glib-networking contains an implementation of this extension - point based on libproxy. -

-

G_TLS_BACKEND_EXTENSION_POINT_NAME.  - Allows to provide implementations for TLS support. - Implementations of this extension point must implement - the GTlsBackend interface. - - glib-networking contains an implementation of this extension - point. -

-

G_NETWORK_MONITOR_EXTENSION_POINT_NAME.  - Allows to provide implementations for network connectivity - monitoring. - Implementations of this extension point must implement - the GNetworkMonitorInterface interface. - - GIO contains an implementation of this extension point - that is using the netlink interface of the Linux kernel. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/extending.html b/docs/reference/gio/html/extending.html deleted file mode 100644 index b5fffb9a8..000000000 --- a/docs/reference/gio/html/extending.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - -Extending GIO: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Extending GIO

-
-
-GVfs — Virtual File System -
-
-GIOModule — Loadable GIO Modules -
-
-Extension Points — Extension Points -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/failable_initialization.html b/docs/reference/gio/html/failable_initialization.html deleted file mode 100644 index 67362ee70..000000000 --- a/docs/reference/gio/html/failable_initialization.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - -Failable Initialization: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Failable Initialization

-
-
-GInitable — Failable object initialization interface -
-
-GAsyncInitable — Asynchronously failable object initialization interface -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/file_mon.html b/docs/reference/gio/html/file_mon.html deleted file mode 100644 index 513c531a4..000000000 --- a/docs/reference/gio/html/file_mon.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - -File System Monitoring: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-File System Monitoring

-
-GFileMonitor — File Monitor -
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/file_ops.html b/docs/reference/gio/html/file_ops.html deleted file mode 100644 index 3fccc2477..000000000 --- a/docs/reference/gio/html/file_ops.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - -File Operations: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-File Operations

-
-
-GFile — File and Directory Handling -
-
-GFileAttribute — Key-Value Paired File Attributes -
-
-GFileInfo — File Information and Attributes -
-
-GFileEnumerator — Enumerated Files Routines -
-
-GIOError — Error helper functions -
-
-GMountOperation — Object used for authentication and user interaction -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gapplication-tool.html b/docs/reference/gio/html/gapplication-tool.html deleted file mode 100644 index ece957da0..000000000 --- a/docs/reference/gio/html/gapplication-tool.html +++ /dev/null @@ -1,287 +0,0 @@ - - - - -gapplication: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

gapplication

-

gapplication — D-Bus application launcher

-
-
-

Synopsis

-

gapplication help [COMMAND]

-

gapplication version

-

gapplication list-apps

-

gapplication launch APPID

-

gapplication launch APPID [FILE...]

-

gapplication list-actions APPID

-

gapplication action APPID ACTION [PARAMETER]

-
-
-

Description

-

- gapplication is a commandline implementation of the client-side of the - org.freedesktop.Application interface as specified by the freedesktop.org - Desktop Entry Specification. -

-

- gapplication can be used to start applications that have - DBusActivatable set to true in their .desktop - files and can be used to send messages to already-running instances of other applications. -

-

- It is possible for applications to refer to gapplication in the Exec - line of their .desktop file to maintain backwards compatibility - with implementations that do not directly support DBusActivatable. -

-

- gapplication ships as part of GLib. -

-
-
-

Commands

-
-

Global commands

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -

- help - [COMMAND] -

- Displays a short synopsis of the available commands or provides detailed help on a specific - command. -

- version -

- Prints the GLib version whence gapplication came. -

- list-apps -

- Prints a list of all application IDs that are known to support D-Bus activation. This list is - generated by scanning .desktop files as per the current - XDG_DATA_DIRS. -

- launch - APPID - [FILE...] -

-

- Launches an application. -

-

- The first parameter is the application ID in the familiar "reverse DNS" style (eg: - 'org.gnome.app') without the .desktop - suffix. -

-

- Optionally, if additional parameters are given, they are treated as the names of files to open and - may be filenames or URIs. If no files are given then the application is simply activated. -

-

- list-actions - APPID -

- List the actions declared in the application's .desktop - file. The parameter is the application ID, as above. -

- action - APPID - ACTION - [PARAMETER] -

-

- Invokes the named action (in the same way as would occur when activating an action specified in - the .desktop file). -

-

- The application ID (as above) is the first parameter. The action name follows. -

-

- Optionally, following the action name can be one parameter, in GVariant format, given as a single - argument. Make sure to use sufficient quoting. -

-
-
-
-
-

Examples

-
-

From the commandline

-

- Launching an application: -

-
-        gapplication launch org.example.fooview
-      
-

- Opening a file with an application: -

-
-        gapplication launch org.example.fooview ~/file.foo
-      
-

- Opening many files with an application: -

-
-        gapplication launch org.example.fooview ~/foos/*.foo
-      
-

- Invoking an action on an application: -

-
-        gapplication action org.example.fooview create
-      
-

- Invoking an action on an application, with an action: -

-
-        gapplication action org.example.fooview show-item '"item_id_828739"'
-      
-
-
-
-

- From the Exec lines of a .desktop file -

-

- The commandline interface of gapplication was designed so that it could be used - directly from the Exec line of a .desktop - file. -

-

- You might want to do this to allow for backwards compatibility with implementations of the specification - that do not understand how to do D-Bus activation, without having to install a separate utility program. -

-

- Consider the following example: -

-
-        [Desktop Entry]
-        Version=1.1
-        Type=Application
-        Name=Foo Viewer
-        DBusActivatable=true
-        MimeType=image/x-foo;
-        Exec=gapplication launch org.example.fooview %F
-        Actions=gallery;create;
-
-        [Desktop Action gallery]
-        Name=Browse Gallery
-        Exec=gapplication action org.example.fooview gallery
-
-        [Desktop Action create]
-        Name=Create a new Foo!
-        Exec=gapplication action org.example.fooview create
-      
-
-
-
-

From a script

-

- If installing an application that supports D-Bus activation you may still want to put a file in - /usr/bin so that your program can be started from a terminal. -

-

- It is possible for this file to be a shell script. The script can handle arguments such as --help and - --version directly. It can also parse other command line arguments and convert them to uses of - gapplication to activate the application, open files, or invoke actions. -

-

- Here is a simplified example, as may be installed in /usr/bin/fooview: -

-
-        #!/bin/sh
-
-        case "$1" in
-          --help)
-            echo "see 'man fooview' for more information"
-            ;;
-
-          --version)
-            echo "fooview 1.2"
-            ;;
-
-          --gallery)
-            gapplication action org.example.fooview gallery
-            ;;
-
-          --create)
-            gapplication action org.example.fooview create
-            ;;
-
-          -*)
-            echo "unrecognised commandline argument"
-            exit 1
-            ;;
-
-          *)
-            gapplication launch org.example.fooview "$@"
-            ;;
-        esac
-      
-
-
-
-

See also

-

- Desktop Entry Specification, - gdbus(1), - xdg-open(1), - desktop-file-validate(1) -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gdbus-codegen.html b/docs/reference/gio/html/gdbus-codegen.html deleted file mode 100644 index b6d3a6d97..000000000 --- a/docs/reference/gio/html/gdbus-codegen.html +++ /dev/null @@ -1,1122 +0,0 @@ - - - - -gdbus-codegen: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

gdbus-codegen

-

gdbus-codegen — D-Bus code and documentation generator

-
-
-

Synopsis

-

gdbus-codegen [-h, --help] [--interface-prefix org.project.Prefix] [--generate-c-code OUTFILES] [--c-namespace YourProject] [--c-generate-object-manager] [--c-generate-autocleanup none|objects|all] [--output-directory OUTDIR] [--generate-docbook OUTFILES] [--xml-files FILE] [ - --annotate - ELEMENT - KEY - VALUE - ]... FILE [ - FILE... - ]

-
-
-

Description

-

- gdbus-codegen is used to generate code and/or - documentation for one or more D-Bus interfaces. The tool reads - D-Bus - Introspection XML files and generates output files. The - tool currently supports generating C code (via - --generate-c-code) and Docbook XML (via - --generate-docbook). -

-
-
-

Generating C code

-

- When generating C code, a - GInterface-derived type is generated for each D-Bus - interface. Additionally, for every generated type, - FooBar, two concrete instantiable types, - FooBarProxy and FooBarSkeleton, implementing - said interface are also generated. The former is derived from - GDBusProxy and intended for use on the client side - while the latter is derived from the - GDBusInterfaceSkeleton type making it easy to export on a - GDBusConnection either directly or via a - GDBusObjectManagerServer instance. -

-

- The name of each generated C type is derived from the D-Bus - interface name stripped with the prefix given with - --interface-prefix and with the dots removed and - initial characters capitalized. For example, for the D-Bus - interface com.acme.Coyote the name used is - ComAcmeCoyote. For the D-Bus interface - org.project.Bar.Frobnicator with - --interface-prefix - org.project., the name used is - BarFrobnicator. -

-

- For methods, signals and properties, if not specified, the name - defaults to the name of the method, signal or property. -

-

- Two forms of the name are used - the CamelCase form and the - lower-case form. The CamelCase form is used for the GType and - struct name, while lower-case form is used in function names. The - lower-case form is calculated by converting from CamelCase to - lower-case and inserting underscores at word boundaries (using - certain heuristics). -

-

- If the value given by the org.gtk.GDBus.C.Name - annotation or the --c-namespace option contains - an underscore (sometimes called Ugly_Case), - then the camel-case name is derived by removing all underscores, - and the lower-case name is derived by lower-casing the - string. This is useful in some situations where abbreviations are - used. For example, if the annotation is used on the interface - net.MyCorp.MyApp.iSCSITarget with the value - iSCSI_Target the CamelCase form is - iSCSITarget while the lower-case form is - iscsi_target. If the annotation is used on the - method EjectTheiPod with the value - Eject_The_iPod, the lower-case form is - eject_the_ipod. -

-
-
-

Generating Docbook documentation

-

- Each generated Docbook XML file (see the - --generate-docbook option for details) is a RefEntry - article describing the D-Bus interface. -

-
-
-

Options

-

- The following options are supported: -

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-h, --help

- Show help and exit. -

--xml-files FILE

- The D-Bus introspection XML file. -

--interface-prefix org.project.Prefix.

- A prefix to strip from all D-Bus interface names when - calculating the typename for the C binding and the Docbook - sortas - attribute. -

--generate-docbook OUTFILES

- Generate Docbook Documentation for each D-Bus interface and - put it in OUTFILES-NAME.xml where - NAME is a place-holder for the interface - name, e.g. net.Corp.FooBar and so on. -

--generate-c-code OUTFILES

-

- Generate C code for all D-Bus interfaces and put it in - OUTFILES.c and - OUTFILES.h including any sub-directories. If you want the files to - be output in a different location use --output-directory as OUTFILES.h - including sub-directories will be referenced from OUTFILES.c. -

-

- The full paths would then be $(OUTDIR)/$(dirname $OUTFILES)/$(basename $OUTFILES).{c,h}. -

-

--c-namespace YourProject

- The namespace to use for generated C code. This is expected - to be in CamelCase - or Ugly_Case (see above). -

--c-generate-object-manager

- If this option is passed, suitable GDBusObject, - GDBusObjectProxy, GDBusObjectSkeleton and - GDBusObjectManagerClient subclasses are generated. -

--c-generate-autocleanup none|objects|all

- This option influences what types autocleanup functions are - generated for. 'none' means to not generate any autocleanup functions. - 'objects' means to generate them for object types, and 'all' means to - generate them for object types and interfaces. The default is 'objects' - due to a corner case in backwards compatibility with a few projects, - but you should likely switch your project to use 'all'. - This option was added in GLib 2.50. -

--output-directory OUTDIR

- Directory to output generated source to. Equivalent to changing directory before generation. -

--annotate ELEMENT KEY VALUE

-

- Used to inject D-Bus annotations into the given XML - files. It can be used with interfaces, methods, signals, - properties and arguments in the following way: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
gdbus-codegen --c-namespace MyApp                           \
-  --generate-c-code myapp-generated                         \
-  --annotate "org.project.InterfaceName"                    \
-    org.gtk.GDBus.C.Name MyFrobnicator                      \
-  --annotate "org.project.InterfaceName:Property"           \
-    bar bat                                                 \
-  --annotate "org.project.InterfaceName.Method()"           \
-    org.freedesktop.DBus.Deprecated true                    \
-  --annotate "org.project.InterfaceName.Method()[arg_name]" \
-    snake hiss                                              \
-  --annotate "org.project.InterfaceName::Signal"            \
-    cat meow                                                \
-  --annotate "org.project.InterfaceName::Signal[arg_name]"  \
-    dog wuff                                                \
-  myapp-dbus-interfaces.xml
-
- -

- Any UTF-8 string can be used for KEY and VALUE. -

-
-
-
-

Supported D-Bus Annotations

-

- The following D-Bus annotations are supported by - gdbus-codegen: -

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

org.freedesktop.DBus.Deprecated

-

- Can be used on any <interface>, - <method>, - <signal> and - <property> element to specify that - the element is deprecated if its value is - true. Note that this annotation is - defined in the D-Bus - specification and can only assume the values - true and false. In - particular, you cannot specify the version that the element - was deprecated in nor any helpful deprecation message. Such - information should be added to the element documentation - instead. -

-

- When generating C code, this annotation is used to add - G_GNUC_DEPRECATED to generated functions for the element. -

-

- When generating Docbook XML, a deprecation warning will - appear along the documentation for the element. -

-

org.gtk.GDBus.Since

-

- Can be used on any <interface>, - <method>, - <signal> and - <property> element to specify the - version (any free-form string but compared using a - version-aware sort function) the element appeared in. -

-

- When generating C code, this field is used to ensure - function pointer order for preserving ABI/API, see the section called “Stability Guarantees”. -

-

- When generating Docbook XML, the value of this tag appears - in the documentation. -

-

org.gtk.GDBus.DocString

- A string with Docbook content for documentation. This annotation can - be used on <interface>, - <method>, - <signal>, - <property> and - <arg> elements. -

org.gtk.GDBus.DocString.Short

- A string with Docbook content for short/brief - documentation. This annotation can only be used on - <interface> elements. -

org.gtk.GDBus.C.Name

- Can be used on any <interface>, - <method>, - <signal> and - <property> element to specify the - name to use when generating C code. The value is expected to - be in CamelCase - or Ugly_Case (see above). -

org.gtk.GDBus.C.ForceGVariant

- If set to a non-empty string, a GVariant instance will - be used instead of the natural C type. This annotation can - be used on any <arg> and - <property> element. -

org.gtk.GDBus.C.UnixFD

- If set to a non-empty string, the generated code will - include parameters to exchange file descriptors using the - GUnixFDList type. This annotation can be used on - <method> elements. -

-

- As an easier alternative to using the - org.gtk.GDBus.DocString annotation, note that - parser used by gdbus-codegen parses XML - comments in a way similar to gtk-doc: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
<!--
-  net.Corp.Bar:
-  @short_description: A short description
-
-  A <emphasis>longer</emphasis> description.
-
-  This is a new paragraph.
--->
-<interface name="net.corp.Bar">
-  <!--
-    FooMethod:
-    @greeting: The docs for greeting parameter.
-    @response: The docs for response parameter.
-
-    The docs for the actual method.
-  -->
-  <method name="FooMethod">
-    <arg name="greeting" direction="in" type="s"/>
-    <arg name="response" direction="out" type="s"/>
-  </method>
-
-  <!--
-    BarSignal:
-    @blah: The docs for blah parameter.
-    @boo: The docs for boo parameter.
-    @since: 2.30
-
-    The docs for the actual signal.
-  -->
-  <signal name="BarSignal">
-    <arg name="blah" type="s"/>
-    <arg name="boo" type="s"/>
-  </signal>
-
-  <!-- BazProperty: The docs for the property. -->
-  <property name="BazProperty" type="s" access="read"/>
-</interface>
-
- -

-

-

- Note that @since can be used in any inline - documentation bit (e.g. for interfaces, methods, signals and - properties) to set the org.gtk.GDBus.Since - annotation. For the org.gtk.GDBus.DocString - annotation (and inline comments), note that substrings of the form - #net.Corp.Bar, - net.Corp.Bar.FooMethod(), - #net.Corp.Bar::BarSignal and - #net.Corp.InlineDocs:BazProperty are all - expanded to links to the respective interface, method, signal and - property. - Additionally, substrings starting with @ and % characters are rendered as - parameter and - constant respectively. -

-

- If both XML comments and - org.gtk.GDBus.DocString or - org.gtk.GDBus.DocString.Short annotations are - present, the latter wins. -

-
-
-

Example

-

- Consider the following D-Bus Introspection XML. -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
<node>
-  <interface name="net.Corp.MyApp.Frobber">
-    <method name="HelloWorld">
-      <arg name="greeting" direction="in" type="s"/>
-      <arg name="response" direction="out" type="s"/>
-    </method>
-
-    <signal name="Notification">
-      <arg name="icon_blob" type="ay"/>
-      <arg name="height" type="i"/>
-      <arg name="messages" type="as"/>
-    </signal>
-
-    <property name="Verbose" type="b" access="readwrite"/>
-  </interface>
-</node>
-
- -

- If gdbus-codegen is used on this file like this: -

-
- - - - - - - -
1
-2
-3
-4
gdbus-codegen --generate-c-code myapp-generated       \
-              --c-namespace MyApp                     \
-              --interface-prefix net.corp.MyApp.      \
-              net.Corp.MyApp.Frobber.xml
-
- -

- two files called - myapp-generated.[ch] are - generated. The files provide an abstract - GTypeInterface-derived type called - MyAppFrobber as well as two instantiable types with - the same name but suffixed with Proxy and - Skeleton. The generated file, roughly, contains the - following facilities: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
/* GType macros for the three generated types */
-#define MY_APP_TYPE_FROBBER (my_app_frobber_get_type ())
-#define MY_APP_TYPE_FROBBER_SKELETON (my_app_frobber_skeleton_get_type ())
-#define MY_APP_TYPE_FROBBER_PROXY (my_app_frobber_proxy_get_type ())
-
-typedef struct _MyAppFrobber MyAppFrobber; /* Dummy typedef */
-
-typedef struct
-{
-  GTypeInterface parent_iface;
-
-  /* Signal handler for the ::notification signal */
-  void (*notification) (MyAppFrobber *proxy,
-                        GVariant *icon_blob,
-                        gint height,
-                        const gchar* const *messages);
-
-  /* Signal handler for the ::handle-hello-world signal */
-  gboolean (*handle_hello_world) (MyAppFrobber *proxy,
-                                  GDBusMethodInvocation *invocation,
-                                  const gchar *greeting);
-} MyAppFrobberIface;
-
-/* Asynchronously calls HelloWorld() */
-void
-my_app_frobber_call_hello_world (MyAppFrobber *proxy,
-                                 const gchar *greeting,
-                                 GCancellable *cancellable,
-                                 GAsyncReadyCallback callback,
-                                 gpointer user_data);
-gboolean
-my_app_frobber_call_hello_world_finish (MyAppFrobber *proxy,
-                                        gchar **out_response,
-                                        GAsyncResult *res,
-                                        GError **error);
-
-/* Synchronously calls HelloWorld(). Blocks calling thread. */
-gboolean
-my_app_frobber_call_hello_world_sync (MyAppFrobber *proxy,
-                                      const gchar *greeting,
-                                      gchar **out_response,
-                                      GCancellable *cancellable,
-                                      GError **error);
-
-/* Completes handling the HelloWorld() method call */
-void
-my_app_frobber_complete_hello_world (MyAppFrobber *object,
-                                     GDBusMethodInvocation *invocation,
-                                     const gchar *response);
-
-/* Emits the ::notification signal / Notification() D-Bus signal */
-void
-my_app_frobber_emit_notification (MyAppFrobber *object,
-                                  GVariant *icon_blob,
-                                  gint height,
-                                  const gchar* const *messages);
-
-/* Gets the :verbose GObject property / Verbose D-Bus property.
- * Does no blocking I/O.
- */
-gboolean my_app_frobber_get_verbose (MyAppFrobber *object);
-
-/* Sets the :verbose GObject property / Verbose D-Bus property.
- * Does no blocking I/O.
- */
-void my_app_frobber_set_verbose (MyAppFrobber *object,
-                                 gboolean      value);
-
-/* Gets the interface info */
-GDBusInterfaceInfo *my_app_frobber_interface_info (void);
-
-/* Creates a new skeleton object, ready to be exported */
-MyAppFrobber *my_app_frobber_skeleton_new (void);
-
-/* Client-side proxy constructors.
- *
- * Additionally, _new_for_bus(), _new_for_bus_finish() and
- * _new_for_bus_sync() proxy constructors are also generated.
- */
-void
-my_app_frobber_proxy_new        (GDBusConnection     *connection,
-                                 GDBusProxyFlags      flags,
-                                 const gchar         *name,
-                                 const gchar         *object_path,
-                                 GCancellable        *cancellable,
-                                 GAsyncReadyCallback  callback,
-                                 gpointer             user_data);
-MyAppFrobber *
-my_app_frobber_proxy_new_finish (GAsyncResult        *res,
-                                 GError             **error);
-MyAppFrobber *
-my_app_frobber_proxy_new_sync   (GDBusConnection     *connection,
-                                 GDBusProxyFlags      flags,
-                                 const gchar         *name,
-                                 const gchar         *object_path,
-                                 GCancellable        *cancellable,
-                                 GError             **error);
-
- -

- Thus, for every D-Bus method, there will be three C functions for - calling the method, one GObject signal for handling an incoming - call and one C function for completing an incoming call. For every - D-Bus signal, there's one GObject signal and one C function for - emitting it. For every D-Bus property, two C functions are - generated (one setter, one getter) and one GObject property. The - following table summarizes the generated facilities and where they - are applicable: -

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ClientServer
TypesUse MyAppFrobberProxy -Any type implementing the MyAppFrobber interface
MethodsUse m_a_f_hello_world() to call.Receive via the handle_hello_world() signal handler. Complete the call with m_a_f_complete_hello_world() -
SignalsConnect to the ::notification GObject signal.Use m_a_f_emit_notification() to emit signal.
Properties (Reading)Use m_a_f_get_verbose() or :verbose.Implement GObject's get_property() vfunc.
Properties (writing)Use m_a_f_set_verbose() or :verbose.Implement GObject's set_property() vfunc.
-
-

Client-side usage

-

- You can use the generated proxy type with the generated - constructors: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
MyAppFrobber *proxy;
-GError *error;
-
-error = NULL;
-proxy = my_app_frobber_proxy_new_for_bus_sync (
-            G_BUS_TYPE_SESSION,
-            G_DBUS_PROXY_FLAGS_NONE,
-            "net.Corp.MyApp",              /* bus name */
-            "/net/Corp/MyApp/SomeFrobber", /* object */
-            NULL,                          /* GCancellable* */
-            &error);
-/* do stuff with proxy */
-g_object_unref (proxy);
-
- -

- Instead of using the generic GDBusProxy facilities, one can use - the generated methods such as - my_app_frobber_call_hello_world() to invoke - the net.Corp.MyApp.Frobber.HelloWorld() - D-Bus method, connect to the - ::notification GObject signal to receive - the net.Corp.MyApp.Frobber::Notication - D-Bus signal and get/set the - net.Corp.MyApp.Frobber:Verbose D-Bus - Property using either the GObject property - :verbose or the - my_app_get_verbose() and - my_app_set_verbose() methods. Use the - standard “notify” signal to listen to property changes. -

-

- Note that all property access is via GDBusProxy's - property cache so no I/O is ever done when reading properties. - Also note that setting a property will cause the - org.freedesktop.DBus.Properties.Set method to be - called on the remote object. This call, however, is asynchronous - so setting a property won't block. Further, the change is - delayed and no error checking is possible. -

-
-
-
-

Server-side usage

-

- The generated MyAppFrobber interface is designed so - it is easy to implement it in a GObject - subclass. For example, to handle - HelloWorld() method invocations, set the - vfunc for handle_hello_hello_world() in the - MyAppFrobberIface structure. Similary, to handle - the net.Corp.MyApp.Frobber:Verbose - property override the :verbose GObject - property from the subclass. To emit a signal, use - e.g. my_app_emit_signal() or - g_signal_emit_by_name(). -

-

- Instead of subclassing, it is often easier to use the generated - MyAppFrobberSkeleton subclass. To handle incoming - method calls, use g_signal_connect() with - the ::handle-* signals and instead of - overriding GObject's - get_property() and - set_property() vfuncs, use - g_object_get() and - g_object_set() or the generated property - getters and setters (the generated class has an internal - property bag implementation). -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
static gboolean
-on_handle_hello_world (MyAppFrobber           *interface,
-                       GDBusMethodInvocation  *invocation,
-                       const gchar            *greeting,
-                       gpointer                user_data)
-{
-  if (g_strcmp0 (greeting, "Boo") != 0)
-    {
-      gchar *response;
-      response = g_strdup_printf ("Word! You said `%s'.", greeting);
-      my_app_complete_hello_world (interface, invocation, response);
-      g_free (response);
-    }
-  else
-    {
-      g_dbus_method_invocation_return_error (invocation,
-                 MY_APP_ERROR,
-                 MY_APP_ERROR_NO_WHINING,
-                 "Hey, %s, there will be no whining!",
-                 g_dbus_method_invocation_get_sender (invocation));
-    }
-  return TRUE;
-}
-
-  [...]
-
-  interface = my_app_frobber_skeleton_new ();
-  my_app_frobber_set_verbose (interface, TRUE);
-
-  g_signal_connect (interface,
-                    "handle-hello-world",
-                    G_CALLBACK (on_handle_hello_world),
-                    some_user_data);
-
-  [...]
-
-  error = NULL;
-  if (!g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (interface),
-                                         connection,
-                                         "/path/of/dbus_object",
-                                         &error))
-    {
-      /* handle error */
-    }
-
- -

- To facilitate atomic changesets (multiple properties changing at - the same time), “notify” signals are queued up when - received. The queue is drained in an idle handler (which is called from the - thread-default main loop - of the thread where the skeleton object was - contructed) and will cause emissions of the org.freedesktop.DBus.Properties::PropertiesChanged - signal with all the properties that have changed. Use - g_dbus_interface_skeleton_flush() or - g_dbus_object_skeleton_flush() to empty the queue - immediately. Use g_object_freeze_notify() and - g_object_thaw_notify() for atomic changesets if on a different - thread. -

-
-
-
-

C Type Mapping

-

- Scalar types - (type-strings - 'b', - 'y', - 'n', - 'q', - 'i', - 'u', - 'x', - 't' and - 'd') - ), - strings (type-strings - 's', - 'ay', - 'o' and - 'g') and - arrays of string (type-strings - 'as', - 'ao' and - 'aay') - are mapped to the natural types, - e.g. gboolean, gdouble, gint, gchar*, - gchar** and - so on. Everything else is mapped to the GVariant - type. -

-

- This automatic mapping can be turned off by using the annotation - org.gtk.GDBus.C.ForceGVariant - if used then a - GVariant is always exchanged instead of the - corresponding native C type. This annotation may be convenient to - use when using - bytestrings (type-string 'ay') - for data that could have embedded NUL bytes. -

-
-
-

Stability Guarantees

-

- The generated C functions are guaranteed to not change their ABI - that is, if a method, signal or property does not change its - signature in the introspection XML, the generated C functions will - not change its C ABI either. The ABI of the generated instance and - class structures will be preserved as well. -

-

- The ABI of the generated GTypes will be preserved only if - the org.gtk.GDBus.Since annotation is used - judiciously — this is because the VTable for the GInterface - relies on functions pointers for signal handlers. Specifically, if - a D-Bus method, property or signal or is added to a D-Bus - interface, then ABI of the generated GInterface type is preserved - if, and only if, each added method, property signal is annotated - with they org.gtk.GDBus.Since annotation using - a greater version number than previous versions. -

-

- The generated C code currently happens to be annotated with gtk-doc / GObject - Introspection comments / annotations. The layout and - contents might change in the future so no guarantees about - e.g. SECTION usage etc. is given. -

-

- While the generated Docbook for D-Bus interfaces isn't expected to - change, no guarantees are given at this point. -

-

- It is important to note that the generated code should not be - checked into revision control systems, nor it should be included - in distributed source archives. -

-
-
-

Bugs

-

- Please send bug reports to either the distribution bug tracker - or the upstream bug tracker at - https://bugzilla.gnome.org/enter_bug.cgi?product=glib. -

-
-
-

See also

-

- gdbus(1) -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gdbus-convenience.html b/docs/reference/gio/html/gdbus-convenience.html deleted file mode 100644 index 8eed80cc3..000000000 --- a/docs/reference/gio/html/gdbus-convenience.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - -High-level D-Bus Support: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-High-level D-Bus Support

-
-
-Owning Bus Names — Simple API for owning bus names -
-
-Watching Bus Names — Simple API for watching bus names -
-
-GDBusInterface — Base type for D-Bus interfaces -
-
-GDBusInterfaceSkeleton — Service-side D-Bus interface -
-
-GDBusProxy — Client-side D-Bus interface proxy -
-
-GDBusObject — Base type for D-Bus objects -
-
-GDBusObjectSkeleton — Service-side D-Bus object -
-
-GDBusObjectProxy — Client-side D-Bus object -
-
-GDBusObjectManager — Base type for D-Bus object managers -
-
-GDBusObjectManagerServer — Service-side object manager -
-
-GDBusObjectManagerClient — Client-side object manager -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gdbus-example-gdbus-codegen.html b/docs/reference/gio/html/gdbus-example-gdbus-codegen.html deleted file mode 100644 index 9fc3b15dc..000000000 --- a/docs/reference/gio/html/gdbus-example-gdbus-codegen.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - -Using gdbus-codegen: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Using gdbus-codegen

-

- dbus-glib comes with dbus-binding-tool, which - can produce somewhat nice client- and server-side wrappers for a D-Bus interface. - With GDBus, gdbus-codegen is used and like - its counterpart, it also takes D-Bus Introspection XML as input: -

-
-

Example 2. Example D-Bus Introspection XML

-
- - - - - - - -
1
FIXME: MISSING XINCLUDE CONTENT
-
- -
-

- If this XML is processed like this -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
gdbus-codegen --interface-prefix org.gtk.GDBus.Example.ObjectManager. \
-              --generate-c-code generated-code	                      \
-              --c-namespace Example 				      \
-              --c-generate-object-manager			      \
-              --generate-docbook generated-docs                       \
-              gdbus-example-objectmanager.xml
-
- -

- then two files generated-code.h and - generated-code.c are - generated. Additionally, two XML files - generated-docs-org.gtk.GDBus.Example.ObjectManager.Animal and - generated-docs-org.gtk.GDBus.Example.ObjectManager.Cat - with Docbook XML are generated. -

-

- While the contents of generated-code.h and - generated-code.c are best described by the - gdbus-codegen manual - page, brief examples of how this generated code can be used can be found in - ??? - and ???. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gdbus-lowlevel.html b/docs/reference/gio/html/gdbus-lowlevel.html deleted file mode 100644 index 65cd96378..000000000 --- a/docs/reference/gio/html/gdbus-lowlevel.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - -Low-level D-Bus Support: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Low-level D-Bus Support

-
-
-D-Bus Utilities — Various utilities related to D-Bus -
-
-D-Bus Addresses — D-Bus connection endpoints -
-
-D-Bus Introspection Data — Node and interface description data structures -
-
-GDBusError — Mapping D-Bus errors to and from GError -
-
-GDBusMessage — D-Bus Message -
-
-GDBusConnection — D-Bus Connections -
-
-GDBusMethodInvocation — Object for handling remote calls -
-
-GDBusServer — Helper for accepting connections -
-
-GDBusAuthObserver — Object used for authenticating connections -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gdbus.html b/docs/reference/gio/html/gdbus.html deleted file mode 100644 index 68f372c5b..000000000 --- a/docs/reference/gio/html/gdbus.html +++ /dev/null @@ -1,299 +0,0 @@ - - - - -gdbus: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

gdbus

-

gdbus — Tool for working with D-Bus objects

-
-
-

Synopsis

-

gdbus introspect [ --system | --session | --address address ] --dest bus_name --object-path /path/to/object [ --xml ] [ --recurse ] [ --only-properties ]

-

gdbus monitor [ --system | --session | --address address ] --dest bus_name [ --object-path /path/to/object ]

-

gdbus call [ --system | --session | --address address ] --dest bus_name --object-path /path/to/object --method org.project.InterfaceName.MethodName [ --timeout seconds ] ARG1 ARG2...

-

gdbus emit [ --system | --session | --address address ] --object-path /path/to/object --signal org.project.InterfaceName.SignalName [ --dest unique_bus_name ] ARG1 ARG2...

-

gdbus help

-
-
-

Description

-

- gdbus is a simple tool for working with D-Bus objects. -

-
-
-

Commands

-
---- - - - - - - - - - - - - - - - - - - - - - - -

introspect

- Prints out interfaces and property values for a remote object. - For this to work, the owner of the object needs to implement the - org.freedesktop.DBus.Introspectable interface. - If the --xml option is used, the returned - introspection XML is printed, otherwise a parsed pretty - representation is printed. - The --recurse option can be used to - introspect children (and their children and so on) and the - --only-properties option can be used to - only print the interfaces with properties. -

monitor

- Monitors one or all objects owned by the owner of - bus_name. -

call

- Invokes a method on a remote object. Each argument to pass to the - method must be specified as a serialized - GVariant except that strings do - not need explicit quotes. The return values are printed out as - serialized GVariant - values. -

emit

- Emits a signal. Each argument to include in the signal must be specified as a serialized - GVariant except that strings do - not need explicit quotes. -

help

- Prints help and exit. -

-
-
-

Bash Completion

-

- gdbus ships with a bash completion script to - complete commands, destinations, bus names, object paths and - interface/method names. -

-
-
-

Examples

- This shows how to introspect an object - note that the value of each - property is displayed: -
-$ gdbus introspect --system \
-        --dest org.freedesktop.NetworkManager \
-        --object-path /org/freedesktop/NetworkManager/Devices/0
-node /org/freedesktop/NetworkManager/Devices/0 {
-  interface org.freedesktop.DBus.Introspectable {
-    methods:
-      Introspect(out s data);
-  };
-  interface org.freedesktop.DBus.Properties {
-    methods:
-      Get(in  s interface,
-          in  s propname,
-          out v value);
-      Set(in  s interface,
-          in  s propname,
-          in  v value);
-      GetAll(in  s interface,
-             out a{sv} props);
-  };
-  interface org.freedesktop.NetworkManager.Device.Wired {
-    signals:
-      PropertiesChanged(a{sv} arg_0);
-    properties:
-      readonly b Carrier = false;
-      readonly u Speed = 0;
-      readonly s HwAddress = '00:1D:72:88:BE:97';
-  };
-  interface org.freedesktop.NetworkManager.Device {
-    methods:
-      Disconnect();
-    signals:
-      StateChanged(u arg_0,
-                   u arg_1,
-                   u arg_2);
-    properties:
-      readonly u DeviceType = 1;
-      readonly b Managed = true;
-      readwrite o Ip6Config = '/';
-      readwrite o Dhcp4Config = '/';
-      readwrite o Ip4Config = '/';
-      readonly u State = 2;
-      readwrite u Ip4Address = 0;
-      readonly u Capabilities = 3;
-      readonly s Driver = 'e1000e';
-      readwrite s Interface = 'eth0';
-      readonly s Udi = '/sys/devices/pci0000:00/0000:00:19.0/net/eth0';
-  };
-};
-
-

- The --recurse and --only-properties options can be useful when wanting to inspect all objects owned by a particular process: -

-
-$ gdbus introspect --system --dest org.freedesktop.UPower --object-path / --recurse  --only-properties 
-node / {
-  node /org {
-    node /org/freedesktop {
-      node /org/freedesktop/UPower {
-        interface org.freedesktop.UPower {
-          properties:
-            readonly b IsDocked = true;
-            readonly b LidForceSleep = false;
-            readonly b LidIsPresent = false;
-            readonly b LidIsClosed = false;
-            readonly b OnLowBattery = false;
-            readonly b OnBattery = false;
-            readonly b CanHibernate = true;
-            readonly b CanSuspend = true;
-            readonly s DaemonVersion = '0.9.10';
-        };
-        node /org/freedesktop/UPower/Policy {
-        };
-        node /org/freedesktop/UPower/Wakeups {
-          interface org.freedesktop.UPower.Wakeups {
-            properties:
-              readonly b HasCapability = true;
-          };
-        };
-      };
-    };
-  };
-};
-
-

- In a similar fashion, the introspect command can be - used to learn details about the Notify method: -

-
-[...]
-  interface org.freedesktop.Notifications {
-    methods:
-      GetServerInformation(out s return_name,
-                           out s return_vendor,
-                           out s return_version,
-                           out s return_spec_version);
-      GetCapabilities(out as return_caps);
-      CloseNotification(in  u id);
-      Notify(in  s app_name,
-             in  u id,
-             in  s icon,
-             in  s summary,
-             in  s body,
-             in  as actions,
-             in  a{sv} hints,
-             in  i timeout,
-             out u return_id);
-  };
-[...]
-
-

- With this information, it's easy to use the call - command to display a notification -

-
-$ gdbus call --session \
-             --dest org.freedesktop.Notifications \
-             --object-path /org/freedesktop/Notifications \
-             --method org.freedesktop.Notifications.Notify \
-             my_app_name \
-             42 \
-             gtk-dialog-info \
-             "The Summary" \
-             "Here's the body of the notification" \
-             [] \
-             {} \
-             5000
-(uint32 12,)
-
-

- Monitoring all objects on a service: -

-
-$ gdbus monitor --system --dest org.freedesktop.ConsoleKit
-Monitoring signals from all objects owned by org.freedesktop.ConsoleKit
-The name org.freedesktop.ConsoleKit is owned by :1.15
-/org/freedesktop/ConsoleKit/Session2: org.freedesktop.ConsoleKit.Session.ActiveChanged (false,)
-/org/freedesktop/ConsoleKit/Seat1: org.freedesktop.ConsoleKit.Seat.ActiveSessionChanged ('',)
-/org/freedesktop/ConsoleKit/Session2: org.freedesktop.ConsoleKit.Session.ActiveChanged (true,)
-/org/freedesktop/ConsoleKit/Seat1: org.freedesktop.ConsoleKit.Seat.ActiveSessionChanged ('/org/freedesktop/ConsoleKit/Session2',)
-
-

- Monitoring a single object on a service: -

-
-$ gdbus monitor --system --dest org.freedesktop.NetworkManager --object-path /org/freedesktop/NetworkManager/AccessPoint/4141
-Monitoring signals on object /org/freedesktop/NetworkManager/AccessPoint/4141 owned by org.freedesktop.NetworkManager
-The name org.freedesktop.NetworkManager is owned by :1.5
-/org/freedesktop/NetworkManager/AccessPoint/4141: org.freedesktop.NetworkManager.AccessPoint.PropertiesChanged ({'Strength': <byte 0x5c>},)
-/org/freedesktop/NetworkManager/AccessPoint/4141: org.freedesktop.NetworkManager.AccessPoint.PropertiesChanged ({'Strength': <byte 0x64>},)
-/org/freedesktop/NetworkManager/AccessPoint/4141: org.freedesktop.NetworkManager.AccessPoint.PropertiesChanged ({'Strength': <byte 0x5e>},)
-/org/freedesktop/NetworkManager/AccessPoint/4141: org.freedesktop.NetworkManager.AccessPoint.PropertiesChanged ({'Strength': <byte 0x64>},)
-
-

- Emitting a signal: -

-
-$ gdbus emit --session --object-path /foo --signal org.bar.Foo "['foo', 'bar', 'baz']"
-
-

- Emitting a signal to a specific process: -

-
-$ gdbus emit --session --object-path /bar --signal org.bar.Bar someString --dest :1.42
-
-
-
-

Bugs

-

- Please send bug reports to either the distribution bug tracker - or the upstream bug tracker at - https://bugzilla.gnome.org/enter_bug.cgi?product=glib. -

-
-
-

See Also

-

- dbus-send(1) -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-D-Bus-Addresses.html b/docs/reference/gio/html/gio-D-Bus-Addresses.html deleted file mode 100644 index f987e8a49..000000000 --- a/docs/reference/gio/html/gio-D-Bus-Addresses.html +++ /dev/null @@ -1,441 +0,0 @@ - - - - -D-Bus Addresses: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

D-Bus Addresses

-

D-Bus Addresses — D-Bus connection endpoints

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -g_dbus_is_address () -
-gboolean - -g_dbus_is_supported_address () -
-void - -g_dbus_address_get_stream () -
-GIOStream * - -g_dbus_address_get_stream_finish () -
-GIOStream * - -g_dbus_address_get_stream_sync () -
-gchar * - -g_dbus_address_get_for_bus_sync () -
-gchar * - -g_dbus_address_escape_value () -
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Routines for working with D-Bus addresses. A D-Bus address is a string -like unix:tmpdir=/tmp/my-app-name. The exact format of addresses -is explained in detail in the -D-Bus specification.

-
-
-

Functions

-
-

g_dbus_is_address ()

-
gboolean
-g_dbus_is_address (const gchar *string);
-

Checks if string - is a -D-Bus address.

-

This doesn't check if string - is actually supported by GDBusServer -or GDBusConnection - use g_dbus_is_supported_address() to do more -checks.

-
-

Parameters

-
----- - - - - - -

string

A string.

 
-
-
-

Returns

-

TRUE if string -is a valid D-Bus address, FALSE otherwise.

-
-

Since: 2.26

-
-
-
-

g_dbus_is_supported_address ()

-
gboolean
-g_dbus_is_supported_address (const gchar *string,
-                             GError **error);
-

Like g_dbus_is_address() but also checks if the library supports the -transports in string - and that key/value pairs for each transport -are valid. See the specification of the -D-Bus address format.

-
-

Parameters

-
----- - - - - - - - - - - - - -

string

A string.

 

error

Return location for error or NULL.

 
-
-
-

Returns

-

TRUE if string -is a valid D-Bus address that is -supported by this library, FALSE if error -is set.

-
-

Since: 2.26

-
-
-
-

g_dbus_address_get_stream ()

-
void
-g_dbus_address_get_stream (const gchar *address,
-                           GCancellable *cancellable,
-                           GAsyncReadyCallback callback,
-                           gpointer user_data);
-

Asynchronously connects to an endpoint specified by address - and -sets up the connection so it is in a state to run the client-side -of the D-Bus authentication conversation. address - must be in the -D-Bus address format.

-

When the operation is finished, callback - will be invoked. You can -then call g_dbus_address_get_stream_finish() to get the result of -the operation.

-

This is an asynchronous failable function. See -g_dbus_address_get_stream_sync() for the synchronous version.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

address

A valid D-Bus address.

 

cancellable

A GCancellable or NULL.

[nullable]

callback

A GAsyncReadyCallback to call when the request is satisfied.

 

user_data

Data to pass to callback -.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_address_get_stream_finish ()

-
GIOStream *
-g_dbus_address_get_stream_finish (GAsyncResult *res,
-                                  gchar **out_guid,
-                                  GError **error);
-

Finishes an operation started with g_dbus_address_get_stream().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

res

A GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream().

 

out_guid

NULL or return location to store the GUID extracted from address -, if any.

[optional][out]

error

Return location for error or NULL.

 
-
-
-

Returns

-

A GIOStream or NULL if error -is set.

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_dbus_address_get_stream_sync ()

-
GIOStream *
-g_dbus_address_get_stream_sync (const gchar *address,
-                                gchar **out_guid,
-                                GCancellable *cancellable,
-                                GError **error);
-

Synchronously connects to an endpoint specified by address - and -sets up the connection so it is in a state to run the client-side -of the D-Bus authentication conversation. address - must be in the -D-Bus address format.

-

This is a synchronous failable function. See -g_dbus_address_get_stream() for the asynchronous version.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

address

A valid D-Bus address.

 

out_guid

NULL or return location to store the GUID extracted from address -, if any.

[optional][out]

cancellable

A GCancellable or NULL.

[nullable]

error

Return location for error or NULL.

 
-
-
-

Returns

-

A GIOStream or NULL if error -is set.

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_dbus_address_get_for_bus_sync ()

-
gchar *
-g_dbus_address_get_for_bus_sync (GBusType bus_type,
-                                 GCancellable *cancellable,
-                                 GError **error);
-

Synchronously looks up the D-Bus address for the well-known message -bus instance specified by bus_type -. This may involve using various -platform specific mechanisms.

-

The returned address will be in the -D-Bus address format.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bus_type

a GBusType

 

cancellable

a GCancellable or NULL.

[nullable]

error

return location for error or NULL

 
-
-
-

Returns

-

a valid D-Bus address string for bus_type -or NULL if -error -is set

-
-

Since: 2.26

-
-
-
-

g_dbus_address_escape_value ()

-
gchar *
-g_dbus_address_escape_value (const gchar *string);
-

Escape string - so it can appear in a D-Bus address as the value -part of a key-value pair.

-

For instance, if string - is "/run/bus-for-:0", -this function would return "/run/bus-for-3A0", -which could be used in a D-Bus address like -"unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-3A0".

-
-

Parameters

-
----- - - - - - -

string

an unescaped string to be included in a D-Bus address -as the value in a key-value pair

 
-
-
-

Returns

-

a copy of string -with all -non-optionally-escaped bytes escaped.

-

[transfer full]

-
-

Since: 2.36

-
-
-
-

Types and Values

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-D-Bus-Introspection-Data.html b/docs/reference/gio/html/gio-D-Bus-Introspection-Data.html deleted file mode 100644 index 7aadec241..000000000 --- a/docs/reference/gio/html/gio-D-Bus-Introspection-Data.html +++ /dev/null @@ -1,1562 +0,0 @@ - - - - -D-Bus Introspection Data: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

D-Bus Introspection Data

-

D-Bus Introspection Data — Node and interface description data structures

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const gchar * - -g_dbus_annotation_info_lookup () -
-GDBusMethodInfo * - -g_dbus_interface_info_lookup_method () -
-GDBusSignalInfo * - -g_dbus_interface_info_lookup_signal () -
-GDBusPropertyInfo * - -g_dbus_interface_info_lookup_property () -
-void - -g_dbus_interface_info_cache_build () -
-void - -g_dbus_interface_info_cache_release () -
-void - -g_dbus_interface_info_generate_xml () -
-GDBusNodeInfo * - -g_dbus_node_info_new_for_xml () -
-GDBusInterfaceInfo * - -g_dbus_node_info_lookup_interface () -
-void - -g_dbus_node_info_generate_xml () -
-GDBusNodeInfo * - -g_dbus_node_info_ref () -
-GDBusInterfaceInfo * - -g_dbus_interface_info_ref () -
-GDBusMethodInfo * - -g_dbus_method_info_ref () -
-GDBusSignalInfo * - -g_dbus_signal_info_ref () -
-GDBusPropertyInfo * - -g_dbus_property_info_ref () -
-GDBusArgInfo * - -g_dbus_arg_info_ref () -
-GDBusAnnotationInfo * - -g_dbus_annotation_info_ref () -
-void - -g_dbus_node_info_unref () -
-void - -g_dbus_interface_info_unref () -
-void - -g_dbus_method_info_unref () -
-void - -g_dbus_signal_info_unref () -
-void - -g_dbus_property_info_unref () -
-void - -g_dbus_arg_info_unref () -
-void - -g_dbus_annotation_info_unref () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 GDBusAnnotationInfo
 GDBusArgInfo
 GDBusMethodInfo
 GDBusSignalInfo
enumGDBusPropertyInfoFlags
 GDBusPropertyInfo
 GDBusInterfaceInfo
 GDBusNodeInfo
#defineG_TYPE_DBUS_NODE_INFO
#defineG_TYPE_DBUS_INTERFACE_INFO
#defineG_TYPE_DBUS_METHOD_INFO
#defineG_TYPE_DBUS_SIGNAL_INFO
#defineG_TYPE_DBUS_PROPERTY_INFO
#defineG_TYPE_DBUS_ARG_INFO
#defineG_TYPE_DBUS_ANNOTATION_INFO
-
-
-

Object Hierarchy

-
    GBoxed
-    ├── GDBusAnnotationInfo
-    ├── GDBusArgInfo
-    ├── GDBusInterfaceInfo
-    ├── GDBusMethodInfo
-    ├── GDBusNodeInfo
-    ├── GDBusPropertyInfo
-    ╰── GDBusSignalInfo
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Various data structures and convenience routines to parse and -generate D-Bus introspection XML. Introspection information is -used when registering objects with g_dbus_connection_register_object().

-

The format of D-Bus introspection XML is specified in the -D-Bus specification

-
-
-

Functions

-
-

g_dbus_annotation_info_lookup ()

-
const gchar *
-g_dbus_annotation_info_lookup (GDBusAnnotationInfo **annotations,
-                               const gchar *name);
-

Looks up the value of an annotation.

-

The cost of this function is O(n) in number of annotations.

-
-

Parameters

-
----- - - - - - - - - - - - - -

annotations

A NULL-terminated array of annotations or NULL.

[array zero-terminated=1][nullable]

name

The name of the annotation to look up.

 
-
-
-

Returns

-

The value or NULL if not found. Do not free, it is owned by annotations -.

-
-

Since: 2.26

-
-
-
-

g_dbus_interface_info_lookup_method ()

-
GDBusMethodInfo *
-g_dbus_interface_info_lookup_method (GDBusInterfaceInfo *info,
-                                     const gchar *name);
-

Looks up information about a method.

-

The cost of this function is O(n) in number of methods unless -g_dbus_interface_info_cache_build() has been used on info -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

A GDBusInterfaceInfo.

 

name

A D-Bus method name (typically in CamelCase)

 
-
-
-

Returns

-

A GDBusMethodInfo or NULL if not found. Do not free, it is owned by info -.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_dbus_interface_info_lookup_signal ()

-
GDBusSignalInfo *
-g_dbus_interface_info_lookup_signal (GDBusInterfaceInfo *info,
-                                     const gchar *name);
-

Looks up information about a signal.

-

The cost of this function is O(n) in number of signals unless -g_dbus_interface_info_cache_build() has been used on info -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

A GDBusInterfaceInfo.

 

name

A D-Bus signal name (typically in CamelCase)

 
-
-
-

Returns

-

A GDBusSignalInfo or NULL if not found. Do not free, it is owned by info -.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_dbus_interface_info_lookup_property ()

-
GDBusPropertyInfo *
-g_dbus_interface_info_lookup_property (GDBusInterfaceInfo *info,
-                                       const gchar *name);
-

Looks up information about a property.

-

The cost of this function is O(n) in number of properties unless -g_dbus_interface_info_cache_build() has been used on info -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

A GDBusInterfaceInfo.

 

name

A D-Bus property name (typically in CamelCase).

 
-
-
-

Returns

-

A GDBusPropertyInfo or NULL if not found. Do not free, it is owned by info -.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_dbus_interface_info_cache_build ()

-
void
-g_dbus_interface_info_cache_build (GDBusInterfaceInfo *info);
-

Builds a lookup-cache to speed up -g_dbus_interface_info_lookup_method(), -g_dbus_interface_info_lookup_signal() and -g_dbus_interface_info_lookup_property().

-

If this has already been called with info -, the existing cache is -used and its use count is increased.

-

Note that info - cannot be modified until -g_dbus_interface_info_cache_release() is called.

-
-

Parameters

-
----- - - - - - -

info

A GDBusInterfaceInfo.

 
-
-

Since: 2.30

-
-
-
-

g_dbus_interface_info_cache_release ()

-
void
-g_dbus_interface_info_cache_release (GDBusInterfaceInfo *info);
-

Decrements the usage count for the cache for info - built by -g_dbus_interface_info_cache_build() (if any) and frees the -resources used by the cache if the usage count drops to zero.

-
-

Parameters

-
----- - - - - - -

info

A GDBusInterfaceInfo

 
-
-

Since: 2.30

-
-
-
-

g_dbus_interface_info_generate_xml ()

-
void
-g_dbus_interface_info_generate_xml (GDBusInterfaceInfo *info,
-                                    guint indent,
-                                    GString *string_builder);
-

Appends an XML representation of info - (and its children) to string_builder -.

-

This function is typically used for generating introspection XML -documents at run-time for handling the -org.freedesktop.DBus.Introspectable.Introspect -method.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

A GDBusNodeInfo

 

indent

Indentation level.

 

string_builder

A GString to to append XML data to.

[out]
-
-

Since: 2.26

-
-
-
-

g_dbus_node_info_new_for_xml ()

-
GDBusNodeInfo *
-g_dbus_node_info_new_for_xml (const gchar *xml_data,
-                              GError **error);
-

Parses xml_data - and returns a GDBusNodeInfo representing the data.

-

The introspection XML must contain exactly one top-level -<node> element.

-

Note that this routine is using a -GMarkup-based -parser that only accepts a subset of valid XML documents.

-
-

Parameters

-
----- - - - - - - - - - - - - -

xml_data

Valid D-Bus introspection XML.

 

error

Return location for error.

 
-
-
-

Returns

-

A GDBusNodeInfo structure or NULL if error -is set. Free -with g_dbus_node_info_unref().

-
-

Since: 2.26

-
-
-
-

g_dbus_node_info_lookup_interface ()

-
GDBusInterfaceInfo *
-g_dbus_node_info_lookup_interface (GDBusNodeInfo *info,
-                                   const gchar *name);
-

Looks up information about an interface.

-

The cost of this function is O(n) in number of interfaces.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

A GDBusNodeInfo.

 

name

A D-Bus interface name.

 
-
-
-

Returns

-

A GDBusInterfaceInfo or NULL if not found. Do not free, it is owned by info -.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_dbus_node_info_generate_xml ()

-
void
-g_dbus_node_info_generate_xml (GDBusNodeInfo *info,
-                               guint indent,
-                               GString *string_builder);
-

Appends an XML representation of info - (and its children) to string_builder -.

-

This function is typically used for generating introspection XML documents at run-time for -handling the org.freedesktop.DBus.Introspectable.Introspect method.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

A GDBusNodeInfo.

 

indent

Indentation level.

 

string_builder

A GString to to append XML data to.

[out]
-
-

Since: 2.26

-
-
-
-

g_dbus_node_info_ref ()

-
GDBusNodeInfo *
-g_dbus_node_info_ref (GDBusNodeInfo *info);
-

If info - is statically allocated does nothing. Otherwise increases -the reference count.

-
-

Parameters

-
----- - - - - - -

info

A GDBusNodeInfo

 
-
-
-

Returns

-

The same info -.

-
-

Since: 2.26

-
-
-
-

g_dbus_interface_info_ref ()

-
GDBusInterfaceInfo *
-g_dbus_interface_info_ref (GDBusInterfaceInfo *info);
-

If info - is statically allocated does nothing. Otherwise increases -the reference count.

-
-

Parameters

-
----- - - - - - -

info

A GDBusInterfaceInfo

 
-
-
-

Returns

-

The same info -.

-
-

Since: 2.26

-
-
-
-

g_dbus_method_info_ref ()

-
GDBusMethodInfo *
-g_dbus_method_info_ref (GDBusMethodInfo *info);
-

If info - is statically allocated does nothing. Otherwise increases -the reference count.

-
-

Parameters

-
----- - - - - - -

info

A GDBusMethodInfo

 
-
-
-

Returns

-

The same info -.

-
-

Since: 2.26

-
-
-
-

g_dbus_signal_info_ref ()

-
GDBusSignalInfo *
-g_dbus_signal_info_ref (GDBusSignalInfo *info);
-

If info - is statically allocated does nothing. Otherwise increases -the reference count.

-
-

Parameters

-
----- - - - - - -

info

A GDBusSignalInfo

 
-
-
-

Returns

-

The same info -.

-
-

Since: 2.26

-
-
-
-

g_dbus_property_info_ref ()

-
GDBusPropertyInfo *
-g_dbus_property_info_ref (GDBusPropertyInfo *info);
-

If info - is statically allocated does nothing. Otherwise increases -the reference count.

-
-

Parameters

-
----- - - - - - -

info

A GDBusPropertyInfo

 
-
-
-

Returns

-

The same info -.

-
-

Since: 2.26

-
-
-
-

g_dbus_arg_info_ref ()

-
GDBusArgInfo *
-g_dbus_arg_info_ref (GDBusArgInfo *info);
-

If info - is statically allocated does nothing. Otherwise increases -the reference count.

-
-

Parameters

-
----- - - - - - -

info

A GDBusArgInfo

 
-
-
-

Returns

-

The same info -.

-
-

Since: 2.26

-
-
-
-

g_dbus_annotation_info_ref ()

-
GDBusAnnotationInfo *
-g_dbus_annotation_info_ref (GDBusAnnotationInfo *info);
-

If info - is statically allocated does nothing. Otherwise increases -the reference count.

-
-

Parameters

-
----- - - - - - -

info

A GDBusNodeInfo

 
-
-
-

Returns

-

The same info -.

-
-

Since: 2.26

-
-
-
-

g_dbus_node_info_unref ()

-
void
-g_dbus_node_info_unref (GDBusNodeInfo *info);
-

If info - is statically allocated, does nothing. Otherwise decreases -the reference count of info -. When its reference count drops to 0, -the memory used is freed.

-
-

Parameters

-
----- - - - - - -

info

A GDBusNodeInfo.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_interface_info_unref ()

-
void
-g_dbus_interface_info_unref (GDBusInterfaceInfo *info);
-

If info - is statically allocated, does nothing. Otherwise decreases -the reference count of info -. When its reference count drops to 0, -the memory used is freed.

-
-

Parameters

-
----- - - - - - -

info

A GDBusInterfaceInfo.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_method_info_unref ()

-
void
-g_dbus_method_info_unref (GDBusMethodInfo *info);
-

If info - is statically allocated, does nothing. Otherwise decreases -the reference count of info -. When its reference count drops to 0, -the memory used is freed.

-
-

Parameters

-
----- - - - - - -

info

A GDBusMethodInfo.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_signal_info_unref ()

-
void
-g_dbus_signal_info_unref (GDBusSignalInfo *info);
-

If info - is statically allocated, does nothing. Otherwise decreases -the reference count of info -. When its reference count drops to 0, -the memory used is freed.

-
-

Parameters

-
----- - - - - - -

info

A GDBusSignalInfo.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_property_info_unref ()

-
void
-g_dbus_property_info_unref (GDBusPropertyInfo *info);
-

If info - is statically allocated, does nothing. Otherwise decreases -the reference count of info -. When its reference count drops to 0, -the memory used is freed.

-
-

Parameters

-
----- - - - - - -

info

A GDBusPropertyInfo.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_arg_info_unref ()

-
void
-g_dbus_arg_info_unref (GDBusArgInfo *info);
-

If info - is statically allocated, does nothing. Otherwise decreases -the reference count of info -. When its reference count drops to 0, -the memory used is freed.

-
-

Parameters

-
----- - - - - - -

info

A GDBusArgInfo.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_annotation_info_unref ()

-
void
-g_dbus_annotation_info_unref (GDBusAnnotationInfo *info);
-

If info - is statically allocated, does nothing. Otherwise decreases -the reference count of info -. When its reference count drops to 0, -the memory used is freed.

-
-

Parameters

-
----- - - - - - -

info

A GDBusAnnotationInfo.

 
-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GDBusAnnotationInfo

-
typedef struct {
-  volatile gint         ref_count;
-  gchar                *key;
-  gchar                *value;
-  GDBusAnnotationInfo **annotations;
-} GDBusAnnotationInfo;
-
-

Information about an annotation.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

volatile gint ref_count;

The reference count or -1 if statically allocated.

 

gchar *key;

The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated".

 

gchar *value;

The value of the annotation.

 

GDBusAnnotationInfo **annotations;

A pointer to a NULL-terminated array of pointers to GDBusAnnotationInfo structures or NULL if there are no annotations.

[array zero-terminated=1]
-
-

Since: 2.26

-
-
-
-

GDBusArgInfo

-
typedef struct {
-  volatile gint         ref_count;
-  gchar                *name;
-  gchar                *signature;
-  GDBusAnnotationInfo **annotations;
-} GDBusArgInfo;
-
-

Information about an argument for a method or a signal.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

volatile gint ref_count;

The reference count or -1 if statically allocated.

 

gchar *name;

Name of the argument, e.g. unix_user_id -.

 

gchar *signature;

D-Bus signature of the argument (a single complete type).

 

GDBusAnnotationInfo **annotations;

A pointer to a NULL-terminated array of pointers to GDBusAnnotationInfo structures or NULL if there are no annotations.

[array zero-terminated=1]
-
-

Since: 2.26

-
-
-
-

GDBusMethodInfo

-
typedef struct {
-  volatile gint         ref_count;
-  gchar                *name;
-  GDBusArgInfo        **in_args;
-  GDBusArgInfo        **out_args;
-  GDBusAnnotationInfo **annotations;
-} GDBusMethodInfo;
-
-

Information about a method on an D-Bus interface.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

volatile gint ref_count;

The reference count or -1 if statically allocated.

 

gchar *name;

The name of the D-Bus method, e.g. RequestName -.

 

GDBusArgInfo **in_args;

A pointer to a NULL-terminated array of pointers to GDBusArgInfo structures or NULL if there are no in arguments.

[array zero-terminated=1]

GDBusArgInfo **out_args;

A pointer to a NULL-terminated array of pointers to GDBusArgInfo structures or NULL if there are no out arguments.

[array zero-terminated=1]

GDBusAnnotationInfo **annotations;

A pointer to a NULL-terminated array of pointers to GDBusAnnotationInfo structures or NULL if there are no annotations.

[array zero-terminated=1]
-
-

Since: 2.26

-
-
-
-

GDBusSignalInfo

-
typedef struct {
-  volatile gint         ref_count;
-  gchar                *name;
-  GDBusArgInfo        **args;
-  GDBusAnnotationInfo **annotations;
-} GDBusSignalInfo;
-
-

Information about a signal on a D-Bus interface.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

volatile gint ref_count;

The reference count or -1 if statically allocated.

 

gchar *name;

The name of the D-Bus signal, e.g. "NameOwnerChanged".

 

GDBusArgInfo **args;

A pointer to a NULL-terminated array of pointers to GDBusArgInfo structures or NULL if there are no arguments.

[array zero-terminated=1]

GDBusAnnotationInfo **annotations;

A pointer to a NULL-terminated array of pointers to GDBusAnnotationInfo structures or NULL if there are no annotations.

[array zero-terminated=1]
-
-

Since: 2.26

-
-
-
-

enum GDBusPropertyInfoFlags

-

Flags describing the access control of a D-Bus property.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_DBUS_PROPERTY_INFO_FLAGS_NONE

-

No flags set.

-
 

G_DBUS_PROPERTY_INFO_FLAGS_READABLE

-

Property is readable.

-
 

G_DBUS_PROPERTY_INFO_FLAGS_WRITABLE

-

Property is writable.

-
 
-
-

Since: 2.26

-
-
-
-

GDBusPropertyInfo

-
typedef struct {
-  volatile gint             ref_count;
-  gchar                    *name;
-  gchar                    *signature;
-  GDBusPropertyInfoFlags    flags;
-  GDBusAnnotationInfo     **annotations;
-} GDBusPropertyInfo;
-
-

Information about a D-Bus property on a D-Bus interface.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

volatile gint ref_count;

The reference count or -1 if statically allocated.

 

gchar *name;

The name of the D-Bus property, e.g. "SupportedFilesystems".

 

gchar *signature;

The D-Bus signature of the property (a single complete type).

 

GDBusPropertyInfoFlags flags;

Access control flags for the property.

 

GDBusAnnotationInfo **annotations;

A pointer to a NULL-terminated array of pointers to GDBusAnnotationInfo structures or NULL if there are no annotations.

[array zero-terminated=1]
-
-

Since: 2.26

-
-
-
-

GDBusInterfaceInfo

-
typedef struct {
-  volatile gint         ref_count;
-  gchar                *name;
-  GDBusMethodInfo     **methods;
-  GDBusSignalInfo     **signals;
-  GDBusPropertyInfo   **properties;
-  GDBusAnnotationInfo **annotations;
-} GDBusInterfaceInfo;
-
-

Information about a D-Bus interface.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

volatile gint ref_count;

The reference count or -1 if statically allocated.

 

gchar *name;

The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties".

 

GDBusMethodInfo **methods;

A pointer to a NULL-terminated array of pointers to GDBusMethodInfo structures or NULL if there are no methods.

[array zero-terminated=1]

GDBusSignalInfo **signals;

A pointer to a NULL-terminated array of pointers to GDBusSignalInfo structures or NULL if there are no signals.

[array zero-terminated=1]

GDBusPropertyInfo **properties;

A pointer to a NULL-terminated array of pointers to GDBusPropertyInfo structures or NULL if there are no properties.

[array zero-terminated=1]

GDBusAnnotationInfo **annotations;

A pointer to a NULL-terminated array of pointers to GDBusAnnotationInfo structures or NULL if there are no annotations.

[array zero-terminated=1]
-
-

Since: 2.26

-
-
-
-

GDBusNodeInfo

-
typedef struct {
-  volatile gint         ref_count;
-  gchar                *path;
-  GDBusInterfaceInfo  **interfaces;
-  GDBusNodeInfo       **nodes;
-  GDBusAnnotationInfo **annotations;
-} GDBusNodeInfo;
-
-

Information about nodes in a remote object hierarchy.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

volatile gint ref_count;

The reference count or -1 if statically allocated.

 

gchar *path;

The path of the node or NULL if omitted. Note that this may be a relative path. See the D-Bus specification for more details.

 

GDBusInterfaceInfo **interfaces;

A pointer to a NULL-terminated array of pointers to GDBusInterfaceInfo structures or NULL if there are no interfaces.

[array zero-terminated=1]

GDBusNodeInfo **nodes;

A pointer to a NULL-terminated array of pointers to GDBusNodeInfo structures or NULL if there are no nodes.

[array zero-terminated=1]

GDBusAnnotationInfo **annotations;

A pointer to a NULL-terminated array of pointers to GDBusAnnotationInfo structures or NULL if there are no annotations.

[array zero-terminated=1]
-
-

Since: 2.26

-
-
-
-

G_TYPE_DBUS_NODE_INFO

-
#define G_TYPE_DBUS_NODE_INFO       (g_dbus_node_info_get_type ())
-
-

The GType for a boxed type holding a GDBusNodeInfo.

-

Since: 2.26

-
-
-
-

G_TYPE_DBUS_INTERFACE_INFO

-
#define G_TYPE_DBUS_INTERFACE_INFO  (g_dbus_interface_info_get_type ())
-
-

The GType for a boxed type holding a GDBusInterfaceInfo.

-

Since: 2.26

-
-
-
-

G_TYPE_DBUS_METHOD_INFO

-
#define G_TYPE_DBUS_METHOD_INFO     (g_dbus_method_info_get_type ())
-
-

The GType for a boxed type holding a GDBusMethodInfo.

-

Since: 2.26

-
-
-
-

G_TYPE_DBUS_SIGNAL_INFO

-
#define G_TYPE_DBUS_SIGNAL_INFO     (g_dbus_signal_info_get_type ())
-
-

The GType for a boxed type holding a GDBusSignalInfo.

-

Since: 2.26

-
-
-
-

G_TYPE_DBUS_PROPERTY_INFO

-
#define G_TYPE_DBUS_PROPERTY_INFO   (g_dbus_property_info_get_type ())
-
-

The GType for a boxed type holding a GDBusPropertyInfo.

-

Since: 2.26

-
-
-
-

G_TYPE_DBUS_ARG_INFO

-
#define G_TYPE_DBUS_ARG_INFO        (g_dbus_arg_info_get_type ())
-
-

The GType for a boxed type holding a GDBusArgInfo.

-

Since: 2.26

-
-
-
-

G_TYPE_DBUS_ANNOTATION_INFO

-
#define G_TYPE_DBUS_ANNOTATION_INFO (g_dbus_annotation_info_get_type ())
-
-

The GType for a boxed type holding a GDBusAnnotationInfo.

-

Since: 2.26

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-D-Bus-Utilities.html b/docs/reference/gio/html/gio-D-Bus-Utilities.html deleted file mode 100644 index 78d432556..000000000 --- a/docs/reference/gio/html/gio-D-Bus-Utilities.html +++ /dev/null @@ -1,390 +0,0 @@ - - - - -D-Bus Utilities: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

D-Bus Utilities

-

D-Bus Utilities — Various utilities related to D-Bus

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gchar * - -g_dbus_generate_guid () -
-gboolean - -g_dbus_is_guid () -
-gboolean - -g_dbus_is_name () -
-gboolean - -g_dbus_is_unique_name () -
-gboolean - -g_dbus_is_member_name () -
-gboolean - -g_dbus_is_interface_name () -
-GVariant * - -g_dbus_gvalue_to_gvariant () -
-void - -g_dbus_gvariant_to_gvalue () -
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Various utility routines related to D-Bus.

-
-
-

Functions

-
-

g_dbus_generate_guid ()

-
gchar *
-g_dbus_generate_guid (void);
-

Generate a D-Bus GUID that can be used with -e.g. g_dbus_connection_new().

-

See the D-Bus specification regarding what strings are valid D-Bus -GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).

-
-

Returns

-

A valid D-Bus GUID. Free with g_free().

-
-

Since: 2.26

-
-
-
-

g_dbus_is_guid ()

-
gboolean
-g_dbus_is_guid (const gchar *string);
-

Checks if string - is a D-Bus GUID.

-

See the D-Bus specification regarding what strings are valid D-Bus -GUID (for example, D-Bus GUIDs are not RFC-4122 compliant).

-
-

Parameters

-
----- - - - - - -

string

The string to check.

 
-
-
-

Returns

-

TRUE if string -is a guid, FALSE otherwise.

-
-

Since: 2.26

-
-
-
-

g_dbus_is_name ()

-
gboolean
-g_dbus_is_name (const gchar *string);
-

Checks if string - is a valid D-Bus bus name (either unique or well-known).

-
-

Parameters

-
----- - - - - - -

string

The string to check.

 
-
-
-

Returns

-

TRUE if valid, FALSE otherwise.

-
-

Since: 2.26

-
-
-
-

g_dbus_is_unique_name ()

-
gboolean
-g_dbus_is_unique_name (const gchar *string);
-

Checks if string - is a valid D-Bus unique bus name.

-
-

Parameters

-
----- - - - - - -

string

The string to check.

 
-
-
-

Returns

-

TRUE if valid, FALSE otherwise.

-
-

Since: 2.26

-
-
-
-

g_dbus_is_member_name ()

-
gboolean
-g_dbus_is_member_name (const gchar *string);
-

Checks if string - is a valid D-Bus member (e.g. signal or method) name.

-
-

Parameters

-
----- - - - - - -

string

The string to check.

 
-
-
-

Returns

-

TRUE if valid, FALSE otherwise.

-
-

Since: 2.26

-
-
-
-

g_dbus_is_interface_name ()

-
gboolean
-g_dbus_is_interface_name (const gchar *string);
-

Checks if string - is a valid D-Bus interface name.

-
-

Parameters

-
----- - - - - - -

string

The string to check.

 
-
-
-

Returns

-

TRUE if valid, FALSE otherwise.

-
-

Since: 2.26

-
-
-
-

g_dbus_gvalue_to_gvariant ()

-
GVariant *
-g_dbus_gvalue_to_gvariant (const GValue *gvalue,
-                           const GVariantType *type);
-

Converts a GValue to a GVariant of the type indicated by the type - -parameter.

-

The conversion is using the following rules:

-
-

This can fail if e.g. gvalue - is of type G_TYPE_STRING and type - -is 'i'. It will also fail for any GType -(including e.g. G_TYPE_OBJECT and G_TYPE_BOXED derived-types) not -in the table above.

-

Note that if gvalue - is of type G_TYPE_VARIANT and its value is -NULL, the empty GVariant instance (never NULL) for type - is -returned (e.g. 0 for scalar types, the empty string for string types, -'/' for object path types, the empty array for any array type and so on).

-

See the g_dbus_gvariant_to_gvalue() function for how to convert a -GVariant to a GValue.

-
-

Parameters

-
----- - - - - - - - - - - - - -

gvalue

A GValue to convert to a GVariant

 

type

A GVariantType

 
-
-
-

Returns

-

A GVariant (never floating) of GVariantType type -holding -the data from gvalue -or NULL in case of failure. Free with -g_variant_unref().

-
-

Since: 2.30

-
-
-
-

g_dbus_gvariant_to_gvalue ()

-
void
-g_dbus_gvariant_to_gvalue (GVariant *value,
-                           GValue *out_gvalue);
-

Converts a GVariant to a GValue. If value - is floating, it is consumed.

-

The rules specified in the g_dbus_gvalue_to_gvariant() function are -used - this function is essentially its reverse form.

-

The conversion never fails - a valid GValue is always returned in -out_gvalue -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

A GVariant.

 

out_gvalue

Return location pointing to a zero-filled (uninitialized) GValue.

[out]
-
-

Since: 2.30

-
-
-
-

Types and Values

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-Desktop-file-based-GAppInfo.html b/docs/reference/gio/html/gio-Desktop-file-based-GAppInfo.html deleted file mode 100644 index 4085ecebd..000000000 --- a/docs/reference/gio/html/gio-Desktop-file-based-GAppInfo.html +++ /dev/null @@ -1,1190 +0,0 @@ - - - - -GDesktopAppInfo: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDesktopAppInfo

-

GDesktopAppInfo — Application information from desktop files

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GDesktopAppInfo * - -g_desktop_app_info_new_from_filename () -
-GDesktopAppInfo * - -g_desktop_app_info_new_from_keyfile () -
-GDesktopAppInfo * - -g_desktop_app_info_new () -
const char * - -g_desktop_app_info_get_filename () -
-gboolean - -g_desktop_app_info_get_is_hidden () -
-gboolean - -g_desktop_app_info_get_nodisplay () -
-gboolean - -g_desktop_app_info_get_show_in () -
const char * - -g_desktop_app_info_get_generic_name () -
const char * - -g_desktop_app_info_get_categories () -
const char * const * - -g_desktop_app_info_get_keywords () -
const char * - -g_desktop_app_info_get_startup_wm_class () -
-void - -g_desktop_app_info_set_desktop_env () -
-char * - -g_desktop_app_info_get_string () -
-gboolean - -g_desktop_app_info_get_boolean () -
-gboolean - -g_desktop_app_info_has_key () -
-void - -(*GDesktopAppLaunchCallback) () -
-gboolean - -g_desktop_app_info_launch_uris_as_manager () -
const gchar * const * - -g_desktop_app_info_list_actions () -
-gchar * - -g_desktop_app_info_get_action_name () -
-void - -g_desktop_app_info_launch_action () -
-gchar *** - -g_desktop_app_info_search () -
-GList * - -g_desktop_app_info_get_implementations () -
-
-
-

Properties

-
----- - - - - - -
-gchar *filenameRead / Write / Construct Only
-
-
-

Types and Values

- -
-
-

Object Hierarchy

-
    GInterface
-    ╰── GDesktopAppInfoLookup
-    GObject
-    ╰── GDesktopAppInfo
-
-
-
-

Prerequisites

-

-GDesktopAppInfoLookup requires - GObject.

-
-
-

Implemented Interfaces

-

-GDesktopAppInfo implements - GAppInfo.

-
-
-

Includes

-
#include <gio/gdesktopappinfo.h>
-
-
-
-

Description

-

GDesktopAppInfo is an implementation of GAppInfo based on -desktop files.

-

Note that <gio/gdesktopappinfo.h> belongs to the UNIX-specific -GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config -file when using it.

-
-
-

Functions

-
-

g_desktop_app_info_new_from_filename ()

-
GDesktopAppInfo *
-g_desktop_app_info_new_from_filename (const char *filename);
-

Creates a new GDesktopAppInfo.

-
-

Parameters

-
----- - - - - - -

filename

the path of a desktop file, in the GLib -filename encoding.

[type filename]
-
-
-

Returns

-

a new GDesktopAppInfo or NULL on error.

-
-
-
-
-

g_desktop_app_info_new_from_keyfile ()

-
GDesktopAppInfo *
-g_desktop_app_info_new_from_keyfile (GKeyFile *key_file);
-

Creates a new GDesktopAppInfo.

-
-

Parameters

-
----- - - - - - -

key_file

an opened GKeyFile

 
-
-
-

Returns

-

a new GDesktopAppInfo or NULL on error.

-
-

Since: 2.18

-
-
-
-

g_desktop_app_info_new ()

-
GDesktopAppInfo *
-g_desktop_app_info_new (const char *desktop_id);
-

Creates a new GDesktopAppInfo based on a desktop file id.

-

A desktop file id is the basename of the desktop file, including the -.desktop extension. GIO is looking for a desktop file with this name -in the applications subdirectories of the XDG -data directories (i.e. the directories specified in the XDG_DATA_HOME -and XDG_DATA_DIRS environment variables). GIO also supports the -prefix-to-subdirectory mapping that is described in the -Menu Spec -(i.e. a desktop id of kde-foo.desktop will match -/usr/share/applications/kde/foo.desktop).

-
-

Parameters

-
----- - - - - - -

desktop_id

the desktop file id

 
-
-
-

Returns

-

a new GDesktopAppInfo, or NULL if no desktop file with that id

-
-
-
-
-

g_desktop_app_info_get_filename ()

-
const char *
-g_desktop_app_info_get_filename (GDesktopAppInfo *info);
-

When info - was created from a known filename, return it. In some -situations such as the GDesktopAppInfo returned from -g_desktop_app_info_new_from_keyfile(), this function will return NULL.

-
-

Parameters

-
----- - - - - - -

info

a GDesktopAppInfo

 
-
-
-

Returns

-

The full path to the file for info -, -or NULL if not known.

-

[type filename]

-
-

Since: 2.24

-
-
-
-

g_desktop_app_info_get_is_hidden ()

-
gboolean
-g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info);
-

A desktop file is hidden if the Hidden key in it is -set to True.

-
-

Parameters

-
----- - - - - - -

info

a GDesktopAppInfo.

 
-
-
-

Returns

-

TRUE if hidden, FALSE otherwise.

-
-
-
-
-

g_desktop_app_info_get_nodisplay ()

-
gboolean
-g_desktop_app_info_get_nodisplay (GDesktopAppInfo *info);
-

Gets the value of the NoDisplay key, which helps determine if the -application info should be shown in menus. See -G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and g_app_info_should_show().

-
-

Parameters

-
----- - - - - - -

info

a GDesktopAppInfo

 
-
-
-

Returns

-

The value of the NoDisplay key

-
-

Since: 2.30

-
-
-
-

g_desktop_app_info_get_show_in ()

-
gboolean
-g_desktop_app_info_get_show_in (GDesktopAppInfo *info,
-                                const gchar *desktop_env);
-

Checks if the application info should be shown in menus that list available -applications for a specific name of the desktop, based on the -OnlyShowIn and NotShowIn keys.

-

desktop_env - should typically be given as NULL, in which case the -XDG_CURRENT_DESKTOP environment variable is consulted. If you want -to override the default mechanism then you may specify desktop_env -, -but this is not recommended.

-

Note that g_app_info_should_show() for info - will include this check (with -NULL for desktop_env -) as well as additional checks.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GDesktopAppInfo

 

desktop_env

a string specifying a desktop name.

[nullable]
-
-
-

Returns

-

TRUE if the info -should be shown in desktop_env -according to the -OnlyShowIn and NotShowIn keys, FALSE -otherwise.

-
-

Since: 2.30

-
-
-
-

g_desktop_app_info_get_generic_name ()

-
const char *
-g_desktop_app_info_get_generic_name (GDesktopAppInfo *info);
-

Gets the generic name from the destkop file.

-
-

Parameters

-
----- - - - - - -

info

a GDesktopAppInfo

 
-
-
-

Returns

-

The value of the GenericName key

-
-
-
-
-

g_desktop_app_info_get_categories ()

-
const char *
-g_desktop_app_info_get_categories (GDesktopAppInfo *info);
-

Gets the categories from the desktop file.

-
-

Parameters

-
----- - - - - - -

info

a GDesktopAppInfo

 
-
-
-

Returns

-

The unparsed Categories key from the desktop file; -i.e. no attempt is made to split it by ';' or validate it.

-
-
-
-
-

g_desktop_app_info_get_keywords ()

-
const char * const *
-g_desktop_app_info_get_keywords (GDesktopAppInfo *info);
-

Gets the keywords from the desktop file.

-
-

Parameters

-
----- - - - - - -

info

a GDesktopAppInfo

 
-
-
-

Returns

-

The value of the Keywords key.

-

[transfer none]

-
-

Since: 2.32

-
-
-
-

g_desktop_app_info_get_startup_wm_class ()

-
const char *
-g_desktop_app_info_get_startup_wm_class
-                               (GDesktopAppInfo *info);
-

Retrieves the StartupWMClass field from info -. This represents the -WM_CLASS property of the main window of the application, if launched -through info -.

-
-

Parameters

-
----- - - - - - -

info

a GDesktopAppInfo that supports startup notify

 
-
-
-

Returns

-

the startup WM class, or NULL if none is set -in the desktop file.

-

[transfer none]

-
-

Since: 2.34

-
-
-
-

g_desktop_app_info_set_desktop_env ()

-
void
-g_desktop_app_info_set_desktop_env (const char *desktop_env);
-
-

g_desktop_app_info_set_desktop_env has been deprecated since version 2.42 and should not be used in newly-written code.

-

do not use this API. Since 2.42 the value of the -XDG_CURRENT_DESKTOP environment variable will be used.

-
-

Sets the name of the desktop that the application is running in. -This is used by g_app_info_should_show() and -g_desktop_app_info_get_show_in() to evaluate the -OnlyShowIn and NotShowIn -desktop entry fields.

-

Should be called only once; subsequent calls are ignored.

-
-

Parameters

-
----- - - - - - -

desktop_env

a string specifying what desktop this is

 
-
-
-
-
-

g_desktop_app_info_get_string ()

-
char *
-g_desktop_app_info_get_string (GDesktopAppInfo *info,
-                               const char *key);
-

Looks up a string value in the keyfile backing info -.

-

The key - is looked up in the "Desktop Entry" group.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GDesktopAppInfo

 

key

the key to look up

 
-
-
-

Returns

-

a newly allocated string, or NULL if the key -is not found

-
-

Since: 2.36

-
-
-
-

g_desktop_app_info_get_boolean ()

-
gboolean
-g_desktop_app_info_get_boolean (GDesktopAppInfo *info,
-                                const char *key);
-

Looks up a boolean value in the keyfile backing info -.

-

The key - is looked up in the "Desktop Entry" group.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GDesktopAppInfo

 

key

the key to look up

 
-
-
-

Returns

-

the boolean value, or FALSE if the key -is not found

-
-

Since: 2.36

-
-
-
-

g_desktop_app_info_has_key ()

-
gboolean
-g_desktop_app_info_has_key (GDesktopAppInfo *info,
-                            const char *key);
-

Returns whether key - exists in the "Desktop Entry" group -of the keyfile backing info -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GDesktopAppInfo

 

key

the key to look up

 
-
-
-

Returns

-

TRUE if the key -exists

-
-

Since: 2.36

-
-
-
-

GDesktopAppLaunchCallback ()

-
void
-(*GDesktopAppLaunchCallback) (GDesktopAppInfo *appinfo,
-                              GPid pid,
-                              gpointer user_data);
-

During invocation, g_desktop_app_info_launch_uris_as_manager() may -create one or more child processes. This callback is invoked once -for each, providing the process ID.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

appinfo

a GDesktopAppInfo

 

pid

Process identifier

 

user_data

User data

 
-
-
-
-
-

g_desktop_app_info_launch_uris_as_manager ()

-
gboolean
-g_desktop_app_info_launch_uris_as_manager
-                               (GDesktopAppInfo *appinfo,
-                                GList *uris,
-                                GAppLaunchContext *launch_context,
-                                GSpawnFlags spawn_flags,
-                                GSpawnChildSetupFunc user_setup,
-                                gpointer user_setup_data,
-                                GDesktopAppLaunchCallback pid_callback,
-                                gpointer pid_callback_data,
-                                GError **error);
-

This function performs the equivalent of g_app_info_launch_uris(), -but is intended primarily for operating system components that -launch applications. Ordinary applications should use -g_app_info_launch_uris().

-

If the application is launched via traditional UNIX fork()/exec() -then spawn_flags -, user_setup - and user_setup_data - are used for the -call to g_spawn_async(). Additionally, pid_callback - (with -pid_callback_data -) will be called to inform about the PID of the -created process.

-

If application launching occurs via some other mechanism (eg: D-Bus -activation) then spawn_flags -, user_setup -, user_setup_data -, -pid_callback - and pid_callback_data - are ignored.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

appinfo

a GDesktopAppInfo

 

uris

List of URIs.

[element-type utf8]

launch_context

a GAppLaunchContext.

[nullable]

spawn_flags

GSpawnFlags, used for each process

 

user_setup

a GSpawnChildSetupFunc, used once -for each process.

[scope call][nullable]

user_setup_data

User data for user_setup -.

[closure user_setup][nullable]

pid_callback

Callback for child processes.

[scope call][nullable]

pid_callback_data

User data for callback -.

[closure pid_callback][nullable]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE on successful launch, FALSE otherwise.

-
-
-
-
-

g_desktop_app_info_list_actions ()

-
const gchar * const *
-g_desktop_app_info_list_actions (GDesktopAppInfo *info);
-

Returns the list of "additional application actions" supported on the -desktop file, as per the desktop file specification.

-

As per the specification, this is the list of actions that are -explicitly listed in the "Actions" key of the [Desktop Entry] group.

-
-

Parameters

-
----- - - - - - -

info

a GDesktopAppInfo

 
-
-
-

Returns

-

a list of strings, always non-NULL.

-

[array zero-terminated=1][element-type utf8][transfer none]

-
-

Since: 2.38

-
-
-
-

g_desktop_app_info_get_action_name ()

-
gchar *
-g_desktop_app_info_get_action_name (GDesktopAppInfo *info,
-                                    const gchar *action_name);
-

Gets the user-visible display name of the "additional application -action" specified by action_name -.

-

This corresponds to the "Name" key within the keyfile group for the -action.

-
-

Parameters

-
----- - - - - - - - - - - - - -

info

a GDesktopAppInfo

 

action_name

the name of the action as from -g_desktop_app_info_list_actions()

 
-
-
-

Returns

-

the locale-specific action name.

-

[transfer full]

-
-

Since: 2.38

-
-
-
-

g_desktop_app_info_launch_action ()

-
void
-g_desktop_app_info_launch_action (GDesktopAppInfo *info,
-                                  const gchar *action_name,
-                                  GAppLaunchContext *launch_context);
-

Activates the named application action.

-

You may only call this function on action names that were -returned from g_desktop_app_info_list_actions().

-

Note that if the main entry of the desktop file indicates that the -application supports startup notification, and launch_context - is -non-NULL, then startup notification will be used when activating the -action (and as such, invocation of the action on the receiving side -must signal the end of startup notification when it is completed). -This is the expected behaviour of applications declaring additional -actions, as per the desktop file specification.

-

As with g_app_info_launch() there is no way to detect failures that -occur while using this function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

info

a GDesktopAppInfo

 

action_name

the name of the action as from -g_desktop_app_info_list_actions()

 

launch_context

a GAppLaunchContext.

[nullable]
-
-

Since: 2.38

-
-
-
-

g_desktop_app_info_search ()

-
gchar ***
-g_desktop_app_info_search (const gchar *search_string);
-

Searches desktop files for ones that match search_string -.

-

The return value is an array of strvs. Each strv contains a list of -applications that matched search_string - with an equal score. The -outer list is sorted by score so that the first strv contains the -best-matching applications, and so on. -The algorithm for determining matches is undefined and may change at -any time.

-
-

Parameters

-
----- - - - - - -

search_string

the search string to use

 
-
-
-

Returns

-

a -list of strvs. Free each item with g_strfreev() and free the outer -list with g_free().

-

[array zero-terminated=1][element-type GStrv][transfer full]

-
-
-
-
-

g_desktop_app_info_get_implementations ()

-
GList *
-g_desktop_app_info_get_implementations
-                               (const gchar *interface);
-

Gets all applications that implement interface -.

-

An application implements an interface if that interface is listed in -the Implements= line of the desktop file of the application.

-
-

Parameters

-
----- - - - - - -

interface

the name of the interface

 
-
-
-

Returns

-

a list of GDesktopAppInfo -objects.

-

[element-type GDesktopAppInfo][transfer full]

-
-

Since: 2.42

-
-
-
-

Types and Values

-
-

GDesktopAppInfo

-
typedef struct _GDesktopAppInfo GDesktopAppInfo;
-

Information about an installed application from a desktop file.

-
-
-
-

GDesktopAppInfoLookup

-
typedef struct _GDesktopAppInfoLookup GDesktopAppInfoLookup;
-

GDesktopAppInfoLookup is deprecated and should not be used in newly-written code.

-

GDesktopAppInfoLookup is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

struct GDesktopAppInfoLookupIface

-
struct GDesktopAppInfoLookupIface {
-  GTypeInterface g_iface;
-
-  GAppInfo * (* get_default_for_uri_scheme) (GDesktopAppInfoLookup *lookup,
-                                             const char            *uri_scheme);
-};
-
-

GDesktopAppInfoLookupIface is deprecated and should not be used in newly-written code.

-

Interface that is used by backends to associate default -handlers with URI schemes.

-
-

Members

-
----- - - - - - -

get_default_for_uri_scheme ()

Virtual method for -g_desktop_app_info_lookup_get_default_for_uri_scheme().

 
-
-
-
-
-

G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME

-
#define G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME "gio-desktop-app-info-lookup"
-
-

G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME is deprecated and should not be used in newly-written code.

-

Extension point for default handler to URI association. See -Extending GIO.

-
-
-
-

Property Details

-
-

The “filename” property

-
  “filename”                 gchar *
-

The origin filename of this GDesktopAppInfo

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-Extension-Points.html b/docs/reference/gio/html/gio-Extension-Points.html deleted file mode 100644 index d448eec21..000000000 --- a/docs/reference/gio/html/gio-Extension-Points.html +++ /dev/null @@ -1,612 +0,0 @@ - - - - -Extension Points: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Extension Points

-

Extension Points — Extension Points

-
- -
-

Types and Values

-
---- - - - - - - - - - - -
 GIOExtension
 GIOExtensionPoint
-
-
-

Includes

-
#include <gio.h>
-
-
-
-

Description

-

GIOExtensionPoint provides a mechanism for modules to extend the -functionality of the library or application that loaded it in an -organized fashion.

-

An extension point is identified by a name, and it may optionally -require that any implementation must be of a certain type (or derived -thereof). Use g_io_extension_point_register() to register an -extension point, and g_io_extension_point_set_required_type() to -set a required type.

-

A module can implement an extension point by specifying the GType -that implements the functionality. Additionally, each implementation -of an extension point has a name, and a priority. Use -g_io_extension_point_implement() to implement an extension point.

-
- - - - - - - -
1
-2
-3
-4
-5
GIOExtensionPoint *ep;
-
-// Register an extension point
-ep = g_io_extension_point_register ("my-extension-point");
-g_io_extension_point_set_required_type (ep, MY_TYPE_EXAMPLE);
-
- -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
// Implement an extension point
-G_DEFINE_TYPE (MyExampleImpl, my_example_impl, MY_TYPE_EXAMPLE);
-g_io_extension_point_implement ("my-extension-point",
-                                my_example_impl_get_type (),
-                                "my-example",
-                                10);
-
- -

-

It is up to the code that registered the extension point how - it uses the implementations that have been associated with it. - Depending on the use case, it may use all implementations, or - only the one with the highest priority, or pick a specific - one by name.

-

To avoid opening all modules just to find out what extension - points they implement, GIO makes use of a caching mechanism, - see gio-querymodules. - You are expected to run this command after installing a - GIO module.

-

The GIO_EXTRA_MODULES environment variable can be used to - specify additional directories to automatically load modules - from. This environment variable has the same syntax as the - PATH. If two modules have the same base name in different - directories, then the latter one will be ignored. If additional - directories are specified GIO will load modules from the built-in - directory last.

-
-
-

Functions

-
-

g_io_extension_get_name ()

-
const char *
-g_io_extension_get_name (GIOExtension *extension);
-

Gets the name under which extension - was registered.

-

Note that the same type may be registered as extension -for multiple extension points, under different names.

-
-

Parameters

-
----- - - - - - -

extension

a GIOExtension

 
-
-
-

Returns

-

the name of extension -.

-
-
-
-
-

g_io_extension_get_priority ()

-
gint
-g_io_extension_get_priority (GIOExtension *extension);
-

Gets the priority with which extension - was registered.

-
-

Parameters

-
----- - - - - - -

extension

a GIOExtension

 
-
-
-

Returns

-

the priority of extension -

-
-
-
-
-

g_io_extension_get_type ()

-
GType
-g_io_extension_get_type (GIOExtension *extension);
-

Gets the type associated with extension -.

-
-

Parameters

-
----- - - - - - -

extension

a GIOExtension

 
-
-
-

Returns

-

the type of extension -

-
-
-
-
-

g_io_extension_point_get_extension_by_name ()

-
GIOExtension *
-g_io_extension_point_get_extension_by_name
-                               (GIOExtensionPoint *extension_point,
-                                const char *name);
-

Finds a GIOExtension for an extension point by name.

-
-

Parameters

-
----- - - - - - - - - - - - - -

extension_point

a GIOExtensionPoint

 

name

the name of the extension to get

 
-
-
-

Returns

-

the GIOExtension for extension_point -that has the -given name, or NULL if there is no extension with that name.

-

[transfer none]

-
-
-
-
-

g_io_extension_point_get_extensions ()

-
GList *
-g_io_extension_point_get_extensions (GIOExtensionPoint *extension_point);
-

Gets a list of all extensions that implement this extension point. -The list is sorted by priority, beginning with the highest priority.

-
-

Parameters

-
----- - - - - - -

extension_point

a GIOExtensionPoint

 
-
-
-

Returns

-

a GList of -GIOExtensions. The list is owned by GIO and should not be -modified.

-

[element-type GIOExtension][transfer none]

-
-
-
-
-

g_io_extension_point_get_required_type ()

-
GType
-g_io_extension_point_get_required_type
-                               (GIOExtensionPoint *extension_point);
-

Gets the required type for extension_point -.

-
-

Parameters

-
----- - - - - - -

extension_point

a GIOExtensionPoint

 
-
-
-

Returns

-

the GType that all implementations must have, -or G_TYPE_INVALID if the extension point has no required type

-
-
-
-
-

g_io_extension_point_implement ()

-
GIOExtension *
-g_io_extension_point_implement (const char *extension_point_name,
-                                GType type,
-                                const char *extension_name,
-                                gint priority);
-

Registers type - as extension for the extension point with name -extension_point_name -.

-

If type - has already been registered as an extension for this -extension point, the existing GIOExtension object is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

extension_point_name

the name of the extension point

 

type

the GType to register as extension

 

extension_name

the name for the extension

 

priority

the priority for the extension

 
-
-
-

Returns

-

a GIOExtension object for GType.

-

[transfer none]

-
-
-
-
-

g_io_extension_point_lookup ()

-
GIOExtensionPoint *
-g_io_extension_point_lookup (const char *name);
-

Looks up an existing extension point.

-
-

Parameters

-
----- - - - - - -

name

the name of the extension point

 
-
-
-

Returns

-

the GIOExtensionPoint, or NULL if there -is no registered extension point with the given name.

-

[transfer none]

-
-
-
-
-

g_io_extension_point_register ()

-
GIOExtensionPoint *
-g_io_extension_point_register (const char *name);
-

Registers an extension point.

-
-

Parameters

-
----- - - - - - -

name

The name of the extension point

 
-
-
-

Returns

-

the new GIOExtensionPoint. This object is -owned by GIO and should not be freed.

-

[transfer none]

-
-
-
-
-

g_io_extension_point_set_required_type ()

-
void
-g_io_extension_point_set_required_type
-                               (GIOExtensionPoint *extension_point,
-                                GType type);
-

Sets the required type for extension_point - to type -. -All implementations must henceforth have this type.

-
-

Parameters

-
----- - - - - - - - - - - - - -

extension_point

a GIOExtensionPoint

 

type

the GType to require

 
-
-
-
-
-

g_io_extension_ref_class ()

-
GTypeClass *
-g_io_extension_ref_class (GIOExtension *extension);
-

Gets a reference to the class for the type that is -associated with extension -.

-
-

Parameters

-
----- - - - - - -

extension

a GIOExtension

 
-
-
-

Returns

-

the GTypeClass for the type of extension -.

-

[transfer full]

-
-
-
-
-

Types and Values

-
-

GIOExtension

-
typedef struct _GIOExtension GIOExtension;
-

GIOExtension is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

GIOExtensionPoint

-
typedef struct _GIOExtensionPoint GIOExtensionPoint;
-

GIOExtensionPoint is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

See Also

-

Extending GIO

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-GActionGroup-exporter.html b/docs/reference/gio/html/gio-GActionGroup-exporter.html deleted file mode 100644 index 8e5bf5c5f..000000000 --- a/docs/reference/gio/html/gio-GActionGroup-exporter.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - -GActionGroup exporter: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GActionGroup exporter

-

GActionGroup exporter — Export GActionGroups on D-Bus

-
-
-

Functions

-
---- - - - - - - - - - - -
-guint - -g_dbus_connection_export_action_group () -
-void - -g_dbus_connection_unexport_action_group () -
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

These functions support exporting a GActionGroup on D-Bus. -The D-Bus interface that is used is a private implementation -detail.

-

To access an exported GActionGroup remotely, use -g_dbus_action_group_get() to obtain a GDBusActionGroup.

-
-
-

Functions

-
-

g_dbus_connection_export_action_group ()

-
guint
-g_dbus_connection_export_action_group (GDBusConnection *connection,
-                                       const gchar *object_path,
-                                       GActionGroup *action_group,
-                                       GError **error);
-

Exports action_group - on connection - at object_path -.

-

The implemented D-Bus API should be considered private. It is -subject to change in the future.

-

A given object path can only have one action group exported on it. -If this constraint is violated, the export will fail and 0 will be -returned (with error - set accordingly).

-

You can unexport the action group using -g_dbus_connection_unexport_action_group() with the return value of -this function.

-

The thread default main context is taken at the time of this call. -All incoming action activations and state change requests are -reported from this context. Any changes on the action group that -cause it to emit signals must also come from this same context. -Since incoming action activations and state change requests are -rather likely to cause changes on the action group, this effectively -limits a given action group to being exported from only one main -context.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

object_path

a D-Bus object path

 

action_group

a GActionGroup

 

error

a pointer to a NULL GError, or NULL

 
-
-
-

Returns

-

the ID of the export (never zero), or 0 in case of failure

-
-

Since: 2.32

-
-
-
-

g_dbus_connection_unexport_action_group ()

-
void
-g_dbus_connection_unexport_action_group
-                               (GDBusConnection *connection,
-                                guint export_id);
-

Reverses the effect of a previous call to -g_dbus_connection_export_action_group().

-

It is an error to call this function with an ID that wasn't returned -from g_dbus_connection_export_action_group() or to call it with the -same ID more than once.

-
-

Parameters

-
----- - - - - - - - - - - - - -

connection

a GDBusConnection

 

export_id

the ID from g_dbus_connection_export_action_group()

 
-
-

Since: 2.32

-
-
-
-

Types and Values

-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-GContentType.html b/docs/reference/gio/html/gio-GContentType.html deleted file mode 100644 index d9932e86f..000000000 --- a/docs/reference/gio/html/gio-GContentType.html +++ /dev/null @@ -1,640 +0,0 @@ - - - - -GContentType: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GContentType

-

GContentType — Platform-specific content typing

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -g_content_type_equals () -
-gboolean - -g_content_type_is_a () -
-gboolean - -g_content_type_is_mime_type () -
-gboolean - -g_content_type_is_unknown () -
-gchar * - -g_content_type_get_description () -
-gchar * - -g_content_type_get_mime_type () -
-GIcon * - -g_content_type_get_icon () -
-GIcon * - -g_content_type_get_symbolic_icon () -
-gchar * - -g_content_type_get_generic_icon_name () -
-gboolean - -g_content_type_can_be_executable () -
-gchar * - -g_content_type_from_mime_type () -
-gchar * - -g_content_type_guess () -
-gchar ** - -g_content_type_guess_for_tree () -
-GList * - -g_content_types_get_registered () -
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

A content type is a platform specific string that defines the type -of a file. On UNIX it is a -mime type -like "text/plain" or "image/png". -On Win32 it is an extension string like ".doc", ".txt" or a perceived -string like "audio". Such strings can be looked up in the registry at -HKEY_CLASSES_ROOT. -On OSX it is a Uniform Type Identifier -such as "com.apple.application".

-
-
-

Functions

-
-

g_content_type_equals ()

-
gboolean
-g_content_type_equals (const gchar *type1,
-                       const gchar *type2);
-

Compares two content types for equality.

-
-

Parameters

-
----- - - - - - - - - - - - - -

type1

a content type string

 

type2

a content type string

 
-
-
-

Returns

-

TRUE if the two strings are identical or equivalent, -FALSE otherwise.

-
-
-
-
-

g_content_type_is_a ()

-
gboolean
-g_content_type_is_a (const gchar *type,
-                     const gchar *supertype);
-

Determines if type - is a subset of supertype -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

type

a content type string

 

supertype

a content type string

 
-
-
-

Returns

-

TRUE if type -is a kind of supertype -, -FALSE otherwise.

-
-
-
-
-

g_content_type_is_mime_type ()

-
gboolean
-g_content_type_is_mime_type (const gchar *type,
-                             const gchar *mime_type);
-

Determines if type - is a subset of mime_type -. -Convenience wrapper around g_content_type_is_a().

-
-

Parameters

-
----- - - - - - - - - - - - - -

type

a content type string

 

mime_type

a mime type string

 
-
-
-

Returns

-

TRUE if type -is a kind of mime_type -, -FALSE otherwise.

-
-

Since: 2.52

-
-
-
-

g_content_type_is_unknown ()

-
gboolean
-g_content_type_is_unknown (const gchar *type);
-

Checks if the content type is the generic "unknown" type. -On UNIX this is the "application/octet-stream" mimetype, -while on win32 it is "*" and on OSX it is a dynamic type -or octet-stream.

-
-

Parameters

-
----- - - - - - -

type

a content type string

 
-
-
-

Returns

-

TRUE if the type is the unknown type.

-
-
-
-
-

g_content_type_get_description ()

-
gchar *
-g_content_type_get_description (const gchar *type);
-

Gets the human readable description of the content type.

-
-

Parameters

-
----- - - - - - -

type

a content type string

 
-
-
-

Returns

-

a short description of the content type type -. Free the -returned string with g_free()

-
-
-
-
-

g_content_type_get_mime_type ()

-
gchar *
-g_content_type_get_mime_type (const gchar *type);
-

Gets the mime type for the content type, if one is registered.

-
-

Parameters

-
----- - - - - - -

type

a content type string

 
-
-
-

Returns

-

the registered mime type for the given type -, -or NULL if unknown.

-

[nullable]

-
-
-
-
-

g_content_type_get_icon ()

-
GIcon *
-g_content_type_get_icon (const gchar *type);
-

Gets the icon for a content type.

-
-

Parameters

-
----- - - - - - -

type

a content type string

 
-
-
-

Returns

-

GIcon corresponding to the content type. Free the returned -object with g_object_unref().

-

[transfer full]

-
-
-
-
-

g_content_type_get_symbolic_icon ()

-
GIcon *
-g_content_type_get_symbolic_icon (const gchar *type);
-

Gets the symbolic icon for a content type.

-
-

Parameters

-
----- - - - - - -

type

a content type string

 
-
-
-

Returns

-

symbolic GIcon corresponding to the content type. -Free the returned object with g_object_unref().

-

[transfer full]

-
-

Since: 2.34

-
-
-
-

g_content_type_get_generic_icon_name ()

-
gchar *
-g_content_type_get_generic_icon_name (const gchar *type);
-

Gets the generic icon name for a content type.

-

See the -shared-mime-info -specification for more on the generic icon name.

-
-

Parameters

-
----- - - - - - -

type

a content type string

 
-
-
-

Returns

-

the registered generic icon name for the given type -, -or NULL if unknown. Free with g_free().

-

[nullable]

-
-

Since: 2.34

-
-
-
-

g_content_type_can_be_executable ()

-
gboolean
-g_content_type_can_be_executable (const gchar *type);
-

Checks if a content type can be executable. Note that for instance -things like text files can be executables (i.e. scripts and batch files).

-
-

Parameters

-
----- - - - - - -

type

a content type string

 
-
-
-

Returns

-

TRUE if the file type corresponds to a type that -can be executable, FALSE otherwise.

-
-
-
-
-

g_content_type_from_mime_type ()

-
gchar *
-g_content_type_from_mime_type (const gchar *mime_type);
-

Tries to find a content type based on the mime type name.

-
-

Parameters

-
----- - - - - - -

mime_type

a mime type string

 
-
-
-

Returns

-

Newly allocated string with content type or -NULL. Free with g_free().

-

[nullable]

-
-

Since: 2.18

-
-
-
-

g_content_type_guess ()

-
gchar *
-g_content_type_guess (const gchar *filename,
-                      const guchar *data,
-                      gsize data_size,
-                      gboolean *result_uncertain);
-

Guesses the content type based on example data. If the function is -uncertain, result_uncertain - will be set to TRUE. Either filename - -or data - may be NULL, in which case the guess will be based solely -on the other argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

filename

a string, or NULL.

[nullable]

data

a stream of data, or NULL.

[nullable][array length=data_size]

data_size

the size of data -

 

result_uncertain

return location for the certainty -of the result, or NULL.

[out][optional]
-
-
-

Returns

-

a string indicating a guessed content type for the -given data. Free with g_free()

-
-
-
-
-

g_content_type_guess_for_tree ()

-
gchar **
-g_content_type_guess_for_tree (GFile *root);
-

Tries to guess the type of the tree with root root -, by -looking at the files it contains. The result is an array -of content types, with the best guess coming first.

-

The types returned all have the form x-content/foo, e.g. -x-content/audio-cdda (for audio CDs) or x-content/image-dcf -(for a camera memory card). See the -shared-mime-info -specification for more on x-content types.

-

This function is useful in the implementation of -g_mount_guess_content_type().

-
-

Parameters

-
----- - - - - - -

root

the root of the tree to guess a type for

 
-
-
-

Returns

-

an NULL-terminated -array of zero or more content types. Free with g_strfreev().

-

[transfer full][array zero-terminated=1]

-
-

Since: 2.18

-
-
-
-

g_content_types_get_registered ()

-
GList *
-g_content_types_get_registered (void);
-

Gets a list of strings containing all the registered content types -known to the system. The list and its data should be freed using -g_list_free_full (list, g_free).

-
-

Returns

-

list of the registered -content types.

-

[element-type utf8][transfer full]

-
-
-
-
-

Types and Values

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-GConverterInputstream.html b/docs/reference/gio/html/gio-GConverterInputstream.html deleted file mode 100644 index 192d7ac2b..000000000 --- a/docs/reference/gio/html/gio-GConverterInputstream.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - -GConverterInputstream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GConverterInputstream

-

GConverterInputstream — Converter Input Stream

-
-
-

Functions

- -
-
-

Properties

-
----- - - - - - -
-GConverter *converterRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GConverterInputStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GInputStream
-        ╰── GFilterInputStream
-            ╰── GConverterInputStream
-
-
-
-

Implemented Interfaces

-

-GConverterInputStream implements - GPollableInputStream.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Converter input stream implements GInputStream and allows -conversion of data of various types during reading.

-

As of GLib 2.34, GConverterInputStream implements -GPollableInputStream.

-
-
-

Functions

-
-

g_converter_input_stream_new ()

-
GInputStream *
-g_converter_input_stream_new (GInputStream *base_stream,
-                              GConverter *converter);
-

Creates a new converter input stream for the base_stream -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

base_stream

a GInputStream

 

converter

a GConverter

 
-
-
-

Returns

-

a new GInputStream.

-
-
-
-
-

g_converter_input_stream_get_converter ()

-
GConverter *
-g_converter_input_stream_get_converter
-                               (GConverterInputStream *converter_stream);
-

Gets the GConverter that is used by converter_stream -.

-
-

Parameters

-
----- - - - - - -

converter_stream

a GConverterInputStream

 
-
-
-

Returns

-

the converter of the converter input stream.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

Types and Values

-
-

GConverterInputStream

-
typedef struct _GConverterInputStream GConverterInputStream;
-

An implementation of GFilterInputStream that allows data -conversion.

-
-
-
-

Property Details

-
-

The “converter” property

-
  “converter”                GConverter *
-

The converter object.

-

Flags: Read / Write / Construct Only

-
-
-
-

See Also

-

GInputStream, GConverter

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-GConverterOutputstream.html b/docs/reference/gio/html/gio-GConverterOutputstream.html deleted file mode 100644 index 202d26c73..000000000 --- a/docs/reference/gio/html/gio-GConverterOutputstream.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - -GConverterOutputstream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GConverterOutputstream

-

GConverterOutputstream — Converter Output Stream

-
-
-

Functions

- -
-
-

Properties

-
----- - - - - - -
-GConverter *converterRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - -
 GConverterOutputStream
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GOutputStream
-        ╰── GFilterOutputStream
-            ╰── GConverterOutputStream
-
-
-
-

Implemented Interfaces

-

-GConverterOutputStream implements - GPollableOutputStream.

-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Converter output stream implements GOutputStream and allows -conversion of data of various types during reading.

-

As of GLib 2.34, GConverterOutputStream implements -GPollableOutputStream.

-
-
-

Functions

-
-

g_converter_output_stream_new ()

-
GOutputStream *
-g_converter_output_stream_new (GOutputStream *base_stream,
-                               GConverter *converter);
-

Creates a new converter output stream for the base_stream -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

base_stream

a GOutputStream

 

converter

a GConverter

 
-
-
-

Returns

-

a new GOutputStream.

-
-
-
-
-

g_converter_output_stream_get_converter ()

-
GConverter *
-g_converter_output_stream_get_converter
-                               (GConverterOutputStream *converter_stream);
-

Gets the GConverter that is used by converter_stream -.

-
-

Parameters

-
----- - - - - - -

converter_stream

a GConverterOutputStream

 
-
-
-

Returns

-

the converter of the converter output stream.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

Types and Values

-
-

GConverterOutputStream

-
typedef struct _GConverterOutputStream GConverterOutputStream;
-

An implementation of GFilterOutputStream that allows data -conversion.

-
-
-
-

Property Details

-
-

The “converter” property

-
  “converter”                GConverter *
-

The converter object.

-

Flags: Read / Write / Construct Only

-
-
-
-

See Also

-

GOutputStream, GConverter

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-GDBusError.html b/docs/reference/gio/html/gio-GDBusError.html deleted file mode 100644 index 44a507602..000000000 --- a/docs/reference/gio/html/gio-GDBusError.html +++ /dev/null @@ -1,1098 +0,0 @@ - - - - -GDBusError: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDBusError

-

GDBusError — Mapping D-Bus errors to and from GError

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -g_dbus_error_is_remote_error () -
-gchar * - -g_dbus_error_get_remote_error () -
-gboolean - -g_dbus_error_strip_remote_error () -
-void - -g_dbus_error_register_error_domain () -
-gboolean - -g_dbus_error_register_error () -
-gboolean - -g_dbus_error_unregister_error () -
-GError * - -g_dbus_error_new_for_dbus_error () -
-void - -g_dbus_error_set_dbus_error () -
-void - -g_dbus_error_set_dbus_error_valist () -
-gchar * - -g_dbus_error_encode_gerror () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
enumGDBusError
#defineG_DBUS_ERROR
 GDBusErrorEntry
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

All facilities that return errors from remote methods (such as -g_dbus_connection_call_sync()) use GError to represent both D-Bus -errors (e.g. errors returned from the other peer) and locally -in-process generated errors.

-

To check if a returned GError is an error from a remote peer, use -g_dbus_error_is_remote_error(). To get the actual D-Bus error name, -use g_dbus_error_get_remote_error(). Before presenting an error, -always use g_dbus_error_strip_remote_error().

-

In addition, facilities used to return errors to a remote peer also -use GError. See g_dbus_method_invocation_return_error() for -discussion about how the D-Bus error name is set.

-

Applications can associate a GError error domain with a set of D-Bus errors in order to -automatically map from D-Bus errors to GError and back. This -is typically done in the function returning the GQuark for the -error domain:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
// foo-bar-error.h:
-
-#define FOO_BAR_ERROR (foo_bar_error_quark ())
-GQuark foo_bar_error_quark (void);
-
-typedef enum
-{
-  FOO_BAR_ERROR_FAILED,
-  FOO_BAR_ERROR_ANOTHER_ERROR,
-  FOO_BAR_ERROR_SOME_THIRD_ERROR,
-  FOO_BAR_N_ERRORS / *< skip >* /
-} FooBarError;
-
-// foo-bar-error.c:
-
-static const GDBusErrorEntry foo_bar_error_entries[] =
-{
-  {FOO_BAR_ERROR_FAILED,           "org.project.Foo.Bar.Error.Failed"},
-  {FOO_BAR_ERROR_ANOTHER_ERROR,    "org.project.Foo.Bar.Error.AnotherError"},
-  {FOO_BAR_ERROR_SOME_THIRD_ERROR, "org.project.Foo.Bar.Error.SomeThirdError"},
-};
-
-// Ensure that every error code has an associated D-Bus error name
-G_STATIC_ASSERT (G_N_ELEMENTS (foo_bar_error_entries) == FOO_BAR_N_ERRORS);
-
-GQuark
-foo_bar_error_quark (void)
-{
-  static volatile gsize quark_volatile = 0;
-  g_dbus_error_register_error_domain ("foo-bar-error-quark",
-                                      &quark_volatile,
-                                      foo_bar_error_entries,
-                                      G_N_ELEMENTS (foo_bar_error_entries));
-  return (GQuark) quark_volatile;
-}
-
- -

-With this setup, a D-Bus peer can transparently pass e.g. FOO_BAR_ERROR_ANOTHER_ERROR and -other peers will see the D-Bus error name org.project.Foo.Bar.Error.AnotherError.

-

If the other peer is using GDBus, and has registered the association with -g_dbus_error_register_error_domain() in advance (e.g. by invoking the FOO_BAR_ERROR quark -generation itself in the previous example) the peer will see also FOO_BAR_ERROR_ANOTHER_ERROR instead -of G_IO_ERROR_DBUS_ERROR. Note that GDBus clients can still recover -org.project.Foo.Bar.Error.AnotherError using g_dbus_error_get_remote_error().

-

Note that errors in the G_DBUS_ERROR error domain is intended only -for returning errors from a remote message bus process. Errors -generated locally in-process by e.g. GDBusConnection is from the -G_IO_ERROR domain.

-
-
-

Functions

-
-

g_dbus_error_is_remote_error ()

-
gboolean
-g_dbus_error_is_remote_error (const GError *error);
-

Checks if error - represents an error received via D-Bus from a remote peer. If so, -use g_dbus_error_get_remote_error() to get the name of the error.

-
-

Parameters

-
----- - - - - - -

error

A GError.

 
-
-
-

Returns

-

TRUE if error -represents an error from a remote peer, -FALSE otherwise.

-
-

Since: 2.26

-
-
-
-

g_dbus_error_get_remote_error ()

-
gchar *
-g_dbus_error_get_remote_error (const GError *error);
-

Gets the D-Bus error name used for error -, if any.

-

This function is guaranteed to return a D-Bus error name for all -GErrors returned from functions handling remote method calls -(e.g. g_dbus_connection_call_finish()) unless -g_dbus_error_strip_remote_error() has been used on error -.

-
-

Parameters

-
----- - - - - - -

error

a GError

 
-
-
-

Returns

-

an allocated string or NULL if the D-Bus error name -could not be found. Free with g_free().

-
-

Since: 2.26

-
-
-
-

g_dbus_error_strip_remote_error ()

-
gboolean
-g_dbus_error_strip_remote_error (GError *error);
-

Looks for extra information in the error message used to recover -the D-Bus error name and strips it if found. If stripped, the -message field in error - will correspond exactly to what was -received on the wire.

-

This is typically used when presenting errors to the end user.

-
-

Parameters

-
----- - - - - - -

error

A GError.

 
-
-
-

Returns

-

TRUE if information was stripped, FALSE otherwise.

-
-

Since: 2.26

-
-
-
-

g_dbus_error_register_error_domain ()

-
void
-g_dbus_error_register_error_domain (const gchar *error_domain_quark_name,
-                                    volatile gsize *quark_volatile,
-                                    const GDBusErrorEntry *entries,
-                                    guint num_entries);
-

Helper function for associating a GError error domain with D-Bus error names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

error_domain_quark_name

The error domain name.

 

quark_volatile

A pointer where to store the GQuark.

 

entries

A pointer to num_entries -GDBusErrorEntry struct items.

 

num_entries

Number of items to register.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_error_register_error ()

-
gboolean
-g_dbus_error_register_error (GQuark error_domain,
-                             gint error_code,
-                             const gchar *dbus_error_name);
-

Creates an association to map between dbus_error_name - and -GErrors specified by error_domain - and error_code -.

-

This is typically done in the routine that returns the GQuark for -an error domain.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

error_domain

A GQuark for a error domain.

 

error_code

An error code.

 

dbus_error_name

A D-Bus error name.

 
-
-
-

Returns

-

TRUE if the association was created, FALSE if it already -exists.

-
-

Since: 2.26

-
-
-
-

g_dbus_error_unregister_error ()

-
gboolean
-g_dbus_error_unregister_error (GQuark error_domain,
-                               gint error_code,
-                               const gchar *dbus_error_name);
-

Destroys an association previously set up with g_dbus_error_register_error().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

error_domain

A GQuark for a error domain.

 

error_code

An error code.

 

dbus_error_name

A D-Bus error name.

 
-
-
-

Returns

-

TRUE if the association was destroyed, FALSE if it wasn't found.

-
-

Since: 2.26

-
-
-
-

g_dbus_error_new_for_dbus_error ()

-
GError *
-g_dbus_error_new_for_dbus_error (const gchar *dbus_error_name,
-                                 const gchar *dbus_error_message);
-

Creates a GError based on the contents of dbus_error_name - and -dbus_error_message -.

-

Errors registered with g_dbus_error_register_error() will be looked -up using dbus_error_name - and if a match is found, the error domain -and code is used. Applications can use g_dbus_error_get_remote_error() -to recover dbus_error_name -.

-

If a match against a registered error is not found and the D-Bus -error name is in a form as returned by g_dbus_error_encode_gerror() -the error domain and code encoded in the name is used to -create the GError. Also, dbus_error_name - is added to the error message -such that it can be recovered with g_dbus_error_get_remote_error().

-

Otherwise, a GError with the error code G_IO_ERROR_DBUS_ERROR -in the G_IO_ERROR error domain is returned. Also, dbus_error_name - is -added to the error message such that it can be recovered with -g_dbus_error_get_remote_error().

-

In all three cases, dbus_error_name - can always be recovered from the -returned GError using the g_dbus_error_get_remote_error() function -(unless g_dbus_error_strip_remote_error() hasn't been used on the returned error).

-

This function is typically only used in object mappings to prepare -GError instances for applications. Regular applications should not use -it.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dbus_error_name

D-Bus error name.

 

dbus_error_message

D-Bus error message.

 
-
-
-

Returns

-

An allocated GError. Free with g_error_free().

-
-

Since: 2.26

-
-
-
-

g_dbus_error_set_dbus_error ()

-
void
-g_dbus_error_set_dbus_error (GError **error,
-                             const gchar *dbus_error_name,
-                             const gchar *dbus_error_message,
-                             const gchar *format,
-                             ...);
-

Does nothing if error - is NULL. Otherwise sets *error - to -a new GError created with g_dbus_error_new_for_dbus_error() -with dbus_error_message - prepend with format - (unless NULL).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

error

A pointer to a GError or NULL.

 

dbus_error_name

D-Bus error name.

 

dbus_error_message

D-Bus error message.

 

format

printf()-style format to prepend to dbus_error_message -or NULL.

[nullable]

...

Arguments for format -.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_error_set_dbus_error_valist ()

-
void
-g_dbus_error_set_dbus_error_valist (GError **error,
-                                    const gchar *dbus_error_name,
-                                    const gchar *dbus_error_message,
-                                    const gchar *format,
-                                    va_list var_args);
-

Like g_dbus_error_set_dbus_error() but intended for language bindings.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

error

A pointer to a GError or NULL.

 

dbus_error_name

D-Bus error name.

 

dbus_error_message

D-Bus error message.

 

format

printf()-style format to prepend to dbus_error_message -or NULL.

[nullable]

var_args

Arguments for format -.

 
-
-

Since: 2.26

-
-
-
-

g_dbus_error_encode_gerror ()

-
gchar *
-g_dbus_error_encode_gerror (const GError *error);
-

Creates a D-Bus error name to use for error -. If error - matches -a registered error (cf. g_dbus_error_register_error()), the corresponding -D-Bus error name will be returned.

-

Otherwise the a name of the form -org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE -will be used. This allows other GDBus applications to map the error -on the wire back to a GError using g_dbus_error_new_for_dbus_error().

-

This function is typically only used in object mappings to put a -GError on the wire. Regular applications should not use it.

-
-

Parameters

-
----- - - - - - -

error

A GError.

 
-
-
-

Returns

-

A D-Bus error name (never NULL). Free with g_free().

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

enum GDBusError

-

Error codes for the G_DBUS_ERROR error domain.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_DBUS_ERROR_FAILED

-

A generic error; "something went wrong" - see the error message for -more.

-
 

G_DBUS_ERROR_NO_MEMORY

-

There was not enough memory to complete an operation.

-
 

G_DBUS_ERROR_SERVICE_UNKNOWN

-

The bus doesn't know how to launch a service to supply the bus name -you wanted.

-
 

G_DBUS_ERROR_NAME_HAS_NO_OWNER

-

The bus name you referenced doesn't exist (i.e. no application owns -it).

-
 

G_DBUS_ERROR_NO_REPLY

-

No reply to a message expecting one, usually means a timeout occurred.

-
 

G_DBUS_ERROR_IO_ERROR

-

Something went wrong reading or writing to a socket, for example.

-
 

G_DBUS_ERROR_BAD_ADDRESS

-

A D-Bus bus address was malformed.

-
 

G_DBUS_ERROR_NOT_SUPPORTED

-

Requested operation isn't supported (like ENOSYS on UNIX).

-
 

G_DBUS_ERROR_LIMITS_EXCEEDED

-

Some limited resource is exhausted.

-
 

G_DBUS_ERROR_ACCESS_DENIED

-

Security restrictions don't allow doing what you're trying to do.

-
 

G_DBUS_ERROR_AUTH_FAILED

-

Authentication didn't work.

-
 

G_DBUS_ERROR_NO_SERVER

-

Unable to connect to server (probably caused by ECONNREFUSED on a -socket).

-
 

G_DBUS_ERROR_TIMEOUT

-

Certain timeout errors, possibly ETIMEDOUT on a socket. Note that -G_DBUS_ERROR_NO_REPLY is used for message reply timeouts. Warning: -this is confusingly-named given that G_DBUS_ERROR_TIMED_OUT also -exists. We can't fix it for compatibility reasons so just be -careful.

-
 

G_DBUS_ERROR_NO_NETWORK

-

No network access (probably ENETUNREACH on a socket).

-
 

G_DBUS_ERROR_ADDRESS_IN_USE

-

Can't bind a socket since its address is in use (i.e. EADDRINUSE).

-
 

G_DBUS_ERROR_DISCONNECTED

-

The connection is disconnected and you're trying to use it.

-
 

G_DBUS_ERROR_INVALID_ARGS

-

Invalid arguments passed to a method call.

-
 

G_DBUS_ERROR_FILE_NOT_FOUND

-

Missing file.

-
 

G_DBUS_ERROR_FILE_EXISTS

-

Existing file and the operation you're using does not silently overwrite.

-
 

G_DBUS_ERROR_UNKNOWN_METHOD

-

Method name you invoked isn't known by the object you invoked it on.

-
 

G_DBUS_ERROR_TIMED_OUT

-

Certain timeout errors, e.g. while starting a service. Warning: this is -confusingly-named given that G_DBUS_ERROR_TIMEOUT also exists. We -can't fix it for compatibility reasons so just be careful.

-
 

G_DBUS_ERROR_MATCH_RULE_NOT_FOUND

-

Tried to remove or modify a match rule that didn't exist.

-
 

G_DBUS_ERROR_MATCH_RULE_INVALID

-

The match rule isn't syntactically valid.

-
 

G_DBUS_ERROR_SPAWN_EXEC_FAILED

-

While starting a new process, the exec() call failed.

-
 

G_DBUS_ERROR_SPAWN_FORK_FAILED

-

While starting a new process, the fork() call failed.

-
 

G_DBUS_ERROR_SPAWN_CHILD_EXITED

-

While starting a new process, the child exited with a status code.

-
 

G_DBUS_ERROR_SPAWN_CHILD_SIGNALED

-

While starting a new process, the child exited on a signal.

-
 

G_DBUS_ERROR_SPAWN_FAILED

-

While starting a new process, something went wrong.

-
 

G_DBUS_ERROR_SPAWN_SETUP_FAILED

-

We failed to setup the environment correctly.

-
 

G_DBUS_ERROR_SPAWN_CONFIG_INVALID

-

We failed to setup the config parser correctly.

-
 

G_DBUS_ERROR_SPAWN_SERVICE_INVALID

-

Bus name was not valid.

-
 

G_DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND

-

Service file not found in system-services directory.

-
 

G_DBUS_ERROR_SPAWN_PERMISSIONS_INVALID

-

Permissions are incorrect on the setuid helper.

-
 

G_DBUS_ERROR_SPAWN_FILE_INVALID

-

Service file invalid (Name, User or Exec missing).

-
 

G_DBUS_ERROR_SPAWN_NO_MEMORY

-

Tried to get a UNIX process ID and it wasn't available.

-
 

G_DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN

-

Tried to get a UNIX process ID and it wasn't available.

-
 

G_DBUS_ERROR_INVALID_SIGNATURE

-

A type signature is not valid.

-
 

G_DBUS_ERROR_INVALID_FILE_CONTENT

-

A file contains invalid syntax or is otherwise broken.

-
 

G_DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN

-

Asked for SELinux security context and it wasn't available.

-
 

G_DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN

-

Asked for ADT audit data and it wasn't available.

-
 

G_DBUS_ERROR_OBJECT_PATH_IN_USE

-

There's already an object with the requested object path.

-
 

G_DBUS_ERROR_UNKNOWN_OBJECT

-

Object you invoked a method on isn't known. Since 2.42

-
 

G_DBUS_ERROR_UNKNOWN_INTERFACE

-

Interface you invoked a method on isn't known by the object. Since 2.42

-
 

G_DBUS_ERROR_UNKNOWN_PROPERTY

-

Property you tried to access isn't known by the object. Since 2.42

-
 

G_DBUS_ERROR_PROPERTY_READ_ONLY

-

Property you tried to set is read-only. Since 2.42

-
 
-
-

Since: 2.26

-
-
-
-

G_DBUS_ERROR

-
#define G_DBUS_ERROR g_dbus_error_quark()
-
-

Error domain for errors generated by a remote message bus. Errors -in this domain will be from the GDBusError enumeration. See -GError for more information on error domains.

-

Note that errors in this error domain is intended only for -returning errors from a remote message bus process. Errors -generated locally in-process by e.g. GDBusConnection is from the -G_IO_ERROR domain.

-

Since: 2.26

-
-
-
-

GDBusErrorEntry

-
typedef struct {
-  gint         error_code;
-  const gchar *dbus_error_name;
-} GDBusErrorEntry;
-
-

Struct used in g_dbus_error_register_error_domain().

-
-

Members

-
----- - - - - - - - - - - - - -

gint error_code;

An error code.

 

const gchar *dbus_error_name;

The D-Bus error name to associate with error_code -.

 
-
-

Since: 2.26

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-GFileAttribute.html b/docs/reference/gio/html/gio-GFileAttribute.html deleted file mode 100644 index 15d531f02..000000000 --- a/docs/reference/gio/html/gio-GFileAttribute.html +++ /dev/null @@ -1,652 +0,0 @@ - - - - -GFileAttribute: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GFileAttribute

-

GFileAttribute — Key-Value Paired File Attributes

-
- -
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - -
enumGFileAttributeType
enumGFileAttributeInfoFlags
enumGFileAttributeStatus
 GFileAttributeInfo
 GFileAttributeInfoList
-
-
-

Object Hierarchy

-
    GBoxed
-    ╰── GFileAttributeInfoList
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

File attributes in GIO consist of a list of key-value pairs.

-

Keys are strings that contain a key namespace and a key name, separated -by a colon, e.g. "namespace::keyname". Namespaces are included to sort -key-value pairs by namespaces for relevance. Keys can be retrived -using wildcards, e.g. "standard::*" will return all of the keys in the -"standard" namespace.

-

The list of possible attributes for a filesystem (pointed to by a GFile) is -available as a GFileAttributeInfoList. This list is queryable by key names -as indicated earlier.

-

Information is stored within the list in GFileAttributeInfo structures. -The info structure can store different types, listed in the enum -GFileAttributeType. Upon creation of a GFileAttributeInfo, the type will -be set to G_FILE_ATTRIBUTE_TYPE_INVALID.

-

Classes that implement GFileIface will create a GFileAttributeInfoList and -install default keys and values for their given file system, architecture, -and other possible implementation details (e.g., on a UNIX system, a file -attribute key will be registered for the user id for a given file).

-
-

Default Namespaces

-
    -
  • "standard": The "Standard" namespace. General file information that -any application may need should be put in this namespace. Examples -include the file's name, type, and size.

  • -
  • "etag: The Entity Tag namespace. Currently, the only key -in this namespace is "value", which contains the value of the current -entity tag.

  • -
  • "id": The "Identification" namespace. This namespace is used by file -managers and applications that list directories to check for loops and -to uniquely identify files.

  • -
  • "access": The "Access" namespace. Used to check if a user has the -proper privileges to access files and perform file operations. Keys in -this namespace are made to be generic and easily understood, e.g. the -"can_read" key is TRUE if the current user has permission to read the -file. UNIX permissions and NTFS ACLs in Windows should be mapped to -these values.

  • -
  • "mountable": The "Mountable" namespace. Includes simple boolean keys -for checking if a file or path supports mount operations, e.g. mount, -unmount, eject. These are used for files of type G_FILE_TYPE_MOUNTABLE.

  • -
  • "time": The "Time" namespace. Includes file access, changed, created -times.

  • -
  • "unix": The "Unix" namespace. Includes UNIX-specific information and -may not be available for all files. Examples include the UNIX "UID", -"GID", etc.

  • -
  • "dos": The "DOS" namespace. Includes DOS-specific information and may -not be available for all files. Examples include "is_system" for checking -if a file is marked as a system file, and "is_archive" for checking if a -file is marked as an archive file.

  • -
  • "owner": The "Owner" namespace. Includes information about who owns a -file. May not be available for all file systems. Examples include "user" -for getting the user name of the file owner. This information is often -mapped from some backend specific data such as a UNIX UID.

  • -
  • "thumbnail": The "Thumbnail" namespace. Includes information about file -thumbnails and their location within the file system. Examples of keys in -this namespace include "path" to get the location of a thumbnail, "failed" -to check if thumbnailing of the file failed, and "is-valid" to check if -the thumbnail is outdated.

  • -
  • "filesystem": The "Filesystem" namespace. Gets information about the -file system where a file is located, such as its type, how much space is -left available, and the overall size of the file system.

  • -
  • "gvfs": The "GVFS" namespace. Keys in this namespace contain information -about the current GVFS backend in use.

  • -
  • "xattr": The "xattr" namespace. Gets information about extended -user attributes. See attr(5). The "user." prefix of the extended user -attribute name is stripped away when constructing keys in this namespace, -e.g. "xattr::mime_type" for the extended attribute with the name -"user.mime_type". Note that this information is only available if -GLib has been built with extended attribute support.

  • -
  • "xattr-sys": The "xattr-sys" namespace. Gets information about -extended attributes which are not user-specific. See attr(5). Note -that this information is only available if GLib has been built with -extended attribute support.

  • -
  • "selinux": The "SELinux" namespace. Includes information about the -SELinux context of files. Note that this information is only available -if GLib has been built with SELinux support.

  • -
-

Please note that these are not all of the possible namespaces. -More namespaces can be added from GIO modules or by individual applications. -For more information about writing GIO modules, see GIOModule.

-

<!-- TODO: Implementation note about using extended attributes on supported -file systems -->

-
-
-

Default Keys

-

For a list of the built-in keys and their types, see the -GFileInfo documentation.

-

Note that there are no predefined keys in the "xattr" and "xattr-sys" -namespaces. Keys for the "xattr" namespace are constructed by stripping -away the "user." prefix from the extended user attribute, and prepending -"xattr::". Keys for the "xattr-sys" namespace are constructed by -concatenating "xattr-sys::" with the extended attribute name. All extended -attribute values are returned as hex-encoded strings in which bytes outside -the ASCII range are encoded as escape sequences of the form \xnn -where nn is a 2-digit hexadecimal number.

-
-
-
-

Functions

-
-

g_file_attribute_info_list_new ()

-
GFileAttributeInfoList *
-g_file_attribute_info_list_new (void);
-

Creates a new file attribute info list.

-
-

Returns

-

a GFileAttributeInfoList.

-
-
-
-
-

g_file_attribute_info_list_ref ()

-
GFileAttributeInfoList *
-g_file_attribute_info_list_ref (GFileAttributeInfoList *list);
-

References a file attribute info list.

-
-

Parameters

-
----- - - - - - -

list

a GFileAttributeInfoList to reference.

 
-
-
-

Returns

-

GFileAttributeInfoList or NULL on error.

-
-
-
-
-

g_file_attribute_info_list_unref ()

-
void
-g_file_attribute_info_list_unref (GFileAttributeInfoList *list);
-

Removes a reference from the given list -. If the reference count -falls to zero, the list - is deleted.

-
-

Parameters

-
----- - - - - - -

list

The GFileAttributeInfoList to unreference.

 
-
-
-
-
-

g_file_attribute_info_list_dup ()

-
GFileAttributeInfoList *
-g_file_attribute_info_list_dup (GFileAttributeInfoList *list);
-

Makes a duplicate of a file attribute info list.

-
-

Parameters

-
----- - - - - - -

list

a GFileAttributeInfoList to duplicate.

 
-
-
-

Returns

-

a copy of the given list -.

-
-
-
-
-

g_file_attribute_info_list_lookup ()

-
const GFileAttributeInfo *
-g_file_attribute_info_list_lookup (GFileAttributeInfoList *list,
-                                   const char *name);
-

Gets the file attribute with the name name - from list -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GFileAttributeInfoList.

 

name

the name of the attribute to lookup.

 
-
-
-

Returns

-

a GFileAttributeInfo for the name -, or NULL if an -attribute isn't found.

-
-
-
-
-

g_file_attribute_info_list_add ()

-
void
-g_file_attribute_info_list_add (GFileAttributeInfoList *list,
-                                const char *name,
-                                GFileAttributeType type,
-                                GFileAttributeInfoFlags flags);
-

Adds a new attribute with name - to the list -, setting -its type - and flags -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

list

a GFileAttributeInfoList.

 

name

the name of the attribute to add.

 

type

the GFileAttributeType for the attribute.

 

flags

GFileAttributeInfoFlags for the attribute.

 
-
-
-
-
-

Types and Values

-
-

enum GFileAttributeType

-

The data types for file attributes.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_FILE_ATTRIBUTE_TYPE_INVALID

-

indicates an invalid or uninitalized type.

-
 

G_FILE_ATTRIBUTE_TYPE_STRING

-

a null terminated UTF8 string.

-
 

G_FILE_ATTRIBUTE_TYPE_BYTE_STRING

-

a zero terminated string of non-zero bytes.

-
 

G_FILE_ATTRIBUTE_TYPE_BOOLEAN

-

a boolean value.

-
 

G_FILE_ATTRIBUTE_TYPE_UINT32

-

an unsigned 4-byte/32-bit integer.

-
 

G_FILE_ATTRIBUTE_TYPE_INT32

-

a signed 4-byte/32-bit integer.

-
 

G_FILE_ATTRIBUTE_TYPE_UINT64

-

an unsigned 8-byte/64-bit integer.

-
 

G_FILE_ATTRIBUTE_TYPE_INT64

-

a signed 8-byte/64-bit integer.

-
 

G_FILE_ATTRIBUTE_TYPE_OBJECT

-

a GObject.

-
 

G_FILE_ATTRIBUTE_TYPE_STRINGV

-

a NULL terminated char **. Since 2.22

-
 
-
-
-
-
-

enum GFileAttributeInfoFlags

-

Flags specifying the behaviour of an attribute.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_FILE_ATTRIBUTE_INFO_NONE

-

no flags set.

-
 

G_FILE_ATTRIBUTE_INFO_COPY_WITH_FILE

-

copy the attribute values when the file is copied.

-
 

G_FILE_ATTRIBUTE_INFO_COPY_WHEN_MOVED

-

copy the attribute values when the file is moved.

-
 
-
-
-
-
-

enum GFileAttributeStatus

-

Used by g_file_set_attributes_from_info() when setting file attributes.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_FILE_ATTRIBUTE_STATUS_UNSET

-

Attribute value is unset (empty).

-
 

G_FILE_ATTRIBUTE_STATUS_SET

-

Attribute value is set.

-
 

G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING

-

Indicates an error in setting the value.

-
 
-
-
-
-
-

GFileAttributeInfo

-
typedef struct {
-  char                    *name;
-  GFileAttributeType       type;
-  GFileAttributeInfoFlags  flags;
-} GFileAttributeInfo;
-
-

Information about a specific attribute.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

char *name;

the name of the attribute.

 

GFileAttributeType type;

the GFileAttributeType type of the attribute.

 

GFileAttributeInfoFlags flags;

a set of GFileAttributeInfoFlags.

 
-
-
-
-
-

GFileAttributeInfoList

-
typedef struct {
-  GFileAttributeInfo *infos;
-  int                 n_infos;
-} GFileAttributeInfoList;
-
-

Acts as a lightweight registry for possible valid file attributes. -The registry stores Key-Value pair formats as GFileAttributeInfos.

-
-

Members

-
----- - - - - - - - - - - - - -

GFileAttributeInfo *infos;

an array of GFileAttributeInfos.

 

int n_infos;

the number of values in the array.

 
-
-
-
-
-

See Also

-

GFile, GFileInfo

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-GIOError.html b/docs/reference/gio/html/gio-GIOError.html deleted file mode 100644 index 90f1bb7c3..000000000 --- a/docs/reference/gio/html/gio-GIOError.html +++ /dev/null @@ -1,561 +0,0 @@ - - - - -GIOError: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIOError

-

GIOError — Error helper functions

-
-
-

Functions

-
---- - - - - - - - - - - -
-GIOErrorEnum - -g_io_error_from_errno () -
-GIOErrorEnum - -g_io_error_from_win32_error () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
#defineG_IO_ERROR
enumGIOErrorEnum
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Contains helper functions for reporting errors to the user.

-
-
-

Functions

-
-

g_io_error_from_errno ()

-
GIOErrorEnum
-g_io_error_from_errno (gint err_no);
-

Converts errno.h error codes into GIO error codes. The fallback -value G_IO_ERROR_FAILED is returned for error codes not currently -handled (but note that future GLib releases may return a more -specific value instead).

-
-

Parameters

-
----- - - - - - -

err_no

Error number as defined in errno.h.

 
-
-
-

Returns

-

GIOErrorEnum value for the given errno.h error number.

-
-
-
-
-

g_io_error_from_win32_error ()

-
GIOErrorEnum
-g_io_error_from_win32_error (gint error_code);
-

Converts some common error codes (as returned from GetLastError() -or WSAGetLastError()) into GIO error codes. The fallback value -G_IO_ERROR_FAILED is returned for error codes not currently -handled (but note that future GLib releases may return a more -specific value instead).

-

You can use g_win32_error_message() to get a localized string -corresponding to error_code -. (But note that unlike g_strerror(), -g_win32_error_message() returns a string that must be freed.)

-
-

Parameters

-
----- - - - - - -

error_code

Windows error number.

 
-
-
-

Returns

-

GIOErrorEnum value for the given error number.

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

G_IO_ERROR

-
#define G_IO_ERROR g_io_error_quark()
-
-

Error domain for GIO. Errors in this domain will be from the GIOErrorEnum enumeration. -See GError for more information on error domains.

-
-
-
-

enum GIOErrorEnum

-

Error codes returned by GIO functions.

-

Note that this domain may be extended in future GLib releases. In -general, new error codes either only apply to new APIs, or else -replace G_IO_ERROR_FAILED in cases that were not explicitly -distinguished before. You should therefore avoid writing code like

-
- - - - - - - -
1
-2
-3
-4
-5
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_FAILED))
-  {
-    // Assume that this is EPRINTERONFIRE
-    ...
-  }
-
- -

-but should instead treat all unrecognized error codes the same as -G_IO_ERROR_FAILED.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_IO_ERROR_FAILED

-

Generic error condition for when an operation fails - and no more specific GIOErrorEnum value is defined.

-
 

G_IO_ERROR_NOT_FOUND

-

File not found.

-
 

G_IO_ERROR_EXISTS

-

File already exists.

-
 

G_IO_ERROR_IS_DIRECTORY

-

File is a directory.

-
 

G_IO_ERROR_NOT_DIRECTORY

-

File is not a directory.

-
 

G_IO_ERROR_NOT_EMPTY

-

File is a directory that isn't empty.

-
 

G_IO_ERROR_NOT_REGULAR_FILE

-

File is not a regular file.

-
 

G_IO_ERROR_NOT_SYMBOLIC_LINK

-

File is not a symbolic link.

-
 

G_IO_ERROR_NOT_MOUNTABLE_FILE

-

File cannot be mounted.

-
 

G_IO_ERROR_FILENAME_TOO_LONG

-

Filename is too many characters.

-
 

G_IO_ERROR_INVALID_FILENAME

-

Filename is invalid or contains invalid characters.

-
 

G_IO_ERROR_TOO_MANY_LINKS

-

File contains too many symbolic links.

-
 

G_IO_ERROR_NO_SPACE

-

No space left on drive.

-
 

G_IO_ERROR_INVALID_ARGUMENT

-

Invalid argument.

-
 

G_IO_ERROR_PERMISSION_DENIED

-

Permission denied.

-
 

G_IO_ERROR_NOT_SUPPORTED

-

Operation (or one of its parameters) not supported

-
 

G_IO_ERROR_NOT_MOUNTED

-

File isn't mounted.

-
 

G_IO_ERROR_ALREADY_MOUNTED

-

File is already mounted.

-
 

G_IO_ERROR_CLOSED

-

File was closed.

-
 

G_IO_ERROR_CANCELLED

-

Operation was cancelled. See GCancellable.

-
 

G_IO_ERROR_PENDING

-

Operations are still pending.

-
 

G_IO_ERROR_READ_ONLY

-

File is read only.

-
 

G_IO_ERROR_CANT_CREATE_BACKUP

-

Backup couldn't be created.

-
 

G_IO_ERROR_WRONG_ETAG

-

File's Entity Tag was incorrect.

-
 

G_IO_ERROR_TIMED_OUT

-

Operation timed out.

-
 

G_IO_ERROR_WOULD_RECURSE

-

Operation would be recursive.

-
 

G_IO_ERROR_BUSY

-

File is busy.

-
 

G_IO_ERROR_WOULD_BLOCK

-

Operation would block.

-
 

G_IO_ERROR_HOST_NOT_FOUND

-

Host couldn't be found (remote operations).

-
 

G_IO_ERROR_WOULD_MERGE

-

Operation would merge files.

-
 

G_IO_ERROR_FAILED_HANDLED

-

Operation failed and a helper program has - already interacted with the user. Do not display any error dialog.

-
 

G_IO_ERROR_TOO_MANY_OPEN_FILES

-

The current process has too many files - open and can't open any more. Duplicate descriptors do count toward - this limit. Since 2.20

-
 

G_IO_ERROR_NOT_INITIALIZED

-

The object has not been initialized. Since 2.22

-
 

G_IO_ERROR_ADDRESS_IN_USE

-

The requested address is already in use. Since 2.22

-
 

G_IO_ERROR_PARTIAL_INPUT

-

Need more input to finish operation. Since 2.24

-
 

G_IO_ERROR_INVALID_DATA

-

The input data was invalid. Since 2.24

-
 

G_IO_ERROR_DBUS_ERROR

-

A remote object generated an error that - doesn't correspond to a locally registered GError error - domain. Use g_dbus_error_get_remote_error() to extract the D-Bus - error name and g_dbus_error_strip_remote_error() to fix up the - message so it matches what was received on the wire. Since 2.26.

-
 

G_IO_ERROR_HOST_UNREACHABLE

-

Host unreachable. Since 2.26

-
 

G_IO_ERROR_NETWORK_UNREACHABLE

-

Network unreachable. Since 2.26

-
 

G_IO_ERROR_CONNECTION_REFUSED

-

Connection refused. Since 2.26

-
 

G_IO_ERROR_PROXY_FAILED

-

Connection to proxy server failed. Since 2.26

-
 

G_IO_ERROR_PROXY_AUTH_FAILED

-

Proxy authentication failed. Since 2.26

-
 

G_IO_ERROR_PROXY_NEED_AUTH

-

Proxy server needs authentication. Since 2.26

-
 

G_IO_ERROR_PROXY_NOT_ALLOWED

-

Proxy connection is not allowed by ruleset. - Since 2.26

-
 

G_IO_ERROR_BROKEN_PIPE

-

Broken pipe. Since 2.36

-
 

G_IO_ERROR_CONNECTION_CLOSED

-

Connection closed by peer. Note that this - is the same code as G_IO_ERROR_BROKEN_PIPE; before 2.44 some - "connection closed" errors returned G_IO_ERROR_BROKEN_PIPE, but others - returned G_IO_ERROR_FAILED. Now they should all return the same - value, which has this more logical name. Since 2.44.

-
 

G_IO_ERROR_NOT_CONNECTED

-

Transport endpoint is not connected. Since 2.44

-
 

G_IO_ERROR_MESSAGE_TOO_LARGE

-

Message too large. Since 2.48.

-
 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-GIOScheduler.html b/docs/reference/gio/html/gio-GIOScheduler.html deleted file mode 100644 index 8dc16034d..000000000 --- a/docs/reference/gio/html/gio-GIOScheduler.html +++ /dev/null @@ -1,362 +0,0 @@ - - - - -GIOScheduler: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GIOScheduler

-

GIOScheduler — I/O Scheduler

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -(*GIOSchedulerJobFunc) () -
-void - -g_io_scheduler_push_job () -
-void - -g_io_scheduler_cancel_all_jobs () -
-gboolean - -g_io_scheduler_job_send_to_mainloop () -
-void - -g_io_scheduler_job_send_to_mainloop_async () -
-
-
-

Types and Values

-
---- - - - - -
 GIOSchedulerJob
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

As of GLib 2.36, GIOScheduler is deprecated in favor of -GThreadPool and GTask.

-

Schedules asynchronous I/O operations. GIOScheduler integrates -into the main event loop (GMainLoop) and uses threads.

-
-
-

Functions

-
-

GIOSchedulerJobFunc ()

-
gboolean
-(*GIOSchedulerJobFunc) (GIOSchedulerJob *job,
-                        GCancellable *cancellable,
-                        gpointer user_data);
-

I/O Job function.

-

Long-running jobs should periodically check the cancellable - -to see if they have been cancelled.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

job

a GIOSchedulerJob.

 

cancellable

optional GCancellable object, NULL to ignore.

 

user_data

the data to pass to callback function

 
-
-
-

Returns

-

TRUE if this function should be called again to -complete the job, FALSE if the job is complete (or cancelled)

-
-
-
-
-

g_io_scheduler_push_job ()

-
void
-g_io_scheduler_push_job (GIOSchedulerJobFunc job_func,
-                         gpointer user_data,
-                         GDestroyNotify notify,
-                         gint io_priority,
-                         GCancellable *cancellable);
-
-

g_io_scheduler_push_job is deprecated and should not be used in newly-written code.

-

use GThreadPool or g_task_run_in_thread()

-
-

Schedules the I/O job to run in another thread.

-

notify - will be called on user_data - after job_func - has returned, -regardless whether the job was cancelled or has run to completion.

-

If cancellable - is not NULL, it can be used to cancel the I/O job -by calling g_cancellable_cancel() or by calling -g_io_scheduler_cancel_all_jobs().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

job_func

a GIOSchedulerJobFunc.

 

user_data

data to pass to job_func -

 

notify

a GDestroyNotify for user_data -, or NULL.

[nullable]

io_priority

the I/O priority -of the request.

 

cancellable

optional GCancellable object, NULL to ignore.

 
-
-
-
-
-

g_io_scheduler_cancel_all_jobs ()

-
void
-g_io_scheduler_cancel_all_jobs (void);
-
-

g_io_scheduler_cancel_all_jobs is deprecated and should not be used in newly-written code.

-

You should never call this function, since you don't -know how other libraries in your program might be making use of -gioscheduler.

-
-

Cancels all cancellable I/O jobs.

-

A job is cancellable if a GCancellable was passed into -g_io_scheduler_push_job().

-
-
-
-

g_io_scheduler_job_send_to_mainloop ()

-
gboolean
-g_io_scheduler_job_send_to_mainloop (GIOSchedulerJob *job,
-                                     GSourceFunc func,
-                                     gpointer user_data,
-                                     GDestroyNotify notify);
-
-

g_io_scheduler_job_send_to_mainloop is deprecated and should not be used in newly-written code.

-

Use g_main_context_invoke().

-
-

Used from an I/O job to send a callback to be run in the thread -that the job was started from, waiting for the result (and thus -blocking the I/O job).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

job

a GIOSchedulerJob

 

func

a GSourceFunc callback that will be called in the original thread

 

user_data

data to pass to func -

 

notify

a GDestroyNotify for user_data -, or NULL.

[nullable]
-
-
-

Returns

-

The return value of func -

-
-
-
-
-

g_io_scheduler_job_send_to_mainloop_async ()

-
void
-g_io_scheduler_job_send_to_mainloop_async
-                               (GIOSchedulerJob *job,
-                                GSourceFunc func,
-                                gpointer user_data,
-                                GDestroyNotify notify);
-
-

g_io_scheduler_job_send_to_mainloop_async is deprecated and should not be used in newly-written code.

-

Use g_main_context_invoke().

-
-

Used from an I/O job to send a callback to be run asynchronously in -the thread that the job was started from. The callback will be run -when the main loop is available, but at that time the I/O job might -have finished. The return value from the callback is ignored.

-

Note that if you are passing the user_data - from g_io_scheduler_push_job() -on to this function you have to ensure that it is not freed before -func - is called, either by passing NULL as notify - to -g_io_scheduler_push_job() or by using refcounting for user_data -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

job

a GIOSchedulerJob

 

func

a GSourceFunc callback that will be called in the original thread

 

user_data

data to pass to func -

 

notify

a GDestroyNotify for user_data -, or NULL.

[nullable]
-
-
-
-
-

Types and Values

-
-

GIOSchedulerJob

-
typedef struct _GIOSchedulerJob GIOSchedulerJob;
-

Opaque class for defining and scheduling IO jobs.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-GMenuModel-exporter.html b/docs/reference/gio/html/gio-GMenuModel-exporter.html deleted file mode 100644 index 4efd5846a..000000000 --- a/docs/reference/gio/html/gio-GMenuModel-exporter.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - -GMenuModel exporter: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GMenuModel exporter

-

GMenuModel exporter — Export GMenuModels on D-Bus

-
-
-

Functions

-
---- - - - - - - - - - - -
-guint - -g_dbus_connection_export_menu_model () -
-void - -g_dbus_connection_unexport_menu_model () -
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

These functions support exporting a GMenuModel on D-Bus. -The D-Bus interface that is used is a private implementation -detail.

-

To access an exported GMenuModel remotely, use -g_dbus_menu_model_get() to obtain a GDBusMenuModel.

-
-
-

Functions

-
-

g_dbus_connection_export_menu_model ()

-
guint
-g_dbus_connection_export_menu_model (GDBusConnection *connection,
-                                     const gchar *object_path,
-                                     GMenuModel *menu,
-                                     GError **error);
-

Exports menu - on connection - at object_path -.

-

The implemented D-Bus API should be considered private. -It is subject to change in the future.

-

An object path can only have one menu model exported on it. If this -constraint is violated, the export will fail and 0 will be -returned (with error - set accordingly).

-

You can unexport the menu model using -g_dbus_connection_unexport_menu_model() with the return value of -this function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

object_path

a D-Bus object path

 

menu

a GMenuModel

 

error

return location for an error, or NULL

 
-
-
-

Returns

-

the ID of the export (never zero), or 0 in case of failure

-
-

Since: 2.32

-
-
-
-

g_dbus_connection_unexport_menu_model ()

-
void
-g_dbus_connection_unexport_menu_model (GDBusConnection *connection,
-                                       guint export_id);
-

Reverses the effect of a previous call to -g_dbus_connection_export_menu_model().

-

It is an error to call this function with an ID that wasn't returned -from g_dbus_connection_export_menu_model() or to call it with the -same ID more than once.

-
-

Parameters

-
----- - - - - - - - - - - - - -

connection

a GDBusConnection

 

export_id

the ID from g_dbus_connection_export_menu_model()

 
-
-

Since: 2.32

-
-
-
-

Types and Values

-
-
-

See Also

-

GMenuModel, GDBusMenuModel

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-GSettingsSchema-GSettingsSchemaSource.html b/docs/reference/gio/html/gio-GSettingsSchema-GSettingsSchemaSource.html deleted file mode 100644 index 26bf091f0..000000000 --- a/docs/reference/gio/html/gio-GSettingsSchema-GSettingsSchemaSource.html +++ /dev/null @@ -1,1276 +0,0 @@ - - - - -GSettingsSchema, GSettingsSchemaSource: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GSettingsSchema, GSettingsSchemaSource

-

GSettingsSchema, GSettingsSchemaSource — Introspecting and controlling the loading - of GSettings schemas

-
- -
-

Types and Values

-
---- - - - - - - - - - - - - - - -
 GSettingsSchemaSource
 GSettingsSchema
 GSettingsSchemaKey
-
-
-

Object Hierarchy

-
    GBoxed
-    ├── GSettingsSchema
-    ├── GSettingsSchemaKey
-    ╰── GSettingsSchemaSource
-
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

The GSettingsSchemaSource and GSettingsSchema APIs provide a -mechanism for advanced control over the loading of schemas and a -mechanism for introspecting their content.

-

Plugin loading systems that wish to provide plugins a way to access -settings face the problem of how to make the schemas for these -settings visible to GSettings. Typically, a plugin will want to ship -the schema along with itself and it won't be installed into the -standard system directories for schemas.

-

GSettingsSchemaSource provides a mechanism for dealing with this by -allowing the creation of a new 'schema source' from which schemas can -be acquired. This schema source can then become part of the metadata -associated with the plugin and queried whenever the plugin requires -access to some settings.

-

Consider the following example:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
typedef struct
-{
-   ...
-   GSettingsSchemaSource *schema_source;
-   ...
-} Plugin;
-
-Plugin *
-initialise_plugin (const gchar *dir)
-{
-  Plugin *plugin;
-
-  ...
-
-  plugin->schema_source =
-    g_settings_new_schema_source_from_directory (dir,
-      g_settings_schema_source_get_default (), FALSE, NULL);
-
-  ...
-
-  return plugin;
-}
-
-...
-
-GSettings *
-plugin_get_settings (Plugin      *plugin,
-                     const gchar *schema_id)
-{
-  GSettingsSchema *schema;
-
-  if (schema_id == NULL)
-    schema_id = plugin->identifier;
-
-  schema = g_settings_schema_source_lookup (plugin->schema_source,
-                                            schema_id, FALSE);
-
-  if (schema == NULL)
-    {
-      ... disable the plugin or abort, etc ...
-    }
-
-  return g_settings_new_full (schema, NULL, NULL);
-}
-
- -

-

The code above shows how hooks should be added to the code that -initialises (or enables) the plugin to create the schema source and -how an API can be added to the plugin system to provide a convenient -way for the plugin to access its settings, using the schemas that it -ships.

-

From the standpoint of the plugin, it would need to ensure that it -ships a gschemas.compiled file as part of itself, and then simply do -the following:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
{
-  GSettings *settings;
-  gint some_value;
-
-  settings = plugin_get_settings (self, NULL);
-  some_value = g_settings_get_int (settings, "some-value");
-  ...
-}
-
- -

-

It's also possible that the plugin system expects the schema source -files (ie: .gschema.xml files) instead of a gschemas.compiled file. -In that case, the plugin loading system must compile the schemas for -itself before attempting to create the settings source.

-
-
-

Functions

-
-

g_settings_schema_source_get_default ()

-
GSettingsSchemaSource *
-g_settings_schema_source_get_default (void);
-

Gets the default system schema source.

-

This function is not required for normal uses of GSettings but it -may be useful to authors of plugin management systems or to those who -want to introspect the content of schemas.

-

If no schemas are installed, NULL will be returned.

-

The returned source may actually consist of multiple schema sources -from different directories, depending on which directories were given -in XDG_DATA_DIRS and GSETTINGS_SCHEMA_DIR. For this reason, all -lookups performed against the default source should probably be done -recursively.

-
-

Returns

-

the default schema source.

-

[transfer none]

-
-

Since: 2.32

-
-
-
-

g_settings_schema_source_ref ()

-
GSettingsSchemaSource *
-g_settings_schema_source_ref (GSettingsSchemaSource *source);
-

Increase the reference count of source -, returning a new reference.

-
-

Parameters

-
----- - - - - - -

source

a GSettingsSchemaSource

 
-
-
-

Returns

-

a new reference to source -

-
-

Since: 2.32

-
-
-
-

g_settings_schema_source_unref ()

-
void
-g_settings_schema_source_unref (GSettingsSchemaSource *source);
-

Decrease the reference count of source -, possibly freeing it.

-
-

Parameters

-
----- - - - - - -

source

a GSettingsSchemaSource

 
-
-

Since: 2.32

-
-
-
-

g_settings_schema_source_new_from_directory ()

-
GSettingsSchemaSource *
-g_settings_schema_source_new_from_directory
-                               (const gchar *directory,
-                                GSettingsSchemaSource *parent,
-                                gboolean trusted,
-                                GError **error);
-

Attempts to create a new schema source corresponding to the contents -of the given directory.

-

This function is not required for normal uses of GSettings but it -may be useful to authors of plugin management systems.

-

The directory should contain a file called gschemas.compiled as -produced by the glib-compile-schemas tool.

-

If trusted - is TRUE then gschemas.compiled is trusted not to be -corrupted. This assumption has a performance advantage, but can result -in crashes or inconsistent behaviour in the case of a corrupted file. -Generally, you should set trusted - to TRUE for files installed by the -system and to FALSE for files in the home directory.

-

If parent - is non-NULL then there are two effects.

-

First, if g_settings_schema_source_lookup() is called with the -recursive - flag set to TRUE and the schema can not be found in the -source, the lookup will recurse to the parent.

-

Second, any references to other schemas specified within this -source (ie: child or extends) references may be resolved -from the parent -.

-

For this second reason, except in very unusual situations, the -parent - should probably be given as the default schema source, as -returned by g_settings_schema_source_get_default().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

directory

the filename of a directory.

[type filename]

parent

a GSettingsSchemaSource, or NULL.

[nullable]

trusted

TRUE, if the directory is trusted

 

error

a pointer to a GError pointer set to NULL, or NULL

 
-
-

Since: 2.32

-
-
-
-

g_settings_schema_source_list_schemas ()

-
void
-g_settings_schema_source_list_schemas (GSettingsSchemaSource *source,
-                                       gboolean recursive,
-                                       gchar ***non_relocatable,
-                                       gchar ***relocatable);
-

Lists the schemas in a given source.

-

If recursive - is TRUE then include parent sources. If FALSE then -only include the schemas from one source (ie: one directory). You -probably want TRUE.

-

Non-relocatable schemas are those for which you can call -g_settings_new(). Relocatable schemas are those for which you must -use g_settings_new_with_path().

-

Do not call this function from normal programs. This is designed for -use by database editors, commandline tools, etc.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

source

a GSettingsSchemaSource

 

recursive

if we should recurse

 

non_relocatable

the -list of non-relocatable schemas.

[out][transfer full][array zero-terminated=1]

relocatable

the list -of relocatable schemas.

[out][transfer full][array zero-terminated=1]
-
-

Since: 2.40

-
-
-
-

g_settings_schema_source_lookup ()

-
GSettingsSchema *
-g_settings_schema_source_lookup (GSettingsSchemaSource *source,
-                                 const gchar *schema_id,
-                                 gboolean recursive);
-

Looks up a schema with the identifier schema_id - in source -.

-

This function is not required for normal uses of GSettings but it -may be useful to authors of plugin management systems or to those who -want to introspect the content of schemas.

-

If the schema isn't found directly in source - and recursive - is TRUE -then the parent sources will also be checked.

-

If the schema isn't found, NULL is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

source

a GSettingsSchemaSource

 

schema_id

a schema ID

 

recursive

TRUE if the lookup should be recursive

 
-
-
-

Returns

-

a new GSettingsSchema.

-

[nullable][transfer full]

-
-

Since: 2.32

-
-
-
-

g_settings_schema_ref ()

-
GSettingsSchema *
-g_settings_schema_ref (GSettingsSchema *schema);
-

Increase the reference count of schema -, returning a new reference.

-
-

Parameters

-
----- - - - - - -

schema

a GSettingsSchema

 
-
-
-

Returns

-

a new reference to schema -

-
-

Since: 2.32

-
-
-
-

g_settings_schema_unref ()

-
void
-g_settings_schema_unref (GSettingsSchema *schema);
-

Decrease the reference count of schema -, possibly freeing it.

-
-

Parameters

-
----- - - - - - -

schema

a GSettingsSchema

 
-
-

Since: 2.32

-
-
-
-

g_settings_schema_get_id ()

-
const gchar *
-g_settings_schema_get_id (GSettingsSchema *schema);
-

Get the ID of schema -.

-
-

Parameters

-
----- - - - - - -

schema

a GSettingsSchema

 
-
-
-

Returns

-

the ID.

-

[transfer none]

-
-
-
-
-

g_settings_schema_get_path ()

-
const gchar *
-g_settings_schema_get_path (GSettingsSchema *schema);
-

Gets the path associated with schema -, or NULL.

-

Schemas may be single-instance or relocatable. Single-instance -schemas correspond to exactly one set of keys in the backend -database: those located at the path returned by this function.

-

Relocatable schemas can be referenced by other schemas and can -threfore describe multiple sets of keys at different locations. For -relocatable schemas, this function will return NULL.

-
-

Parameters

-
----- - - - - - -

schema

a GSettingsSchema

 
-
-
-

Returns

-

the path of the schema, or NULL.

-

[transfer none]

-
-

Since: 2.32

-
-
-
-

g_settings_schema_has_key ()

-
gboolean
-g_settings_schema_has_key (GSettingsSchema *schema,
-                           const gchar *name);
-

Checks if schema - has a key named name -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

schema

a GSettingsSchema

 

name

the name of a key

 
-
-
-

Returns

-

TRUE if such a key exists

-
-

Since: 2.40

-
-
-
-

g_settings_schema_get_key ()

-
GSettingsSchemaKey *
-g_settings_schema_get_key (GSettingsSchema *schema,
-                           const gchar *name);
-

Gets the key named name - from schema -.

-

It is a programmer error to request a key that does not exist. See -g_settings_schema_list_keys().

-
-

Parameters

-
----- - - - - - - - - - - - - -

schema

a GSettingsSchema

 

name

the name of a key

 
-
-
-

Returns

-

the GSettingsSchemaKey for name -.

-

[transfer full]

-
-

Since: 2.40

-
-
-
-

g_settings_schema_key_ref ()

-
GSettingsSchemaKey *
-g_settings_schema_key_ref (GSettingsSchemaKey *key);
-

Increase the reference count of key -, returning a new reference.

-
-

Parameters

-
----- - - - - - -

key

a GSettingsSchemaKey

 
-
-
-

Returns

-

a new reference to key -

-
-

Since: 2.40

-
-
-
-

g_settings_schema_key_unref ()

-
void
-g_settings_schema_key_unref (GSettingsSchemaKey *key);
-

Decrease the reference count of key -, possibly freeing it.

-
-

Parameters

-
----- - - - - - -

key

a GSettingsSchemaKey

 
-
-

Since: 2.40

-
-
-
-

g_settings_schema_list_children ()

-
gchar **
-g_settings_schema_list_children (GSettingsSchema *schema);
-

Gets the list of children in schema -.

-

You should free the return value with g_strfreev() when you are done -with it.

-
-

Parameters

-
----- - - - - - -

schema

a GSettingsSchema

 
-
-
-

Returns

-

a list of the children on settings -.

-

[transfer full][element-type utf8]

-
-

Since: 2.44

-
-
-
-

g_settings_schema_list_keys ()

-
gchar **
-g_settings_schema_list_keys (GSettingsSchema *schema);
-

Introspects the list of keys on schema -.

-

You should probably not be calling this function from "normal" code -(since you should already know what keys are in your schema). This -function is intended for introspection reasons.

-
-

Parameters

-
----- - - - - - -

schema

a GSettingsSchema

 
-
-
-

Returns

-

a list of the keys on -schema -.

-

[transfer full][element-type utf8]

-
-

Since: 2.46

-
-
-
-

g_settings_schema_key_get_value_type ()

-
const GVariantType *
-g_settings_schema_key_get_value_type (GSettingsSchemaKey *key);
-

Gets the GVariantType of key -.

-
-

Parameters

-
----- - - - - - -

key

a GSettingsSchemaKey

 
-
-
-

Returns

-

the type of key -.

-

[transfer none]

-
-

Since: 2.40

-
-
-
-

g_settings_schema_key_get_default_value ()

-
GVariant *
-g_settings_schema_key_get_default_value
-                               (GSettingsSchemaKey *key);
-

Gets the default value for key -.

-

Note that this is the default value according to the schema. System -administrator defaults and lockdown are not visible via this API.

-
-

Parameters

-
----- - - - - - -

key

a GSettingsSchemaKey

 
-
-
-

Returns

-

the default value for the key.

-

[transfer full]

-
-

Since: 2.40

-
-
-
-

g_settings_schema_key_get_range ()

-
GVariant *
-g_settings_schema_key_get_range (GSettingsSchemaKey *key);
-

Queries the range of a key.

-

This function will return a GVariant that fully describes the range -of values that are valid for key -.

-

The type of GVariant returned is (sv). The string describes -the type of range restriction in effect. The type and meaning of -the value contained in the variant depends on the string.

-

If the string is 'type' then the variant contains an empty array. -The element type of that empty array is the expected type of value -and all values of that type are valid.

-

If the string is 'enum' then the variant contains an array -enumerating the possible values. Each item in the array is -a possible valid value and no other values are valid.

-

If the string is 'flags' then the variant contains an array. Each -item in the array is a value that may appear zero or one times in an -array to be used as the value for this key. For example, if the -variant contained the array ['x', 'y'] then the valid values for -the key would be [], ['x'], ['y'], ['x', 'y'] and -['y', 'x'].

-

Finally, if the string is 'range' then the variant contains a pair -of like-typed values -- the minimum and maximum permissible values -for this key.

-

This information should not be used by normal programs. It is -considered to be a hint for introspection purposes. Normal programs -should already know what is permitted by their own schema. The -format may change in any way in the future -- but particularly, new -forms may be added to the possibilities described above.

-

You should free the returned value with g_variant_unref() when it is -no longer needed.

-
-

Parameters

-
----- - - - - - -

key

a GSettingsSchemaKey

 
-
-
-

Returns

-

a GVariant describing the range.

-

[transfer full]

-
-

Since: 2.40

-
-
-
-

g_settings_schema_key_range_check ()

-
gboolean
-g_settings_schema_key_range_check (GSettingsSchemaKey *key,
-                                   GVariant *value);
-

Checks if the given value - is of the correct type and within the -permitted range for key -.

-

It is a programmer error if value - is not of the correct type -- you -must check for this first.

-
-

Parameters

-
----- - - - - - - - - - - - - -

key

a GSettingsSchemaKey

 

value

the value to check

 
-
-
-

Returns

-

TRUE if value -is valid for key -

-
-

Since: 2.40

-
-
-
-

g_settings_schema_key_get_name ()

-
const gchar *
-g_settings_schema_key_get_name (GSettingsSchemaKey *key);
-

Gets the name of key -.

-
-

Parameters

-
----- - - - - - -

key

a GSettingsSchemaKey

 
-
-
-

Returns

-

the name of key -.

-
-

Since: 2.44

-
-
-
-

g_settings_schema_key_get_summary ()

-
const gchar *
-g_settings_schema_key_get_summary (GSettingsSchemaKey *key);
-

Gets the summary for key -.

-

If no summary has been provided in the schema for key -, returns -NULL.

-

The summary is a short description of the purpose of the key; usually -one short sentence. Summaries can be translated and the value -returned from this function is is the current locale.

-

This function is slow. The summary and description information for -the schemas is not stored in the compiled schema database so this -function has to parse all of the source XML files in the schema -directory.

-
-

Parameters

-
----- - - - - - -

key

a GSettingsSchemaKey

 
-
-
-

Returns

-

the summary for key -, or NULL

-
-

Since: 2.34

-
-
-
-

g_settings_schema_key_get_description ()

-
const gchar *
-g_settings_schema_key_get_description (GSettingsSchemaKey *key);
-

Gets the description for key -.

-

If no description has been provided in the schema for key -, returns -NULL.

-

The description can be one sentence to several paragraphs in length. -Paragraphs are delimited with a double newline. Descriptions can be -translated and the value returned from this function is is the -current locale.

-

This function is slow. The summary and description information for -the schemas is not stored in the compiled schema database so this -function has to parse all of the source XML files in the schema -directory.

-
-

Parameters

-
----- - - - - - -

key

a GSettingsSchemaKey

 
-
-
-

Returns

-

the description for key -, or NULL

-
-

Since: 2.34

-
-
-
-

Types and Values

-
-

GSettingsSchemaSource

-
typedef struct _GSettingsSchemaSource GSettingsSchemaSource;
-

This is an opaque structure type. You may not access it directly.

-

Since: 2.32

-
-
-
-

GSettingsSchema

-
typedef struct _GSettingsSchema GSettingsSchema;
-

This is an opaque structure type. You may not access it directly.

-

Since: 2.32

-
-
-
-

GSettingsSchemaKey

-
typedef struct _GSettingsSchemaKey GSettingsSchemaKey;
-

GSettingsSchemaKey is an opaque data structure and can only be accessed -using the following functions.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-GWin32InputStream.html b/docs/reference/gio/html/gio-GWin32InputStream.html deleted file mode 100644 index 74bf3d35e..000000000 --- a/docs/reference/gio/html/gio-GWin32InputStream.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - -GWin32InputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GWin32InputStream

-

GWin32InputStream — Streaming input operations for Windows file handles

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
-GInputStream * - -g_win32_input_stream_new () -
-void - -g_win32_input_stream_set_close_handle () -
-gboolean - -g_win32_input_stream_get_close_handle () -
-void * - -g_win32_input_stream_get_handle () -
-
-
-

Types and Values

-
---- - - - - -
structGWin32InputStream
-
-
-

Includes

-
#include <gio/gwin32inputstream.h>
-
-
-
-

Description

-

GWin32InputStream implements GInputStream for reading from a -Windows file handle.

-

Note that <gio/gwin32inputstream.h> belongs to the Windows-specific GIO -interfaces, thus you have to use the gio-windows-2.0.pc pkg-config file -when using it.

-
-
-

Functions

-
-

g_win32_input_stream_new ()

-
GInputStream *
-g_win32_input_stream_new (void *handle,
-                          gboolean close_handle);
-

Creates a new GWin32InputStream for the given handle -.

-

If close_handle - is TRUE, the handle will be closed -when the stream is closed.

-

Note that "handle" here means a Win32 HANDLE, not a "file descriptor" -as used in the Windows C libraries.

-
-

Parameters

-
----- - - - - - - - - - - - - -

handle

a Win32 file handle

 

close_handle

TRUE to close the handle when done

 
-
-
-

Returns

-

a new GWin32InputStream

-
-
-
-
-

g_win32_input_stream_set_close_handle ()

-
void
-g_win32_input_stream_set_close_handle (GWin32InputStream *stream,
-                                       gboolean close_handle);
-

Sets whether the handle of stream - shall be closed -when the stream is closed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GWin32InputStream

 

close_handle

TRUE to close the handle when done

 
-
-

Since: 2.26

-
-
-
-

g_win32_input_stream_get_close_handle ()

-
gboolean
-g_win32_input_stream_get_close_handle (GWin32InputStream *stream);
-

Returns whether the handle of stream - will be -closed when the stream is closed.

-
-

Parameters

-
----- - - - - - -

stream

a GWin32InputStream

 
-
-
-

Returns

-

TRUE if the handle is closed when done

-
-

Since: 2.26

-
-
-
-

g_win32_input_stream_get_handle ()

-
void *
-g_win32_input_stream_get_handle (GWin32InputStream *stream);
-

Return the Windows file handle that the stream reads from.

-
-

Parameters

-
----- - - - - - -

stream

a GWin32InputStream

 
-
-
-

Returns

-

The file handle of stream -

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

struct GWin32InputStream

-
struct GWin32InputStream {
-  GInputStream parent_instance;
-};
-
-

Implements GInputStream for reading from selectable Windows file handles

-
-
-
-

See Also

-

GInputStream

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-GWin32OutputStream.html b/docs/reference/gio/html/gio-GWin32OutputStream.html deleted file mode 100644 index bacc4716a..000000000 --- a/docs/reference/gio/html/gio-GWin32OutputStream.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - -GWin32OutputStream: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GWin32OutputStream

-

GWin32OutputStream — Streaming output operations for Windows file handles

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
-GOutputStream * - -g_win32_output_stream_new () -
-void - -g_win32_output_stream_set_close_handle () -
-gboolean - -g_win32_output_stream_get_close_handle () -
-void * - -g_win32_output_stream_get_handle () -
-
-
-

Types and Values

-
---- - - - - -
structGWin32OutputStream
-
-
-

Includes

-
#include <gio/gwin32outputstream.h>
-
-
-
-

Description

-

GWin32OutputStream implements GOutputStream for writing to a -Windows file handle.

-

Note that <gio/gwin32outputstream.h> belongs to the Windows-specific GIO -interfaces, thus you have to use the gio-windows-2.0.pc pkg-config file -when using it.

-
-
-

Functions

-
-

g_win32_output_stream_new ()

-
GOutputStream *
-g_win32_output_stream_new (void *handle,
-                           gboolean close_handle);
-

Creates a new GWin32OutputStream for the given handle -.

-

If close_handle -, is TRUE, the handle will be closed when the -output stream is destroyed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

handle

a Win32 file handle

 

close_handle

TRUE to close the handle when done

 
-
-
-

Returns

-

a new GOutputStream

-
-

Since: 2.26

-
-
-
-

g_win32_output_stream_set_close_handle ()

-
void
-g_win32_output_stream_set_close_handle
-                               (GWin32OutputStream *stream,
-                                gboolean close_handle);
-

Sets whether the handle of stream - shall be closed when the stream -is closed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stream

a GWin32OutputStream

 

close_handle

TRUE to close the handle when done

 
-
-

Since: 2.26

-
-
-
-

g_win32_output_stream_get_close_handle ()

-
gboolean
-g_win32_output_stream_get_close_handle
-                               (GWin32OutputStream *stream);
-

Returns whether the handle of stream - will be closed when the -stream is closed.

-
-

Parameters

-
----- - - - - - -

stream

a GWin32OutputStream

 
-
-
-

Returns

-

TRUE if the handle is closed when done

-
-

Since: 2.26

-
-
-
-

g_win32_output_stream_get_handle ()

-
void *
-g_win32_output_stream_get_handle (GWin32OutputStream *stream);
-

Return the Windows handle that the stream writes to.

-
-

Parameters

-
----- - - - - - -

stream

a GWin32OutputStream

 
-
-
-

Returns

-

The handle descriptor of stream -

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

struct GWin32OutputStream

-
struct GWin32OutputStream {
-  GOutputStream parent_instance;
-};
-
-

Implements GOutputStream for outputting to Windows file handles

-
-
-
-

See Also

-

GOutputStream

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-GWin32RegistryKey.html b/docs/reference/gio/html/gio-GWin32RegistryKey.html deleted file mode 100644 index 95316aa45..000000000 --- a/docs/reference/gio/html/gio-GWin32RegistryKey.html +++ /dev/null @@ -1,2066 +0,0 @@ - - - - -GWin32RegistryKey: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GWin32RegistryKey

-

GWin32RegistryKey — W32 registry access helper

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GWin32RegistrySubkeyIter * - -g_win32_registry_subkey_iter_copy () -
-void - -g_win32_registry_subkey_iter_free () -
-void - -g_win32_registry_subkey_iter_assign () -
-GWin32RegistryValueIter * - -g_win32_registry_value_iter_copy () -
-void - -g_win32_registry_value_iter_free () -
-void - -g_win32_registry_value_iter_assign () -
-GWin32RegistryKey * - -g_win32_registry_key_new () -
-GWin32RegistryKey * - -g_win32_registry_key_new_w () -
-GWin32RegistryKey * - -g_win32_registry_key_get_child () -
-GWin32RegistryKey * - -g_win32_registry_key_get_child_w () -
-gboolean - -g_win32_registry_subkey_iter_init () -
-void - -g_win32_registry_subkey_iter_clear () -
-gsize - -g_win32_registry_subkey_iter_n_subkeys () -
-gboolean - -g_win32_registry_subkey_iter_next () -
-gboolean - -g_win32_registry_subkey_iter_get_name () -
-gboolean - -g_win32_registry_subkey_iter_get_name_w () -
-gboolean - -g_win32_registry_value_iter_init () -
-void - -g_win32_registry_value_iter_clear () -
-gsize - -g_win32_registry_value_iter_n_values () -
-gboolean - -g_win32_registry_value_iter_next () -
-gboolean - -g_win32_registry_value_iter_get_value_type () -
-gboolean - -g_win32_registry_value_iter_get_name () -
-gboolean - -g_win32_registry_value_iter_get_name_w () -
-gboolean - -g_win32_registry_value_iter_get_data () -
-gboolean - -g_win32_registry_value_iter_get_data_w () -
-gboolean - -g_win32_registry_key_get_value () -
-gboolean - -g_win32_registry_key_get_value_w () -
const gchar * - -g_win32_registry_key_get_path () -
const gunichar2 * - -g_win32_registry_key_get_path_w () -
-void - -(*GWin32RegistryKeyWatchCallbackFunc) () -
-gboolean - -g_win32_registry_key_watch () -
-gboolean - -g_win32_registry_key_has_changed () -
-void - -g_win32_registry_key_erase_change_indicator () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - -
structGWin32RegistrySubkeyIter
structGWin32RegistryValueIter
structGWin32RegistryKey
enumGWin32RegistryValueType
enumGWin32RegistryKeyWatcherFlags
-
-
-

Includes

-
#include <gio/win32/gwin32registrykey.h>
-
-
-
-

Description

-

GWin32RegistryKey represents a single Windows Registry key.

-

GWin32RegistryKey is used by a number of helper functions that read -Windows Registry. All keys are opened with read-only access, and at -the moment there is no API for writing into registry keys or creating -new ones.

-

GWin32RegistryKey implements the GInitable interface, so if it is manually -constructed by e.g. g_object_new() you must call g_initable_init() and check -the results before using the object. This is done automatically -in g_win32_registry_key_new() and g_win32_registry_key_get_child(), so these -functions can return NULL.

-

To increase efficiency, a UTF-16 variant is available for all functions -that deal with key or value names in the registry. Use these to perform -deep registry queries or other operations that require querying a name -of a key or a value and then opening it (or querying its data). The use -of UTF-16 functions avoids the overhead of converting names to UTF-8 and -back.

-

All functions operate in current user's context (it is not possible to -access registry tree of a different user).

-

Key paths must use '\' as a separator, '/' is not supported. Key names -must not include '\', because it's used as a separator. Value names -can include '\'.

-

Key and value names are not case sensitive.

-

Full key name (excluding the pre-defined ancestor's name) can't exceed -255 UTF-16 characters, give or take. Value name can't exceed 16383 UTF-16 -characters. Tree depth is limited to 512 levels.

-
-
-

Functions

-
-

g_win32_registry_subkey_iter_copy ()

-
GWin32RegistrySubkeyIter *
-g_win32_registry_subkey_iter_copy (const GWin32RegistrySubkeyIter *iter);
-

Creates a dynamically-allocated copy of an iterator. Dynamically-allocated -state of the iterator is duplicated too.

-
-

Parameters

-
----- - - - - - -

iter

an iterator

 
-
-
-

Returns

-

a copy of the iter -, -free with g_win32_registry_subkey_iter_free().

-

[transfer full]

-
-

Since: 2.46

-
-
-
-

g_win32_registry_subkey_iter_free ()

-
void
-g_win32_registry_subkey_iter_free (GWin32RegistrySubkeyIter *iter);
-

Free an iterator allocated on the heap. For iterators that are allocated -on the stack use g_win32_registry_subkey_iter_clear() instead.

-
-

Parameters

-
----- - - - - - -

iter

a dynamically-allocated iterator

 
-
-

Since: 2.46

-
-
-
-

g_win32_registry_subkey_iter_assign ()

-
void
-g_win32_registry_subkey_iter_assign (GWin32RegistrySubkeyIter *iter,
-                                     const GWin32RegistrySubkeyIter *other);
-

Assigns the value of other - to iter -. This function -is not useful in applications, because iterators can be assigned -with GWin32RegistrySubkeyIter i = j;. The -function is used by language bindings.

-
-

Parameters

-
----- - - - - - - - - - - - - -

iter

a GWin32RegistrySubkeyIter

 

other

another GWin32RegistrySubkeyIter

 
-
-

Since: 2.46

-
-
-
-

g_win32_registry_value_iter_copy ()

-
GWin32RegistryValueIter *
-g_win32_registry_value_iter_copy (const GWin32RegistryValueIter *iter);
-

Creates a dynamically-allocated copy of an iterator. Dynamically-allocated -state of the iterator is duplicated too.

-
-

Parameters

-
----- - - - - - -

iter

an iterator

 
-
-
-

Returns

-

a copy of the iter -, -free with g_win32_registry_value_iter_free().

-

[transfer full]

-
-

Since: 2.46

-
-
-
-

g_win32_registry_value_iter_free ()

-
void
-g_win32_registry_value_iter_free (GWin32RegistryValueIter *iter);
-

Free an iterator allocated on the heap. For iterators that are allocated -on the stack use g_win32_registry_value_iter_clear() instead.

-
-

Parameters

-
----- - - - - - -

iter

a dynamically-allocated iterator

 
-
-

Since: 2.46

-
-
-
-

g_win32_registry_value_iter_assign ()

-
void
-g_win32_registry_value_iter_assign (GWin32RegistryValueIter *iter,
-                                    const GWin32RegistryValueIter *other);
-

Assigns the value of other - to iter -. This function -is not useful in applications, because iterators can be assigned -with GWin32RegistryValueIter i = j;. The -function is used by language bindings.

-
-

Parameters

-
----- - - - - - - - - - - - - -

iter

a GWin32RegistryValueIter

 

other

another GWin32RegistryValueIter

 
-
-

Since: 2.46

-
-
-
-

g_win32_registry_key_new ()

-
GWin32RegistryKey *
-g_win32_registry_key_new (const gchar *path,
-                          GError **error);
-

Creates an object that represents a registry key specified by path -. -path - must start with one of the following pre-defined names:

-
    -
  • HKEY_CLASSES_ROOT

  • -
  • HKEY_CURRENT_CONFIG

  • -
  • HKEY_CURRENT_USER

  • -
  • HKEY_CURRENT_USER_LOCAL_SETTINGS

  • -
  • HKEY_LOCAL_MACHINE

  • -
  • HKEY_PERFORMANCE_DATA

  • -
  • HKEY_PERFORMANCE_NLSTEXT

  • -
  • HKEY_PERFORMANCE_TEXT

  • -
  • HKEY_USERS -path - must not end with '\'.

  • -
-
-

Parameters

-
----- - - - - - - - - - - - - -

path

absolute full name of a key to open (in UTF-8)

 

error

a pointer to a NULL GError, or NULL.

[nullable]
-
-
-

Returns

-

a GWin32RegistryKey or NULL if can't -be opened. Free with g_object_unref().

-

[nullable][transfer full]

-
-
-
-
-

g_win32_registry_key_new_w ()

-
GWin32RegistryKey *
-g_win32_registry_key_new_w (const gunichar2 *path,
-                            GError **error);
-

Creates an object that represents a registry key specified by path -. -path - must start with one of the following pre-defined names:

-
    -
  • HKEY_CLASSES_ROOT

  • -
  • HKEY_CURRENT_CONFIG

  • -
  • HKEY_CURRENT_USER

  • -
  • HKEY_CURRENT_USER_LOCAL_SETTINGS

  • -
  • HKEY_LOCAL_MACHINE

  • -
  • HKEY_PERFORMANCE_DATA

  • -
  • HKEY_PERFORMANCE_NLSTEXT

  • -
  • HKEY_PERFORMANCE_TEXT

  • -
  • HKEY_USERS -path - must not end with L'\'.

  • -
-
-

Parameters

-
----- - - - - - - - - - - - - -

path

absolute full name of a key to open (in UTF-16).

[in][transfer none]

error

a pointer to a NULL GError, or NULL.

[inout][optional]
-
-
-

Returns

-

a GWin32RegistryKey or NULL if can't -be opened. Free with g_object_unref().

-

[nullable][transfer full]

-
-
-
-
-

g_win32_registry_key_get_child ()

-
GWin32RegistryKey *
-g_win32_registry_key_get_child (GWin32RegistryKey *key,
-                                const gchar *subkey,
-                                GError **error);
-

Opens a subkey - of the key -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

key

a parent GWin32RegistryKey.

[in][transfer none]

subkey

name of a child key to open (in UTF-8), relative to key -.

[in][transfer none]

error

a pointer to a NULL GError, or NULL.

[inout][optional]
-
-
-

Returns

-

a GWin32RegistryKey or NULL if can't be opened. Free -with g_object_unref().

-

[nullable]

-
-
-
-
-

g_win32_registry_key_get_child_w ()

-
GWin32RegistryKey *
-g_win32_registry_key_get_child_w (GWin32RegistryKey *key,
-                                  const gunichar2 *subkey,
-                                  GError **error);
-

Opens a subkey - of the key -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

key

a parent GWin32RegistryKey.

[in][transfer none]

subkey

name of a child key to open (in UTF-8), relative to key -.

[in][transfer none]

error

a pointer to a NULL GError, or NULL.

[inout][optional]
-
-
-

Returns

-

a GWin32RegistryKey or NULL if can't be opened. Free -with g_object_unref().

-

[nullable]

-
-
-
-
-

g_win32_registry_subkey_iter_init ()

-
gboolean
-g_win32_registry_subkey_iter_init (GWin32RegistrySubkeyIter *iter,
-                                   GWin32RegistryKey *key,
-                                   GError **error);
-

Initialises (without allocating) a GWin32RegistrySubkeyIter. iter - may be -completely uninitialised prior to this call; its old value is -ignored.

-

The iterator remains valid for as long as key - exists. -Clean up its internal buffers with a call to -g_win32_registry_subkey_iter_clear() when done.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

iter

a pointer to a GWin32RegistrySubkeyIter.

[in][transfer none]

key

a GWin32RegistryKey to iterate over.

[in][transfer none]

error

a pointer to NULL GError, or NULL.

[inout][optional]
-
-
-

Returns

-

TRUE if iterator was initialized successfully, FALSE on error.

-
-

Since: 2.46

-
-
-
-

g_win32_registry_subkey_iter_clear ()

-
void
-g_win32_registry_subkey_iter_clear (GWin32RegistrySubkeyIter *iter);
-

Frees internal buffers of a GWin32RegistrySubkeyIter.

-
-

Parameters

-
----- - - - - - -

iter

a GWin32RegistrySubkeyIter.

[in][transfer none]
-
-

Since: 2.46

-
-
-
-

g_win32_registry_subkey_iter_n_subkeys ()

-
gsize
-g_win32_registry_subkey_iter_n_subkeys
-                               (GWin32RegistrySubkeyIter *iter);
-

Queries the number of subkeys items in the key that we are -iterating over. This is the total number of subkeys -- not the number -of items remaining.

-

This information is accurate at the point of iterator initialization, -and may go out of sync with reality even while subkeys are enumerated.

-
-

Parameters

-
----- - - - - - -

iter

a GWin32RegistrySubkeyIter.

[in][transfer none]
-
-
-

Returns

-

the number of subkeys in the key

-
-

Since: 2.46

-
-
-
-

g_win32_registry_subkey_iter_next ()

-
gboolean
-g_win32_registry_subkey_iter_next (GWin32RegistrySubkeyIter *iter,
-                                   gboolean skip_errors,
-                                   GError **error);
-

Moves iterator to the next subkey. -Enumeration errors can be ignored if skip_errors - is TRUE

-

Here is an example for iterating with g_win32_registry_subkey_iter_next():

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
// recursively iterate a key
-void
-iterate_key_recursive (GWin32RegistryKey *key)
-{
-  GWin32RegistrySubkeyIter iter;
-  gchar *name;
-  GWin32RegistryKey *child;
-
-  if (!g_win32_registry_subkey_iter_init (&iter, key, NULL))
-    return;
-
-  while (g_win32_registry_subkey_iter_next (&iter, TRUE, NULL))
-    {
-      if (!g_win32_registry_subkey_iter_get_name (&iter, &name, NULL, NULL))
-        continue;
-
-      g_print ("subkey '%s'\n", name);
-      child = g_win32_registry_key_get_child (key, name, NULL);
-
-      if (child)
-        iterate_key_recursive (child);
-    }
-
-  g_win32_registry_subkey_iter_clear (&iter);
-}
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

iter

a GWin32RegistrySubkeyIter.

[in][transfer none]

skip_errors

TRUE if iterator should silently ignore errors (such as -the actual number of subkeys being less than expected) and -proceed forward.

[in]

error

a pointer to NULL GError, or NULL.

[nullable]
-
-
-

Returns

-

TRUE if next subkey info was retrieved, FALSE otherwise.

-
-

Since: 2.46

-
-
-
-

g_win32_registry_subkey_iter_get_name ()

-
gboolean
-g_win32_registry_subkey_iter_get_name (GWin32RegistrySubkeyIter *iter,
-                                       gchar **subkey_name,
-                                       gsize *subkey_name_len,
-                                       GError **error);
-

Gets the name of the subkey at the iter - potision.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

iter

a GWin32RegistrySubkeyIter.

[in][transfer none]

subkey_name

Pointer to a location -to store the name of a subkey (in UTF-8). Free with g_free().

[out callee-allocates][transfer none]

subkey_name_len

Pointer to a location to store the -length of subkey_name -, in gchars, excluding NUL-terminator. -NULL if length is not needed.

[out][optional]

error

a pointer to NULL GError, or NULL.

[nullable]
-
-
-

Returns

-

TRUE if the name was retrieved, FALSE otherwise.

-
-

Since: 2.46

-
-
-
-

g_win32_registry_subkey_iter_get_name_w ()

-
gboolean
-g_win32_registry_subkey_iter_get_name_w
-                               (GWin32RegistrySubkeyIter *iter,
-                                gunichar2 **subkey_name,
-                                gsize *subkey_name_len,
-                                GError **error);
-

Same as g_win32_registry_subkey_iter_get_next(), but outputs UTF-16-encoded -data, without converting it to UTF-8 first.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

iter

a GWin32RegistrySubkeyIter.

[in][transfer none]

subkey_name

Pointer to a location -to store the name of a subkey (in UTF-16).

[out callee-allocates][transfer none]

subkey_name_len

Pointer to a location -to store the length of subkey_name -, in gunichar2s, excluding -NUL-terminator. -NULL if length is not needed.

[out][optional][transfer none]

error

a pointer to NULL GError, or NULL.

[nullable]
-
-
-

Returns

-

TRUE if the name was retrieved, FALSE otherwise.

-
-

Since: 2.46

-
-
-
-

g_win32_registry_value_iter_init ()

-
gboolean
-g_win32_registry_value_iter_init (GWin32RegistryValueIter *iter,
-                                  GWin32RegistryKey *key,
-                                  GError **error);
-

Initialises (without allocating) a GWin32RegistryValueIter. iter - may be -completely uninitialised prior to this call; its old value is -ignored.

-

The iterator remains valid for as long as key - exists. -Clean up its internal buffers with a call to -g_win32_registry_value_iter_clear() when done.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

iter

a pointer to a GWin32RegistryValueIter.

[in][transfer none]

key

a GWin32RegistryKey to iterate over.

[in][transfer none]

error

a pointer to NULL GError, or NULL.

[nullable]
-
-
-

Returns

-

TRUE if iterator was initialized successfully, FALSE on error.

-
-

Since: 2.46

-
-
-
-

g_win32_registry_value_iter_clear ()

-
void
-g_win32_registry_value_iter_clear (GWin32RegistryValueIter *iter);
-

Frees internal buffers of a GWin32RegistryValueIter.

-
-

Parameters

-
----- - - - - - -

iter

a GWin32RegistryValueIter.

[in][transfer none]
-
-

Since: 2.46

-
-
-
-

g_win32_registry_value_iter_n_values ()

-
gsize
-g_win32_registry_value_iter_n_values (GWin32RegistryValueIter *iter);
-

Queries the number of values items in the key that we are -iterating over. This is the total number of values -- not the number -of items remaining.

-

This information is accurate at the point of iterator initialization, -and may go out of sync with reality even while values are enumerated.

-
-

Parameters

-
----- - - - - - -

iter

a GWin32RegistryValueIter.

[in][transfer none]
-
-
-

Returns

-

the number of values in the key

-
-

Since: 2.46

-
-
-
-

g_win32_registry_value_iter_next ()

-
gboolean
-g_win32_registry_value_iter_next (GWin32RegistryValueIter *iter,
-                                  gboolean skip_errors,
-                                  GError **error);
-

Advances iterator to the next value in the key. If no more values remain then -FALSE is returned. -Enumeration errors can be ignored if skip_errors - is TRUE

-

Here is an example for iterating with g_win32_registry_value_iter_next():

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
// iterate values of a key
-void
-iterate_values_recursive (GWin32RegistryKey *key)
-{
-  GWin32RegistryValueIter iter;
-  gchar *name;
-  GWin32RegistryValueType val_type;
-  gchar *val_data;
-
-  if (!g_win32_registry_value_iter_init (&iter, key, NULL))
-    return;
-
-  while (g_win32_registry_value_iter_next (&iter, TRUE, NULL))
-    {
-      if ((!g_win32_registry_value_iter_get_value_type (&iter, &value)) ||
-          ((val_type != G_WIN32_REGISTRY_VALUE_STR) &&
-           (val_type != G_WIN32_REGISTRY_VALUE_EXPAND_STR)))
-        continue;
-
-      if (g_win32_registry_value_iter_get_value (&iter, TRUE, &name, NULL,
-                                                 &val_data, NULL, NULL))
-        g_print ("value '%s' = '%s'\n", name, val_data);
-    }
-
-  g_win32_registry_value_iter_clear (&iter);
-}
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

iter

a GWin32RegistryValueIter.

[in][transfer none]

skip_errors

TRUE if iterator should silently ignore errors (such as -the actual number of values being less than expected) and -proceed forward.

[in]

error

a pointer to NULL GError, or NULL.

[nullable]
-
-
-

Returns

-

TRUE if next value info was retrieved, FALSE otherwise.

-
-

Since: 2.46

-
-
-
-

g_win32_registry_value_iter_get_value_type ()

-
gboolean
-g_win32_registry_value_iter_get_value_type
-                               (GWin32RegistryValueIter *iter,
-                                GWin32RegistryValueType *value_type,
-                                GError **error);
-

Stores the type of the value currently being iterated over in value_type -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

iter

a GWin32RegistryValueIter.

[in][transfer none]

value_type

Pointer to a location to store the type of -the value.

[out]

error

a pointer to NULL GError, or NULL.

[nullable]
-
-
-

Returns

-

TRUE if value type was retrieved, FALSE otherwise.

-
-

Since: 2.46

-
-
-
-

g_win32_registry_value_iter_get_name ()

-
gboolean
-g_win32_registry_value_iter_get_name (GWin32RegistryValueIter *iter,
-                                      gchar **value_name,
-                                      gsize *value_name_len,
-                                      GError **error);
-

Stores the name of the value currently being iterated over in value_name -, -and its length - in value_name_len - (if not NULL).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

iter

a GWin32RegistryValueIter.

[in][transfer none]

value_name

Pointer to a location -to store the name of a value (in UTF-8).

[out callee-allocates][transfer none]

value_name_len

Pointer to a location to store the length -of value_name -, in gchars, excluding NUL-terminator. -NULL if length is not needed.

[out][optional]

error

a pointer to NULL GError, or NULL.

[nullable]
-
-
-

Returns

-

TRUE if value name was retrieved, FALSE otherwise.

-
-

Since: 2.46

-
-
-
-

g_win32_registry_value_iter_get_name_w ()

-
gboolean
-g_win32_registry_value_iter_get_name_w
-                               (GWin32RegistryValueIter *iter,
-                                gunichar2 **value_name,
-                                gsize *value_name_len,
-                                GError **error);
-

Stores the name of the value currently being iterated over in value_name -, -and its length - in value_name - (if not NULL).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

iter

a GWin32RegistryValueIter.

[in][transfer none]

value_name

Pointer to a location -to store the name of a value (in UTF-16).

[out callee-allocates][transfer none]

value_name_len

Pointer to a location to store the length -of value_name -, in gunichar2s, excluding NUL-terminator. -NULL if length is not needed.

[out][optional]

error

a pointer to NULL GError, or NULL.

[nullable]
-
-
-

Returns

-

TRUE if value name was retrieved, FALSE otherwise.

-
-

Since: 2.46

-
-
-
-

g_win32_registry_value_iter_get_data ()

-
gboolean
-g_win32_registry_value_iter_get_data (GWin32RegistryValueIter *iter,
-                                      gboolean auto_expand,
-                                      gpointer *value_data,
-                                      gsize *value_data_size,
-                                      GError **error);
-

Stores the data of the value currently being iterated over in value_data -, -and its length - in value_data_len - (if not NULL).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

iter

a GWin32RegistryValueIter.

[in][transfer none]

auto_expand

TRUE to automatically expand G_WIN32_REGISTRY_VALUE_EXPAND_STR to -G_WIN32_REGISTRY_VALUE_STR.

[in]

value_data

Pointer to a -location to store the data of the value (in UTF-8, if it's a string).

[out callee-allocates][optional][transfer none]

value_data_size

Pointer to a location to store the length -of value_data -, in bytes (including any NUL-terminators, if it's a string). -NULL if length is not needed.

[out][optional]

error

a pointer to NULL GError, or NULL.

[nullable]
-
-
-

Returns

-

TRUE if value data was retrieved, FALSE otherwise.

-
-

Since: 2.46

-
-
-
-

g_win32_registry_value_iter_get_data_w ()

-
gboolean
-g_win32_registry_value_iter_get_data_w
-                               (GWin32RegistryValueIter *iter,
-                                gboolean auto_expand,
-                                gpointer *value_data,
-                                gsize *value_data_size,
-                                GError **error);
-

Stores the data of the value currently being iterated over in value_data -, -and its length - in value_data_len - (if not NULL).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

iter

a GWin32RegistryValueIter.

[in][transfer none]

auto_expand

TRUE to automatically expand G_WIN32_REGISTRY_VALUE_EXPAND_STR to -G_WIN32_REGISTRY_VALUE_STR.

[in]

value_data

Pointer to a -location to store the data of the value (in UTF-16, if it's a string).

[out callee-allocates][optional][transfer none]

value_data_size

Pointer to a location to store the size -of value_data -, in bytes (including any NUL-terminators, if it's a string). -NULL if length is not needed.

[out][optional]

error

a pointer to NULL GError, or NULL.

[nullable]
-
-
-

Returns

-

TRUE if value data was retrieved, FALSE otherwise.

-
-

Since: 2.46

-
-
-
-

g_win32_registry_key_get_value ()

-
gboolean
-g_win32_registry_key_get_value (GWin32RegistryKey *key,
-                                gboolean auto_expand,
-                                const gchar *value_name,
-                                GWin32RegistryValueType *value_type,
-                                gpointer *value_data,
-                                gsize *value_data_size,
-                                GError **error);
-

Get data from a value of a key. String data is guaranteed to be -appropriately terminated and will be in UTF-8.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key

a GWin32RegistryKey.

[in][transfer none]

auto_expand

(in) TRUE to automatically expand G_WIN32_REGISTRY_VALUE_EXPAND_STR -to G_WIN32_REGISTRY_VALUE_STR.

 

value_name

name of the value to get (in UTF-8). -Empty string means the '(Default)' value.

[in][transfer none]

value_type

type of the value retrieved.

[out][optional]

value_data

contents of the value.

[out callee-allocates][optional]

value_data_size

size of the buffer pointed -by value_data -.

[out][optional]

error

a pointer to NULL GError, or NULL.

[nullable]
-
-
-

Returns

-

TRUE on success, FALSE on failure.

-
-

Since: 2.46

-
-
-
-

g_win32_registry_key_get_value_w ()

-
gboolean
-g_win32_registry_key_get_value_w (GWin32RegistryKey *key,
-                                  gboolean auto_expand,
-                                  const gunichar2 *value_name,
-                                  GWin32RegistryValueType *value_type,
-                                  gpointer *value_data,
-                                  gsize *value_data_size,
-                                  GError **error);
-

Get data from a value of a key.

-

Get data from a value of a key. String data is guaranteed to be -appropriately terminated and will be in UTF-16.

-

When calling with value_data == NULL (to get data size without getting -the data itself) remember that returned size corresponds to possibly -unterminated string data (if value is some kind of string), because -termination cannot be checked and fixed unless the data is retreived -too.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key

a GWin32RegistryKey.

[in][transfer none]

auto_expand

(in) TRUE to automatically expand G_WIN32_REGISTRY_VALUE_EXPAND_STR -to G_WIN32_REGISTRY_VALUE_STR.

 

value_name

name of the value to get (in UTF-16). -Empty string means the '(Default)' value.

[in][transfer none]

value_type

type of the value retrieved.

[out][optional]

value_data

contents of the value.

[out callee-allocates][optional]

value_data_size

size of the buffer pointed -by value_data -.

[out][optional]

error

a pointer to NULL GError, or NULL.

[nullable]
-
-
-

Returns

-

TRUE on success, FALSE on failure.

-
-

Since: 2.46

-
-
-
-

g_win32_registry_key_get_path ()

-
const gchar *
-g_win32_registry_key_get_path (GWin32RegistryKey *key);
-

Get full path to the key

-
-

Parameters

-
----- - - - - - -

key

a GWin32RegistryKey.

[in][transfer none]
-
-
-

Returns

-

a full path to the key (in UTF-8), -or NULL if it can't be converted to UTF-8.

-

[transfer none]

-
-

Since: 2.46

-
-
-
-

g_win32_registry_key_get_path_w ()

-
const gunichar2 *
-g_win32_registry_key_get_path_w (GWin32RegistryKey *key);
-

Get full path to the key

-
-

Parameters

-
----- - - - - - -

key

a GWin32RegistryKey.

[in][transfer none]
-
-
-

Returns

-

a full path to the key (in UTF-16).

-

[transfer none]

-
-

Since: 2.46

-
-
-
-

GWin32RegistryKeyWatchCallbackFunc ()

-
void
-(*GWin32RegistryKeyWatchCallbackFunc) (GWin32RegistryKey *key,
-                                       gpointer user_data);
-

The type of the callback passed to g_win32_registry_key_watch().

-

The callback is invoked after a change matching the watch flags and arguments -occurs. If the children of the key were watched also, there is no way to know -which one of them triggered the callback.

-
-

Parameters

-
----- - - - - - - - - - - - - -

key

A GWin32RegistryKey that was watched.

 

user_data

The user_data -gpointer passed to g_win32_registry_key_watch().

 
-
-

Since: 2.42

-
-
-
-

g_win32_registry_key_watch ()

-
gboolean
-g_win32_registry_key_watch (GWin32RegistryKey *key,
-                            gboolean watch_children,
-                            GWin32RegistryKeyWatcherFlags watch_flags,
-                            GWin32RegistryKeyWatchCallbackFunc callback,
-                            gpointer user_data,
-                            GError **error);
-

Puts key - under a watch.

-

When the key changes, an APC will be queued in the current thread. The APC -will run when the current thread enters alertable state (GLib main loop -should do that; if you are not using it, see MSDN documentation for W32API -calls that put thread into alertable state). When it runs, it will -atomically switch an indicator in the key -. If a callback was specified, -it is invoked at that point. Subsequent calls to -g_win32_registry_key_has_changed() will return TRUE, and the callback (if -it was specified) will not be invoked anymore. -Calling g_win32_registry_key_erase_change_indicator() will reset the indicator, -and g_win32_registry_key_has_changed() will start returning FALSE. -To resume the watch, call g_win32_registry_key_watch_for_changes() again.

-

Calling g_win32_registry_key_watch_for_changes() for a key that is already -being watched is allowed and affects nothing.

-

The fact that the key is being watched will be used internally to update -key path (if it changes).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key

a GWin32RegistryKey.

[in][transfer none]

watch_children

(in) TRUE also watch the children of the key -, FALSE -to watch the key only.

 

watch_flags

specifies the types of changes to watch for.

[in]

callback

a function to invoke when a change occurs.

[in][nullable]

user_data

a pointer to pass to callback -on invocation.

[in][nullable]

error

a pointer to NULL GError, or NULL.

[nullable]
-
-
-

Returns

-

TRUE on success, FALSE on failure.

-
-

Since: 2.46

-
-
-
-

g_win32_registry_key_has_changed ()

-
gboolean
-g_win32_registry_key_has_changed (GWin32RegistryKey *key);
-

Check the key -'s status indicator.

-
-

Parameters

-
----- - - - - - -

key

a GWin32RegistryKey.

[in][transfer none]
-
-
-

Returns

-

TRUE if the key -was put under watch at some point and has changed -since then, FALSE if it either wasn't changed or wasn't watched at all.

-
-

Since: 2.46

-
-
-
-

g_win32_registry_key_erase_change_indicator ()

-
void
-g_win32_registry_key_erase_change_indicator
-                               (GWin32RegistryKey *key);
-

Erases change indicator of the key -.

-

Subsequent calls to g_win32_registry_key_has_changed() will return FALSE -until the key is put on watch again by calling -g_win32_registry_key_watch() again.

-
-

Parameters

-
----- - - - - - -

key

a GWin32RegistryKey.

[in][transfer none]
-
-

Since: 2.46

-
-
-
-

Types and Values

-
-

struct GWin32RegistrySubkeyIter

-
struct GWin32RegistrySubkeyIter {
-};
-
-
-
-
-

struct GWin32RegistryValueIter

-
struct GWin32RegistryValueIter {
-};
-
-
-
-
-

struct GWin32RegistryKey

-
struct GWin32RegistryKey {
-  GObject parent_instance;
-};
-
-
-
-
-

enum GWin32RegistryValueType

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_WIN32_REGISTRY_VALUE_NONE

  

G_WIN32_REGISTRY_VALUE_BINARY

  

G_WIN32_REGISTRY_VALUE_UINT32LE

  

G_WIN32_REGISTRY_VALUE_UINT32BE

  

G_WIN32_REGISTRY_VALUE_UINT32

  

G_WIN32_REGISTRY_VALUE_UINT32

  

G_WIN32_REGISTRY_VALUE_EXPAND_STR

  

G_WIN32_REGISTRY_VALUE_LINK

  

G_WIN32_REGISTRY_VALUE_MULTI_STR

  

G_WIN32_REGISTRY_VALUE_UINT64LE

  

G_WIN32_REGISTRY_VALUE_UINT64

  

G_WIN32_REGISTRY_VALUE_STR

  
-
-
-
-
-

enum GWin32RegistryKeyWatcherFlags

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_WIN32_REGISTRY_WATCH_NAME

  

G_WIN32_REGISTRY_WATCH_ATTRIBUTES

  

G_WIN32_REGISTRY_WATCH_VALUES

  

G_WIN32_REGISTRY_WATCH_SECURITY

  
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-Owning-Bus-Names.html b/docs/reference/gio/html/gio-Owning-Bus-Names.html deleted file mode 100644 index 079e844cd..000000000 --- a/docs/reference/gio/html/gio-Owning-Bus-Names.html +++ /dev/null @@ -1,653 +0,0 @@ - - - - -Owning Bus Names: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Owning Bus Names

-

Owning Bus Names — Simple API for owning bus names

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -(*GBusAcquiredCallback) () -
-void - -(*GBusNameAcquiredCallback) () -
-void - -(*GBusNameLostCallback) () -
-guint - -g_bus_own_name () -
-guint - -g_bus_own_name_on_connection () -
-void - -g_bus_unown_name () -
-guint - -g_bus_own_name_with_closures () -
-guint - -g_bus_own_name_on_connection_with_closures () -
-
-
-

Types and Values

-
---- - - - - -
enumGBusNameOwnerFlags
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Convenience API for owning bus names.

-

A simple example for owning a name can be found in -gdbus-example-own-name.c

-
-
-

Functions

-
-

GBusAcquiredCallback ()

-
void
-(*GBusAcquiredCallback) (GDBusConnection *connection,
-                         const gchar *name,
-                         gpointer user_data);
-

Invoked when a connection to a message bus has been obtained.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

The GDBusConnection to a message bus.

 

name

The name that is requested to be owned.

 

user_data

User data passed to g_bus_own_name().

 
-
-

Since: 2.26

-
-
-
-

GBusNameAcquiredCallback ()

-
void
-(*GBusNameAcquiredCallback) (GDBusConnection *connection,
-                             const gchar *name,
-                             gpointer user_data);
-

Invoked when the name is acquired.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

The GDBusConnection on which to acquired the name.

 

name

The name being owned.

 

user_data

User data passed to g_bus_own_name() or g_bus_own_name_on_connection().

 
-
-

Since: 2.26

-
-
-
-

GBusNameLostCallback ()

-
void
-(*GBusNameLostCallback) (GDBusConnection *connection,
-                         const gchar *name,
-                         gpointer user_data);
-

Invoked when the name is lost or connection - has been closed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

The GDBusConnection on which to acquire the name or NULL if -the connection was disconnected.

 

name

The name being owned.

 

user_data

User data passed to g_bus_own_name() or g_bus_own_name_on_connection().

 
-
-

Since: 2.26

-
-
-
-

g_bus_own_name ()

-
guint
-g_bus_own_name (GBusType bus_type,
-                const gchar *name,
-                GBusNameOwnerFlags flags,
-                GBusAcquiredCallback bus_acquired_handler,
-                GBusNameAcquiredCallback name_acquired_handler,
-                GBusNameLostCallback name_lost_handler,
-                gpointer user_data,
-                GDestroyNotify user_data_free_func);
-

Starts acquiring name - on the bus specified by bus_type - and calls -name_acquired_handler - and name_lost_handler - when the name is -acquired respectively lost. Callbacks will be invoked in the -thread-default main context -of the thread you are calling this function from.

-

You are guaranteed that one of the name_acquired_handler - and name_lost_handler - -callbacks will be invoked after calling this function - there are three -possible cases:

-
    -
  • name_lost_handler - with a NULL connection (if a connection to the bus -can't be made).

  • -
  • bus_acquired_handler - then name_lost_handler - (if the name can't be -obtained)

  • -
  • bus_acquired_handler - then name_acquired_handler - (if the name was -obtained).

  • -
-

When you are done owning the name, just call g_bus_unown_name() -with the owner id this function returns.

-

If the name is acquired or lost (for example another application -could acquire the name if you allow replacement or the application -currently owning the name exits), the handlers are also invoked. -If the GDBusConnection that is used for attempting to own the name -closes, then name_lost_handler - is invoked since it is no longer -possible for other processes to access the process.

-

You cannot use g_bus_own_name() several times for the same name (unless -interleaved with calls to g_bus_unown_name()) - only the first call -will work.

-

Another guarantee is that invocations of name_acquired_handler - -and name_lost_handler - are guaranteed to alternate; that -is, if name_acquired_handler - is invoked then you are -guaranteed that the next time one of the handlers is invoked, it -will be name_lost_handler -. The reverse is also true.

-

If you plan on exporting objects (using e.g. -g_dbus_connection_register_object()), note that it is generally too late -to export the objects in name_acquired_handler -. Instead, you can do this -in bus_acquired_handler - since you are guaranteed that this will run -before name - is requested from the bus.

-

This behavior makes it very simple to write applications that wants -to own names and export objects. -Simply register objects to be exported in bus_acquired_handler - and -unregister the objects (if any) in name_lost_handler -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

bus_type

the type of bus to own a name on

 

name

the well-known name to own

 

flags

a set of flags from the GBusNameOwnerFlags enumeration

 

bus_acquired_handler

handler to invoke when connected to the bus of type bus_type -or NULL.

[nullable]

name_acquired_handler

handler to invoke when name -is acquired or NULL.

[nullable]

name_lost_handler

handler to invoke when name -is lost or NULL.

[nullable]

user_data

user data to pass to handlers

 

user_data_free_func

function for freeing user_data -or NULL.

[nullable]
-
-
-

Returns

-

an identifier (never 0) that an be used with -g_bus_unown_name() to stop owning the name.

-
-

Since: 2.26

-
-
-
-

g_bus_own_name_on_connection ()

-
guint
-g_bus_own_name_on_connection (GDBusConnection *connection,
-                              const gchar *name,
-                              GBusNameOwnerFlags flags,
-                              GBusNameAcquiredCallback name_acquired_handler,
-                              GBusNameLostCallback name_lost_handler,
-                              gpointer user_data,
-                              GDestroyNotify user_data_free_func);
-

Like g_bus_own_name() but takes a GDBusConnection instead of a -GBusType.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

name

the well-known name to own

 

flags

a set of flags from the GBusNameOwnerFlags enumeration

 

name_acquired_handler

handler to invoke when name -is acquired or NULL.

[nullable]

name_lost_handler

handler to invoke when name -is lost or NULL.

[nullable]

user_data

user data to pass to handlers

 

user_data_free_func

function for freeing user_data -or NULL.

[nullable]
-
-
-

Returns

-

an identifier (never 0) that an be used with -g_bus_unown_name() to stop owning the name

-
-

Since: 2.26

-
-
-
-

g_bus_unown_name ()

-
void
-g_bus_unown_name (guint owner_id);
-

Stops owning a name.

-
-

Parameters

-
----- - - - - - -

owner_id

an identifier obtained from g_bus_own_name()

 
-
-

Since: 2.26

-
-
-
-

g_bus_own_name_with_closures ()

-
guint
-g_bus_own_name_with_closures (GBusType bus_type,
-                              const gchar *name,
-                              GBusNameOwnerFlags flags,
-                              GClosure *bus_acquired_closure,
-                              GClosure *name_acquired_closure,
-                              GClosure *name_lost_closure);
-

Version of g_bus_own_name() using closures instead of callbacks for -easier binding in other languages.

-

[rename-to g_bus_own_name]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

bus_type

the type of bus to own a name on

 

name

the well-known name to own

 

flags

a set of flags from the GBusNameOwnerFlags enumeration

 

bus_acquired_closure

GClosure to invoke when connected to -the bus of type bus_type -or NULL.

[nullable]

name_acquired_closure

GClosure to invoke when name -is -acquired or NULL.

[nullable]

name_lost_closure

GClosure to invoke when name -is lost or -NULL.

[nullable]
-
-
-

Returns

-

an identifier (never 0) that an be used with -g_bus_unown_name() to stop owning the name.

-
-

Since: 2.26

-
-
-
-

g_bus_own_name_on_connection_with_closures ()

-
guint
-g_bus_own_name_on_connection_with_closures
-                               (GDBusConnection *connection,
-                                const gchar *name,
-                                GBusNameOwnerFlags flags,
-                                GClosure *name_acquired_closure,
-                                GClosure *name_lost_closure);
-

Version of g_bus_own_name_on_connection() using closures instead of -callbacks for easier binding in other languages.

-

[rename-to g_bus_own_name_on_connection]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

a GDBusConnection

 

name

the well-known name to own

 

flags

a set of flags from the GBusNameOwnerFlags enumeration

 

name_acquired_closure

GClosure to invoke when name -is -acquired or NULL.

[nullable]

name_lost_closure

GClosure to invoke when name -is lost -or NULL.

[nullable]
-
-
-

Returns

-

an identifier (never 0) that an be used with -g_bus_unown_name() to stop owning the name.

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

enum GBusNameOwnerFlags

-

Flags used in g_bus_own_name().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_BUS_NAME_OWNER_FLAGS_NONE

-

No flags set.

-
 

G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT

-

Allow another message bus connection to claim the name.

-
 

G_BUS_NAME_OWNER_FLAGS_REPLACE

-

If another message bus connection owns the name and have -specified G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection.

-
 
-
-

Since: 2.26

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-TLS-Overview.html b/docs/reference/gio/html/gio-TLS-Overview.html deleted file mode 100644 index 6774282d5..000000000 --- a/docs/reference/gio/html/gio-TLS-Overview.html +++ /dev/null @@ -1,310 +0,0 @@ - - - - -TLS Overview: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

TLS Overview

-

TLS Overview — TLS (aka SSL) support for GSocketConnection

-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
#defineG_TLS_ERROR
enumGTlsError
enumGTlsAuthenticationMode
enumGTlsCertificateFlags
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

GTlsConnection and related classes provide TLS (Transport Layer -Security, previously known as SSL, Secure Sockets Layer) support for -gio-based network streams.

-

GDtlsConnection and related classes provide DTLS (Datagram TLS) support for -GIO-based network sockets, using the GDatagramBased interface. The TLS and -DTLS APIs are almost identical, except TLS is stream-based and DTLS is -datagram-based. They share certificate and backend infrastructure.

-

In the simplest case, for a client TLS connection, you can just set the -“tls” flag on a GSocketClient, and then any -connections created by that client will have TLS negotiated -automatically, using appropriate default settings, and rejecting -any invalid or self-signed certificates (unless you change that -default by setting the “tls-validation-flags” -property). The returned object will be a GTcpWrapperConnection, -which wraps the underlying GTlsClientConnection.

-

For greater control, you can create your own GTlsClientConnection, -wrapping a GSocketConnection (or an arbitrary GIOStream with -pollable input and output streams) and then connect to its signals, -such as “accept-certificate”, before starting the -handshake.

-

Server-side TLS is similar, using GTlsServerConnection. At the -moment, there is no support for automatically wrapping server-side -connections in the way GSocketClient does for client-side -connections.

-
-
-

Functions

-

-
-
-

Types and Values

-
-

G_TLS_ERROR

-
#define G_TLS_ERROR (g_tls_error_quark ())
-
-

Error domain for TLS. Errors in this domain will be from the -GTlsError enumeration. See GError for more information on error -domains.

-
-
-
-

enum GTlsError

-

An error code used with G_TLS_ERROR in a GError returned from a -TLS-related routine.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_TLS_ERROR_UNAVAILABLE

-

No TLS provider is available

-
 

G_TLS_ERROR_MISC

-

Miscellaneous TLS error

-
 

G_TLS_ERROR_BAD_CERTIFICATE

-

A certificate could not be parsed

-
 

G_TLS_ERROR_NOT_TLS

-

The TLS handshake failed because the - peer does not seem to be a TLS server.

-
 

G_TLS_ERROR_HANDSHAKE

-

The TLS handshake failed because the - peer's certificate was not acceptable.

-
 

G_TLS_ERROR_CERTIFICATE_REQUIRED

-

The TLS handshake failed because - the server requested a client-side certificate, but none was - provided. See g_tls_connection_set_certificate().

-
 

G_TLS_ERROR_EOF

-

The TLS connection was closed without proper - notice, which may indicate an attack. See - g_tls_connection_set_require_close_notify().

-
 
-
-

Since: 2.28

-
-
-
-

enum GTlsAuthenticationMode

-

The client authentication mode for a GTlsServerConnection.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_TLS_AUTHENTICATION_NONE

-

client authentication not required

-
 

G_TLS_AUTHENTICATION_REQUESTED

-

client authentication is requested

-
 

G_TLS_AUTHENTICATION_REQUIRED

-

client authentication is required

-
 
-
-

Since: 2.28

-
-
-
-

enum GTlsCertificateFlags

-

A set of flags describing TLS certification validation. This can be -used to set which validation steps to perform (eg, with -g_tls_client_connection_set_validation_flags()), or to describe why -a particular certificate was rejected (eg, in -“accept-certificate”).

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_TLS_CERTIFICATE_UNKNOWN_CA

-

The signing certificate authority is - not known.

-
 

G_TLS_CERTIFICATE_BAD_IDENTITY

-

The certificate does not match the - expected identity of the site that it was retrieved from.

-
 

G_TLS_CERTIFICATE_NOT_ACTIVATED

-

The certificate's activation time - is still in the future

-
 

G_TLS_CERTIFICATE_EXPIRED

-

The certificate has expired

-
 

G_TLS_CERTIFICATE_REVOKED

-

The certificate has been revoked - according to the GTlsConnection's certificate revocation list.

-
 

G_TLS_CERTIFICATE_INSECURE

-

The certificate's algorithm is - considered insecure.

-
 

G_TLS_CERTIFICATE_GENERIC_ERROR

-

Some other error occurred validating - the certificate

-
 

G_TLS_CERTIFICATE_VALIDATE_ALL

-

the combination of all of the above - flags

-
 
-
-

Since: 2.28

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-Unix-Mounts.html b/docs/reference/gio/html/gio-Unix-Mounts.html deleted file mode 100644 index 6b4ed6a59..000000000 --- a/docs/reference/gio/html/gio-Unix-Mounts.html +++ /dev/null @@ -1,1419 +0,0 @@ - - - - -Unix Mounts: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Unix Mounts

-

Unix Mounts — UNIX mounts

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -g_unix_mount_free () -
-gint - -g_unix_mount_compare () -
const char * - -g_unix_mount_get_mount_path () -
const char * - -g_unix_mount_get_device_path () -
const char * - -g_unix_mount_get_fs_type () -
-gboolean - -g_unix_mount_is_readonly () -
-gboolean - -g_unix_mount_is_system_internal () -
-GIcon * - -g_unix_mount_guess_icon () -
-GIcon * - -g_unix_mount_guess_symbolic_icon () -
-char * - -g_unix_mount_guess_name () -
-gboolean - -g_unix_mount_guess_can_eject () -
-gboolean - -g_unix_mount_guess_should_display () -
-void - -g_unix_mount_point_free () -
-gint - -g_unix_mount_point_compare () -
const char * - -g_unix_mount_point_get_mount_path () -
const char * - -g_unix_mount_point_get_device_path () -
const char * - -g_unix_mount_point_get_fs_type () -
const char * - -g_unix_mount_point_get_options () -
-gboolean - -g_unix_mount_point_is_readonly () -
-gboolean - -g_unix_mount_point_is_user_mountable () -
-gboolean - -g_unix_mount_point_is_loopback () -
-GIcon * - -g_unix_mount_point_guess_icon () -
-GIcon * - -g_unix_mount_point_guess_symbolic_icon () -
-char * - -g_unix_mount_point_guess_name () -
-gboolean - -g_unix_mount_point_guess_can_eject () -
-GList * - -g_unix_mount_points_get () -
-GList * - -g_unix_mounts_get () -
-GUnixMountEntry * - -g_unix_mount_at () -
-gboolean - -g_unix_mounts_changed_since () -
-gboolean - -g_unix_mount_points_changed_since () -
-GUnixMountMonitor * - -g_unix_mount_monitor_get () -
-GUnixMountMonitor * - -g_unix_mount_monitor_new () -
-void - -g_unix_mount_monitor_set_rate_limit () -
-gboolean - -g_unix_is_mount_path_system_internal () -
-
-
-

Signals

-
----- - - - - - - - - - - - - -
voidmountpoints-changedRun Last
voidmounts-changedRun Last
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
 GUnixMountPoint
 GUnixMountEntry
 GUnixMountMonitor
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GUnixMountMonitor
-
-
-
-

Includes

-
#include <gio/gunixmounts.h>
-
-
-
-

Description

-

Routines for managing mounted UNIX mount points and paths.

-

Note that <gio/gunixmounts.h> belongs to the UNIX-specific GIO -interfaces, thus you have to use the gio-unix-2.0.pc pkg-config -file when using it.

-
-
-

Functions

-
-

g_unix_mount_free ()

-
void
-g_unix_mount_free (GUnixMountEntry *mount_entry);
-

Frees a unix mount.

-
-

Parameters

-
----- - - - - - -

mount_entry

a GUnixMountEntry.

 
-
-
-
-
-

g_unix_mount_compare ()

-
gint
-g_unix_mount_compare (GUnixMountEntry *mount1,
-                      GUnixMountEntry *mount2);
-

Compares two unix mounts.

-
-

Parameters

-
----- - - - - - - - - - - - - -

mount1

first GUnixMountEntry to compare.

 

mount2

second GUnixMountEntry to compare.

 
-
-
-

Returns

-

1, 0 or -1 if mount1 -is greater than, equal to, -or less than mount2 -, respectively.

-
-
-
-
-

g_unix_mount_get_mount_path ()

-
const char *
-g_unix_mount_get_mount_path (GUnixMountEntry *mount_entry);
-

Gets the mount path for a unix mount.

-
-

Parameters

-
----- - - - - - -

mount_entry

input GUnixMountEntry to get the mount path for.

 
-
-
-

Returns

-

the mount path for mount_entry -.

-

[type filename]

-
-
-
-
-

g_unix_mount_get_device_path ()

-
const char *
-g_unix_mount_get_device_path (GUnixMountEntry *mount_entry);
-

Gets the device path for a unix mount.

-
-

Parameters

-
----- - - - - - -

mount_entry

a GUnixMount.

 
-
-
-

Returns

-

a string containing the device path.

-

[type filename]

-
-
-
-
-

g_unix_mount_get_fs_type ()

-
const char *
-g_unix_mount_get_fs_type (GUnixMountEntry *mount_entry);
-

Gets the filesystem type for the unix mount.

-
-

Parameters

-
----- - - - - - -

mount_entry

a GUnixMount.

 
-
-
-

Returns

-

a string containing the file system type.

-
-
-
-
-

g_unix_mount_is_readonly ()

-
gboolean
-g_unix_mount_is_readonly (GUnixMountEntry *mount_entry);
-

Checks if a unix mount is mounted read only.

-
-

Parameters

-
----- - - - - - -

mount_entry

a GUnixMount.

 
-
-
-

Returns

-

TRUE if mount_entry -is read only.

-
-
-
-
-

g_unix_mount_is_system_internal ()

-
gboolean
-g_unix_mount_is_system_internal (GUnixMountEntry *mount_entry);
-

Checks if a unix mount is a system path.

-
-

Parameters

-
----- - - - - - -

mount_entry

a GUnixMount.

 
-
-
-

Returns

-

TRUE if the unix mount is for a system path.

-
-
-
-
-

g_unix_mount_guess_icon ()

-
GIcon *
-g_unix_mount_guess_icon (GUnixMountEntry *mount_entry);
-

Guesses the icon of a Unix mount.

-
-

Parameters

-
----- - - - - - -

mount_entry

a GUnixMountEntry

 
-
-
-

Returns

-

a GIcon.

-

[transfer full]

-
-
-
-
-

g_unix_mount_guess_symbolic_icon ()

-
GIcon *
-g_unix_mount_guess_symbolic_icon (GUnixMountEntry *mount_entry);
-

Guesses the symbolic icon of a Unix mount.

-
-

Parameters

-
----- - - - - - -

mount_entry

a GUnixMountEntry

 
-
-
-

Returns

-

a GIcon.

-

[transfer full]

-
-

Since: 2.34

-
-
-
-

g_unix_mount_guess_name ()

-
char *
-g_unix_mount_guess_name (GUnixMountEntry *mount_entry);
-

Guesses the name of a Unix mount. -The result is a translated string.

-
-

Parameters

-
----- - - - - - -

mount_entry

a GUnixMountEntry

 
-
-
-

Returns

-

A newly allocated string that must -be freed with g_free()

-
-
-
-
-

g_unix_mount_guess_can_eject ()

-
gboolean
-g_unix_mount_guess_can_eject (GUnixMountEntry *mount_entry);
-

Guesses whether a Unix mount can be ejected.

-
-

Parameters

-
----- - - - - - -

mount_entry

a GUnixMountEntry

 
-
-
-

Returns

-

TRUE if mount_entry -is deemed to be ejectable.

-
-
-
-
-

g_unix_mount_guess_should_display ()

-
gboolean
-g_unix_mount_guess_should_display (GUnixMountEntry *mount_entry);
-

Guesses whether a Unix mount should be displayed in the UI.

-
-

Parameters

-
----- - - - - - -

mount_entry

a GUnixMountEntry

 
-
-
-

Returns

-

TRUE if mount_entry -is deemed to be displayable.

-
-
-
-
-

g_unix_mount_point_free ()

-
void
-g_unix_mount_point_free (GUnixMountPoint *mount_point);
-

Frees a unix mount point.

-
-

Parameters

-
----- - - - - - -

mount_point

unix mount point to free.

 
-
-
-
-
-

g_unix_mount_point_compare ()

-
gint
-g_unix_mount_point_compare (GUnixMountPoint *mount1,
-                            GUnixMountPoint *mount2);
-

Compares two unix mount points.

-
-

Parameters

-
----- - - - - - - - - - - - - -

mount1

a GUnixMount.

 

mount2

a GUnixMount.

 
-
-
-

Returns

-

1, 0 or -1 if mount1 -is greater than, equal to, -or less than mount2 -, respectively.

-
-
-
-
-

g_unix_mount_point_get_mount_path ()

-
const char *
-g_unix_mount_point_get_mount_path (GUnixMountPoint *mount_point);
-

Gets the mount path for a unix mount point.

-
-

Parameters

-
----- - - - - - -

mount_point

a GUnixMountPoint.

 
-
-
-

Returns

-

a string containing the mount path.

-

[type filename]

-
-
-
-
-

g_unix_mount_point_get_device_path ()

-
const char *
-g_unix_mount_point_get_device_path (GUnixMountPoint *mount_point);
-

Gets the device path for a unix mount point.

-
-

Parameters

-
----- - - - - - -

mount_point

a GUnixMountPoint.

 
-
-
-

Returns

-

a string containing the device path.

-

[type filename]

-
-
-
-
-

g_unix_mount_point_get_fs_type ()

-
const char *
-g_unix_mount_point_get_fs_type (GUnixMountPoint *mount_point);
-

Gets the file system type for the mount point.

-
-

Parameters

-
----- - - - - - -

mount_point

a GUnixMountPoint.

 
-
-
-

Returns

-

a string containing the file system type.

-
-
-
-
-

g_unix_mount_point_get_options ()

-
const char *
-g_unix_mount_point_get_options (GUnixMountPoint *mount_point);
-

Gets the options for the mount point.

-
-

Parameters

-
----- - - - - - -

mount_point

a GUnixMountPoint.

 
-
-
-

Returns

-

a string containing the options.

-
-

Since: 2.32

-
-
-
-

g_unix_mount_point_is_readonly ()

-
gboolean
-g_unix_mount_point_is_readonly (GUnixMountPoint *mount_point);
-

Checks if a unix mount point is read only.

-
-

Parameters

-
----- - - - - - -

mount_point

a GUnixMountPoint.

 
-
-
-

Returns

-

TRUE if a mount point is read only.

-
-
-
-
-

g_unix_mount_point_is_user_mountable ()

-
gboolean
-g_unix_mount_point_is_user_mountable (GUnixMountPoint *mount_point);
-

Checks if a unix mount point is mountable by the user.

-
-

Parameters

-
----- - - - - - -

mount_point

a GUnixMountPoint.

 
-
-
-

Returns

-

TRUE if the mount point is user mountable.

-
-
-
-
-

g_unix_mount_point_is_loopback ()

-
gboolean
-g_unix_mount_point_is_loopback (GUnixMountPoint *mount_point);
-

Checks if a unix mount point is a loopback device.

-
-

Parameters

-
----- - - - - - -

mount_point

a GUnixMountPoint.

 
-
-
-

Returns

-

TRUE if the mount point is a loopback. FALSE otherwise.

-
-
-
-
-

g_unix_mount_point_guess_icon ()

-
GIcon *
-g_unix_mount_point_guess_icon (GUnixMountPoint *mount_point);
-

Guesses the icon of a Unix mount point.

-
-

Parameters

-
----- - - - - - -

mount_point

a GUnixMountPoint

 
-
-
-

Returns

-

a GIcon.

-

[transfer full]

-
-
-
-
-

g_unix_mount_point_guess_symbolic_icon ()

-
GIcon *
-g_unix_mount_point_guess_symbolic_icon
-                               (GUnixMountPoint *mount_point);
-

Guesses the symbolic icon of a Unix mount point.

-
-

Parameters

-
----- - - - - - -

mount_point

a GUnixMountPoint

 
-
-
-

Returns

-

a GIcon.

-

[transfer full]

-
-

Since: 2.34

-
-
-
-

g_unix_mount_point_guess_name ()

-
char *
-g_unix_mount_point_guess_name (GUnixMountPoint *mount_point);
-

Guesses the name of a Unix mount point. -The result is a translated string.

-
-

Parameters

-
----- - - - - - -

mount_point

a GUnixMountPoint

 
-
-
-

Returns

-

A newly allocated string that must -be freed with g_free()

-
-
-
-
-

g_unix_mount_point_guess_can_eject ()

-
gboolean
-g_unix_mount_point_guess_can_eject (GUnixMountPoint *mount_point);
-

Guesses whether a Unix mount point can be ejected.

-
-

Parameters

-
----- - - - - - -

mount_point

a GUnixMountPoint

 
-
-
-

Returns

-

TRUE if mount_point -is deemed to be ejectable.

-
-
-
-
-

g_unix_mount_points_get ()

-
GList *
-g_unix_mount_points_get (guint64 *time_read);
-

Gets a GList of GUnixMountPoint containing the unix mount points. -If time_read - is set, it will be filled with the mount timestamp, -allowing for checking if the mounts have changed with -g_unix_mount_points_changed_since().

-

[skip]

-
-

Parameters

-
----- - - - - - -

time_read

guint64 to contain a timestamp.

[out][optional]
-
-
-

Returns

-

a GList of the UNIX mountpoints.

-

[element-type GUnixMountPoint][transfer full]

-
-
-
-
-

g_unix_mounts_get ()

-
GList *
-g_unix_mounts_get (guint64 *time_read);
-

Gets a GList of GUnixMountEntry containing the unix mounts. -If time_read - is set, it will be filled with the mount -timestamp, allowing for checking if the mounts have changed -with g_unix_mounts_changed_since().

-

[skip]

-
-

Parameters

-
----- - - - - - -

time_read

guint64 to contain a timestamp, or NULL.

[out][optional]
-
-
-

Returns

-

a GList of the UNIX mounts.

-

[element-type GUnixMountEntry][transfer full]

-
-
-
-
-

g_unix_mount_at ()

-
GUnixMountEntry *
-g_unix_mount_at (const char *mount_path,
-                 guint64 *time_read);
-

Gets a GUnixMountEntry for a given mount path. If time_read - -is set, it will be filled with a unix timestamp for checking -if the mounts have changed since with g_unix_mounts_changed_since().

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

mount_path

path for a possible unix mount.

 

time_read

guint64 to contain a timestamp.

[out][optional]
-
-
-

Returns

-

a GUnixMountEntry.

-

[transfer full]

-
-
-
-
-

g_unix_mounts_changed_since ()

-
gboolean
-g_unix_mounts_changed_since (guint64 time);
-

Checks if the unix mounts have changed since a given unix time.

-
-

Parameters

-
----- - - - - - -

time

guint64 to contain a timestamp.

 
-
-
-

Returns

-

TRUE if the mounts have changed since time -.

-
-
-
-
-

g_unix_mount_points_changed_since ()

-
gboolean
-g_unix_mount_points_changed_since (guint64 time);
-

Checks if the unix mount points have changed since a given unix time.

-
-

Parameters

-
----- - - - - - -

time

guint64 to contain a timestamp.

 
-
-
-

Returns

-

TRUE if the mount points have changed since time -.

-
-
-
-
-

g_unix_mount_monitor_get ()

-
GUnixMountMonitor *
-g_unix_mount_monitor_get (void);
-

Gets the GUnixMountMonitor for the current thread-default main -context.

-

The mount monitor can be used to monitor for changes to the list of -mounted filesystems as well as the list of mount points (ie: fstab -entries).

-

You must only call g_object_unref() on the return value from under -the same main context as you called this function.

-
-

Returns

-

the GUnixMountMonitor.

-

[transfer full]

-
-

Since: 2.44

-
-
-
-

g_unix_mount_monitor_new ()

-
GUnixMountMonitor *
-g_unix_mount_monitor_new (void);
-
-

g_unix_mount_monitor_new has been deprecated since version 2.44 and should not be used in newly-written code.

-

Use g_unix_mount_monitor_get() instead.

-
-

Deprecated alias for g_unix_mount_monitor_get().

-

This function was never a true constructor, which is why it was -renamed.

-
-

Returns

-

a GUnixMountMonitor.

-
-
-
-
-

g_unix_mount_monitor_set_rate_limit ()

-
void
-g_unix_mount_monitor_set_rate_limit (GUnixMountMonitor *mount_monitor,
-                                     int limit_msec);
-
-

g_unix_mount_monitor_set_rate_limit has been deprecated since version 2.44 and should not be used in newly-written code.

-

This function does nothing. Don't call it.

-
-

This function does nothing.

-

Before 2.44, this was a partially-effective way of controlling the -rate at which events would be reported under some uncommon -circumstances. Since mount_monitor - is a singleton, it also meant -that calling this function would have side effects for other users of -the monitor.

-
-

Parameters

-
----- - - - - - - - - - - - - -

mount_monitor

a GUnixMountMonitor

 

limit_msec

a integer with the limit in milliseconds to -poll for changes.

 
-
-

Since: 2.18

-
-
-
-

g_unix_is_mount_path_system_internal ()

-
gboolean
-g_unix_is_mount_path_system_internal (const char *mount_path);
-

Determines if mount_path - is considered an implementation of the -OS. This is primarily used for hiding mountable and mounted volumes -that only are used in the OS and has little to no relevance to the -casual user.

-
-

Parameters

-
----- - - - - - -

mount_path

a mount path, e.g. /media/disk or /usr.

[type filename]
-
-
-

Returns

-

TRUE if mount_path -is considered an implementation detail -of the OS.

-
-
-
-
-

Types and Values

-
-

GUnixMountPoint

-
typedef struct _GUnixMountPoint GUnixMountPoint;
-

Defines a Unix mount point (e.g. <filename>/dev</filename>). -This corresponds roughly to a fstab entry.

-
-
-
-

GUnixMountEntry

-
typedef struct _GUnixMountEntry GUnixMountEntry;
-

Defines a Unix mount entry (e.g. <filename>/media/cdrom</filename>). -This corresponds roughly to a mtab entry.

-
-
-
-

GUnixMountMonitor

-
typedef struct _GUnixMountMonitor GUnixMountMonitor;
-

Watches GUnixMounts for changes.

-
-
-
-

Signal Details

-
-

The “mountpoints-changed” signal

-
void
-user_function (GUnixMountMonitor *monitor,
-               gpointer           user_data)
-

Emitted when the unix mount points have changed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

monitor

the object on which the signal is emitted

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
-

The “mounts-changed” signal

-
void
-user_function (GUnixMountMonitor *monitor,
-               gpointer           user_data)
-

Emitted when the unix mounts have changed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

monitor

the object on which the signal is emitted

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: Run Last

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-Watching-Bus-Names.html b/docs/reference/gio/html/gio-Watching-Bus-Names.html deleted file mode 100644 index c81eb1b8a..000000000 --- a/docs/reference/gio/html/gio-Watching-Bus-Names.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - -Watching Bus Names: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Watching Bus Names

-

Watching Bus Names — Simple API for watching bus names

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -(*GBusNameAppearedCallback) () -
-void - -(*GBusNameVanishedCallback) () -
-guint - -g_bus_watch_name () -
-guint - -g_bus_watch_name_on_connection () -
-void - -g_bus_unwatch_name () -
-guint - -g_bus_watch_name_with_closures () -
-guint - -g_bus_watch_name_on_connection_with_closures () -
-
-
-

Types and Values

-
---- - - - - -
enumGBusNameWatcherFlags
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Convenience API for watching bus names.

-

A simple example for watching a name can be found in -gdbus-example-watch-name.c

-
-
-

Functions

-
-

GBusNameAppearedCallback ()

-
void
-(*GBusNameAppearedCallback) (GDBusConnection *connection,
-                             const gchar *name,
-                             const gchar *name_owner,
-                             gpointer user_data);
-

Invoked when the name being watched is known to have to have a owner.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

connection

The GDBusConnection the name is being watched on.

 

name

The name being watched.

 

name_owner

Unique name of the owner of the name being watched.

 

user_data

User data passed to g_bus_watch_name().

 
-
-

Since: 2.26

-
-
-
-

GBusNameVanishedCallback ()

-
void
-(*GBusNameVanishedCallback) (GDBusConnection *connection,
-                             const gchar *name,
-                             gpointer user_data);
-

Invoked when the name being watched is known not to have to have a owner.

-

This is also invoked when the GDBusConection on which the watch was -established has been closed. In that case, connection - will be -NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

connection

The GDBusConnection the name is being watched on, or -NULL.

 

name

The name being watched.

 

user_data

User data passed to g_bus_watch_name().

 
-
-

Since: 2.26

-
-
-
-

g_bus_watch_name ()

-
guint
-g_bus_watch_name (GBusType bus_type,
-                  const gchar *name,
-                  GBusNameWatcherFlags flags,
-                  GBusNameAppearedCallback name_appeared_handler,
-                  GBusNameVanishedCallback name_vanished_handler,
-                  gpointer user_data,
-                  GDestroyNotify user_data_free_func);
-

Starts watching name - on the bus specified by bus_type - and calls -name_appeared_handler - and name_vanished_handler - when the name is -known to have a owner respectively known to lose its -owner. Callbacks will be invoked in the -thread-default main context -of the thread you are calling this function from.

-

You are guaranteed that one of the handlers will be invoked after -calling this function. When you are done watching the name, just -call g_bus_unwatch_name() with the watcher id this function -returns.

-

If the name vanishes or appears (for example the application owning -the name could restart), the handlers are also invoked. If the -GDBusConnection that is used for watching the name disconnects, then -name_vanished_handler - is invoked since it is no longer -possible to access the name.

-

Another guarantee is that invocations of name_appeared_handler - -and name_vanished_handler - are guaranteed to alternate; that -is, if name_appeared_handler - is invoked then you are -guaranteed that the next time one of the handlers is invoked, it -will be name_vanished_handler -. The reverse is also true.

-

This behavior makes it very simple to write applications that want -to take action when a certain name exists. -Basically, the application should create object proxies in -name_appeared_handler - and destroy them again (if any) in -name_vanished_handler -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

bus_type

The type of bus to watch a name on.

 

name

The name (well-known or unique) to watch.

 

flags

Flags from the GBusNameWatcherFlags enumeration.

 

name_appeared_handler

Handler to invoke when name -is known to exist or NULL.

[nullable]

name_vanished_handler

Handler to invoke when name -is known to not exist or NULL.

[nullable]

user_data

User data to pass to handlers.

 

user_data_free_func

Function for freeing user_data -or NULL.

[nullable]
-
-
-

Returns

-

An identifier (never 0) that an be used with -g_bus_unwatch_name() to stop watching the name.

-
-

Since: 2.26

-
-
-
-

g_bus_watch_name_on_connection ()

-
guint
-g_bus_watch_name_on_connection (GDBusConnection *connection,
-                                const gchar *name,
-                                GBusNameWatcherFlags flags,
-                                GBusNameAppearedCallback name_appeared_handler,
-                                GBusNameVanishedCallback name_vanished_handler,
-                                gpointer user_data,
-                                GDestroyNotify user_data_free_func);
-

Like g_bus_watch_name() but takes a GDBusConnection instead of a -GBusType.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

A GDBusConnection.

 

name

The name (well-known or unique) to watch.

 

flags

Flags from the GBusNameWatcherFlags enumeration.

 

name_appeared_handler

Handler to invoke when name -is known to exist or NULL.

[nullable]

name_vanished_handler

Handler to invoke when name -is known to not exist or NULL.

[nullable]

user_data

User data to pass to handlers.

 

user_data_free_func

Function for freeing user_data -or NULL.

[nullable]
-
-
-

Returns

-

An identifier (never 0) that an be used with -g_bus_unwatch_name() to stop watching the name.

-
-

Since: 2.26

-
-
-
-

g_bus_unwatch_name ()

-
void
-g_bus_unwatch_name (guint watcher_id);
-

Stops watching a name.

-
-

Parameters

-
----- - - - - - -

watcher_id

An identifier obtained from g_bus_watch_name()

 
-
-

Since: 2.26

-
-
-
-

g_bus_watch_name_with_closures ()

-
guint
-g_bus_watch_name_with_closures (GBusType bus_type,
-                                const gchar *name,
-                                GBusNameWatcherFlags flags,
-                                GClosure *name_appeared_closure,
-                                GClosure *name_vanished_closure);
-

Version of g_bus_watch_name() using closures instead of callbacks for -easier binding in other languages.

-

[rename-to g_bus_watch_name]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

bus_type

The type of bus to watch a name on.

 

name

The name (well-known or unique) to watch.

 

flags

Flags from the GBusNameWatcherFlags enumeration.

 

name_appeared_closure

GClosure to invoke when name -is known -to exist or NULL.

[nullable]

name_vanished_closure

GClosure to invoke when name -is known -to not exist or NULL.

[nullable]
-
-
-

Returns

-

An identifier (never 0) that an be used with -g_bus_unwatch_name() to stop watching the name.

-
-

Since: 2.26

-
-
-
-

g_bus_watch_name_on_connection_with_closures ()

-
guint
-g_bus_watch_name_on_connection_with_closures
-                               (GDBusConnection *connection,
-                                const gchar *name,
-                                GBusNameWatcherFlags flags,
-                                GClosure *name_appeared_closure,
-                                GClosure *name_vanished_closure);
-

Version of g_bus_watch_name_on_connection() using closures instead of callbacks for -easier binding in other languages.

-

[rename-to g_bus_watch_name_on_connection]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

connection

A GDBusConnection.

 

name

The name (well-known or unique) to watch.

 

flags

Flags from the GBusNameWatcherFlags enumeration.

 

name_appeared_closure

GClosure to invoke when name -is known -to exist or NULL.

[nullable]

name_vanished_closure

GClosure to invoke when name -is known -to not exist or NULL.

[nullable]
-
-
-

Returns

-

An identifier (never 0) that an be used with -g_bus_unwatch_name() to stop watching the name.

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

enum GBusNameWatcherFlags

-

Flags used in g_bus_watch_name().

-
-

Members

-
----- - - - - - - - - - - - - -

G_BUS_NAME_WATCHER_FLAGS_NONE

-

No flags set.

-
 

G_BUS_NAME_WATCHER_FLAGS_AUTO_START

-

If no-one owns the name when -beginning to watch the name, ask the bus to launch an owner for the -name.

-
 
-
-

Since: 2.26

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-gnetworking.h.html b/docs/reference/gio/html/gio-gnetworking.h.html deleted file mode 100644 index 142be9a05..000000000 --- a/docs/reference/gio/html/gio-gnetworking.h.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - -gnetworking.h: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

gnetworking.h

-

gnetworking.h — System networking includes

-
-
-

Functions

-
---- - - - - -
-void - -g_networking_init () -
-
-
-

Includes

-
#include <gio/gnetworking.h>
-
-
-
-

Description

-

The <gio/gnetworking.h> header can be included to get -various low-level networking-related system headers, automatically -taking care of certain portability issues for you.

-

This can be used, for example, if you want to call setsockopt() -on a GSocket.

-

Note that while WinSock has many of the same APIs as the -traditional UNIX socket API, most of them behave at least slightly -differently (particularly with respect to error handling). If you -want your code to work under both UNIX and Windows, you will need -to take these differences into account.

-

Also, under GNU libc, certain non-portable functions are only visible -in the headers if you define _GNU_SOURCE before including them. Note -that this symbol must be defined before including any headers, or it -may not take effect.

-
-
-

Functions

-
-

g_networking_init ()

-
void
-g_networking_init (void);
-

Initializes the platform networking libraries (eg, on Windows, this -calls WSAStartup()). GLib will call this itself if it is needed, so -you only need to call it if you directly call system networking -functions (without calling any GLib networking functions first).

-

Since: 2.36

-
-
-
-

Types and Values

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-gpollableutils.html b/docs/reference/gio/html/gio-gpollableutils.html deleted file mode 100644 index 0241c1ec3..000000000 --- a/docs/reference/gio/html/gio-gpollableutils.html +++ /dev/null @@ -1,470 +0,0 @@ - - - - -gpollableutils: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

gpollableutils

-

gpollableutils — Utilities for pollable streams

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -(*GPollableSourceFunc) () -
-GSource * - -g_pollable_source_new () -
-GSource * - -g_pollable_source_new_full () -
-gssize - -g_pollable_stream_read () -
-gssize - -g_pollable_stream_write () -
-gboolean - -g_pollable_stream_write_all () -
-
-
-

Includes

-
#include <gio/gio.h>
-
-
-
-

Description

-

Utility functions for GPollableInputStream and -GPollableOutputStream implementations.

-
-
-

Functions

-
-

GPollableSourceFunc ()

-
gboolean
-(*GPollableSourceFunc) (GObject *pollable_stream,
-                        gpointer user_data);
-

This is the function type of the callback used for the GSource -returned by g_pollable_input_stream_create_source() and -g_pollable_output_stream_create_source().

-
-

Parameters

-
----- - - - - - - - - - - - - -

pollable_stream

the GPollableInputStream or GPollableOutputStream

 

user_data

data passed in by the user.

 
-
-
-

Returns

-

it should return FALSE if the source should be removed.

-
-

Since: 2.28

-
-
-
-

g_pollable_source_new ()

-
GSource *
-g_pollable_source_new (GObject *pollable_stream);
-

Utility method for GPollableInputStream and GPollableOutputStream -implementations. Creates a new GSource that expects a callback of -type GPollableSourceFunc. The new source does not actually do -anything on its own; use g_source_add_child_source() to add other -sources to it to cause it to trigger.

-
-

Parameters

-
----- - - - - - -

pollable_stream

the stream associated with the new source

 
-
-
-

Returns

-

the new GSource.

-

[transfer full]

-
-

Since: 2.28

-
-
-
-

g_pollable_source_new_full ()

-
GSource *
-g_pollable_source_new_full (gpointer pollable_stream,
-                            GSource *child_source,
-                            GCancellable *cancellable);
-

Utility method for GPollableInputStream and GPollableOutputStream -implementations. Creates a new GSource, as with -g_pollable_source_new(), but also attaching child_source - (with a -dummy callback), and cancellable -, if they are non-NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

pollable_stream

the stream associated with the -new source.

[type GObject]

child_source

optional child source to attach.

[nullable]

cancellable

optional GCancellable to attach.

[nullable]
-
-
-

Returns

-

the new GSource.

-

[transfer full]

-
-

Since: 2.34

-
-
-
-

g_pollable_stream_read ()

-
gssize
-g_pollable_stream_read (GInputStream *stream,
-                        void *buffer,
-                        gsize count,
-                        gboolean blocking,
-                        GCancellable *cancellable,
-                        GError **error);
-

Tries to read from stream -, as with g_input_stream_read() (if -blocking - is TRUE) or g_pollable_input_stream_read_nonblocking() -(if blocking - is FALSE). This can be used to more easily share -code between blocking and non-blocking implementations of a method.

-

If blocking - is FALSE, then stream - must be a -GPollableInputStream for which g_pollable_input_stream_can_poll() -returns TRUE, or else the behavior is undefined. If blocking - is -TRUE, then stream - does not need to be a GPollableInputStream.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GInputStream

 

buffer

a buffer to -read data into.

[array length=count][element-type guint8]

count

the number of bytes to read

 

blocking

whether to do blocking I/O

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

the number of bytes read, or -1 on error.

-
-

Since: 2.34

-
-
-
-

g_pollable_stream_write ()

-
gssize
-g_pollable_stream_write (GOutputStream *stream,
-                         const void *buffer,
-                         gsize count,
-                         gboolean blocking,
-                         GCancellable *cancellable,
-                         GError **error);
-

Tries to write to stream -, as with g_output_stream_write() (if -blocking - is TRUE) or g_pollable_output_stream_write_nonblocking() -(if blocking - is FALSE). This can be used to more easily share -code between blocking and non-blocking implementations of a method.

-

If blocking - is FALSE, then stream - must be a -GPollableOutputStream for which -g_pollable_output_stream_can_poll() returns TRUE or else the -behavior is undefined. If blocking - is TRUE, then stream - does not -need to be a GPollableOutputStream.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GOutputStream.

 

buffer

the buffer -containing the data to write.

[array length=count][element-type guint8]

count

the number of bytes to write

 

blocking

whether to do blocking I/O

 

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

the number of bytes written, or -1 on error.

-
-

Since: 2.34

-
-
-
-

g_pollable_stream_write_all ()

-
gboolean
-g_pollable_stream_write_all (GOutputStream *stream,
-                             const void *buffer,
-                             gsize count,
-                             gboolean blocking,
-                             gsize *bytes_written,
-                             GCancellable *cancellable,
-                             GError **error);
-

Tries to write count - bytes to stream -, as with -g_output_stream_write_all(), but using g_pollable_stream_write() -rather than g_output_stream_write().

-

On a successful write of count - bytes, TRUE is returned, and -bytes_written - is set to count -.

-

If there is an error during the operation (including -G_IO_ERROR_WOULD_BLOCK in the non-blocking case), FALSE is -returned and error - is set to indicate the error status, -bytes_written - is updated to contain the number of bytes written -into the stream before the error occurred.

-

As with g_pollable_stream_write(), if blocking - is FALSE, then -stream - must be a GPollableOutputStream for which -g_pollable_output_stream_can_poll() returns TRUE or else the -behavior is undefined. If blocking - is TRUE, then stream - does not -need to be a GPollableOutputStream.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

stream

a GOutputStream.

 

buffer

the buffer -containing the data to write.

[array length=count][element-type guint8]

count

the number of bytes to write

 

blocking

whether to do blocking I/O

 

bytes_written

location to store the number of bytes that was -written to the stream.

[out]

cancellable

optional GCancellable object, NULL to ignore.

[nullable]

error

location to store the error occurring, or NULL to ignore

 
-
-
-

Returns

-

TRUE on success, FALSE if there was an error

-
-

Since: 2.34

-
-
-
-

Types and Values

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-hierarchy.html b/docs/reference/gio/html/gio-hierarchy.html deleted file mode 100644 index 313051bc6..000000000 --- a/docs/reference/gio/html/gio-hierarchy.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - -Object Hierarchy: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Object Hierarchy

-
-    GObject
-    ├── GAppInfoMonitor
-    ├── GAppLaunchContext
-    ├── GApplicationCommandLine
-    ├── GApplication
-    ├── GInputStream
-       ├── GFilterInputStream
-          ├── GBufferedInputStream
-             ╰── GDataInputStream
-          ╰── GConverterInputStream
-       ├── GFileInputStream
-       ├── GMemoryInputStream
-       ╰── GUnixInputStream
-    ├── GOutputStream
-       ├── GFilterOutputStream
-          ├── GBufferedOutputStream
-          ├── GConverterOutputStream
-          ╰── GDataOutputStream
-       ├── GFileOutputStream
-       ├── GMemoryOutputStream
-       ╰── GUnixOutputStream
-    ├── GBytesIcon
-    ├── GCancellable
-    ├── GCharsetConverter
-    ├── GCredentials
-    ├── GDBusActionGroup
-    ├── GDBusAuthObserver
-    ├── GDBusConnection
-    ├── GDBusInterfaceSkeleton
-    ├── GMenuModel
-       ├── GDBusMenuModel
-       ╰── GMenu
-    ├── GDBusMessage
-    ├── GDBusMethodInvocation
-    ├── GDBusObjectManagerClient
-    ├── GDBusObjectManagerServer
-    ├── GDBusObjectProxy
-    ├── GDBusObjectSkeleton
-    ├── GDBusProxy
-    ├── GDBusServer
-    ├── GDesktopAppInfo
-    ├── GEmblem
-    ├── GEmblemedIcon
-    ├── GFileEnumerator
-    ├── GFileIcon
-    ├── GFileInfo
-    ├── GIOStream
-       ├── GFileIOStream
-       ├── GSimpleIOStream
-       ├── GSocketConnection
-          ├── GTcpConnection
-             ╰── GTcpWrapperConnection
-          ╰── GUnixConnection
-       ╰── GTlsConnection
-    ├── GFileMonitor
-    ├── GFilenameCompleter
-    ├── GInetAddress
-    ├── GInetAddressMask
-    ├── GSocketAddress
-       ├── GInetSocketAddress
-          ╰── GProxyAddress
-       ╰── GUnixSocketAddress
-    ├── GTypeModule
-       ╰── GIOModule
-    ├── GListStore
-    ├── GMenuAttributeIter
-    ├── GMenuItem
-    ├── GMenuLinkIter
-    ├── GMountOperation
-    ├── GNetworkAddress
-    ├── GNetworkService
-    ├── GNotification
-    ├── GPermission
-       ╰── GSimplePermission
-    ├── GPropertyAction
-    ├── GSocketAddressEnumerator
-       ╰── GProxyAddressEnumerator
-    ├── GResolver
-    ├── GSettingsBackend
-    ├── GSettings
-    ├── GSimpleAction
-    ├── GSimpleActionGroup
-    ├── GSimpleAsyncResult
-    ├── GSimpleProxyResolver
-    ├── GSocketClient
-    ├── GSocketControlMessage
-       ├── GUnixCredentialsMessage
-       ╰── GUnixFDMessage
-    ├── GSocket
-    ├── GSocketListener
-       ╰── GSocketService
-           ╰── GThreadedSocketService
-    ├── GSubprocess
-    ├── GSubprocessLauncher
-    ├── GTask
-    ├── GTestDBus
-    ├── GThemedIcon
-    ├── GTlsCertificate
-    ├── GTlsDatabase
-    ├── GTlsInteraction
-    ├── GTlsPassword
-    ├── GUnixFDList
-    ├── GUnixMountMonitor
-    ├── GVfs
-    ├── GVolumeMonitor
-    ├── GZlibCompressor
-    ╰── GZlibDecompressor
-    GInterface
-    ├── GAction
-    ├── GActionGroup
-    ├── GActionMap
-    ├── GAppInfo
-    ├── GAsyncInitable
-    ├── GAsyncResult
-    ├── GSeekable
-    ├── GIcon
-    ├── GLoadableIcon
-    ├── GConverter
-    ├── GInitable
-    ├── GPollableInputStream
-    ├── GPollableOutputStream
-    ├── GRemoteActionGroup
-    ├── GDBusInterface
-    ├── GDBusObject
-    ├── GDBusObjectManager
-    ├── GDesktopAppInfoLookup
-    ├── GDrive
-    ├── GDtlsClientConnection
-    ├── GDtlsConnection
-    ├── GDatagramBased
-    ├── GDtlsServerConnection
-    ├── GFileDescriptorBased
-    ├── GFile
-    ├── GSocketConnectable
-    ├── GListModel
-    ├── GMount
-    ├── GNetworkMonitor
-    ├── GProxy
-    ├── GProxyResolver
-    ├── GTlsBackend
-    ├── GTlsClientConnection
-    ├── GTlsFileDatabase
-    ├── GTlsServerConnection
-    ╰── GVolume
-    GBoxed
-    ├── GDBusAnnotationInfo
-    ├── GDBusArgInfo
-    ├── GDBusInterfaceInfo
-    ├── GDBusMethodInfo
-    ├── GDBusNodeInfo
-    ├── GDBusPropertyInfo
-    ├── GDBusSignalInfo
-    ├── GFileAttributeInfoList
-    ├── GFileAttributeMatcher
-    ├── GResource
-    ├── GSettingsSchema
-    ├── GSettingsSchemaKey
-    ├── GSettingsSchemaSource
-    ╰── GSrvTarget
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio-querymodules.html b/docs/reference/gio/html/gio-querymodules.html deleted file mode 100644 index 2f725ff01..000000000 --- a/docs/reference/gio/html/gio-querymodules.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - -gio-querymodules: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

gio-querymodules

-

gio-querymodules — GIO module cache creation

-
-
-

Synopsis

-

gio-querymodules {DIRECTORY...}

-
-
-

Description

-

gio-querymodules creates a -giomodule.cache file in the listed directories. -This file lists the implemented extension points for each module -that has been found. It is used by GIO at runtime to avoid opening -all modules just to find out which extension points they are implementing. -

-

-GIO modules are usually installed in the gio/modules -subdirectory of libdir. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gio.devhelp2 b/docs/reference/gio/html/gio.devhelp2 deleted file mode 100644 index ce77f5317..000000000 --- a/docs/reference/gio/html/gio.devhelp2 +++ /dev/null @@ -1,3671 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/gio/html/gio.html b/docs/reference/gio/html/gio.html deleted file mode 100644 index 40fc15721..000000000 --- a/docs/reference/gio/html/gio.html +++ /dev/null @@ -1,664 +0,0 @@ - - - - -gio: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

gio

-

gio — GIO commandline tool

-
-
-

Synopsis

-

gio help [COMMAND]

-

gio version

-

gio cat LOCATION...

-

gio copy [OPTION...] SOURCE... DESTINATION

-

gio info [OPTION...] LOCATION...

-

gio list [OPTION...] [LOCATION...]

-

gio mime MIMETYPE [HANDLER]

-

gio mkdir [OPTION...] LOCATION...

-

gio monitor [OPTION...] [LOCATION...]

-

gio mount [OPTION...] [LOCATION...]

-

gio move [OPTION...] SOURCE... DESTINATION

-

gio open LOCATION...

-

gio rename LOCATION NAME

-

gio remove [OPTION...] LOCATION...

-

gio save [OPTION...] DESTINATION

-

gio set [OPTION...] LOCATION ATTRIBUTE VALUE...

-

gio trash [OPTION...] [LOCATION...]

-

gio tree [OPTION...] [LOCATION...]

-
-
-

Description

-

gio is a utility that makes many of the GIO - features available from the commandline. In doing so, it provides - commands that are similar to traditional utilities, but let you - use GIO locations instead of local files: for example you can use - something like smb://server/resource/file.txt - as location.

-
-
-

Commands

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

- help - [COMMAND] -

Displays a short synopsis of the available commands or provides - detailed help on a specific command.

- version -

Prints the GLib version to which gio - belongs.

- cat - LOCATION... -

-

Concatenates the given files and prints them to the standard - output.

-

The cat command works just like the traditional cat utility.

-

Note: just pipe through cat if you need its formatting options - like -n, -T or other.

-

- copy - [OPTION...] - SOURCE... - DESTINATION -

-

Copies one or more files from SOURCE - to DESTINATION. If more than one source - is specified, the destination must be a directory.

-

The copy command is similar to the traditional cp utility.

-
-

Options

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -

-T, --no-target-directory

Don't copy into DESTINATION even if it is a directory.

-p, --progress

Show progress.

-i, --interactive

Prompt for confirmation before overwriting files.

--preserve

Preserve all attributes of copied files.

-b, --backup

Create backups of existing destination files.

-P, --no-dereference

Never follow symbolic links.

-
-

- info - [OPTION...] - LOCATION... -

-

Shows information about the given locations.

-

The info command is similar to the traditional ls utility.

-
-

Options

-
---- - - - - - - - - - - - - - - - - - - -

-w, --query-writable

List writable attributes.

-f, --filesystem

Show information about the filesystem that the given - locations reside on.

-a --attributes=ATTRIBUTES

-

The attributes to get.

-

Attributes can be specified with their GIO name, e.g. - standard::icon, or just by namespace, e.g. unix, or by '*', - which matches all attributes. Several attributes or groups - of attributes can be specified, separated by comma.

-

By default, all attributes are listed.

-

-n, --nofollow-symlinks

Don't follow symbolic links.

-
-

- list - [OPTION...] - [LOCATION...] -

-

Lists the contents of the given locations. If no location is - given, the contents of the current directory are shown.

-

The list command is similar to the traditional ls utility.

-
-

Options

-
---- - - - - - - - - - - - - - - - - - - - - - - -

-a --attributes=ATTRIBUTES

-

The attributes to get.

-

Attributes can be specified with their GIO name, e.g. - standard::icon, or just by namespace, e.g. unix, or by '*', - which matches all attributes. Several attributes or groups - of attributes can be specified, separated by comma.

-

By default, all attributes are listed.

-

-h, --hidden

Show hidden files.

-l, --long

Use a long listing format.

-n, --nofollow-symlinks

Don't follow symbolic links.

-u, --print-uris

Print full URIs.

-
-

- mime - MIMETYPE - [HANDLER] -

-

If no handler is given, the mime command lists the - registered and recommended applications for the mimetype. - If a handler is given, it is set as the default handler for - the mimetype.

-

Handlers must be specified by their desktop file name, - including the extension. Example: org.gnome.gedit.desktop.

-

- mkdir - [OPTION...] - LOCATION... -

-

Creates directories.

-

The mkdir command is similar to the traditional mkdir utility.

-
-

Options

-
---- - - - - -

-p, --parent

Create parent directories when necessary.

-
-

- monitor - [OPTION...] - [LOCATION...] -

-

Monitors files or directories for changes, such as creation - deletion, content and attribute changes, and mount and unmount - operations affecting the monitored locations.

-

The monitor command uses the GIO file monitoring APIs to do - its job. GIO has different implementations for different platforms. - The most common implementation on Linux uses inotify.

-
-

Options

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -

-d, --dir=LOCATION

Monitor the given location as a directory. Normally, - the file type is used to determine whether to monitor a file or directory.

-f, --file=LOCATION

Monitor the given location as a file. Normally, - the file type is used to determine whether to monitor a file or directory.

-D, --direct=LOCATION

Monitor the file directly. This allows to capture changes made via hardlinks.

-s, --silent=LOCATION

Monitor the file directly, but don't report changes.

-n, --no-moves

Report moves and renames as simple deleted/created events.

-m, --mounts

Watch for mount events.

-
-

- mount - [OPTION...] - [LOCATION...] -

-

Provides commandline access to various aspects of GIOs mounting - functionality.

-

Mounting refers to the traditional concept of arranging multiple - file systems and devices in a single tree, rooted at /. Classical - mounting happens in the kernel and is controlle by the mount utility. - GIO expands this concept by introducing mount daemons that can make - file systems available to GIO applications without kernel - involvement.

-

GIO mounts can require authentication, and the mount command - may ask for user IDs, passwords, and so on, when required.

-
-

Options

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-m, --mountable

Mount as mountable.

-d, --device=DEVICE

Mount volume with device file.

-u, --unmount

Unmount the location.

-e, --eject

Eject the location.

-s, --unmount-scheme=SCHEME

Unmount all mounts with the given scheme.

-f, --force

Ignore outstanding file operations when unmounting or ejecting.

-a, --anonymous

Use an anonymous user when authenticating.

-l, --list

List all GIO mounts.

-o, --monitor

Monitor mount-related events.

-i, --detail

Show extra information.

-
-

- move - [OPTION...] - SOURCE... - DESTINATION -

-

Moves one or more files from SOURCE - to DESTINATION. If more than one source - is specified, the destination must be a directory.

-

The move command is similar to the traditional mv utility.

-

- open - LOCATION... -

-

Opens files with the default application that is registered - to handle files of this type.

-

GIO obtains this information from the shared-mime-info - database, with per-user overrides stored in - $XDG_DATA_HOME/applications/mimeapps.list.

-

The mime command can be used to change the default handler for - a mimetype.

-

- rename - LOCATION - NAME -

-

Renames a file.

-

The rename command is similar to the traditional rename utility.

-

- remove - [OPTION...] - LOCATION... -

-

Deletes each given file.

-

This command removes files irreversibly. If you want a reversible - way to remove files, see the trash command.

-

Note that not all URI schemes that are supported by GIO may - allow deletion of files.

-

The remove command is similar to the traditional rm utility.

-
-

Options

-
---- - - - - -

-f, --force

Ignore non-existent and non-deletable files.

-
-

- save - [OPTION...] - DESTINATION -

-

Reads from standard input and saves the data to the given - location.

-

This is similar to just redirecting output to a file using - traditional shell syntax, but the save command allows saving to - location that GIO can write to.

-
-

Options

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-b, --backup

Backup existing destination files.

-c, --create

Only create the destination if it doesn't exist yet.

-a, --append

Append to the end of the file.

-p, --private

When creating, restrict access to the current user.

-u, --unlink

When replacing, replace as if the destination did not exist.

-v, --print-etag

Print the new etag in the end.

-e, --etag=ETAG

The etag of the file that is overwritten.

-
-

- set - LOCATION - ATTRIBUTE - VALUE... -

-

Allows to set a file attribute on a file.

-

File attributes can be specified with their GIO name, e.g - standard::icon. Note that not all GIO file attributes are writable. - Use the --query-writable option of the info command to list - writable file attributes.

-

If the TYPE is unset, - VALUE does not have to be specified. - If the type is stringv, multiple values can be given.

-
-

Options

-
---- - - - - - - - - - - -

-t, --type=TYPE

-

Specifies the type of the attribute. Supported - types are string, stringv, bytestring, boolean, uint32, int32, - uint64, int64 and unset.

-

If the type is not specified, string is assumed.

-

-n, --nofollow-symlinks

Don't follow symbolic links.

-
-

- trash - [OPTION...] - [LOCATION...] -

-

Sends files or directories to the "Trashcan". This can be a - different folder depending on where the file is located, and not - all file systems support this concept. In the common case that the - file lives inside a users home directory, the trash folder is - $XDG_DATA_HOME/Trash.

-

Note that moving files to the trash does not free up space on - the file system until the "Trashcan" is emptied. If you are interested - in deleting a file irreversibly, see the remove command.

-

Inspecting and emptying the "Trashcan" is normally supported by - graphical file managers such as nautilus, but you can also see the - trash with the command: gio list trash://.

-
-

Options

-
---- - - - - - - - - - - -

-f, --force

Ignore non-existent and non-deletable files.

--empty

Empty the trash.

-
-

- tree - [OPTION...] - [LOCATION...] -

-

Lists the contents of the given locations recursively, in a - tree-like format. If no location is given, it defaults to the current - directory.

-

The tree command is similar to the traditional tree utility.

-
-

Options

-
---- - - - - - - - - - - - - - - -

-h, --hidden

Show hidden files.

-h, --hidden

Show hidden files.

-l, --follow-symlinks

Follow symbolic links.

-
-
-
-
-

Exit status

-

On success 0 is returned, a non-zero failure code otherwise.

-
-
-

See Also

-

- cat(1), - cp(1), - ls(1), - mkdir(1), - mv(1), - rm(1), - tree(1). -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/glib-compile-resources.html b/docs/reference/gio/html/glib-compile-resources.html deleted file mode 100644 index ac3a385f0..000000000 --- a/docs/reference/gio/html/glib-compile-resources.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - -glib-compile-resources: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

glib-compile-resources

-

glib-compile-resources — GLib resource compiler

-
-
-

Synopsis

-

glib-compile-resources [OPTION...] {FILE}

-
-
-

Description

-

glib-compile-resources reads the resource description from -FILE and the files that it references -and creates a binary resource bundle that is suitable for use with the -GResource API. -The resulting bundle is then written out as-is, or as C source for linking into -an application. -

-

-The XML resource files normally have the filename extension .gresource.xml. -For a detailed description of the XML file format, see the -GResource documentation. -

-
-
-

Options

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-h, --help

-Print help and exit -

--version

-Print program version and exit -

--target=TARGET

-Store the compiled resources in the file TARGET. -If not specified a filename based on the FILE -basename is used. -

--sourcedir=DIRECTORY

-The files referenced in FILE are loaded from -this directory. If not specified, the current directory is used. -

--generate

-

-Write the output file in the format selected for by its filename extension: -

-
---- - - - - - - - - - - - - - - -

.c

C source

.h

C header

.gresource

resource bundle

-

-

-

--generate-source

-Instead of a writing the resource bundle in binary form create a C source file -that contains the resource bundle. This can then be compiled into an -application for easy access. -

--generate-header

-Generate a header file for use with C code generated by ---generate-source. -

--generate-dependencies

-

-Prints the list of files that the resource bundle references to standard output. -This can be used to track dependencies in the build system. For example, the -following make rule would mark test.gresource as -depending on all the files that test.gresource.xml -includes, so that is is automatically rebuilt if any of them change: -

-
-test.gresource: test.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies test.gresource.xml)
-
-

-Note that this may or may not be portable to non-GNU make. -

-

-Also see --dependency-file. -

-

--c-name

-Specify the prefix used for the C identifiers in the code generated by ---generate-source and --generate-header. -

--manual-register

-By default code generated by --generate-source uses automatic -initialization of the resource. This works on most systems by using the -compiler support for constructors. However, some (uncommon) compilers may not -support this, you can then specify --manual-register, -which will generate custom register and unregister functions that your code -can manually call at initialization and uninitialization time. -

--internal

-By default code generated by --generate-source declares all -initialization functions as extern. So they are exported -unless this is prevented by a link script or other means. Since libraries -usually want to use the functions only internally it can be more useful to -declare them as -G_GNUC_INTERNAL -which is what --internal does. -

--dependency-file=FILE

-Write dependencies in the same style as gcc -M -MF to the given file. -If FILE is -, the dependencies are written to the standard -output. Unlike --generate-dependencies, this option can be -combined with other --generate options to generate dependencies -as a side-effect of generating sources. -

--generate-phony-targets

-When creating a dependency file with --dependency-file -include phony targets in the same style as gcc -MP. This would typically -be used with make. -

-
-
-

Environment

-
---- - - - - - - - - - - -

XMLLINT

-The full path to the xmllint executable. This is used to preprocess resources -with the xml-stripblanks preprocessing option. If this -environment variable is not set, xmllint is searched in the -PATH. -

GDK_PIXBUF_PIXDATA

-The full path to the gdk-pixbuf-pixdata executable. This is used to preprocess -resources with the to-pixdata preprocessing option. If this -environment variable is not set, gdk-pixbuf-pixdata is searched in the -PATH. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/glib-compile-schemas.html b/docs/reference/gio/html/glib-compile-schemas.html deleted file mode 100644 index 8bad2be7b..000000000 --- a/docs/reference/gio/html/glib-compile-schemas.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - -glib-compile-schemas: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

glib-compile-schemas

-

glib-compile-schemas — GSettings schema compiler

-
-
-

Synopsis

-

glib-compile-schemas [OPTION...] {DIRECTORY}

-
-
-

Description

-

glib-compile-schemas compiles all the GSettings XML -schema files in DIRECTORY into a binary file -with the name gschemas.compiled that can be used -by GSettings. The XML schema -files must have the filename extension .gschema.xml. -For a detailed description of the XML file format, see the -GSettings documentation. -

-

-At runtime, GSettings looks for schemas in the -glib-2.0/schemas subdirectories of all directories -specified in the XDG_DATA_DIRS environment variable. The -usual location to install schema files is -/usr/share/glib-2.0/schemas. -

-

-In addition to schema files, glib-compile-schemas reads 'vendor override' -files, which are key files that can override default values for keys in -the schemas. The group names in the key files are the schema id, and the -values are written in serialized GVariant form. -Vendor override files must have the filename extension -.gschema.override. -

-

-By convention, vendor override files begin with nn_ -where nn is a number from 00 to 99. Higher -numbered files have higher priority (eg: if the same override is made in -a file numbered 10 and then again in a file numbered 20, the override -from 20 will take precedence). -

-
-
-

Options

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -

-h, --help

-Print help and exit -

--version

-Print program version and exit -

--targetdir=TARGET

-Store gschemas.compiled in the TARGET directory instead of DIRECTORY. -

--strict

-Abort on any errors in schemas. Without this option, faulty schema files are -simply omitted from the resulting compiled schema. -

--dry-run

-Don't write gschemas.compiled. This option can be used -to check .gschema.xml sources for errors. -

--allow-any-name

-Do not enforce restrictions on key names. Note that this option is purely -to facility the transition from GConf, and will be removed at some time -in the future. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gresource-tool.html b/docs/reference/gio/html/gresource-tool.html deleted file mode 100644 index 27f8c6f32..000000000 --- a/docs/reference/gio/html/gresource-tool.html +++ /dev/null @@ -1,110 +0,0 @@ - - - - -gresource: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

gresource

-

gresource — GResource tool

-
-
-

Synopsis

-

gresource [--section SECTION] list FILE [PATH]

-

gresource [--section SECTION] details FILE [PATH]

-

gresource [--section SECTION] extract FILE PATH

-

gresource sections FILE

-

gresource help [COMMAND]

-
-
-

Description

-

gresource offers a simple commandline -interface to GResource. -It lets you list and extract resources that have been compiled -into a resource file or included in an elf file (a binary or a -shared library). -

-

-The file to operate on is specified by the FILE -argument. -

-

-If an elf file includes multiple sections with resources, it is -possible to select which one to operate on with the - --section option. Use the - sections command to find available sections. -

-
-
-

Commands

-
---- - - - - - - - - - - - - - - - - - - - - - - -

list

-Lists resources. If SECTION is given, only -list resourcs in this section. If PATH is -given, only list matching resources. -

details

-Lists resources with details. If SECTION -is given, only list resources in this section. If -PATH is given, only list matching resources. -Details include the section, size and compression of each resource. -

extract

-Extracts the resource named by PATH to stdout. -Note that resources may contain binary data. -

sections

-Lists sections containing resources. This is only interesting if -FILE is an elf file. -

help

-Prints help and exits. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gsettings-tool.html b/docs/reference/gio/html/gsettings-tool.html deleted file mode 100644 index 098cb3b91..000000000 --- a/docs/reference/gio/html/gsettings-tool.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - -gsettings: GIO Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

gsettings

-

gsettings — GSettings configuration tool

-
-
-

Synopsis

-

gsettings get SCHEMA [:PATH] KEY

-

gsettings monitor SCHEMA [:PATH] [KEY]

-

gsettings writable SCHEMA [:PATH] KEY

-

gsettings range SCHEMA [:PATH] KEY

-

gsettings describe SCHEMA [:PATH] KEY

-

gsettings set SCHEMA [:PATH] KEY VALUE

-

gsettings reset SCHEMA [:PATH] KEY

-

gsettings reset-recursively SCHEMA [:PATH]

-

gsettings list-schemas

-

gsettings list-relocatable-schemas

-

gsettings list-keys SCHEMA [:PATH]

-

gsettings list-children SCHEMA [:PATH]

-

gsettings list-recursively [SCHEMA [:PATH]]

-

gsettings help [COMMAND]

-
-
-

Description

-

gsettings offers a simple commandline -interface to GSettings. -It lets you get, set or monitor an individual key for changes. -

-

-The SCHEMA and KEY -arguments are required for most commands to specify the schema id and the -name of the key to operate on. The schema id may optionally have a -:PATH suffix. Specifying the path is only needed -if the schema does not have a fixed path. -

-

-When setting a key, you also need specify a VALUE -The format for the value is that of a serialized -GVariant, -so e.g. a string -must include explicit quotes: "'foo'". This format is also used when printing -out values. -

-

-Note that gsettings needs a D-Bus session bus connection to write changes to -the dconf database. -

-
-
-

Commands

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

get

-Gets the value of KEY. -The value is printed out as a serialised -GVariant. -

monitor

-Monitors KEY for changes and prints the changed -values. If no KEY is specified, all keys in the -schema are monitored. Monitoring will continue until the process is terminated. -

writable

-Finds out whether KEY is writable. -

range

-Queries the range of valid values for KEY. -

describe

-Queries the description of valid values for KEY. -

set

-Sets the value of KEY to -VALUE. The value is specified as a serialised -GVariant. -

reset

-Resets KEY to its default value. -

reset-recursively

-Reset all keys under the given SCHEMA. -

list-schemas

-Lists the installed, non-relocatable schemas. -See list-relocatable-schemas if you are interested in -relocatable schemas. -

list-relocatable-schemas

-Lists the installed, relocatable schemas. -See list-schemas if you are interested in -non-relocatable schemas. -

list-keys

-Lists the keys in SCHEMA. -

list-children

-Lists the children of SCHEMA. -

list-recursively

-Lists keys and values, recursively. If no SCHEMA -is given, list keys in all schemas. -

help

-Prints help and exits. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/gvfs-overview.png b/docs/reference/gio/html/gvfs-overview.png deleted file mode 100644 index 628684dc3..000000000 Binary files a/docs/reference/gio/html/gvfs-overview.png and /dev/null differ diff --git a/docs/reference/gio/html/highlevel-socket.html b/docs/reference/gio/html/highlevel-socket.html deleted file mode 100644 index 4d5ff457b..000000000 --- a/docs/reference/gio/html/highlevel-socket.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -High-level network functionallity: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-High-level network functionallity

-
-
-GSocketClient — Helper for connecting to a network service -
-
-GSocketConnection — A socket connection -
-
-GUnixConnection — A UNIX domain GSocketConnection -
-
-GTcpConnection — A TCP GSocketConnection -
-
-GTcpWrapperConnection — Wrapper for non-GSocketConnection-based, - GSocket-based GIOStreams -
-
-GSocketListener — Helper for accepting network client connections -
-
-GSocketService — Make it easy to implement a network service -
-
-GThreadedSocketService — A threaded GSocketService -
-
-GNetworkMonitor — Network status monitor -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/home.png b/docs/reference/gio/html/home.png deleted file mode 100644 index 9346b336a..000000000 Binary files a/docs/reference/gio/html/home.png and /dev/null differ diff --git a/docs/reference/gio/html/icons.html b/docs/reference/gio/html/icons.html deleted file mode 100644 index fd04b3ae6..000000000 --- a/docs/reference/gio/html/icons.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - -Icons: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Icons

-
-
-GIcon — Interface for icons -
-
-GFileIcon — Icons pointing to an image file -
-
-GBytesIcon — An icon stored in memory as a GBytes -
-
-GLoadableIcon — Loadable Icons -
-
-GThemedIcon — Icon theming support -
-
-GEmblemedIcon — Icon with emblems -
-
-GEmblem — An object for emblems -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/index.html b/docs/reference/gio/html/index.html deleted file mode 100644 index 16e6a9f20..000000000 --- a/docs/reference/gio/html/index.html +++ /dev/null @@ -1,641 +0,0 @@ - - - - -GIO Reference Manual: GIO Reference Manual - - - - - - - -
-
-
-
-

- for GIO 2.52.3 - - The latest version of this documentation can be found on-line at - https://developer.gnome.org/gio/unstable/. -

-
-
-
-
-
I. GIO Overview
-
-
Introduction
-
Writing GIO applications
-
Compiling GIO applications
-
Running GIO applications
-
Extending GIO
-
-
II. API Reference
-
-
File Operations
-
-
-GFile — File and Directory Handling -
-
-GFileAttribute — Key-Value Paired File Attributes -
-
-GFileInfo — File Information and Attributes -
-
-GFileEnumerator — Enumerated Files Routines -
-
-GIOError — Error helper functions -
-
-GMountOperation — Object used for authentication and user interaction -
-
-
File System Monitoring
-
-GFileMonitor — File Monitor -
-
File-related Utilities
-
-GFilenameCompleter — Filename Completer -
-
Asynchronous I/O
-
-
-GCancellable — Thread-safe Operation Cancellation Stack -
-
-GAsyncResult — Asynchronous Function Results -
-
-GTask — Cancellable synchronous or asynchronous task - and result -
-
-GIOScheduler — I/O Scheduler -
-
-GSimpleAsyncResult — Simple asynchronous results implementation -
-
-
Data conversion
-
-
-GConverter — Data conversion interface -
-
-GCharsetConverter — Convert between charsets -
-
-GZlibCompressor — Zlib compressor -
-
-GZlibDecompressor — Zlib decompressor -
-
-
Streaming I/O
-
-
-GSeekable — Stream seeking interface -
-
-GInputStream — Base class for implementing streaming input -
-
-GOutputStream — Base class for implementing streaming output -
-
-GIOStream — Base class for implementing read/write streams -
-
-GSimpleIOStream — A wrapper around an input and an output stream. -
-
-GFileInputStream — File input streaming operations -
-
-GFileOutputStream — File output streaming operations -
-
-GFileIOStream — File read and write streaming operations -
-
-GFileDescriptorBased — Interface for file descriptor based IO -
-
-GFilterInputStream — Filter Input Stream -
-
-GFilterOutputStream — Filter Output Stream -
-
-GMemoryInputStream — Streaming input operations on memory chunks -
-
-GMemoryOutputStream — Streaming output operations on memory chunks -
-
-GBufferedInputStream — Buffered Input Stream -
-
-GBufferedOutputStream — Buffered Output Stream -
-
-GDataInputStream — Data Input Stream -
-
-GDataOutputStream — Data Output Stream -
-
-GUnixInputStream — Streaming input operations for UNIX file descriptors -
-
-GUnixOutputStream — Streaming output operations for UNIX file descriptors -
-
-GWin32InputStream — Streaming input operations for Windows file handles -
-
-GWin32OutputStream — Streaming output operations for Windows file handles -
-
-GConverterInputstream — Converter Input Stream -
-
-GConverterOutputstream — Converter Output Stream -
-
-GPollableInputStream — Interface for pollable input streams -
-
-GPollableOutputStream — Interface for pollable output streams -
-
-gpollableutils — Utilities for pollable streams -
-
-
File types and applications
-
-
-GContentType — Platform-specific content typing -
-
-GAppInfo — Application information and launch contexts -
-
-GAppInfoMonitor — Monitor application information for changes -
-
-GDesktopAppInfo — Application information from desktop files -
-
-
Volumes and Drives
-
-
-GVolumeMonitor — Volume Monitor -
-
-GVolume — Volume management -
-
-GMount — Mount management -
-
-GDrive — Drive management -
-
-Unix Mounts — UNIX mounts -
-
-
Icons
-
-
-GIcon — Interface for icons -
-
-GFileIcon — Icons pointing to an image file -
-
-GBytesIcon — An icon stored in memory as a GBytes -
-
-GLoadableIcon — Loadable Icons -
-
-GThemedIcon — Icon theming support -
-
-GEmblemedIcon — Icon with emblems -
-
-GEmblem — An object for emblems -
-
-
Failable Initialization
-
-
-GInitable — Failable object initialization interface -
-
-GAsyncInitable — Asynchronously failable object initialization interface -
-
-
Subprocesses
-
-
-GSubprocess — Child processes -
-
-GSubprocess Launcher — Environment options for launching a child process -
-
-
Low-level network support
-
-
-GSocket — Low-level socket object -
-
-GDatagramBased — Low-level datagram communications interface -
-
-GInetAddress — An IPv4/IPv6 address -
-
-GInetAddressMask — An IPv4/IPv6 address mask -
-
-GSocketAddress — Abstract base class representing endpoints - for socket communication -
-
-GInetSocketAddress — Internet GSocketAddress -
-
-GUnixSocketAddress — UNIX GSocketAddress -
-
-GSocketControlMessage — A GSocket control message -
-
-GUnixFDList — An object containing a set of UNIX file descriptors -
-
-GUnixFDMessage — A GSocketControlMessage containing a GUnixFDList -
-
-GCredentials — An object containing credentials -
-
-GUnixCredentialsMessage — A GSocketControlMessage containing credentials -
-
-GProxy — Interface for proxy handling -
-
-GProxyAddress — An internet address with proxy information -
-
-gnetworking.h — System networking includes -
-
-
High-level network functionallity
-
-
-GSocketClient — Helper for connecting to a network service -
-
-GSocketConnection — A socket connection -
-
-GUnixConnection — A UNIX domain GSocketConnection -
-
-GTcpConnection — A TCP GSocketConnection -
-
-GTcpWrapperConnection — Wrapper for non-GSocketConnection-based, - GSocket-based GIOStreams -
-
-GSocketListener — Helper for accepting network client connections -
-
-GSocketService — Make it easy to implement a network service -
-
-GThreadedSocketService — A threaded GSocketService -
-
-GNetworkMonitor — Network status monitor -
-
-
TLS (SSL) support
-
-
-TLS Overview — TLS (aka SSL) support for GSocketConnection -
-
-GTlsCertificate — TLS certificate -
-
-GTlsConnection — TLS connection type -
-
-GTlsClientConnection — TLS client-side connection -
-
-GTlsServerConnection — TLS server-side connection -
-
-GDtlsConnection — DTLS connection type -
-
-GDtlsClientConnection — DTLS client-side connection -
-
-GDtlsServerConnection — DTLS server-side connection -
-
-GTlsBackend — TLS backend implementation -
-
-GTlsDatabase — TLS database type -
-
-GTlsFileDatabase — TLS file based database type -
-
-GTlsInteraction — Interaction with the user during TLS operations. -
-
-GTlsPassword — TLS Passwords for prompting -
-
-
DNS resolution
-
-
-GResolver — Asynchronous and cancellable DNS resolver -
-
-GProxyResolver — Asynchronous and cancellable network proxy resolver -
-
-GSimpleProxyResolver — Simple proxy resolver implementation -
-
-GSocketConnectable — Interface for potential socket endpoints -
-
-GNetworkAddress — A GSocketConnectable for resolving hostnames -
-
-GNetworkService — A GSocketConnectable for resolving SRV records -
-
-GSrvTarget — DNS SRV record target -
-
-
Low-level D-Bus Support
-
-
-D-Bus Utilities — Various utilities related to D-Bus -
-
-D-Bus Addresses — D-Bus connection endpoints -
-
-D-Bus Introspection Data — Node and interface description data structures -
-
-GDBusError — Mapping D-Bus errors to and from GError -
-
-GDBusMessage — D-Bus Message -
-
-GDBusConnection — D-Bus Connections -
-
-GDBusMethodInvocation — Object for handling remote calls -
-
-GDBusServer — Helper for accepting connections -
-
-GDBusAuthObserver — Object used for authenticating connections -
-
-
High-level D-Bus Support
-
-
-Owning Bus Names — Simple API for owning bus names -
-
-Watching Bus Names — Simple API for watching bus names -
-
-GDBusInterface — Base type for D-Bus interfaces -
-
-GDBusInterfaceSkeleton — Service-side D-Bus interface -
-
-GDBusProxy — Client-side D-Bus interface proxy -
-
-GDBusObject — Base type for D-Bus objects -
-
-GDBusObjectSkeleton — Service-side D-Bus object -
-
-GDBusObjectProxy — Client-side D-Bus object -
-
-GDBusObjectManager — Base type for D-Bus object managers -
-
-GDBusObjectManagerServer — Service-side object manager -
-
-GDBusObjectManagerClient — Client-side object manager -
-
-
Settings
-
-
-GSettings — High-level API for application settings -
-
-GSettingsBackend — Interface for settings backend implementations -
-
-GSettingsSchema, GSettingsSchemaSource — Introspecting and controlling the loading - of GSettings schemas -
-
-
Resources
-
-GResource — Resource framework -
-
Permissions
-
-
-GPermission — An object representing the permission - to perform a certain action -
-
-GSimplePermission — A GPermission that doesn't change value -
-
-
Data Models
-
-
-GListModel — An interface describing a dynamic list of objects -
-
-GListStore — A simple implementation of GListModel -
-
-
Win32 registry support
-
-GWin32RegistryKey — W32 registry access helper -
-
Application support
-
-
-GApplication — Core application class -
-
-GApplicationCommandLine — A command-line invocation of an application -
-
-GActionGroup — A group of actions -
-
-GActionMap — Interface for action containers -
-
-GSimpleActionGroup — A simple GActionGroup implementation -
-
-GAction — An action interface -
-
-GSimpleAction — A simple GAction implementation -
-
-GPropertyAction — A GAction reflecting a GObject property -
-
-GRemoteActionGroup — A GActionGroup that interacts with other processes -
-
-GActionGroup exporter — Export GActionGroups on D-Bus -
-
-GDBusActionGroup — A D-Bus GActionGroup implementation -
-
-GMenuModel — An abstract class representing the contents of a menu -
-
-GMenu — A simple implementation of GMenuModel -
-
-GMenuModel exporter — Export GMenuModels on D-Bus -
-
-GDBusMenuModel — A D-Bus GMenuModel implementation -
-
-GNotification — User Notifications (pop up messages) -
-
-
Extending GIO
-
-
-GVfs — Virtual File System -
-
-GIOModule — Loadable GIO Modules -
-
-Extension Points — Extension Points -
-
-
GIO Tools
-
-
-gio-querymodules — GIO module cache creation -
-
-gsettings — GSettings configuration tool -
-
-glib-compile-schemas — GSettings schema compiler -
-
-glib-compile-resources — GLib resource compiler -
-
-gdbus — Tool for working with D-Bus objects -
-
-gdbus-codegen — D-Bus code and documentation generator -
-
-gresource — GResource tool -
-
-gapplication — D-Bus application launcher -
-
-gio — GIO commandline tool -
-
-
GIO Testing
-
-GTestDBus — D-Bus testing helper -
-
-
III. Migrating to GIO
-
-
Migrating from GnomeVFS to GIO
-
-
Trash handling
-
Operations on multiple files
-
Mime monitoring
-
-
Migrating from GConf to GSettings
-
-
Before you start
-
Conceptual differences
-
GConfClient (and GConfBridge) API conversion
-
Change notification
-
Change sets
-
Schema conversion
-
Data conversion
-
-
Migrating to GDBus
-
-
Conceptual differences
-
API comparison
-
Owning bus names
-
Creating proxies for well-known names
-
Using gdbus-codegen
-
-
-
Object Hierarchy
-
Index
-
Annotation Glossary
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/left-insensitive.png b/docs/reference/gio/html/left-insensitive.png deleted file mode 100644 index 3269393a7..000000000 Binary files a/docs/reference/gio/html/left-insensitive.png and /dev/null differ diff --git a/docs/reference/gio/html/left.png b/docs/reference/gio/html/left.png deleted file mode 100644 index 2abde032b..000000000 Binary files a/docs/reference/gio/html/left.png and /dev/null differ diff --git a/docs/reference/gio/html/menu-example.png b/docs/reference/gio/html/menu-example.png deleted file mode 100644 index 91aeccfd9..000000000 Binary files a/docs/reference/gio/html/menu-example.png and /dev/null differ diff --git a/docs/reference/gio/html/menu-model.png b/docs/reference/gio/html/menu-model.png deleted file mode 100644 index a4d9f1130..000000000 Binary files a/docs/reference/gio/html/menu-model.png and /dev/null differ diff --git a/docs/reference/gio/html/migrating.html b/docs/reference/gio/html/migrating.html deleted file mode 100644 index 1df3f2e1a..000000000 --- a/docs/reference/gio/html/migrating.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - -Part III. Migrating to GIO: GIO Reference Manual - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/reference/gio/html/networking.html b/docs/reference/gio/html/networking.html deleted file mode 100644 index 2d2d64798..000000000 --- a/docs/reference/gio/html/networking.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - -Low-level network support: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Low-level network support

-
-
-GSocket — Low-level socket object -
-
-GDatagramBased — Low-level datagram communications interface -
-
-GInetAddress — An IPv4/IPv6 address -
-
-GInetAddressMask — An IPv4/IPv6 address mask -
-
-GSocketAddress — Abstract base class representing endpoints - for socket communication -
-
-GInetSocketAddress — Internet GSocketAddress -
-
-GUnixSocketAddress — UNIX GSocketAddress -
-
-GSocketControlMessage — A GSocket control message -
-
-GUnixFDList — An object containing a set of UNIX file descriptors -
-
-GUnixFDMessage — A GSocketControlMessage containing a GUnixFDList -
-
-GCredentials — An object containing credentials -
-
-GUnixCredentialsMessage — A GSocketControlMessage containing credentials -
-
-GProxy — Interface for proxy handling -
-
-GProxyAddress — An internet address with proxy information -
-
-gnetworking.h — System networking includes -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/permissions.html b/docs/reference/gio/html/permissions.html deleted file mode 100644 index feafaee9c..000000000 --- a/docs/reference/gio/html/permissions.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - -Permissions: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Permissions

-
-
-GPermission — An object representing the permission - to perform a certain action -
-
-GSimplePermission — A GPermission that doesn't change value -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/pt01.html b/docs/reference/gio/html/pt01.html deleted file mode 100644 index 69d915cfb..000000000 --- a/docs/reference/gio/html/pt01.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - -Part I. GIO Overview: GIO Reference Manual - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/reference/gio/html/pt02.html b/docs/reference/gio/html/pt02.html deleted file mode 100644 index 5ab0768c3..000000000 --- a/docs/reference/gio/html/pt02.html +++ /dev/null @@ -1,602 +0,0 @@ - - - - -Part II. API Reference: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Part II. API Reference

-
-

Table of Contents

-
-
File Operations
-
-
-GFile — File and Directory Handling -
-
-GFileAttribute — Key-Value Paired File Attributes -
-
-GFileInfo — File Information and Attributes -
-
-GFileEnumerator — Enumerated Files Routines -
-
-GIOError — Error helper functions -
-
-GMountOperation — Object used for authentication and user interaction -
-
-
File System Monitoring
-
-GFileMonitor — File Monitor -
-
File-related Utilities
-
-GFilenameCompleter — Filename Completer -
-
Asynchronous I/O
-
-
-GCancellable — Thread-safe Operation Cancellation Stack -
-
-GAsyncResult — Asynchronous Function Results -
-
-GTask — Cancellable synchronous or asynchronous task - and result -
-
-GIOScheduler — I/O Scheduler -
-
-GSimpleAsyncResult — Simple asynchronous results implementation -
-
-
Data conversion
-
-
-GConverter — Data conversion interface -
-
-GCharsetConverter — Convert between charsets -
-
-GZlibCompressor — Zlib compressor -
-
-GZlibDecompressor — Zlib decompressor -
-
-
Streaming I/O
-
-
-GSeekable — Stream seeking interface -
-
-GInputStream — Base class for implementing streaming input -
-
-GOutputStream — Base class for implementing streaming output -
-
-GIOStream — Base class for implementing read/write streams -
-
-GSimpleIOStream — A wrapper around an input and an output stream. -
-
-GFileInputStream — File input streaming operations -
-
-GFileOutputStream — File output streaming operations -
-
-GFileIOStream — File read and write streaming operations -
-
-GFileDescriptorBased — Interface for file descriptor based IO -
-
-GFilterInputStream — Filter Input Stream -
-
-GFilterOutputStream — Filter Output Stream -
-
-GMemoryInputStream — Streaming input operations on memory chunks -
-
-GMemoryOutputStream — Streaming output operations on memory chunks -
-
-GBufferedInputStream — Buffered Input Stream -
-
-GBufferedOutputStream — Buffered Output Stream -
-
-GDataInputStream — Data Input Stream -
-
-GDataOutputStream — Data Output Stream -
-
-GUnixInputStream — Streaming input operations for UNIX file descriptors -
-
-GUnixOutputStream — Streaming output operations for UNIX file descriptors -
-
-GWin32InputStream — Streaming input operations for Windows file handles -
-
-GWin32OutputStream — Streaming output operations for Windows file handles -
-
-GConverterInputstream — Converter Input Stream -
-
-GConverterOutputstream — Converter Output Stream -
-
-GPollableInputStream — Interface for pollable input streams -
-
-GPollableOutputStream — Interface for pollable output streams -
-
-gpollableutils — Utilities for pollable streams -
-
-
File types and applications
-
-
-GContentType — Platform-specific content typing -
-
-GAppInfo — Application information and launch contexts -
-
-GAppInfoMonitor — Monitor application information for changes -
-
-GDesktopAppInfo — Application information from desktop files -
-
-
Volumes and Drives
-
-
-GVolumeMonitor — Volume Monitor -
-
-GVolume — Volume management -
-
-GMount — Mount management -
-
-GDrive — Drive management -
-
-Unix Mounts — UNIX mounts -
-
-
Icons
-
-
-GIcon — Interface for icons -
-
-GFileIcon — Icons pointing to an image file -
-
-GBytesIcon — An icon stored in memory as a GBytes -
-
-GLoadableIcon — Loadable Icons -
-
-GThemedIcon — Icon theming support -
-
-GEmblemedIcon — Icon with emblems -
-
-GEmblem — An object for emblems -
-
-
Failable Initialization
-
-
-GInitable — Failable object initialization interface -
-
-GAsyncInitable — Asynchronously failable object initialization interface -
-
-
Subprocesses
-
-
-GSubprocess — Child processes -
-
-GSubprocess Launcher — Environment options for launching a child process -
-
-
Low-level network support
-
-
-GSocket — Low-level socket object -
-
-GDatagramBased — Low-level datagram communications interface -
-
-GInetAddress — An IPv4/IPv6 address -
-
-GInetAddressMask — An IPv4/IPv6 address mask -
-
-GSocketAddress — Abstract base class representing endpoints - for socket communication -
-
-GInetSocketAddress — Internet GSocketAddress -
-
-GUnixSocketAddress — UNIX GSocketAddress -
-
-GSocketControlMessage — A GSocket control message -
-
-GUnixFDList — An object containing a set of UNIX file descriptors -
-
-GUnixFDMessage — A GSocketControlMessage containing a GUnixFDList -
-
-GCredentials — An object containing credentials -
-
-GUnixCredentialsMessage — A GSocketControlMessage containing credentials -
-
-GProxy — Interface for proxy handling -
-
-GProxyAddress — An internet address with proxy information -
-
-gnetworking.h — System networking includes -
-
-
High-level network functionallity
-
-
-GSocketClient — Helper for connecting to a network service -
-
-GSocketConnection — A socket connection -
-
-GUnixConnection — A UNIX domain GSocketConnection -
-
-GTcpConnection — A TCP GSocketConnection -
-
-GTcpWrapperConnection — Wrapper for non-GSocketConnection-based, - GSocket-based GIOStreams -
-
-GSocketListener — Helper for accepting network client connections -
-
-GSocketService — Make it easy to implement a network service -
-
-GThreadedSocketService — A threaded GSocketService -
-
-GNetworkMonitor — Network status monitor -
-
-
TLS (SSL) support
-
-
-TLS Overview — TLS (aka SSL) support for GSocketConnection -
-
-GTlsCertificate — TLS certificate -
-
-GTlsConnection — TLS connection type -
-
-GTlsClientConnection — TLS client-side connection -
-
-GTlsServerConnection — TLS server-side connection -
-
-GDtlsConnection — DTLS connection type -
-
-GDtlsClientConnection — DTLS client-side connection -
-
-GDtlsServerConnection — DTLS server-side connection -
-
-GTlsBackend — TLS backend implementation -
-
-GTlsDatabase — TLS database type -
-
-GTlsFileDatabase — TLS file based database type -
-
-GTlsInteraction — Interaction with the user during TLS operations. -
-
-GTlsPassword — TLS Passwords for prompting -
-
-
DNS resolution
-
-
-GResolver — Asynchronous and cancellable DNS resolver -
-
-GProxyResolver — Asynchronous and cancellable network proxy resolver -
-
-GSimpleProxyResolver — Simple proxy resolver implementation -
-
-GSocketConnectable — Interface for potential socket endpoints -
-
-GNetworkAddress — A GSocketConnectable for resolving hostnames -
-
-GNetworkService — A GSocketConnectable for resolving SRV records -
-
-GSrvTarget — DNS SRV record target -
-
-
Low-level D-Bus Support
-
-
-D-Bus Utilities — Various utilities related to D-Bus -
-
-D-Bus Addresses — D-Bus connection endpoints -
-
-D-Bus Introspection Data — Node and interface description data structures -
-
-GDBusError — Mapping D-Bus errors to and from GError -
-
-GDBusMessage — D-Bus Message -
-
-GDBusConnection — D-Bus Connections -
-
-GDBusMethodInvocation — Object for handling remote calls -
-
-GDBusServer — Helper for accepting connections -
-
-GDBusAuthObserver — Object used for authenticating connections -
-
-
High-level D-Bus Support
-
-
-Owning Bus Names — Simple API for owning bus names -
-
-Watching Bus Names — Simple API for watching bus names -
-
-GDBusInterface — Base type for D-Bus interfaces -
-
-GDBusInterfaceSkeleton — Service-side D-Bus interface -
-
-GDBusProxy — Client-side D-Bus interface proxy -
-
-GDBusObject — Base type for D-Bus objects -
-
-GDBusObjectSkeleton — Service-side D-Bus object -
-
-GDBusObjectProxy — Client-side D-Bus object -
-
-GDBusObjectManager — Base type for D-Bus object managers -
-
-GDBusObjectManagerServer — Service-side object manager -
-
-GDBusObjectManagerClient — Client-side object manager -
-
-
Settings
-
-
-GSettings — High-level API for application settings -
-
-GSettingsBackend — Interface for settings backend implementations -
-
-GSettingsSchema, GSettingsSchemaSource — Introspecting and controlling the loading - of GSettings schemas -
-
-
Resources
-
-GResource — Resource framework -
-
Permissions
-
-
-GPermission — An object representing the permission - to perform a certain action -
-
-GSimplePermission — A GPermission that doesn't change value -
-
-
Data Models
-
-
-GListModel — An interface describing a dynamic list of objects -
-
-GListStore — A simple implementation of GListModel -
-
-
Win32 registry support
-
-GWin32RegistryKey — W32 registry access helper -
-
Application support
-
-
-GApplication — Core application class -
-
-GApplicationCommandLine — A command-line invocation of an application -
-
-GActionGroup — A group of actions -
-
-GActionMap — Interface for action containers -
-
-GSimpleActionGroup — A simple GActionGroup implementation -
-
-GAction — An action interface -
-
-GSimpleAction — A simple GAction implementation -
-
-GPropertyAction — A GAction reflecting a GObject property -
-
-GRemoteActionGroup — A GActionGroup that interacts with other processes -
-
-GActionGroup exporter — Export GActionGroups on D-Bus -
-
-GDBusActionGroup — A D-Bus GActionGroup implementation -
-
-GMenuModel — An abstract class representing the contents of a menu -
-
-GMenu — A simple implementation of GMenuModel -
-
-GMenuModel exporter — Export GMenuModels on D-Bus -
-
-GDBusMenuModel — A D-Bus GMenuModel implementation -
-
-GNotification — User Notifications (pop up messages) -
-
-
Extending GIO
-
-
-GVfs — Virtual File System -
-
-GIOModule — Loadable GIO Modules -
-
-Extension Points — Extension Points -
-
-
GIO Tools
-
-
-gio-querymodules — GIO module cache creation -
-
-gsettings — GSettings configuration tool -
-
-glib-compile-schemas — GSettings schema compiler -
-
-glib-compile-resources — GLib resource compiler -
-
-gdbus — Tool for working with D-Bus objects -
-
-gdbus-codegen — D-Bus code and documentation generator -
-
-gresource — GResource tool -
-
-gapplication — D-Bus application launcher -
-
-gio — GIO commandline tool -
-
-
GIO Testing
-
-GTestDBus — D-Bus testing helper -
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/registry.html b/docs/reference/gio/html/registry.html deleted file mode 100644 index 18f2a6fec..000000000 --- a/docs/reference/gio/html/registry.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - -Win32 registry support: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Win32 registry support

-
-GWin32RegistryKey — W32 registry access helper -
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/resolver.html b/docs/reference/gio/html/resolver.html deleted file mode 100644 index 27b8c36b8..000000000 --- a/docs/reference/gio/html/resolver.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - -DNS resolution: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-DNS resolution

-
-
-GResolver — Asynchronous and cancellable DNS resolver -
-
-GProxyResolver — Asynchronous and cancellable network proxy resolver -
-
-GSimpleProxyResolver — Simple proxy resolver implementation -
-
-GSocketConnectable — Interface for potential socket endpoints -
-
-GNetworkAddress — A GSocketConnectable for resolving hostnames -
-
-GNetworkService — A GSocketConnectable for resolving SRV records -
-
-GSrvTarget — DNS SRV record target -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/resources.html b/docs/reference/gio/html/resources.html deleted file mode 100644 index 30baf806c..000000000 --- a/docs/reference/gio/html/resources.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - -Resources: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Resources

-
-GResource — Resource framework -
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/right-insensitive.png b/docs/reference/gio/html/right-insensitive.png deleted file mode 100644 index 4c95785b9..000000000 Binary files a/docs/reference/gio/html/right-insensitive.png and /dev/null differ diff --git a/docs/reference/gio/html/right.png b/docs/reference/gio/html/right.png deleted file mode 100644 index 76260ec88..000000000 Binary files a/docs/reference/gio/html/right.png and /dev/null differ diff --git a/docs/reference/gio/html/running-gio-apps.html b/docs/reference/gio/html/running-gio-apps.html deleted file mode 100644 index 21bf15678..000000000 --- a/docs/reference/gio/html/running-gio-apps.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - -Running GIO applications: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Running GIO applications

-

- GIO inspects a few environment variables in addition to the - ones used by GLib. -

-

XDG_DATA_HOME, XDG_DATA_DIRS - GIO uses these environment variables to locate MIME information. - For more information, see the Shared MIME-info Database - and the Base Directory Specification. -

-

GVFS_DISABLE_FUSE - This variable can be set to keep Gvfs from starting the fuse backend, - which may be unwanted or unnecessary in certain situations. -

-

GIO_USE_VFS - This environment variable can be set to the name of a GVfs - implementation to override the default for debugging purposes. - The GVfs implementation for local files that is included in GIO - has the name "local", the implementation in the gvfs module has - the name "gvfs". Most commonly, system software will set this to "local" - to avoid having `GFile` APIs perform unnecessary DBus calls. -

-

- The following environment variables are only useful for debugging - GIO itself or modules that it loads. They should not be set in a - production environment. -

-

GIO_USE_FILE_MONITOR - This variable can be set to the name of a GFileMonitor - implementation to override the default for debugging purposes. - The GFileMonitor implementation for local files that is included - in GIO on Linux has the name "inotify", others that are built - are built as modules (depending on the platform) are called - "fam" and "fen". -

-

GIO_USE_VOLUME_MONITOR - This variable can be set to the name of a GVolumeMonitor - implementation to override the default for debugging purposes. - The GVolumeMonitor implementation for local files that is included - in GIO has the name "unix", the udisks2-based implementation in the - gvfs module has the name "udisks2". -

-

GIO_USE_TLS - This variable can be set to the name of a GTlsBackend - implementation to override the default for debugging purposes. - GIO does not include a GTlsBackend implementation, the gnutls-based - implementation in the glib-networking module has the name "gnutls". -

-

GIO_MODULE_DIR - When this environment variable is set to a path, GIO will load - modules from this alternate directory instead of the directory - built into GIO. This is useful when running tests, for example. -

-

GIO_EXTRA_MODULES - When this environment variable is set to a path, or a set of - paths separated by a colon, GIO will attempt to load - additional modules from within the path. -

-

GSETTINGS_BACKEND - This variable can be set to the name of a GSettingsBackend - implementation to override the default for debugging purposes. - The memory-based implementation that is included in GIO has - the name "memory", the one in dconf has the name "dconf-settings". -

-

GSETTINGS_SCHEMA_DIR - This variable can be set to the name of a directory that is - considered in addition to the glib-2.0/schemas - subdirectories of the XDG system data dirs when looking - for compiled schemas for GSettings. -

-

DBUS_SYSTEM_BUS_ADDRESS - This variable is consulted to find the address of the D-Bus system - bus. For the format of D-Bus addresses, see the D-Bus - specification. - - Setting this variable overrides platform-specific ways of determining - the system bus address. -

-

DBUS_SESSION_BUS_ADDRESS - This variable is consulted to find the address of the D-Bus session bus. - - Setting this variable overrides platform-specific ways of determining - the session bus address. -

-

DBUS_STARTER_BUS_TYPE - This variable is consulted to find out the 'starter' bus for an - application that has been started via D-Bus activation. The possible - values are 'system' or 'session'. -

-

G_DBUS_DEBUG - This variable can be set to a list of debug options, which - cause GLib to print out different types of debugging - information when using the D-Bus routines. -

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

transport

Show IO activity (e.g. reads and writes)

message

Show all sent and received D-Bus messages

payload

Show payload for all sent and received D-Bus messages (implies message)

call

Trace g_dbus_connection_call() and g_dbus_connection_call_sync() API usage

signal

Show when a D-Bus signal is received

incoming

Show when an incoming D-Bus method call is received

return

Show when a reply is returned via the GDBusMethodInvocation API

emission

Trace g_dbus_connection_emit_signal() API usage

authentication

Show information about connection authentication

address

Show information about D-Bus address lookups and autolaunching

-

- The special value all can be used to turn - on all debug options. The special value - help can be used to print a list of - supported options to standard output. -

-

G_DBUS_COOKIE_SHA1_KEYRING_DIR - Can be used to override the directory used to store the - keyring used in the DBUS_COOKIE_SHA1 - authentication mechanism. Normally the directory used is - .dbus-keyrings in the user's home - directory. -

-

G_DBUS_COOKIE_SHA1_KEYRING_DIR_IGNORE_PERMISSION - If set, the permissions of the directory used to store the - keyring used in the DBUS_COOKIE_SHA1 - authentication mechanism won't be checked. Normally the - directory must be readable only by the user. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/settings.html b/docs/reference/gio/html/settings.html deleted file mode 100644 index a96723a57..000000000 --- a/docs/reference/gio/html/settings.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - -Settings: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Settings

-
-
-GSettings — High-level API for application settings -
-
-GSettingsBackend — Interface for settings backend implementations -
-
-GSettingsSchema, GSettingsSchemaSource — Introspecting and controlling the loading - of GSettings schemas -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/streaming.html b/docs/reference/gio/html/streaming.html deleted file mode 100644 index 5abf8c418..000000000 --- a/docs/reference/gio/html/streaming.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - -Streaming I/O: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Streaming I/O

-
-
-GSeekable — Stream seeking interface -
-
-GInputStream — Base class for implementing streaming input -
-
-GOutputStream — Base class for implementing streaming output -
-
-GIOStream — Base class for implementing read/write streams -
-
-GSimpleIOStream — A wrapper around an input and an output stream. -
-
-GFileInputStream — File input streaming operations -
-
-GFileOutputStream — File output streaming operations -
-
-GFileIOStream — File read and write streaming operations -
-
-GFileDescriptorBased — Interface for file descriptor based IO -
-
-GFilterInputStream — Filter Input Stream -
-
-GFilterOutputStream — Filter Output Stream -
-
-GMemoryInputStream — Streaming input operations on memory chunks -
-
-GMemoryOutputStream — Streaming output operations on memory chunks -
-
-GBufferedInputStream — Buffered Input Stream -
-
-GBufferedOutputStream — Buffered Output Stream -
-
-GDataInputStream — Data Input Stream -
-
-GDataOutputStream — Data Output Stream -
-
-GUnixInputStream — Streaming input operations for UNIX file descriptors -
-
-GUnixOutputStream — Streaming output operations for UNIX file descriptors -
-
-GWin32InputStream — Streaming input operations for Windows file handles -
-
-GWin32OutputStream — Streaming output operations for Windows file handles -
-
-GConverterInputstream — Converter Input Stream -
-
-GConverterOutputstream — Converter Output Stream -
-
-GPollableInputStream — Interface for pollable input streams -
-
-GPollableOutputStream — Interface for pollable output streams -
-
-gpollableutils — Utilities for pollable streams -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/style.css b/docs/reference/gio/html/style.css deleted file mode 100644 index 367542097..000000000 --- a/docs/reference/gio/html/style.css +++ /dev/null @@ -1,479 +0,0 @@ -body -{ - font-family: cantarell, sans-serif; -} -.synopsis, .classsynopsis -{ - /* tango:aluminium 1/2 */ - background: #eeeeec; - background: rgba(238, 238, 236, 0.5); - border: solid 1px rgb(238, 238, 236); - padding: 0.5em; -} -.programlisting -{ - /* tango:sky blue 0/1 */ - /* fallback for no rgba support */ - background: #e6f3ff; - border: solid 1px #729fcf; - background: rgba(114, 159, 207, 0.1); - border: solid 1px rgba(114, 159, 207, 0.2); - padding: 0.5em; -} -.variablelist -{ - padding: 4px; - margin-left: 3em; -} -.variablelist td:first-child -{ - vertical-align: top; -} - -div.gallery-float -{ - float: left; - padding: 10px; -} -div.gallery-float img -{ - border-style: none; -} -div.gallery-spacer -{ - clear: both; -} - -a, a:visited -{ - text-decoration: none; - /* tango:sky blue 2 */ - color: #3465a4; -} -a:hover -{ - text-decoration: underline; - /* tango:sky blue 1 */ - color: #729fcf; -} - -div.informaltable table -{ - border-collapse: separate; - border-spacing: 1em 0.3em; - border: none; -} - -div.informaltable table td, div.informaltable table th -{ - vertical-align: top; -} - -.function_type, -.variable_type, -.property_type, -.signal_type, -.parameter_name, -.struct_member_name, -.union_member_name, -.define_keyword, -.datatype_keyword, -.typedef_keyword -{ - text-align: right; -} - -/* dim non-primary columns */ -.c_punctuation, -.function_type, -.variable_type, -.property_type, -.signal_type, -.define_keyword, -.datatype_keyword, -.typedef_keyword, -.property_flags, -.signal_flags, -.parameter_annotations, -.enum_member_annotations, -.struct_member_annotations, -.union_member_annotations -{ - color: #888a85; -} - -.function_type a, -.function_type a:visited, -.function_type a:hover, -.property_type a, -.property_type a:visited, -.property_type a:hover, -.signal_type a, -.signal_type a:visited, -.signal_type a:hover, -.signal_flags a, -.signal_flags a:visited, -.signal_flags a:hover -{ - color: #729fcf; -} - -td p -{ - margin: 0.25em; -} - -div.table table -{ - border-collapse: collapse; - border-spacing: 0px; - /* tango:aluminium 3 */ - border: solid 1px #babdb6; -} - -div.table table td, div.table table th -{ - /* tango:aluminium 3 */ - border: solid 1px #babdb6; - padding: 3px; - vertical-align: top; -} - -div.table table th -{ - /* tango:aluminium 2 */ - background-color: #d3d7cf; -} - -h4 -{ - color: #555753; - margin-top: 1em; - margin-bottom: 1em; -} - -hr -{ - /* tango:aluminium 1 */ - color: #d3d7cf; - background: #d3d7cf; - border: none 0px; - height: 1px; - clear: both; - margin: 2.0em 0em 2.0em 0em; -} - -dl.toc dt -{ - padding-bottom: 0.25em; -} - -dl.toc > dt -{ - padding-top: 0.25em; - padding-bottom: 0.25em; - font-weight: bold; -} - -dl.toc > dl -{ - padding-bottom: 0.5em; -} - -.parameter -{ - font-style: normal; -} - -.footer -{ - padding-top: 3.5em; - /* tango:aluminium 3 */ - color: #babdb6; - text-align: center; - font-size: 80%; -} - -.informalfigure, -.figure -{ - margin: 1em; -} - -.informalexample, -.example -{ - margin-top: 1em; - margin-bottom: 1em; -} - -.warning -{ - /* tango:orange 0/1 */ - background: #ffeed9; - background: rgba(252, 175, 62, 0.1); - border-color: #ffb04f; - border-color: rgba(252, 175, 62, 0.2); -} -.note -{ - /* tango:chameleon 0/0.5 */ - background: #d8ffb2; - background: rgba(138, 226, 52, 0.1); - border-color: #abf562; - border-color: rgba(138, 226, 52, 0.2); -} -div.blockquote -{ - border-color: #eeeeec; -} -.note, .warning, div.blockquote -{ - padding: 0.5em; - border-width: 1px; - border-style: solid; - margin: 2em; -} -.note p, .warning p -{ - margin: 0; -} - -div.warning h3.title, -div.note h3.title -{ - display: none; -} - -p + div.section -{ - margin-top: 1em; -} - -div.refnamediv, -div.refsynopsisdiv, -div.refsect1, -div.refsect2, -div.toc, -div.section -{ - margin-bottom: 1em; -} - -/* blob links */ -h2 .extralinks, h3 .extralinks -{ - float: right; - /* tango:aluminium 3 */ - color: #babdb6; - font-size: 80%; - font-weight: normal; -} - -.lineart -{ - color: #d3d7cf; - font-weight: normal; -} - -.annotation -{ - /* tango:aluminium 5 */ - color: #555753; - font-weight: normal; -} - -.structfield -{ - font-style: normal; - font-weight: normal; -} - -acronym,abbr -{ - border-bottom: 1px dotted gray; -} - -/* code listings */ - -.listing_code .programlisting .normal, -.listing_code .programlisting .normal a, -.listing_code .programlisting .number, -.listing_code .programlisting .cbracket, -.listing_code .programlisting .symbol { color: #555753; } -.listing_code .programlisting .comment, -.listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ -.listing_code .programlisting .function, -.listing_code .programlisting .function a, -.listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ -.listing_code .programlisting .string { color: #ad7fa8; } /* tango: plum */ -.listing_code .programlisting .keyword, -.listing_code .programlisting .usertype, -.listing_code .programlisting .type, -.listing_code .programlisting .type a { color: #4e9a06; } /* tango: chameleon 3 */ - -.listing_frame { - /* tango:sky blue 1 */ - border: solid 1px #729fcf; - border: solid 1px rgba(114, 159, 207, 0.2); - padding: 0px; -} - -.listing_lines, .listing_code { - margin-top: 0px; - margin-bottom: 0px; - padding: 0.5em; -} -.listing_lines { - /* tango:sky blue 0.5 */ - background: #a6c5e3; - background: rgba(114, 159, 207, 0.2); - /* tango:aluminium 6 */ - color: #2e3436; -} -.listing_code { - /* tango:sky blue 0 */ - background: #e6f3ff; - background: rgba(114, 159, 207, 0.1); -} -.listing_code .programlisting { - /* override from previous */ - border: none 0px; - padding: 0px; - background: none; -} -.listing_lines pre, .listing_code pre { - margin: 0px; -} - -@media screen { - /* these have a as a first child, but since there are no parent selectors - * we can't use that. */ - a.footnote - { - position: relative; - top: 0em ! important; - } - /* this is needed so that the local anchors are displayed below the naviagtion */ - div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] - { - display: inline-block; - position: relative; - top:-5em; - } - /* this seems to be a bug in the xsl style sheets when generating indexes */ - div.index div.index - { - top: 0em; - } - /* make space for the fixed navigation bar and add space at the bottom so that - * link targets appear somewhat close to top - */ - body - { - padding-top: 2.5em; - padding-bottom: 500px; - max-width: 60em; - } - p - { - max-width: 60em; - } - /* style and size the navigation bar */ - table.navigation#top - { - position: fixed; - background: #e2e2e2; - border-bottom: solid 1px #babdb6; - border-spacing: 5px; - margin-top: 0; - margin-bottom: 0; - top: 0; - left: 0; - z-index: 10; - } - table.navigation#top td - { - padding-left: 6px; - padding-right: 6px; - } - .navigation a, .navigation a:visited - { - /* tango:sky blue 3 */ - color: #204a87; - } - .navigation a:hover - { - /* tango:sky blue 2 */ - color: #3465a4; - } - td.shortcuts - { - /* tango:sky blue 2 */ - color: #3465a4; - font-size: 80%; - white-space: nowrap; - } - td.shortcuts .dim - { - color: #babdb6; - } - .navigation .title - { - font-size: 80%; - max-width: none; - margin: 0px; - font-weight: normal; - } -} -@media screen and (min-width: 60em) { - /* screen larger than 60em */ - body { margin: auto; } -} -@media screen and (max-width: 60em) { - /* screen less than 60em */ - #nav_hierarchy { display: none; } - #nav_interfaces { display: none; } - #nav_prerequisites { display: none; } - #nav_derived_interfaces { display: none; } - #nav_implementations { display: none; } - #nav_child_properties { display: none; } - #nav_style_properties { display: none; } - #nav_index { display: none; } - #nav_glossary { display: none; } - .gallery_image { display: none; } - .property_flags { display: none; } - .signal_flags { display: none; } - .parameter_annotations { display: none; } - .enum_member_annotations { display: none; } - .struct_member_annotations { display: none; } - .union_member_annotations { display: none; } - /* now that a column is hidden, optimize space */ - col.parameters_name { width: auto; } - col.parameters_description { width: auto; } - col.struct_members_name { width: auto; } - col.struct_members_description { width: auto; } - col.enum_members_name { width: auto; } - col.enum_members_description { width: auto; } - col.union_members_name { width: auto; } - col.union_members_description { width: auto; } - .listing_lines { display: none; } -} -@media print { - table.navigation { - visibility: collapse; - display: none; - } - div.titlepage table.navigation { - visibility: visible; - display: table; - background: #e2e2e2; - border: solid 1px #babdb6; - margin-top: 0; - margin-bottom: 0; - top: 0; - left: 0; - height: 3em; - } -} - diff --git a/docs/reference/gio/html/subprocesses.html b/docs/reference/gio/html/subprocesses.html deleted file mode 100644 index 96027058b..000000000 --- a/docs/reference/gio/html/subprocesses.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - -Subprocesses: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Subprocesses

-
-
-GSubprocess — Child processes -
-
-GSubprocess Launcher — Environment options for launching a child process -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/testing.html b/docs/reference/gio/html/testing.html deleted file mode 100644 index 0322a2047..000000000 --- a/docs/reference/gio/html/testing.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - -GIO Testing: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-GIO Testing

-
-GTestDBus — D-Bus testing helper -
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/tls.html b/docs/reference/gio/html/tls.html deleted file mode 100644 index 55b5011f3..000000000 --- a/docs/reference/gio/html/tls.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - -TLS (SSL) support: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-TLS (SSL) support

-
-
-TLS Overview — TLS (aka SSL) support for GSocketConnection -
-
-GTlsCertificate — TLS certificate -
-
-GTlsConnection — TLS connection type -
-
-GTlsClientConnection — TLS client-side connection -
-
-GTlsServerConnection — TLS server-side connection -
-
-GDtlsConnection — DTLS connection type -
-
-GDtlsClientConnection — DTLS client-side connection -
-
-GDtlsServerConnection — DTLS server-side connection -
-
-GTlsBackend — TLS backend implementation -
-
-GTlsDatabase — TLS database type -
-
-GTlsFileDatabase — TLS file based database type -
-
-GTlsInteraction — Interaction with the user during TLS operations. -
-
-GTlsPassword — TLS Passwords for prompting -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/tools.html b/docs/reference/gio/html/tools.html deleted file mode 100644 index a4e8dd000..000000000 --- a/docs/reference/gio/html/tools.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - -GIO Tools: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-GIO Tools

-
-
-gio-querymodules — GIO module cache creation -
-
-gsettings — GSettings configuration tool -
-
-glib-compile-schemas — GSettings schema compiler -
-
-glib-compile-resources — GLib resource compiler -
-
-gdbus — Tool for working with D-Bus objects -
-
-gdbus-codegen — D-Bus code and documentation generator -
-
-gresource — GResource tool -
-
-gapplication — D-Bus application launcher -
-
-gio — GIO commandline tool -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/types.html b/docs/reference/gio/html/types.html deleted file mode 100644 index 1f5bd7703..000000000 --- a/docs/reference/gio/html/types.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - -File types and applications: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-File types and applications

-
-
-GContentType — Platform-specific content typing -
-
-GAppInfo — Application information and launch contexts -
-
-GAppInfoMonitor — Monitor application information for changes -
-
-GDesktopAppInfo — Application information from desktop files -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/up-insensitive.png b/docs/reference/gio/html/up-insensitive.png deleted file mode 100644 index f40498606..000000000 Binary files a/docs/reference/gio/html/up-insensitive.png and /dev/null differ diff --git a/docs/reference/gio/html/up.png b/docs/reference/gio/html/up.png deleted file mode 100644 index 80b4b37e9..000000000 Binary files a/docs/reference/gio/html/up.png and /dev/null differ diff --git a/docs/reference/gio/html/utils.html b/docs/reference/gio/html/utils.html deleted file mode 100644 index eeda56458..000000000 --- a/docs/reference/gio/html/utils.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - -File-related Utilities: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-File-related Utilities

-
-GFilenameCompleter — Filename Completer -
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/html/volume_mon.html b/docs/reference/gio/html/volume_mon.html deleted file mode 100644 index f1a5bce42..000000000 --- a/docs/reference/gio/html/volume_mon.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - -Volumes and Drives: GIO Reference Manual - - - - - - - - - - - - - - - - -
-

-Volumes and Drives

-
-
-GVolumeMonitor — Volume Monitor -
-
-GVolume — Volume management -
-
-GMount — Mount management -
-
-GDrive — Drive management -
-
-Unix Mounts — UNIX mounts -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gio/version.xml b/docs/reference/gio/version.xml deleted file mode 100644 index 908eabe3d..000000000 --- a/docs/reference/gio/version.xml +++ /dev/null @@ -1 +0,0 @@ -2.52.3 diff --git a/docs/reference/glib/Makefile.in b/docs/reference/glib/Makefile.in deleted file mode 100644 index 7affb1ab2..000000000 --- a/docs/reference/glib/Makefile.in +++ /dev/null @@ -1,1071 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -*- mode: makefile -*- - -#################################### -# Everything below here is generic # -#################################### -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@ENABLE_MAN_TRUE@am__append_1 = \ -@ENABLE_MAN_TRUE@ glib-gettextize.1 \ -@ENABLE_MAN_TRUE@ gtester.1 \ -@ENABLE_MAN_TRUE@ gtester-report.1 - -subdir = docs/reference/glib -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4macros/attributes.m4 \ - $(top_srcdir)/m4macros/glibtests.m4 \ - $(top_srcdir)/m4macros/gtk-doc.m4 \ - $(top_srcdir)/m4macros/libtool.m4 \ - $(top_srcdir)/m4macros/ltoptions.m4 \ - $(top_srcdir)/m4macros/ltsugar.m4 \ - $(top_srcdir)/m4macros/ltversion.m4 \ - $(top_srcdir)/m4macros/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/acglib.m4 \ - $(top_srcdir)/glib/libcharset/codeset.m4 \ - $(top_srcdir)/glib/libcharset/glibc21.m4 \ - $(top_srcdir)/m4macros/glib-gettext.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = version.xml -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -man1dir = $(mandir)/man1 -am__installdirs = "$(DESTDIR)$(man1dir)" -NROFF = nroff -MANS = $(man_MANS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/version.xml.in \ - $(top_srcdir)/gtk-doc.make -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ABS_TAPSET_DIR = @ABS_TAPSET_DIR@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CARBON_LIBS = @CARBON_LIBS@ -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COCOA_LIBS = @COCOA_LIBS@ -CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ -DBUS1_CFLAGS = @DBUS1_CFLAGS@ -DBUS1_LIBS = @DBUS1_LIBS@ -DBUS_DAEMON = @DBUS_DAEMON@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DTRACE = @DTRACE@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FAM_LIBS = @FAM_LIBS@ -FGREP = @FGREP@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GIO = @GIO@ -GIO_MODULE_DIR = @GIO_MODULE_DIR@ -GLIBC21 = @GLIBC21@ -GLIB_BINARY_AGE = @GLIB_BINARY_AGE@ -GLIB_DEBUG_FLAGS = @GLIB_DEBUG_FLAGS@ -GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ -GLIB_HIDDEN_VISIBILITY_CFLAGS = @GLIB_HIDDEN_VISIBILITY_CFLAGS@ -GLIB_INTERFACE_AGE = @GLIB_INTERFACE_AGE@ -GLIB_LINK_FLAGS = @GLIB_LINK_FLAGS@ -GLIB_MAJOR_VERSION = @GLIB_MAJOR_VERSION@ -GLIB_MICRO_VERSION = @GLIB_MICRO_VERSION@ -GLIB_MINOR_VERSION = @GLIB_MINOR_VERSION@ -GLIB_RUNTIME_LIBDIR = @GLIB_RUNTIME_LIBDIR@ -GLIB_VERSION = @GLIB_VERSION@ -GLIB_WARN_CFLAGS = @GLIB_WARN_CFLAGS@ -GLIB_WIN32_STATIC_COMPILATION_DEFINE = @GLIB_WIN32_STATIC_COMPILATION_DEFINE@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ -GREP = @GREP@ -GSPAWN = @GSPAWN@ -GTHREAD_COMPILE_IMPL_DEFINES = @GTHREAD_COMPILE_IMPL_DEFINES@ -GTKDOC_CHECK = @GTKDOC_CHECK@ -GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ -GTKDOC_MKPDF = @GTKDOC_MKPDF@ -GTKDOC_REBASE = @GTKDOC_REBASE@ -G_LIBS_EXTRA = @G_LIBS_EXTRA@ -G_MODULE_BROKEN_RTLD_GLOBAL = @G_MODULE_BROKEN_RTLD_GLOBAL@ -G_MODULE_HAVE_DLERROR = @G_MODULE_HAVE_DLERROR@ -G_MODULE_IMPL = @G_MODULE_IMPL@ -G_MODULE_LDFLAGS = @G_MODULE_LDFLAGS@ -G_MODULE_LIBS = @G_MODULE_LIBS@ -G_MODULE_LIBS_EXTRA = @G_MODULE_LIBS_EXTRA@ -G_MODULE_NEED_USCORE = @G_MODULE_NEED_USCORE@ -G_MODULE_PLUGIN_LIBS = @G_MODULE_PLUGIN_LIBS@ -G_MODULE_SUPPORTED = @G_MODULE_SUPPORTED@ -G_THREAD_CFLAGS = @G_THREAD_CFLAGS@ -G_THREAD_LIBS = @G_THREAD_LIBS@ -G_THREAD_LIBS_EXTRA = @G_THREAD_LIBS_EXTRA@ -G_THREAD_LIBS_FOR_GTHREAD = @G_THREAD_LIBS_FOR_GTHREAD@ -HTML_DIR = @HTML_DIR@ -ICONV_LIBS = @ICONV_LIBS@ -INDENT = @INDENT@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLLIBS = @INTLLIBS@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBELF_CFLAGS = @LIBELF_CFLAGS@ -LIBELF_LIBS = @LIBELF_LIBS@ -LIBFFI_CFLAGS = @LIBFFI_CFLAGS@ -LIBFFI_LIBS = @LIBFFI_LIBS@ -LIBMOUNT_CFLAGS = @LIBMOUNT_CFLAGS@ -LIBMOUNT_LIBS = @LIBMOUNT_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_EXE_MACHINE_FLAG = @LIB_EXE_MACHINE_FLAG@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LTP = @LTP@ -LTP_GENHTML = @LTP_GENHTML@ -LT_AGE = @LT_AGE@ -LT_CURRENT = @LT_CURRENT@ -LT_CURRENT_MINUS_AGE = @LT_CURRENT_MINUS_AGE@ -LT_RELEASE = @LT_RELEASE@ -LT_REVISION = @LT_REVISION@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MSGFMT = @MSGFMT@ -MSGFMT_OPTS = @MSGFMT_OPTS@ -NAMESER_COMPAT_INCLUDE = @NAMESER_COMPAT_INCLUDE@ -NETWORK_LIBS = @NETWORK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PCRE_CFLAGS = @PCRE_CFLAGS@ -PCRE_LIBS = @PCRE_LIBS@ -PCRE_REQUIRES = @PCRE_REQUIRES@ -PCRE_WARN_CFLAGS = @PCRE_WARN_CFLAGS@ -PERL = @PERL@ -PERL_PATH = @PERL_PATH@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PLATFORMDEP = @PLATFORMDEP@ -POFILES = @POFILES@ -POSUB = @POSUB@ -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -REBUILD = @REBUILD@ -SED = @SED@ -SELINUX_LIBS = @SELINUX_LIBS@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHTOOL = @SHTOOL@ -STRIP = @STRIP@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -WINDRES = @WINDRES@ -WSPIAPI_INCLUDE = @WSPIAPI_INCLUDE@ -XATTR_LIBS = @XATTR_LIBS@ -XGETTEXT = @XGETTEXT@ -XMLCATALOG = @XMLCATALOG@ -XML_CATALOG_FILE = @XML_CATALOG_FILE@ -XSLTPROC = @XSLTPROC@ -ZLIB_CFLAGS = @ZLIB_CFLAGS@ -ZLIB_LIBS = @ZLIB_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -config_h_INCLUDES = @config_h_INCLUDES@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gio_INCLUDES = @gio_INCLUDES@ -glib_INCLUDES = @glib_INCLUDES@ -gmodule_INCLUDES = @gmodule_INCLUDES@ -gobject_INCLUDES = @gobject_INCLUDES@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -installed_test_metadir = @installed_test_metadir@ -installed_testdir = @installed_testdir@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -ms_librarian = @ms_librarian@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pyexecdir = @pyexecdir@ -pythondir = @pythondir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = 1.6 - -# The name of the module. -DOC_MODULE = glib - -# The top-level SGML file. -DOC_MAIN_SGML_FILE = glib-docs.xml - -# The directory containing the source code. Relative to $(srcdir) -DOC_SOURCE_DIR = \ - $(top_srcdir)/glib $(top_srcdir)/gmodule \ - $(top_builddir)/glib $(top_builddir)/gmodule - - -# Extra options to supply to gtkdoc-scan -SCAN_OPTIONS = --deprecated-guards="G_DISABLE_DEPRECATED" --ignore-decorators="GLIB_VAR|G_GNUC_WARN_UNUSED_RESULT" - -# Extra options to supply to gtkdoc-mkdb -MKDB_OPTIONS = --output-format=xml --name-space=g - -# Used for dependencies -HFILE_GLOB = \ - $(top_srcdir)/glib/*.h \ - $(top_srcdir)/gmodule/*.h \ - $(top_builddir)/glib/glibconfig.h - -CFILE_GLOB = $(top_srcdir)/glib/*.c $(top_srcdir)/gmodule/*.c - -# Ignore some private headers -IGNORE_HFILES = \ - gallocator.h \ - gdatasetprivate.h \ - glibintl.h \ - gbsearcharray.h \ - glib-private.h \ - gmoduleconf.h \ - gthreadprivate.h \ - gunibreak.h \ - gunicomp.h \ - gunidecomp.h \ - gunichartables.h \ - glib_probes.h \ - glib_trace.h \ - libcharset.h \ - gdebug.h \ - gprintfint.h \ - gmirroringtable.h \ - gscripttable.h \ - glib-mirroring-tab \ - gnulib \ - pcre \ - update-pcre \ - gbytesprivate.h \ - gvariant-internal.h \ - gvariant-serialiser.h \ - gvariant-core.h \ - gvarianttypeinfo.h \ - gwakeup.h \ - gtranslit-data.h \ - glib-init.h \ - gconstructor.h \ - valgrind.h - - -# Images to copy into HTML directory -HTML_IMAGES = \ - file-name-encodings.png \ - mainloop-states.gif \ - Sorted_binary_tree_breadth-first_traversal.svg \ - Sorted_binary_tree_inorder.svg \ - Sorted_binary_tree_postorder.svg \ - Sorted_binary_tree_preorder.svg - - -# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE) -content_files = \ - cross.xml \ - running.xml \ - building.xml \ - changes.xml \ - compiling.xml \ - programming.xml \ - resources.xml \ - regex-syntax.xml \ - version.xml \ - glib-gettextize.xml \ - gtester.xml \ - gtester-report.xml \ - gvariant-varargs.xml \ - gvariant-text.xml - -expand_content_files = \ - compiling.xml - - -# Extra options to supply to gtkdoc-fixref -FIXXREF_OPTIONS = --extra-dir=$(srcdir)/../gobject/html --extra-dir=$(srcdir)/../gio/html -@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = -@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute - -# We set GPATH here; this gives us semantics for GNU make -# which are more like other make's VPATH, when it comes to -# whether a source that is a target of one rule is then -# searched for in VPATH/GPATH. -# -GPATH = $(srcdir) -TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) -SETUP_FILES = \ - $(content_files) \ - $(expand_content_files) \ - $(DOC_MAIN_SGML_FILE) \ - $(DOC_MODULE)-sections.txt \ - $(DOC_MODULE)-overrides.txt - - -# include common portion ... - -# Other files to distribute -EXTRA_DIST = $(HTML_IMAGES) $(SETUP_FILES) file-name-encodings.png \ - file-name-encodings.sxd mainloop-states.fig \ - mainloop-states.png mainloop-states.eps \ - Sorted_binary_tree_breadth-first_traversal.svg \ - Sorted_binary_tree_inorder.svg \ - Sorted_binary_tree_postorder.svg \ - Sorted_binary_tree_preorder.svg version.xml.in $(man_MANS) -DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \ - html-build.stamp pdf-build.stamp \ - sgml.stamp html.stamp pdf.stamp - -SCANOBJ_FILES = \ - $(DOC_MODULE).args \ - $(DOC_MODULE).hierarchy \ - $(DOC_MODULE).interfaces \ - $(DOC_MODULE).prerequisites \ - $(DOC_MODULE).signals - -REPORT_FILES = \ - $(DOC_MODULE)-undocumented.txt \ - $(DOC_MODULE)-undeclared.txt \ - $(DOC_MODULE)-unused.txt - -CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) \ - gtkdoc-check.test $(man_MANS) -@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = -@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp -@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = -@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp - -#### setup #### -GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_$(V)) -GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_SETUP_0 = @echo " DOC Preparing build"; - -#### scan #### -GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_$(V)) -GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_SCAN_0 = @echo " DOC Scanning header files"; -GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_$(V)) -GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_INTROSPECT_0 = @echo " DOC Introspecting gobjects"; - -#### xml #### -GTK_DOC_V_XML = $(GTK_DOC_V_XML_$(V)) -GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_XML_0 = @echo " DOC Building XML"; - -#### html #### -GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_$(V)) -GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_HTML_0 = @echo " DOC Building HTML"; -GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_$(V)) -GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_XREF_0 = @echo " DOC Fixing cross-references"; - -#### pdf #### -GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_$(V)) -GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_PDF_0 = @echo " DOC Building PDF"; - -######################################################################## -man_MANS = $(am__append_1) -@ENABLE_MAN_TRUE@XSLTPROC_FLAGS = \ -@ENABLE_MAN_TRUE@ --nonet \ -@ENABLE_MAN_TRUE@ --stringparam man.output.quietly 1 \ -@ENABLE_MAN_TRUE@ --stringparam funcsynopsis.style ansi \ -@ENABLE_MAN_TRUE@ --stringparam man.th.extra1.suppress 1 \ -@ENABLE_MAN_TRUE@ --stringparam man.authors.section.enabled 0 \ -@ENABLE_MAN_TRUE@ --stringparam man.copyright.section.enabled 0 - -all: all-am - -.SUFFIXES: -.SUFFIXES: .1 .xml -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/reference/glib/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/reference/glib/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; -$(top_srcdir)/gtk-doc.make $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -version.xml: $(top_builddir)/config.status $(srcdir)/version.xml.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - @list1=''; \ - list2='$(man_MANS)'; \ - test -n "$(man1dir)" \ - && test -n "`echo $$list1$$list2`" \ - || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ - { for i in $$list1; do echo "$$i"; done; \ - if test -n "$$list2"; then \ - for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.1[a-z]*$$/p'; \ - fi; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am -check: check-am -@ENABLE_GTK_DOC_FALSE@all-local: -all-am: Makefile $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-local mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-local - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-data-local install-man - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic \ - maintainer-clean-local - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-local uninstall-man - -uninstall-man: uninstall-man1 - -.MAKE: install-am install-strip - -.PHONY: all all-am all-local check check-am clean clean-generic \ - clean-libtool clean-local cscopelist-am ctags-am dist-hook \ - distclean distclean-generic distclean-libtool distclean-local \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-data-local \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-man1 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - maintainer-clean-local mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ - uninstall-am uninstall-local uninstall-man uninstall-man1 - -.PRECIOUS: Makefile - - -gtkdoc-check.test: Makefile - $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ - echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ - chmod +x $@ - -all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) -.PHONY: all-gtk-doc - -@ENABLE_GTK_DOC_TRUE@all-local: all-gtk-doc - -docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) - -$(REPORT_FILES): sgml-build.stamp - -setup-build.stamp: - -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ - if test "x$$files" != "x" ; then \ - for file in $$files ; do \ - destdir=`dirname $(abs_builddir)/$$file`; \ - test -d "$$destdir" || mkdir -p "$$destdir"; \ - test -f $(abs_srcdir)/$$file && \ - cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ - done; \ - fi; \ - fi - $(AM_V_at)touch setup-build.stamp - -scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) - $(GTK_DOC_V_SCAN)_source_dir='' ; \ - for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) - $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ - scanobj_options=""; \ - gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$$?" = "0"; then \ - if test "x$(V)" = "x1"; then \ - scanobj_options="--verbose"; \ - fi; \ - fi; \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ - gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ - else \ - for i in $(SCANOBJ_FILES) ; do \ - test -f $$i || touch $$i ; \ - done \ - fi - $(AM_V_at)touch scan-build.stamp - -$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp - @true - -sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent - $(GTK_DOC_V_XML)_source_dir='' ; \ - for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) - $(AM_V_at)touch sgml-build.stamp - -sgml.stamp: sgml-build.stamp - @true - -xml/gtkdocentities.ent: Makefile - $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ - echo ""; \ - echo ""; \ - echo ""; \ - echo ""; \ - echo ""; \ - echo ""; \ - echo ""; \ - ) > $@ - -html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) - $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ - mkhtml_options=""; \ - gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$$?" = "0"; then \ - if test "x$(V)" = "x1"; then \ - mkhtml_options="$$mkhtml_options --verbose"; \ - fi; \ - fi; \ - gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ - if test "$$?" = "0"; then \ - mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ - fi; \ - cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - -@test "x$(HTML_IMAGES)" = "x" || \ - for file in $(HTML_IMAGES) ; do \ - test -f $(abs_srcdir)/$$file && cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ - test -f $(abs_builddir)/$$file && cp $(abs_builddir)/$$file $(abs_builddir)/html; \ - done; - $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) - $(AM_V_at)touch html-build.stamp - -pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) - $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ - mkpdf_options=""; \ - gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$$?" = "0"; then \ - if test "x$(V)" = "x1"; then \ - mkpdf_options="$$mkpdf_options --verbose"; \ - fi; \ - fi; \ - if test "x$(HTML_IMAGES)" != "x"; then \ - for img in $(HTML_IMAGES); do \ - part=`dirname $$img`; \ - echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ - if test $$? != 0; then \ - mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ - fi; \ - done; \ - fi; \ - gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) - $(AM_V_at)touch pdf-build.stamp - -############## - -clean-local: - @rm -f *~ *.bak - @rm -rf .libs - @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ - rm -f $(DOC_MODULE).types; \ - fi - @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ - rm -f $(DOC_MODULE)-sections.txt; \ - fi - -distclean-local: - @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ - $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt - @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ - fi - -maintainer-clean-local: - @rm -rf xml html - -install-data-local: - @installfiles=`echo $(builddir)/html/*`; \ - if test "$$installfiles" = '$(builddir)/html/*'; \ - then echo 1>&2 'Nothing to install' ; \ - else \ - if test -n "$(DOC_MODULE_VERSION)"; then \ - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ - else \ - installdir="$(DESTDIR)$(TARGET_DIR)"; \ - fi; \ - $(mkinstalldirs) $${installdir} ; \ - for i in $$installfiles; do \ - echo ' $(INSTALL_DATA) '$$i ; \ - $(INSTALL_DATA) $$i $${installdir}; \ - done; \ - if test -n "$(DOC_MODULE_VERSION)"; then \ - mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ - $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ - fi; \ - $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ - fi - -uninstall-local: - @if test -n "$(DOC_MODULE_VERSION)"; then \ - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ - else \ - installdir="$(DESTDIR)$(TARGET_DIR)"; \ - fi; \ - rm -rf $${installdir} - -# -# Require gtk-doc when making dist -# -@HAVE_GTK_DOC_TRUE@dist-check-gtkdoc: docs -@HAVE_GTK_DOC_FALSE@dist-check-gtkdoc: -@HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc is needed to run 'make dist'. ***" -@HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc was not found when 'configure' ran. ***" -@HAVE_GTK_DOC_FALSE@ @echo "*** please install gtk-doc and rerun 'configure'. ***" -@HAVE_GTK_DOC_FALSE@ @false - -dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local - @mkdir $(distdir)/html - @cp ./html/* $(distdir)/html - @-cp ./$(DOC_MODULE).pdf $(distdir)/ - @-cp ./$(DOC_MODULE).types $(distdir)/ - @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ - @cd $(distdir) && rm -f $(DISTCLEANFILES) - @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html - -.PHONY : dist-hook-local docs - -@ENABLE_MAN_TRUE@.xml.1: -@ENABLE_MAN_TRUE@ $(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< - -CLEANFILES ?= - -dist-hook-local: all-local - -glib-docs-clean: clean - cd $(srcdir) && rm -rf xml html - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/docs/reference/glib/glib-gettextize.1 b/docs/reference/glib/glib-gettextize.1 deleted file mode 100644 index 33baa5ba8..000000000 --- a/docs/reference/glib/glib-gettextize.1 +++ /dev/null @@ -1,79 +0,0 @@ -'\" t -.\" Title: glib-gettextize -.\" Author: Owen Taylor -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 06/22/2017 -.\" Manual: User Commands -.\" Source: GLib -.\" Language: English -.\" -.TH "GLIB\-GETTEXTIZE" "1" "" "GLib" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -glib-gettextize \- gettext internationalization utility -.SH "SYNOPSIS" -.HP \w'\fBglib\-gettextize\fR\ 'u -\fBglib\-gettextize\fR [OPTION...] [DIRECTORY] -.SH "DESCRIPTION" -.PP -\fBglib\-gettextize\fR -helps to prepare a source package for being internationalized through -gettext\&. It is a variant of the -\fBgettextize\fR -that ships with -gettext\&. -.PP -\fBglib\-gettextize\fR -differs from -\fBgettextize\fR -in that it doesn\*(Aqt create an -intl/ -subdirectory and doesn\*(Aqt modify -po/ChangeLog -(note that newer versions of -\fBgettextize\fR -behave like this when called with the -\fB\-\-no\-changelog\fR -option)\&. -.SH "OPTIONS" -.PP -\fB\-\-help\fR -.RS 4 -print help and exit -.RE -.PP -\fB\-\-version\fR -.RS 4 -print version information and exit -.RE -.PP -\fB\-c\fR, \fB\-\-copy\fR -.RS 4 -copy files instead of making symlinks -.RE -.PP -\fB\-f\fR, \fB\-\-force\fR -.RS 4 -force writing of new files even if old ones exist -.RE -.SH "SEE ALSO" -.PP -\fBgettextize\fR(1) diff --git a/docs/reference/glib/gtester-report.1 b/docs/reference/glib/gtester-report.1 deleted file mode 100644 index 4264034e5..000000000 --- a/docs/reference/glib/gtester-report.1 +++ /dev/null @@ -1,57 +0,0 @@ -'\" t -.\" Title: gtester-report -.\" Author: Tim Janik -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 06/22/2017 -.\" Manual: User Commands -.\" Source: GLib -.\" Language: English -.\" -.TH "GTESTER\-REPORT" "1" "" "GLib" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -gtester-report \- test report formatting utility -.SH "SYNOPSIS" -.HP \w'\fBgtester\-report\fR\ 'u -\fBgtester\-report\fR [option...] [gtester\-log] -.SH "DESCRIPTION" -.PP -\fBgtester\-report\fR -is a script which converts the XML output generated by gtester into HTML\&. -.SH "OPTIONS" -.PP -\fB\-h\fR, \fB\-\-help\fR -.RS 4 -print help and exit -.RE -.PP -\fB\-v\fR, \fB\-\-version\fR -.RS 4 -print version information and exit -.RE -.PP -\fB\-s\fR, \fB\-\-subunit\fR -.RS 4 -Output subunit\&. Needs python\-subunit\&. -.RE -.SH "SEE ALSO" -.PP -\fBgtester\fR(1) diff --git a/docs/reference/glib/gtester.1 b/docs/reference/glib/gtester.1 deleted file mode 100644 index e98e70481..000000000 --- a/docs/reference/glib/gtester.1 +++ /dev/null @@ -1,141 +0,0 @@ -'\" t -.\" Title: gtester -.\" Author: Tim Janik -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 06/22/2017 -.\" Manual: User Commands -.\" Source: GLib -.\" Language: English -.\" -.TH "GTESTER" "1" "" "GLib" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -gtester \- test running utility -.SH "SYNOPSIS" -.HP \w'\fBgtester\fR\ 'u -\fBgtester\fR [OPTION...] [testprogram] -.SH "DESCRIPTION" -.PP -\fBgtester\fR -is a utility to run unit tests that have been written using the GLib test framework\&. -.PP -When called with the -\fB\-o\fR -option, -\fBgtester\fR -writes an XML report of the test results, which can be converted into HTML using the -\fBgtester\-report\fR -utility\&. -.SH "OPTIONS" -.PP -\fB\-h\fR, \fB\-\-help\fR -.RS 4 -print help and exit -.RE -.PP -\fB\-v\fR, \fB\-\-version\fR -.RS 4 -print version information and exit -.RE -.PP -\fB\-\-g\-fatal\-warnings\fR -.RS 4 -make warnings fatal -.RE -.PP -\fB\-k\fR, \fB\-\-keep\-going\fR -.RS 4 -continue running after tests failed -.RE -.PP -\fB\-l\fR -.RS 4 -list paths of available test cases -.RE -.PP -\fB\-m=\fR\fB\fIMODE\fR\fR -.RS 4 -run test cases in -\fIMODE\fR, which can be one of: -.PP -\fBperf\fR -.RS 4 -run performance tests -.RE -.PP -\fBslow\fR, \fBthorough\fR -.RS 4 -run slow tests, or repeat non\-deterministic tests more often -.RE -.PP -\fBquick\fR -.RS 4 -do not run slow or performance tests, or do extra repeats of non\-deterministic tests (default) -.RE -.PP -\fBundefined\fR -.RS 4 -run test cases that deliberately provoke checks or assertion failures, if implemented (default) -.RE -.PP -\fBno\-undefined\fR -.RS 4 -do not run test cases that deliberately provoke checks or assertion failures -.RE -.sp -.RE -.PP -\fB\-p=\fR\fB\fITESTPATH\fR\fR -.RS 4 -only run test cases matching -\fITESTPATH\fR -.RE -.PP -\fB\-s=\fR\fB\fITESTPATH\fR\fR -.RS 4 -skip test cases matching -\fITESTPATH\fR -.RE -.PP -\fB\-\-seed=\fR\fB\fISEEDSTRING\fR\fR -.RS 4 -run all test cases with random number seed -\fISEEDSTRING\fR -.RE -.PP -\fB\-o=\fR\fB\fILOGFILE\fR\fR -.RS 4 -write the test log to -\fILOGFILE\fR -.RE -.PP -\fB\-q\fR, \fB\-\-quiet\fR -.RS 4 -suppress per test binary output -.RE -.PP -\fB\-\-verbose\fR -.RS 4 -report success per testcase -.RE -.SH "SEE ALSO" -.PP -\fBgtester-report\fR(1) diff --git a/docs/reference/glib/html/Sorted_binary_tree_breadth-first_traversal.svg b/docs/reference/glib/html/Sorted_binary_tree_breadth-first_traversal.svg deleted file mode 100644 index 697d7dbb6..000000000 --- a/docs/reference/glib/html/Sorted_binary_tree_breadth-first_traversal.svg +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - sorted_binary_tree - - C - - C - - - E - - E - - - H - - H - - - A - - A - - - D - - D - - - D->C - - - - - D->E - - - - - I - - I - - - I->H - - - - - B - - B - - - B->A - - - - - B->D - - - - - G - - G - - - G->I - - - - - F - - F - - - F->B - - - - - F->G - - - - - diff --git a/docs/reference/glib/html/Sorted_binary_tree_inorder.svg b/docs/reference/glib/html/Sorted_binary_tree_inorder.svg deleted file mode 100644 index 3927430da..000000000 --- a/docs/reference/glib/html/Sorted_binary_tree_inorder.svg +++ /dev/null @@ -1,753 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - sorted_binary_tree - - C - - C - - - E - - E - - - H - - H - - - A - - A - - - D - - D - - - D->C - - - - - D->E - - - - - I - - I - - - I->H - - - - - B - - B - - - B->A - - - - - B->D - - - - - G - - G - - - G->I - - - - - F - - F - - - F->B - - - - - F->G - - - - - - - - - - - - - - - - diff --git a/docs/reference/glib/html/Sorted_binary_tree_postorder.svg b/docs/reference/glib/html/Sorted_binary_tree_postorder.svg deleted file mode 100644 index 1160e42b3..000000000 --- a/docs/reference/glib/html/Sorted_binary_tree_postorder.svg +++ /dev/null @@ -1,750 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - sorted_binary_tree - - C - - C - - - E - - E - - - H - - H - - - A - - A - - - D - - D - - - D->C - - - - - D->E - - - - - I - - I - - - I->H - - - - - B - - B - - - B->A - - - - - B->D - - - - - G - - G - - - G->I - - - - - F - - F - - - F->B - - - - - F->G - - - - - - - - - - - - - - - - diff --git a/docs/reference/glib/html/Sorted_binary_tree_preorder.svg b/docs/reference/glib/html/Sorted_binary_tree_preorder.svg deleted file mode 100644 index ae3d22cb3..000000000 --- a/docs/reference/glib/html/Sorted_binary_tree_preorder.svg +++ /dev/null @@ -1,750 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - sorted_binary_tree - - C - - C - - - E - - E - - - H - - H - - - A - - A - - - D - - D - - - D->C - - - - - D->E - - - - - I - - I - - - I->H - - - - - B - - B - - - B->A - - - - - B->D - - - - - G - - G - - - G->I - - - - - F - - F - - - F->B - - - - - F->G - - - - - - - - - - - - - - - - diff --git a/docs/reference/glib/html/annotation-glossary.html b/docs/reference/glib/html/annotation-glossary.html deleted file mode 100644 index abd90a070..000000000 --- a/docs/reference/glib/html/annotation-glossary.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - -Annotation Glossary: GLib Reference Manual - - - - - - - - - - - - - - - -
-

-Annotation Glossary

-

A

-
array
-

Parameter points to an array of items.

-

C

-
closure
-

This parameter is a 'user_data', for callbacks; many bindings can pass NULL here.

-
constructor
-

This symbol is a constructor, not a static method.

-

D

-
default
-

Default parameter value (for in case the shadows-to function has less parameters).

-
destroy
-

This parameter is a 'destroy_data', for callbacks.

-

E

-
element-type
-

Generics and defining elements of containers and arrays.

-

I

-
in
-

Parameter for input. Default is transfer none.

-
inout
-

Parameter for input and for returning results. Default is transfer full.

-

N

-
not nullable
-

NULL must not be passed as the value in, out, in-out; or as a return value.

-
nullable
-

NULL may be passed as the value in, out, in-out; or as a return value.

-

O

-
optional
-

NULL may be passed instead of a pointer to a location.

-
out
-

Parameter for returning results. Default is transfer full.

-
out callee-allocates
-

Out parameter, where caller must allocate storage.

-
out caller-allocates
-

Out parameter, where caller must allocate storage.

-

R

-
rename-to
-

Rename the original symbol's name to SYMBOL.

-

S

-
scope async
-

The callback is valid until first called.

-
skip
-

Exposed in C code, not necessarily available in other languages.

-

T

-
transfer container
-

Free data container after the code is done.

-
transfer full
-

Free data after the code is done.

-
transfer none
-

Don't free data after the code is done.

-
type
-

Override the parsed C type with given type.

-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/api-index-full.html b/docs/reference/glib/html/api-index-full.html deleted file mode 100644 index 3c96bcccf..000000000 --- a/docs/reference/glib/html/api-index-full.html +++ /dev/null @@ -1,9249 +0,0 @@ - - - - -Index: GLib Reference Manual - - - - - - - - - - - - - - - - -
-

-Index

-

A

-
-ABS, macro in Standard Macros -
-
-
-g_access, function in File Utilities -
-
-
-g_alloca, macro in Memory Allocation -
-
-
-GArray, struct in Arrays -
-
-
-g_array_append_val, macro in Arrays -
-
-
-g_array_append_vals, function in Arrays -
-
-
-g_array_free, function in Arrays -
-
-
-g_array_get_element_size, function in Arrays -
-
-
-g_array_index, macro in Arrays -
-
-
-g_array_insert_val, macro in Arrays -
-
-
-g_array_insert_vals, function in Arrays -
-
-
-g_array_new, function in Arrays -
-
-
-g_array_prepend_val, macro in Arrays -
-
-
-g_array_prepend_vals, function in Arrays -
-
-
-g_array_ref, function in Arrays -
-
-
-g_array_remove_index, function in Arrays -
-
-
-g_array_remove_index_fast, function in Arrays -
-
-
-g_array_remove_range, function in Arrays -
-
-
-g_array_set_clear_func, function in Arrays -
-
-
-g_array_set_size, function in Arrays -
-
-
-g_array_sized_new, function in Arrays -
-
-
-g_array_sort, function in Arrays -
-
-
-g_array_sort_with_data, function in Arrays -
-
-
-g_array_unref, function in Arrays -
-
-
-g_ascii_digit_value, function in String Utility Functions -
-
-
-g_ascii_dtostr, function in String Utility Functions -
-
-
-G_ASCII_DTOSTR_BUF_SIZE, macro in String Utility Functions -
-
-
-g_ascii_formatd, function in String Utility Functions -
-
-
-g_ascii_isalnum, function in String Utility Functions -
-
-
-g_ascii_isalpha, function in String Utility Functions -
-
-
-g_ascii_iscntrl, function in String Utility Functions -
-
-
-g_ascii_isdigit, function in String Utility Functions -
-
-
-g_ascii_isgraph, function in String Utility Functions -
-
-
-g_ascii_islower, function in String Utility Functions -
-
-
-g_ascii_isprint, function in String Utility Functions -
-
-
-g_ascii_ispunct, function in String Utility Functions -
-
-
-g_ascii_isspace, function in String Utility Functions -
-
-
-g_ascii_isupper, function in String Utility Functions -
-
-
-g_ascii_isxdigit, function in String Utility Functions -
-
-
-g_ascii_strcasecmp, function in String Utility Functions -
-
-
-g_ascii_strdown, function in String Utility Functions -
-
-
-g_ascii_strncasecmp, function in String Utility Functions -
-
-
-g_ascii_strtod, function in String Utility Functions -
-
-
-g_ascii_strtoll, function in String Utility Functions -
-
-
-g_ascii_strtoull, function in String Utility Functions -
-
-
-g_ascii_strup, function in String Utility Functions -
-
-
-g_ascii_tolower, function in String Utility Functions -
-
-
-g_ascii_toupper, function in String Utility Functions -
-
-
-g_ascii_xdigit_value, function in String Utility Functions -
-
-
-g_assert, macro in Testing -
-
-
-g_assert_cmpfloat, macro in Testing -
-
-
-g_assert_cmphex, macro in Testing -
-
-
-g_assert_cmpint, macro in Testing -
-
-
-g_assert_cmpmem, macro in Testing -
-
-
-g_assert_cmpstr, macro in Testing -
-
-
-g_assert_cmpuint, macro in Testing -
-
-
-g_assert_error, macro in Testing -
-
-
-g_assert_false, macro in Testing -
-
-
-g_assert_nonnull, macro in Testing -
-
-
-g_assert_not_reached, macro in Testing -
-
-
-g_assert_no_error, macro in Testing -
-
-
-g_assert_null, macro in Testing -
-
-
-g_assert_true, macro in Testing -
-
-
-GAsyncQueue, struct in Asynchronous Queues -
-
-
-g_async_queue_length, function in Asynchronous Queues -
-
-
-g_async_queue_length_unlocked, function in Asynchronous Queues -
-
-
-g_async_queue_lock, function in Asynchronous Queues -
-
-
-g_async_queue_new, function in Asynchronous Queues -
-
-
-g_async_queue_new_full, function in Asynchronous Queues -
-
-
-g_async_queue_pop, function in Asynchronous Queues -
-
-
-g_async_queue_pop_unlocked, function in Asynchronous Queues -
-
-
-g_async_queue_push, function in Asynchronous Queues -
-
-
-g_async_queue_push_front, function in Asynchronous Queues -
-
-
-g_async_queue_push_front_unlocked, function in Asynchronous Queues -
-
-
-g_async_queue_push_sorted, function in Asynchronous Queues -
-
-
-g_async_queue_push_sorted_unlocked, function in Asynchronous Queues -
-
-
-g_async_queue_push_unlocked, function in Asynchronous Queues -
-
-
-g_async_queue_ref, function in Asynchronous Queues -
-
-
-g_async_queue_ref_unlocked, function in Asynchronous Queues -
-
-
-g_async_queue_remove, function in Asynchronous Queues -
-
-
-g_async_queue_remove_unlocked, function in Asynchronous Queues -
-
-
-g_async_queue_sort, function in Asynchronous Queues -
-
-
-g_async_queue_sort_unlocked, function in Asynchronous Queues -
-
-
-g_async_queue_timed_pop, function in Asynchronous Queues -
-
-
-g_async_queue_timed_pop_unlocked, function in Asynchronous Queues -
-
-
-g_async_queue_timeout_pop, function in Asynchronous Queues -
-
-
-g_async_queue_timeout_pop_unlocked, function in Asynchronous Queues -
-
-
-g_async_queue_try_pop, function in Asynchronous Queues -
-
-
-g_async_queue_try_pop_unlocked, function in Asynchronous Queues -
-
-
-g_async_queue_unlock, function in Asynchronous Queues -
-
-
-g_async_queue_unref, function in Asynchronous Queues -
-
-
-g_async_queue_unref_and_unlock, function in Asynchronous Queues -
-
-
-g_atexit, function in Miscellaneous Utility Functions -
-
-
-g_atomic_int_add, function in Atomic Operations -
-
-
-g_atomic_int_and, function in Atomic Operations -
-
-
-g_atomic_int_compare_and_exchange, function in Atomic Operations -
-
-
-g_atomic_int_dec_and_test, function in Atomic Operations -
-
-
-g_atomic_int_exchange_and_add, function in Atomic Operations -
-
-
-g_atomic_int_get, function in Atomic Operations -
-
-
-g_atomic_int_inc, function in Atomic Operations -
-
-
-g_atomic_int_or, function in Atomic Operations -
-
-
-g_atomic_int_set, function in Atomic Operations -
-
-
-g_atomic_int_xor, function in Atomic Operations -
-
-
-G_ATOMIC_LOCK_FREE, macro in Atomic Operations -
-
-
-g_atomic_pointer_add, function in Atomic Operations -
-
-
-g_atomic_pointer_and, function in Atomic Operations -
-
-
-g_atomic_pointer_compare_and_exchange, function in Atomic Operations -
-
-
-g_atomic_pointer_get, function in Atomic Operations -
-
-
-g_atomic_pointer_or, function in Atomic Operations -
-
-
-g_atomic_pointer_set, function in Atomic Operations -
-
-
-g_atomic_pointer_xor, function in Atomic Operations -
-
-
-g_auto, macro in Miscellaneous Macros -
-
-
-g_autofree, macro in Miscellaneous Macros -
-
-
-g_autoptr, macro in Miscellaneous Macros -
-
-

B

-
-g_base64_decode, function in Base64 Encoding -
-
-
-g_base64_decode_inplace, function in Base64 Encoding -
-
-
-g_base64_decode_step, function in Base64 Encoding -
-
-
-g_base64_encode, function in Base64 Encoding -
-
-
-g_base64_encode_close, function in Base64 Encoding -
-
-
-g_base64_encode_step, function in Base64 Encoding -
-
-
-g_basename, function in Miscellaneous Utility Functions -
-
-
-G_BEGIN_DECLS, macro in Miscellaneous Macros -
-
-
-G_BIG_ENDIAN, macro in Byte Order Macros -
-
-
-g_bit_lock, function in Threads -
-
-
-g_bit_nth_lsf, macro in Miscellaneous Utility Functions -
-
-
-g_bit_nth_msf, macro in Miscellaneous Utility Functions -
-
-
-g_bit_storage, macro in Miscellaneous Utility Functions -
-
-
-g_bit_trylock, function in Threads -
-
-
-g_bit_unlock, function in Threads -
-
-
-GBookmarkFile, struct in Bookmark file parser -
-
-
-GBookmarkFileError, enum in Bookmark file parser -
-
-
-g_bookmark_file_add_application, function in Bookmark file parser -
-
-
-g_bookmark_file_add_group, function in Bookmark file parser -
-
-
-G_BOOKMARK_FILE_ERROR, macro in Bookmark file parser -
-
-
-g_bookmark_file_free, function in Bookmark file parser -
-
-
-g_bookmark_file_get_added, function in Bookmark file parser -
-
-
-g_bookmark_file_get_applications, function in Bookmark file parser -
-
-
-g_bookmark_file_get_app_info, function in Bookmark file parser -
-
-
-g_bookmark_file_get_description, function in Bookmark file parser -
-
-
-g_bookmark_file_get_groups, function in Bookmark file parser -
-
-
-g_bookmark_file_get_icon, function in Bookmark file parser -
-
-
-g_bookmark_file_get_is_private, function in Bookmark file parser -
-
-
-g_bookmark_file_get_mime_type, function in Bookmark file parser -
-
-
-g_bookmark_file_get_modified, function in Bookmark file parser -
-
-
-g_bookmark_file_get_size, function in Bookmark file parser -
-
-
-g_bookmark_file_get_title, function in Bookmark file parser -
-
-
-g_bookmark_file_get_uris, function in Bookmark file parser -
-
-
-g_bookmark_file_get_visited, function in Bookmark file parser -
-
-
-g_bookmark_file_has_application, function in Bookmark file parser -
-
-
-g_bookmark_file_has_group, function in Bookmark file parser -
-
-
-g_bookmark_file_has_item, function in Bookmark file parser -
-
-
-g_bookmark_file_load_from_data, function in Bookmark file parser -
-
-
-g_bookmark_file_load_from_data_dirs, function in Bookmark file parser -
-
-
-g_bookmark_file_load_from_file, function in Bookmark file parser -
-
-
-g_bookmark_file_move_item, function in Bookmark file parser -
-
-
-g_bookmark_file_new, function in Bookmark file parser -
-
-
-g_bookmark_file_remove_application, function in Bookmark file parser -
-
-
-g_bookmark_file_remove_group, function in Bookmark file parser -
-
-
-g_bookmark_file_remove_item, function in Bookmark file parser -
-
-
-g_bookmark_file_set_added, function in Bookmark file parser -
-
-
-g_bookmark_file_set_app_info, function in Bookmark file parser -
-
-
-g_bookmark_file_set_description, function in Bookmark file parser -
-
-
-g_bookmark_file_set_groups, function in Bookmark file parser -
-
-
-g_bookmark_file_set_icon, function in Bookmark file parser -
-
-
-g_bookmark_file_set_is_private, function in Bookmark file parser -
-
-
-g_bookmark_file_set_mime_type, function in Bookmark file parser -
-
-
-g_bookmark_file_set_modified, function in Bookmark file parser -
-
-
-g_bookmark_file_set_title, function in Bookmark file parser -
-
-
-g_bookmark_file_set_visited, function in Bookmark file parser -
-
-
-g_bookmark_file_to_data, function in Bookmark file parser -
-
-
-g_bookmark_file_to_file, function in Bookmark file parser -
-
-
-gboolean, typedef in Basic Types -
-
-
-G_BREAKPOINT, macro in Warnings and Assertions -
-
-
-g_build_filename, function in Miscellaneous Utility Functions -
-
-
-g_build_filenamev, function in Miscellaneous Utility Functions -
-
-
-g_build_path, function in Miscellaneous Utility Functions -
-
-
-g_build_pathv, function in Miscellaneous Utility Functions -
-
-
-GByteArray, struct in Byte Arrays -
-
-
-GBytes, struct in Byte Arrays -
-
-
-g_bytes_compare, function in Byte Arrays -
-
-
-g_bytes_equal, function in Byte Arrays -
-
-
-g_bytes_get_data, function in Byte Arrays -
-
-
-g_bytes_get_size, function in Byte Arrays -
-
-
-g_bytes_hash, function in Byte Arrays -
-
-
-g_bytes_new, function in Byte Arrays -
-
-
-g_bytes_new_from_bytes, function in Byte Arrays -
-
-
-g_bytes_new_static, function in Byte Arrays -
-
-
-g_bytes_new_take, function in Byte Arrays -
-
-
-g_bytes_new_with_free_func, function in Byte Arrays -
-
-
-g_bytes_ref, function in Byte Arrays -
-
-
-g_bytes_unref, function in Byte Arrays -
-
-
-g_bytes_unref_to_array, function in Byte Arrays -
-
-
-g_bytes_unref_to_data, function in Byte Arrays -
-
-
-g_byte_array_append, function in Byte Arrays -
-
-
-g_byte_array_free, function in Byte Arrays -
-
-
-g_byte_array_free_to_bytes, function in Byte Arrays -
-
-
-g_byte_array_new, function in Byte Arrays -
-
-
-g_byte_array_new_take, function in Byte Arrays -
-
-
-g_byte_array_prepend, function in Byte Arrays -
-
-
-g_byte_array_ref, function in Byte Arrays -
-
-
-g_byte_array_remove_index, function in Byte Arrays -
-
-
-g_byte_array_remove_index_fast, function in Byte Arrays -
-
-
-g_byte_array_remove_range, function in Byte Arrays -
-
-
-g_byte_array_set_size, function in Byte Arrays -
-
-
-g_byte_array_sized_new, function in Byte Arrays -
-
-
-g_byte_array_sort, function in Byte Arrays -
-
-
-g_byte_array_sort_with_data, function in Byte Arrays -
-
-
-g_byte_array_unref, function in Byte Arrays -
-
-
-G_BYTE_ORDER, macro in Byte Order Macros -
-
-

C

-
-GCache, struct in Caches -
-
-
-GCacheDestroyFunc, user_function in Caches -
-
-
-GCacheDupFunc, user_function in Caches -
-
-
-GCacheNewFunc, user_function in Caches -
-
-
-g_cache_destroy, function in Caches -
-
-
-g_cache_insert, function in Caches -
-
-
-g_cache_key_foreach, function in Caches -
-
-
-g_cache_new, function in Caches -
-
-
-g_cache_remove, function in Caches -
-
-
-g_cache_value_foreach, function in Caches -
-
-
-gchar, typedef in Basic Types -
-
-
-g_chdir, function in File Utilities -
-
-
-GChecksum, struct in Data Checksums -
-
-
-GChecksumType, enum in Data Checksums -
-
-
-g_checksum_copy, function in Data Checksums -
-
-
-g_checksum_free, function in Data Checksums -
-
-
-g_checksum_get_digest, function in Data Checksums -
-
-
-g_checksum_get_string, function in Data Checksums -
-
-
-g_checksum_new, function in Data Checksums -
-
-
-g_checksum_reset, function in Data Checksums -
-
-
-g_checksum_type_get_length, function in Data Checksums -
-
-
-g_checksum_update, function in Data Checksums -
-
-
-GChildWatchFunc, user_function in The Main Event Loop -
-
-
-g_child_watch_add, function in The Main Event Loop -
-
-
-g_child_watch_add_full, function in The Main Event Loop -
-
-
-g_child_watch_source_new, function in The Main Event Loop -
-
-
-g_chmod, function in File Utilities -
-
-
-CLAMP, macro in Standard Macros -
-
-
-g_clear_error, function in Error Reporting -
-
-
-g_clear_pointer, function in Memory Allocation -
-
-
-g_close, function in File Utilities -
-
-
-GCompareDataFunc, user_function in Doubly-Linked Lists -
-
-
-GCompareFunc, user_function in Doubly-Linked Lists -
-
-
-GCompletion, struct in Automatic String Completion -
-
-
-GCompletionFunc, user_function in Automatic String Completion -
-
-
-GCompletionStrncmpFunc, user_function in Automatic String Completion -
-
-
-g_completion_add_items, function in Automatic String Completion -
-
-
-g_completion_clear_items, function in Automatic String Completion -
-
-
-g_completion_complete, function in Automatic String Completion -
-
-
-g_completion_complete_utf8, function in Automatic String Completion -
-
-
-g_completion_free, function in Automatic String Completion -
-
-
-g_completion_new, function in Automatic String Completion -
-
-
-g_completion_remove_items, function in Automatic String Completion -
-
-
-g_completion_set_compare, function in Automatic String Completion -
-
-
-g_compute_checksum_for_bytes, function in Data Checksums -
-
-
-g_compute_checksum_for_data, function in Data Checksums -
-
-
-g_compute_checksum_for_string, function in Data Checksums -
-
-
-g_compute_hmac_for_bytes, function in Data HMACs -
-
-
-g_compute_hmac_for_data, function in Data HMACs -
-
-
-g_compute_hmac_for_string, function in Data HMACs -
-
-
-GCond, struct in Threads -
-
-
-g_cond_broadcast, function in Threads -
-
-
-g_cond_clear, function in Threads -
-
-
-g_cond_free, function in Deprecated Thread APIs -
-
-
-g_cond_init, function in Threads -
-
-
-g_cond_new, function in Deprecated Thread APIs -
-
-
-g_cond_signal, function in Threads -
-
-
-g_cond_timed_wait, function in Threads -
-
-
-g_cond_wait, function in Threads -
-
-
-g_cond_wait_until, function in Threads -
-
-
-gconstpointer, typedef in Basic Types -
-
-
-G_CONST_RETURN, macro in Standard Macros -
-
-
-g_convert, function in Character Set Conversion -
-
-
-GConvertError, enum in Character Set Conversion -
-
-
-G_CONVERT_ERROR, macro in Character Set Conversion -
-
-
-g_convert_with_fallback, function in Character Set Conversion -
-
-
-g_convert_with_iconv, function in Character Set Conversion -
-
-
-GCopyFunc, user_function in N-ary Trees -
-
-
-g_creat, function in File Utilities -
-
-
-g_critical, macro in Message Logging -
-
-
-G_CSET_A_2_Z, macro in Lexical Scanner -
-
-
-G_CSET_a_2_z, macro in Lexical Scanner -
-
-
-G_CSET_DIGITS, macro in Lexical Scanner -
-
-
-G_CSET_LATINC, macro in Lexical Scanner -
-
-
-G_CSET_LATINS, macro in Lexical Scanner -
-
-
-C_, macro in I18N -
-
-

D

-
-GData, struct in Keyed Data Lists -
-
-
-GDataForeachFunc, user_function in Datasets -
-
-
-g_datalist_clear, function in Keyed Data Lists -
-
-
-G_DATALIST_FLAGS_MASK, macro in Keyed Data Lists -
-
-
-g_datalist_foreach, function in Keyed Data Lists -
-
-
-g_datalist_get_data, function in Keyed Data Lists -
-
-
-g_datalist_get_flags, function in Keyed Data Lists -
-
-
-g_datalist_id_dup_data, function in Keyed Data Lists -
-
-
-g_datalist_id_get_data, function in Keyed Data Lists -
-
-
-g_datalist_id_remove_data, macro in Keyed Data Lists -
-
-
-g_datalist_id_remove_no_notify, function in Keyed Data Lists -
-
-
-g_datalist_id_replace_data, function in Keyed Data Lists -
-
-
-g_datalist_id_set_data, macro in Keyed Data Lists -
-
-
-g_datalist_id_set_data_full, function in Keyed Data Lists -
-
-
-g_datalist_init, function in Keyed Data Lists -
-
-
-g_datalist_remove_data, macro in Keyed Data Lists -
-
-
-g_datalist_remove_no_notify, macro in Keyed Data Lists -
-
-
-g_datalist_set_data, macro in Keyed Data Lists -
-
-
-g_datalist_set_data_full, macro in Keyed Data Lists -
-
-
-g_datalist_set_flags, function in Keyed Data Lists -
-
-
-g_datalist_unset_flags, function in Keyed Data Lists -
-
-
-g_dataset_destroy, function in Datasets -
-
-
-g_dataset_foreach, function in Datasets -
-
-
-g_dataset_get_data, macro in Datasets -
-
-
-g_dataset_id_get_data, function in Datasets -
-
-
-g_dataset_id_remove_data, macro in Datasets -
-
-
-g_dataset_id_remove_no_notify, function in Datasets -
-
-
-g_dataset_id_set_data, macro in Datasets -
-
-
-g_dataset_id_set_data_full, function in Datasets -
-
-
-g_dataset_remove_data, macro in Datasets -
-
-
-g_dataset_remove_no_notify, macro in Datasets -
-
-
-g_dataset_set_data, macro in Datasets -
-
-
-g_dataset_set_data_full, macro in Datasets -
-
-
-GDate, struct in Date and Time Functions -
-
-
-GDateDay, typedef in Date and Time Functions -
-
-
-GDateDMY, enum in Date and Time Functions -
-
-
-GDateMonth, enum in Date and Time Functions -
-
-
-GDateTime, struct in GDateTime -
-
-
-GDateWeekday, enum in Date and Time Functions -
-
-
-GDateYear, typedef in Date and Time Functions -
-
-
-g_date_add_days, function in Date and Time Functions -
-
-
-g_date_add_months, function in Date and Time Functions -
-
-
-g_date_add_years, function in Date and Time Functions -
-
-
-G_DATE_BAD_DAY, macro in Date and Time Functions -
-
-
-G_DATE_BAD_JULIAN, macro in Date and Time Functions -
-
-
-G_DATE_BAD_YEAR, macro in Date and Time Functions -
-
-
-g_date_clamp, function in Date and Time Functions -
-
-
-g_date_clear, function in Date and Time Functions -
-
-
-g_date_compare, function in Date and Time Functions -
-
-
-g_date_days_between, function in Date and Time Functions -
-
-
-g_date_free, function in Date and Time Functions -
-
-
-g_date_get_day, function in Date and Time Functions -
-
-
-g_date_get_days_in_month, function in Date and Time Functions -
-
-
-g_date_get_day_of_year, function in Date and Time Functions -
-
-
-g_date_get_iso8601_week_of_year, function in Date and Time Functions -
-
-
-g_date_get_julian, function in Date and Time Functions -
-
-
-g_date_get_monday_weeks_in_year, function in Date and Time Functions -
-
-
-g_date_get_monday_week_of_year, function in Date and Time Functions -
-
-
-g_date_get_month, function in Date and Time Functions -
-
-
-g_date_get_sunday_weeks_in_year, function in Date and Time Functions -
-
-
-g_date_get_sunday_week_of_year, function in Date and Time Functions -
-
-
-g_date_get_weekday, function in Date and Time Functions -
-
-
-g_date_get_year, function in Date and Time Functions -
-
-
-g_date_is_first_of_month, function in Date and Time Functions -
-
-
-g_date_is_last_of_month, function in Date and Time Functions -
-
-
-g_date_is_leap_year, function in Date and Time Functions -
-
-
-g_date_new, function in Date and Time Functions -
-
-
-g_date_new_dmy, function in Date and Time Functions -
-
-
-g_date_new_julian, function in Date and Time Functions -
-
-
-g_date_order, function in Date and Time Functions -
-
-
-g_date_set_day, function in Date and Time Functions -
-
-
-g_date_set_dmy, function in Date and Time Functions -
-
-
-g_date_set_julian, function in Date and Time Functions -
-
-
-g_date_set_month, function in Date and Time Functions -
-
-
-g_date_set_parse, function in Date and Time Functions -
-
-
-g_date_set_time, function in Date and Time Functions -
-
-
-g_date_set_time_t, function in Date and Time Functions -
-
-
-g_date_set_time_val, function in Date and Time Functions -
-
-
-g_date_set_year, function in Date and Time Functions -
-
-
-g_date_strftime, function in Date and Time Functions -
-
-
-g_date_subtract_days, function in Date and Time Functions -
-
-
-g_date_subtract_months, function in Date and Time Functions -
-
-
-g_date_subtract_years, function in Date and Time Functions -
-
-
-g_date_time_add, function in GDateTime -
-
-
-g_date_time_add_days, function in GDateTime -
-
-
-g_date_time_add_full, function in GDateTime -
-
-
-g_date_time_add_hours, function in GDateTime -
-
-
-g_date_time_add_minutes, function in GDateTime -
-
-
-g_date_time_add_months, function in GDateTime -
-
-
-g_date_time_add_seconds, function in GDateTime -
-
-
-g_date_time_add_weeks, function in GDateTime -
-
-
-g_date_time_add_years, function in GDateTime -
-
-
-g_date_time_compare, function in GDateTime -
-
-
-g_date_time_difference, function in GDateTime -
-
-
-g_date_time_equal, function in GDateTime -
-
-
-g_date_time_format, function in GDateTime -
-
-
-g_date_time_get_day_of_month, function in GDateTime -
-
-
-g_date_time_get_day_of_week, function in GDateTime -
-
-
-g_date_time_get_day_of_year, function in GDateTime -
-
-
-g_date_time_get_hour, function in GDateTime -
-
-
-g_date_time_get_microsecond, function in GDateTime -
-
-
-g_date_time_get_minute, function in GDateTime -
-
-
-g_date_time_get_month, function in GDateTime -
-
-
-g_date_time_get_second, function in GDateTime -
-
-
-g_date_time_get_seconds, function in GDateTime -
-
-
-g_date_time_get_timezone_abbreviation, function in GDateTime -
-
-
-g_date_time_get_utc_offset, function in GDateTime -
-
-
-g_date_time_get_week_numbering_year, function in GDateTime -
-
-
-g_date_time_get_week_of_year, function in GDateTime -
-
-
-g_date_time_get_year, function in GDateTime -
-
-
-g_date_time_get_ymd, function in GDateTime -
-
-
-g_date_time_hash, function in GDateTime -
-
-
-g_date_time_is_daylight_savings, function in GDateTime -
-
-
-g_date_time_new, function in GDateTime -
-
-
-g_date_time_new_from_timeval_local, function in GDateTime -
-
-
-g_date_time_new_from_timeval_utc, function in GDateTime -
-
-
-g_date_time_new_from_unix_local, function in GDateTime -
-
-
-g_date_time_new_from_unix_utc, function in GDateTime -
-
-
-g_date_time_new_local, function in GDateTime -
-
-
-g_date_time_new_now, function in GDateTime -
-
-
-g_date_time_new_now_local, function in GDateTime -
-
-
-g_date_time_new_now_utc, function in GDateTime -
-
-
-g_date_time_new_utc, function in GDateTime -
-
-
-g_date_time_ref, function in GDateTime -
-
-
-g_date_time_to_local, function in GDateTime -
-
-
-g_date_time_to_timeval, function in GDateTime -
-
-
-g_date_time_to_timezone, function in GDateTime -
-
-
-g_date_time_to_unix, function in GDateTime -
-
-
-g_date_time_to_utc, function in GDateTime -
-
-
-g_date_time_unref, function in GDateTime -
-
-
-g_date_to_struct_tm, function in Date and Time Functions -
-
-
-g_date_valid, function in Date and Time Functions -
-
-
-g_date_valid_day, function in Date and Time Functions -
-
-
-g_date_valid_dmy, function in Date and Time Functions -
-
-
-g_date_valid_julian, function in Date and Time Functions -
-
-
-g_date_valid_month, function in Date and Time Functions -
-
-
-g_date_valid_weekday, function in Date and Time Functions -
-
-
-g_date_valid_year, function in Date and Time Functions -
-
-
-g_dcgettext, function in I18N -
-
-
-g_debug, macro in Message Logging -
-
-
-GDebugKey, struct in Miscellaneous Utility Functions -
-
-
-G_DEBUG_HERE, macro in Message Logging -
-
-
-G_DEFINE_AUTOPTR_CLEANUP_FUNC, macro in Miscellaneous Macros -
-
-
-G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC, macro in Miscellaneous Macros -
-
-
-G_DEFINE_AUTO_CLEANUP_FREE_FUNC, macro in Miscellaneous Macros -
-
-
-G_DEFINE_QUARK, macro in Quarks -
-
-
-G_DEPRECATED, macro in Miscellaneous Macros -
-
-
-G_DEPRECATED_FOR, macro in Miscellaneous Macros -
-
-
-GDestroyNotify, user_function in Datasets -
-
-
-g_dgettext, function in I18N -
-
-
-GDir, struct in File Utilities -
-
-
-g_direct_equal, function in Hash Tables -
-
-
-g_direct_hash, function in Hash Tables -
-
-
-g_dirname, macro in Miscellaneous Utility Functions -
-
-
-g_dir_close, function in File Utilities -
-
-
-g_dir_make_tmp, function in File Utilities -
-
-
-g_dir_open, function in File Utilities -
-
-
-g_dir_read_name, function in File Utilities -
-
-
-g_dir_rewind, function in File Utilities -
-
-
-G_DIR_SEPARATOR, macro in Standard Macros -
-
-
-G_DIR_SEPARATOR_S, macro in Standard Macros -
-
-
-g_dngettext, function in I18N -
-
-
-gdouble, typedef in Basic Types -
-
-
-GDoubleIEEE754, union in Numerical Definitions -
-
-
-g_double_equal, function in Hash Tables -
-
-
-g_double_hash, function in Hash Tables -
-
-
-g_dpgettext, function in I18N -
-
-
-g_dpgettext2, function in I18N -
-
-
-GDuplicateFunc, user_function in Keyed Data Lists -
-
-

E

-
-G_E, macro in Numerical Definitions -
-
-
-G_END_DECLS, macro in Miscellaneous Macros -
-
-
-g_environ_getenv, function in Miscellaneous Utility Functions -
-
-
-g_environ_setenv, function in Miscellaneous Utility Functions -
-
-
-g_environ_unsetenv, function in Miscellaneous Utility Functions -
-
-
-GEqualFunc, user_function in Hash Tables -
-
-
-GError, struct in Error Reporting -
-
-
-g_error, macro in Message Logging -
-
-
-GErrorType, enum in Lexical Scanner -
-
-
-g_error_copy, function in Error Reporting -
-
-
-g_error_free, function in Error Reporting -
-
-
-g_error_matches, function in Error Reporting -
-
-
-g_error_new, function in Error Reporting -
-
-
-g_error_new_literal, function in Error Reporting -
-
-
-g_error_new_valist, function in Error Reporting -
-
-

F

-
-FALSE, macro in Standard Macros -
-
-
-GFileError, enum in File Utilities -
-
-
-g_filename_display_basename, function in Character Set Conversion -
-
-
-g_filename_display_name, function in Character Set Conversion -
-
-
-g_filename_from_uri, function in URI Functions -
-
-
-g_filename_from_utf8, function in Character Set Conversion -
-
-
-g_filename_to_uri, function in URI Functions -
-
-
-g_filename_to_utf8, function in Character Set Conversion -
-
-
-GFileTest, enum in File Utilities -
-
-
-G_FILE_ERROR, macro in File Utilities -
-
-
-g_file_error_from_errno, function in File Utilities -
-
-
-g_file_get_contents, function in File Utilities -
-
-
-g_file_open_tmp, function in File Utilities -
-
-
-g_file_read_link, function in File Utilities -
-
-
-g_file_set_contents, function in File Utilities -
-
-
-g_file_test, function in File Utilities -
-
-
-g_find_program_in_path, function in Miscellaneous Utility Functions -
-
-
-gfloat, typedef in Basic Types -
-
-
-GFloatIEEE754, union in Numerical Definitions -
-
-
-g_fopen, function in File Utilities -
-
-
-GFormatSizeFlags, enum in Miscellaneous Utility Functions -
-
-
-g_format_size, function in Miscellaneous Utility Functions -
-
-
-g_format_size_for_display, function in Miscellaneous Utility Functions -
-
-
-g_format_size_full, function in Miscellaneous Utility Functions -
-
-
-g_fprintf, function in String Utility Functions -
-
-
-g_free, function in Memory Allocation -
-
-
-GFreeFunc, user_function in Miscellaneous Utility Functions -
-
-
-g_freopen, function in File Utilities -
-
-
-GFunc, user_function in Doubly-Linked Lists -
-
-

G

-
-g_getenv, function in Miscellaneous Utility Functions -
-
-
-g_get_application_name, function in Miscellaneous Utility Functions -
-
-
-g_get_charset, function in Character Set Conversion -
-
-
-g_get_codeset, function in Character Set Conversion -
-
-
-g_get_current_dir, function in Miscellaneous Utility Functions -
-
-
-g_get_current_time, function in Date and Time Functions -
-
-
-g_get_environ, function in Miscellaneous Utility Functions -
-
-
-g_get_filename_charsets, function in Character Set Conversion -
-
-
-g_get_home_dir, function in Miscellaneous Utility Functions -
-
-
-g_get_host_name, function in Miscellaneous Utility Functions -
-
-
-g_get_language_names, function in I18N -
-
-
-g_get_locale_variants, function in I18N -
-
-
-g_get_monotonic_time, function in Date and Time Functions -
-
-
-g_get_num_processors, function in Threads -
-
-
-g_get_prgname, function in Miscellaneous Utility Functions -
-
-
-g_get_real_name, function in Miscellaneous Utility Functions -
-
-
-g_get_real_time, function in Date and Time Functions -
-
-
-g_get_system_config_dirs, function in Miscellaneous Utility Functions -
-
-
-g_get_system_data_dirs, function in Miscellaneous Utility Functions -
-
-
-g_get_tmp_dir, function in Miscellaneous Utility Functions -
-
-
-g_get_user_cache_dir, function in Miscellaneous Utility Functions -
-
-
-g_get_user_config_dir, function in Miscellaneous Utility Functions -
-
-
-g_get_user_data_dir, function in Miscellaneous Utility Functions -
-
-
-g_get_user_name, function in Miscellaneous Utility Functions -
-
-
-g_get_user_runtime_dir, function in Miscellaneous Utility Functions -
-
-
-g_get_user_special_dir, function in Miscellaneous Utility Functions -
-
-
-G_GINT16_FORMAT, macro in Basic Types -
-
-
-G_GINT16_MODIFIER, macro in Basic Types -
-
-
-G_GINT32_FORMAT, macro in Basic Types -
-
-
-G_GINT32_MODIFIER, macro in Basic Types -
-
-
-G_GINT64_CONSTANT, macro in Basic Types -
-
-
-G_GINT64_FORMAT, macro in Basic Types -
-
-
-G_GINT64_MODIFIER, macro in Basic Types -
-
-
-G_GINTPTR_FORMAT, macro in Basic Types -
-
-
-G_GINTPTR_MODIFIER, macro in Basic Types -
-
-
-G_GNUC_ALLOC_SIZE, macro in Miscellaneous Macros -
-
-
-G_GNUC_ALLOC_SIZE2, macro in Miscellaneous Macros -
-
-
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS, macro in Miscellaneous Macros -
-
-
-G_GNUC_CHECK_VERSION, macro in Miscellaneous Macros -
-
-
-G_GNUC_CONST, macro in Miscellaneous Macros -
-
-
-G_GNUC_DEPRECATED, macro in Miscellaneous Macros -
-
-
-G_GNUC_DEPRECATED_FOR, macro in Miscellaneous Macros -
-
-
-G_GNUC_END_IGNORE_DEPRECATIONS, macro in Miscellaneous Macros -
-
-
-G_GNUC_EXTENSION, macro in Miscellaneous Macros -
-
-
-G_GNUC_FORMAT, macro in Miscellaneous Macros -
-
-
-G_GNUC_FUNCTION, macro in Miscellaneous Macros -
-
-
-G_GNUC_INTERNAL, macro in Miscellaneous Macros -
-
-
-G_GNUC_MALLOC, macro in Miscellaneous Macros -
-
-
-G_GNUC_MAY_ALIAS, macro in Miscellaneous Macros -
-
-
-G_GNUC_NORETURN, macro in Miscellaneous Macros -
-
-
-G_GNUC_NO_INSTRUMENT, macro in Miscellaneous Macros -
-
-
-G_GNUC_NULL_TERMINATED, macro in Miscellaneous Macros -
-
-
-G_GNUC_PRETTY_FUNCTION, macro in Miscellaneous Macros -
-
-
-G_GNUC_PRINTF, macro in Miscellaneous Macros -
-
-
-G_GNUC_PURE, macro in Miscellaneous Macros -
-
-
-G_GNUC_SCANF, macro in Miscellaneous Macros -
-
-
-G_GNUC_UNUSED, macro in Miscellaneous Macros -
-
-
-G_GNUC_WARN_UNUSED_RESULT, macro in Miscellaneous Macros -
-
-
-G_GOFFSET_CONSTANT, macro in Basic Types -
-
-
-G_GOFFSET_FORMAT, macro in Basic Types -
-
-
-G_GOFFSET_MODIFIER, macro in Basic Types -
-
-
-G_GSIZE_FORMAT, macro in Basic Types -
-
-
-G_GSIZE_MODIFIER, macro in Basic Types -
-
-
-G_GSSIZE_FORMAT, macro in Basic Types -
-
-
-G_GSSIZE_MODIFIER, macro in Basic Types -
-
-
-G_GUINT16_FORMAT, macro in Basic Types -
-
-
-G_GUINT32_FORMAT, macro in Basic Types -
-
-
-G_GUINT64_CONSTANT, macro in Basic Types -
-
-
-G_GUINT64_FORMAT, macro in Basic Types -
-
-
-G_GUINTPTR_FORMAT, macro in Basic Types -
-
-

H

-
-GHashFunc, user_function in Hash Tables -
-
-
-GHashTable, struct in Hash Tables -
-
-
-GHashTableIter, struct in Hash Tables -
-
-
-g_hash_table_add, function in Hash Tables -
-
-
-g_hash_table_contains, function in Hash Tables -
-
-
-g_hash_table_destroy, function in Hash Tables -
-
-
-g_hash_table_find, function in Hash Tables -
-
-
-g_hash_table_foreach, function in Hash Tables -
-
-
-g_hash_table_foreach_remove, function in Hash Tables -
-
-
-g_hash_table_foreach_steal, function in Hash Tables -
-
-
-g_hash_table_freeze, macro in Hash Tables -
-
-
-g_hash_table_get_keys, function in Hash Tables -
-
-
-g_hash_table_get_keys_as_array, function in Hash Tables -
-
-
-g_hash_table_get_values, function in Hash Tables -
-
-
-g_hash_table_insert, function in Hash Tables -
-
-
-g_hash_table_iter_get_hash_table, function in Hash Tables -
-
-
-g_hash_table_iter_init, function in Hash Tables -
-
-
-g_hash_table_iter_next, function in Hash Tables -
-
-
-g_hash_table_iter_remove, function in Hash Tables -
-
-
-g_hash_table_iter_replace, function in Hash Tables -
-
-
-g_hash_table_iter_steal, function in Hash Tables -
-
-
-g_hash_table_lookup, function in Hash Tables -
-
-
-g_hash_table_lookup_extended, function in Hash Tables -
-
-
-g_hash_table_new, function in Hash Tables -
-
-
-g_hash_table_new_full, function in Hash Tables -
-
-
-g_hash_table_ref, function in Hash Tables -
-
-
-g_hash_table_remove, function in Hash Tables -
-
-
-g_hash_table_remove_all, function in Hash Tables -
-
-
-g_hash_table_replace, function in Hash Tables -
-
-
-g_hash_table_size, function in Hash Tables -
-
-
-g_hash_table_steal, function in Hash Tables -
-
-
-g_hash_table_steal_all, function in Hash Tables -
-
-
-g_hash_table_thaw, macro in Hash Tables -
-
-
-g_hash_table_unref, function in Hash Tables -
-
-
-G_HAVE_GNUC_VISIBILITY, macro in Miscellaneous Macros -
-
-
-GHFunc, user_function in Hash Tables -
-
-
-GHmac, struct in Data HMACs -
-
-
-g_hmac_copy, function in Data HMACs -
-
-
-g_hmac_get_digest, function in Data HMACs -
-
-
-g_hmac_get_string, function in Data HMACs -
-
-
-g_hmac_new, function in Data HMACs -
-
-
-g_hmac_ref, function in Data HMACs -
-
-
-g_hmac_unref, function in Data HMACs -
-
-
-g_hmac_update, function in Data HMACs -
-
-
-GHook, struct in Hook Functions -
-
-
-G_HOOK, macro in Hook Functions -
-
-
-GHookCheckFunc, user_function in Hook Functions -
-
-
-GHookCheckMarshaller, user_function in Hook Functions -
-
-
-GHookCompareFunc, user_function in Hook Functions -
-
-
-GHookFinalizeFunc, user_function in Hook Functions -
-
-
-GHookFindFunc, user_function in Hook Functions -
-
-
-GHookFlagMask, enum in Hook Functions -
-
-
-GHookFunc, user_function in Hook Functions -
-
-
-GHookList, struct in Hook Functions -
-
-
-GHookMarshaller, user_function in Hook Functions -
-
-
-G_HOOK_ACTIVE, macro in Hook Functions -
-
-
-g_hook_alloc, function in Hook Functions -
-
-
-g_hook_append, macro in Hook Functions -
-
-
-g_hook_compare_ids, function in Hook Functions -
-
-
-g_hook_destroy, function in Hook Functions -
-
-
-g_hook_destroy_link, function in Hook Functions -
-
-
-g_hook_find, function in Hook Functions -
-
-
-g_hook_find_data, function in Hook Functions -
-
-
-g_hook_find_func, function in Hook Functions -
-
-
-g_hook_find_func_data, function in Hook Functions -
-
-
-g_hook_first_valid, function in Hook Functions -
-
-
-G_HOOK_FLAGS, macro in Hook Functions -
-
-
-G_HOOK_FLAG_USER_SHIFT, macro in Hook Functions -
-
-
-g_hook_free, function in Hook Functions -
-
-
-g_hook_get, function in Hook Functions -
-
-
-g_hook_insert_before, function in Hook Functions -
-
-
-g_hook_insert_sorted, function in Hook Functions -
-
-
-G_HOOK_IN_CALL, macro in Hook Functions -
-
-
-G_HOOK_IS_UNLINKED, macro in Hook Functions -
-
-
-G_HOOK_IS_VALID, macro in Hook Functions -
-
-
-g_hook_list_clear, function in Hook Functions -
-
-
-g_hook_list_init, function in Hook Functions -
-
-
-g_hook_list_invoke, function in Hook Functions -
-
-
-g_hook_list_invoke_check, function in Hook Functions -
-
-
-g_hook_list_marshal, function in Hook Functions -
-
-
-g_hook_list_marshal_check, function in Hook Functions -
-
-
-g_hook_next_valid, function in Hook Functions -
-
-
-g_hook_prepend, function in Hook Functions -
-
-
-g_hook_ref, function in Hook Functions -
-
-
-g_hook_unref, function in Hook Functions -
-
-
-g_hostname_is_ascii_encoded, function in Hostname Utilities -
-
-
-g_hostname_is_ip_address, function in Hostname Utilities -
-
-
-g_hostname_is_non_ascii, function in Hostname Utilities -
-
-
-g_hostname_to_ascii, function in Hostname Utilities -
-
-
-g_hostname_to_unicode, function in Hostname Utilities -
-
-
-GHRFunc, user_function in Hash Tables -
-
-
-g_htonl, macro in Byte Order Macros -
-
-
-g_htons, macro in Byte Order Macros -
-
-

I

-
-GIConv, struct in Character Set Conversion -
-
-
-g_iconv, function in Character Set Conversion -
-
-
-g_iconv_close, function in Character Set Conversion -
-
-
-g_iconv_open, function in Character Set Conversion -
-
-
-g_idle_add, function in The Main Event Loop -
-
-
-g_idle_add_full, function in The Main Event Loop -
-
-
-g_idle_remove_by_data, function in The Main Event Loop -
-
-
-g_idle_source_new, function in The Main Event Loop -
-
-
-G_IEEE754_DOUBLE_BIAS, macro in Numerical Definitions -
-
-
-G_IEEE754_FLOAT_BIAS, macro in Numerical Definitions -
-
-
-g_info, macro in Message Logging -
-
-
-G_INLINE_FUNC, macro in Miscellaneous Macros -
-
-
-gint, function in Basic Types -
-
-
-gint16, typedef in Basic Types -
-
-
-GINT16_FROM_BE, macro in Byte Order Macros -
-
-
-GINT16_FROM_LE, macro in Byte Order Macros -
-
-
-GINT16_TO_BE, macro in Byte Order Macros -
-
-
-GINT16_TO_LE, macro in Byte Order Macros -
-
-
-gint32, typedef in Basic Types -
-
-
-GINT32_FROM_BE, macro in Byte Order Macros -
-
-
-GINT32_FROM_LE, macro in Byte Order Macros -
-
-
-GINT32_TO_BE, macro in Byte Order Macros -
-
-
-GINT32_TO_LE, macro in Byte Order Macros -
-
-
-gint64, typedef in Basic Types -
-
-
-g_int64_equal, function in Hash Tables -
-
-
-GINT64_FROM_BE, macro in Byte Order Macros -
-
-
-GINT64_FROM_LE, macro in Byte Order Macros -
-
-
-g_int64_hash, function in Hash Tables -
-
-
-GINT64_TO_BE, macro in Byte Order Macros -
-
-
-GINT64_TO_LE, macro in Byte Order Macros -
-
-
-gint8, typedef in Basic Types -
-
-
-g_intern_static_string, function in Quarks -
-
-
-g_intern_string, function in Quarks -
-
-
-gintptr, typedef in Basic Types -
-
-
-g_int_equal, function in Hash Tables -
-
-
-GINT_FROM_BE, macro in Byte Order Macros -
-
-
-GINT_FROM_LE, macro in Byte Order Macros -
-
-
-g_int_hash, function in Hash Tables -
-
-
-GINT_TO_BE, macro in Byte Order Macros -
-
-
-GINT_TO_LE, macro in Byte Order Macros -
-
-
-GINT_TO_POINTER, macro in Type Conversion Macros -
-
-
-GIOChannel, struct in IO Channels -
-
-
-GIOChannelError, enum in IO Channels -
-
-
-GIOCondition, enum in IO Channels -
-
-
-GIOError, enum in IO Channels -
-
-
-GIOFlags, enum in IO Channels -
-
-
-GIOFunc, user_function in IO Channels -
-
-
-GIOFuncs, struct in IO Channels -
-
-
-GIOStatus, enum in IO Channels -
-
-
-g_io_add_watch, function in IO Channels -
-
-
-g_io_add_watch_full, function in IO Channels -
-
-
-g_io_channel_close, function in IO Channels -
-
-
-G_IO_CHANNEL_ERROR, macro in IO Channels -
-
-
-g_io_channel_error_from_errno, function in IO Channels -
-
-
-g_io_channel_flush, function in IO Channels -
-
-
-g_io_channel_get_buffered, function in IO Channels -
-
-
-g_io_channel_get_buffer_condition, function in IO Channels -
-
-
-g_io_channel_get_buffer_size, function in IO Channels -
-
-
-g_io_channel_get_close_on_unref, function in IO Channels -
-
-
-g_io_channel_get_encoding, function in IO Channels -
-
-
-g_io_channel_get_flags, function in IO Channels -
-
-
-g_io_channel_get_line_term, function in IO Channels -
-
-
-g_io_channel_init, function in IO Channels -
-
-
-g_io_channel_new_file, function in IO Channels -
-
-
-g_io_channel_read, function in IO Channels -
-
-
-g_io_channel_read_chars, function in IO Channels -
-
-
-g_io_channel_read_line, function in IO Channels -
-
-
-g_io_channel_read_line_string, function in IO Channels -
-
-
-g_io_channel_read_to_end, function in IO Channels -
-
-
-g_io_channel_read_unichar, function in IO Channels -
-
-
-g_io_channel_ref, function in IO Channels -
-
-
-g_io_channel_seek, function in IO Channels -
-
-
-g_io_channel_seek_position, function in IO Channels -
-
-
-g_io_channel_set_buffered, function in IO Channels -
-
-
-g_io_channel_set_buffer_size, function in IO Channels -
-
-
-g_io_channel_set_close_on_unref, function in IO Channels -
-
-
-g_io_channel_set_encoding, function in IO Channels -
-
-
-g_io_channel_set_flags, function in IO Channels -
-
-
-g_io_channel_set_line_term, function in IO Channels -
-
-
-g_io_channel_shutdown, function in IO Channels -
-
-
-g_io_channel_unix_get_fd, function in IO Channels -
-
-
-g_io_channel_unix_new, function in IO Channels -
-
-
-g_io_channel_unref, function in IO Channels -
-
-
-g_io_channel_win32_new_fd, function in IO Channels -
-
-
-g_io_channel_win32_new_messages, function in IO Channels -
-
-
-g_io_channel_win32_new_socket, function in IO Channels -
-
-
-g_io_channel_write, function in IO Channels -
-
-
-g_io_channel_write_chars, function in IO Channels -
-
-
-g_io_channel_write_unichar, function in IO Channels -
-
-
-g_io_create_watch, function in IO Channels -
-
-
-G_IS_DIR_SEPARATOR, macro in Standard Macros -
-
-

K

-
-GKeyFile, struct in Key-value file parser -
-
-
-GKeyFileError, enum in Key-value file parser -
-
-
-GKeyFileFlags, enum in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_GROUP, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_ACTIONS, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_CATEGORIES, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_COMMENT, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_EXEC, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_HIDDEN, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_ICON, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_MIME_TYPE, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_NAME, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_PATH, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_TERMINAL, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_TRY_EXEC, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_TYPE, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_URL, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_KEY_VERSION, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_TYPE_APPLICATION, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_TYPE_DIRECTORY, macro in Key-value file parser -
-
-
-G_KEY_FILE_DESKTOP_TYPE_LINK, macro in Key-value file parser -
-
-
-G_KEY_FILE_ERROR, macro in Key-value file parser -
-
-
-g_key_file_free, function in Key-value file parser -
-
-
-g_key_file_get_boolean, function in Key-value file parser -
-
-
-g_key_file_get_boolean_list, function in Key-value file parser -
-
-
-g_key_file_get_comment, function in Key-value file parser -
-
-
-g_key_file_get_double, function in Key-value file parser -
-
-
-g_key_file_get_double_list, function in Key-value file parser -
-
-
-g_key_file_get_groups, function in Key-value file parser -
-
-
-g_key_file_get_int64, function in Key-value file parser -
-
-
-g_key_file_get_integer, function in Key-value file parser -
-
-
-g_key_file_get_integer_list, function in Key-value file parser -
-
-
-g_key_file_get_keys, function in Key-value file parser -
-
-
-g_key_file_get_locale_string, function in Key-value file parser -
-
-
-g_key_file_get_locale_string_list, function in Key-value file parser -
-
-
-g_key_file_get_start_group, function in Key-value file parser -
-
-
-g_key_file_get_string, function in Key-value file parser -
-
-
-g_key_file_get_string_list, function in Key-value file parser -
-
-
-g_key_file_get_uint64, function in Key-value file parser -
-
-
-g_key_file_get_value, function in Key-value file parser -
-
-
-g_key_file_has_group, function in Key-value file parser -
-
-
-g_key_file_has_key, function in Key-value file parser -
-
-
-g_key_file_load_from_bytes, function in Key-value file parser -
-
-
-g_key_file_load_from_data, function in Key-value file parser -
-
-
-g_key_file_load_from_data_dirs, function in Key-value file parser -
-
-
-g_key_file_load_from_dirs, function in Key-value file parser -
-
-
-g_key_file_load_from_file, function in Key-value file parser -
-
-
-g_key_file_new, function in Key-value file parser -
-
-
-g_key_file_ref, function in Key-value file parser -
-
-
-g_key_file_remove_comment, function in Key-value file parser -
-
-
-g_key_file_remove_group, function in Key-value file parser -
-
-
-g_key_file_remove_key, function in Key-value file parser -
-
-
-g_key_file_save_to_file, function in Key-value file parser -
-
-
-g_key_file_set_boolean, function in Key-value file parser -
-
-
-g_key_file_set_boolean_list, function in Key-value file parser -
-
-
-g_key_file_set_comment, function in Key-value file parser -
-
-
-g_key_file_set_double, function in Key-value file parser -
-
-
-g_key_file_set_double_list, function in Key-value file parser -
-
-
-g_key_file_set_int64, function in Key-value file parser -
-
-
-g_key_file_set_integer, function in Key-value file parser -
-
-
-g_key_file_set_integer_list, function in Key-value file parser -
-
-
-g_key_file_set_list_separator, function in Key-value file parser -
-
-
-g_key_file_set_locale_string, function in Key-value file parser -
-
-
-g_key_file_set_locale_string_list, function in Key-value file parser -
-
-
-g_key_file_set_string, function in Key-value file parser -
-
-
-g_key_file_set_string_list, function in Key-value file parser -
-
-
-g_key_file_set_uint64, function in Key-value file parser -
-
-
-g_key_file_set_value, function in Key-value file parser -
-
-
-g_key_file_to_data, function in Key-value file parser -
-
-
-g_key_file_unref, function in Key-value file parser -
-
-

L

-
-glib_binary_age, variable in Version Information -
-
-
-GLIB_CHECK_VERSION, macro in Version Information -
-
-
-glib_check_version, function in Version Information -
-
-
-GLIB_DISABLE_DEPRECATION_WARNINGS, macro in Version Information -
-
-
-glib_interface_age, variable in Version Information -
-
-
-GLIB_MAJOR_VERSION, macro in Version Information -
-
-
-glib_major_version, variable in Version Information -
-
-
-glib_mem_profiler_table, variable in Memory Allocation -
-
-
-GLIB_MICRO_VERSION, macro in Version Information -
-
-
-glib_micro_version, variable in Version Information -
-
-
-GLIB_MINOR_VERSION, macro in Version Information -
-
-
-glib_minor_version, variable in Version Information -
-
-
-GLIB_VERSION_2_26, macro in Version Information -
-
-
-GLIB_VERSION_2_28, macro in Version Information -
-
-
-GLIB_VERSION_2_30, macro in Version Information -
-
-
-GLIB_VERSION_2_32, macro in Version Information -
-
-
-GLIB_VERSION_2_34, macro in Version Information -
-
-
-GLIB_VERSION_2_36, macro in Version Information -
-
-
-GLIB_VERSION_2_38, macro in Version Information -
-
-
-GLIB_VERSION_2_40, macro in Version Information -
-
-
-GLIB_VERSION_2_42, macro in Version Information -
-
-
-GLIB_VERSION_2_44, macro in Version Information -
-
-
-GLIB_VERSION_2_46, macro in Version Information -
-
-
-GLIB_VERSION_2_48, macro in Version Information -
-
-
-GLIB_VERSION_2_50, macro in Version Information -
-
-
-GLIB_VERSION_MAX_ALLOWED, macro in Version Information -
-
-
-GLIB_VERSION_MIN_REQUIRED, macro in Version Information -
-
-
-G_LIKELY, macro in Miscellaneous Macros -
-
-
-GList, struct in Doubly-Linked Lists -
-
-
-g_listenv, function in Miscellaneous Utility Functions -
-
-
-g_list_alloc, function in Doubly-Linked Lists -
-
-
-g_list_append, function in Doubly-Linked Lists -
-
-
-g_list_concat, function in Doubly-Linked Lists -
-
-
-g_list_copy, function in Doubly-Linked Lists -
-
-
-g_list_copy_deep, function in Doubly-Linked Lists -
-
-
-g_list_delete_link, function in Doubly-Linked Lists -
-
-
-g_list_find, function in Doubly-Linked Lists -
-
-
-g_list_find_custom, function in Doubly-Linked Lists -
-
-
-g_list_first, function in Doubly-Linked Lists -
-
-
-g_list_foreach, function in Doubly-Linked Lists -
-
-
-g_list_free, function in Doubly-Linked Lists -
-
-
-g_list_free1, macro in Doubly-Linked Lists -
-
-
-g_list_free_1, function in Doubly-Linked Lists -
-
-
-g_list_free_full, function in Doubly-Linked Lists -
-
-
-g_list_index, function in Doubly-Linked Lists -
-
-
-g_list_insert, function in Doubly-Linked Lists -
-
-
-g_list_insert_before, function in Doubly-Linked Lists -
-
-
-g_list_insert_sorted, function in Doubly-Linked Lists -
-
-
-g_list_insert_sorted_with_data, function in Doubly-Linked Lists -
-
-
-g_list_last, function in Doubly-Linked Lists -
-
-
-g_list_length, function in Doubly-Linked Lists -
-
-
-g_list_next, macro in Doubly-Linked Lists -
-
-
-g_list_nth, function in Doubly-Linked Lists -
-
-
-g_list_nth_data, function in Doubly-Linked Lists -
-
-
-g_list_nth_prev, function in Doubly-Linked Lists -
-
-
-g_list_position, function in Doubly-Linked Lists -
-
-
-g_list_prepend, function in Doubly-Linked Lists -
-
-
-g_list_previous, macro in Doubly-Linked Lists -
-
-
-g_list_remove, function in Doubly-Linked Lists -
-
-
-g_list_remove_all, function in Doubly-Linked Lists -
-
-
-g_list_remove_link, function in Doubly-Linked Lists -
-
-
-g_list_reverse, function in Doubly-Linked Lists -
-
-
-g_list_sort, function in Doubly-Linked Lists -
-
-
-g_list_sort_with_data, function in Doubly-Linked Lists -
-
-
-G_LITTLE_ENDIAN, macro in Byte Order Macros -
-
-
-G_LN10, macro in Numerical Definitions -
-
-
-G_LN2, macro in Numerical Definitions -
-
-
-g_locale_from_utf8, function in Character Set Conversion -
-
-
-g_locale_to_utf8, function in Character Set Conversion -
-
-
-G_LOCK, macro in Threads -
-
-
-G_LOCK_DEFINE, macro in Threads -
-
-
-G_LOCK_DEFINE_STATIC, macro in Threads -
-
-
-G_LOCK_EXTERN, macro in Threads -
-
-
-g_log, function in Message Logging -
-
-
-GLogField, struct in Message Logging -
-
-
-GLogFunc, user_function in Message Logging -
-
-
-GLogLevelFlags, enum in Message Logging -
-
-
-g_logv, function in Message Logging -
-
-
-GLogWriterFunc, user_function in Message Logging -
-
-
-GLogWriterOutput, enum in Message Logging -
-
-
-G_LOG_2_BASE_10, macro in Numerical Definitions -
-
-
-g_log_default_handler, function in Message Logging -
-
-
-G_LOG_DOMAIN, macro in Message Logging -
-
-
-G_LOG_FATAL_MASK, macro in Message Logging -
-
-
-G_LOG_LEVEL_USER_SHIFT, macro in Message Logging -
-
-
-g_log_remove_handler, function in Message Logging -
-
-
-g_log_set_always_fatal, function in Message Logging -
-
-
-g_log_set_default_handler, function in Message Logging -
-
-
-g_log_set_fatal_mask, function in Message Logging -
-
-
-g_log_set_handler, function in Message Logging -
-
-
-g_log_set_handler_full, function in Message Logging -
-
-
-g_log_set_writer_func, function in Message Logging -
-
-
-g_log_structured, function in Message Logging -
-
-
-g_log_structured_array, function in Message Logging -
-
-
-g_log_variant, function in Message Logging -
-
-
-g_log_writer_default, function in Message Logging -
-
-
-g_log_writer_format_fields, function in Message Logging -
-
-
-g_log_writer_is_journald, function in Message Logging -
-
-
-g_log_writer_journald, function in Message Logging -
-
-
-g_log_writer_standard_streams, function in Message Logging -
-
-
-g_log_writer_supports_color, function in Message Logging -
-
-
-glong, typedef in Basic Types -
-
-
-GLONG_FROM_BE, macro in Byte Order Macros -
-
-
-GLONG_FROM_LE, macro in Byte Order Macros -
-
-
-GLONG_TO_BE, macro in Byte Order Macros -
-
-
-GLONG_TO_LE, macro in Byte Order Macros -
-
-
-g_lstat, function in File Utilities -
-
-

M

-
-GMainContext, struct in The Main Event Loop -
-
-
-GMainLoop, struct in The Main Event Loop -
-
-
-g_main_context_acquire, function in The Main Event Loop -
-
-
-g_main_context_add_poll, function in The Main Event Loop -
-
-
-g_main_context_check, function in The Main Event Loop -
-
-
-g_main_context_default, function in The Main Event Loop -
-
-
-g_main_context_dispatch, function in The Main Event Loop -
-
-
-g_main_context_find_source_by_funcs_user_data, function in The Main Event Loop -
-
-
-g_main_context_find_source_by_id, function in The Main Event Loop -
-
-
-g_main_context_find_source_by_user_data, function in The Main Event Loop -
-
-
-g_main_context_get_poll_func, function in The Main Event Loop -
-
-
-g_main_context_get_thread_default, function in The Main Event Loop -
-
-
-g_main_context_invoke, function in The Main Event Loop -
-
-
-g_main_context_invoke_full, function in The Main Event Loop -
-
-
-g_main_context_is_owner, function in The Main Event Loop -
-
-
-g_main_context_iteration, function in The Main Event Loop -
-
-
-g_main_context_new, function in The Main Event Loop -
-
-
-g_main_context_pending, function in The Main Event Loop -
-
-
-g_main_context_pop_thread_default, function in The Main Event Loop -
-
-
-g_main_context_prepare, function in The Main Event Loop -
-
-
-g_main_context_push_thread_default, function in The Main Event Loop -
-
-
-g_main_context_query, function in The Main Event Loop -
-
-
-g_main_context_ref, function in The Main Event Loop -
-
-
-g_main_context_ref_thread_default, function in The Main Event Loop -
-
-
-g_main_context_release, function in The Main Event Loop -
-
-
-g_main_context_remove_poll, function in The Main Event Loop -
-
-
-g_main_context_set_poll_func, function in The Main Event Loop -
-
-
-g_main_context_unref, function in The Main Event Loop -
-
-
-g_main_context_wait, function in The Main Event Loop -
-
-
-g_main_context_wakeup, function in The Main Event Loop -
-
-
-g_main_current_source, function in The Main Event Loop -
-
-
-g_main_depth, function in The Main Event Loop -
-
-
-g_main_destroy, macro in The Main Event Loop -
-
-
-g_main_is_running, macro in The Main Event Loop -
-
-
-g_main_iteration, macro in The Main Event Loop -
-
-
-g_main_loop_get_context, function in The Main Event Loop -
-
-
-g_main_loop_is_running, function in The Main Event Loop -
-
-
-g_main_loop_new, function in The Main Event Loop -
-
-
-g_main_loop_quit, function in The Main Event Loop -
-
-
-g_main_loop_ref, function in The Main Event Loop -
-
-
-g_main_loop_run, function in The Main Event Loop -
-
-
-g_main_loop_unref, function in The Main Event Loop -
-
-
-g_main_new, macro in The Main Event Loop -
-
-
-g_main_pending, macro in The Main Event Loop -
-
-
-g_main_quit, macro in The Main Event Loop -
-
-
-g_main_run, macro in The Main Event Loop -
-
-
-g_main_set_poll_func, macro in The Main Event Loop -
-
-
-g_malloc, function in Memory Allocation -
-
-
-g_malloc0, function in Memory Allocation -
-
-
-g_malloc0_n, function in Memory Allocation -
-
-
-g_malloc_n, function in Memory Allocation -
-
-
-GMappedFile, struct in File Utilities -
-
-
-g_mapped_file_free, function in File Utilities -
-
-
-g_mapped_file_get_bytes, function in File Utilities -
-
-
-g_mapped_file_get_contents, function in File Utilities -
-
-
-g_mapped_file_get_length, function in File Utilities -
-
-
-g_mapped_file_new, function in File Utilities -
-
-
-g_mapped_file_new_from_fd, function in File Utilities -
-
-
-g_mapped_file_ref, function in File Utilities -
-
-
-g_mapped_file_unref, function in File Utilities -
-
-
-GMarkupCollectType, enum in Simple XML Subset Parser -
-
-
-GMarkupError, enum in Simple XML Subset Parser -
-
-
-GMarkupParseContext, struct in Simple XML Subset Parser -
-
-
-GMarkupParseFlags, enum in Simple XML Subset Parser -
-
-
-GMarkupParser, struct in Simple XML Subset Parser -
-
-
-g_markup_collect_attributes, function in Simple XML Subset Parser -
-
-
-G_MARKUP_ERROR, macro in Simple XML Subset Parser -
-
-
-g_markup_escape_text, function in Simple XML Subset Parser -
-
-
-g_markup_parse_context_end_parse, function in Simple XML Subset Parser -
-
-
-g_markup_parse_context_free, function in Simple XML Subset Parser -
-
-
-g_markup_parse_context_get_element, function in Simple XML Subset Parser -
-
-
-g_markup_parse_context_get_element_stack, function in Simple XML Subset Parser -
-
-
-g_markup_parse_context_get_position, function in Simple XML Subset Parser -
-
-
-g_markup_parse_context_get_user_data, function in Simple XML Subset Parser -
-
-
-g_markup_parse_context_new, function in Simple XML Subset Parser -
-
-
-g_markup_parse_context_parse, function in Simple XML Subset Parser -
-
-
-g_markup_parse_context_pop, function in Simple XML Subset Parser -
-
-
-g_markup_parse_context_push, function in Simple XML Subset Parser -
-
-
-g_markup_parse_context_ref, function in Simple XML Subset Parser -
-
-
-g_markup_parse_context_unref, function in Simple XML Subset Parser -
-
-
-g_markup_printf_escaped, function in Simple XML Subset Parser -
-
-
-g_markup_vprintf_escaped, function in Simple XML Subset Parser -
-
-
-GMatchInfo, struct in Perl-compatible regular expressions -
-
-
-g_match_info_expand_references, function in Perl-compatible regular expressions -
-
-
-g_match_info_fetch, function in Perl-compatible regular expressions -
-
-
-g_match_info_fetch_all, function in Perl-compatible regular expressions -
-
-
-g_match_info_fetch_named, function in Perl-compatible regular expressions -
-
-
-g_match_info_fetch_named_pos, function in Perl-compatible regular expressions -
-
-
-g_match_info_fetch_pos, function in Perl-compatible regular expressions -
-
-
-g_match_info_free, function in Perl-compatible regular expressions -
-
-
-g_match_info_get_match_count, function in Perl-compatible regular expressions -
-
-
-g_match_info_get_regex, function in Perl-compatible regular expressions -
-
-
-g_match_info_get_string, function in Perl-compatible regular expressions -
-
-
-g_match_info_is_partial_match, function in Perl-compatible regular expressions -
-
-
-g_match_info_matches, function in Perl-compatible regular expressions -
-
-
-g_match_info_next, function in Perl-compatible regular expressions -
-
-
-g_match_info_ref, function in Perl-compatible regular expressions -
-
-
-g_match_info_unref, function in Perl-compatible regular expressions -
-
-
-MAX, macro in Standard Macros -
-
-
-G_MAXDOUBLE, macro in Basic Types -
-
-
-G_MAXFLOAT, macro in Basic Types -
-
-
-G_MAXINT, macro in Basic Types -
-
-
-G_MAXINT16, macro in Basic Types -
-
-
-G_MAXINT32, macro in Basic Types -
-
-
-G_MAXINT64, macro in Basic Types -
-
-
-G_MAXINT8, macro in Basic Types -
-
-
-G_MAXLONG, macro in Basic Types -
-
-
-G_MAXOFFSET, macro in Basic Types -
-
-
-MAXPATHLEN, macro in Windows Compatibility Functions -
-
-
-G_MAXSHORT, macro in Basic Types -
-
-
-G_MAXSIZE, macro in Basic Types -
-
-
-G_MAXSSIZE, macro in Basic Types -
-
-
-G_MAXUINT, macro in Basic Types -
-
-
-G_MAXUINT16, macro in Basic Types -
-
-
-G_MAXUINT32, macro in Basic Types -
-
-
-G_MAXUINT64, macro in Basic Types -
-
-
-G_MAXUINT8, macro in Basic Types -
-
-
-G_MAXULONG, macro in Basic Types -
-
-
-G_MAXUSHORT, macro in Basic Types -
-
-
-g_memdup, function in Memory Allocation -
-
-
-g_memmove, macro in Memory Allocation -
-
-
-GMemVTable, struct in Memory Allocation -
-
-
-G_MEM_ALIGN, macro in Standard Macros -
-
-
-g_mem_gc_friendly, variable in Memory Allocation -
-
-
-g_mem_is_system_malloc, function in Memory Allocation -
-
-
-g_mem_profile, function in Memory Allocation -
-
-
-g_mem_set_vtable, function in Memory Allocation -
-
-
-g_message, macro in Message Logging -
-
-
-MIN, macro in Standard Macros -
-
-
-G_MINDOUBLE, macro in Basic Types -
-
-
-G_MINFLOAT, macro in Basic Types -
-
-
-G_MININT, macro in Basic Types -
-
-
-G_MININT16, macro in Basic Types -
-
-
-G_MININT32, macro in Basic Types -
-
-
-G_MININT64, macro in Basic Types -
-
-
-G_MININT8, macro in Basic Types -
-
-
-G_MINLONG, macro in Basic Types -
-
-
-G_MINOFFSET, macro in Basic Types -
-
-
-G_MINSHORT, macro in Basic Types -
-
-
-G_MINSSIZE, macro in Basic Types -
-
-
-g_mkdir, function in File Utilities -
-
-
-g_mkdir_with_parents, function in File Utilities -
-
-
-g_mkdtemp, function in File Utilities -
-
-
-g_mkdtemp_full, function in File Utilities -
-
-
-g_mkstemp, function in File Utilities -
-
-
-g_mkstemp_full, function in File Utilities -
-
-
-GModule, struct in Dynamic Loading of Modules -
-
-
-GModuleCheckInit, user_function in Dynamic Loading of Modules -
-
-
-GModuleFlags, enum in Dynamic Loading of Modules -
-
-
-GModuleUnload, user_function in Dynamic Loading of Modules -
-
-
-g_module_build_path, function in Dynamic Loading of Modules -
-
-
-g_module_close, function in Dynamic Loading of Modules -
-
-
-g_module_error, function in Dynamic Loading of Modules -
-
-
-G_MODULE_EXPORT, macro in Dynamic Loading of Modules -
-
-
-G_MODULE_IMPORT, macro in Dynamic Loading of Modules -
-
-
-g_module_make_resident, function in Dynamic Loading of Modules -
-
-
-g_module_name, function in Dynamic Loading of Modules -
-
-
-g_module_open, function in Dynamic Loading of Modules -
-
-
-G_MODULE_SUFFIX, macro in Dynamic Loading of Modules -
-
-
-g_module_supported, function in Dynamic Loading of Modules -
-
-
-g_module_symbol, function in Dynamic Loading of Modules -
-
-
-GMutex, union in Threads -
-
-
-GMutexLocker, typedef in Threads -
-
-
-g_mutex_clear, function in Threads -
-
-
-g_mutex_free, function in Deprecated Thread APIs -
-
-
-g_mutex_init, function in Threads -
-
-
-g_mutex_lock, function in Threads -
-
-
-g_mutex_locker_free, function in Threads -
-
-
-g_mutex_locker_new, function in Threads -
-
-
-g_mutex_new, function in Deprecated Thread APIs -
-
-
-g_mutex_trylock, function in Threads -
-
-
-g_mutex_unlock, function in Threads -
-
-

N

-
-NC_, macro in I18N -
-
-
-g_new, macro in Memory Allocation -
-
-
-g_new0, macro in Memory Allocation -
-
-
-g_newa, macro in Memory Allocation -
-
-
-GNode, struct in N-ary Trees -
-
-
-GNodeForeachFunc, user_function in N-ary Trees -
-
-
-GNodeTraverseFunc, user_function in N-ary Trees -
-
-
-g_node_append, macro in N-ary Trees -
-
-
-g_node_append_data, macro in N-ary Trees -
-
-
-g_node_children_foreach, function in N-ary Trees -
-
-
-g_node_child_index, function in N-ary Trees -
-
-
-g_node_child_position, function in N-ary Trees -
-
-
-g_node_copy, function in N-ary Trees -
-
-
-g_node_copy_deep, function in N-ary Trees -
-
-
-g_node_depth, function in N-ary Trees -
-
-
-g_node_destroy, function in N-ary Trees -
-
-
-g_node_find, function in N-ary Trees -
-
-
-g_node_find_child, function in N-ary Trees -
-
-
-g_node_first_child, macro in N-ary Trees -
-
-
-g_node_first_sibling, function in N-ary Trees -
-
-
-g_node_get_root, function in N-ary Trees -
-
-
-g_node_insert, function in N-ary Trees -
-
-
-g_node_insert_after, function in N-ary Trees -
-
-
-g_node_insert_before, function in N-ary Trees -
-
-
-g_node_insert_data, macro in N-ary Trees -
-
-
-g_node_insert_data_after, macro in N-ary Trees -
-
-
-g_node_insert_data_before, macro in N-ary Trees -
-
-
-g_node_is_ancestor, function in N-ary Trees -
-
-
-G_NODE_IS_LEAF, macro in N-ary Trees -
-
-
-G_NODE_IS_ROOT, macro in N-ary Trees -
-
-
-g_node_last_child, function in N-ary Trees -
-
-
-g_node_last_sibling, function in N-ary Trees -
-
-
-g_node_max_height, function in N-ary Trees -
-
-
-g_node_new, function in N-ary Trees -
-
-
-g_node_next_sibling, macro in N-ary Trees -
-
-
-g_node_nth_child, function in N-ary Trees -
-
-
-g_node_n_children, function in N-ary Trees -
-
-
-g_node_n_nodes, function in N-ary Trees -
-
-
-g_node_prepend, function in N-ary Trees -
-
-
-g_node_prepend_data, macro in N-ary Trees -
-
-
-g_node_prev_sibling, macro in N-ary Trees -
-
-
-g_node_reverse_children, function in N-ary Trees -
-
-
-g_node_traverse, function in N-ary Trees -
-
-
-g_node_unlink, function in N-ary Trees -
-
-
-GNormalizeMode, enum in Unicode Manipulation -
-
-
-g_ntohl, macro in Byte Order Macros -
-
-
-g_ntohs, macro in Byte Order Macros -
-
-
-NULL, macro in Standard Macros -
-
-
-g_nullify_pointer, function in Miscellaneous Utility Functions -
-
-
-N_, macro in I18N -
-
-
-G_N_ELEMENTS, macro in Standard Macros -
-
-

O

-
-goffset, typedef in Basic Types -
-
-
-GOnce, struct in Threads -
-
-
-g_once, macro in Threads -
-
-
-GOnceStatus, enum in Threads -
-
-
-G_ONCE_INIT, macro in Threads -
-
-
-g_once_init_enter, function in Threads -
-
-
-g_once_init_leave, function in Threads -
-
-
-g_on_error_query, function in Warnings and Assertions -
-
-
-g_on_error_stack_trace, function in Warnings and Assertions -
-
-
-g_open, function in File Utilities -
-
-
-GOptionArg, enum in Commandline option parser -
-
-
-GOptionArgFunc, user_function in Commandline option parser -
-
-
-GOptionContext, struct in Commandline option parser -
-
-
-GOptionEntry, struct in Commandline option parser -
-
-
-GOptionError, enum in Commandline option parser -
-
-
-GOptionErrorFunc, user_function in Commandline option parser -
-
-
-GOptionFlags, enum in Commandline option parser -
-
-
-GOptionGroup, struct in Commandline option parser -
-
-
-GOptionParseFunc, user_function in Commandline option parser -
-
-
-g_option_context_add_group, function in Commandline option parser -
-
-
-g_option_context_add_main_entries, function in Commandline option parser -
-
-
-g_option_context_free, function in Commandline option parser -
-
-
-g_option_context_get_description, function in Commandline option parser -
-
-
-g_option_context_get_help, function in Commandline option parser -
-
-
-g_option_context_get_help_enabled, function in Commandline option parser -
-
-
-g_option_context_get_ignore_unknown_options, function in Commandline option parser -
-
-
-g_option_context_get_main_group, function in Commandline option parser -
-
-
-g_option_context_get_strict_posix, function in Commandline option parser -
-
-
-g_option_context_get_summary, function in Commandline option parser -
-
-
-g_option_context_new, function in Commandline option parser -
-
-
-g_option_context_parse, function in Commandline option parser -
-
-
-g_option_context_parse_strv, function in Commandline option parser -
-
-
-g_option_context_set_description, function in Commandline option parser -
-
-
-g_option_context_set_help_enabled, function in Commandline option parser -
-
-
-g_option_context_set_ignore_unknown_options, function in Commandline option parser -
-
-
-g_option_context_set_main_group, function in Commandline option parser -
-
-
-g_option_context_set_strict_posix, function in Commandline option parser -
-
-
-g_option_context_set_summary, function in Commandline option parser -
-
-
-g_option_context_set_translate_func, function in Commandline option parser -
-
-
-g_option_context_set_translation_domain, function in Commandline option parser -
-
-
-G_OPTION_ERROR, macro in Commandline option parser -
-
-
-g_option_group_add_entries, function in Commandline option parser -
-
-
-g_option_group_free, function in Commandline option parser -
-
-
-g_option_group_new, function in Commandline option parser -
-
-
-g_option_group_ref, function in Commandline option parser -
-
-
-g_option_group_set_error_hook, function in Commandline option parser -
-
-
-g_option_group_set_parse_hooks, function in Commandline option parser -
-
-
-g_option_group_set_translate_func, function in Commandline option parser -
-
-
-g_option_group_set_translation_domain, function in Commandline option parser -
-
-
-g_option_group_unref, function in Commandline option parser -
-
-
-G_OPTION_REMAINING, macro in Commandline option parser -
-
-
-G_OS_UNIX, macro in Standard Macros -
-
-
-G_OS_WIN32, macro in Standard Macros -
-
-

P

-
-g_parse_debug_string, function in Miscellaneous Utility Functions -
-
-
-G_PASTE, macro in Miscellaneous Macros -
-
-
-g_path_get_basename, function in Miscellaneous Utility Functions -
-
-
-g_path_get_dirname, function in Miscellaneous Utility Functions -
-
-
-g_path_is_absolute, function in Miscellaneous Utility Functions -
-
-
-g_path_skip_root, function in Miscellaneous Utility Functions -
-
-
-GPatternSpec, struct in Glob-style pattern matching -
-
-
-g_pattern_match, function in Glob-style pattern matching -
-
-
-g_pattern_match_simple, function in Glob-style pattern matching -
-
-
-g_pattern_match_string, function in Glob-style pattern matching -
-
-
-g_pattern_spec_equal, function in Glob-style pattern matching -
-
-
-g_pattern_spec_free, function in Glob-style pattern matching -
-
-
-g_pattern_spec_new, function in Glob-style pattern matching -
-
-
-G_PDP_ENDIAN, macro in Byte Order Macros -
-
-
-G_PI, macro in Numerical Definitions -
-
-
-GPid, typedef in The Main Event Loop -
-
-
-G_PID_FORMAT, macro in The Main Event Loop -
-
-
-G_PI_2, macro in Numerical Definitions -
-
-
-G_PI_4, macro in Numerical Definitions -
-
-
-gpointer, typedef in Basic Types -
-
-
-g_pointer_bit_lock, function in Threads -
-
-
-g_pointer_bit_trylock, function in Threads -
-
-
-g_pointer_bit_unlock, function in Threads -
-
-
-GPOINTER_TO_INT, macro in Type Conversion Macros -
-
-
-GPOINTER_TO_SIZE, macro in Type Conversion Macros -
-
-
-GPOINTER_TO_UINT, macro in Type Conversion Macros -
-
-
-g_poll, function in The Main Event Loop -
-
-
-GPollFD, struct in The Main Event Loop -
-
-
-G_POLLFD_FORMAT, macro in The Main Event Loop -
-
-
-GPollFunc, user_function in The Main Event Loop -
-
-
-g_prefix_error, function in Error Reporting -
-
-
-g_print, function in Warnings and Assertions -
-
-
-g_printerr, function in Warnings and Assertions -
-
-
-g_printf, function in String Utility Functions -
-
-
-GPrintFunc, user_function in Warnings and Assertions -
-
-
-g_printf_string_upper_bound, function in String Utility Functions -
-
-
-G_PRIORITY_DEFAULT, macro in The Main Event Loop -
-
-
-G_PRIORITY_DEFAULT_IDLE, macro in The Main Event Loop -
-
-
-G_PRIORITY_HIGH, macro in The Main Event Loop -
-
-
-G_PRIORITY_HIGH_IDLE, macro in The Main Event Loop -
-
-
-G_PRIORITY_LOW, macro in The Main Event Loop -
-
-
-GPrivate, struct in Threads -
-
-
-g_private_get, function in Threads -
-
-
-G_PRIVATE_INIT, macro in Threads -
-
-
-g_private_new, function in Deprecated Thread APIs -
-
-
-g_private_replace, function in Threads -
-
-
-g_private_set, function in Threads -
-
-
-g_propagate_error, function in Error Reporting -
-
-
-g_propagate_prefixed_error, function in Error Reporting -
-
-
-GPtrArray, struct in Pointer Arrays -
-
-
-g_ptr_array_add, function in Pointer Arrays -
-
-
-g_ptr_array_foreach, function in Pointer Arrays -
-
-
-g_ptr_array_free, function in Pointer Arrays -
-
-
-g_ptr_array_index, macro in Pointer Arrays -
-
-
-g_ptr_array_insert, function in Pointer Arrays -
-
-
-g_ptr_array_new, function in Pointer Arrays -
-
-
-g_ptr_array_new_full, function in Pointer Arrays -
-
-
-g_ptr_array_new_with_free_func, function in Pointer Arrays -
-
-
-g_ptr_array_ref, function in Pointer Arrays -
-
-
-g_ptr_array_remove, function in Pointer Arrays -
-
-
-g_ptr_array_remove_fast, function in Pointer Arrays -
-
-
-g_ptr_array_remove_index, function in Pointer Arrays -
-
-
-g_ptr_array_remove_index_fast, function in Pointer Arrays -
-
-
-g_ptr_array_remove_range, function in Pointer Arrays -
-
-
-g_ptr_array_set_free_func, function in Pointer Arrays -
-
-
-g_ptr_array_set_size, function in Pointer Arrays -
-
-
-g_ptr_array_sized_new, function in Pointer Arrays -
-
-
-g_ptr_array_sort, function in Pointer Arrays -
-
-
-g_ptr_array_sort_with_data, function in Pointer Arrays -
-
-
-g_ptr_array_unref, function in Pointer Arrays -
-
-

Q

-
-g_qsort_with_data, function in Miscellaneous Utility Functions -
-
-
-GQuark, typedef in Quarks -
-
-
-g_quark_from_static_string, function in Quarks -
-
-
-g_quark_from_string, function in Quarks -
-
-
-g_quark_to_string, function in Quarks -
-
-
-g_quark_try_string, function in Quarks -
-
-
-GQueue, struct in Double-ended Queues -
-
-
-g_queue_clear, function in Double-ended Queues -
-
-
-g_queue_copy, function in Double-ended Queues -
-
-
-g_queue_delete_link, function in Double-ended Queues -
-
-
-g_queue_find, function in Double-ended Queues -
-
-
-g_queue_find_custom, function in Double-ended Queues -
-
-
-g_queue_foreach, function in Double-ended Queues -
-
-
-g_queue_free, function in Double-ended Queues -
-
-
-g_queue_free_full, function in Double-ended Queues -
-
-
-g_queue_get_length, function in Double-ended Queues -
-
-
-g_queue_index, function in Double-ended Queues -
-
-
-G_QUEUE_INIT, macro in Double-ended Queues -
-
-
-g_queue_init, function in Double-ended Queues -
-
-
-g_queue_insert_after, function in Double-ended Queues -
-
-
-g_queue_insert_before, function in Double-ended Queues -
-
-
-g_queue_insert_sorted, function in Double-ended Queues -
-
-
-g_queue_is_empty, function in Double-ended Queues -
-
-
-g_queue_link_index, function in Double-ended Queues -
-
-
-g_queue_new, function in Double-ended Queues -
-
-
-g_queue_peek_head, function in Double-ended Queues -
-
-
-g_queue_peek_head_link, function in Double-ended Queues -
-
-
-g_queue_peek_nth, function in Double-ended Queues -
-
-
-g_queue_peek_nth_link, function in Double-ended Queues -
-
-
-g_queue_peek_tail, function in Double-ended Queues -
-
-
-g_queue_peek_tail_link, function in Double-ended Queues -
-
-
-g_queue_pop_head, function in Double-ended Queues -
-
-
-g_queue_pop_head_link, function in Double-ended Queues -
-
-
-g_queue_pop_nth, function in Double-ended Queues -
-
-
-g_queue_pop_nth_link, function in Double-ended Queues -
-
-
-g_queue_pop_tail, function in Double-ended Queues -
-
-
-g_queue_pop_tail_link, function in Double-ended Queues -
-
-
-g_queue_push_head, function in Double-ended Queues -
-
-
-g_queue_push_head_link, function in Double-ended Queues -
-
-
-g_queue_push_nth, function in Double-ended Queues -
-
-
-g_queue_push_nth_link, function in Double-ended Queues -
-
-
-g_queue_push_tail, function in Double-ended Queues -
-
-
-g_queue_push_tail_link, function in Double-ended Queues -
-
-
-g_queue_remove, function in Double-ended Queues -
-
-
-g_queue_remove_all, function in Double-ended Queues -
-
-
-g_queue_reverse, function in Double-ended Queues -
-
-
-g_queue_sort, function in Double-ended Queues -
-
-
-g_queue_unlink, function in Double-ended Queues -
-
-
-Q_, macro in I18N -
-
-

R

-
-GRand, struct in Random Numbers -
-
-
-g_random_boolean, macro in Random Numbers -
-
-
-g_random_double, function in Random Numbers -
-
-
-g_random_double_range, function in Random Numbers -
-
-
-g_random_int, function in Random Numbers -
-
-
-g_random_int_range, function in Random Numbers -
-
-
-g_random_set_seed, function in Random Numbers -
-
-
-g_rand_boolean, macro in Random Numbers -
-
-
-g_rand_copy, function in Random Numbers -
-
-
-g_rand_double, function in Random Numbers -
-
-
-g_rand_double_range, function in Random Numbers -
-
-
-g_rand_free, function in Random Numbers -
-
-
-g_rand_int, function in Random Numbers -
-
-
-g_rand_int_range, function in Random Numbers -
-
-
-g_rand_new, function in Random Numbers -
-
-
-g_rand_new_with_seed, function in Random Numbers -
-
-
-g_rand_new_with_seed_array, function in Random Numbers -
-
-
-g_rand_set_seed, function in Random Numbers -
-
-
-g_rand_set_seed_array, function in Random Numbers -
-
-
-g_realloc, function in Memory Allocation -
-
-
-g_realloc_n, function in Memory Allocation -
-
-
-GRecMutex, struct in Threads -
-
-
-g_rec_mutex_clear, function in Threads -
-
-
-g_rec_mutex_init, function in Threads -
-
-
-g_rec_mutex_lock, function in Threads -
-
-
-g_rec_mutex_trylock, function in Threads -
-
-
-g_rec_mutex_unlock, function in Threads -
-
-
-GRegex, struct in Perl-compatible regular expressions -
-
-
-GRegexCompileFlags, enum in Perl-compatible regular expressions -
-
-
-GRegexError, enum in Perl-compatible regular expressions -
-
-
-GRegexEvalCallback, user_function in Perl-compatible regular expressions -
-
-
-GRegexMatchFlags, enum in Perl-compatible regular expressions -
-
-
-g_regex_check_replacement, function in Perl-compatible regular expressions -
-
-
-G_REGEX_ERROR, macro in Perl-compatible regular expressions -
-
-
-g_regex_escape_nul, function in Perl-compatible regular expressions -
-
-
-g_regex_escape_string, function in Perl-compatible regular expressions -
-
-
-g_regex_get_capture_count, function in Perl-compatible regular expressions -
-
-
-g_regex_get_compile_flags, function in Perl-compatible regular expressions -
-
-
-g_regex_get_has_cr_or_lf, function in Perl-compatible regular expressions -
-
-
-g_regex_get_match_flags, function in Perl-compatible regular expressions -
-
-
-g_regex_get_max_backref, function in Perl-compatible regular expressions -
-
-
-g_regex_get_max_lookbehind, function in Perl-compatible regular expressions -
-
-
-g_regex_get_pattern, function in Perl-compatible regular expressions -
-
-
-g_regex_get_string_number, function in Perl-compatible regular expressions -
-
-
-g_regex_match, function in Perl-compatible regular expressions -
-
-
-g_regex_match_all, function in Perl-compatible regular expressions -
-
-
-g_regex_match_all_full, function in Perl-compatible regular expressions -
-
-
-g_regex_match_full, function in Perl-compatible regular expressions -
-
-
-g_regex_match_simple, function in Perl-compatible regular expressions -
-
-
-g_regex_new, function in Perl-compatible regular expressions -
-
-
-g_regex_ref, function in Perl-compatible regular expressions -
-
-
-g_regex_replace, function in Perl-compatible regular expressions -
-
-
-g_regex_replace_eval, function in Perl-compatible regular expressions -
-
-
-g_regex_replace_literal, function in Perl-compatible regular expressions -
-
-
-g_regex_split, function in Perl-compatible regular expressions -
-
-
-g_regex_split_full, function in Perl-compatible regular expressions -
-
-
-g_regex_split_simple, function in Perl-compatible regular expressions -
-
-
-g_regex_unref, function in Perl-compatible regular expressions -
-
-
-GRelation, struct in Relations and Tuples -
-
-
-g_relation_count, function in Relations and Tuples -
-
-
-g_relation_delete, function in Relations and Tuples -
-
-
-g_relation_destroy, function in Relations and Tuples -
-
-
-g_relation_exists, function in Relations and Tuples -
-
-
-g_relation_index, function in Relations and Tuples -
-
-
-g_relation_insert, function in Relations and Tuples -
-
-
-g_relation_new, function in Relations and Tuples -
-
-
-g_relation_print, function in Relations and Tuples -
-
-
-g_relation_select, function in Relations and Tuples -
-
-
-g_reload_user_special_dirs_cache, function in Miscellaneous Utility Functions -
-
-
-g_remove, function in File Utilities -
-
-
-g_rename, function in File Utilities -
-
-
-g_renew, macro in Memory Allocation -
-
-
-g_return_if_fail, macro in Warnings and Assertions -
-
-
-g_return_if_reached, macro in Warnings and Assertions -
-
-
-g_return_val_if_fail, macro in Warnings and Assertions -
-
-
-g_return_val_if_reached, macro in Warnings and Assertions -
-
-
-g_rmdir, function in File Utilities -
-
-
-GRWLock, struct in Threads -
-
-
-g_rw_lock_clear, function in Threads -
-
-
-g_rw_lock_init, function in Threads -
-
-
-g_rw_lock_reader_lock, function in Threads -
-
-
-g_rw_lock_reader_trylock, function in Threads -
-
-
-g_rw_lock_reader_unlock, function in Threads -
-
-
-g_rw_lock_writer_lock, function in Threads -
-
-
-g_rw_lock_writer_trylock, function in Threads -
-
-
-g_rw_lock_writer_unlock, function in Threads -
-
-

S

-
-GScanner, struct in Lexical Scanner -
-
-
-GScannerConfig, struct in Lexical Scanner -
-
-
-GScannerMsgFunc, user_function in Lexical Scanner -
-
-
-g_scanner_add_symbol, macro in Lexical Scanner -
-
-
-g_scanner_cur_line, function in Lexical Scanner -
-
-
-g_scanner_cur_position, function in Lexical Scanner -
-
-
-g_scanner_cur_token, function in Lexical Scanner -
-
-
-g_scanner_cur_value, function in Lexical Scanner -
-
-
-g_scanner_destroy, function in Lexical Scanner -
-
-
-g_scanner_eof, function in Lexical Scanner -
-
-
-g_scanner_error, function in Lexical Scanner -
-
-
-g_scanner_foreach_symbol, macro in Lexical Scanner -
-
-
-g_scanner_freeze_symbol_table, macro in Lexical Scanner -
-
-
-g_scanner_get_next_token, function in Lexical Scanner -
-
-
-g_scanner_input_file, function in Lexical Scanner -
-
-
-g_scanner_input_text, function in Lexical Scanner -
-
-
-g_scanner_lookup_symbol, function in Lexical Scanner -
-
-
-g_scanner_new, function in Lexical Scanner -
-
-
-g_scanner_peek_next_token, function in Lexical Scanner -
-
-
-g_scanner_remove_symbol, macro in Lexical Scanner -
-
-
-g_scanner_scope_add_symbol, function in Lexical Scanner -
-
-
-g_scanner_scope_foreach_symbol, function in Lexical Scanner -
-
-
-g_scanner_scope_lookup_symbol, function in Lexical Scanner -
-
-
-g_scanner_scope_remove_symbol, function in Lexical Scanner -
-
-
-g_scanner_set_scope, function in Lexical Scanner -
-
-
-g_scanner_sync_file_offset, function in Lexical Scanner -
-
-
-g_scanner_thaw_symbol_table, macro in Lexical Scanner -
-
-
-g_scanner_unexp_token, function in Lexical Scanner -
-
-
-g_scanner_warn, function in Lexical Scanner -
-
-
-G_SEARCHPATH_SEPARATOR, macro in Standard Macros -
-
-
-G_SEARCHPATH_SEPARATOR_S, macro in Standard Macros -
-
-
-GSeekType, enum in IO Channels -
-
-
-GSequence, struct in Sequences -
-
-
-GSequenceIter, typedef in Sequences -
-
-
-GSequenceIterCompareFunc, user_function in Sequences -
-
-
-g_sequence_append, function in Sequences -
-
-
-g_sequence_foreach, function in Sequences -
-
-
-g_sequence_foreach_range, function in Sequences -
-
-
-g_sequence_free, function in Sequences -
-
-
-g_sequence_get, function in Sequences -
-
-
-g_sequence_get_begin_iter, function in Sequences -
-
-
-g_sequence_get_end_iter, function in Sequences -
-
-
-g_sequence_get_iter_at_pos, function in Sequences -
-
-
-g_sequence_get_length, function in Sequences -
-
-
-g_sequence_insert_before, function in Sequences -
-
-
-g_sequence_insert_sorted, function in Sequences -
-
-
-g_sequence_insert_sorted_iter, function in Sequences -
-
-
-g_sequence_is_empty, function in Sequences -
-
-
-g_sequence_iter_compare, function in Sequences -
-
-
-g_sequence_iter_get_position, function in Sequences -
-
-
-g_sequence_iter_get_sequence, function in Sequences -
-
-
-g_sequence_iter_is_begin, function in Sequences -
-
-
-g_sequence_iter_is_end, function in Sequences -
-
-
-g_sequence_iter_move, function in Sequences -
-
-
-g_sequence_iter_next, function in Sequences -
-
-
-g_sequence_iter_prev, function in Sequences -
-
-
-g_sequence_lookup, function in Sequences -
-
-
-g_sequence_lookup_iter, function in Sequences -
-
-
-g_sequence_move, function in Sequences -
-
-
-g_sequence_move_range, function in Sequences -
-
-
-g_sequence_new, function in Sequences -
-
-
-g_sequence_prepend, function in Sequences -
-
-
-g_sequence_range_get_midpoint, function in Sequences -
-
-
-g_sequence_remove, function in Sequences -
-
-
-g_sequence_remove_range, function in Sequences -
-
-
-g_sequence_search, function in Sequences -
-
-
-g_sequence_search_iter, function in Sequences -
-
-
-g_sequence_set, function in Sequences -
-
-
-g_sequence_sort, function in Sequences -
-
-
-g_sequence_sort_changed, function in Sequences -
-
-
-g_sequence_sort_changed_iter, function in Sequences -
-
-
-g_sequence_sort_iter, function in Sequences -
-
-
-g_sequence_swap, function in Sequences -
-
-
-g_setenv, function in Miscellaneous Utility Functions -
-
-
-g_set_application_name, function in Miscellaneous Utility Functions -
-
-
-g_set_error, function in Error Reporting -
-
-
-g_set_error_literal, function in Error Reporting -
-
-
-g_set_prgname, function in Miscellaneous Utility Functions -
-
-
-g_set_printerr_handler, function in Warnings and Assertions -
-
-
-g_set_print_handler, function in Warnings and Assertions -
-
-
-GShellError, enum in Shell-related Utilities -
-
-
-G_SHELL_ERROR, macro in Shell-related Utilities -
-
-
-g_shell_parse_argv, function in Shell-related Utilities -
-
-
-g_shell_quote, function in Shell-related Utilities -
-
-
-g_shell_unquote, function in Shell-related Utilities -
-
-
-gshort, typedef in Basic Types -
-
-
-gsize, typedef in Basic Types -
-
-
-g_size_checked_add, macro in Bounds-checked integer arithmetic -
-
-
-g_size_checked_mul, macro in Bounds-checked integer arithmetic -
-
-
-GSIZE_FROM_BE, macro in Byte Order Macros -
-
-
-GSIZE_FROM_LE, macro in Byte Order Macros -
-
-
-GSIZE_TO_BE, macro in Byte Order Macros -
-
-
-GSIZE_TO_LE, macro in Byte Order Macros -
-
-
-GSIZE_TO_POINTER, macro in Type Conversion Macros -
-
-
-g_slice_alloc, function in Memory Slices -
-
-
-g_slice_alloc0, function in Memory Slices -
-
-
-g_slice_copy, function in Memory Slices -
-
-
-g_slice_dup, macro in Memory Slices -
-
-
-g_slice_free, macro in Memory Slices -
-
-
-g_slice_free1, function in Memory Slices -
-
-
-g_slice_free_chain, macro in Memory Slices -
-
-
-g_slice_free_chain_with_offset, function in Memory Slices -
-
-
-g_slice_new, macro in Memory Slices -
-
-
-g_slice_new0, macro in Memory Slices -
-
-
-GSList, struct in Singly-Linked Lists -
-
-
-g_slist_alloc, function in Singly-Linked Lists -
-
-
-g_slist_append, function in Singly-Linked Lists -
-
-
-g_slist_concat, function in Singly-Linked Lists -
-
-
-g_slist_copy, function in Singly-Linked Lists -
-
-
-g_slist_copy_deep, function in Singly-Linked Lists -
-
-
-g_slist_delete_link, function in Singly-Linked Lists -
-
-
-g_slist_find, function in Singly-Linked Lists -
-
-
-g_slist_find_custom, function in Singly-Linked Lists -
-
-
-g_slist_foreach, function in Singly-Linked Lists -
-
-
-g_slist_free, function in Singly-Linked Lists -
-
-
-g_slist_free1, macro in Singly-Linked Lists -
-
-
-g_slist_free_1, function in Singly-Linked Lists -
-
-
-g_slist_free_full, function in Singly-Linked Lists -
-
-
-g_slist_index, function in Singly-Linked Lists -
-
-
-g_slist_insert, function in Singly-Linked Lists -
-
-
-g_slist_insert_before, function in Singly-Linked Lists -
-
-
-g_slist_insert_sorted, function in Singly-Linked Lists -
-
-
-g_slist_insert_sorted_with_data, function in Singly-Linked Lists -
-
-
-g_slist_last, function in Singly-Linked Lists -
-
-
-g_slist_length, function in Singly-Linked Lists -
-
-
-g_slist_next, macro in Singly-Linked Lists -
-
-
-g_slist_nth, function in Singly-Linked Lists -
-
-
-g_slist_nth_data, function in Singly-Linked Lists -
-
-
-g_slist_position, function in Singly-Linked Lists -
-
-
-g_slist_prepend, function in Singly-Linked Lists -
-
-
-g_slist_remove, function in Singly-Linked Lists -
-
-
-g_slist_remove_all, function in Singly-Linked Lists -
-
-
-g_slist_remove_link, function in Singly-Linked Lists -
-
-
-g_slist_reverse, function in Singly-Linked Lists -
-
-
-g_slist_sort, function in Singly-Linked Lists -
-
-
-g_slist_sort_with_data, function in Singly-Linked Lists -
-
-
-g_snprintf, function in String Utility Functions -
-
-
-GSource, struct in The Main Event Loop -
-
-
-GSourceCallbackFuncs, struct in The Main Event Loop -
-
-
-GSourceDummyMarshal, user_function in The Main Event Loop -
-
-
-GSourceFunc, user_function in The Main Event Loop -
-
-
-GSourceFuncs, struct in The Main Event Loop -
-
-
-g_source_add_child_source, function in The Main Event Loop -
-
-
-g_source_add_poll, function in The Main Event Loop -
-
-
-g_source_add_unix_fd, function in The Main Event Loop -
-
-
-g_source_attach, function in The Main Event Loop -
-
-
-G_SOURCE_CONTINUE, macro in The Main Event Loop -
-
-
-g_source_destroy, function in The Main Event Loop -
-
-
-g_source_get_can_recurse, function in The Main Event Loop -
-
-
-g_source_get_context, function in The Main Event Loop -
-
-
-g_source_get_current_time, function in The Main Event Loop -
-
-
-g_source_get_id, function in The Main Event Loop -
-
-
-g_source_get_name, function in The Main Event Loop -
-
-
-g_source_get_priority, function in The Main Event Loop -
-
-
-g_source_get_ready_time, function in The Main Event Loop -
-
-
-g_source_get_time, function in The Main Event Loop -
-
-
-g_source_is_destroyed, function in The Main Event Loop -
-
-
-g_source_modify_unix_fd, function in The Main Event Loop -
-
-
-g_source_new, function in The Main Event Loop -
-
-
-g_source_query_unix_fd, function in The Main Event Loop -
-
-
-g_source_ref, function in The Main Event Loop -
-
-
-G_SOURCE_REMOVE, macro in The Main Event Loop -
-
-
-g_source_remove, function in The Main Event Loop -
-
-
-g_source_remove_by_funcs_user_data, function in The Main Event Loop -
-
-
-g_source_remove_by_user_data, function in The Main Event Loop -
-
-
-g_source_remove_child_source, function in The Main Event Loop -
-
-
-g_source_remove_poll, function in The Main Event Loop -
-
-
-g_source_remove_unix_fd, function in The Main Event Loop -
-
-
-g_source_set_callback, function in The Main Event Loop -
-
-
-g_source_set_callback_indirect, function in The Main Event Loop -
-
-
-g_source_set_can_recurse, function in The Main Event Loop -
-
-
-g_source_set_funcs, function in The Main Event Loop -
-
-
-g_source_set_name, function in The Main Event Loop -
-
-
-g_source_set_name_by_id, function in The Main Event Loop -
-
-
-g_source_set_priority, function in The Main Event Loop -
-
-
-g_source_set_ready_time, function in The Main Event Loop -
-
-
-g_source_unref, function in The Main Event Loop -
-
-
-g_spaced_primes_closest, function in Miscellaneous Utility Functions -
-
-
-GSpawnChildSetupFunc, user_function in Spawning Processes -
-
-
-GSpawnError, enum in Spawning Processes -
-
-
-GSpawnFlags, enum in Spawning Processes -
-
-
-g_spawn_async, function in Spawning Processes -
-
-
-g_spawn_async_with_pipes, function in Spawning Processes -
-
-
-g_spawn_check_exit_status, function in Spawning Processes -
-
-
-g_spawn_close_pid, function in Spawning Processes -
-
-
-g_spawn_command_line_async, function in Spawning Processes -
-
-
-g_spawn_command_line_sync, function in Spawning Processes -
-
-
-G_SPAWN_ERROR, macro in Spawning Processes -
-
-
-G_SPAWN_EXIT_ERROR, macro in Spawning Processes -
-
-
-g_spawn_sync, function in Spawning Processes -
-
-
-g_sprintf, function in String Utility Functions -
-
-
-G_SQRT2, macro in Numerical Definitions -
-
-
-gssize, typedef in Basic Types -
-
-
-GSSIZE_FROM_BE, macro in Byte Order Macros -
-
-
-GSSIZE_FROM_LE, macro in Byte Order Macros -
-
-
-GSSIZE_TO_BE, macro in Byte Order Macros -
-
-
-GSSIZE_TO_LE, macro in Byte Order Macros -
-
-
-g_stat, function in File Utilities -
-
-
-GStatBuf, typedef in File Utilities -
-
-
-GStaticMutex, struct in Deprecated Thread APIs -
-
-
-GStaticPrivate, struct in Deprecated Thread APIs -
-
-
-GStaticRecMutex, struct in Deprecated Thread APIs -
-
-
-GStaticRWLock, struct in Deprecated Thread APIs -
-
-
-G_STATIC_ASSERT, macro in Miscellaneous Macros -
-
-
-G_STATIC_ASSERT_EXPR, macro in Miscellaneous Macros -
-
-
-g_static_mutex_free, function in Deprecated Thread APIs -
-
-
-g_static_mutex_get_mutex, function in Deprecated Thread APIs -
-
-
-G_STATIC_MUTEX_INIT, macro in Deprecated Thread APIs -
-
-
-g_static_mutex_init, function in Deprecated Thread APIs -
-
-
-g_static_mutex_lock, function in Deprecated Thread APIs -
-
-
-g_static_mutex_trylock, function in Deprecated Thread APIs -
-
-
-g_static_mutex_unlock, function in Deprecated Thread APIs -
-
-
-g_static_private_free, function in Deprecated Thread APIs -
-
-
-g_static_private_get, function in Deprecated Thread APIs -
-
-
-G_STATIC_PRIVATE_INIT, macro in Deprecated Thread APIs -
-
-
-g_static_private_init, function in Deprecated Thread APIs -
-
-
-g_static_private_set, function in Deprecated Thread APIs -
-
-
-g_static_rec_mutex_free, function in Deprecated Thread APIs -
-
-
-G_STATIC_REC_MUTEX_INIT, macro in Deprecated Thread APIs -
-
-
-g_static_rec_mutex_init, function in Deprecated Thread APIs -
-
-
-g_static_rec_mutex_lock, function in Deprecated Thread APIs -
-
-
-g_static_rec_mutex_lock_full, function in Deprecated Thread APIs -
-
-
-g_static_rec_mutex_trylock, function in Deprecated Thread APIs -
-
-
-g_static_rec_mutex_unlock, function in Deprecated Thread APIs -
-
-
-g_static_rec_mutex_unlock_full, function in Deprecated Thread APIs -
-
-
-g_static_rw_lock_free, function in Deprecated Thread APIs -
-
-
-G_STATIC_RW_LOCK_INIT, macro in Deprecated Thread APIs -
-
-
-g_static_rw_lock_init, function in Deprecated Thread APIs -
-
-
-g_static_rw_lock_reader_lock, function in Deprecated Thread APIs -
-
-
-g_static_rw_lock_reader_trylock, function in Deprecated Thread APIs -
-
-
-g_static_rw_lock_reader_unlock, function in Deprecated Thread APIs -
-
-
-g_static_rw_lock_writer_lock, function in Deprecated Thread APIs -
-
-
-g_static_rw_lock_writer_trylock, function in Deprecated Thread APIs -
-
-
-g_static_rw_lock_writer_unlock, function in Deprecated Thread APIs -
-
-
-g_steal_pointer, function in Memory Allocation -
-
-
-G_STMT_END, macro in Miscellaneous Macros -
-
-
-G_STMT_START, macro in Miscellaneous Macros -
-
-
-g_stpcpy, function in String Utility Functions -
-
-
-g_strcanon, function in String Utility Functions -
-
-
-g_strcasecmp, function in String Utility Functions -
-
-
-g_strchomp, function in String Utility Functions -
-
-
-g_strchug, function in String Utility Functions -
-
-
-g_strcmp0, function in String Utility Functions -
-
-
-g_strcompress, function in String Utility Functions -
-
-
-g_strconcat, function in String Utility Functions -
-
-
-g_strdelimit, function in String Utility Functions -
-
-
-g_strdown, function in String Utility Functions -
-
-
-g_strdup, function in String Utility Functions -
-
-
-g_strdupv, function in String Utility Functions -
-
-
-g_strdup_printf, function in String Utility Functions -
-
-
-g_strdup_vprintf, function in String Utility Functions -
-
-
-g_strerror, function in String Utility Functions -
-
-
-g_strescape, function in String Utility Functions -
-
-
-g_strfreev, function in String Utility Functions -
-
-
-G_STRFUNC, macro in Miscellaneous Macros -
-
-
-GString, struct in Strings -
-
-
-GStringChunk, struct in String Chunks -
-
-
-G_STRINGIFY, macro in Miscellaneous Macros -
-
-
-g_string_append, function in Strings -
-
-
-g_string_append_c, function in Strings -
-
-
-g_string_append_len, function in Strings -
-
-
-g_string_append_printf, function in Strings -
-
-
-g_string_append_unichar, function in Strings -
-
-
-g_string_append_uri_escaped, function in Strings -
-
-
-g_string_append_vprintf, function in Strings -
-
-
-g_string_ascii_down, function in String Utility Functions -
-
-
-g_string_ascii_up, function in String Utility Functions -
-
-
-g_string_assign, function in Strings -
-
-
-g_string_chunk_clear, function in String Chunks -
-
-
-g_string_chunk_free, function in String Chunks -
-
-
-g_string_chunk_insert, function in String Chunks -
-
-
-g_string_chunk_insert_const, function in String Chunks -
-
-
-g_string_chunk_insert_len, function in String Chunks -
-
-
-g_string_chunk_new, function in String Chunks -
-
-
-g_string_down, function in Strings -
-
-
-g_string_equal, function in Strings -
-
-
-g_string_erase, function in Strings -
-
-
-g_string_free, function in Strings -
-
-
-g_string_free_to_bytes, function in Strings -
-
-
-g_string_hash, function in Strings -
-
-
-g_string_insert, function in Strings -
-
-
-g_string_insert_c, function in Strings -
-
-
-g_string_insert_len, function in Strings -
-
-
-g_string_insert_unichar, function in Strings -
-
-
-g_string_new, function in Strings -
-
-
-g_string_new_len, function in Strings -
-
-
-g_string_overwrite, function in Strings -
-
-
-g_string_overwrite_len, function in Strings -
-
-
-g_string_prepend, function in Strings -
-
-
-g_string_prepend_c, function in Strings -
-
-
-g_string_prepend_len, function in Strings -
-
-
-g_string_prepend_unichar, function in Strings -
-
-
-g_string_printf, function in Strings -
-
-
-g_string_set_size, function in Strings -
-
-
-g_string_sized_new, function in Strings -
-
-
-g_string_sprintf, macro in Strings -
-
-
-g_string_sprintfa, macro in Strings -
-
-
-g_string_truncate, function in Strings -
-
-
-g_string_up, function in Strings -
-
-
-g_string_vprintf, function in Strings -
-
-
-g_strip_context, function in I18N -
-
-
-g_strjoin, function in String Utility Functions -
-
-
-g_strjoinv, function in String Utility Functions -
-
-
-g_strlcat, function in String Utility Functions -
-
-
-g_strlcpy, function in String Utility Functions -
-
-
-G_STRLOC, macro in Miscellaneous Macros -
-
-
-g_strncasecmp, function in String Utility Functions -
-
-
-g_strndup, function in String Utility Functions -
-
-
-g_strnfill, function in String Utility Functions -
-
-
-g_strreverse, function in String Utility Functions -
-
-
-g_strrstr, function in String Utility Functions -
-
-
-g_strrstr_len, function in String Utility Functions -
-
-
-g_strsignal, function in String Utility Functions -
-
-
-g_strsplit, function in String Utility Functions -
-
-
-g_strsplit_set, function in String Utility Functions -
-
-
-g_strstrip, macro in String Utility Functions -
-
-
-g_strstr_len, function in String Utility Functions -
-
-
-g_strtod, function in String Utility Functions -
-
-
-G_STRUCT_MEMBER, macro in Standard Macros -
-
-
-G_STRUCT_MEMBER_P, macro in Standard Macros -
-
-
-G_STRUCT_OFFSET, macro in Standard Macros -
-
-
-g_strup, function in String Utility Functions -
-
-
-GStrv, typedef in String Utility Functions -
-
-
-g_strv_contains, function in String Utility Functions -
-
-
-g_strv_length, function in String Utility Functions -
-
-
-G_STR_DELIMITERS, macro in String Utility Functions -
-
-
-g_str_equal, function in Hash Tables -
-
-
-g_str_hash, function in Hash Tables -
-
-
-g_str_has_prefix, function in String Utility Functions -
-
-
-g_str_has_suffix, function in String Utility Functions -
-
-
-g_str_is_ascii, function in String Utility Functions -
-
-
-g_str_match_string, function in String Utility Functions -
-
-
-g_str_tokenize_and_fold, function in String Utility Functions -
-
-
-g_str_to_ascii, function in String Utility Functions -
-
-

T

-
-GTestCase, typedef in Testing -
-
-
-GTestDataFunc, user_function in Testing -
-
-
-GTestFileType, enum in Testing -
-
-
-GTestFixtureFunc, user_function in Testing -
-
-
-GTestFunc, user_function in Testing -
-
-
-GTestLogFatalFunc, user_function in Testing -
-
-
-GTestSubprocessFlags, enum in Testing -
-
-
-GTestSuite, typedef in Testing -
-
-
-GTestTrapFlags, enum in Testing -
-
-
-g_test_add, macro in Testing -
-
-
-g_test_add_data_func, function in Testing -
-
-
-g_test_add_data_func_full, function in Testing -
-
-
-g_test_add_func, function in Testing -
-
-
-g_test_assert_expected_messages, macro in Testing -
-
-
-g_test_bug, function in Testing -
-
-
-g_test_bug_base, function in Testing -
-
-
-g_test_build_filename, function in Testing -
-
-
-g_test_create_case, function in Testing -
-
-
-g_test_create_suite, function in Testing -
-
-
-g_test_expect_message, function in Testing -
-
-
-g_test_fail, function in Testing -
-
-
-g_test_failed, function in Testing -
-
-
-g_test_get_dir, function in Testing -
-
-
-g_test_get_filename, function in Testing -
-
-
-g_test_get_root, function in Testing -
-
-
-g_test_incomplete, function in Testing -
-
-
-g_test_init, function in Testing -
-
-
-g_test_initialized, macro in Testing -
-
-
-g_test_log_set_fatal_handler, function in Testing -
-
-
-g_test_maximized_result, function in Testing -
-
-
-g_test_message, function in Testing -
-
-
-g_test_minimized_result, function in Testing -
-
-
-g_test_perf, macro in Testing -
-
-
-g_test_queue_destroy, function in Testing -
-
-
-g_test_queue_free, function in Testing -
-
-
-g_test_queue_unref, macro in Testing -
-
-
-g_test_quick, macro in Testing -
-
-
-g_test_quiet, macro in Testing -
-
-
-g_test_rand_bit, macro in Testing -
-
-
-g_test_rand_double, function in Testing -
-
-
-g_test_rand_double_range, function in Testing -
-
-
-g_test_rand_int, function in Testing -
-
-
-g_test_rand_int_range, function in Testing -
-
-
-g_test_run, function in Testing -
-
-
-g_test_run_suite, function in Testing -
-
-
-g_test_set_nonfatal_assertions, function in Testing -
-
-
-g_test_skip, function in Testing -
-
-
-g_test_slow, macro in Testing -
-
-
-g_test_subprocess, function in Testing -
-
-
-g_test_suite_add, function in Testing -
-
-
-g_test_suite_add_suite, function in Testing -
-
-
-g_test_thorough, macro in Testing -
-
-
-g_test_timer_elapsed, function in Testing -
-
-
-g_test_timer_last, function in Testing -
-
-
-g_test_timer_start, function in Testing -
-
-
-g_test_trap_assert_failed, macro in Testing -
-
-
-g_test_trap_assert_passed, macro in Testing -
-
-
-g_test_trap_assert_stderr, macro in Testing -
-
-
-g_test_trap_assert_stderr_unmatched, macro in Testing -
-
-
-g_test_trap_assert_stdout, macro in Testing -
-
-
-g_test_trap_assert_stdout_unmatched, macro in Testing -
-
-
-g_test_trap_fork, function in Testing -
-
-
-g_test_trap_has_passed, function in Testing -
-
-
-g_test_trap_reached_timeout, function in Testing -
-
-
-g_test_trap_subprocess, function in Testing -
-
-
-g_test_undefined, macro in Testing -
-
-
-g_test_verbose, macro in Testing -
-
-
-GThread, struct in Threads -
-
-
-GThreadError, enum in Threads -
-
-
-GThreadFunc, user_function in Threads -
-
-
-GThreadPool, struct in Thread Pools -
-
-
-GThreadPriority, enum in Deprecated Thread APIs -
-
-
-G_THREADS_IMPL_POSIX, macro in Deprecated Thread APIs -
-
-
-G_THREADS_IMPL_WIN32, macro in Deprecated Thread APIs -
-
-
-g_thread_create, function in Deprecated Thread APIs -
-
-
-g_thread_create_full, function in Deprecated Thread APIs -
-
-
-G_THREAD_ERROR, macro in Threads -
-
-
-g_thread_exit, function in Threads -
-
-
-g_thread_foreach, function in Deprecated Thread APIs -
-
-
-g_thread_get_initialized, function in Deprecated Thread APIs -
-
-
-g_thread_init, function in Deprecated Thread APIs -
-
-
-g_thread_join, function in Threads -
-
-
-g_thread_new, function in Threads -
-
-
-g_thread_pool_free, function in Thread Pools -
-
-
-g_thread_pool_get_max_idle_time, function in Thread Pools -
-
-
-g_thread_pool_get_max_threads, function in Thread Pools -
-
-
-g_thread_pool_get_max_unused_threads, function in Thread Pools -
-
-
-g_thread_pool_get_num_threads, function in Thread Pools -
-
-
-g_thread_pool_get_num_unused_threads, function in Thread Pools -
-
-
-g_thread_pool_move_to_front, function in Thread Pools -
-
-
-g_thread_pool_new, function in Thread Pools -
-
-
-g_thread_pool_push, function in Thread Pools -
-
-
-g_thread_pool_set_max_idle_time, function in Thread Pools -
-
-
-g_thread_pool_set_max_threads, function in Thread Pools -
-
-
-g_thread_pool_set_max_unused_threads, function in Thread Pools -
-
-
-g_thread_pool_set_sort_function, function in Thread Pools -
-
-
-g_thread_pool_stop_unused_threads, function in Thread Pools -
-
-
-g_thread_pool_unprocessed, function in Thread Pools -
-
-
-g_thread_ref, function in Threads -
-
-
-g_thread_self, function in Threads -
-
-
-g_thread_set_priority, function in Deprecated Thread APIs -
-
-
-g_thread_supported, function in Deprecated Thread APIs -
-
-
-g_thread_try_new, function in Threads -
-
-
-g_thread_unref, function in Threads -
-
-
-g_thread_yield, function in Threads -
-
-
-GTime, typedef in Date and Time Functions -
-
-
-g_timeout_add, function in The Main Event Loop -
-
-
-g_timeout_add_full, function in The Main Event Loop -
-
-
-g_timeout_add_seconds, function in The Main Event Loop -
-
-
-g_timeout_add_seconds_full, function in The Main Event Loop -
-
-
-g_timeout_source_new, function in The Main Event Loop -
-
-
-g_timeout_source_new_seconds, function in The Main Event Loop -
-
-
-GTimer, struct in Timers -
-
-
-g_timer_continue, function in Timers -
-
-
-g_timer_destroy, function in Timers -
-
-
-g_timer_elapsed, function in Timers -
-
-
-g_timer_new, function in Timers -
-
-
-g_timer_reset, function in Timers -
-
-
-g_timer_start, function in Timers -
-
-
-g_timer_stop, function in Timers -
-
-
-GTimeSpan, typedef in GDateTime -
-
-
-GTimeType, enum in GTimeZone -
-
-
-GTimeVal, struct in Date and Time Functions -
-
-
-GTimeZone, struct in GTimeZone -
-
-
-G_TIME_SPAN_DAY, macro in GDateTime -
-
-
-G_TIME_SPAN_HOUR, macro in GDateTime -
-
-
-G_TIME_SPAN_MILLISECOND, macro in GDateTime -
-
-
-G_TIME_SPAN_MINUTE, macro in GDateTime -
-
-
-G_TIME_SPAN_SECOND, macro in GDateTime -
-
-
-g_time_val_add, function in Date and Time Functions -
-
-
-g_time_val_from_iso8601, function in Date and Time Functions -
-
-
-g_time_val_to_iso8601, function in Date and Time Functions -
-
-
-g_time_zone_adjust_time, function in GTimeZone -
-
-
-g_time_zone_find_interval, function in GTimeZone -
-
-
-g_time_zone_get_abbreviation, function in GTimeZone -
-
-
-g_time_zone_get_offset, function in GTimeZone -
-
-
-g_time_zone_is_dst, function in GTimeZone -
-
-
-g_time_zone_new, function in GTimeZone -
-
-
-g_time_zone_new_local, function in GTimeZone -
-
-
-g_time_zone_new_utc, function in GTimeZone -
-
-
-g_time_zone_ref, function in GTimeZone -
-
-
-g_time_zone_unref, function in GTimeZone -
-
-
-GTokenType, enum in Lexical Scanner -
-
-
-GTokenValue, union in Lexical Scanner -
-
-
-GTranslateFunc, user_function in Commandline option parser -
-
-
-GTrashStack, struct in Trash Stacks -
-
-
-g_trash_stack_height, function in Trash Stacks -
-
-
-g_trash_stack_peek, function in Trash Stacks -
-
-
-g_trash_stack_pop, function in Trash Stacks -
-
-
-g_trash_stack_push, function in Trash Stacks -
-
-
-GTraverseFlags, enum in N-ary Trees -
-
-
-GTraverseFunc, user_function in Balanced Binary Trees -
-
-
-GTraverseType, enum in N-ary Trees -
-
-
-GTree, struct in Balanced Binary Trees -
-
-
-g_tree_destroy, function in Balanced Binary Trees -
-
-
-g_tree_foreach, function in Balanced Binary Trees -
-
-
-g_tree_height, function in Balanced Binary Trees -
-
-
-g_tree_insert, function in Balanced Binary Trees -
-
-
-g_tree_lookup, function in Balanced Binary Trees -
-
-
-g_tree_lookup_extended, function in Balanced Binary Trees -
-
-
-g_tree_new, function in Balanced Binary Trees -
-
-
-g_tree_new_full, function in Balanced Binary Trees -
-
-
-g_tree_new_with_data, function in Balanced Binary Trees -
-
-
-g_tree_nnodes, function in Balanced Binary Trees -
-
-
-g_tree_ref, function in Balanced Binary Trees -
-
-
-g_tree_remove, function in Balanced Binary Trees -
-
-
-g_tree_replace, function in Balanced Binary Trees -
-
-
-g_tree_search, function in Balanced Binary Trees -
-
-
-g_tree_steal, function in Balanced Binary Trees -
-
-
-g_tree_traverse, function in Balanced Binary Trees -
-
-
-g_tree_unref, function in Balanced Binary Trees -
-
-
-TRUE, macro in Standard Macros -
-
-
-G_TRYLOCK, macro in Threads -
-
-
-g_try_malloc, function in Memory Allocation -
-
-
-g_try_malloc0, function in Memory Allocation -
-
-
-g_try_malloc0_n, function in Memory Allocation -
-
-
-g_try_malloc_n, function in Memory Allocation -
-
-
-g_try_new, macro in Memory Allocation -
-
-
-g_try_new0, macro in Memory Allocation -
-
-
-g_try_realloc, function in Memory Allocation -
-
-
-g_try_realloc_n, function in Memory Allocation -
-
-
-g_try_renew, macro in Memory Allocation -
-
-
-GTuples, struct in Relations and Tuples -
-
-
-g_tuples_destroy, function in Relations and Tuples -
-
-
-g_tuples_index, function in Relations and Tuples -
-
-

U

-
-guchar, typedef in Basic Types -
-
-
-g_ucs4_to_utf16, function in Unicode Manipulation -
-
-
-g_ucs4_to_utf8, function in Unicode Manipulation -
-
-
-guint, function in Basic Types -
-
-
-guint16, typedef in Basic Types -
-
-
-GUINT16_FROM_BE, macro in Byte Order Macros -
-
-
-GUINT16_FROM_LE, macro in Byte Order Macros -
-
-
-GUINT16_SWAP_BE_PDP, macro in Byte Order Macros -
-
-
-GUINT16_SWAP_LE_BE, macro in Byte Order Macros -
-
-
-GUINT16_SWAP_LE_PDP, macro in Byte Order Macros -
-
-
-GUINT16_TO_BE, macro in Byte Order Macros -
-
-
-GUINT16_TO_LE, macro in Byte Order Macros -
-
-
-guint32, typedef in Basic Types -
-
-
-GUINT32_FROM_BE, macro in Byte Order Macros -
-
-
-GUINT32_FROM_LE, macro in Byte Order Macros -
-
-
-GUINT32_SWAP_BE_PDP, macro in Byte Order Macros -
-
-
-GUINT32_SWAP_LE_BE, macro in Byte Order Macros -
-
-
-GUINT32_SWAP_LE_PDP, macro in Byte Order Macros -
-
-
-GUINT32_TO_BE, macro in Byte Order Macros -
-
-
-GUINT32_TO_LE, macro in Byte Order Macros -
-
-
-guint64, typedef in Basic Types -
-
-
-g_uint64_checked_add, macro in Bounds-checked integer arithmetic -
-
-
-g_uint64_checked_mul, macro in Bounds-checked integer arithmetic -
-
-
-GUINT64_FROM_BE, macro in Byte Order Macros -
-
-
-GUINT64_FROM_LE, macro in Byte Order Macros -
-
-
-GUINT64_SWAP_LE_BE, macro in Byte Order Macros -
-
-
-GUINT64_TO_BE, macro in Byte Order Macros -
-
-
-GUINT64_TO_LE, macro in Byte Order Macros -
-
-
-guint8, typedef in Basic Types -
-
-
-guintptr, typedef in Basic Types -
-
-
-g_uint_checked_add, macro in Bounds-checked integer arithmetic -
-
-
-g_uint_checked_mul, macro in Bounds-checked integer arithmetic -
-
-
-GUINT_FROM_BE, macro in Byte Order Macros -
-
-
-GUINT_FROM_LE, macro in Byte Order Macros -
-
-
-GUINT_TO_BE, macro in Byte Order Macros -
-
-
-GUINT_TO_LE, macro in Byte Order Macros -
-
-
-GUINT_TO_POINTER, macro in Type Conversion Macros -
-
-
-gulong, typedef in Basic Types -
-
-
-GULONG_FROM_BE, macro in Byte Order Macros -
-
-
-GULONG_FROM_LE, macro in Byte Order Macros -
-
-
-GULONG_TO_BE, macro in Byte Order Macros -
-
-
-GULONG_TO_LE, macro in Byte Order Macros -
-
-
-G_UNAVAILABLE, macro in Miscellaneous Macros -
-
-
-gunichar, typedef in Unicode Manipulation -
-
-
-gunichar2, typedef in Unicode Manipulation -
-
-
-g_unichar_break_type, function in Unicode Manipulation -
-
-
-g_unichar_combining_class, function in Unicode Manipulation -
-
-
-g_unichar_compose, function in Unicode Manipulation -
-
-
-g_unichar_decompose, function in Unicode Manipulation -
-
-
-g_unichar_digit_value, function in Unicode Manipulation -
-
-
-g_unichar_fully_decompose, function in Unicode Manipulation -
-
-
-g_unichar_get_mirror_char, function in Unicode Manipulation -
-
-
-g_unichar_get_script, function in Unicode Manipulation -
-
-
-g_unichar_isalnum, function in Unicode Manipulation -
-
-
-g_unichar_isalpha, function in Unicode Manipulation -
-
-
-g_unichar_iscntrl, function in Unicode Manipulation -
-
-
-g_unichar_isdefined, function in Unicode Manipulation -
-
-
-g_unichar_isdigit, function in Unicode Manipulation -
-
-
-g_unichar_isgraph, function in Unicode Manipulation -
-
-
-g_unichar_islower, function in Unicode Manipulation -
-
-
-g_unichar_ismark, function in Unicode Manipulation -
-
-
-g_unichar_isprint, function in Unicode Manipulation -
-
-
-g_unichar_ispunct, function in Unicode Manipulation -
-
-
-g_unichar_isspace, function in Unicode Manipulation -
-
-
-g_unichar_istitle, function in Unicode Manipulation -
-
-
-g_unichar_isupper, function in Unicode Manipulation -
-
-
-g_unichar_iswide, function in Unicode Manipulation -
-
-
-g_unichar_iswide_cjk, function in Unicode Manipulation -
-
-
-g_unichar_isxdigit, function in Unicode Manipulation -
-
-
-g_unichar_iszerowidth, function in Unicode Manipulation -
-
-
-G_UNICHAR_MAX_DECOMPOSITION_LENGTH, macro in Unicode Manipulation -
-
-
-g_unichar_tolower, function in Unicode Manipulation -
-
-
-g_unichar_totitle, function in Unicode Manipulation -
-
-
-g_unichar_toupper, function in Unicode Manipulation -
-
-
-g_unichar_to_utf8, function in Unicode Manipulation -
-
-
-g_unichar_type, function in Unicode Manipulation -
-
-
-g_unichar_validate, function in Unicode Manipulation -
-
-
-g_unichar_xdigit_value, function in Unicode Manipulation -
-
-
-GUnicodeBreakType, enum in Unicode Manipulation -
-
-
-GUnicodeScript, enum in Unicode Manipulation -
-
-
-GUnicodeType, enum in Unicode Manipulation -
-
-
-g_unicode_canonical_decomposition, function in Unicode Manipulation -
-
-
-g_unicode_canonical_ordering, function in Unicode Manipulation -
-
-
-G_UNICODE_COMBINING_MARK, macro in Unicode Manipulation -
-
-
-g_unicode_script_from_iso15924, function in Unicode Manipulation -
-
-
-g_unicode_script_to_iso15924, function in Unicode Manipulation -
-
-
-GUnixFDSourceFunc, user_function in UNIX-specific utilities and integration -
-
-
-G_UNIX_ERROR, macro in UNIX-specific utilities and integration -
-
-
-g_unix_fd_add, function in UNIX-specific utilities and integration -
-
-
-g_unix_fd_add_full, function in UNIX-specific utilities and integration -
-
-
-g_unix_fd_source_new, function in UNIX-specific utilities and integration -
-
-
-g_unix_open_pipe, function in UNIX-specific utilities and integration -
-
-
-g_unix_set_fd_nonblocking, function in UNIX-specific utilities and integration -
-
-
-g_unix_signal_add, function in UNIX-specific utilities and integration -
-
-
-g_unix_signal_add_full, function in UNIX-specific utilities and integration -
-
-
-g_unix_signal_source_new, function in UNIX-specific utilities and integration -
-
-
-G_UNLIKELY, macro in Miscellaneous Macros -
-
-
-g_unlink, function in File Utilities -
-
-
-G_UNLOCK, macro in Threads -
-
-
-g_unsetenv, function in Miscellaneous Utility Functions -
-
-
-g_uri_escape_string, function in URI Functions -
-
-
-g_uri_list_extract_uris, function in URI Functions -
-
-
-g_uri_parse_scheme, function in URI Functions -
-
-
-G_URI_RESERVED_CHARS_ALLOWED_IN_PATH, macro in URI Functions -
-
-
-G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT, macro in URI Functions -
-
-
-G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO, macro in URI Functions -
-
-
-G_URI_RESERVED_CHARS_GENERIC_DELIMITERS, macro in URI Functions -
-
-
-G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS, macro in URI Functions -
-
-
-g_uri_unescape_segment, function in URI Functions -
-
-
-g_uri_unescape_string, function in URI Functions -
-
-
-G_USEC_PER_SEC, macro in Date and Time Functions -
-
-
-GUserDirectory, enum in Miscellaneous Utility Functions -
-
-
-gushort, typedef in Basic Types -
-
-
-g_usleep, function in Date and Time Functions -
-
-
-g_utf16_to_ucs4, function in Unicode Manipulation -
-
-
-g_utf16_to_utf8, function in Unicode Manipulation -
-
-
-g_utf8_casefold, function in Unicode Manipulation -
-
-
-g_utf8_collate, function in Unicode Manipulation -
-
-
-g_utf8_collate_key, function in Unicode Manipulation -
-
-
-g_utf8_collate_key_for_filename, function in Unicode Manipulation -
-
-
-g_utf8_find_next_char, function in Unicode Manipulation -
-
-
-g_utf8_find_prev_char, function in Unicode Manipulation -
-
-
-g_utf8_get_char, function in Unicode Manipulation -
-
-
-g_utf8_get_char_validated, function in Unicode Manipulation -
-
-
-g_utf8_make_valid, function in Unicode Manipulation -
-
-
-g_utf8_next_char, macro in Unicode Manipulation -
-
-
-g_utf8_normalize, function in Unicode Manipulation -
-
-
-g_utf8_offset_to_pointer, function in Unicode Manipulation -
-
-
-g_utf8_pointer_to_offset, function in Unicode Manipulation -
-
-
-g_utf8_prev_char, function in Unicode Manipulation -
-
-
-g_utf8_strchr, function in Unicode Manipulation -
-
-
-g_utf8_strdown, function in Unicode Manipulation -
-
-
-g_utf8_strlen, function in Unicode Manipulation -
-
-
-g_utf8_strncpy, function in Unicode Manipulation -
-
-
-g_utf8_strrchr, function in Unicode Manipulation -
-
-
-g_utf8_strreverse, function in Unicode Manipulation -
-
-
-g_utf8_strup, function in Unicode Manipulation -
-
-
-g_utf8_substring, function in Unicode Manipulation -
-
-
-g_utf8_to_ucs4, function in Unicode Manipulation -
-
-
-g_utf8_to_ucs4_fast, function in Unicode Manipulation -
-
-
-g_utf8_to_utf16, function in Unicode Manipulation -
-
-
-g_utf8_validate, function in Unicode Manipulation -
-
-
-g_utime, function in File Utilities -
-
-
-g_uuid_string_is_valid, function in GUuid -
-
-
-g_uuid_string_random, function in GUuid -
-
-

V

-
-GVariant, struct in GVariant -
-
-
-GVariantBuilder, struct in GVariant -
-
-
-GVariantClass, enum in GVariant -
-
-
-GVariantDict, struct in GVariant -
-
-
-GVariantIter, struct in GVariant -
-
-
-GVariantParseError, enum in GVariant -
-
-
-GVariantType, struct in GVariantType -
-
-
-g_variant_builder_add, function in GVariant -
-
-
-g_variant_builder_add_parsed, function in GVariant -
-
-
-g_variant_builder_add_value, function in GVariant -
-
-
-g_variant_builder_clear, function in GVariant -
-
-
-g_variant_builder_close, function in GVariant -
-
-
-g_variant_builder_end, function in GVariant -
-
-
-G_VARIANT_BUILDER_INIT, macro in GVariant -
-
-
-g_variant_builder_init, function in GVariant -
-
-
-g_variant_builder_new, function in GVariant -
-
-
-g_variant_builder_open, function in GVariant -
-
-
-g_variant_builder_ref, function in GVariant -
-
-
-g_variant_builder_unref, function in GVariant -
-
-
-g_variant_byteswap, function in GVariant -
-
-
-g_variant_check_format_string, function in GVariant -
-
-
-g_variant_classify, function in GVariant -
-
-
-g_variant_compare, function in GVariant -
-
-
-g_variant_dict_clear, function in GVariant -
-
-
-g_variant_dict_contains, function in GVariant -
-
-
-g_variant_dict_end, function in GVariant -
-
-
-g_variant_dict_init, function in GVariant -
-
-
-g_variant_dict_insert, function in GVariant -
-
-
-g_variant_dict_insert_value, function in GVariant -
-
-
-g_variant_dict_lookup, function in GVariant -
-
-
-g_variant_dict_lookup_value, function in GVariant -
-
-
-g_variant_dict_new, function in GVariant -
-
-
-g_variant_dict_ref, function in GVariant -
-
-
-g_variant_dict_remove, function in GVariant -
-
-
-g_variant_dict_unref, function in GVariant -
-
-
-g_variant_dup_bytestring, function in GVariant -
-
-
-g_variant_dup_bytestring_array, function in GVariant -
-
-
-g_variant_dup_objv, function in GVariant -
-
-
-g_variant_dup_string, function in GVariant -
-
-
-g_variant_dup_strv, function in GVariant -
-
-
-g_variant_equal, function in GVariant -
-
-
-g_variant_get, function in GVariant -
-
-
-g_variant_get_boolean, function in GVariant -
-
-
-g_variant_get_byte, function in GVariant -
-
-
-g_variant_get_bytestring, function in GVariant -
-
-
-g_variant_get_bytestring_array, function in GVariant -
-
-
-g_variant_get_child, function in GVariant -
-
-
-g_variant_get_child_value, function in GVariant -
-
-
-g_variant_get_data, function in GVariant -
-
-
-g_variant_get_data_as_bytes, function in GVariant -
-
-
-g_variant_get_double, function in GVariant -
-
-
-g_variant_get_fixed_array, function in GVariant -
-
-
-g_variant_get_handle, function in GVariant -
-
-
-g_variant_get_int16, function in GVariant -
-
-
-g_variant_get_int32, function in GVariant -
-
-
-g_variant_get_int64, function in GVariant -
-
-
-g_variant_get_maybe, function in GVariant -
-
-
-g_variant_get_normal_form, function in GVariant -
-
-
-g_variant_get_objv, function in GVariant -
-
-
-g_variant_get_size, function in GVariant -
-
-
-g_variant_get_string, function in GVariant -
-
-
-g_variant_get_strv, function in GVariant -
-
-
-g_variant_get_type, function in GVariant -
-
-
-g_variant_get_type_string, function in GVariant -
-
-
-g_variant_get_uint16, function in GVariant -
-
-
-g_variant_get_uint32, function in GVariant -
-
-
-g_variant_get_uint64, function in GVariant -
-
-
-g_variant_get_va, function in GVariant -
-
-
-g_variant_get_variant, function in GVariant -
-
-
-g_variant_hash, function in GVariant -
-
-
-g_variant_is_container, function in GVariant -
-
-
-g_variant_is_floating, function in GVariant -
-
-
-g_variant_is_normal_form, function in GVariant -
-
-
-g_variant_is_object_path, function in GVariant -
-
-
-g_variant_is_of_type, function in GVariant -
-
-
-g_variant_is_signature, function in GVariant -
-
-
-g_variant_iter_copy, function in GVariant -
-
-
-g_variant_iter_free, function in GVariant -
-
-
-g_variant_iter_init, function in GVariant -
-
-
-g_variant_iter_loop, function in GVariant -
-
-
-g_variant_iter_new, function in GVariant -
-
-
-g_variant_iter_next, function in GVariant -
-
-
-g_variant_iter_next_value, function in GVariant -
-
-
-g_variant_iter_n_children, function in GVariant -
-
-
-g_variant_lookup, function in GVariant -
-
-
-g_variant_lookup_value, function in GVariant -
-
-
-g_variant_new, function in GVariant -
-
-
-g_variant_new_array, function in GVariant -
-
-
-g_variant_new_boolean, function in GVariant -
-
-
-g_variant_new_byte, function in GVariant -
-
-
-g_variant_new_bytestring, function in GVariant -
-
-
-g_variant_new_bytestring_array, function in GVariant -
-
-
-g_variant_new_dict_entry, function in GVariant -
-
-
-g_variant_new_double, function in GVariant -
-
-
-g_variant_new_fixed_array, function in GVariant -
-
-
-g_variant_new_from_bytes, function in GVariant -
-
-
-g_variant_new_from_data, function in GVariant -
-
-
-g_variant_new_handle, function in GVariant -
-
-
-g_variant_new_int16, function in GVariant -
-
-
-g_variant_new_int32, function in GVariant -
-
-
-g_variant_new_int64, function in GVariant -
-
-
-g_variant_new_maybe, function in GVariant -
-
-
-g_variant_new_object_path, function in GVariant -
-
-
-g_variant_new_objv, function in GVariant -
-
-
-g_variant_new_parsed, function in GVariant -
-
-
-g_variant_new_parsed_va, function in GVariant -
-
-
-g_variant_new_printf, function in GVariant -
-
-
-g_variant_new_signature, function in GVariant -
-
-
-g_variant_new_string, function in GVariant -
-
-
-g_variant_new_strv, function in GVariant -
-
-
-g_variant_new_take_string, function in GVariant -
-
-
-g_variant_new_tuple, function in GVariant -
-
-
-g_variant_new_uint16, function in GVariant -
-
-
-g_variant_new_uint32, function in GVariant -
-
-
-g_variant_new_uint64, function in GVariant -
-
-
-g_variant_new_va, function in GVariant -
-
-
-g_variant_new_variant, function in GVariant -
-
-
-g_variant_n_children, function in GVariant -
-
-
-g_variant_parse, function in GVariant -
-
-
-G_VARIANT_PARSE_ERROR, macro in GVariant -
-
-
-g_variant_parse_error_print_context, function in GVariant -
-
-
-g_variant_print, function in GVariant -
-
-
-g_variant_print_string, function in GVariant -
-
-
-g_variant_ref, function in GVariant -
-
-
-g_variant_ref_sink, function in GVariant -
-
-
-g_variant_store, function in GVariant -
-
-
-g_variant_take_ref, function in GVariant -
-
-
-G_VARIANT_TYPE, macro in GVariantType -
-
-
-G_VARIANT_TYPE_ANY, macro in GVariantType -
-
-
-G_VARIANT_TYPE_ARRAY, macro in GVariantType -
-
-
-G_VARIANT_TYPE_BASIC, macro in GVariantType -
-
-
-G_VARIANT_TYPE_BOOLEAN, macro in GVariantType -
-
-
-G_VARIANT_TYPE_BYTE, macro in GVariantType -
-
-
-G_VARIANT_TYPE_BYTESTRING, macro in GVariantType -
-
-
-G_VARIANT_TYPE_BYTESTRING_ARRAY, macro in GVariantType -
-
-
-g_variant_type_copy, function in GVariantType -
-
-
-G_VARIANT_TYPE_DICTIONARY, macro in GVariantType -
-
-
-G_VARIANT_TYPE_DICT_ENTRY, macro in GVariantType -
-
-
-G_VARIANT_TYPE_DOUBLE, macro in GVariantType -
-
-
-g_variant_type_dup_string, function in GVariantType -
-
-
-g_variant_type_element, function in GVariantType -
-
-
-g_variant_type_equal, function in GVariantType -
-
-
-g_variant_type_first, function in GVariantType -
-
-
-g_variant_type_free, function in GVariantType -
-
-
-g_variant_type_get_string_length, function in GVariantType -
-
-
-G_VARIANT_TYPE_HANDLE, macro in GVariantType -
-
-
-g_variant_type_hash, function in GVariantType -
-
-
-G_VARIANT_TYPE_INT16, macro in GVariantType -
-
-
-G_VARIANT_TYPE_INT32, macro in GVariantType -
-
-
-G_VARIANT_TYPE_INT64, macro in GVariantType -
-
-
-g_variant_type_is_array, function in GVariantType -
-
-
-g_variant_type_is_basic, function in GVariantType -
-
-
-g_variant_type_is_container, function in GVariantType -
-
-
-g_variant_type_is_definite, function in GVariantType -
-
-
-g_variant_type_is_dict_entry, function in GVariantType -
-
-
-g_variant_type_is_maybe, function in GVariantType -
-
-
-g_variant_type_is_subtype_of, function in GVariantType -
-
-
-g_variant_type_is_tuple, function in GVariantType -
-
-
-g_variant_type_is_variant, function in GVariantType -
-
-
-g_variant_type_key, function in GVariantType -
-
-
-G_VARIANT_TYPE_MAYBE, macro in GVariantType -
-
-
-g_variant_type_new, function in GVariantType -
-
-
-g_variant_type_new_array, function in GVariantType -
-
-
-g_variant_type_new_dict_entry, function in GVariantType -
-
-
-g_variant_type_new_maybe, function in GVariantType -
-
-
-g_variant_type_new_tuple, function in GVariantType -
-
-
-g_variant_type_next, function in GVariantType -
-
-
-g_variant_type_n_items, function in GVariantType -
-
-
-G_VARIANT_TYPE_OBJECT_PATH, macro in GVariantType -
-
-
-G_VARIANT_TYPE_OBJECT_PATH_ARRAY, macro in GVariantType -
-
-
-g_variant_type_peek_string, function in GVariantType -
-
-
-G_VARIANT_TYPE_SIGNATURE, macro in GVariantType -
-
-
-G_VARIANT_TYPE_STRING, macro in GVariantType -
-
-
-G_VARIANT_TYPE_STRING_ARRAY, macro in GVariantType -
-
-
-g_variant_type_string_is_valid, function in GVariantType -
-
-
-g_variant_type_string_scan, function in GVariantType -
-
-
-G_VARIANT_TYPE_TUPLE, macro in GVariantType -
-
-
-G_VARIANT_TYPE_UINT16, macro in GVariantType -
-
-
-G_VARIANT_TYPE_UINT32, macro in GVariantType -
-
-
-G_VARIANT_TYPE_UINT64, macro in GVariantType -
-
-
-G_VARIANT_TYPE_UNIT, macro in GVariantType -
-
-
-g_variant_type_value, function in GVariantType -
-
-
-G_VARIANT_TYPE_VARDICT, macro in GVariantType -
-
-
-G_VARIANT_TYPE_VARIANT, macro in GVariantType -
-
-
-g_variant_unref, function in GVariant -
-
-
-g_vasprintf, function in String Utility Functions -
-
-
-G_VA_COPY, macro in Miscellaneous Macros -
-
-
-g_vfprintf, function in String Utility Functions -
-
-
-GVoidFunc, user_function in Miscellaneous Utility Functions -
-
-
-g_vprintf, function in String Utility Functions -
-
-
-g_vsnprintf, function in String Utility Functions -
-
-
-g_vsprintf, function in String Utility Functions -
-
-

W

-
-g_warning, macro in Message Logging -
-
-
-g_warn_if_fail, macro in Warnings and Assertions -
-
-
-g_warn_if_reached, macro in Warnings and Assertions -
-
-
-GWin32OSType, enum in Windows Compatibility Functions -
-
-
-g_win32_check_windows_version, function in Windows Compatibility Functions -
-
-
-G_WIN32_DLLMAIN_FOR_DLL_NAME, macro in Windows Compatibility Functions -
-
-
-g_win32_error_message, function in Windows Compatibility Functions -
-
-
-g_win32_getlocale, function in Windows Compatibility Functions -
-
-
-g_win32_get_command_line, function in Windows Compatibility Functions -
-
-
-g_win32_get_package_installation_directory, function in Windows Compatibility Functions -
-
-
-g_win32_get_package_installation_directory_of_module, function in Windows Compatibility Functions -
-
-
-g_win32_get_package_installation_subdirectory, function in Windows Compatibility Functions -
-
-
-g_win32_get_windows_version, function in Windows Compatibility Functions -
-
-
-G_WIN32_HAVE_WIDECHAR_API, macro in Windows Compatibility Functions -
-
-
-G_WIN32_IS_NT_BASED, macro in Windows Compatibility Functions -
-
-
-g_win32_locale_filename_from_utf8, function in Windows Compatibility Functions -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/deprecated.html b/docs/reference/glib/html/deprecated.html deleted file mode 100644 index c1f187b37..000000000 --- a/docs/reference/glib/html/deprecated.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - -Deprecated APIs: GLib Reference Manual - - - - - - - - - - - - - - - - -
-

-Deprecated APIs

-
-
-Deprecated thread API — old thread APIs (for reference only) -
-
-Caches — caches allow sharing of complex data structures - to save resources -
-
-Relations and Tuples — tables of data which can be indexed on any - number of fields -
-
-Automatic String Completion — support for automatic completion using a group - of target strings -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/file-name-encodings.png b/docs/reference/glib/html/file-name-encodings.png deleted file mode 100644 index 7adbcea39..000000000 Binary files a/docs/reference/glib/html/file-name-encodings.png and /dev/null differ diff --git a/docs/reference/glib/html/glib-Arrays.html b/docs/reference/glib/html/glib-Arrays.html deleted file mode 100644 index 465920217..000000000 --- a/docs/reference/glib/html/glib-Arrays.html +++ /dev/null @@ -1,1113 +0,0 @@ - - - - -Arrays: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Arrays

-

Arrays — arrays of arbitrary elements which grow - automatically as elements are added

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GArray * - -g_array_new () -
-GArray * - -g_array_sized_new () -
-GArray * - -g_array_ref () -
-void - -g_array_unref () -
-guint - -g_array_get_element_size () -
#define -g_array_append_val() -
-GArray * - -g_array_append_vals () -
#define -g_array_prepend_val() -
-GArray * - -g_array_prepend_vals () -
#define -g_array_insert_val() -
-GArray * - -g_array_insert_vals () -
-GArray * - -g_array_remove_index () -
-GArray * - -g_array_remove_index_fast () -
-GArray * - -g_array_remove_range () -
-void - -g_array_sort () -
-void - -g_array_sort_with_data () -
#define -g_array_index() -
-GArray * - -g_array_set_size () -
-void - -g_array_set_clear_func () -
-gchar * - -g_array_free () -
-
-
-

Types and Values

-
---- - - - - -
structGArray
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

Arrays are similar to standard C arrays, except that they grow -automatically as elements are added.

-

Array elements can be of any size (though all elements of one array -are the same size), and the array can be automatically cleared to -'0's and zero-terminated.

-

To create a new array use g_array_new().

-

To add elements to an array, use g_array_append_val(), -g_array_append_vals(), g_array_prepend_val(), and -g_array_prepend_vals().

-

To access an element of an array, use g_array_index().

-

To set the size of an array, use g_array_set_size().

-

To free an array, use g_array_free().

-

Here is an example that stores integers in a GArray:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
GArray *garray;
-gint i;
-// We create a new array to store gint values.
-// We don't want it zero-terminated or cleared to 0's.
-garray = g_array_new (FALSE, FALSE, sizeof (gint));
-for (i = 0; i < 10000; i++)
-  g_array_append_val (garray, i);
-for (i = 0; i < 10000; i++)
-  if (g_array_index (garray, gint, i) != i)
-    g_print ("ERROR: got %d instead of %d\n",
-             g_array_index (garray, gint, i), i);
-g_array_free (garray, TRUE);
-
- -

-
-
-

Functions

-
-

g_array_new ()

-
GArray *
-g_array_new (gboolean zero_terminated,
-             gboolean clear_,
-             guint element_size);
-

Creates a new GArray with a reference count of 1.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

zero_terminated

TRUE if the array should have an extra element at -the end which is set to 0

 

clear_

TRUE if GArray elements should be automatically cleared -to 0 when they are allocated

 

element_size

the size of each element in bytes

 
-
-
-

Returns

-

the new GArray

-
-
-
-
-

g_array_sized_new ()

-
GArray *
-g_array_sized_new (gboolean zero_terminated,
-                   gboolean clear_,
-                   guint element_size,
-                   guint reserved_size);
-

Creates a new GArray with reserved_size - elements preallocated and -a reference count of 1. This avoids frequent reallocation, if you -are going to add many elements to the array. Note however that the -size of the array is still 0.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

zero_terminated

TRUE if the array should have an extra element at -the end with all bits cleared

 

clear_

TRUE if all bits in the array should be cleared to 0 on -allocation

 

element_size

size of each element in the array

 

reserved_size

number of elements preallocated

 
-
-
-

Returns

-

the new GArray

-
-
-
-
-

g_array_ref ()

-
GArray *
-g_array_ref (GArray *array);
-

Atomically increments the reference count of array - by one. -This function is MT-safe and may be called from any thread.

-
-

Parameters

-
----- - - - - - -

array

A GArray

 
-
-
-

Returns

-

The passed in GArray

-
-

Since: 2.22

-
-
-
-

g_array_unref ()

-
void
-g_array_unref (GArray *array);
-

Atomically decrements the reference count of array - by one. If the -reference count drops to 0, all memory allocated by the array is -released. This function is MT-safe and may be called from any -thread.

-
-

Parameters

-
----- - - - - - -

array

A GArray

 
-
-

Since: 2.22

-
-
-
-

g_array_get_element_size ()

-
guint
-g_array_get_element_size (GArray *array);
-

Gets the size of the elements in array -.

-
-

Parameters

-
----- - - - - - -

array

A GArray

 
-
-
-

Returns

-

Size of each element, in bytes

-
-

Since: 2.22

-
-
-
-

g_array_append_val()

-
#define             g_array_append_val(a,v)
-

Adds the value on to the end of the array. The array will grow in -size automatically if necessary.

-

g_array_append_val() is a macro which uses a reference to the value -parameter v -. This means that you cannot use it with literal values -such as "27". You must use variables.

-
-

Parameters

-
----- - - - - - - - - - - - - -

a

a GArray

 

v

the value to append to the GArray

 
-
-
-

Returns

-

the GArray

-
-
-
-
-

g_array_append_vals ()

-
GArray *
-g_array_append_vals (GArray *array,
-                     gconstpointer data,
-                     guint len);
-

Adds len - elements onto the end of the array.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

array

a GArray

 

data

a pointer to the elements to append to the end of the array.

[not nullable]

len

the number of elements to append

 
-
-
-

Returns

-

the GArray

-
-
-
-
-

g_array_prepend_val()

-
#define             g_array_prepend_val(a,v)
-

Adds the value on to the start of the array. The array will grow in -size automatically if necessary.

-

This operation is slower than g_array_append_val() since the -existing elements in the array have to be moved to make space for -the new element.

-

g_array_prepend_val() is a macro which uses a reference to the value -parameter v -. This means that you cannot use it with literal values -such as "27". You must use variables.

-
-

Parameters

-
----- - - - - - - - - - - - - -

a

a GArray

 

v

the value to prepend to the GArray

 
-
-
-

Returns

-

the GArray

-
-
-
-
-

g_array_prepend_vals ()

-
GArray *
-g_array_prepend_vals (GArray *array,
-                      gconstpointer data,
-                      guint len);
-

Adds len - elements onto the start of the array.

-

This operation is slower than g_array_append_vals() since the -existing elements in the array have to be moved to make space for -the new elements.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

array

a GArray

 

data

a pointer to the elements to prepend to the start of the array.

[not nullable]

len

the number of elements to prepend

 
-
-
-

Returns

-

the GArray

-
-
-
-
-

g_array_insert_val()

-
#define             g_array_insert_val(a,i,v)
-

Inserts an element into an array at the given index.

-

g_array_insert_val() is a macro which uses a reference to the value -parameter v -. This means that you cannot use it with literal values -such as "27". You must use variables.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

a

a GArray

 

i

the index to place the element at

 

v

the value to insert into the array

 
-
-
-

Returns

-

the GArray

-
-
-
-
-

g_array_insert_vals ()

-
GArray *
-g_array_insert_vals (GArray *array,
-                     guint index_,
-                     gconstpointer data,
-                     guint len);
-

Inserts len - elements into a GArray at the given index.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

array

a GArray

 

index_

the index to place the elements at

 

data

a pointer to the elements to insert.

[not nullable]

len

the number of elements to insert

 
-
-
-

Returns

-

the GArray

-
-
-
-
-

g_array_remove_index ()

-
GArray *
-g_array_remove_index (GArray *array,
-                      guint index_);
-

Removes the element at the given index from a GArray. The following -elements are moved down one place.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GArray

 

index_

the index of the element to remove

 
-
-
-

Returns

-

the GArray

-
-
-
-
-

g_array_remove_index_fast ()

-
GArray *
-g_array_remove_index_fast (GArray *array,
-                           guint index_);
-

Removes the element at the given index from a GArray. The last -element in the array is used to fill in the space, so this function -does not preserve the order of the GArray. But it is faster than -g_array_remove_index().

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GArray -

 

index_

the index of the element to remove

 
-
-
-

Returns

-

the GArray

-
-
-
-
-

g_array_remove_range ()

-
GArray *
-g_array_remove_range (GArray *array,
-                      guint index_,
-                      guint length);
-

Removes the given number of elements starting at the given index -from a GArray. The following elements are moved to close the gap.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

array

a GArray -

 

index_

the index of the first element to remove

 

length

the number of elements to remove

 
-
-
-

Returns

-

the GArray

-
-

Since: 2.4

-
-
-
-

g_array_sort ()

-
void
-g_array_sort (GArray *array,
-              GCompareFunc compare_func);
-

Sorts a GArray using compare_func - which should be a qsort()-style -comparison function (returns less than zero for first arg is less -than second arg, zero for equal, greater zero if first arg is -greater than second arg).

-

This is guaranteed to be a stable sort since version 2.32.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GArray

 

compare_func

comparison function

 
-
-
-
-
-

g_array_sort_with_data ()

-
void
-g_array_sort_with_data (GArray *array,
-                        GCompareDataFunc compare_func,
-                        gpointer user_data);
-

Like g_array_sort(), but the comparison function receives an extra -user data argument.

-

This is guaranteed to be a stable sort since version 2.32.

-

There used to be a comment here about making the sort stable by -using the addresses of the elements in the comparison function. -This did not actually work, so any such code should be removed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

array

a GArray

 

compare_func

comparison function

 

user_data

data to pass to compare_func -

 
-
-
-
-
-

g_array_index()

-
#define             g_array_index(a,t,i)
-

Returns the element of a GArray at the given index. The return -value is cast to the given type.

-

This example gets a pointer to an element in a GArray:

-
- - - - - - - -
1
-2
-3
-4
EDayViewEvent *event;
-// This gets a pointer to the 4th element in the array of
-// EDayViewEvent structs.
-event = &g_array_index (events, EDayViewEvent, 3);
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

a

a GArray

 

t

the type of the elements

 

i

the index of the element to return

 
-
-
-

Returns

-

the element of the GArray at the index given by i -

-
-
-
-
-

g_array_set_size ()

-
GArray *
-g_array_set_size (GArray *array,
-                  guint length);
-

Sets the size of the array, expanding it if necessary. If the array -was created with clear_ - set to TRUE, the new elements are set to 0.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GArray

 

length

the new size of the GArray

 
-
-
-

Returns

-

the GArray

-
-
-
-
-

g_array_set_clear_func ()

-
void
-g_array_set_clear_func (GArray *array,
-                        GDestroyNotify clear_func);
-

Sets a function to clear an element of array -.

-

The clear_func - will be called when an element in the array -data segment is removed and when the array is freed and data -segment is deallocated as well.

-

Note that in contrast with other uses of GDestroyNotify -functions, clear_func - is expected to clear the contents of -the array element it is given, but not free the element itself.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

A GArray

 

clear_func

a function to clear an element of array -

 
-
-

Since: 2.32

-
-
-
-

g_array_free ()

-
gchar *
-g_array_free (GArray *array,
-              gboolean free_segment);
-

Frees the memory allocated for the GArray. If free_segment - is -TRUE it frees the memory block holding the elements as well and -also each element if array - has a element_free_func - set. Pass -FALSE if you want to free the GArray wrapper but preserve the -underlying array for use elsewhere. If the reference count of array - -is greater than one, the GArray wrapper is preserved but the size -of array - will be set to zero.

-

If array elements contain dynamically-allocated memory, they should -be freed separately.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GArray

 

free_segment

if TRUE the actual element data is freed as well

 
-
-
-

Returns

-

the element data if free_segment -is FALSE, otherwise -NULL. The element data should be freed using g_free().

-
-
-
-
-

Types and Values

-
-

struct GArray

-
struct GArray {
-  gchar *data;
-  guint len;
-};
-
-

Contains the public fields of a GArray.

-
-

Members

-
----- - - - - - - - - - - - - -

gchar *data;

a pointer to the element data. The data may be moved as -elements are added to the GArray.

 

guint len;

the number of elements in the GArray not including the -possible terminating zero element.

 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Asynchronous-Queues.html b/docs/reference/glib/html/glib-Asynchronous-Queues.html deleted file mode 100644 index 1353589b7..000000000 --- a/docs/reference/glib/html/glib-Asynchronous-Queues.html +++ /dev/null @@ -1,1412 +0,0 @@ - - - - -Asynchronous Queues: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Asynchronous Queues

-

Asynchronous Queues — asynchronous communication between threads

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GAsyncQueue * - -g_async_queue_new () -
-GAsyncQueue * - -g_async_queue_new_full () -
-GAsyncQueue * - -g_async_queue_ref () -
-void - -g_async_queue_unref () -
-void - -g_async_queue_push () -
-void - -g_async_queue_push_sorted () -
-void - -g_async_queue_push_front () -
-gboolean - -g_async_queue_remove () -
-gpointer - -g_async_queue_pop () -
-gpointer - -g_async_queue_try_pop () -
-gpointer - -g_async_queue_timeout_pop () -
-gint - -g_async_queue_length () -
-void - -g_async_queue_sort () -
-void - -g_async_queue_lock () -
-void - -g_async_queue_unlock () -
-void - -g_async_queue_ref_unlocked () -
-void - -g_async_queue_unref_and_unlock () -
-void - -g_async_queue_push_unlocked () -
-void - -g_async_queue_push_sorted_unlocked () -
-void - -g_async_queue_push_front_unlocked () -
-gboolean - -g_async_queue_remove_unlocked () -
-gpointer - -g_async_queue_pop_unlocked () -
-gpointer - -g_async_queue_try_pop_unlocked () -
-gpointer - -g_async_queue_timeout_pop_unlocked () -
-gint - -g_async_queue_length_unlocked () -
-void - -g_async_queue_sort_unlocked () -
-gpointer - -g_async_queue_timed_pop () -
-gpointer - -g_async_queue_timed_pop_unlocked () -
-
-
-

Types and Values

-
---- - - - - -
 GAsyncQueue
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

Often you need to communicate between different threads. In general -it's safer not to do this by shared memory, but by explicit message -passing. These messages only make sense asynchronously for -multi-threaded applications though, as a synchronous operation could -as well be done in the same thread.

-

Asynchronous queues are an exception from most other GLib data -structures, as they can be used simultaneously from multiple threads -without explicit locking and they bring their own builtin reference -counting. This is because the nature of an asynchronous queue is that -it will always be used by at least 2 concurrent threads.

-

For using an asynchronous queue you first have to create one with -g_async_queue_new(). GAsyncQueue structs are reference counted, -use g_async_queue_ref() and g_async_queue_unref() to manage your -references.

-

A thread which wants to send a message to that queue simply calls -g_async_queue_push() to push the message to the queue.

-

A thread which is expecting messages from an asynchronous queue -simply calls g_async_queue_pop() for that queue. If no message is -available in the queue at that point, the thread is now put to sleep -until a message arrives. The message will be removed from the queue -and returned. The functions g_async_queue_try_pop() and -g_async_queue_timeout_pop() can be used to only check for the presence -of messages or to only wait a certain time for messages respectively.

-

For almost every function there exist two variants, one that locks -the queue and one that doesn't. That way you can hold the queue lock -(acquire it with g_async_queue_lock() and release it with -g_async_queue_unlock()) over multiple queue accessing instructions. -This can be necessary to ensure the integrity of the queue, but should -only be used when really necessary, as it can make your life harder -if used unwisely. Normally you should only use the locking function -variants (those without the _unlocked suffix).

-

In many cases, it may be more convenient to use GThreadPool when -you need to distribute work to a set of worker threads instead of -using GAsyncQueue manually. GThreadPool uses a GAsyncQueue -internally.

-
-
-

Functions

-
-

g_async_queue_new ()

-
GAsyncQueue *
-g_async_queue_new (void);
-

Creates a new asynchronous queue.

-
-

Returns

-

a new GAsyncQueue. Free with g_async_queue_unref()

-
-
-
-
-

g_async_queue_new_full ()

-
GAsyncQueue *
-g_async_queue_new_full (GDestroyNotify item_free_func);
-

Creates a new asynchronous queue and sets up a destroy notify -function that is used to free any remaining queue items when -the queue is destroyed after the final unref.

-
-

Parameters

-
----- - - - - - -

item_free_func

function to free queue elements

 
-
-
-

Returns

-

a new GAsyncQueue. Free with g_async_queue_unref()

-
-

Since: 2.16

-
-
-
-

g_async_queue_ref ()

-
GAsyncQueue *
-g_async_queue_ref (GAsyncQueue *queue);
-

Increases the reference count of the asynchronous queue - by 1. -You do not need to hold the lock to call this function.

-
-

Parameters

-
----- - - - - - -

queue

a GAsyncQueue

 
-
-
-

Returns

-

the queue -that was passed in (since 2.6)

-
-
-
-
-

g_async_queue_unref ()

-
void
-g_async_queue_unref (GAsyncQueue *queue);
-

Decreases the reference count of the asynchronous queue - by 1.

-

If the reference count went to 0, the queue - will be destroyed -and the memory allocated will be freed. So you are not allowed -to use the queue - afterwards, as it might have disappeared. -You do not need to hold the lock to call this function.

-
-

Parameters

-
----- - - - - - -

queue

a GAsyncQueue.

 
-
-
-
-
-

g_async_queue_push ()

-
void
-g_async_queue_push (GAsyncQueue *queue,
-                    gpointer data);
-

Pushes the data - into the queue -. data - must not be NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GAsyncQueue

 

data

data -to push into the queue -

 
-
-
-
-
-

g_async_queue_push_sorted ()

-
void
-g_async_queue_push_sorted (GAsyncQueue *queue,
-                           gpointer data,
-                           GCompareDataFunc func,
-                           gpointer user_data);
-

Inserts data - into queue - using func - to determine the new -position.

-

This function requires that the queue - is sorted before pushing on -new elements, see g_async_queue_sort().

-

This function will lock queue - before it sorts the queue and unlock -it when it is finished.

-

For an example of func - see g_async_queue_sort().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

queue

a GAsyncQueue

 

data

the data -to push into the queue -

 

func

the GCompareDataFunc is used to sort queue -

 

user_data

user data passed to func -.

 
-
-

Since: 2.10

-
-
-
-

g_async_queue_push_front ()

-
void
-g_async_queue_push_front (GAsyncQueue *queue,
-                          gpointer item);
-

Pushes the item - into the queue -. item - must not be NULL. -In contrast to g_async_queue_push(), this function -pushes the new item ahead of the items already in the queue, -so that it will be the next one to be popped off the queue.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GAsyncQueue

 

item

data to push into the queue -

 
-
-

Since: 2.46

-
-
-
-

g_async_queue_remove ()

-
gboolean
-g_async_queue_remove (GAsyncQueue *queue,
-                      gpointer item);
-

Remove an item from the queue.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GAsyncQueue

 

item

the data to remove from the queue -

 
-
-
-

Returns

-

TRUE if the item was removed

-
-

Since: 2.46

-
-
-
-

g_async_queue_pop ()

-
gpointer
-g_async_queue_pop (GAsyncQueue *queue);
-

Pops data from the queue -. If queue - is empty, this function -blocks until data becomes available.

-
-

Parameters

-
----- - - - - - -

queue

a GAsyncQueue

 
-
-
-

Returns

-

data from the queue

-
-
-
-
-

g_async_queue_try_pop ()

-
gpointer
-g_async_queue_try_pop (GAsyncQueue *queue);
-

Tries to pop data from the queue -. If no data is available, -NULL is returned.

-
-

Parameters

-
----- - - - - - -

queue

a GAsyncQueue

 
-
-
-

Returns

-

data from the queue or NULL, when no data is -available immediately.

-
-
-
-
-

g_async_queue_timeout_pop ()

-
gpointer
-g_async_queue_timeout_pop (GAsyncQueue *queue,
-                           guint64 timeout);
-

Pops data from the queue -. If the queue is empty, blocks for -timeout - microseconds, or until data becomes available.

-

If no data is received before the timeout, NULL is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GAsyncQueue

 

timeout

the number of microseconds to wait

 
-
-
-

Returns

-

data from the queue or NULL, when no data is -received before the timeout.

-
-
-
-
-

g_async_queue_length ()

-
gint
-g_async_queue_length (GAsyncQueue *queue);
-

Returns the length of the queue.

-

Actually this function returns the number of data items in -the queue minus the number of waiting threads, so a negative -value means waiting threads, and a positive value means available -entries in the queue -. A return value of 0 could mean n entries -in the queue and n threads waiting. This can happen due to locking -of the queue or due to scheduling.

-
-

Parameters

-
----- - - - - - -

queue

a GAsyncQueue.

 
-
-
-

Returns

-

the length of the queue -

-
-
-
-
-

g_async_queue_sort ()

-
void
-g_async_queue_sort (GAsyncQueue *queue,
-                    GCompareDataFunc func,
-                    gpointer user_data);
-

Sorts queue - using func -.

-

The sort function func - is passed two elements of the queue -. -It should return 0 if they are equal, a negative value if the -first element should be higher in the queue - or a positive value -if the first element should be lower in the queue - than the second -element.

-

This function will lock queue - before it sorts the queue and unlock -it when it is finished.

-

If you were sorting a list of priority numbers to make sure the -lowest priority would be at the top of the queue, you could use:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
gint32 id1;
-gint32 id2;
-
-id1 = GPOINTER_TO_INT (element1);
-id2 = GPOINTER_TO_INT (element2);
-
-return (id1 > id2 ? +1 : id1 == id2 ? 0 : -1);
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

queue

a GAsyncQueue

 

func

the GCompareDataFunc is used to sort queue -

 

user_data

user data passed to func -

 
-
-

Since: 2.10

-
-
-
-

g_async_queue_lock ()

-
void
-g_async_queue_lock (GAsyncQueue *queue);
-

Acquires the queue -'s lock. If another thread is already -holding the lock, this call will block until the lock -becomes available.

-

Call g_async_queue_unlock() to drop the lock again.

-

While holding the lock, you can only call the -g_async_queue_*_unlocked() functions on queue -. Otherwise, -deadlock may occur.

-
-

Parameters

-
----- - - - - - -

queue

a GAsyncQueue

 
-
-
-
-
-

g_async_queue_unlock ()

-
void
-g_async_queue_unlock (GAsyncQueue *queue);
-

Releases the queue's lock.

-

Calling this function when you have not acquired -the with g_async_queue_lock() leads to undefined -behaviour.

-
-

Parameters

-
----- - - - - - -

queue

a GAsyncQueue

 
-
-
-
-
-

g_async_queue_ref_unlocked ()

-
void
-g_async_queue_ref_unlocked (GAsyncQueue *queue);
-
-

g_async_queue_ref_unlocked has been deprecated since version 2.8 and should not be used in newly-written code.

-

Reference counting is done atomically. -so g_async_queue_ref() can be used regardless of the queue -'s -lock.

-
-

Increases the reference count of the asynchronous queue - by 1.

-
-

Parameters

-
----- - - - - - -

queue

a GAsyncQueue

 
-
-
-
-
-

g_async_queue_unref_and_unlock ()

-
void
-g_async_queue_unref_and_unlock (GAsyncQueue *queue);
-
-

g_async_queue_unref_and_unlock has been deprecated since version 2.8 and should not be used in newly-written code.

-

Reference counting is done atomically. -so g_async_queue_unref() can be used regardless of the queue -'s -lock.

-
-

Decreases the reference count of the asynchronous queue - by 1 -and releases the lock. This function must be called while holding -the queue -'s lock. If the reference count went to 0, the queue - -will be destroyed and the memory allocated will be freed.

-
-

Parameters

-
----- - - - - - -

queue

a GAsyncQueue

 
-
-
-
-
-

g_async_queue_push_unlocked ()

-
void
-g_async_queue_push_unlocked (GAsyncQueue *queue,
-                             gpointer data);
-

Pushes the data - into the queue -. data - must not be NULL.

-

This function must be called while holding the queue -'s lock.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GAsyncQueue

 

data

data -to push into the queue -

 
-
-
-
-
-

g_async_queue_push_sorted_unlocked ()

-
void
-g_async_queue_push_sorted_unlocked (GAsyncQueue *queue,
-                                    gpointer data,
-                                    GCompareDataFunc func,
-                                    gpointer user_data);
-

Inserts data - into queue - using func - to determine the new -position.

-

The sort function func - is passed two elements of the queue -. -It should return 0 if they are equal, a negative value if the -first element should be higher in the queue - or a positive value -if the first element should be lower in the queue - than the second -element.

-

This function requires that the queue - is sorted before pushing on -new elements, see g_async_queue_sort().

-

This function must be called while holding the queue -'s lock.

-

For an example of func - see g_async_queue_sort().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

queue

a GAsyncQueue

 

data

the data -to push into the queue -

 

func

the GCompareDataFunc is used to sort queue -

 

user_data

user data passed to func -.

 
-
-

Since: 2.10

-
-
-
-

g_async_queue_push_front_unlocked ()

-
void
-g_async_queue_push_front_unlocked (GAsyncQueue *queue,
-                                   gpointer item);
-

Pushes the item - into the queue -. item - must not be NULL. -In contrast to g_async_queue_push_unlocked(), this function -pushes the new item ahead of the items already in the queue, -so that it will be the next one to be popped off the queue.

-

This function must be called while holding the queue -'s lock.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GAsyncQueue

 

item

data to push into the queue -

 
-
-

Since: 2.46

-
-
-
-

g_async_queue_remove_unlocked ()

-
gboolean
-g_async_queue_remove_unlocked (GAsyncQueue *queue,
-                               gpointer item);
-

Remove an item from the queue.

-

This function must be called while holding the queue -'s lock.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GAsyncQueue

 

item

the data to remove from the queue -

 
-
-
-

Returns

-

TRUE if the item was removed

-
-

Since: 2.46

-
-
-
-

g_async_queue_pop_unlocked ()

-
gpointer
-g_async_queue_pop_unlocked (GAsyncQueue *queue);
-

Pops data from the queue -. If queue - is empty, this function -blocks until data becomes available.

-

This function must be called while holding the queue -'s lock.

-
-

Parameters

-
----- - - - - - -

queue

a GAsyncQueue

 
-
-
-

Returns

-

data from the queue.

-
-
-
-
-

g_async_queue_try_pop_unlocked ()

-
gpointer
-g_async_queue_try_pop_unlocked (GAsyncQueue *queue);
-

Tries to pop data from the queue -. If no data is available, -NULL is returned.

-

This function must be called while holding the queue -'s lock.

-
-

Parameters

-
----- - - - - - -

queue

a GAsyncQueue

 
-
-
-

Returns

-

data from the queue or NULL, when no data is -available immediately.

-
-
-
-
-

g_async_queue_timeout_pop_unlocked ()

-
gpointer
-g_async_queue_timeout_pop_unlocked (GAsyncQueue *queue,
-                                    guint64 timeout);
-

Pops data from the queue -. If the queue is empty, blocks for -timeout - microseconds, or until data becomes available.

-

If no data is received before the timeout, NULL is returned.

-

This function must be called while holding the queue -'s lock.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GAsyncQueue

 

timeout

the number of microseconds to wait

 
-
-
-

Returns

-

data from the queue or NULL, when no data is -received before the timeout.

-
-
-
-
-

g_async_queue_length_unlocked ()

-
gint
-g_async_queue_length_unlocked (GAsyncQueue *queue);
-

Returns the length of the queue.

-

Actually this function returns the number of data items in -the queue minus the number of waiting threads, so a negative -value means waiting threads, and a positive value means available -entries in the queue -. A return value of 0 could mean n entries -in the queue and n threads waiting. This can happen due to locking -of the queue or due to scheduling.

-

This function must be called while holding the queue -'s lock.

-
-

Parameters

-
----- - - - - - -

queue

a GAsyncQueue

 
-
-
-

Returns

-

the length of the queue -.

-
-
-
-
-

g_async_queue_sort_unlocked ()

-
void
-g_async_queue_sort_unlocked (GAsyncQueue *queue,
-                             GCompareDataFunc func,
-                             gpointer user_data);
-

Sorts queue - using func -.

-

The sort function func - is passed two elements of the queue -. -It should return 0 if they are equal, a negative value if the -first element should be higher in the queue - or a positive value -if the first element should be lower in the queue - than the second -element.

-

This function must be called while holding the queue -'s lock.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

queue

a GAsyncQueue

 

func

the GCompareDataFunc is used to sort queue -

 

user_data

user data passed to func -

 
-
-

Since: 2.10

-
-
-
-

g_async_queue_timed_pop ()

-
gpointer
-g_async_queue_timed_pop (GAsyncQueue *queue,
-                         GTimeVal *end_time);
-
-

g_async_queue_timed_pop is deprecated and should not be used in newly-written code.

-

use g_async_queue_timeout_pop().

-
-

Pops data from the queue -. If the queue is empty, blocks until -end_time - or until data becomes available.

-

If no data is received before end_time -, NULL is returned.

-

To easily calculate end_time -, a combination of g_get_current_time() -and g_time_val_add() can be used.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GAsyncQueue

 

end_time

a GTimeVal, determining the final time

 
-
-
-

Returns

-

data from the queue or NULL, when no data is -received before end_time -.

-
-
-
-
-

g_async_queue_timed_pop_unlocked ()

-
gpointer
-g_async_queue_timed_pop_unlocked (GAsyncQueue *queue,
-                                  GTimeVal *end_time);
-
-

g_async_queue_timed_pop_unlocked is deprecated and should not be used in newly-written code.

-

use g_async_queue_timeout_pop_unlocked().

-
-

Pops data from the queue -. If the queue is empty, blocks until -end_time - or until data becomes available.

-

If no data is received before end_time -, NULL is returned.

-

To easily calculate end_time -, a combination of g_get_current_time() -and g_time_val_add() can be used.

-

This function must be called while holding the queue -'s lock.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GAsyncQueue

 

end_time

a GTimeVal, determining the final time

 
-
-
-

Returns

-

data from the queue or NULL, when no data is -received before end_time -.

-
-
-
-
-

Types and Values

-
-

GAsyncQueue

-
typedef struct _GAsyncQueue GAsyncQueue;
-

The GAsyncQueue struct is an opaque data structure which represents -an asynchronous queue. It should only be accessed through the -g_async_queue_* functions.

-
-
-
-

See Also

-

GThreadPool

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Atomic-Operations.html b/docs/reference/glib/html/glib-Atomic-Operations.html deleted file mode 100644 index 3e48f09e7..000000000 --- a/docs/reference/glib/html/glib-Atomic-Operations.html +++ /dev/null @@ -1,930 +0,0 @@ - - - - -Atomic Operations: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Atomic Operations

-

Atomic Operations — basic atomic integer and pointer operations

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gint - -g_atomic_int_get () -
-void - -g_atomic_int_set () -
-void - -g_atomic_int_inc () -
-gboolean - -g_atomic_int_dec_and_test () -
-gboolean - -g_atomic_int_compare_and_exchange () -
-gint - -g_atomic_int_add () -
-guint - -g_atomic_int_and () -
-guint - -g_atomic_int_or () -
-guint - -g_atomic_int_xor () -
-gpointer - -g_atomic_pointer_get () -
-void - -g_atomic_pointer_set () -
-gboolean - -g_atomic_pointer_compare_and_exchange () -
-gssize - -g_atomic_pointer_add () -
-gsize - -g_atomic_pointer_and () -
-gsize - -g_atomic_pointer_or () -
-gsize - -g_atomic_pointer_xor () -
-gint - -g_atomic_int_exchange_and_add () -
-
-
-

Types and Values

-
---- - - - - -
#defineG_ATOMIC_LOCK_FREE
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The following is a collection of compiler macros to provide atomic -access to integer and pointer-sized values.

-

The macros that have 'int' in the name will operate on pointers to -gint and guint. The macros with 'pointer' in the name will operate -on pointers to any pointer-sized value, including gsize. There is -no support for 64bit operations on platforms with 32bit pointers -because it is not generally possible to perform these operations -atomically.

-

The get, set and exchange operations for integers and pointers -nominally operate on gint and gpointer, respectively. Of the -arithmetic operations, the 'add' operation operates on (and returns) -signed integer values (gint and gssize) and the 'and', 'or', and -'xor' operations operate on (and return) unsigned integer values -(guint and gsize).

-

All of the operations act as a full compiler and (where appropriate) -hardware memory barrier. Acquire and release or producer and -consumer barrier semantics are not available through this API.

-

It is very important that all accesses to a particular integer or -pointer be performed using only this API and that different sizes of -operation are not mixed or used on overlapping memory regions. Never -read or assign directly from or to a value -- always use this API.

-

For simple reference counting purposes you should use -g_atomic_int_inc() and g_atomic_int_dec_and_test(). Other uses that -fall outside of simple reference counting patterns are prone to -subtle bugs and occasionally undefined behaviour. It is also worth -noting that since all of these operations require global -synchronisation of the entire machine, they can be quite slow. In -the case of performing multiple atomic operations it can often be -faster to simply acquire a mutex lock around the critical area, -perform the operations normally and then release the lock.

-
-
-

Functions

-
-

g_atomic_int_get ()

-
gint
-g_atomic_int_get (const volatile gint *atomic);
-

Gets the current value of atomic -.

-

This call acts as a full compiler and hardware -memory barrier (before the get).

-
-

Parameters

-
----- - - - - - -

atomic

a pointer to a gint or guint

 
-
-
-

Returns

-

the value of the integer

-
-

Since: 2.4

-
-
-
-

g_atomic_int_set ()

-
void
-g_atomic_int_set (volatile gint *atomic,
-                  gint newval);
-

Sets the value of atomic - to newval -.

-

This call acts as a full compiler and hardware -memory barrier (after the set).

-
-

Parameters

-
----- - - - - - - - - - - - - -

atomic

a pointer to a gint or guint

 

newval

a new value to store

 
-
-

Since: 2.4

-
-
-
-

g_atomic_int_inc ()

-
void
-g_atomic_int_inc (gint *atomic);
-

Increments the value of atomic - by 1.

-

Think of this operation as an atomic version of { *atomic += 1; }.

-

This call acts as a full compiler and hardware memory barrier.

-
-

Parameters

-
----- - - - - - -

atomic

a pointer to a gint or guint

 
-
-

Since: 2.4

-
-
-
-

g_atomic_int_dec_and_test ()

-
gboolean
-g_atomic_int_dec_and_test (gint *atomic);
-

Decrements the value of atomic - by 1.

-

Think of this operation as an atomic version of -{ *atomic -= 1; return (*atomic == 0); }.

-

This call acts as a full compiler and hardware memory barrier.

-
-

Parameters

-
----- - - - - - -

atomic

a pointer to a gint or guint

 
-
-
-

Returns

-

TRUE if the resultant value is zero

-
-

Since: 2.4

-
-
-
-

g_atomic_int_compare_and_exchange ()

-
gboolean
-g_atomic_int_compare_and_exchange (volatile gint *atomic,
-                                   gint oldval,
-                                   gint newval);
-

Compares atomic - to oldval - and, if equal, sets it to newval -. -If atomic - was not equal to oldval - then no change occurs.

-

This compare and exchange is done atomically.

-

Think of this operation as an atomic version of -{ if (*atomic == oldval) { *atomic = newval; return TRUE; } else return FALSE; }.

-

This call acts as a full compiler and hardware memory barrier.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

atomic

a pointer to a gint or guint

 

oldval

the value to compare with

 

newval

the value to conditionally replace with

 
-
-
-

Returns

-

TRUE if the exchange took place

-
-

Since: 2.4

-
-
-
-

g_atomic_int_add ()

-
gint
-g_atomic_int_add (volatile gint *atomic,
-                  gint val);
-

Atomically adds val - to the value of atomic -.

-

Think of this operation as an atomic version of -{ tmp = *atomic; *atomic += val; return tmp; }.

-

This call acts as a full compiler and hardware memory barrier.

-

Before version 2.30, this function did not return a value -(but g_atomic_int_exchange_and_add() did, and had the same meaning).

-
-

Parameters

-
----- - - - - - - - - - - - - -

atomic

a pointer to a gint or guint

 

val

the value to add

 
-
-
-

Returns

-

the value of atomic -before the add, signed

-
-

Since: 2.4

-
-
-
-

g_atomic_int_and ()

-
guint
-g_atomic_int_and (volatile guint *atomic,
-                  guint val);
-

Performs an atomic bitwise 'and' of the value of atomic - and val -, -storing the result back in atomic -.

-

This call acts as a full compiler and hardware memory barrier.

-

Think of this operation as an atomic version of -{ tmp = *atomic; *atomic &= val; return tmp; }.

-
-

Parameters

-
----- - - - - - - - - - - - - -

atomic

a pointer to a gint or guint

 

val

the value to 'and'

 
-
-
-

Returns

-

the value of atomic -before the operation, unsigned

-
-

Since: 2.30

-
-
-
-

g_atomic_int_or ()

-
guint
-g_atomic_int_or (volatile guint *atomic,
-                 guint val);
-

Performs an atomic bitwise 'or' of the value of atomic - and val -, -storing the result back in atomic -.

-

Think of this operation as an atomic version of -{ tmp = *atomic; *atomic |= val; return tmp; }.

-

This call acts as a full compiler and hardware memory barrier.

-
-

Parameters

-
----- - - - - - - - - - - - - -

atomic

a pointer to a gint or guint

 

val

the value to 'or'

 
-
-
-

Returns

-

the value of atomic -before the operation, unsigned

-
-

Since: 2.30

-
-
-
-

g_atomic_int_xor ()

-
guint
-g_atomic_int_xor (volatile guint *atomic,
-                  guint val);
-

Performs an atomic bitwise 'xor' of the value of atomic - and val -, -storing the result back in atomic -.

-

Think of this operation as an atomic version of -{ tmp = *atomic; *atomic ^= val; return tmp; }.

-

This call acts as a full compiler and hardware memory barrier.

-
-

Parameters

-
----- - - - - - - - - - - - - -

atomic

a pointer to a gint or guint

 

val

the value to 'xor'

 
-
-
-

Returns

-

the value of atomic -before the operation, unsigned

-
-

Since: 2.30

-
-
-
-

g_atomic_pointer_get ()

-
gpointer
-g_atomic_pointer_get (const volatile void *atomic);
-

Gets the current value of atomic -.

-

This call acts as a full compiler and hardware -memory barrier (before the get).

-
-

Parameters

-
----- - - - - - -

atomic

a pointer to a gpointer-sized value.

[not nullable]
-
-
-

Returns

-

the value of the pointer

-
-

Since: 2.4

-
-
-
-

g_atomic_pointer_set ()

-
void
-g_atomic_pointer_set (volatile void *atomic,
-                      gpointer newval);
-

Sets the value of atomic - to newval -.

-

This call acts as a full compiler and hardware -memory barrier (after the set).

-
-

Parameters

-
----- - - - - - - - - - - - - -

atomic

a pointer to a gpointer-sized value.

[not nullable]

newval

a new value to store

 
-
-

Since: 2.4

-
-
-
-

g_atomic_pointer_compare_and_exchange ()

-
gboolean
-g_atomic_pointer_compare_and_exchange (volatile void *atomic,
-                                       gpointer oldval,
-                                       gpointer newval);
-

Compares atomic - to oldval - and, if equal, sets it to newval -. -If atomic - was not equal to oldval - then no change occurs.

-

This compare and exchange is done atomically.

-

Think of this operation as an atomic version of -{ if (*atomic == oldval) { *atomic = newval; return TRUE; } else return FALSE; }.

-

This call acts as a full compiler and hardware memory barrier.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

atomic

a pointer to a gpointer-sized value.

[not nullable]

oldval

the value to compare with

 

newval

the value to conditionally replace with

 
-
-
-

Returns

-

TRUE if the exchange took place

-
-

Since: 2.4

-
-
-
-

g_atomic_pointer_add ()

-
gssize
-g_atomic_pointer_add (volatile void *atomic,
-                      gssize val);
-

Atomically adds val - to the value of atomic -.

-

Think of this operation as an atomic version of -{ tmp = *atomic; *atomic += val; return tmp; }.

-

This call acts as a full compiler and hardware memory barrier.

-
-

Parameters

-
----- - - - - - - - - - - - - -

atomic

a pointer to a gpointer-sized value.

[not nullable]

val

the value to add

 
-
-
-

Returns

-

the value of atomic -before the add, signed

-
-

Since: 2.30

-
-
-
-

g_atomic_pointer_and ()

-
gsize
-g_atomic_pointer_and (volatile void *atomic,
-                      gsize val);
-

Performs an atomic bitwise 'and' of the value of atomic - and val -, -storing the result back in atomic -.

-

Think of this operation as an atomic version of -{ tmp = *atomic; *atomic &= val; return tmp; }.

-

This call acts as a full compiler and hardware memory barrier.

-
-

Parameters

-
----- - - - - - - - - - - - - -

atomic

a pointer to a gpointer-sized value.

[not nullable]

val

the value to 'and'

 
-
-
-

Returns

-

the value of atomic -before the operation, unsigned

-
-

Since: 2.30

-
-
-
-

g_atomic_pointer_or ()

-
gsize
-g_atomic_pointer_or (volatile void *atomic,
-                     gsize val);
-

Performs an atomic bitwise 'or' of the value of atomic - and val -, -storing the result back in atomic -.

-

Think of this operation as an atomic version of -{ tmp = *atomic; *atomic |= val; return tmp; }.

-

This call acts as a full compiler and hardware memory barrier.

-
-

Parameters

-
----- - - - - - - - - - - - - -

atomic

a pointer to a gpointer-sized value.

[not nullable]

val

the value to 'or'

 
-
-
-

Returns

-

the value of atomic -before the operation, unsigned

-
-

Since: 2.30

-
-
-
-

g_atomic_pointer_xor ()

-
gsize
-g_atomic_pointer_xor (volatile void *atomic,
-                      gsize val);
-

Performs an atomic bitwise 'xor' of the value of atomic - and val -, -storing the result back in atomic -.

-

Think of this operation as an atomic version of -{ tmp = *atomic; *atomic ^= val; return tmp; }.

-

This call acts as a full compiler and hardware memory barrier.

-
-

Parameters

-
----- - - - - - - - - - - - - -

atomic

a pointer to a gpointer-sized value.

[not nullable]

val

the value to 'xor'

 
-
-
-

Returns

-

the value of atomic -before the operation, unsigned

-
-

Since: 2.30

-
-
-
-

g_atomic_int_exchange_and_add ()

-
gint
-g_atomic_int_exchange_and_add (volatile gint *atomic,
-                               gint val);
-
-

g_atomic_int_exchange_and_add has been deprecated since version 2.30 and should not be used in newly-written code.

-

Use g_atomic_int_add() instead.

-
-

This function existed before g_atomic_int_add() returned the prior -value of the integer (which it now does). It is retained only for -compatibility reasons. Don't use this function in new code.

-
-

Parameters

-
----- - - - - - - - - - - - - -

atomic

a pointer to a gint

 

val

the value to add

 
-
-
-

Returns

-

the value of atomic -before the add, signed

-
-

Since: 2.4

-
-
-
-

Types and Values

-
-

G_ATOMIC_LOCK_FREE

-
#define G_ATOMIC_LOCK_FREE
-
-

This macro is defined if the atomic operations of GLib are -implemented using real hardware atomic operations. This means that -the GLib atomic API can be used between processes and safely mixed -with other (hardware) atomic APIs.

-

If this macro is not defined, the atomic operations may be -emulated using a mutex. In that case, the GLib atomic operations are -only atomic relative to themselves and within a single process.

-
-
-
-

See Also

-

GMutex

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Automatic-String-Completion.html b/docs/reference/glib/html/glib-Automatic-String-Completion.html deleted file mode 100644 index 290cb4e6d..000000000 --- a/docs/reference/glib/html/glib-Automatic-String-Completion.html +++ /dev/null @@ -1,610 +0,0 @@ - - - - -Automatic String Completion: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Automatic String Completion

-

Automatic String Completion — support for automatic completion using a group - of target strings

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GCompletion * - -g_completion_new () -
-gchar * - -(*GCompletionFunc) () -
-void - -g_completion_add_items () -
-void - -g_completion_remove_items () -
-void - -g_completion_clear_items () -
-GList * - -g_completion_complete () -
-GList * - -g_completion_complete_utf8 () -
-void - -g_completion_set_compare () -
-gint - -(*GCompletionStrncmpFunc) () -
-void - -g_completion_free () -
-
-
-

Types and Values

-
---- - - - - -
structGCompletion
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GCompletion provides support for automatic completion of a string -using any group of target strings. It is typically used for file -name completion as is common in many UNIX shells.

-

A GCompletion is created using g_completion_new(). Target items are -added and removed with g_completion_add_items(), -g_completion_remove_items() and g_completion_clear_items(). A -completion attempt is requested with g_completion_complete() or -g_completion_complete_utf8(). When no longer needed, the -GCompletion is freed with g_completion_free().

-

Items in the completion can be simple strings (e.g. filenames), or -pointers to arbitrary data structures. If data structures are used -you must provide a GCompletionFunc in g_completion_new(), which -retrieves the item's string from the data structure. You can change -the way in which strings are compared by setting a different -GCompletionStrncmpFunc in g_completion_set_compare().

-

GCompletion has been marked as deprecated, since this API is rarely -used and not very actively maintained.

-
-
-

Functions

-
-

g_completion_new ()

-
GCompletion *
-g_completion_new (GCompletionFunc func);
-

g_completion_new is deprecated and should not be used in newly-written code.

-

Creates a new GCompletion.

-
-

Parameters

-
----- - - - - - -

func

the function to be called to return the string representing -an item in the GCompletion, or NULL if strings are going to -be used as the GCompletion items.

 
-
-
-

Returns

-

the new GCompletion.

-
-
-
-
-

GCompletionFunc ()

-
gchar *
-(*GCompletionFunc) (gpointer Param1);
-

Specifies the type of the function passed to g_completion_new(). It -should return the string corresponding to the given target item. -This is used when you use data structures as GCompletion items.

-
-

Parameters

-
----- - - - - - -

Param1

the completion item.

 
-
-
-

Returns

-

the string corresponding to the item.

-
-
-
-
-

g_completion_add_items ()

-
void
-g_completion_add_items (GCompletion *cmp,
-                        GList *items);
-
-

g_completion_add_items has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Adds items to the GCompletion.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cmp

the GCompletion.

 

items

the list of items to add.

[transfer none]
-
-
-
-
-

g_completion_remove_items ()

-
void
-g_completion_remove_items (GCompletion *cmp,
-                           GList *items);
-
-

g_completion_remove_items has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Removes items from a GCompletion. The items are not freed, so if the memory -was dynamically allocated, free items - with g_list_free_full() after calling -this function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cmp

the GCompletion.

 

items

the items to remove.

[transfer none]
-
-
-
-
-

g_completion_clear_items ()

-
void
-g_completion_clear_items (GCompletion *cmp);
-
-

g_completion_clear_items has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Removes all items from the GCompletion. The items are not freed, so if the -memory was dynamically allocated, it should be freed after calling this -function.

-
-

Parameters

-
----- - - - - - -

cmp

the GCompletion.

 
-
-
-
-
-

g_completion_complete ()

-
GList *
-g_completion_complete (GCompletion *cmp,
-                       const gchar *prefix,
-                       gchar **new_prefix);
-
-

g_completion_complete has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Attempts to complete the string prefix - using the GCompletion -target items.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cmp

the GCompletion.

 

prefix

the prefix string, typically typed by the user, which is -compared with each of the items.

 

new_prefix

if non-NULL, returns the longest prefix which is -common to all items that matched prefix -, or NULL if -no items matched prefix -. This string should be freed -when no longer needed.

 
-
-
-

Returns

-

the list of items whose strings begin with -prefix -. This should not be changed.

-

[transfer none]

-
-
-
-
-

g_completion_complete_utf8 ()

-
GList *
-g_completion_complete_utf8 (GCompletion *cmp,
-                            const gchar *prefix,
-                            gchar **new_prefix);
-
-

g_completion_complete_utf8 has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Attempts to complete the string prefix - using the GCompletion target items. -In contrast to g_completion_complete(), this function returns the largest common -prefix that is a valid UTF-8 string, omitting a possible common partial -character.

-

You should use this function instead of g_completion_complete() if your -items are UTF-8 strings.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cmp

the GCompletion

 

prefix

the prefix string, typically used by the user, which is compared -with each of the items

 

new_prefix

if non-NULL, returns the longest prefix which is common to all -items that matched prefix -, or NULL if no items matched prefix -. -This string should be freed when no longer needed.

 
-
-
-

Returns

-

the list of items whose strings begin with prefix -. This should -not be changed.

-

[element-type utf8][transfer none]

-
-

Since: 2.4

-
-
-
-

g_completion_set_compare ()

-
void
-g_completion_set_compare (GCompletion *cmp,
-                          GCompletionStrncmpFunc strncmp_func);
-
-

g_completion_set_compare has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Sets the function to use for string comparisons. The default string -comparison function is strncmp().

-
-

Parameters

-
----- - - - - - - - - - - - - -

cmp

a GCompletion.

 

strncmp_func

the string comparison function.

 
-
-
-
-
-

GCompletionStrncmpFunc ()

-
gint
-(*GCompletionStrncmpFunc) (const gchar *s1,
-                           const gchar *s2,
-                           gsize n);
-

Specifies the type of the function passed to -g_completion_set_compare(). This is used when you use strings as -GCompletion items.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

s1

string to compare with s2 -.

 

s2

string to compare with s1 -.

 

n

maximal number of bytes to compare.

 
-
-
-

Returns

-

an integer less than, equal to, or greater than zero if -the first n -bytes of s1 -is found, respectively, to be -less than, to match, or to be greater than the first n -bytes of s2 -.

-
-
-
-
-

g_completion_free ()

-
void
-g_completion_free (GCompletion *cmp);
-
-

g_completion_free has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Frees all memory used by the GCompletion. The items are not freed, so if -the memory was dynamically allocated, it should be freed after calling this -function.

-
-

Parameters

-
----- - - - - - -

cmp

the GCompletion.

 
-
-
-
-
-

Types and Values

-
-

struct GCompletion

-
struct GCompletion {
-  GList* items;
-  GCompletionFunc func;
- 
-  gchar* prefix;
-  GList* cache;
-  GCompletionStrncmpFunc strncmp_func;
-};
-
-

The data structure used for automatic completion.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

GList *items;

list of target items (strings or data structures).

 

GCompletionFunc func;

function which is called to get the string associated with a -target item. It is NULL if the target items are strings.

 

gchar *prefix;

the last prefix passed to g_completion_complete() or -g_completion_complete_utf8().

 

GList *cache;

the list of items which begin with prefix -.

 

GCompletionStrncmpFunc strncmp_func;

The function to use when comparing strings. Use -g_completion_set_compare() to modify this function.

 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Balanced-Binary-Trees.html b/docs/reference/glib/html/glib-Balanced-Binary-Trees.html deleted file mode 100644 index d63507088..000000000 --- a/docs/reference/glib/html/glib-Balanced-Binary-Trees.html +++ /dev/null @@ -1,945 +0,0 @@ - - - - -Balanced Binary Trees: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Balanced Binary Trees

-

Balanced Binary Trees — a sorted collection of key/value pairs optimized - for searching and traversing in order

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GTree * - -g_tree_new () -
-GTree * - -g_tree_ref () -
-void - -g_tree_unref () -
-GTree * - -g_tree_new_with_data () -
-GTree * - -g_tree_new_full () -
-void - -g_tree_insert () -
-void - -g_tree_replace () -
-gint - -g_tree_nnodes () -
-gint - -g_tree_height () -
-gpointer - -g_tree_lookup () -
-gboolean - -g_tree_lookup_extended () -
-void - -g_tree_foreach () -
-void - -g_tree_traverse () -
-gboolean - -(*GTraverseFunc) () -
-gpointer - -g_tree_search () -
-gboolean - -g_tree_remove () -
-gboolean - -g_tree_steal () -
-void - -g_tree_destroy () -
-
-
-

Types and Values

-
---- - - - - -
 GTree
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The GTree structure and its associated functions provide a sorted -collection of key/value pairs optimized for searching and traversing -in order.

-

To create a new GTree use g_tree_new().

-

To insert a key/value pair into a GTree use g_tree_insert().

-

To lookup the value corresponding to a given key, use -g_tree_lookup() and g_tree_lookup_extended().

-

To find out the number of nodes in a GTree, use g_tree_nnodes(). To -get the height of a GTree, use g_tree_height().

-

To traverse a GTree, calling a function for each node visited in -the traversal, use g_tree_foreach().

-

To remove a key/value pair use g_tree_remove().

-

To destroy a GTree, use g_tree_destroy().

-
-
-

Functions

-
-

g_tree_new ()

-
GTree *
-g_tree_new (GCompareFunc key_compare_func);
-

Creates a new GTree.

-
-

Parameters

-
----- - - - - - -

key_compare_func

the function used to order the nodes in the GTree. -It should return values similar to the standard strcmp() function - -0 if the two arguments are equal, a negative value if the first argument -comes before the second, or a positive value if the first argument comes -after the second.

 
-
-
-

Returns

-

a newly allocated GTree

-
-
-
-
-

g_tree_ref ()

-
GTree *
-g_tree_ref (GTree *tree);
-

Increments the reference count of tree - by one.

-

It is safe to call this function from any thread.

-
-

Parameters

-
----- - - - - - -

tree

a GTree

 
-
-
-

Returns

-

the passed in GTree

-
-

Since: 2.22

-
-
-
-

g_tree_unref ()

-
void
-g_tree_unref (GTree *tree);
-

Decrements the reference count of tree - by one. -If the reference count drops to 0, all keys and values will -be destroyed (if destroy functions were specified) and all -memory allocated by tree - will be released.

-

It is safe to call this function from any thread.

-
-

Parameters

-
----- - - - - - -

tree

a GTree

 
-
-

Since: 2.22

-
-
-
-

g_tree_new_with_data ()

-
GTree *
-g_tree_new_with_data (GCompareDataFunc key_compare_func,
-                      gpointer key_compare_data);
-

Creates a new GTree with a comparison function that accepts user data. -See g_tree_new() for more details.

-
-

Parameters

-
----- - - - - - - - - - - - - -

key_compare_func

qsort()-style comparison function

 

key_compare_data

data to pass to comparison function

 
-
-
-

Returns

-

a newly allocated GTree

-
-
-
-
-

g_tree_new_full ()

-
GTree *
-g_tree_new_full (GCompareDataFunc key_compare_func,
-                 gpointer key_compare_data,
-                 GDestroyNotify key_destroy_func,
-                 GDestroyNotify value_destroy_func);
-

Creates a new GTree like g_tree_new() and allows to specify functions -to free the memory allocated for the key and value that get called when -removing the entry from the GTree.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_compare_func

qsort()-style comparison function

 

key_compare_data

data to pass to comparison function

 

key_destroy_func

a function to free the memory allocated for the key -used when removing the entry from the GTree or NULL if you don't -want to supply such a function

 

value_destroy_func

a function to free the memory allocated for the -value used when removing the entry from the GTree or NULL if you -don't want to supply such a function

 
-
-
-

Returns

-

a newly allocated GTree

-
-
-
-
-

g_tree_insert ()

-
void
-g_tree_insert (GTree *tree,
-               gpointer key,
-               gpointer value);
-

Inserts a key/value pair into a GTree.

-

If the given key already exists in the GTree its corresponding value -is set to the new value. If you supplied a value_destroy_func - when -creating the GTree, the old value is freed using that function. If -you supplied a key_destroy_func - when creating the GTree, the passed -key is freed using that function.

-

The tree is automatically 'balanced' as new key/value pairs are added, -so that the distance from the root to every leaf is as small as possible.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

tree

a GTree

 

key

the key to insert

 

value

the value corresponding to the key

 
-
-
-
-
-

g_tree_replace ()

-
void
-g_tree_replace (GTree *tree,
-                gpointer key,
-                gpointer value);
-

Inserts a new key and value into a GTree similar to g_tree_insert(). -The difference is that if the key already exists in the GTree, it gets -replaced by the new key. If you supplied a value_destroy_func - when -creating the GTree, the old value is freed using that function. If you -supplied a key_destroy_func - when creating the GTree, the old key is -freed using that function.

-

The tree is automatically 'balanced' as new key/value pairs are added, -so that the distance from the root to every leaf is as small as possible.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

tree

a GTree

 

key

the key to insert

 

value

the value corresponding to the key

 
-
-
-
-
-

g_tree_nnodes ()

-
gint
-g_tree_nnodes (GTree *tree);
-

Gets the number of nodes in a GTree.

-
-

Parameters

-
----- - - - - - -

tree

a GTree

 
-
-
-

Returns

-

the number of nodes in tree -

-
-
-
-
-

g_tree_height ()

-
gint
-g_tree_height (GTree *tree);
-

Gets the height of a GTree.

-

If the GTree contains no nodes, the height is 0. -If the GTree contains only one root node the height is 1. -If the root node has children the height is 2, etc.

-
-

Parameters

-
----- - - - - - -

tree

a GTree

 
-
-
-

Returns

-

the height of tree -

-
-
-
-
-

g_tree_lookup ()

-
gpointer
-g_tree_lookup (GTree *tree,
-               gconstpointer key);
-

Gets the value corresponding to the given key. Since a GTree is -automatically balanced as key/value pairs are added, key lookup -is O(log n) (where n is the number of key/value pairs in the tree).

-
-

Parameters

-
----- - - - - - - - - - - - - -

tree

a GTree

 

key

the key to look up

 
-
-
-

Returns

-

the value corresponding to the key, or NULL -if the key was not found

-
-
-
-
-

g_tree_lookup_extended ()

-
gboolean
-g_tree_lookup_extended (GTree *tree,
-                        gconstpointer lookup_key,
-                        gpointer *orig_key,
-                        gpointer *value);
-

Looks up a key in the GTree, returning the original key and the -associated value. This is useful if you need to free the memory -allocated for the original key, for example before calling -g_tree_remove().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

tree

a GTree

 

lookup_key

the key to look up

 

orig_key

returns the original key.

[optional][nullable]

value

returns the value associated with the key.

[optional][nullable]
-
-
-

Returns

-

TRUE if the key was found in the GTree

-
-
-
-
-

g_tree_foreach ()

-
void
-g_tree_foreach (GTree *tree,
-                GTraverseFunc func,
-                gpointer user_data);
-

Calls the given function for each of the key/value pairs in the GTree. -The function is passed the key and value of each pair, and the given -data - parameter. The tree is traversed in sorted order.

-

The tree may not be modified while iterating over it (you can't -add/remove items). To remove all items matching a predicate, you need -to add each item to a list in your GTraverseFunc as you walk over -the tree, then walk the list and remove each item.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

tree

a GTree

 

func

the function to call for each node visited. -If this function returns TRUE, the traversal is stopped.

 

user_data

user data to pass to the function

 
-
-
-
-
-

g_tree_traverse ()

-
void
-g_tree_traverse (GTree *tree,
-                 GTraverseFunc traverse_func,
-                 GTraverseType traverse_type,
-                 gpointer user_data);
-
-

g_tree_traverse has been deprecated since version 2.2 and should not be used in newly-written code.

-

The order of a balanced tree is somewhat arbitrary. - If you just want to visit all nodes in sorted order, use - g_tree_foreach() instead. If you really need to visit nodes in - a different order, consider using an n-ary tree.

-
-

Calls the given function for each node in the GTree.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

tree

a GTree

 

traverse_func

the function to call for each node visited. If this -function returns TRUE, the traversal is stopped.

 

traverse_type

the order in which nodes are visited, one of G_IN_ORDER, -G_PRE_ORDER and G_POST_ORDER

 

user_data

user data to pass to the function

 
-
-
-
-
-

GTraverseFunc ()

-
gboolean
-(*GTraverseFunc) (gpointer key,
-                  gpointer value,
-                  gpointer data);
-

Specifies the type of function passed to g_tree_traverse(). It is -passed the key and value of each node, together with the user_data - -parameter passed to g_tree_traverse(). If the function returns -TRUE, the traversal is stopped.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

key

a key of a GTree node

 

value

the value corresponding to the key

 

data

user data passed to g_tree_traverse()

 
-
-
-

Returns

-

TRUE to stop the traversal

-
-
-
-
-

g_tree_search ()

-
gpointer
-g_tree_search (GTree *tree,
-               GCompareFunc search_func,
-               gconstpointer user_data);
-

Searches a GTree using search_func -.

-

The search_func - is called with a pointer to the key of a key/value -pair in the tree, and the passed in user_data -. If search_func - returns -0 for a key/value pair, then the corresponding value is returned as -the result of g_tree_search(). If search_func - returns -1, searching -will proceed among the key/value pairs that have a smaller key; if -search_func - returns 1, searching will proceed among the key/value -pairs that have a larger key.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

tree

a GTree

 

search_func

a function used to search the GTree

 

user_data

the data passed as the second argument to search_func -

 
-
-
-

Returns

-

the value corresponding to the found key, or NULL -if the key was not found

-
-
-
-
-

g_tree_remove ()

-
gboolean
-g_tree_remove (GTree *tree,
-               gconstpointer key);
-

Removes a key/value pair from a GTree.

-

If the GTree was created using g_tree_new_full(), the key and value -are freed using the supplied destroy functions, otherwise you have to -make sure that any dynamically allocated values are freed yourself. -If the key does not exist in the GTree, the function does nothing.

-
-

Parameters

-
----- - - - - - - - - - - - - -

tree

a GTree

 

key

the key to remove

 
-
-
-

Returns

-

TRUE if the key was found (prior to 2.8, this function -returned nothing)

-
-
-
-
-

g_tree_steal ()

-
gboolean
-g_tree_steal (GTree *tree,
-              gconstpointer key);
-

Removes a key and its associated value from a GTree without calling -the key and value destroy functions.

-

If the key does not exist in the GTree, the function does nothing.

-
-

Parameters

-
----- - - - - - - - - - - - - -

tree

a GTree

 

key

the key to remove

 
-
-
-

Returns

-

TRUE if the key was found (prior to 2.8, this function -returned nothing)

-
-
-
-
-

g_tree_destroy ()

-
void
-g_tree_destroy (GTree *tree);
-

Removes all keys and values from the GTree and decreases its -reference count by one. If keys and/or values are dynamically -allocated, you should either free them first or create the GTree -using g_tree_new_full(). In the latter case the destroy functions -you supplied will be called on all keys and values before destroying -the GTree.

-
-

Parameters

-
----- - - - - - -

tree

a GTree

 
-
-
-
-
-

Types and Values

-
-

GTree

-
typedef struct _GTree GTree;
-

The GTree struct is an opaque data structure representing a -balanced binary tree. It should be -accessed only by using the following functions.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Base64-Encoding.html b/docs/reference/glib/html/glib-Base64-Encoding.html deleted file mode 100644 index 70124d7f6..000000000 --- a/docs/reference/glib/html/glib-Base64-Encoding.html +++ /dev/null @@ -1,438 +0,0 @@ - - - - -Base64 Encoding: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Base64 Encoding

-

Base64 Encoding — encodes and decodes data in Base64 format

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gsize - -g_base64_encode_step () -
-gsize - -g_base64_encode_close () -
-gchar * - -g_base64_encode () -
-gsize - -g_base64_decode_step () -
-guchar * - -g_base64_decode () -
-guchar * - -g_base64_decode_inplace () -
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

Base64 is an encoding that allows a sequence of arbitrary bytes to be -encoded as a sequence of printable ASCII characters. For the definition -of Base64, see -RFC 1421 -or -RFC 2045. -Base64 is most commonly used as a MIME transfer encoding -for email.

-

GLib supports incremental encoding using g_base64_encode_step() and -g_base64_encode_close(). Incremental decoding can be done with -g_base64_decode_step(). To encode or decode data in one go, use -g_base64_encode() or g_base64_decode(). To avoid memory allocation when -decoding, you can use g_base64_decode_inplace().

-

Support for Base64 encoding has been added in GLib 2.12.

-
-
-

Functions

-
-

g_base64_encode_step ()

-
gsize
-g_base64_encode_step (const guchar *in,
-                      gsize len,
-                      gboolean break_lines,
-                      gchar *out,
-                      gint *state,
-                      gint *save);
-

Incrementally encode a sequence of binary data into its Base-64 stringified -representation. By calling this function multiple times you can convert -data in chunks to avoid having to have the full encoded data in memory.

-

When all of the data has been converted you must call -g_base64_encode_close() to flush the saved state.

-

The output buffer must be large enough to fit all the data that will -be written to it. Due to the way base64 encodes you will need -at least: (len - / 3 + 1) * 4 + 4 bytes (+ 4 may be needed in case of -non-zero state). If you enable line-breaking you will need at least: -((len - / 3 + 1) * 4 + 4) / 72 + 1 bytes of extra space.

-

break_lines - is typically used when putting base64-encoded data in emails. -It breaks the lines at 72 columns instead of putting all of the text on -the same line. This avoids problems with long lines in the email system. -Note however that it breaks the lines with LF characters, not -CR LF sequences, so the result cannot be passed directly to SMTP -or certain other protocols.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

in

the binary data to encode.

[array length=len][element-type guint8]

len

the length of in -

 

break_lines

whether to break long lines

 

out

pointer to destination buffer.

[out][array][element-type guint8]

state

Saved state between steps, initialize to 0.

[inout]

save

Saved state between steps, initialize to 0.

[inout]
-
-
-

Returns

-

The number of bytes of output that was written

-
-

Since: 2.12

-
-
-
-

g_base64_encode_close ()

-
gsize
-g_base64_encode_close (gboolean break_lines,
-                       gchar *out,
-                       gint *state,
-                       gint *save);
-

Flush the status from a sequence of calls to g_base64_encode_step().

-

The output buffer must be large enough to fit all the data that will -be written to it. It will need up to 4 bytes, or up to 5 bytes if -line-breaking is enabled.

-

The out - array will not be automatically nul-terminated.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

break_lines

whether to break long lines

 

out

pointer to destination buffer.

[out][array][element-type guint8]

state

Saved state from g_base64_encode_step().

[inout]

save

Saved state from g_base64_encode_step().

[inout]
-
-
-

Returns

-

The number of bytes of output that was written

-
-

Since: 2.12

-
-
-
-

g_base64_encode ()

-
gchar *
-g_base64_encode (const guchar *data,
-                 gsize len);
-

Encode a sequence of binary data into its Base-64 stringified -representation.

-
-

Parameters

-
----- - - - - - - - - - - - - -

data

the binary data to encode.

[array length=len][element-type guint8]

len

the length of data -

 
-
-
-

Returns

-

a newly allocated, zero-terminated Base-64 -encoded string representing data -. The returned string must -be freed with g_free().

-

[transfer full]

-
-

Since: 2.12

-
-
-
-

g_base64_decode_step ()

-
gsize
-g_base64_decode_step (const gchar *in,
-                      gsize len,
-                      guchar *out,
-                      gint *state,
-                      guint *save);
-

Incrementally decode a sequence of binary data from its Base-64 stringified -representation. By calling this function multiple times you can convert -data in chunks to avoid having to have the full encoded data in memory.

-

The output buffer must be large enough to fit all the data that will -be written to it. Since base64 encodes 3 bytes in 4 chars you need -at least: (len - / 4) * 3 + 3 bytes (+ 3 may be needed in case of non-zero -state).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

in

binary input data.

[array length=len][element-type guint8]

len

max length of in -data to decode

 

out

output buffer.

[out][array][element-type guint8]

state

Saved state between steps, initialize to 0.

[inout]

save

Saved state between steps, initialize to 0.

[inout]
-
-
-

Returns

-

The number of bytes of output that was written

-
-

Since: 2.12

-
-
-
-

g_base64_decode ()

-
guchar *
-g_base64_decode (const gchar *text,
-                 gsize *out_len);
-

Decode a sequence of Base-64 encoded text into binary data. Note -that the returned binary data is not necessarily zero-terminated, -so it should not be used as a character string.

-
-

Parameters

-
----- - - - - - - - - - - - - -

text

zero-terminated string with base64 text to decode

 

out_len

The length of the decoded data is written here.

[out]
-
-
-

Returns

-

newly allocated buffer containing the binary data -that text -represents. The returned buffer must -be freed with g_free().

-

[transfer full][array length=out_len][element-type guint8]

-
-

Since: 2.12

-
-
-
-

g_base64_decode_inplace ()

-
guchar *
-g_base64_decode_inplace (gchar *text,
-                         gsize *out_len);
-

Decode a sequence of Base-64 encoded text into binary data -by overwriting the input data.

-
-

Parameters

-
----- - - - - - - - - - - - - -

text

zero-terminated -string with base64 text to decode.

[inout][array length=out_len][element-type guint8]

out_len

The length of the decoded data is written here.

[inout]
-
-
-

Returns

-

The binary data that text -responds. This pointer -is the same as the input text -.

-

[transfer none]

-
-

Since: 2.20

-
-
-
-

Types and Values

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Basic-Types.html b/docs/reference/glib/html/glib-Basic-Types.html deleted file mode 100644 index dd596f7c3..000000000 --- a/docs/reference/glib/html/glib-Basic-Types.html +++ /dev/null @@ -1,1176 +0,0 @@ - - - - -Basic Types: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Basic Types

-

Basic Types — standard GLib types, defined for ease-of-use - and portability

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - -
-GLIB_AVAILABLE_IN_ALL - -gint () -
-GLIB_AVAILABLE_IN_ALL - -guint () -
#define -G_GINT64_CONSTANT() -
#define -G_GUINT64_CONSTANT() -
#define -G_GOFFSET_CONSTANT() -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
typedefgboolean
typedefgpointer
typedefgconstpointer
typedefgchar
typedefguchar
#defineG_MININT
#defineG_MAXINT
#defineG_MAXUINT
typedefgshort
#defineG_MINSHORT
#defineG_MAXSHORT
typedefgushort
#defineG_MAXUSHORT
typedefglong
#defineG_MINLONG
#defineG_MAXLONG
typedefgulong
#defineG_MAXULONG
typedefgint8
#defineG_MININT8
#defineG_MAXINT8
typedefguint8
#defineG_MAXUINT8
typedefgint16
#defineG_MININT16
#defineG_MAXINT16
#defineG_GINT16_MODIFIER
#defineG_GINT16_FORMAT
typedefguint16
#defineG_MAXUINT16
#defineG_GUINT16_FORMAT
typedefgint32
#defineG_MININT32
#defineG_MAXINT32
#defineG_GINT32_MODIFIER
#defineG_GINT32_FORMAT
typedefguint32
#defineG_MAXUINT32
#defineG_GUINT32_FORMAT
typedefgint64
#defineG_MININT64
#defineG_MAXINT64
#defineG_GINT64_MODIFIER
#defineG_GINT64_FORMAT
typedefguint64
#defineG_MAXUINT64
#defineG_GUINT64_FORMAT
typedefgfloat
#defineG_MINFLOAT
#defineG_MAXFLOAT
typedefgdouble
#defineG_MINDOUBLE
#defineG_MAXDOUBLE
typedefgsize
#defineG_MAXSIZE
#defineG_GSIZE_MODIFIER
#defineG_GSIZE_FORMAT
typedefgssize
#defineG_MINSSIZE
#defineG_MAXSSIZE
#defineG_GSSIZE_MODIFIER
#defineG_GSSIZE_FORMAT
typedefgoffset
#defineG_MINOFFSET
#defineG_MAXOFFSET
#defineG_GOFFSET_MODIFIER
#defineG_GOFFSET_FORMAT
typedefgintptr
#defineG_GINTPTR_MODIFIER
#defineG_GINTPTR_FORMAT
typedefguintptr
#defineG_GUINTPTR_FORMAT
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GLib defines a number of commonly used types, which can be divided -into 4 groups:

-
-

GLib also defines macros for the limits of some of the standard -integer and floating point types, as well as macros for suitable -printf() formats for these types.

-
-
-

Functions

-
-

gint ()

-
GLIB_AVAILABLE_IN_ALL
-gint ();
-

Corresponds to the standard C int type. -Values of this type can range from G_MININT to G_MAXINT.

-
-
-
-

guint ()

-
GLIB_AVAILABLE_IN_ALL
-guint ();
-

Corresponds to the standard C unsigned int type. -Values of this type can range from 0 to G_MAXUINT.

-
-
-
-

G_GINT64_CONSTANT()

-
#define G_GINT64_CONSTANT(val) (val##L)
-
-

This macro is used to insert 64-bit integer literals -into the source code.

-
-

Parameters

-
----- - - - - - -

val

a literal integer value, e.g. 0x1d636b02300a7aa7

 
-
-
-
-
-

G_GUINT64_CONSTANT()

-
#define G_GUINT64_CONSTANT(val) (val##UL)
-
-

This macro is used to insert 64-bit unsigned integer -literals into the source code.

-
-

Parameters

-
----- - - - - - -

val

a literal integer value, e.g. 0x1d636b02300a7aa7U

 
-
-

Since: 2.10

-
-
-
-

G_GOFFSET_CONSTANT()

-
#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
-
-

This macro is used to insert goffset 64-bit integer literals -into the source code.

-

See also G_GINT64_CONSTANT.

-
-

Parameters

-
----- - - - - - -

val

a literal integer value, e.g. 0x1d636b02300a7aa7

 
-
-

Since: 2.20

-
-
-
-

Types and Values

-
-

gboolean

-
typedef gint   gboolean;
-
-

A standard boolean type. -Variables of this type should only contain the value -TRUE or FALSE.

-
-
-
-

gpointer

-
typedef void* gpointer;
-
-

An untyped pointer. -gpointer looks better and is easier to use than void*.

-
-
-
-

gconstpointer

-
typedef const void *gconstpointer;
-
-

An untyped pointer to constant data. -The data pointed to should not be changed.

-

This is typically used in function prototypes to indicate -that the data pointed to will not be altered by the function.

-
-
-
-

gchar

-
typedef char   gchar;
-
-

Corresponds to the standard C char type.

-
-
-
-

guchar

-
typedef unsigned char   guchar;
-
-

Corresponds to the standard C unsigned char type.

-
-
-
-

G_MININT

-
#define G_MININT INT_MIN
-
-

The minimum value which can be held in a gint.

-
-
-
-

G_MAXINT

-
#define G_MAXINT INT_MAX
-
-

The maximum value which can be held in a gint.

-
-
-
-

G_MAXUINT

-
#define G_MAXUINT UINT_MAX
-
-

The maximum value which can be held in a guint.

-
-
-
-

gshort

-
typedef short  gshort;
-
-

Corresponds to the standard C short type. -Values of this type can range from G_MINSHORT to G_MAXSHORT.

-
-
-
-

G_MINSHORT

-
#define G_MINSHORT SHRT_MIN
-
-

The minimum value which can be held in a gshort.

-
-
-
-

G_MAXSHORT

-
#define G_MAXSHORT SHRT_MAX
-
-

The maximum value which can be held in a gshort.

-
-
-
-

gushort

-
typedef unsigned short  gushort;
-
-

Corresponds to the standard C unsigned short type. -Values of this type can range from 0 to G_MAXUSHORT.

-
-
-
-

G_MAXUSHORT

-
#define G_MAXUSHORT USHRT_MAX
-
-

The maximum value which can be held in a gushort.

-
-
-
-

glong

-
typedef long   glong;
-
-

Corresponds to the standard C long type. -Values of this type can range from G_MINLONG to G_MAXLONG.

-
-
-
-

G_MINLONG

-
#define G_MINLONG LONG_MIN
-
-

The minimum value which can be held in a glong.

-
-
-
-

G_MAXLONG

-
#define G_MAXLONG LONG_MAX
-
-

The maximum value which can be held in a glong.

-
-
-
-

gulong

-
typedef unsigned long   gulong;
-
-

Corresponds to the standard C unsigned long type. -Values of this type can range from 0 to G_MAXULONG.

-
-
-
-

G_MAXULONG

-
#define G_MAXULONG ULONG_MAX
-
-

The maximum value which can be held in a gulong.

-
-
-
-

gint8

-
typedef signed char gint8;
-
-

A signed integer guaranteed to be 8 bits on all platforms. -Values of this type can range from G_MININT8 (= -128) to -G_MAXINT8 (= 127).

-
-
-
-

G_MININT8

-
#define G_MININT8 ((gint8) -0x80)
-
-

The minimum value which can be held in a gint8.

-

Since: 2.4

-
-
-
-

G_MAXINT8

-
#define G_MAXINT8 ((gint8)  0x7f)
-
-

The maximum value which can be held in a gint8.

-

Since: 2.4

-
-
-
-

guint8

-
typedef unsigned char guint8;
-
-

An unsigned integer guaranteed to be 8 bits on all platforms. -Values of this type can range from 0 to G_MAXUINT8 (= 255).

-
-
-
-

G_MAXUINT8

-
#define G_MAXUINT8 ((guint8) 0xff)
-
-

The maximum value which can be held in a guint8.

-

Since: 2.4

-
-
-
-

gint16

-
typedef signed short gint16;
-
-

A signed integer guaranteed to be 16 bits on all platforms. -Values of this type can range from G_MININT16 (= -32,768) to -G_MAXINT16 (= 32,767).

-

To print or scan values of this type, use -G_GINT16_MODIFIER and/or G_GINT16_FORMAT.

-
-
-
-

G_MININT16

-
#define G_MININT16 ((gint16) -0x8000)
-
-

The minimum value which can be held in a gint16.

-

Since: 2.4

-
-
-
-

G_MAXINT16

-
#define G_MAXINT16 ((gint16)  0x7fff)
-
-

The maximum value which can be held in a gint16.

-

Since: 2.4

-
-
-
-

G_GINT16_MODIFIER

-
#define G_GINT16_MODIFIER "h"
-
-

The platform dependent length modifier for conversion specifiers -for scanning and printing values of type gint16 or guint16. It -is a string literal, but doesn't include the percent-sign, such -that you can add precision and length modifiers between percent-sign -and conversion specifier and append a conversion specifier.

-

The following example prints "0x7b";

-
- - - - - - - -
1
-2
gint16 value = 123;
-g_print ("%#" G_GINT16_MODIFIER "x", value);
-
- -

-

Since: 2.4

-
-
-
-

G_GINT16_FORMAT

-
#define G_GINT16_FORMAT "hi"
-
-

This is the platform dependent conversion specifier for scanning and -printing values of type gint16. It is a string literal, but doesn't -include the percent-sign, such that you can add precision and length -modifiers between percent-sign and conversion specifier.

-
- - - - - - - -
1
-2
-3
-4
-5
gint16 in;
-gint32 out;
-sscanf ("42", "%" G_GINT16_FORMAT, &in)
-out = in * 1000;
-g_print ("%" G_GINT32_FORMAT, out);
-
- -

-
-
-
-

guint16

-
typedef unsigned short guint16;
-
-

An unsigned integer guaranteed to be 16 bits on all platforms. -Values of this type can range from 0 to G_MAXUINT16 (= 65,535).

-

To print or scan values of this type, use -G_GINT16_MODIFIER and/or G_GUINT16_FORMAT.

-
-
-
-

G_MAXUINT16

-
#define G_MAXUINT16 ((guint16) 0xffff)
-
-

The maximum value which can be held in a guint16.

-

Since: 2.4

-
-
-
-

G_GUINT16_FORMAT

-
#define G_GUINT16_FORMAT "hu"
-
-

This is the platform dependent conversion specifier for scanning -and printing values of type guint16. See also G_GINT16_FORMAT

-
-
-
-

gint32

-
typedef signed int gint32;
-
-

A signed integer guaranteed to be 32 bits on all platforms. -Values of this type can range from G_MININT32 (= -2,147,483,648) -to G_MAXINT32 (= 2,147,483,647).

-

To print or scan values of this type, use -G_GINT32_MODIFIER and/or G_GINT32_FORMAT.

-
-
-
-

G_MININT32

-
#define G_MININT32 ((gint32) -0x80000000)
-
-

The minimum value which can be held in a gint32.

-

Since: 2.4

-
-
-
-

G_MAXINT32

-
#define G_MAXINT32 ((gint32)  0x7fffffff)
-
-

The maximum value which can be held in a gint32.

-

Since: 2.4

-
-
-
-

G_GINT32_MODIFIER

-
#define G_GINT32_MODIFIER ""
-
-

The platform dependent length modifier for conversion specifiers -for scanning and printing values of type gint32 or guint32. It -is a string literal. See also G_GINT16_MODIFIER.

-

Since: 2.4

-
-
-
-

G_GINT32_FORMAT

-
#define G_GINT32_FORMAT "i"
-
-

This is the platform dependent conversion specifier for scanning -and printing values of type gint32. See also G_GINT16_FORMAT.

-
-
-
-

guint32

-
typedef unsigned int guint32;
-
-

An unsigned integer guaranteed to be 32 bits on all platforms. -Values of this type can range from 0 to G_MAXUINT32 (= 4,294,967,295).

-

To print or scan values of this type, use -G_GINT32_MODIFIER and/or G_GUINT32_FORMAT.

-
-
-
-

G_MAXUINT32

-
#define G_MAXUINT32 ((guint32) 0xffffffff)
-
-

The maximum value which can be held in a guint32.

-

Since: 2.4

-
-
-
-

G_GUINT32_FORMAT

-
#define G_GUINT32_FORMAT "u"
-
-

This is the platform dependent conversion specifier for scanning -and printing values of type guint32. See also G_GINT16_FORMAT.

-
-
-
-

gint64

-
typedef signed long gint64;
-
-

A signed integer guaranteed to be 64 bits on all platforms. -Values of this type can range from G_MININT64 -(= -9,223,372,036,854,775,808) to G_MAXINT64 -(= 9,223,372,036,854,775,807).

-

To print or scan values of this type, use -G_GINT64_MODIFIER and/or G_GINT64_FORMAT.

-
-
-
-

G_MININT64

-
#define G_MININT64 ((gint64) G_GINT64_CONSTANT(-0x8000000000000000))
-
-

The minimum value which can be held in a gint64.

-
-
-
-

G_MAXINT64

-
#define G_MAXINT64 G_GINT64_CONSTANT(0x7fffffffffffffff)
-
-

The maximum value which can be held in a gint64.

-
-
-
-

G_GINT64_MODIFIER

-
#define G_GINT64_MODIFIER "l"
-
-

The platform dependent length modifier for conversion specifiers -for scanning and printing values of type gint64 or guint64. -It is a string literal.

-

Some platforms do not support printing 64-bit integers, even -though the types are supported. On such platforms G_GINT64_MODIFIER -is not defined.

-

Since: 2.4

-
-
-
-

G_GINT64_FORMAT

-
#define G_GINT64_FORMAT "li"
-
-

This is the platform dependent conversion specifier for scanning -and printing values of type gint64. See also G_GINT16_FORMAT.

-

Some platforms do not support scanning and printing 64-bit integers, -even though the types are supported. On such platforms G_GINT64_FORMAT -is not defined. Note that scanf() may not support 64-bit integers, even -if G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() -is not recommended for parsing anyway; consider using g_ascii_strtoull() -instead.

-
-
-
-

guint64

-
typedef unsigned long guint64;
-
-

An unsigned integer guaranteed to be 64-bits on all platforms. -Values of this type can range from 0 to G_MAXUINT64 -(= 18,446,744,073,709,551,615).

-

To print or scan values of this type, use -G_GINT64_MODIFIER and/or G_GUINT64_FORMAT.

-
-
-
-

G_MAXUINT64

-
#define G_MAXUINT64 G_GUINT64_CONSTANT(0xffffffffffffffff)
-
-

The maximum value which can be held in a guint64.

-
-
-
-

G_GUINT64_FORMAT

-
#define G_GUINT64_FORMAT "lu"
-
-

This is the platform dependent conversion specifier for scanning -and printing values of type guint64. See also G_GINT16_FORMAT.

-

Some platforms do not support scanning and printing 64-bit integers, -even though the types are supported. On such platforms G_GUINT64_FORMAT -is not defined. Note that scanf() may not support 64-bit integers, even -if G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() -is not recommended for parsing anyway; consider using g_ascii_strtoull() -instead.

-
-
-
-

gfloat

-
typedef float   gfloat;
-
-

Corresponds to the standard C float type. -Values of this type can range from -G_MAXFLOAT to G_MAXFLOAT.

-
-
-
-

G_MINFLOAT

-
#define G_MINFLOAT FLT_MIN
-
-

The minimum positive value which can be held in a gfloat.

-

If you are interested in the smallest value which can be held -in a gfloat, use -G_MAXFLOAT.

-
-
-
-

G_MAXFLOAT

-
#define G_MAXFLOAT FLT_MAX
-
-

The maximum value which can be held in a gfloat.

-
-
-
-

gdouble

-
typedef double  gdouble;
-
-

Corresponds to the standard C double type. -Values of this type can range from -G_MAXDOUBLE to G_MAXDOUBLE.

-
-
-
-

G_MINDOUBLE

-
#define G_MINDOUBLE DBL_MIN
-
-

The minimum positive value which can be held in a gdouble.

-

If you are interested in the smallest value which can be held -in a gdouble, use -G_MAXDOUBLE.

-
-
-
-

G_MAXDOUBLE

-
#define G_MAXDOUBLE DBL_MAX
-
-

The maximum value which can be held in a gdouble.

-
-
-
-

gsize

-
typedef unsigned long gsize;
-
-

An unsigned integer type of the result of the sizeof operator, -corresponding to the size_t type defined in C99. -This type is wide enough to hold the numeric value of a pointer, -so it is usually 32 bit wide on a 32-bit platform and 64 bit wide -on a 64-bit platform. Values of this type can range from 0 to -G_MAXSIZE.

-

To print or scan values of this type, use -G_GSIZE_MODIFIER and/or G_GSIZE_FORMAT.

-
-
-
-

G_MAXSIZE

-
#define G_MAXSIZE G_MAXULONG
-
-

The maximum value which can be held in a gsize.

-

Since: 2.4

-
-
-
-

G_GSIZE_MODIFIER

-
#define G_GSIZE_MODIFIER "l"
-
-

The platform dependent length modifier for conversion specifiers -for scanning and printing values of type gsize. It -is a string literal.

-

Since: 2.6

-
-
-
-

G_GSIZE_FORMAT

-
#define G_GSIZE_FORMAT "lu"
-
-

This is the platform dependent conversion specifier for scanning -and printing values of type gsize. See also G_GINT16_FORMAT.

-

Since: 2.6

-
-
-
-

gssize

-
typedef signed long gssize;
-
-

A signed variant of gsize, corresponding to the -ssize_t defined on most platforms. -Values of this type can range from G_MINSSIZE -to G_MAXSSIZE.

-

To print or scan values of this type, use -G_GSSIZE_MODIFIER and/or G_GSSIZE_FORMAT.

-
-
-
-

G_MINSSIZE

-
#define G_MINSSIZE G_MINLONG
-
-

The minimum value which can be held in a gssize.

-

Since: 2.14

-
-
-
-

G_MAXSSIZE

-
#define G_MAXSSIZE G_MAXLONG
-
-

The maximum value which can be held in a gssize.

-

Since: 2.14

-
-
-
-

G_GSSIZE_MODIFIER

-
#define G_GSSIZE_MODIFIER "l"
-
-

The platform dependent length modifier for conversion specifiers -for scanning and printing values of type gssize. It -is a string literal.

-

Since: 2.6

-
-
-
-

G_GSSIZE_FORMAT

-
#define G_GSSIZE_FORMAT "li"
-
-

This is the platform dependent conversion specifier for scanning -and printing values of type gssize. See also G_GINT16_FORMAT.

-

Since: 2.6

-
-
-
-

goffset

-
typedef gint64 goffset;
-
-

A signed integer type that is used for file offsets, -corresponding to the C99 type off64_t. -Values of this type can range from G_MINOFFSET to -G_MAXOFFSET.

-

To print or scan values of this type, use -G_GOFFSET_MODIFIER and/or G_GOFFSET_FORMAT.

-

Since: 2.14

-
-
-
-

G_MINOFFSET

-
#define G_MINOFFSET G_MININT64
-
-

The minimum value which can be held in a goffset.

-
-
-
-

G_MAXOFFSET

-
#define G_MAXOFFSET G_MAXINT64
-
-

The maximum value which can be held in a goffset.

-
-
-
-

G_GOFFSET_MODIFIER

-
#define G_GOFFSET_MODIFIER      G_GINT64_MODIFIER
-
-

The platform dependent length modifier for conversion specifiers -for scanning and printing values of type goffset. It is a string -literal. See also G_GINT64_MODIFIER.

-

Since: 2.20

-
-
-
-

G_GOFFSET_FORMAT

-
#define G_GOFFSET_FORMAT        G_GINT64_FORMAT
-
-

This is the platform dependent conversion specifier for scanning -and printing values of type goffset. See also G_GINT64_FORMAT.

-

Since: 2.20

-
-
-
-

gintptr

-
typedef signed long gintptr;
-
-

Corresponds to the C99 type intptr_t, -a signed integer type that can hold any pointer.

-

To print or scan values of this type, use -G_GINTPTR_MODIFIER and/or G_GINTPTR_FORMAT.

-

Since: 2.18

-
-
-
-

G_GINTPTR_MODIFIER

-
#define G_GINTPTR_MODIFIER      "l"
-
-

The platform dependent length modifier for conversion specifiers -for scanning and printing values of type gintptr or guintptr. -It is a string literal.

-

Since: 2.22

-
-
-
-

G_GINTPTR_FORMAT

-
#define G_GINTPTR_FORMAT        "li"
-
-

This is the platform dependent conversion specifier for scanning -and printing values of type gintptr.

-

Since: 2.22

-
-
-
-

guintptr

-
typedef unsigned long guintptr;
-
-

Corresponds to the C99 type uintptr_t, -an unsigned integer type that can hold any pointer.

-

To print or scan values of this type, use -G_GINTPTR_MODIFIER and/or G_GUINTPTR_FORMAT.

-

Since: 2.18

-
-
-
-

G_GUINTPTR_FORMAT

-
#define G_GUINTPTR_FORMAT       "lu"
-
-

This is the platform dependent conversion specifier -for scanning and printing values of type guintptr.

-

Since: 2.22

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Bookmark-file-parser.html b/docs/reference/glib/html/glib-Bookmark-file-parser.html deleted file mode 100644 index e9aefa785..000000000 --- a/docs/reference/glib/html/glib-Bookmark-file-parser.html +++ /dev/null @@ -1,2418 +0,0 @@ - - - - -Bookmark file parser: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Bookmark file parser

-

Bookmark file parser — parses files containing bookmarks

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GBookmarkFile * - -g_bookmark_file_new () -
-void - -g_bookmark_file_free () -
-gboolean - -g_bookmark_file_load_from_file () -
-gboolean - -g_bookmark_file_load_from_data () -
-gboolean - -g_bookmark_file_load_from_data_dirs () -
-gchar * - -g_bookmark_file_to_data () -
-gboolean - -g_bookmark_file_to_file () -
-gboolean - -g_bookmark_file_has_item () -
-gboolean - -g_bookmark_file_has_group () -
-gboolean - -g_bookmark_file_has_application () -
-gint - -g_bookmark_file_get_size () -
-gchar ** - -g_bookmark_file_get_uris () -
-gchar * - -g_bookmark_file_get_title () -
-gchar * - -g_bookmark_file_get_description () -
-gchar * - -g_bookmark_file_get_mime_type () -
-gboolean - -g_bookmark_file_get_is_private () -
-gboolean - -g_bookmark_file_get_icon () -
-time_t - -g_bookmark_file_get_added () -
-time_t - -g_bookmark_file_get_modified () -
-time_t - -g_bookmark_file_get_visited () -
-gchar ** - -g_bookmark_file_get_groups () -
-gchar ** - -g_bookmark_file_get_applications () -
-gboolean - -g_bookmark_file_get_app_info () -
-void - -g_bookmark_file_set_title () -
-void - -g_bookmark_file_set_description () -
-void - -g_bookmark_file_set_mime_type () -
-void - -g_bookmark_file_set_is_private () -
-void - -g_bookmark_file_set_icon () -
-void - -g_bookmark_file_set_added () -
-void - -g_bookmark_file_set_groups () -
-void - -g_bookmark_file_set_modified () -
-void - -g_bookmark_file_set_visited () -
-gboolean - -g_bookmark_file_set_app_info () -
-void - -g_bookmark_file_add_group () -
-void - -g_bookmark_file_add_application () -
-gboolean - -g_bookmark_file_remove_group () -
-gboolean - -g_bookmark_file_remove_application () -
-gboolean - -g_bookmark_file_remove_item () -
-gboolean - -g_bookmark_file_move_item () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
 GBookmarkFile
#defineG_BOOKMARK_FILE_ERROR
enumGBookmarkFileError
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GBookmarkFile lets you parse, edit or create files containing bookmarks -to URI, along with some meta-data about the resource pointed by the URI -like its MIME type, the application that is registering the bookmark and -the icon that should be used to represent the bookmark. The data is stored -using the -Desktop Bookmark Specification.

-

The syntax of the bookmark files is described in detail inside the -Desktop Bookmark Specification, here is a quick summary: bookmark -files use a sub-class of the XML Bookmark Exchange Language -specification, consisting of valid UTF-8 encoded XML, under the -<xbel> root element; each bookmark is stored inside a -<bookmark> element, using its URI: no relative paths can -be used inside a bookmark file. The bookmark may have a user defined -title and description, to be used instead of the URI. Under the -<metadata> element, with its owner attribute set to -http://freedesktop.org, is stored the meta-data about a resource -pointed by its URI. The meta-data consists of the resource's MIME -type; the applications that have registered a bookmark; the groups -to which a bookmark belongs to; a visibility flag, used to set the -bookmark as "private" to the applications and groups that has it -registered; the URI and MIME type of an icon, to be used when -displaying the bookmark inside a GUI.

-

Here is an example of a bookmark file: -bookmarks.xbel

-

A bookmark file might contain more than one bookmark; each bookmark -is accessed through its URI.

-

The important caveat of bookmark files is that when you add a new -bookmark you must also add the application that is registering it, using -g_bookmark_file_add_application() or g_bookmark_file_set_app_info(). -If a bookmark has no applications then it won't be dumped when creating -the on disk representation, using g_bookmark_file_to_data() or -g_bookmark_file_to_file().

-

The GBookmarkFile parser was added in GLib 2.12.

-
-
-

Functions

-
-

g_bookmark_file_new ()

-
GBookmarkFile *
-g_bookmark_file_new (void);
-

Creates a new empty GBookmarkFile object.

-

Use g_bookmark_file_load_from_file(), g_bookmark_file_load_from_data() -or g_bookmark_file_load_from_data_dirs() to read an existing bookmark -file.

-
-

Returns

-

an empty GBookmarkFile

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_free ()

-
void
-g_bookmark_file_free (GBookmarkFile *bookmark);
-

Frees a GBookmarkFile.

-
-

Parameters

-
----- - - - - - -

bookmark

a GBookmarkFile

 
-
-

Since: 2.12

-
-
-
-

g_bookmark_file_load_from_file ()

-
gboolean
-g_bookmark_file_load_from_file (GBookmarkFile *bookmark,
-                                const gchar *filename,
-                                GError **error);
-

Loads a desktop bookmark file into an empty GBookmarkFile structure. -If the file could not be loaded then error - is set to either a GFileError -or GBookmarkFileError.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

an empty GBookmarkFile struct

 

filename

the path of a filename to load, in the -GLib file name encoding.

[type filename]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE if a desktop bookmark file could be loaded

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_load_from_data ()

-
gboolean
-g_bookmark_file_load_from_data (GBookmarkFile *bookmark,
-                                const gchar *data,
-                                gsize length,
-                                GError **error);
-

Loads a bookmark file from memory into an empty GBookmarkFile -structure. If the object cannot be created then error - is set to a -GBookmarkFileError.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

bookmark

an empty GBookmarkFile struct

 

data

desktop bookmarks loaded in memory

 

length

the length of data -in bytes

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE if a desktop bookmark could be loaded.

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_load_from_data_dirs ()

-
gboolean
-g_bookmark_file_load_from_data_dirs (GBookmarkFile *bookmark,
-                                     const gchar *file,
-                                     gchar **full_path,
-                                     GError **error);
-

This function looks for a desktop bookmark file named file - in the -paths returned from g_get_user_data_dir() and g_get_system_data_dirs(), -loads the file into bookmark - and returns the file's full path in -full_path -. If the file could not be loaded then an error is -set to either a GFileError or GBookmarkFileError.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

file

a relative path to a filename to open and parse.

[type filename]

full_path

return location for a string -containing the full path of the file, or NULL.

[type filename][nullable]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE if a key file could be loaded, FALSE otherwise

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_to_data ()

-
gchar *
-g_bookmark_file_to_data (GBookmarkFile *bookmark,
-                         gsize *length,
-                         GError **error);
-

This function outputs bookmark - as a string.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

length

return location for the length of the returned string, or NULL.

[out][optional]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a newly allocated string holding -the contents of the GBookmarkFile

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_to_file ()

-
gboolean
-g_bookmark_file_to_file (GBookmarkFile *bookmark,
-                         const gchar *filename,
-                         GError **error);
-

This function outputs bookmark - into a file. The write process is -guaranteed to be atomic by using g_file_set_contents() internally.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

filename

path of the output file.

[type filename]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE if the file was successfully written.

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_has_item ()

-
gboolean
-g_bookmark_file_has_item (GBookmarkFile *bookmark,
-                          const gchar *uri);
-

Looks whether the desktop bookmark has an item with its URI set to uri -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 
-
-
-

Returns

-

TRUE if uri -is inside bookmark -, FALSE otherwise

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_has_group ()

-
gboolean
-g_bookmark_file_has_group (GBookmarkFile *bookmark,
-                           const gchar *uri,
-                           const gchar *group,
-                           GError **error);
-

Checks whether group - appears in the list of groups to which -the bookmark for uri - belongs to.

-

In the event the URI cannot be found, FALSE is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

group

the group name to be searched

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE if group -was found.

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_has_application ()

-
gboolean
-g_bookmark_file_has_application (GBookmarkFile *bookmark,
-                                 const gchar *uri,
-                                 const gchar *name,
-                                 GError **error);
-

Checks whether the bookmark for uri - inside bookmark - has been -registered by application name -.

-

In the event the URI cannot be found, FALSE is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

name

the name of the application

 

error

return location for a GError or NULL

 
-
-
-

Returns

-

TRUE if the application name -was found

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_get_size ()

-
gint
-g_bookmark_file_get_size (GBookmarkFile *bookmark);
-

Gets the number of bookmarks inside bookmark -.

-
-

Parameters

-
----- - - - - - -

bookmark

a GBookmarkFile

 
-
-
-

Returns

-

the number of bookmarks

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_get_uris ()

-
gchar **
-g_bookmark_file_get_uris (GBookmarkFile *bookmark,
-                          gsize *length);
-

Returns all URIs of the bookmarks in the bookmark file bookmark -. -The array of returned URIs will be NULL-terminated, so length - may -optionally be NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

length

return location for the number of returned URIs, or NULL.

[out][optional]
-
-
-

Returns

-

a newly allocated NULL-terminated array of strings. -Use g_strfreev() to free it.

-

[array length=length][transfer full]

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_get_title ()

-
gchar *
-g_bookmark_file_get_title (GBookmarkFile *bookmark,
-                           const gchar *uri,
-                           GError **error);
-

Returns the title of the bookmark for uri -.

-

If uri - is NULL, the title of bookmark - is returned.

-

In the event the URI cannot be found, NULL is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI or NULL.

[nullable]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a newly allocated string or NULL if the specified -URI cannot be found.

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_get_description ()

-
gchar *
-g_bookmark_file_get_description (GBookmarkFile *bookmark,
-                                 const gchar *uri,
-                                 GError **error);
-

Retrieves the description of the bookmark for uri -.

-

In the event the URI cannot be found, NULL is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a newly allocated string or NULL if the specified -URI cannot be found.

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_get_mime_type ()

-
gchar *
-g_bookmark_file_get_mime_type (GBookmarkFile *bookmark,
-                               const gchar *uri,
-                               GError **error);
-

Retrieves the MIME type of the resource pointed by uri -.

-

In the event the URI cannot be found, NULL is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the -event that the MIME type cannot be found, NULL is returned and -error - is set to G_BOOKMARK_FILE_ERROR_INVALID_VALUE.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a newly allocated string or NULL if the specified -URI cannot be found.

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_get_is_private ()

-
gboolean
-g_bookmark_file_get_is_private (GBookmarkFile *bookmark,
-                                const gchar *uri,
-                                GError **error);
-

Gets whether the private flag of the bookmark for uri - is set.

-

In the event the URI cannot be found, FALSE is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the -event that the private flag cannot be found, FALSE is returned and -error - is set to G_BOOKMARK_FILE_ERROR_INVALID_VALUE.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE if the private flag is set, FALSE otherwise.

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_get_icon ()

-
gboolean
-g_bookmark_file_get_icon (GBookmarkFile *bookmark,
-                          const gchar *uri,
-                          gchar **href,
-                          gchar **mime_type,
-                          GError **error);
-

Gets the icon of the bookmark for uri -.

-

In the event the URI cannot be found, FALSE is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

href

return location for the icon's location or NULL.

[out][optional]

mime_type

return location for the icon's MIME type or NULL.

[out][optional]

error

return location for a GError or NULL

 
-
-
-

Returns

-

TRUE if the icon for the bookmark for the URI was found. -You should free the returned strings.

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_get_added ()

-
time_t
-g_bookmark_file_get_added (GBookmarkFile *bookmark,
-                           const gchar *uri,
-                           GError **error);
-

Gets the time the bookmark for uri - was added to bookmark -

-

In the event the URI cannot be found, -1 is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a timestamp

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_get_modified ()

-
time_t
-g_bookmark_file_get_modified (GBookmarkFile *bookmark,
-                              const gchar *uri,
-                              GError **error);
-

Gets the time when the bookmark for uri - was last modified.

-

In the event the URI cannot be found, -1 is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a timestamp

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_get_visited ()

-
time_t
-g_bookmark_file_get_visited (GBookmarkFile *bookmark,
-                             const gchar *uri,
-                             GError **error);
-

Gets the time the bookmark for uri - was last visited.

-

In the event the URI cannot be found, -1 is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a timestamp.

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_get_groups ()

-
gchar **
-g_bookmark_file_get_groups (GBookmarkFile *bookmark,
-                            const gchar *uri,
-                            gsize *length,
-                            GError **error);
-

Retrieves the list of group names of the bookmark for uri -.

-

In the event the URI cannot be found, NULL is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.

-

The returned array is NULL terminated, so length - may optionally -be NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

length

return location for the length of the returned string, or NULL.

[out][optional]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a newly allocated NULL-terminated array of group names. -Use g_strfreev() to free it.

-

[array length=length][transfer full]

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_get_applications ()

-
gchar **
-g_bookmark_file_get_applications (GBookmarkFile *bookmark,
-                                  const gchar *uri,
-                                  gsize *length,
-                                  GError **error);
-

Retrieves the names of the applications that have registered the -bookmark for uri -.

-

In the event the URI cannot be found, NULL is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

length

return location of the length of the returned list, or NULL.

[out][optional]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a newly allocated NULL-terminated array of strings. -Use g_strfreev() to free it.

-

[array length=length][transfer full]

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_get_app_info ()

-
gboolean
-g_bookmark_file_get_app_info (GBookmarkFile *bookmark,
-                              const gchar *uri,
-                              const gchar *name,
-                              gchar **exec,
-                              guint *count,
-                              time_t *stamp,
-                              GError **error);
-

Gets the registration informations of app_name - for the bookmark for -uri -. See g_bookmark_file_set_app_info() for more informations about -the returned data.

-

The string returned in app_exec - must be freed.

-

In the event the URI cannot be found, FALSE is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the -event that no application with name app_name - has registered a bookmark -for uri -, FALSE is returned and error is set to -G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. In the event that unquoting -the command line fails, an error of the G_SHELL_ERROR domain is -set and FALSE is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

name

an application's name

 

exec

return location for the command line of the application, or NULL.

[out][optional]

count

return location for the registration count, or NULL.

[out][optional]

stamp

return location for the last registration time, or NULL.

[out][optional]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE on success.

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_set_title ()

-
void
-g_bookmark_file_set_title (GBookmarkFile *bookmark,
-                           const gchar *uri,
-                           const gchar *title);
-

Sets title - as the title of the bookmark for uri - inside the -bookmark file bookmark -.

-

If uri - is NULL, the title of bookmark - is set.

-

If a bookmark for uri - cannot be found then it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI or NULL.

[nullable]

title

a UTF-8 encoded string

 
-
-

Since: 2.12

-
-
-
-

g_bookmark_file_set_description ()

-
void
-g_bookmark_file_set_description (GBookmarkFile *bookmark,
-                                 const gchar *uri,
-                                 const gchar *description);
-

Sets description - as the description of the bookmark for uri -.

-

If uri - is NULL, the description of bookmark - is set.

-

If a bookmark for uri - cannot be found then it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI or NULL.

[nullable]

description

a string

 
-
-

Since: 2.12

-
-
-
-

g_bookmark_file_set_mime_type ()

-
void
-g_bookmark_file_set_mime_type (GBookmarkFile *bookmark,
-                               const gchar *uri,
-                               const gchar *mime_type);
-

Sets mime_type - as the MIME type of the bookmark for uri -.

-

If a bookmark for uri - cannot be found then it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

mime_type

a MIME type

 
-
-

Since: 2.12

-
-
-
-

g_bookmark_file_set_is_private ()

-
void
-g_bookmark_file_set_is_private (GBookmarkFile *bookmark,
-                                const gchar *uri,
-                                gboolean is_private);
-

Sets the private flag of the bookmark for uri -.

-

If a bookmark for uri - cannot be found then it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

is_private

TRUE if the bookmark should be marked as private

 
-
-

Since: 2.12

-
-
-
-

g_bookmark_file_set_icon ()

-
void
-g_bookmark_file_set_icon (GBookmarkFile *bookmark,
-                          const gchar *uri,
-                          const gchar *href,
-                          const gchar *mime_type);
-

Sets the icon for the bookmark for uri -. If href - is NULL, unsets -the currently set icon. href - can either be a full URL for the icon -file or the icon name following the Icon Naming specification.

-

If no bookmark for uri - is found one is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

href

the URI of the icon for the bookmark, or NULL.

[nullable]

mime_type

the MIME type of the icon for the bookmark

 
-
-

Since: 2.12

-
-
-
-

g_bookmark_file_set_added ()

-
void
-g_bookmark_file_set_added (GBookmarkFile *bookmark,
-                           const gchar *uri,
-                           time_t added);
-

Sets the time the bookmark for uri - was added into bookmark -.

-

If no bookmark for uri - is found then it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

added

a timestamp or -1 to use the current time

 
-
-

Since: 2.12

-
-
-
-

g_bookmark_file_set_groups ()

-
void
-g_bookmark_file_set_groups (GBookmarkFile *bookmark,
-                            const gchar *uri,
-                            const gchar **groups,
-                            gsize length);
-

Sets a list of group names for the item with URI uri -. Each previously -set group name list is removed.

-

If uri - cannot be found then an item for it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

an item's URI

 

groups

an array of group names, or NULL to remove all groups.

[nullable]

length

number of group name values in groups -

 
-
-

Since: 2.12

-
-
-
-

g_bookmark_file_set_modified ()

-
void
-g_bookmark_file_set_modified (GBookmarkFile *bookmark,
-                              const gchar *uri,
-                              time_t modified);
-

Sets the last time the bookmark for uri - was last modified.

-

If no bookmark for uri - is found then it is created.

-

The "modified" time should only be set when the bookmark's meta-data -was actually changed. Every function of GBookmarkFile that -modifies a bookmark also changes the modification time, except for -g_bookmark_file_set_visited().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

modified

a timestamp or -1 to use the current time

 
-
-

Since: 2.12

-
-
-
-

g_bookmark_file_set_visited ()

-
void
-g_bookmark_file_set_visited (GBookmarkFile *bookmark,
-                             const gchar *uri,
-                             time_t visited);
-

Sets the time the bookmark for uri - was last visited.

-

If no bookmark for uri - is found then it is created.

-

The "visited" time should only be set if the bookmark was launched, -either using the command line retrieved by g_bookmark_file_get_app_info() -or by the default application for the bookmark's MIME type, retrieved -using g_bookmark_file_get_mime_type(). Changing the "visited" time -does not affect the "modified" time.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

visited

a timestamp or -1 to use the current time

 
-
-

Since: 2.12

-
-
-
-

g_bookmark_file_set_app_info ()

-
gboolean
-g_bookmark_file_set_app_info (GBookmarkFile *bookmark,
-                              const gchar *uri,
-                              const gchar *name,
-                              const gchar *exec,
-                              gint count,
-                              time_t stamp,
-                              GError **error);
-

Sets the meta-data of application name - inside the list of -applications that have registered a bookmark for uri - inside -bookmark -.

-

You should rarely use this function; use g_bookmark_file_add_application() -and g_bookmark_file_remove_application() instead.

-

name - can be any UTF-8 encoded string used to identify an -application. -exec - can have one of these two modifiers: "%f", which will -be expanded as the local file name retrieved from the bookmark's -URI; "%u", which will be expanded as the bookmark's URI. -The expansion is done automatically when retrieving the stored -command line using the g_bookmark_file_get_app_info() function. -count - is the number of times the application has registered the -bookmark; if is < 0, the current registration count will be increased -by one, if is 0, the application with name - will be removed from -the list of registered applications. -stamp - is the Unix time of the last registration; if it is -1, the -current time will be used.

-

If you try to remove an application by setting its registration count to -zero, and no bookmark for uri - is found, FALSE is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND; similarly, -in the event that no application name - has registered a bookmark -for uri -, FALSE is returned and error is set to -G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. Otherwise, if no bookmark -for uri - is found, one is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

name

an application's name

 

exec

an application's command line

 

count

the number of registrations done for this application

 

stamp

the time of the last registration for this application

 

error

return location for a GError or NULL

 
-
-
-

Returns

-

TRUE if the application's meta-data was successfully -changed.

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_add_group ()

-
void
-g_bookmark_file_add_group (GBookmarkFile *bookmark,
-                           const gchar *uri,
-                           const gchar *group);
-

Adds group - to the list of groups to which the bookmark for uri - -belongs to.

-

If no bookmark for uri - is found then it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

group

the group name to be added

 
-
-

Since: 2.12

-
-
-
-

g_bookmark_file_add_application ()

-
void
-g_bookmark_file_add_application (GBookmarkFile *bookmark,
-                                 const gchar *uri,
-                                 const gchar *name,
-                                 const gchar *exec);
-

Adds the application with name - and exec - to the list of -applications that have registered a bookmark for uri - into -bookmark -.

-

Every bookmark inside a GBookmarkFile must have at least an -application registered. Each application must provide a name, a -command line useful for launching the bookmark, the number of times -the bookmark has been registered by the application and the last -time the application registered this bookmark.

-

If name - is NULL, the name of the application will be the -same returned by g_get_application_name(); if exec - is NULL, the -command line will be a composition of the program name as -returned by g_get_prgname() and the "%u" modifier, which will be -expanded to the bookmark's URI.

-

This function will automatically take care of updating the -registrations count and timestamping in case an application -with the same name - had already registered a bookmark for -uri - inside bookmark -.

-

If no bookmark for uri - is found, one is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

name

the name of the application registering the bookmark -or NULL.

[nullable]

exec

command line to be used to launch the bookmark or NULL.

[nullable]
-
-

Since: 2.12

-
-
-
-

g_bookmark_file_remove_group ()

-
gboolean
-g_bookmark_file_remove_group (GBookmarkFile *bookmark,
-                              const gchar *uri,
-                              const gchar *group,
-                              GError **error);
-

Removes group - from the list of groups to which the bookmark -for uri - belongs to.

-

In the event the URI cannot be found, FALSE is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. -In the event no group was defined, FALSE is returned and -error - is set to G_BOOKMARK_FILE_ERROR_INVALID_VALUE.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

group

the group name to be removed

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE if group -was successfully removed.

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_remove_application ()

-
gboolean
-g_bookmark_file_remove_application (GBookmarkFile *bookmark,
-                                    const gchar *uri,
-                                    const gchar *name,
-                                    GError **error);
-

Removes application registered with name - from the list of applications -that have registered a bookmark for uri - inside bookmark -.

-

In the event the URI cannot be found, FALSE is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. -In the event that no application with name app_name - has registered -a bookmark for uri -, FALSE is returned and error is set to -G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

name

the name of the application

 

error

return location for a GError or NULL

 
-
-
-

Returns

-

TRUE if the application was successfully removed.

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_remove_item ()

-
gboolean
-g_bookmark_file_remove_item (GBookmarkFile *bookmark,
-                             const gchar *uri,
-                             GError **error);
-

Removes the bookmark for uri - from the bookmark file bookmark -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

uri

a valid URI

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE if the bookmark was removed successfully.

-
-

Since: 2.12

-
-
-
-

g_bookmark_file_move_item ()

-
gboolean
-g_bookmark_file_move_item (GBookmarkFile *bookmark,
-                           const gchar *old_uri,
-                           const gchar *new_uri,
-                           GError **error);
-

Changes the URI of a bookmark item from old_uri - to new_uri -. Any -existing bookmark for new_uri - will be overwritten. If new_uri - is -NULL, then the bookmark is removed.

-

In the event the URI cannot be found, FALSE is returned and -error - is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

bookmark

a GBookmarkFile

 

old_uri

a valid URI

 

new_uri

a valid URI, or NULL.

[nullable]

error

return location for a GError or NULL

 
-
-
-

Returns

-

TRUE if the URI was successfully changed

-
-

Since: 2.12

-
-
-
-

Types and Values

-
-

GBookmarkFile

-
typedef struct _GBookmarkFile GBookmarkFile;
-

The GBookmarkFile structure contains only -private data and should not be directly accessed.

-
-
-
-

G_BOOKMARK_FILE_ERROR

-
#define G_BOOKMARK_FILE_ERROR (g_bookmark_file_error_quark ())
-
-

Error domain for bookmark file parsing. -Errors in this domain will be from the GBookmarkFileError -enumeration. See GError for information on error domains.

-
-
-
-

enum GBookmarkFileError

-

Error codes returned by bookmark file parsing.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_BOOKMARK_FILE_ERROR_INVALID_URI

-

URI was ill-formed

-
 

G_BOOKMARK_FILE_ERROR_INVALID_VALUE

-

a requested field was not found

-
 

G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED

-

a requested application did - not register a bookmark

-
 

G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND

-

a requested URI was not found

-
 

G_BOOKMARK_FILE_ERROR_READ

-

document was ill formed

-
 

G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING

-

the text being parsed was - in an unknown encoding

-
 

G_BOOKMARK_FILE_ERROR_WRITE

-

an error occurred while writing

-
 

G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND

-

requested file was not found

-
 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Bounds-checked-integer-arithmetic.html b/docs/reference/glib/html/glib-Bounds-checked-integer-arithmetic.html deleted file mode 100644 index cd82d4e1b..000000000 --- a/docs/reference/glib/html/glib-Bounds-checked-integer-arithmetic.html +++ /dev/null @@ -1,384 +0,0 @@ - - - - -Bounds-checking integer arithmetic: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Bounds-checking integer arithmetic

-

Bounds-checking integer arithmetic — a set of helpers for performing checked integer arithmetic

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -g_uint_checked_add() -
#define -g_uint_checked_mul() -
#define -g_uint64_checked_add() -
#define -g_uint64_checked_mul() -
#define -g_size_checked_add() -
#define -g_size_checked_mul() -
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GLib offers a set of macros for doing additions and multiplications -of unsigned integers, with checks for overflows.

-

The helpers all have three arguments. A pointer to the destination -is always the first argument and the operands to the operation are -the other two.

-

Following standard GLib convention, the helpers return TRUE in case -of success (ie: no overflow).

-

The helpers may be macros, normal functions or inlines. They may be -implemented with inline assembly or compiler intrinsics where -available.

-
-
-

Functions

-
-

g_uint_checked_add()

-
#define             g_uint_checked_add(dest, a, b)
-

Performs a checked addition of a - and b -, storing the result in -dest -.

-

If the operation is successful, TRUE is returned. If the operation -overflows then the state of dest - is undefined and FALSE is -returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dest

a pointer to the guint destination

 

a

the guint left operand

 

b

the guint right operand

 
-
-
-

Returns

-

TRUE if there was no overflow

-
-

Since: 2.48

-
-
-
-

g_uint_checked_mul()

-
#define             g_uint_checked_mul(dest, a, b)
-

Performs a checked multiplication of a - and b -, storing the result in -dest -.

-

If the operation is successful, TRUE is returned. If the operation -overflows then the state of dest - is undefined and FALSE is -returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dest

a pointer to the guint destination

 

a

the guint left operand

 

b

the guint right operand

 
-
-
-

Returns

-

TRUE if there was no overflow

-
-

Since: 2.48

-
-
-
-

g_uint64_checked_add()

-
#define             g_uint64_checked_add(dest, a, b)
-

Performs a checked addition of a - and b -, storing the result in -dest -.

-

If the operation is successful, TRUE is returned. If the operation -overflows then the state of dest - is undefined and FALSE is -returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dest

a pointer to the guint64 destination

 

a

the guint64 left operand

 

b

the guint64 right operand

 
-
-
-

Returns

-

TRUE if there was no overflow

-
-

Since: 2.48

-
-
-
-

g_uint64_checked_mul()

-
#define             g_uint64_checked_mul(dest, a, b)
-

Performs a checked multiplication of a - and b -, storing the result in -dest -.

-

If the operation is successful, TRUE is returned. If the operation -overflows then the state of dest - is undefined and FALSE is -returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dest

a pointer to the guint64 destination

 

a

the guint64 left operand

 

b

the guint64 right operand

 
-
-
-

Returns

-

TRUE if there was no overflow

-
-

Since: 2.48

-
-
-
-

g_size_checked_add()

-
#define             g_size_checked_add(dest, a, b)
-

Performs a checked addition of a - and b -, storing the result in -dest -.

-

If the operation is successful, TRUE is returned. If the operation -overflows then the state of dest - is undefined and FALSE is -returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dest

a pointer to the gsize destination

 

a

the gsize left operand

 

b

the gsize right operand

 
-
-
-

Returns

-

TRUE if there was no overflow

-
-

Since: 2.48

-
-
-
-

g_size_checked_mul()

-
#define             g_size_checked_mul(dest, a, b)
-

Performs a checked multiplication of a - and b -, storing the result in -dest -.

-

If the operation is successful, TRUE is returned. If the operation -overflows then the state of dest - is undefined and FALSE is -returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dest

a pointer to the gsize destination

 

a

the gsize left operand

 

b

the gsize right operand

 
-
-
-

Returns

-

TRUE if there was no overflow

-
-

Since: 2.48

-
-
-
-

Types and Values

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Byte-Arrays.html b/docs/reference/glib/html/glib-Byte-Arrays.html deleted file mode 100644 index b381e6f50..000000000 --- a/docs/reference/glib/html/glib-Byte-Arrays.html +++ /dev/null @@ -1,1499 +0,0 @@ - - - - -Byte Arrays: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Byte Arrays

-

Byte Arrays — arrays of bytes

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GByteArray * - -g_byte_array_new () -
-GByteArray * - -g_byte_array_new_take () -
-GByteArray * - -g_byte_array_sized_new () -
-GByteArray * - -g_byte_array_ref () -
-void - -g_byte_array_unref () -
-GByteArray * - -g_byte_array_append () -
-GByteArray * - -g_byte_array_prepend () -
-GByteArray * - -g_byte_array_remove_index () -
-GByteArray * - -g_byte_array_remove_index_fast () -
-GByteArray * - -g_byte_array_remove_range () -
-void - -g_byte_array_sort () -
-void - -g_byte_array_sort_with_data () -
-GByteArray * - -g_byte_array_set_size () -
-guint8 * - -g_byte_array_free () -
-GBytes * - -g_byte_array_free_to_bytes () -
-GBytes * - -g_bytes_new () -
-GBytes * - -g_bytes_new_take () -
-GBytes * - -g_bytes_new_static () -
-GBytes * - -g_bytes_new_with_free_func () -
-GBytes * - -g_bytes_new_from_bytes () -
-gconstpointer - -g_bytes_get_data () -
-gsize - -g_bytes_get_size () -
-guint - -g_bytes_hash () -
-gboolean - -g_bytes_equal () -
-gint - -g_bytes_compare () -
-GBytes * - -g_bytes_ref () -
-void - -g_bytes_unref () -
-gpointer - -g_bytes_unref_to_data () -
-GByteArray * - -g_bytes_unref_to_array () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
structGByteArray
 GBytes
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GByteArray is a mutable array of bytes based on GArray, to provide arrays -of bytes which grow automatically as elements are added.

-

To create a new GByteArray use g_byte_array_new(). To add elements to a -GByteArray, use g_byte_array_append(), and g_byte_array_prepend().

-

To set the size of a GByteArray, use g_byte_array_set_size().

-

To free a GByteArray, use g_byte_array_free().

-

An example for using a GByteArray:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
GByteArray *gbarray;
-gint i;
-
-gbarray = g_byte_array_new ();
-for (i = 0; i < 10000; i++)
-  g_byte_array_append (gbarray, (guint8*) "abcd", 4);
-
-for (i = 0; i < 10000; i++)
-  {
-    g_assert (gbarray->data[4*i] == 'a');
-    g_assert (gbarray->data[4*i+1] == 'b');
-    g_assert (gbarray->data[4*i+2] == 'c');
-    g_assert (gbarray->data[4*i+3] == 'd');
-  }
-
-g_byte_array_free (gbarray, TRUE);
-
- -

-

See GBytes if you are interested in an immutable object representing a -sequence of bytes.

-
-
-

Functions

-
-

g_byte_array_new ()

-
GByteArray *
-g_byte_array_new (void);
-

Creates a new GByteArray with a reference count of 1.

-
-

Returns

-

the new GByteArray.

-

[transfer full]

-
-
-
-
-

g_byte_array_new_take ()

-
GByteArray *
-g_byte_array_new_take (guint8 *data,
-                       gsize len);
-

Create byte array containing the data. The data will be owned by the array -and will be freed with g_free(), i.e. it could be allocated using g_strdup().

-
-

Parameters

-
----- - - - - - - - - - - - - -

data

byte data for the array.

[transfer full][array length=len]

len

length of data -

 
-
-
-

Returns

-

a new GByteArray.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_byte_array_sized_new ()

-
GByteArray *
-g_byte_array_sized_new (guint reserved_size);
-

Creates a new GByteArray with reserved_size - bytes preallocated. -This avoids frequent reallocation, if you are going to add many -bytes to the array. Note however that the size of the array is still -0.

-
-

Parameters

-
----- - - - - - -

reserved_size

number of bytes preallocated

 
-
-
-

Returns

-

the new GByteArray

-
-
-
-
-

g_byte_array_ref ()

-
GByteArray *
-g_byte_array_ref (GByteArray *array);
-

Atomically increments the reference count of array - by one. -This function is thread-safe and may be called from any thread.

-
-

Parameters

-
----- - - - - - -

array

A GByteArray

 
-
-
-

Returns

-

The passed in GByteArray

-
-

Since: 2.22

-
-
-
-

g_byte_array_unref ()

-
void
-g_byte_array_unref (GByteArray *array);
-

Atomically decrements the reference count of array - by one. If the -reference count drops to 0, all memory allocated by the array is -released. This function is thread-safe and may be called from any -thread.

-
-

Parameters

-
----- - - - - - -

array

A GByteArray

 
-
-

Since: 2.22

-
-
-
-

g_byte_array_append ()

-
GByteArray *
-g_byte_array_append (GByteArray *array,
-                     const guint8 *data,
-                     guint len);
-

Adds the given bytes to the end of the GByteArray. -The array will grow in size automatically if necessary.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

array

a GByteArray

 

data

the byte data to be added

 

len

the number of bytes to add

 
-
-
-

Returns

-

the GByteArray

-
-
-
-
-

g_byte_array_prepend ()

-
GByteArray *
-g_byte_array_prepend (GByteArray *array,
-                      const guint8 *data,
-                      guint len);
-

Adds the given data to the start of the GByteArray. -The array will grow in size automatically if necessary.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

array

a GByteArray

 

data

the byte data to be added

 

len

the number of bytes to add

 
-
-
-

Returns

-

the GByteArray

-
-
-
-
-

g_byte_array_remove_index ()

-
GByteArray *
-g_byte_array_remove_index (GByteArray *array,
-                           guint index_);
-

Removes the byte at the given index from a GByteArray. -The following bytes are moved down one place.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GByteArray

 

index_

the index of the byte to remove

 
-
-
-

Returns

-

the GByteArray

-
-
-
-
-

g_byte_array_remove_index_fast ()

-
GByteArray *
-g_byte_array_remove_index_fast (GByteArray *array,
-                                guint index_);
-

Removes the byte at the given index from a GByteArray. The last -element in the array is used to fill in the space, so this function -does not preserve the order of the GByteArray. But it is faster -than g_byte_array_remove_index().

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GByteArray

 

index_

the index of the byte to remove

 
-
-
-

Returns

-

the GByteArray

-
-
-
-
-

g_byte_array_remove_range ()

-
GByteArray *
-g_byte_array_remove_range (GByteArray *array,
-                           guint index_,
-                           guint length);
-

Removes the given number of bytes starting at the given index from a -GByteArray. The following elements are moved to close the gap.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

array

a GByteArray -

 

index_

the index of the first byte to remove

 

length

the number of bytes to remove

 
-
-
-

Returns

-

the GByteArray

-
-

Since: 2.4

-
-
-
-

g_byte_array_sort ()

-
void
-g_byte_array_sort (GByteArray *array,
-                   GCompareFunc compare_func);
-

Sorts a byte array, using compare_func - which should be a -qsort()-style comparison function (returns less than zero for first -arg is less than second arg, zero for equal, greater than zero if -first arg is greater than second arg).

-

If two array elements compare equal, their order in the sorted array -is undefined. If you want equal elements to keep their order (i.e. -you want a stable sort) you can write a comparison function that, -if two elements would otherwise compare equal, compares them by -their addresses.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GByteArray

 

compare_func

comparison function

 
-
-
-
-
-

g_byte_array_sort_with_data ()

-
void
-g_byte_array_sort_with_data (GByteArray *array,
-                             GCompareDataFunc compare_func,
-                             gpointer user_data);
-

Like g_byte_array_sort(), but the comparison function takes an extra -user data argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

array

a GByteArray

 

compare_func

comparison function

 

user_data

data to pass to compare_func -

 
-
-
-
-
-

g_byte_array_set_size ()

-
GByteArray *
-g_byte_array_set_size (GByteArray *array,
-                       guint length);
-

Sets the size of the GByteArray, expanding it if necessary.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GByteArray

 

length

the new size of the GByteArray

 
-
-
-

Returns

-

the GByteArray

-
-
-
-
-

g_byte_array_free ()

-
guint8 *
-g_byte_array_free (GByteArray *array,
-                   gboolean free_segment);
-

Frees the memory allocated by the GByteArray. If free_segment - is -TRUE it frees the actual byte data. If the reference count of -array - is greater than one, the GByteArray wrapper is preserved but -the size of array - will be set to zero.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GByteArray

 

free_segment

if TRUE the actual byte data is freed as well

 
-
-
-

Returns

-

the element data if free_segment -is FALSE, otherwise -NULL. The element data should be freed using g_free().

-
-
-
-
-

g_byte_array_free_to_bytes ()

-
GBytes *
-g_byte_array_free_to_bytes (GByteArray *array);
-

Transfers the data from the GByteArray into a new immutable GBytes.

-

The GByteArray is freed unless the reference count of array - is greater -than one, the GByteArray wrapper is preserved but the size of array - -will be set to zero.

-

This is identical to using g_bytes_new_take() and g_byte_array_free() -together.

-
-

Parameters

-
----- - - - - - -

array

a GByteArray.

[transfer full]
-
-
-

Returns

-

a new immutable GBytes representing same -byte data that was in the array.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_bytes_new ()

-
GBytes *
-g_bytes_new (gconstpointer data,
-             gsize size);
-

Creates a new GBytes from data -.

-

data - is copied. If size - is 0, data - may be NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

data

the data to be used for the bytes.

[transfer none][array length=size][element-type guint8][nullable]

size

the size of data -

 
-
-
-

Returns

-

a new GBytes.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_bytes_new_take ()

-
GBytes *
-g_bytes_new_take (gpointer data,
-                  gsize size);
-

Creates a new GBytes from data -.

-

After this call, data - belongs to the bytes and may no longer be -modified by the caller. g_free() will be called on data - when the -bytes is no longer in use. Because of this data - must have been created by -a call to g_malloc(), g_malloc0() or g_realloc() or by one of the many -functions that wrap these calls (such as g_new(), g_strdup(), etc).

-

For creating GBytes with memory from other allocators, see -g_bytes_new_with_free_func().

-

data - may be NULL if size - is 0.

-
-

Parameters

-
----- - - - - - - - - - - - - -

data

the data to be used for the bytes.

[transfer full][array length=size][element-type guint8][nullable]

size

the size of data -

 
-
-
-

Returns

-

a new GBytes.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_bytes_new_static ()

-
GBytes *
-g_bytes_new_static (gconstpointer data,
-                    gsize size);
-

Creates a new GBytes from static data.

-

data - must be static (ie: never modified or freed). It may be NULL if size - -is 0.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

data

the data to be used for the bytes.

[transfer full][array length=size][element-type guint8][nullable]

size

the size of data -

 
-
-
-

Returns

-

a new GBytes.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_bytes_new_with_free_func ()

-
GBytes *
-g_bytes_new_with_free_func (gconstpointer data,
-                            gsize size,
-                            GDestroyNotify free_func,
-                            gpointer user_data);
-

Creates a GBytes from data -.

-

When the last reference is dropped, free_func - will be called with the -user_data - argument.

-

data - must not be modified after this call is made until free_func - has -been called to indicate that the bytes is no longer in use.

-

data - may be NULL if size - is 0.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

data

the data to be used for the bytes.

[array length=size][element-type guint8][nullable]

size

the size of data -

 

free_func

the function to call to release the data

 

user_data

data to pass to free_func -

 
-
-
-

Returns

-

a new GBytes.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_bytes_new_from_bytes ()

-
GBytes *
-g_bytes_new_from_bytes (GBytes *bytes,
-                        gsize offset,
-                        gsize length);
-

Creates a GBytes which is a subsection of another GBytes. The offset - + -length - may not be longer than the size of bytes -.

-

A reference to bytes - will be held by the newly created GBytes until -the byte data is no longer needed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

bytes

a GBytes

 

offset

offset which subsection starts at

 

length

length of subsection

 
-
-
-

Returns

-

a new GBytes.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_bytes_get_data ()

-
gconstpointer
-g_bytes_get_data (GBytes *bytes,
-                  gsize *size);
-

Get the byte data in the GBytes. This data should not be modified.

-

This function will always return the same pointer for a given GBytes.

-

NULL may be returned if size - is 0. This is not guaranteed, as the GBytes -may represent an empty string with data - non-NULL and size - as 0. NULL will -not be returned if size - is non-zero.

-
-

Parameters

-
----- - - - - - - - - - - - - -

bytes

a GBytes

 

size

location to return size of byte data.

[out][optional]
-
-
-

Returns

-

a pointer to the byte data, or NULL.

-

[transfer none][array length=size][element-type guint8][nullable]

-
-

Since: 2.32

-
-
-
-

g_bytes_get_size ()

-
gsize
-g_bytes_get_size (GBytes *bytes);
-

Get the size of the byte data in the GBytes.

-

This function will always return the same value for a given GBytes.

-
-

Parameters

-
----- - - - - - -

bytes

a GBytes

 
-
-
-

Returns

-

the size

-
-

Since: 2.32

-
-
-
-

g_bytes_hash ()

-
guint
-g_bytes_hash (gconstpointer bytes);
-

Creates an integer hash code for the byte data in the GBytes.

-

This function can be passed to g_hash_table_new() as the key_hash_func - -parameter, when using non-NULL GBytes pointers as keys in a GHashTable.

-
-

Parameters

-
----- - - - - - -

bytes

a pointer to a GBytes key.

[type GLib.Bytes]
-
-
-

Returns

-

a hash value corresponding to the key.

-
-

Since: 2.32

-
-
-
-

g_bytes_equal ()

-
gboolean
-g_bytes_equal (gconstpointer bytes1,
-               gconstpointer bytes2);
-

Compares the two GBytes values being pointed to and returns -TRUE if they are equal.

-

This function can be passed to g_hash_table_new() as the key_equal_func - -parameter, when using non-NULL GBytes pointers as keys in a GHashTable.

-
-

Parameters

-
----- - - - - - - - - - - - - -

bytes1

a pointer to a GBytes.

[type GLib.Bytes]

bytes2

a pointer to a GBytes to compare with bytes1 -.

[type GLib.Bytes]
-
-
-

Returns

-

TRUE if the two keys match.

-
-

Since: 2.32

-
-
-
-

g_bytes_compare ()

-
gint
-g_bytes_compare (gconstpointer bytes1,
-                 gconstpointer bytes2);
-

Compares the two GBytes values.

-

This function can be used to sort GBytes instances in lexographical order.

-
-

Parameters

-
----- - - - - - - - - - - - - -

bytes1

a pointer to a GBytes.

[type GLib.Bytes]

bytes2

a pointer to a GBytes to compare with bytes1 -.

[type GLib.Bytes]
-
-
-

Returns

-

a negative value if bytes2 is lesser, a positive value if bytes2 is -greater, and zero if bytes2 is equal to bytes1

-
-

Since: 2.32

-
-
-
-

g_bytes_ref ()

-
GBytes *
-g_bytes_ref (GBytes *bytes);
-

Increase the reference count on bytes -.

-
-

Parameters

-
----- - - - - - -

bytes

a GBytes

 
-
-
-

Returns

-

the GBytes

-
-

Since: 2.32

-
-
-
-

g_bytes_unref ()

-
void
-g_bytes_unref (GBytes *bytes);
-

Releases a reference on bytes -. This may result in the bytes being -freed.

-
-

Parameters

-
----- - - - - - -

bytes

a GBytes.

[nullable]
-
-

Since: 2.32

-
-
-
-

g_bytes_unref_to_data ()

-
gpointer
-g_bytes_unref_to_data (GBytes *bytes,
-                       gsize *size);
-

Unreferences the bytes, and returns a pointer the same byte data -contents.

-

As an optimization, the byte data is returned without copying if this was -the last reference to bytes and bytes was created with g_bytes_new(), -g_bytes_new_take() or g_byte_array_free_to_bytes(). In all other cases the -data is copied.

-
-

Parameters

-
----- - - - - - - - - - - - - -

bytes

a GBytes.

[transfer full]

size

location to place the length of the returned data.

[out]
-
-
-

Returns

-

(transfer full) (array length=size) (element-type guint8) -(not nullable): a pointer to the same byte data, which should be -freed with g_free()

-
-

Since: 2.32

-
-
-
-

g_bytes_unref_to_array ()

-
GByteArray *
-g_bytes_unref_to_array (GBytes *bytes);
-

Unreferences the bytes, and returns a new mutable GByteArray containing -the same byte data.

-

As an optimization, the byte data is transferred to the array without copying -if this was the last reference to bytes and bytes was created with -g_bytes_new(), g_bytes_new_take() or g_byte_array_free_to_bytes(). In all -other cases the data is copied.

-
-

Parameters

-
----- - - - - - -

bytes

a GBytes.

[transfer full]
-
-
-

Returns

-

a new mutable GByteArray containing the same byte data.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

struct GByteArray

-
struct GByteArray {
-  guint8 *data;
-  guint	  len;
-};
-
-

Contains the public fields of a GByteArray.

-
-

Members

-
----- - - - - - - - - - - - - -

guint8 *data;

a pointer to the element data. The data may be moved as -elements are added to the GByteArray

 

guint len;

the number of elements in the GByteArray

 
-
-
-
-
-

GBytes

-
typedef struct _GBytes GBytes;
-

A simple refcounted data type representing an immutable sequence of zero or -more bytes from an unspecified origin.

-

The purpose of a GBytes is to keep the memory region that it holds -alive for as long as anyone holds a reference to the bytes. When -the last reference count is dropped, the memory is released. Multiple -unrelated callers can use byte data in the GBytes without coordinating -their activities, resting assured that the byte data will not change or -move while they hold a reference.

-

A GBytes can come from many different origins that may have -different procedures for freeing the memory region. Examples are -memory from g_malloc(), from memory slices, from a GMappedFile or -memory from other allocators.

-

GBytes work well as keys in GHashTable. Use g_bytes_equal() and -g_bytes_hash() as parameters to g_hash_table_new() or g_hash_table_new_full(). -GBytes can also be used as keys in a GTree by passing the g_bytes_compare() -function to g_tree_new().

-

The data pointed to by this bytes must not be modified. For a mutable -array of bytes see GByteArray. Use g_bytes_unref_to_array() to create a -mutable array for a GBytes sequence. To create an immutable GBytes from -a mutable GByteArray, use the g_byte_array_free_to_bytes() function.

-

Since: 2.32

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Byte-Order-Macros.html b/docs/reference/glib/html/glib-Byte-Order-Macros.html deleted file mode 100644 index dcd3b3856..000000000 --- a/docs/reference/glib/html/glib-Byte-Order-Macros.html +++ /dev/null @@ -1,2092 +0,0 @@ - - - - -Byte Order Macros: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Byte Order Macros

-

Byte Order Macros — a portable way to convert between different byte orders

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -g_htonl() -
#define -g_htons() -
#define -g_ntohl() -
#define -g_ntohs() -
#define -GINT_FROM_BE() -
#define -GINT_FROM_LE() -
#define -GINT_TO_BE() -
#define -GINT_TO_LE() -
#define -GUINT_FROM_BE() -
#define -GUINT_FROM_LE() -
#define -GUINT_TO_BE() -
#define -GUINT_TO_LE() -
#define -GLONG_FROM_BE() -
#define -GLONG_FROM_LE() -
#define -GLONG_TO_BE() -
#define -GLONG_TO_LE() -
#define -GULONG_FROM_BE() -
#define -GULONG_FROM_LE() -
#define -GULONG_TO_BE() -
#define -GULONG_TO_LE() -
#define -GSIZE_FROM_BE() -
#define -GSIZE_FROM_LE() -
#define -GSIZE_TO_BE() -
#define -GSIZE_TO_LE() -
#define -GSSIZE_FROM_BE() -
#define -GSSIZE_FROM_LE() -
#define -GSSIZE_TO_BE() -
#define -GSSIZE_TO_LE() -
#define -GINT16_FROM_BE() -
#define -GINT16_FROM_LE() -
#define -GINT16_TO_BE() -
#define -GINT16_TO_LE() -
#define -GUINT16_FROM_BE() -
#define -GUINT16_FROM_LE() -
#define -GUINT16_TO_BE() -
#define -GUINT16_TO_LE() -
#define -GINT32_FROM_BE() -
#define -GINT32_FROM_LE() -
#define -GINT32_TO_BE() -
#define -GINT32_TO_LE() -
#define -GUINT32_FROM_BE() -
#define -GUINT32_FROM_LE() -
#define -GUINT32_TO_BE() -
#define -GUINT32_TO_LE() -
#define -GINT64_FROM_BE() -
#define -GINT64_FROM_LE() -
#define -GINT64_TO_BE() -
#define -GINT64_TO_LE() -
#define -GUINT64_FROM_BE() -
#define -GUINT64_FROM_LE() -
#define -GUINT64_TO_BE() -
#define -GUINT64_TO_LE() -
#define -GUINT16_SWAP_BE_PDP() -
#define -GUINT16_SWAP_LE_BE() -
#define -GUINT16_SWAP_LE_PDP() -
#define -GUINT32_SWAP_BE_PDP() -
#define -GUINT32_SWAP_LE_BE() -
#define -GUINT32_SWAP_LE_PDP() -
#define -GUINT64_SWAP_LE_BE() -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
#defineG_BYTE_ORDER
#defineG_LITTLE_ENDIAN
#defineG_BIG_ENDIAN
#defineG_PDP_ENDIAN
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

These macros provide a portable way to determine the host byte order -and to convert values between different byte orders.

-

The byte order is the order in which bytes are stored to create larger -data types such as the gint and glong values. -The host byte order is the byte order used on the current machine.

-

Some processors store the most significant bytes (i.e. the bytes that -hold the largest part of the value) first. These are known as big-endian -processors. Other processors (notably the x86 family) store the most -significant byte last. These are known as little-endian processors.

-

Finally, to complicate matters, some other processors store the bytes in -a rather curious order known as PDP-endian. For a 4-byte word, the 3rd -most significant byte is stored first, then the 4th, then the 1st and -finally the 2nd.

-

Obviously there is a problem when these different processors communicate -with each other, for example over networks or by using binary file formats. -This is where these macros come in. They are typically used to convert -values into a byte order which has been agreed on for use when -communicating between different processors. The Internet uses what is -known as 'network byte order' as the standard byte order (which is in -fact the big-endian byte order).

-

Note that the byte order conversion macros may evaluate their arguments -multiple times, thus you should not use them with arguments which have -side-effects.

-
-
-

Functions

-
-

g_htonl()

-
#define             g_htonl(val)
-

Converts a 32-bit integer value from host to network byte order.

-
-

Parameters

-
----- - - - - - -

val

a 32-bit integer value in host byte order

 
-
-
-

Returns

-

val -converted to network byte order

-
-
-
-
-

g_htons()

-
#define             g_htons(val)
-

Converts a 16-bit integer value from host to network byte order.

-
-

Parameters

-
----- - - - - - -

val

a 16-bit integer value in host byte order

 
-
-
-

Returns

-

val -converted to network byte order

-
-
-
-
-

g_ntohl()

-
#define             g_ntohl(val)
-

Converts a 32-bit integer value from network to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a 32-bit integer value in network byte order

 
-
-
-

Returns

-

val -converted to host byte order.

-
-
-
-
-

g_ntohs()

-
#define             g_ntohs(val)
-

Converts a 16-bit integer value from network to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a 16-bit integer value in network byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GINT_FROM_BE()

-
#define GINT_FROM_BE(val) (GINT_TO_BE (val))
-
-

Converts a gint value from big-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a gint value in big-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GINT_FROM_LE()

-
#define GINT_FROM_LE(val) (GINT_TO_LE (val))
-
-

Converts a gint value from little-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a gint value in little-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GINT_TO_BE()

-
#define GINT_TO_BE(val)		((gint) GINT32_TO_BE (val))
-
-

Converts a gint value from host byte order to big-endian.

-
-

Parameters

-
----- - - - - - -

val

a gint value in host byte order

 
-
-
-

Returns

-

val -converted to big-endian byte order

-
-
-
-
-

GINT_TO_LE()

-
#define GINT_TO_LE(val)		((gint) GINT32_TO_LE (val))
-
-

Converts a gint value from host byte order to little-endian.

-
-

Parameters

-
----- - - - - - -

val

a gint value in host byte order

 
-
-
-

Returns

-

val -converted to little-endian byte order

-
-
-
-
-

GUINT_FROM_BE()

-
#define GUINT_FROM_BE(val) (GUINT_TO_BE (val))
-
-

Converts a guint value from big-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a guint value in big-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GUINT_FROM_LE()

-
#define GUINT_FROM_LE(val) (GUINT_TO_LE (val))
-
-

Converts a guint value from little-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a guint value in little-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GUINT_TO_BE()

-
#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val))
-
-

Converts a guint value from host byte order to big-endian.

-
-

Parameters

-
----- - - - - - -

val

a guint value in host byte order

 
-
-
-

Returns

-

val -converted to big-endian byte order

-
-
-
-
-

GUINT_TO_LE()

-
#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val))
-
-

Converts a guint value from host byte order to little-endian.

-
-

Parameters

-
----- - - - - - -

val

a guint value in host byte order

 
-
-
-

Returns

-

val -converted to little-endian byte order.

-
-
-
-
-

GLONG_FROM_BE()

-
#define GLONG_FROM_BE(val) (GLONG_TO_BE (val))
-
-

Converts a glong value from big-endian to the host byte order.

-
-

Parameters

-
----- - - - - - -

val

a glong value in big-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GLONG_FROM_LE()

-
#define GLONG_FROM_LE(val) (GLONG_TO_LE (val))
-
-

Converts a glong value from little-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a glong value in little-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GLONG_TO_BE()

-
#define GLONG_TO_BE(val) ((glong) GINT64_TO_BE (val))
-
-

Converts a glong value from host byte order to big-endian.

-
-

Parameters

-
----- - - - - - -

val

a glong value in host byte order

 
-
-
-

Returns

-

val -converted to big-endian byte order

-
-
-
-
-

GLONG_TO_LE()

-
#define GLONG_TO_LE(val) ((glong) GINT64_TO_LE (val))
-
-

Converts a glong value from host byte order to little-endian.

-
-

Parameters

-
----- - - - - - -

val

a glong value in host byte order

 
-
-
-

Returns

-

val -converted to little-endian

-
-
-
-
-

GULONG_FROM_BE()

-
#define GULONG_FROM_BE(val) (GULONG_TO_BE (val))
-
-

Converts a gulong value from big-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a gulong value in big-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GULONG_FROM_LE()

-
#define GULONG_FROM_LE(val) (GULONG_TO_LE (val))
-
-

Converts a gulong value from little-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a gulong value in little-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GULONG_TO_BE()

-
#define GULONG_TO_BE(val) ((gulong) GUINT64_TO_BE (val))
-
-

Converts a gulong value from host byte order to big-endian.

-
-

Parameters

-
----- - - - - - -

val

a gulong value in host byte order

 
-
-
-

Returns

-

val -converted to big-endian

-
-
-
-
-

GULONG_TO_LE()

-
#define GULONG_TO_LE(val) ((gulong) GUINT64_TO_LE (val))
-
-

Converts a gulong value from host byte order to little-endian.

-
-

Parameters

-
----- - - - - - -

val

a gulong value in host byte order

 
-
-
-

Returns

-

val -converted to little-endian

-
-
-
-
-

GSIZE_FROM_BE()

-
#define GSIZE_FROM_BE(val) (GSIZE_TO_BE (val))
-
-

Converts a gsize value from big-endian to the host byte order.

-
-

Parameters

-
----- - - - - - -

val

a gsize value in big-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GSIZE_FROM_LE()

-
#define GSIZE_FROM_LE(val) (GSIZE_TO_LE (val))
-
-

Converts a gsize value from little-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a gsize value in little-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GSIZE_TO_BE()

-
#define GSIZE_TO_BE(val) ((gsize) GUINT64_TO_BE (val))
-
-

Converts a gsize value from host byte order to big-endian.

-
-

Parameters

-
----- - - - - - -

val

a gsize value in host byte order

 
-
-
-

Returns

-

val -converted to big-endian byte order

-
-
-
-
-

GSIZE_TO_LE()

-
#define GSIZE_TO_LE(val) ((gsize) GUINT64_TO_LE (val))
-
-

Converts a gsize value from host byte order to little-endian.

-
-

Parameters

-
----- - - - - - -

val

a gsize value in host byte order

 
-
-
-

Returns

-

val -converted to little-endian

-
-
-
-
-

GSSIZE_FROM_BE()

-
#define GSSIZE_FROM_BE(val) (GSSIZE_TO_BE (val))
-
-

Converts a gssize value from big-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a gssize value in big-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GSSIZE_FROM_LE()

-
#define GSSIZE_FROM_LE(val) (GSSIZE_TO_LE (val))
-
-

Converts a gssize value from little-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a gssize value in little-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GSSIZE_TO_BE()

-
#define GSSIZE_TO_BE(val) ((gssize) GINT64_TO_BE (val))
-
-

Converts a gssize value from host byte order to big-endian.

-
-

Parameters

-
----- - - - - - -

val

a gssize value in host byte order

 
-
-
-

Returns

-

val -converted to big-endian

-
-
-
-
-

GSSIZE_TO_LE()

-
#define GSSIZE_TO_LE(val) ((gssize) GINT64_TO_LE (val))
-
-

Converts a gssize value from host byte order to little-endian.

-
-

Parameters

-
----- - - - - - -

val

a gssize value in host byte order

 
-
-
-

Returns

-

val -converted to little-endian

-
-
-
-
-

GINT16_FROM_BE()

-
#define GINT16_FROM_BE(val) (GINT16_TO_BE (val))
-
-

Converts a gint16 value from big-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a gint16 value in big-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GINT16_FROM_LE()

-
#define GINT16_FROM_LE(val) (GINT16_TO_LE (val))
-
-

Converts a gint16 value from little-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a gint16 value in little-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GINT16_TO_BE()

-
#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val))
-
-

Converts a gint16 value from host byte order to big-endian.

-
-

Parameters

-
----- - - - - - -

val

a gint16 value in host byte order

 
-
-
-

Returns

-

val -converted to big-endian

-
-
-
-
-

GINT16_TO_LE()

-
#define GINT16_TO_LE(val) ((gint16) (val))
-
-

Converts a gint16 value from host byte order to little-endian.

-
-

Parameters

-
----- - - - - - -

val

a gint16 value in host byte order

 
-
-
-

Returns

-

val -converted to little-endian

-
-
-
-
-

GUINT16_FROM_BE()

-
#define GUINT16_FROM_BE(val) (GUINT16_TO_BE (val))
-
-

Converts a guint16 value from big-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a guint16 value in big-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GUINT16_FROM_LE()

-
#define GUINT16_FROM_LE(val) (GUINT16_TO_LE (val))
-
-

Converts a guint16 value from little-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a guint16 value in little-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GUINT16_TO_BE()

-
#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
-
-

Converts a guint16 value from host byte order to big-endian.

-
-

Parameters

-
----- - - - - - -

val

a guint16 value in host byte order

 
-
-
-

Returns

-

val -converted to big-endian

-
-
-
-
-

GUINT16_TO_LE()

-
#define GUINT16_TO_LE(val) ((guint16) (val))
-
-

Converts a guint16 value from host byte order to little-endian.

-
-

Parameters

-
----- - - - - - -

val

a guint16 value in host byte order

 
-
-
-

Returns

-

val -converted to little-endian

-
-
-
-
-

GINT32_FROM_BE()

-
#define GINT32_FROM_BE(val) (GINT32_TO_BE (val))
-
-

Converts a gint32 value from big-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a gint32 value in big-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GINT32_FROM_LE()

-
#define GINT32_FROM_LE(val) (GINT32_TO_LE (val))
-
-

Converts a gint32 value from little-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a gint32 value in little-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GINT32_TO_BE()

-
#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val))
-
-

Converts a gint32 value from host byte order to big-endian.

-
-

Parameters

-
----- - - - - - -

val

a gint32 value in host byte order

 
-
-
-

Returns

-

val -converted to big-endian

-
-
-
-
-

GINT32_TO_LE()

-
#define GINT32_TO_LE(val) ((gint32) (val))
-
-

Converts a gint32 value from host byte order to little-endian.

-
-

Parameters

-
----- - - - - - -

val

a gint32 value in host byte order

 
-
-
-

Returns

-

val -converted to little-endian

-
-
-
-
-

GUINT32_FROM_BE()

-
#define GUINT32_FROM_BE(val) (GUINT32_TO_BE (val))
-
-

Converts a guint32 value from big-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a guint32 value in big-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GUINT32_FROM_LE()

-
#define GUINT32_FROM_LE(val) (GUINT32_TO_LE (val))
-
-

Converts a guint32 value from little-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a guint32 value in little-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GUINT32_TO_BE()

-
#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val))
-
-

Converts a guint32 value from host byte order to big-endian.

-
-

Parameters

-
----- - - - - - -

val

a guint32 value in host byte order

 
-
-
-

Returns

-

val -converted to big-endian

-
-
-
-
-

GUINT32_TO_LE()

-
#define GUINT32_TO_LE(val) ((guint32) (val))
-
-

Converts a guint32 value from host byte order to little-endian.

-
-

Parameters

-
----- - - - - - -

val

a guint32 value in host byte order

 
-
-
-

Returns

-

val -converted to little-endian

-
-
-
-
-

GINT64_FROM_BE()

-
#define GINT64_FROM_BE(val) (GINT64_TO_BE (val))
-
-

Converts a gint64 value from big-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a gint64 value in big-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GINT64_FROM_LE()

-
#define GINT64_FROM_LE(val) (GINT64_TO_LE (val))
-
-

Converts a gint64 value from little-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a gint64 value in little-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GINT64_TO_BE()

-
#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val))
-
-

Converts a gint64 value from host byte order to big-endian.

-
-

Parameters

-
----- - - - - - -

val

a gint64 value in host byte order

 
-
-
-

Returns

-

val -converted to big-endian

-
-
-
-
-

GINT64_TO_LE()

-
#define GINT64_TO_LE(val) ((gint64) (val))
-
-

Converts a gint64 value from host byte order to little-endian.

-
-

Parameters

-
----- - - - - - -

val

a gint64 value in host byte order

 
-
-
-

Returns

-

val -converted to little-endian

-
-
-
-
-

GUINT64_FROM_BE()

-
#define GUINT64_FROM_BE(val) (GUINT64_TO_BE (val))
-
-

Converts a guint64 value from big-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a guint64 value in big-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GUINT64_FROM_LE()

-
#define GUINT64_FROM_LE(val) (GUINT64_TO_LE (val))
-
-

Converts a guint64 value from little-endian to host byte order.

-
-

Parameters

-
----- - - - - - -

val

a guint64 value in little-endian byte order

 
-
-
-

Returns

-

val -converted to host byte order

-
-
-
-
-

GUINT64_TO_BE()

-
#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val))
-
-

Converts a guint64 value from host byte order to big-endian.

-
-

Parameters

-
----- - - - - - -

val

a guint64 value in host byte order

 
-
-
-

Returns

-

val -converted to big-endian

-
-
-
-
-

GUINT64_TO_LE()

-
#define GUINT64_TO_LE(val) ((guint64) (val))
-
-

Converts a guint64 value from host byte order to little-endian.

-
-

Parameters

-
----- - - - - - -

val

a guint64 value in host byte order

 
-
-
-

Returns

-

val -converted to little-endian

-
-
-
-
-

GUINT16_SWAP_BE_PDP()

-
#define GUINT16_SWAP_BE_PDP(val) (GUINT16_SWAP_LE_BE (val))
-
-

Converts a guint16 value between big-endian and pdp-endian byte order. -The conversion is symmetric so it can be used both ways.

-
-

Parameters

-
----- - - - - - -

val

a guint16 value in big-endian or pdp-endian byte order

 
-
-
-

Returns

-

val -converted to the opposite byte order

-
-
-
-
-

GUINT16_SWAP_LE_BE()

-
#    define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_IA32 (val))
-
-

Converts a guint16 value between little-endian and big-endian byte order. -The conversion is symmetric so it can be used both ways.

-
-

Parameters

-
----- - - - - - -

val

a guint16 value in little-endian or big-endian byte order

 
-
-
-

Returns

-

val -converted to the opposite byte order

-
-
-
-
-

GUINT16_SWAP_LE_PDP()

-
#define GUINT16_SWAP_LE_PDP(val) ((guint16) (val))
-
-

Converts a guint16 value between little-endian and pdp-endian byte order. -The conversion is symmetric so it can be used both ways.

-
-

Parameters

-
----- - - - - - -

val

a guint16 value in little-endian or pdp-endian byte order

 
-
-
-

Returns

-

val -converted to the opposite byte order

-
-
-
-
-

GUINT32_SWAP_BE_PDP()

-
#define             GUINT32_SWAP_BE_PDP(val)
-

Converts a guint32 value between big-endian and pdp-endian byte order. -The conversion is symmetric so it can be used both ways.

-
-

Parameters

-
----- - - - - - -

val

a guint32 value in big-endian or pdp-endian byte order

 
-
-
-

Returns

-

val -converted to the opposite byte order

-
-
-
-
-

GUINT32_SWAP_LE_BE()

-
#    define GUINT32_SWAP_LE_BE(val) ((guint32) __builtin_bswap32 ((gint32) (val)))
-
-

Converts a guint32 value between little-endian and big-endian byte order. -The conversion is symmetric so it can be used both ways.

-
-

Parameters

-
----- - - - - - -

val

a guint32 value in little-endian or big-endian byte order

 
-
-
-

Returns

-

val -converted to the opposite byte order

-
-
-
-
-

GUINT32_SWAP_LE_PDP()

-
#define             GUINT32_SWAP_LE_PDP(val)
-

Converts a guint32 value between little-endian and pdp-endian byte order. -The conversion is symmetric so it can be used both ways.

-
-

Parameters

-
----- - - - - - -

val

a guint32 value in little-endian or pdp-endian byte order

 
-
-
-

Returns

-

val -converted to the opposite byte order

-
-
-
-
-

GUINT64_SWAP_LE_BE()

-
#    define GUINT64_SWAP_LE_BE(val) ((guint64) __builtin_bswap64 ((gint64) (val)))
-
-

Converts a guint64 value between little-endian and big-endian byte order. -The conversion is symmetric so it can be used both ways.

-
-

Parameters

-
----- - - - - - -

val

a guint64 value in little-endian or big-endian byte order

 
-
-
-

Returns

-

val -converted to the opposite byte order

-
-
-
-
-

Types and Values

-
-

G_BYTE_ORDER

-
#define G_BYTE_ORDER G_LITTLE_ENDIAN
-
-

The host byte order. -This can be either G_LITTLE_ENDIAN or G_BIG_ENDIAN (support for -G_PDP_ENDIAN may be added in future.)

-
-
-
-

G_LITTLE_ENDIAN

-
#define G_LITTLE_ENDIAN 1234
-
-

Specifies one of the possible types of byte order. -See G_BYTE_ORDER.

-
-
-
-

G_BIG_ENDIAN

-
#define G_BIG_ENDIAN    4321
-
-

Specifies one of the possible types of byte order. -See G_BYTE_ORDER.

-
-
-
-

G_PDP_ENDIAN

-
#define G_PDP_ENDIAN    3412		/* unused, need specific PDP check */	
-
-

Specifies one of the possible types of byte order -(currently unused). See G_BYTE_ORDER.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Caches.html b/docs/reference/glib/html/glib-Caches.html deleted file mode 100644 index 4d3b59466..000000000 --- a/docs/reference/glib/html/glib-Caches.html +++ /dev/null @@ -1,535 +0,0 @@ - - - - -Caches: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Caches

-

Caches — caches allow sharing of complex data structures - to save resources

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GCache * - -g_cache_new () -
-gpointer - -g_cache_insert () -
-void - -g_cache_remove () -
-void - -g_cache_destroy () -
-void - -g_cache_key_foreach () -
-void - -g_cache_value_foreach () -
-void - -(*GCacheDestroyFunc) () -
-gpointer - -(*GCacheDupFunc) () -
-gpointer - -(*GCacheNewFunc) () -
-
-
-

Types and Values

-
---- - - - - -
 GCache
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

A GCache allows sharing of complex data structures, in order to -save system resources.

-

GCache uses keys and values. A GCache key describes the properties -of a particular resource. A GCache value is the actual resource.

-

GCache has been marked as deprecated, since this API is rarely -used and not very actively maintained.

-
-
-

Functions

-
-

g_cache_new ()

-
GCache *
-g_cache_new (GCacheNewFunc value_new_func,
-             GCacheDestroyFunc value_destroy_func,
-             GCacheDupFunc key_dup_func,
-             GCacheDestroyFunc key_destroy_func,
-             GHashFunc hash_key_func,
-             GHashFunc hash_value_func,
-             GEqualFunc key_equal_func);
-
-

g_cache_new has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use a GHashTable instead

-
-

Creates a new GCache.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

value_new_func

a function to create a new object given a key. -This is called by g_cache_insert() if an object -with the given key does not already exist

 

value_destroy_func

a function to destroy an object. It is called -by g_cache_remove() when the object is no -longer needed (i.e. its reference count drops -to 0)

 

key_dup_func

a function to copy a key. It is called by -g_cache_insert() if the key does not already exist in -the GCache

 

key_destroy_func

a function to destroy a key. It is called by -g_cache_remove() when the object is no longer -needed (i.e. its reference count drops to 0)

 

hash_key_func

a function to create a hash value from a key

 

hash_value_func

a function to create a hash value from a value

 

key_equal_func

a function to compare two keys. It should return -TRUE if the two keys are equivalent

 
-
-
-

Returns

-

a new GCache

-
-
-
-
-

g_cache_insert ()

-
gpointer
-g_cache_insert (GCache *cache,
-                gpointer key);
-
-

g_cache_insert has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use a GHashTable instead

-
-

Gets the value corresponding to the given key, creating it if -necessary. It first checks if the value already exists in the -GCache, by using the key_equal_func - function passed to -g_cache_new(). If it does already exist it is returned, and its -reference count is increased by one. If the value does not currently -exist, if is created by calling the value_new_func -. The key is -duplicated by calling key_dup_func - and the duplicated key and value -are inserted into the GCache.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cache

a GCache

 

key

a key describing a GCache object

 
-
-
-

Returns

-

a pointer to a GCache value

-
-
-
-
-

g_cache_remove ()

-
void
-g_cache_remove (GCache *cache,
-                gconstpointer value);
-
-

g_cache_remove has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use a GHashTable instead

-
-

Decreases the reference count of the given value. If it drops to 0 -then the value and its corresponding key are destroyed, using the -value_destroy_func - and key_destroy_func - passed to g_cache_new().

-
-

Parameters

-
----- - - - - - - - - - - - - -

cache

a GCache

 

value

the value to remove

 
-
-
-
-
-

g_cache_destroy ()

-
void
-g_cache_destroy (GCache *cache);
-
-

g_cache_destroy has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use a GHashTable instead

-
-

Frees the memory allocated for the GCache.

-

Note that it does not destroy the keys and values which were -contained in the GCache.

-
-

Parameters

-
----- - - - - - -

cache

a GCache

 
-
-
-
-
-

g_cache_key_foreach ()

-
void
-g_cache_key_foreach (GCache *cache,
-                     GHFunc func,
-                     gpointer user_data);
-
-

g_cache_key_foreach has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use a GHashTable instead

-
-

Calls the given function for each of the keys in the GCache.

-

NOTE func - is passed three parameters, the value and key of a cache -entry and the user_data -. The order of value and key is different -from the order in which g_hash_table_foreach() passes key-value -pairs to its callback function !

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cache

a GCache

 

func

the function to call with each GCache key

 

user_data

user data to pass to the function

 
-
-
-
-
-

g_cache_value_foreach ()

-
void
-g_cache_value_foreach (GCache *cache,
-                       GHFunc func,
-                       gpointer user_data);
-
-

g_cache_value_foreach has been deprecated since version 2.10 and should not be used in newly-written code.

-

The reason is that it passes pointers to internal - data structures to func -; use g_cache_key_foreach() instead

-
-

Calls the given function for each of the values in the GCache.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cache

a GCache

 

func

the function to call with each GCache value

 

user_data

user data to pass to the function

 
-
-
-
-
-

GCacheDestroyFunc ()

-
void
-(*GCacheDestroyFunc) (gpointer value);
-

GCacheDestroyFunc is deprecated and should not be used in newly-written code.

-

Specifies the type of the value_destroy_func - and key_destroy_func - -functions passed to g_cache_new(). The functions are passed a -pointer to the GCache key or GCache value and should free any -memory and other resources associated with it.

-
-

Parameters

-
----- - - - - - -

value

the GCache value to destroy

 
-
-
-
-
-

GCacheDupFunc ()

-
gpointer
-(*GCacheDupFunc) (gpointer value);
-

GCacheDupFunc is deprecated and should not be used in newly-written code.

-

Specifies the type of the key_dup_func - function passed to -g_cache_new(). The function is passed a key -(__not__ a value as the prototype implies) and -should return a duplicate of the key.

-
-

Parameters

-
----- - - - - - -

value

the GCache key to destroy (__not__ a -GCache value as it seems)

 
-
-
-

Returns

-

a copy of the GCache key

-
-
-
-
-

GCacheNewFunc ()

-
gpointer
-(*GCacheNewFunc) (gpointer key);
-

GCacheNewFunc is deprecated and should not be used in newly-written code.

-

Specifies the type of the value_new_func - function passed to -g_cache_new(). It is passed a GCache key and should create the -value corresponding to the key.

-
-

Parameters

-
----- - - - - - -

key

a GCache key

 
-
-
-

Returns

-

a new GCache value corresponding to the key.

-
-
-
-
-

Types and Values

-
-

GCache

-
typedef struct _GCache GCache;
-
-

GCache has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use a GHashTable instead

-
-

The GCache struct is an opaque data structure containing -information about a GCache. It should only be accessed via the -following functions.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Character-Set-Conversion.html b/docs/reference/glib/html/glib-Character-Set-Conversion.html deleted file mode 100644 index 6bf76e7fb..000000000 --- a/docs/reference/glib/html/glib-Character-Set-Conversion.html +++ /dev/null @@ -1,1287 +0,0 @@ - - - - -Character Set Conversion: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Character Set Conversion

-

Character Set Conversion — convert strings between different character sets

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gchar * - -g_convert () -
-gchar * - -g_convert_with_fallback () -
-gchar * - -g_convert_with_iconv () -
-GIConv - -g_iconv_open () -
-gsize - -g_iconv () -
-gint - -g_iconv_close () -
-gchar * - -g_locale_to_utf8 () -
-gchar * - -g_filename_to_utf8 () -
-gchar * - -g_filename_from_utf8 () -
-gboolean - -g_get_filename_charsets () -
-gchar * - -g_filename_display_name () -
-gchar * - -g_filename_display_basename () -
-gchar * - -g_locale_from_utf8 () -
-gboolean - -g_get_charset () -
-gchar * - -g_get_codeset () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
 GIConv
#defineG_CONVERT_ERROR
enumGConvertError
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The g_convert() family of function wraps the functionality of iconv(). -In addition to pure character set conversions, GLib has functions to -deal with the extra complications of encodings for file names.

-
-

File Name Encodings

-

Historically, UNIX has not had a defined encoding for file names: -a file name is valid as long as it does not have path separators -in it ("/"). However, displaying file names may require conversion: -from the character set in which they were created, to the character -set in which the application operates. Consider the Spanish file name -"Presentaci&oacute;n.sxi". If the application which created it uses -ISO-8859-1 for its encoding,

-
- - - - - - - -
1
-2
Character:  P  r  e  s  e  n  t  a  c  i  ó  n  .  s  x  i
-Hex code:   50 72 65 73 65 6e 74 61 63 69 f3 6e 2e 73 78 69
-
- -

-However, if the application use UTF-8, the actual file name on -disk would look like this:

-
- - - - - - - -
1
-2
Character:  P  r  e  s  e  n  t  a  c  i  ó     n  .  s  x  i
-Hex code:   50 72 65 73 65 6e 74 61 63 69 c3 b3 6e 2e 73 78 69
-
- -

-Glib uses UTF-8 for its strings, and GUI toolkits like GTK+ that use -Glib do the same thing. If you get a file name from the file system, -for example, from readdir() or from g_dir_read_name(), and you wish -to display the file name to the user, you will need to convert it -into UTF-8. The opposite case is when the user types the name of a -file he wishes to save: the toolkit will give you that string in -UTF-8 encoding, and you will need to convert it to the character -set used for file names before you can create the file with open() -or fopen().

-

By default, Glib assumes that file names on disk are in UTF-8 -encoding. This is a valid assumption for file systems which -were created relatively recently: most applications use UTF-8 -encoding for their strings, and that is also what they use for -the file names they create. However, older file systems may -still contain file names created in "older" encodings, such as -ISO-8859-1. In this case, for compatibility reasons, you may want -to instruct Glib to use that particular encoding for file names -rather than UTF-8. You can do this by specifying the encoding for -file names in the G_FILENAME_ENCODING -environment variable. For example, if your installation uses -ISO-8859-1 for file names, you can put this in your ~/.profile

-
- - - - - - - -
1
export G_FILENAME_ENCODING=ISO-8859-1
-
- -

-Glib provides the functions g_filename_to_utf8() and -g_filename_from_utf8() to perform the necessary conversions. -These functions convert file names from the encoding specified -in G_FILENAME_ENCODING to UTF-8 and vice-versa. This -diagram illustrates how -these functions are used to convert between UTF-8 and the -encoding for file names in the file system.

-
-
-

Conversion between file name encodings # {file-name-encodings-diagram)

-

-
-
-

Checklist for Application Writers

-

This section is a practical summary of the detailed

-

things to do to make sure your applications process file -name encodings correctly.

-
    -
  1. If you get a file name from the file system from a function -such as readdir() or gtk_file_chooser_get_filename(), you do -not need to do any conversion to pass that file name to -functions like open(), rename(), or fopen() -- those are "raw" -file names which the file system understands.

  2. -
  3. -

    If you need to display a file name, convert it to UTF-8 first -by using g_filename_to_utf8(). If conversion fails, display a -string like "Unknown file name". Do not convert this string back -into the encoding used for file names if you wish to pass it to -the file system; use the original file name instead.

    -

    For example, the document window of a word processor could display -"Unknown file name" in its title bar but still let the user save -the file, as it would keep the raw file name internally. This -can happen if the user has not set the G_FILENAME_ENCODING -environment variable even though he has files whose names are -not encoded in UTF-8.

    -
  4. -
  5. If your user interface lets the user type a file name for saving -or renaming, convert it to the encoding used for file names in -the file system by using g_filename_from_utf8(). Pass the converted -file name to functions like fopen(). If conversion fails, ask the -user to enter a different file name. This can happen if the user -types Japanese characters when G_FILENAME_ENCODING is set to -ISO-8859-1, for example.

  6. -
-
-
-
-

Functions

-
-

g_convert ()

-
gchar *
-g_convert (const gchar *str,
-           gssize len,
-           const gchar *to_codeset,
-           const gchar *from_codeset,
-           gsize *bytes_read,
-           gsize *bytes_written,
-           GError **error);
-

Converts a string from one character set to another.

-

Note that you should use g_iconv() for streaming conversions. -Despite the fact that byes_read - can return information about partial -characters, the g_convert_... functions are not generally suitable -for streaming. If the underlying converter maintains internal state, -then this won't be preserved across successive calls to g_convert(), -g_convert_with_iconv() or g_convert_with_fallback(). (An example of -this is the GNU C converter for CP1255 which does not emit a base -character until it knows that the next character is not a mark that -could combine with the base character.)

-

Using extensions such as "//TRANSLIT" may not work (or may not work -well) on many platforms. Consider using g_str_to_ascii() instead.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

str

the string to convert

 

len

the length of the string in bytes, or -1 if the string is -nul-terminated (Note that some encodings may allow nul -bytes to occur inside strings. In that case, using -1 -for the len -parameter is unsafe)

 

to_codeset

name of character set into which to convert str -

 

from_codeset

character set of str -.

 

bytes_read

location to store the number of bytes in the -input string that were successfully converted, or NULL. -Even if the conversion was successful, this may be -less than len -if there were partial characters -at the end of the input. If the error -G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value -stored will the byte offset after the last valid -input sequence.

[out]

bytes_written

the number of bytes stored in the output buffer (not -including the terminating nul).

[out]

error

location to store the error occurring, or NULL to ignore -errors. Any of the errors in GConvertError may occur.

 
-
-
-

Returns

-

If the conversion was successful, a newly allocated -nul-terminated string, which must be freed with -g_free(). Otherwise NULL and error -will be set.

-
-
-
-
-

g_convert_with_fallback ()

-
gchar *
-g_convert_with_fallback (const gchar *str,
-                         gssize len,
-                         const gchar *to_codeset,
-                         const gchar *from_codeset,
-                         const gchar *fallback,
-                         gsize *bytes_read,
-                         gsize *bytes_written,
-                         GError **error);
-

Converts a string from one character set to another, possibly -including fallback sequences for characters not representable -in the output. Note that it is not guaranteed that the specification -for the fallback sequences in fallback - will be honored. Some -systems may do an approximate conversion from from_codeset - -to to_codeset - in their iconv() functions, -in which case GLib will simply return that approximate conversion.

-

Note that you should use g_iconv() for streaming conversions. -Despite the fact that byes_read - can return information about partial -characters, the g_convert_... functions are not generally suitable -for streaming. If the underlying converter maintains internal state, -then this won't be preserved across successive calls to g_convert(), -g_convert_with_iconv() or g_convert_with_fallback(). (An example of -this is the GNU C converter for CP1255 which does not emit a base -character until it knows that the next character is not a mark that -could combine with the base character.)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

str

the string to convert

 

len

the length of the string in bytes, or -1 if the string is -nul-terminated (Note that some encodings may allow nul -bytes to occur inside strings. In that case, using -1 -for the len -parameter is unsafe)

 

to_codeset

name of character set into which to convert str -

 

from_codeset

character set of str -.

 

fallback

UTF-8 string to use in place of character not -present in the target encoding. (The string must be -representable in the target encoding). -If NULL, characters not in the target encoding will -be represented as Unicode escapes \uxxxx or \Uxxxxyyyy.

 

bytes_read

location to store the number of bytes in the -input string that were successfully converted, or NULL. -Even if the conversion was successful, this may be -less than len -if there were partial characters -at the end of the input.

 

bytes_written

the number of bytes stored in the output buffer (not -including the terminating nul).

 

error

location to store the error occurring, or NULL to ignore -errors. Any of the errors in GConvertError may occur.

 
-
-
-

Returns

-

If the conversion was successful, a newly allocated -nul-terminated string, which must be freed with -g_free(). Otherwise NULL and error -will be set.

-
-
-
-
-

g_convert_with_iconv ()

-
gchar *
-g_convert_with_iconv (const gchar *str,
-                      gssize len,
-                      GIConv converter,
-                      gsize *bytes_read,
-                      gsize *bytes_written,
-                      GError **error);
-

Converts a string from one character set to another.

-

Note that you should use g_iconv() for streaming conversions. -Despite the fact that byes_read - can return information about partial -characters, the g_convert_... functions are not generally suitable -for streaming. If the underlying converter maintains internal state, -then this won't be preserved across successive calls to g_convert(), -g_convert_with_iconv() or g_convert_with_fallback(). (An example of -this is the GNU C converter for CP1255 which does not emit a base -character until it knows that the next character is not a mark that -could combine with the base character.)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

str

the string to convert

 

len

the length of the string in bytes, or -1 if the string is -nul-terminated (Note that some encodings may allow nul -bytes to occur inside strings. In that case, using -1 -for the len -parameter is unsafe)

 

converter

conversion descriptor from g_iconv_open()

 

bytes_read

location to store the number of bytes in the -input string that were successfully converted, or NULL. -Even if the conversion was successful, this may be -less than len -if there were partial characters -at the end of the input. If the error -G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value -stored will the byte offset after the last valid -input sequence.

 

bytes_written

the number of bytes stored in the output buffer (not -including the terminating nul).

 

error

location to store the error occurring, or NULL to ignore -errors. Any of the errors in GConvertError may occur.

 
-
-
-

Returns

-

If the conversion was successful, a newly allocated -nul-terminated string, which must be freed with -g_free(). Otherwise NULL and error -will be set.

-
-
-
-
-

g_iconv_open ()

-
GIConv
-g_iconv_open (const gchar *to_codeset,
-              const gchar *from_codeset);
-

Same as the standard UNIX routine iconv_open(), but -may be implemented via libiconv on UNIX flavors that lack -a native implementation.

-

GLib provides g_convert() and g_locale_to_utf8() which are likely -more convenient than the raw iconv wrappers.

-
-

Parameters

-
----- - - - - - - - - - - - - -

to_codeset

destination codeset

 

from_codeset

source codeset

 
-
-
-

Returns

-

a "conversion descriptor", or (GIConv)-1 if -opening the converter failed.

-
-
-
-
-

g_iconv ()

-
gsize
-g_iconv (GIConv converter,
-         gchar **inbuf,
-         gsize *inbytes_left,
-         gchar **outbuf,
-         gsize *outbytes_left);
-

Same as the standard UNIX routine iconv(), but -may be implemented via libiconv on UNIX flavors that lack -a native implementation.

-

GLib provides g_convert() and g_locale_to_utf8() which are likely -more convenient than the raw iconv wrappers.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

converter

conversion descriptor from g_iconv_open()

 

inbuf

bytes to convert

 

inbytes_left

inout parameter, bytes remaining to convert in inbuf -

 

outbuf

converted output bytes

 

outbytes_left

inout parameter, bytes available to fill in outbuf -

 
-
-
-

Returns

-

count of non-reversible conversions, or -1 on error

-
-
-
-
-

g_iconv_close ()

-
gint
-g_iconv_close (GIConv converter);
-

Same as the standard UNIX routine iconv_close(), but -may be implemented via libiconv on UNIX flavors that lack -a native implementation. Should be called to clean up -the conversion descriptor from g_iconv_open() when -you are done converting things.

-

GLib provides g_convert() and g_locale_to_utf8() which are likely -more convenient than the raw iconv wrappers.

-
-

Parameters

-
----- - - - - - -

converter

a conversion descriptor from g_iconv_open()

 
-
-
-

Returns

-

-1 on error, 0 on success

-
-
-
-
-

g_locale_to_utf8 ()

-
gchar *
-g_locale_to_utf8 (const gchar *opsysstring,
-                  gssize len,
-                  gsize *bytes_read,
-                  gsize *bytes_written,
-                  GError **error);
-

Converts a string which is in the encoding used for strings by -the C runtime (usually the same as that used by the operating -system) in the current locale into a UTF-8 string.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

opsysstring

a string in the encoding of the current locale. On Windows -this means the system codepage.

 

len

the length of the string, or -1 if the string is -nul-terminated (Note that some encodings may allow nul -bytes to occur inside strings. In that case, using -1 -for the len -parameter is unsafe)

 

bytes_read

location to store the number of bytes in the -input string that were successfully converted, or NULL. -Even if the conversion was successful, this may be -less than len -if there were partial characters -at the end of the input. If the error -G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value -stored will the byte offset after the last valid -input sequence.

[out][optional]

bytes_written

the number of bytes stored in the output -buffer (not including the terminating nul).

[out][optional]

error

location to store the error occurring, or NULL to ignore -errors. Any of the errors in GConvertError may occur.

 
-
-
-

Returns

-

A newly-allocated buffer containing the converted string, -or NULL on an error, and error will be set.

-
-
-
-
-

g_filename_to_utf8 ()

-
gchar *
-g_filename_to_utf8 (const gchar *opsysstring,
-                    gssize len,
-                    gsize *bytes_read,
-                    gsize *bytes_written,
-                    GError **error);
-

Converts a string which is in the encoding used by GLib for -filenames into a UTF-8 string. Note that on Windows GLib uses UTF-8 -for filenames; on other platforms, this function indirectly depends on -the current locale.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

opsysstring

a string in the encoding for filenames.

[type filename]

len

the length of the string, or -1 if the string is -nul-terminated (Note that some encodings may allow nul -bytes to occur inside strings. In that case, using -1 -for the len -parameter is unsafe)

 

bytes_read

location to store the number of bytes in the -input string that were successfully converted, or NULL. -Even if the conversion was successful, this may be -less than len -if there were partial characters -at the end of the input. If the error -G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value -stored will the byte offset after the last valid -input sequence.

[out][optional]

bytes_written

the number of bytes stored in the output -buffer (not including the terminating nul).

[out][optional]

error

location to store the error occurring, or NULL to ignore -errors. Any of the errors in GConvertError may occur.

 
-
-
-

Returns

-

The converted string, or NULL on an error.

-
-
-
-
-

g_filename_from_utf8 ()

-
gchar *
-g_filename_from_utf8 (const gchar *utf8string,
-                      gssize len,
-                      gsize *bytes_read,
-                      gsize *bytes_written,
-                      GError **error);
-

Converts a string from UTF-8 to the encoding GLib uses for -filenames. Note that on Windows GLib uses UTF-8 for filenames; -on other platforms, this function indirectly depends on the -current locale.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

utf8string

a UTF-8 encoded string.

 

len

the length of the string, or -1 if the string is -nul-terminated.

 

bytes_read

location to store the number of bytes in -the input string that were successfully converted, or NULL. -Even if the conversion was successful, this may be -less than len -if there were partial characters -at the end of the input. If the error -G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value -stored will the byte offset after the last valid -input sequence.

[out][optional]

bytes_written

the number of bytes stored in the output buffer (not -including the terminating nul).

[out]

error

location to store the error occurring, or NULL to ignore -errors. Any of the errors in GConvertError may occur.

 
-
-
-

Returns

-

The converted string, or NULL on an error.

-

[array length=bytes_written][element-type guint8][transfer full]

-
-
-
-
-

g_get_filename_charsets ()

-
gboolean
-g_get_filename_charsets (const gchar ***charsets);
-

Determines the preferred character sets used for filenames. -The first character set from the charsets - is the filename encoding, the -subsequent character sets are used when trying to generate a displayable -representation of a filename, see g_filename_display_name().

-

On Unix, the character sets are determined by consulting the -environment variables G_FILENAME_ENCODING and G_BROKEN_FILENAMES. -On Windows, the character set used in the GLib API is always UTF-8 -and said environment variables have no effect.

-

G_FILENAME_ENCODING may be set to a comma-separated list of -character set names. The special token "@locale" is taken -to mean the character set for the current locale. -If G_FILENAME_ENCODING is not set, but G_BROKEN_FILENAMES is, -the character set of the current locale is taken as the filename -encoding. If neither environment variable is set, UTF-8 is taken -as the filename encoding, but the character set of the current locale -is also put in the list of encodings.

-

The returned charsets - belong to GLib and must not be freed.

-

Note that on Unix, regardless of the locale character set or -G_FILENAME_ENCODING value, the actual file names present -on a system might be in any random encoding or just gibberish.

-
-

Parameters

-
----- - - - - - -

charsets

return location for the NULL-terminated list of encoding names

 
-
-
-

Returns

-

TRUE if the filename encoding is UTF-8.

-
-

Since: 2.6

-
-
-
-

g_filename_display_name ()

-
gchar *
-g_filename_display_name (const gchar *filename);
-

Converts a filename into a valid UTF-8 string. The conversion is -not necessarily reversible, so you should keep the original around -and use the return value of this function only for display purposes. -Unlike g_filename_to_utf8(), the result is guaranteed to be non-NULL -even if the filename actually isn't in the GLib file name encoding.

-

If GLib cannot make sense of the encoding of filename -, as a last resort it -replaces unknown characters with U+FFFD, the Unicode replacement character. -You can search the result for the UTF-8 encoding of this character (which is -"\357\277\275" in octal notation) to find out if filename - was in an invalid -encoding.

-

If you know the whole pathname of the file you should use -g_filename_display_basename(), since that allows location-based -translation of filenames.

-
-

Parameters

-
----- - - - - - -

filename

a pathname hopefully in the -GLib file name encoding.

[type filename]
-
-
-

Returns

-

a newly allocated string containing -a rendition of the filename in valid UTF-8

-
-

Since: 2.6

-
-
-
-

g_filename_display_basename ()

-
gchar *
-g_filename_display_basename (const gchar *filename);
-

Returns the display basename for the particular filename, guaranteed -to be valid UTF-8. The display name might not be identical to the filename, -for instance there might be problems converting it to UTF-8, and some files -can be translated in the display.

-

If GLib cannot make sense of the encoding of filename -, as a last resort it -replaces unknown characters with U+FFFD, the Unicode replacement character. -You can search the result for the UTF-8 encoding of this character (which is -"\357\277\275" in octal notation) to find out if filename - was in an invalid -encoding.

-

You must pass the whole absolute pathname to this functions so that -translation of well known locations can be done.

-

This function is preferred over g_filename_display_name() if you know the -whole path, as it allows translation.

-
-

Parameters

-
----- - - - - - -

filename

an absolute pathname in the -GLib file name encoding.

[type filename]
-
-
-

Returns

-

a newly allocated string containing -a rendition of the basename of the filename in valid UTF-8

-
-

Since: 2.6

-
-
-
-

g_locale_from_utf8 ()

-
gchar *
-g_locale_from_utf8 (const gchar *utf8string,
-                    gssize len,
-                    gsize *bytes_read,
-                    gsize *bytes_written,
-                    GError **error);
-

Converts a string from UTF-8 to the encoding used for strings by -the C runtime (usually the same as that used by the operating -system) in the current locale. On Windows this means -the system codepage.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

utf8string

a UTF-8 encoded string

 

len

the length of the string, or -1 if the string is -nul-terminated (Note that some encodings may allow nul -bytes to occur inside strings. In that case, using -1 -for the len -parameter is unsafe)

 

bytes_read

location to store the number of bytes in the -input string that were successfully converted, or NULL. -Even if the conversion was successful, this may be -less than len -if there were partial characters -at the end of the input. If the error -G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value -stored will the byte offset after the last valid -input sequence.

[out][optional]

bytes_written

the number of bytes stored in the output -buffer (not including the terminating nul).

[out][optional]

error

location to store the error occurring, or NULL to ignore -errors. Any of the errors in GConvertError may occur.

 
-
-
-

Returns

-

A newly-allocated buffer containing the converted string, -or NULL on an error, and error will be set.

-
-
-
-
-

g_get_charset ()

-
gboolean
-g_get_charset (const char **charset);
-

Obtains the character set for the current locale; you -might use this character set as an argument to g_convert(), to convert -from the current locale's encoding to some other encoding. (Frequently -g_locale_to_utf8() and g_locale_from_utf8() are nice shortcuts, though.)

-

On Windows the character set returned by this function is the -so-called system default ANSI code-page. That is the character set -used by the "narrow" versions of C library and Win32 functions that -handle file names. It might be different from the character set -used by the C library's current locale.

-

The return value is TRUE if the locale's encoding is UTF-8, in that -case you can perhaps avoid calling g_convert().

-

The string returned in charset - is not allocated, and should not be -freed.

-
-

Parameters

-
----- - - - - - -

charset

return location for character set -name, or NULL.

[out][optional][transfer none]
-
-
-

Returns

-

TRUE if the returned charset is UTF-8

-
-
-
-
-

g_get_codeset ()

-
gchar *
-g_get_codeset (void);
-

Gets the character set for the current locale.

-
-

Returns

-

a newly allocated string containing the name -of the character set. This string must be freed with g_free().

-
-
-
-
-

Types and Values

-
-

GIConv

-
typedef struct _GIConv GIConv;
-

The GIConv struct wraps an iconv() conversion descriptor. It contains -private data and should only be accessed using the following functions.

-
-
-
-

G_CONVERT_ERROR

-
#define G_CONVERT_ERROR g_convert_error_quark()
-
-

Error domain for character set conversions. Errors in this domain will -be from the GConvertError enumeration. See GError for information on -error domains.

-
-
-
-

enum GConvertError

-

Error codes returned by character set conversion routines.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_CONVERT_ERROR_NO_CONVERSION

-

Conversion between the requested character - sets is not supported.

-
 

G_CONVERT_ERROR_ILLEGAL_SEQUENCE

-

Invalid byte sequence in conversion input.

-
 

G_CONVERT_ERROR_FAILED

-

Conversion failed for some reason.

-
 

G_CONVERT_ERROR_PARTIAL_INPUT

-

Partial character sequence at end of input.

-
 

G_CONVERT_ERROR_BAD_URI

-

URI is invalid.

-
 

G_CONVERT_ERROR_NOT_ABSOLUTE_PATH

-

Pathname is not an absolute path.

-
 

G_CONVERT_ERROR_NO_MEMORY

-

No memory available. Since: 2.40

-
 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Commandline-option-parser.html b/docs/reference/glib/html/glib-Commandline-option-parser.html deleted file mode 100644 index 50c6cf3ad..000000000 --- a/docs/reference/glib/html/glib-Commandline-option-parser.html +++ /dev/null @@ -1,2320 +0,0 @@ - - - - -Commandline option parser: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Commandline option parser

-

Commandline option parser — parses commandline options

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -(*GOptionArgFunc) () -
-GOptionContext * - -g_option_context_new () -
-void - -g_option_context_set_summary () -
const gchar * - -g_option_context_get_summary () -
-void - -g_option_context_set_description () -
const gchar * - -g_option_context_get_description () -
const gchar * - -(*GTranslateFunc) () -
-void - -g_option_context_set_translate_func () -
-void - -g_option_context_set_translation_domain () -
-void - -g_option_context_free () -
-gboolean - -g_option_context_parse () -
-gboolean - -g_option_context_parse_strv () -
-void - -g_option_context_set_help_enabled () -
-gboolean - -g_option_context_get_help_enabled () -
-void - -g_option_context_set_ignore_unknown_options () -
-gboolean - -g_option_context_get_ignore_unknown_options () -
-gchar * - -g_option_context_get_help () -
-gboolean - -g_option_context_get_strict_posix () -
-void - -g_option_context_set_strict_posix () -
-void - -g_option_context_add_main_entries () -
-void - -g_option_context_add_group () -
-void - -g_option_context_set_main_group () -
-GOptionGroup * - -g_option_context_get_main_group () -
-GOptionGroup * - -g_option_group_new () -
-GOptionGroup * - -g_option_group_ref () -
-void - -g_option_group_unref () -
-void - -g_option_group_free () -
-void - -g_option_group_add_entries () -
-gboolean - -(*GOptionParseFunc) () -
-void - -g_option_group_set_parse_hooks () -
-void - -(*GOptionErrorFunc) () -
-void - -g_option_group_set_error_hook () -
-void - -g_option_group_set_translate_func () -
-void - -g_option_group_set_translation_domain () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
enumGOptionError
#defineG_OPTION_ERROR
 GOptionContext
enumGOptionArg
enumGOptionFlags
#defineG_OPTION_REMAINING
structGOptionEntry
 GOptionGroup
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The GOption commandline parser is intended to be a simpler replacement -for the popt library. It supports short and long commandline options, -as shown in the following example:

-

testtreemodel -r 1 --max-size 20 --rand --display=:1.0 -vb -- file1 file2

-

The example demonstrates a number of features of the GOption -commandline parser:

-
    -
  • Options can be single letters, prefixed by a single dash.

  • -
  • Multiple short options can be grouped behind a single dash.

  • -
  • Long options are prefixed by two consecutive dashes.

  • -
  • Options can have an extra argument, which can be a number, a string or -a filename. For long options, the extra argument can be appended with -an equals sign after the option name, which is useful if the extra -argument starts with a dash, which would otherwise cause it to be -interpreted as another option.

  • -
  • Non-option arguments are returned to the application as rest arguments.

  • -
  • An argument consisting solely of two dashes turns off further parsing, -any remaining arguments (even those starting with a dash) are returned -to the application as rest arguments.

  • -
-

Another important feature of GOption is that it can automatically -generate nicely formatted help output. Unless it is explicitly turned -off with g_option_context_set_help_enabled(), GOption will recognize -the --help, -?, --help-all and --help-groupname options -(where groupname is the name of a GOptionGroup) and write a text -similar to the one shown in the following example to stdout.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
Usage:
-  testtreemodel [OPTION...] - test tree model performance
- 
-Help Options:
-  -h, --help               Show help options
-  --help-all               Show all help options
-  --help-gtk               Show GTK+ Options
- 
-Application Options:
-  -r, --repeats=N          Average over N repetitions
-  -m, --max-size=M         Test up to 2^M items
-  --display=DISPLAY        X display to use
-  -v, --verbose            Be verbose
-  -b, --beep               Beep when done
-  --rand                   Randomize the data
-
- -

-

GOption groups options in GOptionGroups, which makes it easy to -incorporate options from multiple sources. The intended use for this is -to let applications collect option groups from the libraries it uses, -add them to their GOptionContext, and parse all options by a single call -to g_option_context_parse(). See gtk_get_option_group() for an example.

-

If an option is declared to be of type string or filename, GOption takes -care of converting it to the right encoding; strings are returned in -UTF-8, filenames are returned in the GLib filename encoding. Note that -this only works if setlocale() has been called before -g_option_context_parse().

-

Here is a complete example of setting up GOption to parse the example -commandline above and produce the example help output.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
static gint repeats = 2;
-static gint max_size = 8;
-static gboolean verbose = FALSE;
-static gboolean beep = FALSE;
-static gboolean randomize = FALSE;
-
-static GOptionEntry entries[] =
-{
-  { "repeats", 'r', 0, G_OPTION_ARG_INT, &repeats, "Average over N repetitions", "N" },
-  { "max-size", 'm', 0, G_OPTION_ARG_INT, &max_size, "Test up to 2^M items", "M" },
-  { "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Be verbose", NULL },
-  { "beep", 'b', 0, G_OPTION_ARG_NONE, &beep, "Beep when done", NULL },
-  { "rand", 0, 0, G_OPTION_ARG_NONE, &randomize, "Randomize the data", NULL },
-  { NULL }
-};
-
-int
-main (int argc, char *argv[])
-{
-  GError *error = NULL;
-  GOptionContext *context;
-
-  context = g_option_context_new ("- test tree model performance");
-  g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
-  g_option_context_add_group (context, gtk_get_option_group (TRUE));
-  if (!g_option_context_parse (context, &argc, &argv, &error))
-    {
-      g_print ("option parsing failed: %s\n", error->message);
-      exit (1);
-    }
-
-  ...
-
-}
-
- -

-

On UNIX systems, the argv that is passed to main() has no particular -encoding, even to the extent that different parts of it may have -different encodings. In general, normal arguments and flags will be -in the current locale and filenames should be considered to be opaque -byte strings. Proper use of G_OPTION_ARG_FILENAME vs -G_OPTION_ARG_STRING is therefore important.

-

Note that on Windows, filenames do have an encoding, but using -GOptionContext with the argv as passed to main() will result in a -program that can only accept commandline arguments with characters -from the system codepage. This can cause problems when attempting to -deal with filenames containing Unicode characters that fall outside -of the codepage.

-

A solution to this is to use g_win32_get_command_line() and -g_option_context_parse_strv() which will properly handle full Unicode -filenames. If you are using GApplication, this is done -automatically for you.

-

The following example shows how you can use GOptionContext directly -in order to correctly deal with Unicode filenames on Windows:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
int
-main (int argc, char **argv)
-{
-  GError *error = NULL;
-  GOptionContext *context;
-  gchar **args;
-
-#ifdef G_OS_WIN32
-  args = g_win32_get_command_line ();
-#else
-  args = g_strdupv (argv);
-#endif
-
-  // set up context
-
-  if (!g_option_context_parse_strv (context, &args, &error))
-    {
-      // error happened
-    }
-
-  ...
-
-  g_strfreev (args);
-
-  ...
-}
-
- -

-
-
-

Functions

-
-

GOptionArgFunc ()

-
gboolean
-(*GOptionArgFunc) (const gchar *option_name,
-                   const gchar *value,
-                   gpointer data,
-                   GError **error);
-

The type of function to be passed as callback for G_OPTION_ARG_CALLBACK -options.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

option_name

The name of the option being parsed. This will be either a -single dash followed by a single letter (for a short name) or two dashes -followed by a long option name.

 

value

The value to be parsed.

 

data

User data added to the GOptionGroup containing the option when it -was created with g_option_group_new()

 

error

A return location for errors. The error code G_OPTION_ERROR_FAILED -is intended to be used for errors in GOptionArgFunc callbacks.

 
-
-
-

Returns

-

TRUE if the option was successfully parsed, FALSE if an error -occurred, in which case error -should be set with g_set_error()

-
-
-
-
-

g_option_context_new ()

-
GOptionContext *
-g_option_context_new (const gchar *parameter_string);
-

Creates a new option context.

-

The parameter_string - can serve multiple purposes. It can be used -to add descriptions for "rest" arguments, which are not parsed by -the GOptionContext, typically something like "FILES" or -"FILE1 FILE2...". If you are using G_OPTION_REMAINING for -collecting "rest" arguments, GLib handles this automatically by -using the arg_description - of the corresponding GOptionEntry in -the usage summary.

-

Another usage is to give a short summary of the program -functionality, like " - frob the strings", which will be displayed -in the same line as the usage. For a longer description of the -program functionality that should be displayed as a paragraph -below the usage line, use g_option_context_set_summary().

-

Note that the parameter_string - is translated using the -function set with g_option_context_set_translate_func(), so -it should normally be passed untranslated.

-
-

Parameters

-
----- - - - - - -

parameter_string

a string which is displayed in -the first line of --help output, after the usage summary -programname [OPTION...].

[nullable]
-
-
-

Returns

-

a newly created GOptionContext, which must be -freed with g_option_context_free() after use.

-
-

Since: 2.6

-
-
-
-

g_option_context_set_summary ()

-
void
-g_option_context_set_summary (GOptionContext *context,
-                              const gchar *summary);
-

Adds a string to be displayed in --help output before the list -of options. This is typically a summary of the program functionality.

-

Note that the summary is translated (see -g_option_context_set_translate_func() and -g_option_context_set_translation_domain()).

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GOptionContext

 

summary

a string to be shown in --help output -before the list of options, or NULL.

[nullable]
-
-

Since: 2.12

-
-
-
-

g_option_context_get_summary ()

-
const gchar *
-g_option_context_get_summary (GOptionContext *context);
-

Returns the summary. See g_option_context_set_summary().

-
-

Parameters

-
----- - - - - - -

context

a GOptionContext

 
-
-
-

Returns

-

the summary

-
-

Since: 2.12

-
-
-
-

g_option_context_set_description ()

-
void
-g_option_context_set_description (GOptionContext *context,
-                                  const gchar *description);
-

Adds a string to be displayed in --help output after the list -of options. This text often includes a bug reporting address.

-

Note that the summary is translated (see -g_option_context_set_translate_func()).

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GOptionContext

 

description

a string to be shown in --help output -after the list of options, or NULL.

[nullable]
-
-

Since: 2.12

-
-
-
-

g_option_context_get_description ()

-
const gchar *
-g_option_context_get_description (GOptionContext *context);
-

Returns the description. See g_option_context_set_description().

-
-

Parameters

-
----- - - - - - -

context

a GOptionContext

 
-
-
-

Returns

-

the description

-
-

Since: 2.12

-
-
-
-

GTranslateFunc ()

-
const gchar *
-(*GTranslateFunc) (const gchar *str,
-                   gpointer data);
-

The type of functions which are used to translate user-visible -strings, for <option>--help</option> output.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

the untranslated string

 

data

user data specified when installing the function, e.g. -in g_option_group_set_translate_func()

 
-
-
-

Returns

-

a translation of the string for the current locale. -The returned string is owned by GLib and must not be freed.

-
-
-
-
-

g_option_context_set_translate_func ()

-
void
-g_option_context_set_translate_func (GOptionContext *context,
-                                     GTranslateFunc func,
-                                     gpointer data,
-                                     GDestroyNotify destroy_notify);
-

Sets the function which is used to translate the contexts -user-visible strings, for --help output. If func - is NULL, -strings are not translated.

-

Note that option groups have their own translation functions, -this function only affects the parameter_string - (see g_option_context_new()), -the summary (see g_option_context_set_summary()) and the description -(see g_option_context_set_description()).

-

If you are using gettext(), you only need to set the translation -domain, see g_option_context_set_translation_domain().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

context

a GOptionContext

 

func

the GTranslateFunc, or NULL.

[nullable]

data

user data to pass to func -, or NULL.

[nullable]

destroy_notify

a function which gets called to free data -, or NULL.

[nullable]
-
-

Since: 2.12

-
-
-
-

g_option_context_set_translation_domain ()

-
void
-g_option_context_set_translation_domain
-                               (GOptionContext *context,
-                                const gchar *domain);
-

A convenience function to use gettext() for translating -user-visible strings.

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GOptionContext

 

domain

the domain to use

 
-
-

Since: 2.12

-
-
-
-

g_option_context_free ()

-
void
-g_option_context_free (GOptionContext *context);
-

Frees context and all the groups which have been -added to it.

-

Please note that parsed arguments need to be freed separately (see -GOptionEntry).

-
-

Parameters

-
----- - - - - - -

context

a GOptionContext

 
-
-

Since: 2.6

-
-
-
-

g_option_context_parse ()

-
gboolean
-g_option_context_parse (GOptionContext *context,
-                        gint *argc,
-                        gchar ***argv,
-                        GError **error);
-

Parses the command line arguments, recognizing options -which have been added to context -. A side-effect of -calling this function is that g_set_prgname() will be -called.

-

If the parsing is successful, any parsed arguments are -removed from the array and argc - and argv - are updated -accordingly. A '--' option is stripped from argv - -unless there are unparsed options before and after it, -or some of the options after it start with '-'. In case -of an error, argc - and argv - are left unmodified.

-

If automatic --help support is enabled -(see g_option_context_set_help_enabled()), and the -argv - array contains one of the recognized help options, -this function will produce help output to stdout and -call exit (0).

-

Note that function depends on the current locale for -automatic character set conversion of string and filename -arguments.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

context

a GOptionContext

 

argc

a pointer to the number of command line arguments.

[inout][optional]

argv

a pointer to the array of command line arguments.

[inout][array length=argc][optional]

error

a return location for errors

 
-
-
-

Returns

-

TRUE if the parsing was successful, -FALSE if an error occurred

-
-

Since: 2.6

-
-
-
-

g_option_context_parse_strv ()

-
gboolean
-g_option_context_parse_strv (GOptionContext *context,
-                             gchar ***arguments,
-                             GError **error);
-

Parses the command line arguments.

-

This function is similar to g_option_context_parse() except that it -respects the normal memory rules when dealing with a strv instead of -assuming that the passed-in array is the argv of the main function.

-

In particular, strings that are removed from the arguments list will -be freed using g_free().

-

On Windows, the strings are expected to be in UTF-8. This is in -contrast to g_option_context_parse() which expects them to be in the -system codepage, which is how they are passed as argv - to main(). -See g_win32_get_command_line() for a solution.

-

This function is useful if you are trying to use GOptionContext with -GApplication.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

context

a GOptionContext

 

arguments

a pointer to the -command line arguments (which must be in UTF-8 on Windows).

[inout][array null-terminated=1]

error

a return location for errors

 
-
-
-

Returns

-

TRUE if the parsing was successful, -FALSE if an error occurred

-
-

Since: 2.40

-
-
-
-

g_option_context_set_help_enabled ()

-
void
-g_option_context_set_help_enabled (GOptionContext *context,
-                                   gboolean help_enabled);
-

Enables or disables automatic generation of --help output. -By default, g_option_context_parse() recognizes --help, -h, --?, --help-all and --help-groupname and creates suitable -output to stdout.

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GOptionContext

 

help_enabled

TRUE to enable --help, FALSE to disable it

 
-
-

Since: 2.6

-
-
-
-

g_option_context_get_help_enabled ()

-
gboolean
-g_option_context_get_help_enabled (GOptionContext *context);
-

Returns whether automatic --help generation -is turned on for context -. See g_option_context_set_help_enabled().

-
-

Parameters

-
----- - - - - - -

context

a GOptionContext

 
-
-
-

Returns

-

TRUE if automatic help generation is turned on.

-
-

Since: 2.6

-
-
-
-

g_option_context_set_ignore_unknown_options ()

-
void
-g_option_context_set_ignore_unknown_options
-                               (GOptionContext *context,
-                                gboolean ignore_unknown);
-

Sets whether to ignore unknown options or not. If an argument is -ignored, it is left in the argv - array after parsing. By default, -g_option_context_parse() treats unknown options as error.

-

This setting does not affect non-option arguments (i.e. arguments -which don't start with a dash). But note that GOption cannot reliably -determine whether a non-option belongs to a preceding unknown option.

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GOptionContext

 

ignore_unknown

TRUE to ignore unknown options, FALSE to produce -an error when unknown options are met

 
-
-

Since: 2.6

-
-
-
-

g_option_context_get_ignore_unknown_options ()

-
gboolean
-g_option_context_get_ignore_unknown_options
-                               (GOptionContext *context);
-

Returns whether unknown options are ignored or not. See -g_option_context_set_ignore_unknown_options().

-
-

Parameters

-
----- - - - - - -

context

a GOptionContext

 
-
-
-

Returns

-

TRUE if unknown options are ignored.

-
-

Since: 2.6

-
-
-
-

g_option_context_get_help ()

-
gchar *
-g_option_context_get_help (GOptionContext *context,
-                           gboolean main_help,
-                           GOptionGroup *group);
-

Returns a formatted, translated help text for the given context. -To obtain the text produced by --help, call -g_option_context_get_help (context, TRUE, NULL). -To obtain the text produced by --help-all, call -g_option_context_get_help (context, FALSE, NULL). -To obtain the help text for an option group, call -g_option_context_get_help (context, FALSE, group).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

context

a GOptionContext

 

main_help

if TRUE, only include the main group

 

group

the GOptionGroup to create help for, or NULL.

[nullable]
-
-
-

Returns

-

A newly allocated string containing the help text

-
-

Since: 2.14

-
-
-
-

g_option_context_get_strict_posix ()

-
gboolean
-g_option_context_get_strict_posix (GOptionContext *context);
-

Returns whether strict POSIX code is enabled.

-

See g_option_context_set_strict_posix() for more information.

-
-

Parameters

-
----- - - - - - -

context

a GoptionContext

 
-
-
-

Returns

-

TRUE if strict POSIX is enabled, FALSE otherwise.

-
-

Since: 2.44

-
-
-
-

g_option_context_set_strict_posix ()

-
void
-g_option_context_set_strict_posix (GOptionContext *context,
-                                   gboolean strict_posix);
-

Sets strict POSIX mode.

-

By default, this mode is disabled.

-

In strict POSIX mode, the first non-argument parameter encountered -(eg: filename) terminates argument processing. Remaining arguments -are treated as non-options and are not attempted to be parsed.

-

If strict POSIX mode is disabled then parsing is done in the GNU way -where option arguments can be freely mixed with non-options.

-

As an example, consider "ls foo -l". With GNU style parsing, this -will list "foo" in long mode. In strict POSIX style, this will list -the files named "foo" and "-l".

-

It may be useful to force strict POSIX mode when creating "verb -style" command line tools. For example, the "gsettings" command line -tool supports the global option "--schemadir" as well as many -subcommands ("get", "set", etc.) which each have their own set of -arguments. Using strict POSIX mode will allow parsing the global -options up to the verb name while leaving the remaining options to be -parsed by the relevant subcommand (which can be determined by -examining the verb name, which should be present in argv[1] after -parsing).

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GoptionContext

 

strict_posix

the new value

 
-
-

Since: 2.44

-
-
-
-

g_option_context_add_main_entries ()

-
void
-g_option_context_add_main_entries (GOptionContext *context,
-                                   const GOptionEntry *entries,
-                                   const gchar *translation_domain);
-

A convenience function which creates a main group if it doesn't -exist, adds the entries - to it and sets the translation domain.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

context

a GOptionContext

 

entries

a NULL-terminated array of GOptionEntrys

 

translation_domain

a translation domain to use for translating -the --help output for the options in entries -with gettext(), or NULL.

[nullable]
-
-

Since: 2.6

-
-
-
-

g_option_context_add_group ()

-
void
-g_option_context_add_group (GOptionContext *context,
-                            GOptionGroup *group);
-

Adds a GOptionGroup to the context -, so that parsing with context - -will recognize the options in the group. Note that this will take -ownership of the group - and thus the group - should not be freed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GOptionContext

 

group

the group to add.

[transfer full]
-
-

Since: 2.6

-
-
-
-

g_option_context_set_main_group ()

-
void
-g_option_context_set_main_group (GOptionContext *context,
-                                 GOptionGroup *group);
-

Sets a GOptionGroup as main group of the context -. -This has the same effect as calling g_option_context_add_group(), -the only difference is that the options in the main group are -treated differently when generating --help output.

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GOptionContext

 

group

the group to set as main group.

[transfer full]
-
-

Since: 2.6

-
-
-
-

g_option_context_get_main_group ()

-
GOptionGroup *
-g_option_context_get_main_group (GOptionContext *context);
-

Returns a pointer to the main group of context -.

-
-

Parameters

-
----- - - - - - -

context

a GOptionContext

 
-
-
-

Returns

-

the main group of context -, or NULL if -context -doesn't have a main group. Note that group belongs to -context -and should not be modified or freed.

-

[transfer none]

-
-

Since: 2.6

-
-
-
-

g_option_group_new ()

-
GOptionGroup *
-g_option_group_new (const gchar *name,
-                    const gchar *description,
-                    const gchar *help_description,
-                    gpointer user_data,
-                    GDestroyNotify destroy);
-

Creates a new GOptionGroup.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

the name for the option group, this is used to provide -help for the options in this group with --help-name -

 

description

a description for this group to be shown in ---help. This string is translated using the translation -domain or translation function of the group

 

help_description

a description for the --help-name -option. -This string is translated using the translation domain or translation function -of the group

 

user_data

user data that will be passed to the pre- and post-parse hooks, -the error hook and to callbacks of G_OPTION_ARG_CALLBACK options, or NULL.

[nullable]

destroy

a function that will be called to free user_data -, or NULL.

[nullable]
-
-
-

Returns

-

a newly created option group. It should be added -to a GOptionContext or freed with g_option_group_unref().

-
-

Since: 2.6

-
-
-
-

g_option_group_ref ()

-
GOptionGroup *
-g_option_group_ref (GOptionGroup *group);
-

Increments the reference count of group - by one.

-
-

Parameters

-
----- - - - - - -

group

a GOptionGroup

 
-
-
-

Returns

-

a GoptionGroup

-
-

Since: 2.44

-
-
-
-

g_option_group_unref ()

-
void
-g_option_group_unref (GOptionGroup *group);
-

Decrements the reference count of group - by one. -If the reference count drops to 0, the group - will be freed. -and all memory allocated by the group - is released.

-
-

Parameters

-
----- - - - - - -

group

a GOptionGroup

 
-
-

Since: 2.44

-
-
-
-

g_option_group_free ()

-
void
-g_option_group_free (GOptionGroup *group);
-
-

g_option_group_free has been deprecated since version 2.44 and should not be used in newly-written code.

-

Use g_option_group_unref() instead.

-
-

Frees a GOptionGroup. Note that you must not free groups -which have been added to a GOptionContext.

-
-

Parameters

-
----- - - - - - -

group

a GOptionGroup

 
-
-

Since: 2.6

-
-
-
-

g_option_group_add_entries ()

-
void
-g_option_group_add_entries (GOptionGroup *group,
-                            const GOptionEntry *entries);
-

Adds the options specified in entries - to group -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

group

a GOptionGroup

 

entries

a NULL-terminated array of GOptionEntrys

 
-
-

Since: 2.6

-
-
-
-

GOptionParseFunc ()

-
gboolean
-(*GOptionParseFunc) (GOptionContext *context,
-                     GOptionGroup *group,
-                     gpointer data,
-                     GError **error);
-

The type of function that can be called before and after parsing.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

context

The active GOptionContext

 

group

The group to which the function belongs

 

data

User data added to the GOptionGroup containing the option when it -was created with g_option_group_new()

 

error

A return location for error details

 
-
-
-

Returns

-

TRUE if the function completed successfully, FALSE if an error -occurred, in which case error -should be set with g_set_error()

-
-
-
-
-

g_option_group_set_parse_hooks ()

-
void
-g_option_group_set_parse_hooks (GOptionGroup *group,
-                                GOptionParseFunc pre_parse_func,
-                                GOptionParseFunc post_parse_func);
-

Associates two functions with group - which will be called -from g_option_context_parse() before the first option is parsed -and after the last option has been parsed, respectively.

-

Note that the user data to be passed to pre_parse_func - and -post_parse_func - can be specified when constructing the group -with g_option_group_new().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

group

a GOptionGroup

 

pre_parse_func

a function to call before parsing, or NULL.

[nullable]

post_parse_func

a function to call after parsing, or NULL.

[nullable]
-
-

Since: 2.6

-
-
-
-

GOptionErrorFunc ()

-
void
-(*GOptionErrorFunc) (GOptionContext *context,
-                     GOptionGroup *group,
-                     gpointer data,
-                     GError **error);
-

The type of function to be used as callback when a parse error occurs.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

context

The active GOptionContext

 

group

The group to which the function belongs

 

data

User data added to the GOptionGroup containing the option when it -was created with g_option_group_new()

 

error

The GError containing details about the parse error

 
-
-
-
-
-

g_option_group_set_error_hook ()

-
void
-g_option_group_set_error_hook (GOptionGroup *group,
-                               GOptionErrorFunc error_func);
-

Associates a function with group - which will be called -from g_option_context_parse() when an error occurs.

-

Note that the user data to be passed to error_func - can be -specified when constructing the group with g_option_group_new().

-
-

Parameters

-
----- - - - - - - - - - - - - -

group

a GOptionGroup

 

error_func

a function to call when an error occurs

 
-
-

Since: 2.6

-
-
-
-

g_option_group_set_translate_func ()

-
void
-g_option_group_set_translate_func (GOptionGroup *group,
-                                   GTranslateFunc func,
-                                   gpointer data,
-                                   GDestroyNotify destroy_notify);
-

Sets the function which is used to translate user-visible strings, -for --help output. Different groups can use different -GTranslateFuncs. If func - is NULL, strings are not translated.

-

If you are using gettext(), you only need to set the translation -domain, see g_option_group_set_translation_domain().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

group

a GOptionGroup

 

func

the GTranslateFunc, or NULL.

[nullable]

data

user data to pass to func -, or NULL.

[nullable]

destroy_notify

a function which gets called to free data -, or NULL.

[nullable]
-
-

Since: 2.6

-
-
-
-

g_option_group_set_translation_domain ()

-
void
-g_option_group_set_translation_domain (GOptionGroup *group,
-                                       const gchar *domain);
-

A convenience function to use gettext() for translating -user-visible strings.

-
-

Parameters

-
----- - - - - - - - - - - - - -

group

a GOptionGroup

 

domain

the domain to use

 
-
-

Since: 2.6

-
-
-
-

Types and Values

-
-

enum GOptionError

-

Error codes returned by option parsing.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_OPTION_ERROR_UNKNOWN_OPTION

-

An option was not known to the parser. - This error will only be reported, if the parser hasn't been instructed - to ignore unknown options, see g_option_context_set_ignore_unknown_options().

-
 

G_OPTION_ERROR_BAD_VALUE

-

A value couldn't be parsed.

-
 

G_OPTION_ERROR_FAILED

-

A GOptionArgFunc callback failed.

-
 
-
-
-
-
-

G_OPTION_ERROR

-
#define G_OPTION_ERROR (g_option_error_quark ())
-
-

Error domain for option parsing. Errors in this domain will -be from the GOptionError enumeration. See GError for information on -error domains.

-
-
-
-

GOptionContext

-
typedef struct _GOptionContext GOptionContext;
-

A GOptionContext struct defines which options -are accepted by the commandline option parser. The struct has only private -fields and should not be directly accessed.

-
-
-
-

enum GOptionArg

-

The GOptionArg enum values determine which type of extra argument the -options expect to find. If an option expects an extra argument, it can -be specified in several ways; with a short option: -x arg, with a long -option: --name arg or combined in a single argument: --name=arg.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_OPTION_ARG_NONE

-

No extra argument. This is useful for simple flags.

-
 

G_OPTION_ARG_STRING

-

The option takes a string argument.

-
 

G_OPTION_ARG_INT

-

The option takes an integer argument.

-
 

G_OPTION_ARG_CALLBACK

-

The option provides a callback (of type - GOptionArgFunc) to parse the extra argument.

-
 

G_OPTION_ARG_FILENAME

-

The option takes a filename as argument.

-
 

G_OPTION_ARG_STRING_ARRAY

-

The option takes a string argument, multiple - uses of the option are collected into an array of strings.

-
 

G_OPTION_ARG_FILENAME_ARRAY

-

The option takes a filename as argument, - multiple uses of the option are collected into an array of strings.

-
 

G_OPTION_ARG_DOUBLE

-

The option takes a double argument. The argument - can be formatted either for the user's locale or for the "C" locale. - Since 2.12

-
 

G_OPTION_ARG_INT64

-

The option takes a 64-bit integer. Like - G_OPTION_ARG_INT but for larger numbers. The number can be in - decimal base, or in hexadecimal (when prefixed with 0x, for - example, 0xffffffff). Since 2.12

-
 
-
-
-
-
-

enum GOptionFlags

-

Flags which modify individual options.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_OPTION_FLAG_NONE

-

No flags. Since: 2.42.

-
 

G_OPTION_FLAG_HIDDEN

-

The option doesn't appear in --help output.

-
 

G_OPTION_FLAG_IN_MAIN

-

The option appears in the main section of the - --help output, even if it is defined in a group.

-
 

G_OPTION_FLAG_REVERSE

-

For options of the G_OPTION_ARG_NONE kind, this - flag indicates that the sense of the option is reversed.

-
 

G_OPTION_FLAG_NO_ARG

-

For options of the G_OPTION_ARG_CALLBACK kind, - this flag indicates that the callback does not take any argument - (like a G_OPTION_ARG_NONE option). Since 2.8

-
 

G_OPTION_FLAG_FILENAME

-

For options of the G_OPTION_ARG_CALLBACK - kind, this flag indicates that the argument should be passed to the - callback in the GLib filename encoding rather than UTF-8. Since 2.8

-
 

G_OPTION_FLAG_OPTIONAL_ARG

-

For options of the G_OPTION_ARG_CALLBACK - kind, this flag indicates that the argument supply is optional. - If no argument is given then data of GOptionParseFunc will be - set to NULL. Since 2.8

-
 

G_OPTION_FLAG_NOALIAS

-

This flag turns off the automatic conflict - resolution which prefixes long option names with groupname- if - there is a conflict. This option should only be used in situations - where aliasing is necessary to model some legacy commandline interface. - It is not safe to use this option, unless all option groups are under - your direct control. Since 2.8.

-
 
-
-
-
-
-

G_OPTION_REMAINING

-
#define G_OPTION_REMAINING ""
-
-

If a long option in the main group has this name, it is not treated as a -regular option. Instead it collects all non-option arguments which would -otherwise be left in argv. The option must be of type -G_OPTION_ARG_CALLBACK, G_OPTION_ARG_STRING_ARRAY -or G_OPTION_ARG_FILENAME_ARRAY.

-

Using G_OPTION_REMAINING instead of simply scanning argv -for leftover arguments has the advantage that GOption takes care of -necessary encoding conversions for strings or filenames.

-

Since: 2.6

-
-
-
-

struct GOptionEntry

-
struct GOptionEntry {
-  const gchar *long_name;
-  gchar        short_name;
-  gint         flags;
-
-  GOptionArg   arg;
-  gpointer     arg_data;
-  
-  const gchar *description;
-  const gchar *arg_description;
-};
-
-

A GOptionEntry struct defines a single option. To have an effect, they -must be added to a GOptionGroup with g_option_context_add_main_entries() -or g_option_group_add_entries().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

const gchar *long_name;

The long name of an option can be used to specify it -in a commandline as --long_name. Every option must have a -long name. To resolve conflicts if multiple option groups contain -the same long name, it is also possible to specify the option as ---groupname-long_name.

 

gchar short_name;

If an option has a short name, it can be specified --short_name in a commandline. short_name -must be a printable -ASCII character different from '-', or zero if the option has no -short name.

 

gint flags;

Flags from GOptionFlags

 

GOptionArg arg;

The type of the option, as a GOptionArg

 

gpointer arg_data;

-

If the arg -type is G_OPTION_ARG_CALLBACK, then arg_data -must point to a GOptionArgFunc callback function, which will be -called to handle the extra argument. Otherwise, arg_data -is a -pointer to a location to store the value, the required type of -the location depends on the arg -type:

-
-
 

const gchar *description;

the description for the option in --help -output. The description -is translated using the translate_func -of the group, see g_option_group_set_translation_domain().

 

const gchar *arg_description;

The placeholder to use for the extra argument parsed -by the option in --help output. The arg_description -is translated -using the translate_func -of the group, see -g_option_group_set_translation_domain().

 
-
-
-
-
-

GOptionGroup

-
typedef struct _GOptionGroup GOptionGroup;
-

A GOptionGroup struct defines the options in a single -group. The struct has only private fields and should not be directly accessed.

-

All options in a group share the same translation function. Libraries which -need to parse commandline options are expected to provide a function for -getting a GOptionGroup holding their options, which -the application can then add to its GOptionContext.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Data-Checksums.html b/docs/reference/glib/html/glib-Data-Checksums.html deleted file mode 100644 index 5a9c17dd5..000000000 --- a/docs/reference/glib/html/glib-Data-Checksums.html +++ /dev/null @@ -1,645 +0,0 @@ - - - - -Data Checksums: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Data Checksums

-

Data Checksums — computes the checksum for data

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gssize - -g_checksum_type_get_length () -
-GChecksum * - -g_checksum_new () -
-GChecksum * - -g_checksum_copy () -
-void - -g_checksum_free () -
-void - -g_checksum_reset () -
-void - -g_checksum_update () -
const gchar * - -g_checksum_get_string () -
-void - -g_checksum_get_digest () -
-gchar * - -g_compute_checksum_for_data () -
-gchar * - -g_compute_checksum_for_string () -
-gchar * - -g_compute_checksum_for_bytes () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
enumGChecksumType
 GChecksum
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GLib provides a generic API for computing checksums (or "digests") -for a sequence of arbitrary bytes, using various hashing algorithms -like MD5, SHA-1 and SHA-256. Checksums are commonly used in various -environments and specifications.

-

GLib supports incremental checksums using the GChecksum data -structure, by calling g_checksum_update() as long as there's data -available and then using g_checksum_get_string() or -g_checksum_get_digest() to compute the checksum and return it either -as a string in hexadecimal form, or as a raw sequence of bytes. To -compute the checksum for binary blobs and NUL-terminated strings in -one go, use the convenience functions g_compute_checksum_for_data() -and g_compute_checksum_for_string(), respectively.

-

Support for checksums has been added in GLib 2.16

-
-
-

Functions

-
-

g_checksum_type_get_length ()

-
gssize
-g_checksum_type_get_length (GChecksumType checksum_type);
-

Gets the length in bytes of digests of type checksum_type -

-
-

Parameters

-
----- - - - - - -

checksum_type

a GChecksumType

 
-
-
-

Returns

-

the checksum length, or -1 if checksum_type -is -not supported.

-
-

Since: 2.16

-
-
-
-

g_checksum_new ()

-
GChecksum *
-g_checksum_new (GChecksumType checksum_type);
-

Creates a new GChecksum, using the checksum algorithm checksum_type -. -If the checksum_type - is not known, NULL is returned. -A GChecksum can be used to compute the checksum, or digest, of an -arbitrary binary blob, using different hashing algorithms.

-

A GChecksum works by feeding a binary blob through g_checksum_update() -until there is data to be checked; the digest can then be extracted -using g_checksum_get_string(), which will return the checksum as a -hexadecimal string; or g_checksum_get_digest(), which will return a -vector of raw bytes. Once either g_checksum_get_string() or -g_checksum_get_digest() have been called on a GChecksum, the checksum -will be closed and it won't be possible to call g_checksum_update() -on it anymore.

-
-

Parameters

-
----- - - - - - -

checksum_type

the desired type of checksum

 
-
-
-

Returns

-

the newly created GChecksum, or NULL. -Use g_checksum_free() to free the memory allocated by it.

-

[transfer full]

-
-

Since: 2.16

-
-
-
-

g_checksum_copy ()

-
GChecksum *
-g_checksum_copy (const GChecksum *checksum);
-

Copies a GChecksum. If checksum - has been closed, by calling -g_checksum_get_string() or g_checksum_get_digest(), the copied -checksum will be closed as well.

-
-

Parameters

-
----- - - - - - -

checksum

the GChecksum to copy

 
-
-
-

Returns

-

the copy of the passed GChecksum. Use g_checksum_free() -when finished using it.

-
-

Since: 2.16

-
-
-
-

g_checksum_free ()

-
void
-g_checksum_free (GChecksum *checksum);
-

Frees the memory allocated for checksum -.

-
-

Parameters

-
----- - - - - - -

checksum

a GChecksum

 
-
-

Since: 2.16

-
-
-
-

g_checksum_reset ()

-
void
-g_checksum_reset (GChecksum *checksum);
-

Resets the state of the checksum - back to its initial state.

-
-

Parameters

-
----- - - - - - -

checksum

the GChecksum to reset

 
-
-

Since: 2.18

-
-
-
-

g_checksum_update ()

-
void
-g_checksum_update (GChecksum *checksum,
-                   const guchar *data,
-                   gssize length);
-

Feeds data - into an existing GChecksum. The checksum must still be -open, that is g_checksum_get_string() or g_checksum_get_digest() must -not have been called on checksum -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

checksum

a GChecksum

 

data

buffer used to compute the checksum.

[array length=length][element-type guint8]

length

size of the buffer, or -1 if it is a null-terminated string.

 
-
-

Since: 2.16

-
-
-
-

g_checksum_get_string ()

-
const gchar *
-g_checksum_get_string (GChecksum *checksum);
-

Gets the digest as an hexadecimal string.

-

Once this function has been called the GChecksum can no longer be -updated with g_checksum_update().

-

The hexadecimal characters will be lower case.

-
-

Parameters

-
----- - - - - - -

checksum

a GChecksum

 
-
-
-

Returns

-

the hexadecimal representation of the checksum. The -returned string is owned by the checksum and should not be modified -or freed.

-
-

Since: 2.16

-
-
-
-

g_checksum_get_digest ()

-
void
-g_checksum_get_digest (GChecksum *checksum,
-                       guint8 *buffer,
-                       gsize *digest_len);
-

Gets the digest from checksum - as a raw binary vector and places it -into buffer -. The size of the digest depends on the type of checksum.

-

Once this function has been called, the GChecksum is closed and can -no longer be updated with g_checksum_update().

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

checksum

a GChecksum

 

buffer

output buffer

 

digest_len

an inout parameter. The caller initializes it to the size of buffer -. -After the call it contains the length of the digest.

 
-
-

Since: 2.16

-
-
-
-

g_compute_checksum_for_data ()

-
gchar *
-g_compute_checksum_for_data (GChecksumType checksum_type,
-                             const guchar *data,
-                             gsize length);
-

Computes the checksum for a binary data - of length -. This is a -convenience wrapper for g_checksum_new(), g_checksum_get_string() -and g_checksum_free().

-

The hexadecimal string returned will be in lower case.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

checksum_type

a GChecksumType

 

data

binary blob to compute the digest of.

[array length=length][element-type guint8]

length

length of data -

 
-
-
-

Returns

-

the digest of the binary data as a string in hexadecimal. -The returned string should be freed with g_free() when done using it.

-
-

Since: 2.16

-
-
-
-

g_compute_checksum_for_string ()

-
gchar *
-g_compute_checksum_for_string (GChecksumType checksum_type,
-                               const gchar *str,
-                               gssize length);
-

Computes the checksum of a string.

-

The hexadecimal string returned will be in lower case.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

checksum_type

a GChecksumType

 

str

the string to compute the checksum of

 

length

the length of the string, or -1 if the string is null-terminated.

 
-
-
-

Returns

-

the checksum as a hexadecimal string. The returned string -should be freed with g_free() when done using it.

-
-

Since: 2.16

-
-
-
-

g_compute_checksum_for_bytes ()

-
gchar *
-g_compute_checksum_for_bytes (GChecksumType checksum_type,
-                              GBytes *data);
-

Computes the checksum for a binary data -. This is a -convenience wrapper for g_checksum_new(), g_checksum_get_string() -and g_checksum_free().

-

The hexadecimal string returned will be in lower case.

-
-

Parameters

-
----- - - - - - - - - - - - - -

checksum_type

a GChecksumType

 

data

binary blob to compute the digest of

 
-
-
-

Returns

-

the digest of the binary data as a string in hexadecimal. -The returned string should be freed with g_free() when done using it.

-
-

Since: 2.34

-
-
-
-

Types and Values

-
-

enum GChecksumType

-

The hashing algorithm to be used by GChecksum when performing the -digest of some data.

-

Note that the GChecksumType enumeration may be extended at a later -date to include new hashing algorithm types.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_CHECKSUM_MD5

-

Use the MD5 hashing algorithm

-
 

G_CHECKSUM_SHA1

-

Use the SHA-1 hashing algorithm

-
 

G_CHECKSUM_SHA256

-

Use the SHA-256 hashing algorithm

-
 

G_CHECKSUM_SHA512

-

Use the SHA-512 hashing algorithm (Since: 2.36)

-
 

G_CHECKSUM_SHA384

-

Use the SHA-384 hashing algorithm (Since: 2.51)

-
 
-
-

Since: 2.16

-
-
-
-

GChecksum

-
typedef struct _GChecksum GChecksum;
-

An opaque structure representing a checksumming operation. -To create a new GChecksum, use g_checksum_new(). To free -a GChecksum, use g_checksum_free().

-

Since: 2.16

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Data-HMACs.html b/docs/reference/glib/html/glib-Data-HMACs.html deleted file mode 100644 index 04f8fadb1..000000000 --- a/docs/reference/glib/html/glib-Data-HMACs.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - -Secure HMAC Digests: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Secure HMAC Digests

-

Secure HMAC Digests — computes the HMAC for data

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GHmac * - -g_hmac_new () -
-GHmac * - -g_hmac_copy () -
-GHmac * - -g_hmac_ref () -
-void - -g_hmac_unref () -
-void - -g_hmac_update () -
const gchar * - -g_hmac_get_string () -
-void - -g_hmac_get_digest () -
-gchar * - -g_compute_hmac_for_data () -
-gchar * - -g_compute_hmac_for_string () -
-gchar * - -g_compute_hmac_for_bytes () -
-
-
-

Types and Values

-
---- - - - - -
 GHmac
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

HMACs should be used when producing a cookie or hash based on data -and a key. Simple mechanisms for using SHA1 and other algorithms to -digest a key and data together are vulnerable to various security -issues. -HMAC -uses algorithms like SHA1 in a secure way to produce a digest of a -key and data.

-

Both the key and data are arbitrary byte arrays of bytes or characters.

-

Support for HMAC Digests has been added in GLib 2.30, and support for SHA-512 -in GLib 2.42. Support for SHA-384 was added in GLib 2.52.

-
-
-

Functions

-
-

g_hmac_new ()

-
GHmac *
-g_hmac_new (GChecksumType digest_type,
-            const guchar *key,
-            gsize key_len);
-

Creates a new GHmac, using the digest algorithm digest_type -. -If the digest_type - is not known, NULL is returned. -A GHmac can be used to compute the HMAC of a key and an -arbitrary binary blob, using different hashing algorithms.

-

A GHmac works by feeding a binary blob through g_hmac_update() -until the data is complete; the digest can then be extracted -using g_hmac_get_string(), which will return the checksum as a -hexadecimal string; or g_hmac_get_digest(), which will return a -array of raw bytes. Once either g_hmac_get_string() or -g_hmac_get_digest() have been called on a GHmac, the HMAC -will be closed and it won't be possible to call g_hmac_update() -on it anymore.

-

Support for digests of type G_CHECKSUM_SHA512 has been added in GLib 2.42. -Support for G_CHECKSUM_SHA384 was added in GLib 2.52.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

digest_type

the desired type of digest

 

key

the key for the HMAC.

[array length=key_len]

key_len

the length of the keys

 
-
-
-

Returns

-

the newly created GHmac, or NULL. -Use g_hmac_unref() to free the memory allocated by it.

-
-

Since: 2.30

-
-
-
-

g_hmac_copy ()

-
GHmac *
-g_hmac_copy (const GHmac *hmac);
-

Copies a GHmac. If hmac - has been closed, by calling -g_hmac_get_string() or g_hmac_get_digest(), the copied -HMAC will be closed as well.

-
-

Parameters

-
----- - - - - - -

hmac

the GHmac to copy

 
-
-
-

Returns

-

the copy of the passed GHmac. Use g_hmac_unref() -when finished using it.

-
-

Since: 2.30

-
-
-
-

g_hmac_ref ()

-
GHmac *
-g_hmac_ref (GHmac *hmac);
-

Atomically increments the reference count of hmac - by one.

-

This function is MT-safe and may be called from any thread.

-
-

Parameters

-
----- - - - - - -

hmac

a valid GHmac

 
-
-
-

Returns

-

the passed in GHmac.

-
-

Since: 2.30

-
-
-
-

g_hmac_unref ()

-
void
-g_hmac_unref (GHmac *hmac);
-

Atomically decrements the reference count of hmac - by one.

-

If the reference count drops to 0, all keys and values will be -destroyed, and all memory allocated by the hash table is released. -This function is MT-safe and may be called from any thread. -Frees the memory allocated for hmac -.

-
-

Parameters

-
----- - - - - - -

hmac

a GHmac

 
-
-

Since: 2.30

-
-
-
-

g_hmac_update ()

-
void
-g_hmac_update (GHmac *hmac,
-               const guchar *data,
-               gssize length);
-

Feeds data - into an existing GHmac.

-

The HMAC must still be open, that is g_hmac_get_string() or -g_hmac_get_digest() must not have been called on hmac -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

hmac

a GHmac

 

data

buffer used to compute the checksum.

[array length=length]

length

size of the buffer, or -1 if it is a nul-terminated string

 
-
-

Since: 2.30

-
-
-
-

g_hmac_get_string ()

-
const gchar *
-g_hmac_get_string (GHmac *hmac);
-

Gets the HMAC as an hexadecimal string.

-

Once this function has been called the GHmac can no longer be -updated with g_hmac_update().

-

The hexadecimal characters will be lower case.

-
-

Parameters

-
----- - - - - - -

hmac

a GHmac

 
-
-
-

Returns

-

the hexadecimal representation of the HMAC. The -returned string is owned by the HMAC and should not be modified -or freed.

-
-

Since: 2.30

-
-
-
-

g_hmac_get_digest ()

-
void
-g_hmac_get_digest (GHmac *hmac,
-                   guint8 *buffer,
-                   gsize *digest_len);
-

Gets the digest from checksum - as a raw binary array and places it -into buffer -. The size of the digest depends on the type of checksum.

-

Once this function has been called, the GHmac is closed and can -no longer be updated with g_checksum_update().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

hmac

a GHmac

 

buffer

output buffer

 

digest_len

an inout parameter. The caller initializes it to the -size of buffer -. After the call it contains the length of the digest

 
-
-

Since: 2.30

-
-
-
-

g_compute_hmac_for_data ()

-
gchar *
-g_compute_hmac_for_data (GChecksumType digest_type,
-                         const guchar *key,
-                         gsize key_len,
-                         const guchar *data,
-                         gsize length);
-

Computes the HMAC for a binary data - of length -. This is a -convenience wrapper for g_hmac_new(), g_hmac_get_string() -and g_hmac_unref().

-

The hexadecimal string returned will be in lower case.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

digest_type

a GChecksumType to use for the HMAC

 

key

the key to use in the HMAC.

[array length=key_len]

key_len

the length of the key

 

data

binary blob to compute the HMAC of.

[array length=length]

length

length of data -

 
-
-
-

Returns

-

the HMAC of the binary data as a string in hexadecimal. -The returned string should be freed with g_free() when done using it.

-
-

Since: 2.30

-
-
-
-

g_compute_hmac_for_string ()

-
gchar *
-g_compute_hmac_for_string (GChecksumType digest_type,
-                           const guchar *key,
-                           gsize key_len,
-                           const gchar *str,
-                           gssize length);
-

Computes the HMAC for a string.

-

The hexadecimal string returned will be in lower case.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

digest_type

a GChecksumType to use for the HMAC

 

key

the key to use in the HMAC.

[array length=key_len]

key_len

the length of the key

 

str

the string to compute the HMAC for

 

length

the length of the string, or -1 if the string is nul-terminated

 
-
-
-

Returns

-

the HMAC as a hexadecimal string. -The returned string should be freed with g_free() -when done using it.

-
-

Since: 2.30

-
-
-
-

g_compute_hmac_for_bytes ()

-
gchar *
-g_compute_hmac_for_bytes (GChecksumType digest_type,
-                          GBytes *key,
-                          GBytes *data);
-

Computes the HMAC for a binary data -. This is a -convenience wrapper for g_hmac_new(), g_hmac_get_string() -and g_hmac_unref().

-

The hexadecimal string returned will be in lower case.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

digest_type

a GChecksumType to use for the HMAC

 

key

the key to use in the HMAC

 

data

binary blob to compute the HMAC of

 
-
-
-

Returns

-

the HMAC of the binary data as a string in hexadecimal. -The returned string should be freed with g_free() when done using it.

-
-

Since: 2.50

-
-
-
-

Types and Values

-
-

GHmac

-
typedef struct _GHmac GHmac;
-

An opaque structure representing a HMAC operation. -To create a new GHmac, use g_hmac_new(). To free -a GHmac, use g_hmac_unref().

-

Since: 2.30

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Datasets.html b/docs/reference/glib/html/glib-Datasets.html deleted file mode 100644 index 3276b3db3..000000000 --- a/docs/reference/glib/html/glib-Datasets.html +++ /dev/null @@ -1,658 +0,0 @@ - - - - -Datasets: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Datasets

-

Datasets — associate groups of data elements with - particular memory locations

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -g_dataset_id_set_data() -
-void - -g_dataset_id_set_data_full () -
-void - -(*GDestroyNotify) () -
-gpointer - -g_dataset_id_get_data () -
#define -g_dataset_id_remove_data() -
-gpointer - -g_dataset_id_remove_no_notify () -
#define -g_dataset_set_data() -
#define -g_dataset_set_data_full() -
#define -g_dataset_get_data() -
#define -g_dataset_remove_data() -
#define -g_dataset_remove_no_notify() -
-void - -g_dataset_foreach () -
-void - -(*GDataForeachFunc) () -
-void - -g_dataset_destroy () -
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

Datasets associate groups of data elements with particular memory -locations. These are useful if you need to associate data with a -structure returned from an external library. Since you cannot modify -the structure, you use its location in memory as the key into a -dataset, where you can associate any number of data elements with it.

-

There are two forms of most of the dataset functions. The first form -uses strings to identify the data elements associated with a -location. The second form uses GQuark identifiers, which are -created with a call to g_quark_from_string() or -g_quark_from_static_string(). The second form is quicker, since it -does not require looking up the string in the hash table of GQuark -identifiers.

-

There is no function to create a dataset. It is automatically -created as soon as you add elements to it.

-

To add data elements to a dataset use g_dataset_id_set_data(), -g_dataset_id_set_data_full(), g_dataset_set_data() and -g_dataset_set_data_full().

-

To get data elements from a dataset use g_dataset_id_get_data() and -g_dataset_get_data().

-

To iterate over all data elements in a dataset use -g_dataset_foreach() (not thread-safe).

-

To remove data elements from a dataset use -g_dataset_id_remove_data() and g_dataset_remove_data().

-

To destroy a dataset, use g_dataset_destroy().

-
-
-

Functions

-
-

g_dataset_id_set_data()

-
#define             g_dataset_id_set_data(l, k, d)
-

Sets the data element associated with the given GQuark id. Any -previous data with the same key is removed, and its destroy function -is called.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

l

the location identifying the dataset.

 

k

the GQuark id to identify the data element.

 

d

the data element.

 
-
-
-
-
-

g_dataset_id_set_data_full ()

-
void
-g_dataset_id_set_data_full (gconstpointer dataset_location,
-                            GQuark key_id,
-                            gpointer data,
-                            GDestroyNotify destroy_func);
-

Sets the data element associated with the given GQuark id, and also -the function to call when the data element is destroyed. Any -previous data with the same key is removed, and its destroy function -is called.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

dataset_location

the location identifying the dataset.

[not nullable]

key_id

the GQuark id to identify the data element.

 

data

the data element.

 

destroy_func

the function to call when the data element is -removed. This function will be called with the data -element and can be used to free any memory allocated -for it.

 
-
-
-
-
-

GDestroyNotify ()

-
void
-(*GDestroyNotify) (gpointer data);
-

Specifies the type of function which is called when a data element -is destroyed. It is passed the pointer to the data element and -should free any memory and resources allocated for it.

-
-

Parameters

-
----- - - - - - -

data

the data element.

 
-
-
-
-
-

g_dataset_id_get_data ()

-
gpointer
-g_dataset_id_get_data (gconstpointer dataset_location,
-                       GQuark key_id);
-

Gets the data element corresponding to a GQuark.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dataset_location

the location identifying the dataset.

[not nullable]

key_id

the GQuark id to identify the data element.

 
-
-
-

Returns

-

the data element corresponding to the GQuark, or NULL if -it is not found.

-
-
-
-
-

g_dataset_id_remove_data()

-
#define             g_dataset_id_remove_data(l, k)
-

Removes a data element from a dataset. The data element's destroy -function is called if it has been set.

-
-

Parameters

-
----- - - - - - - - - - - - - -

l

the location identifying the dataset.

 

k

the GQuark id identifying the data element.

 
-
-
-
-
-

g_dataset_id_remove_no_notify ()

-
gpointer
-g_dataset_id_remove_no_notify (gconstpointer dataset_location,
-                               GQuark key_id);
-

Removes an element, without calling its destroy notification -function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dataset_location

the location identifying the dataset.

[not nullable]

key_id

the GQuark ID identifying the data element.

 
-
-
-

Returns

-

the data previously stored at key_id -, or NULL if none.

-
-
-
-
-

g_dataset_set_data()

-
#define             g_dataset_set_data(l, k, d)
-

Sets the data corresponding to the given string identifier.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

l

the location identifying the dataset.

 

k

the string to identify the data element.

 

d

the data element.

 
-
-
-
-
-

g_dataset_set_data_full()

-
#define             g_dataset_set_data_full(l, k, d, f)
-

Sets the data corresponding to the given string identifier, and the -function to call when the data element is destroyed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

l

the location identifying the dataset.

 

k

the string to identify the data element.

 

d

the data element.

 

f

the function to call when the data element is removed. This -function will be called with the data element and can be used to -free any memory allocated for it.

 
-
-
-
-
-

g_dataset_get_data()

-
#define             g_dataset_get_data(l, k)
-

Gets the data element corresponding to a string.

-
-

Parameters

-
----- - - - - - - - - - - - - -

l

the location identifying the dataset.

 

k

the string identifying the data element.

 
-
-
-

Returns

-

the data element corresponding to the string, or NULL if -it is not found.

-
-
-
-
-

g_dataset_remove_data()

-
#define             g_dataset_remove_data(l, k)
-

Removes a data element corresponding to a string. Its destroy -function is called if it has been set.

-
-

Parameters

-
----- - - - - - - - - - - - - -

l

the location identifying the dataset.

 

k

the string identifying the data element.

 
-
-
-
-
-

g_dataset_remove_no_notify()

-
#define             g_dataset_remove_no_notify(l, k)
-

Removes an element, without calling its destroy notifier.

-
-

Parameters

-
----- - - - - - - - - - - - - -

l

the location identifying the dataset.

 

k

the string identifying the data element.

 
-
-
-
-
-

g_dataset_foreach ()

-
void
-g_dataset_foreach (gconstpointer dataset_location,
-                   GDataForeachFunc func,
-                   gpointer user_data);
-

Calls the given function for each data element which is associated -with the given location. Note that this function is NOT thread-safe. -So unless datalist - can be protected from any modifications during -invocation of this function, it should not be called.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dataset_location

the location identifying the dataset.

[not nullable]

func

the function to call for each data element.

 

user_data

user data to pass to the function.

 
-
-
-
-
-

GDataForeachFunc ()

-
void
-(*GDataForeachFunc) (GQuark key_id,
-                     gpointer data,
-                     gpointer user_data);
-

Specifies the type of function passed to g_dataset_foreach(). It is -called with each GQuark id and associated data element, together -with the user_data - parameter supplied to g_dataset_foreach().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

key_id

the GQuark id to identifying the data element.

 

data

the data element.

 

user_data

user data passed to g_dataset_foreach().

 
-
-
-
-
-

g_dataset_destroy ()

-
void
-g_dataset_destroy (gconstpointer dataset_location);
-

Destroys the dataset, freeing all memory allocated, and calling any -destroy functions set for data elements.

-
-

Parameters

-
----- - - - - - -

dataset_location

the location identifying the dataset.

[not nullable]
-
-
-
-
-

Types and Values

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Date-and-Time-Functions.html b/docs/reference/glib/html/glib-Date-and-Time-Functions.html deleted file mode 100644 index df35e9488..000000000 --- a/docs/reference/glib/html/glib-Date-and-Time-Functions.html +++ /dev/null @@ -1,2775 +0,0 @@ - - - - -Date and Time Functions: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Date and Time Functions

-

Date and Time Functions — calendrical calculations and miscellaneous time stuff

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -g_get_current_time () -
-void - -g_usleep () -
-void - -g_time_val_add () -
-gboolean - -g_time_val_from_iso8601 () -
-gchar * - -g_time_val_to_iso8601 () -
-gint64 - -g_get_monotonic_time () -
-gint64 - -g_get_real_time () -
-GDate * - -g_date_new () -
-GDate * - -g_date_new_dmy () -
-GDate * - -g_date_new_julian () -
-void - -g_date_clear () -
-void - -g_date_free () -
-void - -g_date_set_day () -
-void - -g_date_set_month () -
-void - -g_date_set_year () -
-void - -g_date_set_dmy () -
-void - -g_date_set_julian () -
-void - -g_date_set_time () -
-void - -g_date_set_time_t () -
-void - -g_date_set_time_val () -
-void - -g_date_set_parse () -
-void - -g_date_add_days () -
-void - -g_date_subtract_days () -
-void - -g_date_add_months () -
-void - -g_date_subtract_months () -
-void - -g_date_add_years () -
-void - -g_date_subtract_years () -
-gint - -g_date_days_between () -
-gint - -g_date_compare () -
-void - -g_date_clamp () -
-void - -g_date_order () -
-GDateDay - -g_date_get_day () -
-GDateMonth - -g_date_get_month () -
-GDateYear - -g_date_get_year () -
-guint32 - -g_date_get_julian () -
-GDateWeekday - -g_date_get_weekday () -
-guint - -g_date_get_day_of_year () -
-guint8 - -g_date_get_days_in_month () -
-gboolean - -g_date_is_first_of_month () -
-gboolean - -g_date_is_last_of_month () -
-gboolean - -g_date_is_leap_year () -
-guint - -g_date_get_monday_week_of_year () -
-guint8 - -g_date_get_monday_weeks_in_year () -
-guint - -g_date_get_sunday_week_of_year () -
-guint8 - -g_date_get_sunday_weeks_in_year () -
-guint - -g_date_get_iso8601_week_of_year () -
-gsize - -g_date_strftime () -
-void - -g_date_to_struct_tm () -
-gboolean - -g_date_valid () -
-gboolean - -g_date_valid_day () -
-gboolean - -g_date_valid_month () -
-gboolean - -g_date_valid_year () -
-gboolean - -g_date_valid_dmy () -
-gboolean - -g_date_valid_julian () -
-gboolean - -g_date_valid_weekday () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#defineG_USEC_PER_SEC
structGTimeVal
structGDate
typedefGTime
enumGDateDMY
typedefGDateDay
enumGDateMonth
typedefGDateYear
enumGDateWeekday
#defineG_DATE_BAD_DAY
#defineG_DATE_BAD_JULIAN
#defineG_DATE_BAD_YEAR
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The GDate data structure represents a day between January 1, Year 1, -and sometime a few thousand years in the future (right now it will go -to the year 65535 or so, but g_date_set_parse() only parses up to the -year 8000 or so - just count on "a few thousand"). GDate is meant to -represent everyday dates, not astronomical dates or historical dates -or ISO timestamps or the like. It extrapolates the current Gregorian -calendar forward and backward in time; there is no attempt to change -the calendar to match time periods or locations. GDate does not store -time information; it represents a day.

-

The GDate implementation has several nice features; it is only a -64-bit struct, so storing large numbers of dates is very efficient. It -can keep both a Julian and day-month-year representation of the date, -since some calculations are much easier with one representation or the -other. A Julian representation is simply a count of days since some -fixed day in the past; for GDate the fixed day is January 1, 1 AD. -("Julian" dates in the GDate API aren't really Julian dates in the -technical sense; technically, Julian dates count from the start of the -Julian period, Jan 1, 4713 BC).

-

GDate is simple to use. First you need a "blank" date; you can get a -dynamically allocated date from g_date_new(), or you can declare an -automatic variable or array and initialize it to a sane state by -calling g_date_clear(). A cleared date is sane; it's safe to call -g_date_set_dmy() and the other mutator functions to initialize the -value of a cleared date. However, a cleared date is initially -invalid, meaning that it doesn't represent a day that exists. -It is undefined to call any of the date calculation routines on an -invalid date. If you obtain a date from a user or other -unpredictable source, you should check its validity with the -g_date_valid() predicate. g_date_valid() is also used to check for -errors with g_date_set_parse() and other functions that can -fail. Dates can be invalidated by calling g_date_clear() again.

-

It is very important to use the API to access the GDate -struct. Often only the day-month-year or only the Julian -representation is valid. Sometimes neither is valid. Use the API.

-

GLib also features GDateTime which represents a precise time.

-
-
-

Functions

-
-

g_get_current_time ()

-
void
-g_get_current_time (GTimeVal *result);
-

Equivalent to the UNIX gettimeofday() function, but portable.

-

You may find g_get_real_time() to be more convenient.

-
-

Parameters

-
----- - - - - - -

result

GTimeVal structure in which to store current time.

 
-
-
-
-
-

g_usleep ()

-
void
-g_usleep (gulong microseconds);
-

Pauses the current thread for the given number of microseconds.

-

There are 1 million microseconds per second (represented by the -G_USEC_PER_SEC macro). g_usleep() may have limited precision, -depending on hardware and operating system; don't rely on the exact -length of the sleep.

-
-

Parameters

-
----- - - - - - -

microseconds

number of microseconds to pause

 
-
-
-
-
-

g_time_val_add ()

-
void
-g_time_val_add (GTimeVal *time_,
-                glong microseconds);
-

Adds the given number of microseconds to time_ -. microseconds - can -also be negative to decrease the value of time_ -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

time_

a GTimeVal

 

microseconds

number of microseconds to add to time -

 
-
-
-
-
-

g_time_val_from_iso8601 ()

-
gboolean
-g_time_val_from_iso8601 (const gchar *iso_date,
-                         GTimeVal *time_);
-

Converts a string containing an ISO 8601 encoded date and time -to a GTimeVal and puts it into time_ -.

-

iso_date - must include year, month, day, hours, minutes, and -seconds. It can optionally include fractions of a second and a time -zone indicator. (In the absence of any time zone indication, the -timestamp is assumed to be in local time.)

-
-

Parameters

-
----- - - - - - - - - - - - - -

iso_date

an ISO 8601 encoded date string

 

time_

a GTimeVal.

[out]
-
-
-

Returns

-

TRUE if the conversion was successful.

-
-

Since: 2.12

-
-
-
-

g_time_val_to_iso8601 ()

-
gchar *
-g_time_val_to_iso8601 (GTimeVal *time_);
-

Converts time_ - into an RFC 3339 encoded string, relative to the -Coordinated Universal Time (UTC). This is one of the many formats -allowed by ISO 8601.

-

ISO 8601 allows a large number of date/time formats, with or without -punctuation and optional elements. The format returned by this function -is a complete date and time, with optional punctuation included, the -UTC time zone represented as "Z", and the tv_usec - part included if -and only if it is nonzero, i.e. either -"YYYY-MM-DDTHH:MM:SSZ" or "YYYY-MM-DDTHH:MM:SS.fffffZ".

-

This corresponds to the Internet date/time format defined by -RFC 3339, -and to either of the two most-precise formats defined by -the W3C Note -Date and Time Formats. -Both of these documents are profiles of ISO 8601.

-

Use g_date_time_format() or g_strdup_printf() if a different -variation of ISO 8601 format is required.

-
-

Parameters

-
----- - - - - - -

time_

a GTimeVal

 
-
-
-

Returns

-

a newly allocated string containing an ISO 8601 date

-
-

Since: 2.12

-
-
-
-

g_get_monotonic_time ()

-
gint64
-g_get_monotonic_time (void);
-

Queries the system monotonic time.

-

The monotonic clock will always increase and doesn't suffer -discontinuities when the user (or NTP) changes the system time. It -may or may not continue to tick during times where the machine is -suspended.

-

We try to use the clock that corresponds as closely as possible to -the passage of time as measured by system calls such as poll() but it -may not always be possible to do this.

-
-

Returns

-

the monotonic time, in microseconds

-
-

Since: 2.28

-
-
-
-

g_get_real_time ()

-
gint64
-g_get_real_time (void);
-

Queries the system wall-clock time.

-

This call is functionally equivalent to g_get_current_time() except -that the return value is often more convenient than dealing with a -GTimeVal.

-

You should only use this call if you are actually interested in the real -wall-clock time. g_get_monotonic_time() is probably more useful for -measuring intervals.

-
-

Returns

-

the number of microseconds since January 1, 1970 UTC.

-
-

Since: 2.28

-
-
-
-

g_date_new ()

-
GDate *
-g_date_new (void);
-

Allocates a GDate and initializes -it to a sane state. The new date will -be cleared (as if you'd called g_date_clear()) but invalid (it won't -represent an existing day). Free the return value with g_date_free().

-
-

Returns

-

a newly-allocated GDate

-
-
-
-
-

g_date_new_dmy ()

-
GDate *
-g_date_new_dmy (GDateDay day,
-                GDateMonth month,
-                GDateYear year);
-

Like g_date_new(), but also sets the value of the date. Assuming the -day-month-year triplet you pass in represents an existing day, the -returned date will be valid.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

day

day of the month

 

month

month of the year

 

year

year

 
-
-
-

Returns

-

a newly-allocated GDate initialized with day -, month -, and year -

-
-
-
-
-

g_date_new_julian ()

-
GDate *
-g_date_new_julian (guint32 julian_day);
-

Like g_date_new(), but also sets the value of the date. Assuming the -Julian day number you pass in is valid (greater than 0, less than an -unreasonably large number), the returned date will be valid.

-
-

Parameters

-
----- - - - - - -

julian_day

days since January 1, Year 1

 
-
-
-

Returns

-

a newly-allocated GDate initialized with julian_day -

-
-
-
-
-

g_date_clear ()

-
void
-g_date_clear (GDate *date,
-              guint n_dates);
-

Initializes one or more GDate structs to a sane but invalid -state. The cleared dates will not represent an existing date, but will -not contain garbage. Useful to init a date declared on the stack. -Validity can be tested with g_date_valid().

-
-

Parameters

-
----- - - - - - - - - - - - - -

date

pointer to one or more dates to clear

 

n_dates

number of dates to clear

 
-
-
-
-
-

g_date_free ()

-
void
-g_date_free (GDate *date);
-

Frees a GDate returned from g_date_new().

-
-

Parameters

-
----- - - - - - -

date

a GDate to free

 
-
-
-
-
-

g_date_set_day ()

-
void
-g_date_set_day (GDate *date,
-                GDateDay day);
-

Sets the day of the month for a GDate. If the resulting -day-month-year triplet is invalid, the date will be invalid.

-
-

Parameters

-
----- - - - - - - - - - - - - -

date

a GDate

 

day

day to set

 
-
-
-
-
-

g_date_set_month ()

-
void
-g_date_set_month (GDate *date,
-                  GDateMonth month);
-

Sets the month of the year for a GDate. If the resulting -day-month-year triplet is invalid, the date will be invalid.

-
-

Parameters

-
----- - - - - - - - - - - - - -

date

a GDate

 

month

month to set

 
-
-
-
-
-

g_date_set_year ()

-
void
-g_date_set_year (GDate *date,
-                 GDateYear year);
-

Sets the year for a GDate. If the resulting day-month-year -triplet is invalid, the date will be invalid.

-
-

Parameters

-
----- - - - - - - - - - - - - -

date

a GDate

 

year

year to set

 
-
-
-
-
-

g_date_set_dmy ()

-
void
-g_date_set_dmy (GDate *date,
-                GDateDay day,
-                GDateMonth month,
-                GDateYear y);
-

Sets the value of a GDate from a day, month, and year. -The day-month-year triplet must be valid; if you aren't -sure it is, call g_date_valid_dmy() to check before you -set it.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

date

a GDate

 

day

day

 

month

month

 

y

year

 
-
-
-
-
-

g_date_set_julian ()

-
void
-g_date_set_julian (GDate *date,
-                   guint32 julian_date);
-

Sets the value of a GDate from a Julian day number.

-
-

Parameters

-
----- - - - - - - - - - - - - -

date

a GDate

 

julian_date

Julian day number (days since January 1, Year 1)

 
-
-
-
-
-

g_date_set_time ()

-
void
-g_date_set_time (GDate *date,
-                 GTime time_);
-
-

g_date_set_time has been deprecated since version 2.10 and should not be used in newly-written code.

-

Use g_date_set_time_t() instead.

-
-

Sets the value of a date from a GTime value. -The time to date conversion is done using the user's current timezone.

-
-

Parameters

-
----- - - - - - - - - - - - - -

date

a GDate.

 

time_

GTime value to set.

 
-
-
-
-
-

g_date_set_time_t ()

-
void
-g_date_set_time_t (GDate *date,
-                   time_t timet);
-

Sets the value of a date to the date corresponding to a time -specified as a time_t. The time to date conversion is done using -the user's current timezone.

-

To set the value of a date to the current day, you could write:

-
- - - - - - - -
1
g_date_set_time_t (date, time (NULL));
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

date

a GDate

 

timet

time_t value to set

 
-
-

Since: 2.10

-
-
-
-

g_date_set_time_val ()

-
void
-g_date_set_time_val (GDate *date,
-                     GTimeVal *timeval);
-

Sets the value of a date from a GTimeVal value. Note that the -tv_usec - member is ignored, because GDate can't make use of the -additional precision.

-

The time to date conversion is done using the user's current timezone.

-
-

Parameters

-
----- - - - - - - - - - - - - -

date

a GDate

 

timeval

GTimeVal value to set

 
-
-

Since: 2.10

-
-
-
-

g_date_set_parse ()

-
void
-g_date_set_parse (GDate *date,
-                  const gchar *str);
-

Parses a user-inputted string str -, and try to figure out what date it -represents, taking the current locale into account. If the -string is successfully parsed, the date will be valid after the call. -Otherwise, it will be invalid. You should check using g_date_valid() -to see whether the parsing succeeded.

-

This function is not appropriate for file formats and the like; it -isn't very precise, and its exact behavior varies with the locale. -It's intended to be a heuristic routine that guesses what the user -means by a given string (and it does work pretty well in that -capacity).

-
-

Parameters

-
----- - - - - - - - - - - - - -

date

a GDate to fill in

 

str

string to parse

 
-
-
-
-
-

g_date_add_days ()

-
void
-g_date_add_days (GDate *date,
-                 guint n_days);
-

Increments a date some number of days. -To move forward by weeks, add weeks*7 days. -The date must be valid.

-
-

Parameters

-
----- - - - - - - - - - - - - -

date

a GDate to increment

 

n_days

number of days to move the date forward

 
-
-
-
-
-

g_date_subtract_days ()

-
void
-g_date_subtract_days (GDate *date,
-                      guint n_days);
-

Moves a date some number of days into the past. -To move by weeks, just move by weeks*7 days. -The date must be valid.

-
-

Parameters

-
----- - - - - - - - - - - - - -

date

a GDate to decrement

 

n_days

number of days to move

 
-
-
-
-
-

g_date_add_months ()

-
void
-g_date_add_months (GDate *date,
-                   guint n_months);
-

Increments a date by some number of months. -If the day of the month is greater than 28, -this routine may change the day of the month -(because the destination month may not have -the current day in it). The date must be valid.

-
-

Parameters

-
----- - - - - - - - - - - - - -

date

a GDate to increment

 

n_months

number of months to move forward

 
-
-
-
-
-

g_date_subtract_months ()

-
void
-g_date_subtract_months (GDate *date,
-                        guint n_months);
-

Moves a date some number of months into the past. -If the current day of the month doesn't exist in -the destination month, the day of the month -may change. The date must be valid.

-
-

Parameters

-
----- - - - - - - - - - - - - -

date

a GDate to decrement

 

n_months

number of months to move

 
-
-
-
-
-

g_date_add_years ()

-
void
-g_date_add_years (GDate *date,
-                  guint n_years);
-

Increments a date by some number of years. -If the date is February 29, and the destination -year is not a leap year, the date will be changed -to February 28. The date must be valid.

-
-

Parameters

-
----- - - - - - - - - - - - - -

date

a GDate to increment

 

n_years

number of years to move forward

 
-
-
-
-
-

g_date_subtract_years ()

-
void
-g_date_subtract_years (GDate *date,
-                       guint n_years);
-

Moves a date some number of years into the past. -If the current day doesn't exist in the destination -year (i.e. it's February 29 and you move to a non-leap-year) -then the day is changed to February 29. The date -must be valid.

-
-

Parameters

-
----- - - - - - - - - - - - - -

date

a GDate to decrement

 

n_years

number of years to move

 
-
-
-
-
-

g_date_days_between ()

-
gint
-g_date_days_between (const GDate *date1,
-                     const GDate *date2);
-

Computes the number of days between two dates. -If date2 - is prior to date1 -, the returned value is negative. -Both dates must be valid.

-
-

Parameters

-
----- - - - - - - - - - - - - -

date1

the first date

 

date2

the second date

 
-
-
-

Returns

-

the number of days between date1 -and date2 -

-
-
-
-
-

g_date_compare ()

-
gint
-g_date_compare (const GDate *lhs,
-                const GDate *rhs);
-

qsort()-style comparison function for dates. -Both dates must be valid.

-
-

Parameters

-
----- - - - - - - - - - - - - -

lhs

first date to compare

 

rhs

second date to compare

 
-
-
-

Returns

-

0 for equal, less than zero if lhs -is less than rhs -, -greater than zero if lhs -is greater than rhs -

-
-
-
-
-

g_date_clamp ()

-
void
-g_date_clamp (GDate *date,
-              const GDate *min_date,
-              const GDate *max_date);
-

If date - is prior to min_date -, sets date - equal to min_date -. -If date - falls after max_date -, sets date - equal to max_date -. -Otherwise, date - is unchanged. -Either of min_date - and max_date - may be NULL. -All non-NULL dates must be valid.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

date

a GDate to clamp

 

min_date

minimum accepted value for date -

 

max_date

maximum accepted value for date -

 
-
-
-
-
-

g_date_order ()

-
void
-g_date_order (GDate *date1,
-              GDate *date2);
-

Checks if date1 - is less than or equal to date2 -, -and swap the values if this is not the case.

-
-

Parameters

-
----- - - - - - - - - - - - - -

date1

the first date

 

date2

the second date

 
-
-
-
-
-

g_date_get_day ()

-
GDateDay
-g_date_get_day (const GDate *date);
-

Returns the day of the month. The date must be valid.

-
-

Parameters

-
----- - - - - - -

date

a GDate to extract the day of the month from

 
-
-
-

Returns

-

day of the month

-
-
-
-
-

g_date_get_month ()

-
GDateMonth
-g_date_get_month (const GDate *date);
-

Returns the month of the year. The date must be valid.

-
-

Parameters

-
----- - - - - - -

date

a GDate to get the month from

 
-
-
-

Returns

-

month of the year as a GDateMonth

-
-
-
-
-

g_date_get_year ()

-
GDateYear
-g_date_get_year (const GDate *date);
-

Returns the year of a GDate. The date must be valid.

-
-

Parameters

-
----- - - - - - -

date

a GDate

 
-
-
-

Returns

-

year in which the date falls

-
-
-
-
-

g_date_get_julian ()

-
guint32
-g_date_get_julian (const GDate *date);
-

Returns the Julian day or "serial number" of the GDate. The -Julian day is simply the number of days since January 1, Year 1; i.e., -January 1, Year 1 is Julian day 1; January 2, Year 1 is Julian day 2, -etc. The date must be valid.

-
-

Parameters

-
----- - - - - - -

date

a GDate to extract the Julian day from

 
-
-
-

Returns

-

Julian day

-
-
-
-
-

g_date_get_weekday ()

-
GDateWeekday
-g_date_get_weekday (const GDate *date);
-

Returns the day of the week for a GDate. The date must be valid.

-
-

Parameters

-
----- - - - - - -

date

a GDate

 
-
-
-

Returns

-

day of the week as a GDateWeekday.

-
-
-
-
-

g_date_get_day_of_year ()

-
guint
-g_date_get_day_of_year (const GDate *date);
-

Returns the day of the year, where Jan 1 is the first day of the -year. The date must be valid.

-
-

Parameters

-
----- - - - - - -

date

a GDate to extract day of year from

 
-
-
-

Returns

-

day of the year

-
-
-
-
-

g_date_get_days_in_month ()

-
guint8
-g_date_get_days_in_month (GDateMonth month,
-                          GDateYear year);
-

Returns the number of days in a month, taking leap -years into account.

-
-

Parameters

-
----- - - - - - - - - - - - - -

month

month

 

year

year

 
-
-
-

Returns

-

number of days in month -during the year -

-
-
-
-
-

g_date_is_first_of_month ()

-
gboolean
-g_date_is_first_of_month (const GDate *date);
-

Returns TRUE if the date is on the first of a month. -The date must be valid.

-
-

Parameters

-
----- - - - - - -

date

a GDate to check

 
-
-
-

Returns

-

TRUE if the date is the first of the month

-
-
-
-
-

g_date_is_last_of_month ()

-
gboolean
-g_date_is_last_of_month (const GDate *date);
-

Returns TRUE if the date is the last day of the month. -The date must be valid.

-
-

Parameters

-
----- - - - - - -

date

a GDate to check

 
-
-
-

Returns

-

TRUE if the date is the last day of the month

-
-
-
-
-

g_date_is_leap_year ()

-
gboolean
-g_date_is_leap_year (GDateYear year);
-

Returns TRUE if the year is a leap year.

-

For the purposes of this function, leap year is every year -divisible by 4 unless that year is divisible by 100. If it -is divisible by 100 it would be a leap year only if that year -is also divisible by 400.

-
-

Parameters

-
----- - - - - - -

year

year to check

 
-
-
-

Returns

-

TRUE if the year is a leap year

-
-
-
-
-

g_date_get_monday_week_of_year ()

-
guint
-g_date_get_monday_week_of_year (const GDate *date);
-

Returns the week of the year, where weeks are understood to start on -Monday. If the date is before the first Monday of the year, return 0. -The date must be valid.

-
-

Parameters

-
----- - - - - - -

date

a GDate

 
-
-
-

Returns

-

week of the year

-
-
-
-
-

g_date_get_monday_weeks_in_year ()

-
guint8
-g_date_get_monday_weeks_in_year (GDateYear year);
-

Returns the number of weeks in the year, where weeks -are taken to start on Monday. Will be 52 or 53. The -date must be valid. (Years always have 52 7-day periods, -plus 1 or 2 extra days depending on whether it's a leap -year. This function is basically telling you how many -Mondays are in the year, i.e. there are 53 Mondays if -one of the extra days happens to be a Monday.)

-
-

Parameters

-
----- - - - - - -

year

a year

 
-
-
-

Returns

-

number of Mondays in the year

-
-
-
-
-

g_date_get_sunday_week_of_year ()

-
guint
-g_date_get_sunday_week_of_year (const GDate *date);
-

Returns the week of the year during which this date falls, if -weeks are understood to begin on Sunday. The date must be valid. -Can return 0 if the day is before the first Sunday of the year.

-
-

Parameters

-
----- - - - - - -

date

a GDate

 
-
-
-

Returns

-

week number

-
-
-
-
-

g_date_get_sunday_weeks_in_year ()

-
guint8
-g_date_get_sunday_weeks_in_year (GDateYear year);
-

Returns the number of weeks in the year, where weeks -are taken to start on Sunday. Will be 52 or 53. The -date must be valid. (Years always have 52 7-day periods, -plus 1 or 2 extra days depending on whether it's a leap -year. This function is basically telling you how many -Sundays are in the year, i.e. there are 53 Sundays if -one of the extra days happens to be a Sunday.)

-
-

Parameters

-
----- - - - - - -

year

year to count weeks in

 
-
-
-

Returns

-

the number of weeks in year -

-
-
-
-
-

g_date_get_iso8601_week_of_year ()

-
guint
-g_date_get_iso8601_week_of_year (const GDate *date);
-

Returns the week of the year, where weeks are interpreted according -to ISO 8601.

-
-

Parameters

-
----- - - - - - -

date

a valid GDate

 
-
-
-

Returns

-

ISO 8601 week number of the year.

-
-

Since: 2.6

-
-
-
-

g_date_strftime ()

-
gsize
-g_date_strftime (gchar *s,
-                 gsize slen,
-                 const gchar *format,
-                 const GDate *date);
-

Generates a printed representation of the date, in a -locale-specific way. -Works just like the platform's C library strftime() function, -but only accepts date-related formats; time-related formats -give undefined results. Date must be valid. Unlike strftime() -(which uses the locale encoding), works on a UTF-8 format -string and stores a UTF-8 result.

-

This function does not provide any conversion specifiers in -addition to those implemented by the platform's C library. -For example, don't expect that using g_date_strftime() would -make the %F provided by the C99 strftime() work on Windows -where the C library only complies to C89.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

s

destination buffer

 

slen

buffer size

 

format

format string

 

date

valid GDate

 
-
-
-

Returns

-

number of characters written to the buffer, or 0 the buffer was too small

-
-
-
-
-

g_date_to_struct_tm ()

-
void
-g_date_to_struct_tm (const GDate *date,
-                     struct tm *tm);
-

Fills in the date-related bits of a struct tm using the date - value. -Initializes the non-date parts with something sane but meaningless.

-
-

Parameters

-
----- - - - - - - - - - - - - -

date

a GDate to set the struct tm from

 

tm

struct tm to fill.

[not nullable]
-
-
-
-
-

g_date_valid ()

-
gboolean
-g_date_valid (const GDate *date);
-

Returns TRUE if the GDate represents an existing day. The date must not -contain garbage; it should have been initialized with g_date_clear() -if it wasn't allocated by one of the g_date_new() variants.

-
-

Parameters

-
----- - - - - - -

date

a GDate to check

 
-
-
-

Returns

-

Whether the date is valid

-
-
-
-
-

g_date_valid_day ()

-
gboolean
-g_date_valid_day (GDateDay day);
-

Returns TRUE if the day of the month is valid (a day is valid if it's -between 1 and 31 inclusive).

-
-

Parameters

-
----- - - - - - -

day

day to check

 
-
-
-

Returns

-

TRUE if the day is valid

-
-
-
-
-

g_date_valid_month ()

-
gboolean
-g_date_valid_month (GDateMonth month);
-

Returns TRUE if the month value is valid. The 12 GDateMonth -enumeration values are the only valid months.

-
-

Parameters

-
----- - - - - - -

month

month

 
-
-
-

Returns

-

TRUE if the month is valid

-
-
-
-
-

g_date_valid_year ()

-
gboolean
-g_date_valid_year (GDateYear year);
-

Returns TRUE if the year is valid. Any year greater than 0 is valid, -though there is a 16-bit limit to what GDate will understand.

-
-

Parameters

-
----- - - - - - -

year

year

 
-
-
-

Returns

-

TRUE if the year is valid

-
-
-
-
-

g_date_valid_dmy ()

-
gboolean
-g_date_valid_dmy (GDateDay day,
-                  GDateMonth month,
-                  GDateYear year);
-

Returns TRUE if the day-month-year triplet forms a valid, existing day -in the range of days GDate understands (Year 1 or later, no more than -a few thousand years in the future).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

day

day

 

month

month

 

year

year

 
-
-
-

Returns

-

TRUE if the date is a valid one

-
-
-
-
-

g_date_valid_julian ()

-
gboolean
-g_date_valid_julian (guint32 julian_date);
-

Returns TRUE if the Julian day is valid. Anything greater than zero -is basically a valid Julian, though there is a 32-bit limit.

-
-

Parameters

-
----- - - - - - -

julian_date

Julian day to check

 
-
-
-

Returns

-

TRUE if the Julian day is valid

-
-
-
-
-

g_date_valid_weekday ()

-
gboolean
-g_date_valid_weekday (GDateWeekday weekday);
-

Returns TRUE if the weekday is valid. The seven GDateWeekday enumeration -values are the only valid weekdays.

-
-

Parameters

-
----- - - - - - -

weekday

weekday

 
-
-
-

Returns

-

TRUE if the weekday is valid

-
-
-
-
-

Types and Values

-
-

G_USEC_PER_SEC

-
#define G_USEC_PER_SEC 1000000
-
-

Number of microseconds in one second (1 million). -This macro is provided for code readability.

-
-
-
-

struct GTimeVal

-
struct GTimeVal {
-  glong tv_sec;
-  glong tv_usec;
-};
-
-

Represents a precise time, with seconds and microseconds. -Similar to the struct timeval returned by the gettimeofday() -UNIX system call.

-

GLib is attempting to unify around the use of 64bit integers to -represent microsecond-precision time. As such, this type will be -removed from a future version of GLib.

-
-

Members

-
----- - - - - - - - - - - - - -

glong tv_sec;

seconds

 

glong tv_usec;

microseconds

 
-
-
-
-
-

struct GDate

-
struct GDate {
-  guint julian_days : 32; /* julian days representation - we use a
-                           *  bitfield hoping that 64 bit platforms
-                           *  will pack this whole struct in one big
-                           *  int
-                           */
-
-  guint julian : 1;    /* julian is valid */
-  guint dmy    : 1;    /* dmy is valid */
-
-  /* DMY representation */
-  guint day    : 6;
-  guint month  : 4;
-  guint year   : 16;
-};
-
-

Represents a day between January 1, Year 1 and a few thousand years in -the future. None of its members should be accessed directly.

-

If the GDate is obtained from g_date_new(), it will be safe -to mutate but invalid and thus not safe for calendrical computations.

-

If it's declared on the stack, it will contain garbage so must be -initialized with g_date_clear(). g_date_clear() makes the date invalid -but sane. An invalid date doesn't represent a day, it's "empty." A date -becomes valid after you set it to a Julian day or you set a day, month, -and year.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint julian_days : 32;

the Julian representation of the date

 

guint julian : 1;

this bit is set if julian_days -is valid

 

guint dmy : 1;

this is set if day -, month -and year -are valid

 

guint day : 6;

the day of the day-month-year representation of the date, -as a number between 1 and 31

 

guint month : 4;

the day of the day-month-year representation of the date, -as a number between 1 and 12

 

guint year : 16;

the day of the day-month-year representation of the date

 
-
-
-
-
-

GTime

-
typedef gint32  GTime;
-
-

Simply a replacement for time_t. It has been deprecated -since it is not equivalent to time_t on 64-bit platforms -with a 64-bit time_t. Unrelated to GTimer.

-

Note that GTime is defined to always be a 32-bit integer, -unlike time_t which may be 64-bit on some systems. Therefore, -GTime will overflow in the year 2038, and you cannot use the -address of a GTime variable as argument to the UNIX time() -function.

-

Instead, do the following:

-
- - - - - - - -
1
-2
-3
-4
-5
time_t ttime;
-GTime gtime;
-
-time (&ttime);
-gtime = (GTime)ttime;
-
- -

-
-
-
-

enum GDateDMY

-

This enumeration isn't used in the API, but may be useful if you need -to mark a number as a day, month, or year.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_DATE_DAY

-

a day

-
 

G_DATE_MONTH

-

a month

-
 

G_DATE_YEAR

-

a year

-
 
-
-
-
-
-

GDateDay

-
typedef guint8  GDateDay;   /* day of the month */
-
-

Integer representing a day of the month; between 1 and 31. -G_DATE_BAD_DAY represents an invalid day of the month.

-
-
-
-

enum GDateMonth

-

Enumeration representing a month; values are G_DATE_JANUARY, -G_DATE_FEBRUARY, etc. G_DATE_BAD_MONTH is the invalid value.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_DATE_BAD_MONTH

-

invalid value

-
 

G_DATE_JANUARY

-

January

-
 

G_DATE_FEBRUARY

-

February

-
 

G_DATE_MARCH

-

March

-
 

G_DATE_APRIL

-

April

-
 

G_DATE_MAY

-

May

-
 

G_DATE_JUNE

-

June

-
 

G_DATE_JULY

-

July

-
 

G_DATE_AUGUST

-

August

-
 

G_DATE_SEPTEMBER

-

September

-
 

G_DATE_OCTOBER

-

October

-
 

G_DATE_NOVEMBER

-

November

-
 

G_DATE_DECEMBER

-

December

-
 
-
-
-
-
-

GDateYear

-
typedef guint16 GDateYear;
-
-

Integer representing a year; G_DATE_BAD_YEAR is the invalid -value. The year must be 1 or higher; negative (BC) years are not -allowed. The year is represented with four digits.

-
-
-
-

enum GDateWeekday

-

Enumeration representing a day of the week; G_DATE_MONDAY, -G_DATE_TUESDAY, etc. G_DATE_BAD_WEEKDAY is an invalid weekday.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_DATE_BAD_WEEKDAY

-

invalid value

-
 

G_DATE_MONDAY

-

Monday

-
 

G_DATE_TUESDAY

-

Tuesday

-
 

G_DATE_WEDNESDAY

-

Wednesday

-
 

G_DATE_THURSDAY

-

Thursday

-
 

G_DATE_FRIDAY

-

Friday

-
 

G_DATE_SATURDAY

-

Saturday

-
 

G_DATE_SUNDAY

-

Sunday

-
 
-
-
-
-
-

G_DATE_BAD_DAY

-
#define G_DATE_BAD_DAY    0U
-
-

Represents an invalid GDateDay.

-
-
-
-

G_DATE_BAD_JULIAN

-
#define G_DATE_BAD_JULIAN 0U
-
-

Represents an invalid Julian day number.

-
-
-
-

G_DATE_BAD_YEAR

-
#define G_DATE_BAD_YEAR   0U
-
-

Represents an invalid year.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Deprecated-Thread-APIs.html b/docs/reference/glib/html/glib-Deprecated-Thread-APIs.html deleted file mode 100644 index 34d575ce0..000000000 --- a/docs/reference/glib/html/glib-Deprecated-Thread-APIs.html +++ /dev/null @@ -1,2086 +0,0 @@ - - - - -Deprecated thread API: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Deprecated thread API

-

Deprecated thread API — old thread APIs (for reference only)

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -g_thread_init () -
-gboolean - -g_thread_supported () -
-gboolean - -g_thread_get_initialized () -
-GThread * - -g_thread_create () -
-GThread * - -g_thread_create_full () -
-void - -g_thread_set_priority () -
-void - -g_thread_foreach () -
-GMutex * - -g_mutex_new () -
-void - -g_mutex_free () -
-GCond* - -g_cond_new () -
-void - -g_cond_free () -
-GPrivate * - -g_private_new () -
-void - -g_static_mutex_init () -
-void - -g_static_mutex_lock () -
-gboolean - -g_static_mutex_trylock () -
-void - -g_static_mutex_unlock () -
-GMutex * - -g_static_mutex_get_mutex () -
-void - -g_static_mutex_free () -
-void - -g_static_rec_mutex_init () -
-void - -g_static_rec_mutex_lock () -
-gboolean - -g_static_rec_mutex_trylock () -
-void - -g_static_rec_mutex_unlock () -
-void - -g_static_rec_mutex_lock_full () -
-guint - -g_static_rec_mutex_unlock_full () -
-void - -g_static_rec_mutex_free () -
-void - -g_static_rw_lock_init () -
-void - -g_static_rw_lock_reader_lock () -
-gboolean - -g_static_rw_lock_reader_trylock () -
-void - -g_static_rw_lock_reader_unlock () -
-void - -g_static_rw_lock_writer_lock () -
-gboolean - -g_static_rw_lock_writer_trylock () -
-void - -g_static_rw_lock_writer_unlock () -
-void - -g_static_rw_lock_free () -
-void - -g_static_private_init () -
-gpointer - -g_static_private_get () -
-void - -g_static_private_set () -
-void - -g_static_private_free () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#defineG_THREADS_IMPL_POSIX
#defineG_THREADS_IMPL_WIN32
enumGThreadPriority
 GStaticMutex
#defineG_STATIC_MUTEX_INIT
structGStaticRecMutex
#defineG_STATIC_REC_MUTEX_INIT
structGStaticRWLock
#defineG_STATIC_RW_LOCK_INIT
structGStaticPrivate
#defineG_STATIC_PRIVATE_INIT
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

These APIs are deprecated. You should not use them in new code. -This section remains only to assist with understanding code that was -written to use these APIs at some point in the past.

-
-
-

Functions

-
-

g_thread_init ()

-
void
-g_thread_init (gpointer vtable);
-
-

g_thread_init has been deprecated since version 2.32 and should not be used in newly-written code.

-

This function is no longer necessary. The GLib - threading system is automatically initialized at the start - of your program.

-
-

If you use GLib from more than one thread, you must initialize the -thread system by calling g_thread_init().

-

Since version 2.24, calling g_thread_init() multiple times is allowed, -but nothing happens except for the first call.

-

Since version 2.32, GLib does not support custom thread implementations -anymore and the vtable - parameter is ignored and you should pass NULL.

-

<note><para>g_thread_init() must not be called directly or indirectly -in a callback from GLib. Also no mutexes may be currently locked while -calling g_thread_init().</para></note>

-

<note><para>To use g_thread_init() in your program, you have to link -with the libraries that the command <command>pkg-config --libs -gthread-2.0</command> outputs. This is not the case for all the -other thread-related functions of GLib. Those can be used without -having to link with the thread libraries.</para></note>

-
-

Parameters

-
----- - - - - - -

vtable

a function table of type GThreadFunctions, that provides -the entry points to the thread system to be used. Since 2.32, -this parameter is ignored and should always be NULL

 
-
-
-
-
-

g_thread_supported ()

-
gboolean
-g_thread_supported ();
-

g_thread_supported is deprecated and should not be used in newly-written code.

-

This macro returns TRUE if the thread system is initialized, -and FALSE if it is not.

-

For language bindings, g_thread_get_initialized() provides -the same functionality as a function.

-
-

Returns

-

TRUE, if the thread system is initialized

-
-
-
-
-

g_thread_get_initialized ()

-
gboolean
-g_thread_get_initialized (void);
-

g_thread_get_initialized is deprecated and should not be used in newly-written code.

-

Indicates if g_thread_init() has been called.

-
-

Returns

-

TRUE if threads have been initialized.

-
-

Since: 2.20

-
-
-
-

g_thread_create ()

-
GThread *
-g_thread_create (GThreadFunc func,
-                 gpointer data,
-                 gboolean joinable,
-                 GError **error);
-
-

g_thread_create has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_thread_new() instead

-
-

This function creates a new thread.

-

The new thread executes the function func - with the argument data -. -If the thread was created successfully, it is returned.

-

error - can be NULL to ignore errors, or non-NULL to report errors. -The error is set, if and only if the function returns NULL.

-

This function returns a reference to the created thread only if -joinable - is TRUE. In that case, you must free this reference by -calling g_thread_unref() or g_thread_join(). If joinable - is FALSE -then you should probably not touch the return value.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

func

a function to execute in the new thread

 

data

an argument to supply to the new thread

 

joinable

should this thread be joinable?

 

error

return location for error, or NULL

 
-
-
-

Returns

-

the new GThread on success

-
-
-
-
-

g_thread_create_full ()

-
GThread *
-g_thread_create_full (GThreadFunc func,
-                      gpointer data,
-                      gulong stack_size,
-                      gboolean joinable,
-                      gboolean bound,
-                      GThreadPriority priority,
-                      GError **error);
-
-

g_thread_create_full has been deprecated since version 2.32 and should not be used in newly-written code.

-

The bound - and priority - arguments are now ignored. -Use g_thread_new().

-
-

This function creates a new thread.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

func

a function to execute in the new thread.

 

data

an argument to supply to the new thread.

 

stack_size

a stack size for the new thread.

 

joinable

should this thread be joinable?

 

bound

ignored

 

priority

ignored

 

error

return location for error.

 
-
-
-

Returns

-

the new GThread on success.

-
-
-
-
-

g_thread_set_priority ()

-
void
-g_thread_set_priority (GThread *thread,
-                       GThreadPriority priority);
-
-

g_thread_set_priority has been deprecated since version 2.32 and should not be used in newly-written code.

-

Thread priorities no longer have any effect.

-
-

This function does nothing.

-
-

Parameters

-
----- - - - - - - - - - - - - -

thread

a GThread.

 

priority

ignored

 
-
-
-
-
-

g_thread_foreach ()

-
void
-g_thread_foreach (GFunc thread_func,
-                  gpointer user_data);
-
-

g_thread_foreach has been deprecated since version 2.32 and should not be used in newly-written code.

-

There aren't many things you can do with a GThread, - except comparing it with one that was returned from g_thread_create(). - There are better ways to find out if your thread is still alive.

-
-

Call thread_func - on all GThreads that have been -created with g_thread_create().

-

Note that threads may decide to exit while thread_func - is -running, so without intimate knowledge about the lifetime of -foreign threads, thread_func - shouldn't access the GThread* -pointer passed in as first argument. However, thread_func - will -not be called for threads which are known to have exited already.

-

Due to thread lifetime checks, this function has an execution complexity -which is quadratic in the number of existing threads.

-
-

Parameters

-
----- - - - - - - - - - - - - -

thread_func

function to call for all GThread structures

 

user_data

second argument to thread_func -

 
-
-

Since: 2.10

-
-
-
-

g_mutex_new ()

-
GMutex *
-g_mutex_new ();
-
-

g_mutex_new has been deprecated since version 2.32 and should not be used in newly-written code.

-

GMutex can now be statically allocated, or embedded -in structures and initialised with g_mutex_init().

-
-

Allocates and initializes a new GMutex.

-
-

Returns

-

a newly allocated GMutex. Use g_mutex_free() to free

-
-
-
-
-

g_mutex_free ()

-
void
-g_mutex_free (GMutex *mutex);
-
-

g_mutex_free has been deprecated since version 2.32 and should not be used in newly-written code.

-

GMutex can now be statically allocated, or embedded -in structures and initialised with g_mutex_init().

-
-

Destroys a mutex - that has been created with g_mutex_new().

-

Calling g_mutex_free() on a locked mutex may result -in undefined behaviour.

-
-

Parameters

-
----- - - - - - -

mutex

a GMutex

 
-
-
-
-
-

g_cond_new ()

-
GCond*
-g_cond_new ();
-
-

g_cond_new has been deprecated since version 2.32 and should not be used in newly-written code.

-

GCond can now be statically allocated, or embedded -in structures and initialised with g_cond_init().

-
-

Allocates and initializes a new GCond.

-
-

Returns

-

a newly allocated GCond. Free with g_cond_free()

-
-
-
-
-

g_cond_free ()

-
void
-g_cond_free (GCond *cond);
-
-

g_cond_free has been deprecated since version 2.32 and should not be used in newly-written code.

-

GCond can now be statically allocated, or embedded -in structures and initialised with g_cond_init().

-
-

Destroys a GCond that has been created with g_cond_new().

-

Calling g_cond_free() for a GCond on which threads are -blocking leads to undefined behaviour.

-
-

Parameters

-
----- - - - - - -

cond

a GCond

 
-
-
-
-
-

g_private_new ()

-
GPrivate *
-g_private_new (GDestroyNotify notify);
-
-

g_private_new has been deprecated since version 2.32 and should not be used in newly-written code.

-

dynamic allocation of GPrivate is a bad idea. Use - static storage and G_PRIVATE_INIT() instead.

-
-

Creates a new GPrivate.

-
-

Parameters

-
----- - - - - - -

notify

a GDestroyNotify

 
-
-
-

Returns

-

a newly allocated GPrivate (which can never be destroyed)

-
-
-
-
-

g_static_mutex_init ()

-
void
-g_static_mutex_init (GStaticMutex *mutex);
-
-

g_static_mutex_init has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_mutex_init()

-
-

Initializes mutex -. -Alternatively you can initialize it with G_STATIC_MUTEX_INIT.

-
-

Parameters

-
----- - - - - - -

mutex

a GStaticMutex to be initialized.

 
-
-
-
-
-

g_static_mutex_lock ()

-
void
-g_static_mutex_lock (GStaticMutex *mutex);
-
-

g_static_mutex_lock has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_mutex_lock()

-
-

Works like g_mutex_lock(), but for a GStaticMutex.

-
-

Parameters

-
----- - - - - - -

mutex

a GStaticMutex.

 
-
-
-
-
-

g_static_mutex_trylock ()

-
gboolean
-g_static_mutex_trylock (GStaticMutex *mutex);
-
-

g_static_mutex_trylock has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_mutex_trylock()

-
-

Works like g_mutex_trylock(), but for a GStaticMutex.

-
-

Parameters

-
----- - - - - - -

mutex

a GStaticMutex.

 
-
-
-

Returns

-

TRUE, if the GStaticMutex could be locked.

-
-
-
-
-

g_static_mutex_unlock ()

-
void
-g_static_mutex_unlock (GStaticMutex *mutex);
-
-

g_static_mutex_unlock has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_mutex_unlock()

-
-

Works like g_mutex_unlock(), but for a GStaticMutex.

-
-

Parameters

-
----- - - - - - -

mutex

a GStaticMutex.

 
-
-
-
-
-

g_static_mutex_get_mutex ()

-
GMutex *
-g_static_mutex_get_mutex (GStaticMutex *mutex);
-
-

g_static_mutex_get_mutex has been deprecated since version 2.32 and should not be used in newly-written code.

-

Just use a GMutex

-
-

For some operations (like g_cond_wait()) you must have a GMutex -instead of a GStaticMutex. This function will return the -corresponding GMutex for mutex -.

-
-

Parameters

-
----- - - - - - -

mutex

a GStaticMutex.

 
-
-
-

Returns

-

the GMutex corresponding to mutex -.

-
-
-
-
-

g_static_mutex_free ()

-
void
-g_static_mutex_free (GStaticMutex *mutex);
-
-

g_static_mutex_free has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_mutex_clear()

-
-

Releases all resources allocated to mutex -.

-

You don't have to call this functions for a GStaticMutex with an -unbounded lifetime, i.e. objects declared 'static', but if you have -a GStaticMutex as a member of a structure and the structure is -freed, you should also free the GStaticMutex.

-

Calling g_static_mutex_free() on a locked mutex may result in -undefined behaviour.

-
-

Parameters

-
----- - - - - - -

mutex

a GStaticMutex to be freed.

 
-
-
-
-
-

g_static_rec_mutex_init ()

-
void
-g_static_rec_mutex_init (GStaticRecMutex *mutex);
-
-

g_static_rec_mutex_init has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_rec_mutex_init()

-
-

A GStaticRecMutex must be initialized with this function before it -can be used. Alternatively you can initialize it with -G_STATIC_REC_MUTEX_INIT.

-
-

Parameters

-
----- - - - - - -

mutex

a GStaticRecMutex to be initialized.

 
-
-
-
-
-

g_static_rec_mutex_lock ()

-
void
-g_static_rec_mutex_lock (GStaticRecMutex *mutex);
-
-

g_static_rec_mutex_lock has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_rec_mutex_lock()

-
-

Locks mutex -. If mutex - is already locked by another thread, the -current thread will block until mutex - is unlocked by the other -thread. If mutex - is already locked by the calling thread, this -functions increases the depth of mutex - and returns immediately.

-
-

Parameters

-
----- - - - - - -

mutex

a GStaticRecMutex to lock.

 
-
-
-
-
-

g_static_rec_mutex_trylock ()

-
gboolean
-g_static_rec_mutex_trylock (GStaticRecMutex *mutex);
-
-

g_static_rec_mutex_trylock has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_rec_mutex_trylock()

-
-

Tries to lock mutex -. If mutex - is already locked by another thread, -it immediately returns FALSE. Otherwise it locks mutex - and returns -TRUE. If mutex - is already locked by the calling thread, this -functions increases the depth of mutex - and immediately returns -TRUE.

-
-

Parameters

-
----- - - - - - -

mutex

a GStaticRecMutex to lock.

 
-
-
-

Returns

-

TRUE, if mutex -could be locked.

-
-
-
-
-

g_static_rec_mutex_unlock ()

-
void
-g_static_rec_mutex_unlock (GStaticRecMutex *mutex);
-
-

g_static_rec_mutex_unlock has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_rec_mutex_unlock()

-
-

Unlocks mutex -. Another thread will be allowed to lock mutex - only -when it has been unlocked as many times as it had been locked -before. If mutex - is completely unlocked and another thread is -blocked in a g_static_rec_mutex_lock() call for mutex -, it will be -woken and can lock mutex - itself.

-
-

Parameters

-
----- - - - - - -

mutex

a GStaticRecMutex to unlock.

 
-
-
-
-
-

g_static_rec_mutex_lock_full ()

-
void
-g_static_rec_mutex_lock_full (GStaticRecMutex *mutex,
-                              guint depth);
-
-

g_static_rec_mutex_lock_full has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_rec_mutex_lock()

-
-

Works like calling g_static_rec_mutex_lock() for mutex - depth - times.

-
-

Parameters

-
----- - - - - - - - - - - - - -

mutex

a GStaticRecMutex to lock.

 

depth

number of times this mutex has to be unlocked to be -completely unlocked.

 
-
-
-
-
-

g_static_rec_mutex_unlock_full ()

-
guint
-g_static_rec_mutex_unlock_full (GStaticRecMutex *mutex);
-
-

g_static_rec_mutex_unlock_full has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_rec_mutex_unlock()

-
-

Completely unlocks mutex -. If another thread is blocked in a -g_static_rec_mutex_lock() call for mutex -, it will be woken and can -lock mutex - itself. This function returns the number of times that -mutex - has been locked by the current thread. To restore the state -before the call to g_static_rec_mutex_unlock_full() you can call -g_static_rec_mutex_lock_full() with the depth returned by this -function.

-
-

Parameters

-
----- - - - - - -

mutex

a GStaticRecMutex to completely unlock.

 
-
-
-

Returns

-

number of times mutex -has been locked by the current -thread.

-
-
-
-
-

g_static_rec_mutex_free ()

-
void
-g_static_rec_mutex_free (GStaticRecMutex *mutex);
-
-

g_static_rec_mutex_free has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_rec_mutex_clear()

-
-

Releases all resources allocated to a GStaticRecMutex.

-

You don't have to call this functions for a GStaticRecMutex with an -unbounded lifetime, i.e. objects declared 'static', but if you have -a GStaticRecMutex as a member of a structure and the structure is -freed, you should also free the GStaticRecMutex.

-
-

Parameters

-
----- - - - - - -

mutex

a GStaticRecMutex to be freed.

 
-
-
-
-
-

g_static_rw_lock_init ()

-
void
-g_static_rw_lock_init (GStaticRWLock *lock);
-
-

g_static_rw_lock_init has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_rw_lock_init() instead

-
-

A GStaticRWLock must be initialized with this function before it -can be used. Alternatively you can initialize it with -G_STATIC_RW_LOCK_INIT.

-
-

Parameters

-
----- - - - - - -

lock

a GStaticRWLock to be initialized.

 
-
-
-
-
-

g_static_rw_lock_reader_lock ()

-
void
-g_static_rw_lock_reader_lock (GStaticRWLock *lock);
-
-

g_static_rw_lock_reader_lock has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_rw_lock_reader_lock() instead

-
-

Locks lock - for reading. There may be unlimited concurrent locks for -reading of a GStaticRWLock at the same time. If lock - is already -locked for writing by another thread or if another thread is already -waiting to lock lock - for writing, this function will block until -lock - is unlocked by the other writing thread and no other writing -threads want to lock lock -. This lock has to be unlocked by -g_static_rw_lock_reader_unlock().

-

GStaticRWLock is not recursive. It might seem to be possible to -recursively lock for reading, but that can result in a deadlock, due -to writer preference.

-
-

Parameters

-
----- - - - - - -

lock

a GStaticRWLock to lock for reading.

 
-
-
-
-
-

g_static_rw_lock_reader_trylock ()

-
gboolean
-g_static_rw_lock_reader_trylock (GStaticRWLock *lock);
-

g_static_rw_lock_reader_trylock is deprecated and should not be used in newly-written code.

-

Tries to lock lock - for reading. If lock - is already locked for -writing by another thread or if another thread is already waiting to -lock lock - for writing, immediately returns FALSE. Otherwise locks -lock - for reading and returns TRUE. This lock has to be unlocked by -g_static_rw_lock_reader_unlock().

-
-

Parameters

-
----- - - - - - -

lock

a GStaticRWLock to lock for reading

 
-
-
-

Returns

-

TRUE, if lock -could be locked for reading

-

Deprectated: 2.32: Use g_rw_lock_reader_trylock() instead

-
-
-
-
-

g_static_rw_lock_reader_unlock ()

-
void
-g_static_rw_lock_reader_unlock (GStaticRWLock *lock);
-

g_static_rw_lock_reader_unlock is deprecated and should not be used in newly-written code.

-

Unlocks lock -. If a thread waits to lock lock - for writing and all -locks for reading have been unlocked, the waiting thread is woken up -and can lock lock - for writing.

-

Deprectated: 2.32: Use g_rw_lock_reader_unlock() instead

-
-

Parameters

-
----- - - - - - -

lock

a GStaticRWLock to unlock after reading

 
-
-
-
-
-

g_static_rw_lock_writer_lock ()

-
void
-g_static_rw_lock_writer_lock (GStaticRWLock *lock);
-

g_static_rw_lock_writer_lock is deprecated and should not be used in newly-written code.

-

Locks lock - for writing. If lock - is already locked for writing or -reading by other threads, this function will block until lock - is -completely unlocked and then lock lock - for writing. While this -functions waits to lock lock -, no other thread can lock lock - for -reading. When lock - is locked for writing, no other thread can lock -lock - (neither for reading nor writing). This lock has to be -unlocked by g_static_rw_lock_writer_unlock().

-

Deprectated: 2.32: Use g_rw_lock_writer_lock() instead

-
-

Parameters

-
----- - - - - - -

lock

a GStaticRWLock to lock for writing

 
-
-
-
-
-

g_static_rw_lock_writer_trylock ()

-
gboolean
-g_static_rw_lock_writer_trylock (GStaticRWLock *lock);
-

g_static_rw_lock_writer_trylock is deprecated and should not be used in newly-written code.

-

Tries to lock lock - for writing. If lock - is already locked (for -either reading or writing) by another thread, it immediately returns -FALSE. Otherwise it locks lock - for writing and returns TRUE. This -lock has to be unlocked by g_static_rw_lock_writer_unlock().

-
-

Parameters

-
----- - - - - - -

lock

a GStaticRWLock to lock for writing

 
-
-
-

Returns

-

TRUE, if lock -could be locked for writing

-

Deprectated: 2.32: Use g_rw_lock_writer_trylock() instead

-
-
-
-
-

g_static_rw_lock_writer_unlock ()

-
void
-g_static_rw_lock_writer_unlock (GStaticRWLock *lock);
-

g_static_rw_lock_writer_unlock is deprecated and should not be used in newly-written code.

-

Unlocks lock -. If a thread is waiting to lock lock - for writing and -all locks for reading have been unlocked, the waiting thread is -woken up and can lock lock - for writing. If no thread is waiting to -lock lock - for writing, and some thread or threads are waiting to -lock lock - for reading, the waiting threads are woken up and can -lock lock - for reading.

-

Deprectated: 2.32: Use g_rw_lock_writer_unlock() instead

-
-

Parameters

-
----- - - - - - -

lock

a GStaticRWLock to unlock after writing.

 
-
-
-
-
-

g_static_rw_lock_free ()

-
void
-g_static_rw_lock_free (GStaticRWLock *lock);
-
-

g_static_rw_lock_free has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use a GRWLock instead

-
-

Releases all resources allocated to lock -.

-

You don't have to call this functions for a GStaticRWLock with an -unbounded lifetime, i.e. objects declared 'static', but if you have -a GStaticRWLock as a member of a structure, and the structure is -freed, you should also free the GStaticRWLock.

-
-

Parameters

-
----- - - - - - -

lock

a GStaticRWLock to be freed.

 
-
-
-
-
-

g_static_private_init ()

-
void
-g_static_private_init (GStaticPrivate *private_key);
-

g_static_private_init is deprecated and should not be used in newly-written code.

-

Initializes private_key -. Alternatively you can initialize it with -G_STATIC_PRIVATE_INIT.

-
-

Parameters

-
----- - - - - - -

private_key

a GStaticPrivate to be initialized

 
-
-
-
-
-

g_static_private_get ()

-
gpointer
-g_static_private_get (GStaticPrivate *private_key);
-

g_static_private_get is deprecated and should not be used in newly-written code.

-

Works like g_private_get() only for a GStaticPrivate.

-

This function works even if g_thread_init() has not yet been called.

-
-

Parameters

-
----- - - - - - -

private_key

a GStaticPrivate

 
-
-
-

Returns

-

the corresponding pointer

-
-
-
-
-

g_static_private_set ()

-
void
-g_static_private_set (GStaticPrivate *private_key,
-                      gpointer data,
-                      GDestroyNotify notify);
-

g_static_private_set is deprecated and should not be used in newly-written code.

-

Sets the pointer keyed to private_key - for the current thread and -the function notify - to be called with that pointer (NULL or -non-NULL), whenever the pointer is set again or whenever the -current thread ends.

-

This function works even if g_thread_init() has not yet been called. -If g_thread_init() is called later, the data - keyed to private_key - -will be inherited only by the main thread, i.e. the one that called -g_thread_init().

-

notify - is used quite differently from destructor - in g_private_new().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

private_key

a GStaticPrivate

 

data

the new pointer

 

notify

a function to be called with the pointer whenever the -current thread ends or sets this pointer again

 
-
-
-
-
-

g_static_private_free ()

-
void
-g_static_private_free (GStaticPrivate *private_key);
-

g_static_private_free is deprecated and should not be used in newly-written code.

-

Releases all resources allocated to private_key -.

-

You don't have to call this functions for a GStaticPrivate with an -unbounded lifetime, i.e. objects declared 'static', but if you have -a GStaticPrivate as a member of a structure and the structure is -freed, you should also free the GStaticPrivate.

-
-

Parameters

-
----- - - - - - -

private_key

a GStaticPrivate to be freed

 
-
-
-
-
-

Types and Values

-
-

G_THREADS_IMPL_POSIX

-
#define G_THREADS_IMPL_POSIX
-
-
-

G_THREADS_IMPL_POSIX has been deprecated since version 2.32 and should not be used in newly-written code.

-

POSIX threads are in use on all non-Windows systems. - Use G_OS_WIN32 to detect Windows.

-
-

This macro is defined if POSIX style threads are used.

-
-
-
-

G_THREADS_IMPL_WIN32

-
#define G_THREADS_IMPL_NONE
-
-
-

G_THREADS_IMPL_WIN32 has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use G_OS_WIN32 to detect Windows.

-
-

This macro is defined if Windows style threads are used.

-
-
-
-

enum GThreadPriority

-
-

GThreadPriority has been deprecated since version 2.32 and should not be used in newly-written code.

-

Thread priorities no longer have any effect.

-
-

Thread priorities.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_THREAD_PRIORITY_LOW

-

a priority lower than normal

-
 

G_THREAD_PRIORITY_NORMAL

-

the default priority

-
 

G_THREAD_PRIORITY_HIGH

-

a priority higher than normal

-
 

G_THREAD_PRIORITY_URGENT

-

the highest priority

-
 
-
-
-
-
-

GStaticMutex

-
typedef struct _GStaticMutex GStaticMutex;
-

A GStaticMutex works like a GMutex.

-

Prior to GLib 2.32, GStaticMutex had the significant advantage -that it doesn't need to be created at run-time, but can be defined -at compile-time. Since 2.32, GMutex can be statically allocated -as well, and GStaticMutex has been deprecated.

-

Here is a version of our give_me_next_number() example using -a GStaticMutex:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
int
-give_me_next_number (void)
-{
-  static int current_number = 0;
-  int ret_val;
-  static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
-
-  g_static_mutex_lock (&mutex);
-  ret_val = current_number = calc_next_number (current_number);
-  g_static_mutex_unlock (&mutex);
-
-  return ret_val;
-}
-
- -

-

Sometimes you would like to dynamically create a mutex. If you don't -want to require prior calling to g_thread_init(), because your code -should also be usable in non-threaded programs, you are not able to -use g_mutex_new() and thus GMutex, as that requires a prior call to -g_thread_init(). In theses cases you can also use a GStaticMutex. -It must be initialized with g_static_mutex_init() before using it -and freed with with g_static_mutex_free() when not needed anymore to -free up any allocated resources.

-

Even though GStaticMutex is not opaque, it should only be used with -the following functions, as it is defined differently on different -platforms.

-

All of the g_static_mutex_* functions apart from -g_static_mutex_get_mutex() can also be used even if g_thread_init() -has not yet been called. Then they do nothing, apart from -g_static_mutex_trylock() which does nothing but returning TRUE.

-

All of the g_static_mutex_* functions are actually macros. Apart from -taking their addresses, you can however use them as if they were -functions.

-
-
-
-

G_STATIC_MUTEX_INIT

-
#define G_STATIC_MUTEX_INIT
-
-

G_STATIC_MUTEX_INIT is deprecated and should not be used in newly-written code.

-

A GStaticMutex must be initialized with this macro, before it can -be used. This macro can used be to initialize a variable, but it -cannot be assigned to a variable. In that case you have to use -g_static_mutex_init().

-
- - - - - - - -
1
GStaticMutex my_mutex = G_STATIC_MUTEX_INIT;
-
- -

-
-
-
-

struct GStaticRecMutex

-
struct GStaticRecMutex {
-};
-
-

GStaticRecMutex is deprecated and should not be used in newly-written code.

-

A GStaticRecMutex works like a GStaticMutex, but it can be locked -multiple times by one thread. If you enter it n times, you have to -unlock it n times again to let other threads lock it. An exception -is the function g_static_rec_mutex_unlock_full(): that allows you to -unlock a GStaticRecMutex completely returning the depth, (i.e. the -number of times this mutex was locked). The depth can later be used -to restore the state of the GStaticRecMutex by calling -g_static_rec_mutex_lock_full(). In GLib 2.32, GStaticRecMutex has -been deprecated in favor of GRecMutex.

-

Even though GStaticRecMutex is not opaque, it should only be used -with the following functions.

-

All of the g_static_rec_mutex_* functions can be used even if -g_thread_init() has not been called. Then they do nothing, apart -from g_static_rec_mutex_trylock(), which does nothing but returning -TRUE.

-
-
-
-

G_STATIC_REC_MUTEX_INIT

-
#define G_STATIC_REC_MUTEX_INIT { G_STATIC_MUTEX_INIT }
-
-

G_STATIC_REC_MUTEX_INIT is deprecated and should not be used in newly-written code.

-

A GStaticRecMutex must be initialized with this macro before it can -be used. This macro can used be to initialize a variable, but it -cannot be assigned to a variable. In that case you have to use -g_static_rec_mutex_init().

-
- - - - - - - -
1
GStaticRecMutex my_mutex = G_STATIC_REC_MUTEX_INIT;
-
- -

-
-
-
-

struct GStaticRWLock

-
struct GStaticRWLock {
-};
-
-
-

GStaticRWLock has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use a GRWLock instead

-
-

The GStaticRWLock struct represents a read-write lock. A read-write -lock can be used for protecting data that some portions of code only -read from, while others also write. In such situations it is -desirable that several readers can read at once, whereas of course -only one writer may write at a time.

-

Take a look at the following example:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
GStaticRWLock rwlock = G_STATIC_RW_LOCK_INIT;
-GPtrArray *array;
-
-gpointer
-my_array_get (guint index)
-{
-  gpointer retval = NULL;
-
-  if (!array)
-    return NULL;
-
-  g_static_rw_lock_reader_lock (&rwlock);
-  if (index < array->len)
-    retval = g_ptr_array_index (array, index);
-  g_static_rw_lock_reader_unlock (&rwlock);
-
-  return retval;
-}
-
-void
-my_array_set (guint index, gpointer data)
-{
-  g_static_rw_lock_writer_lock (&rwlock);
-
-  if (!array)
-    array = g_ptr_array_new ();
-
-  if (index >= array->len)
-    g_ptr_array_set_size (array, index + 1);
-  g_ptr_array_index (array, index) = data;
-
-  g_static_rw_lock_writer_unlock (&rwlock);
-}
-
- -

-

This example shows an array which can be accessed by many readers -(the my_array_get() function) simultaneously, whereas the writers -(the my_array_set() function) will only be allowed once at a time -and only if no readers currently access the array. This is because -of the potentially dangerous resizing of the array. Using these -functions is fully multi-thread safe now.

-

Most of the time, writers should have precedence over readers. That -means, for this implementation, that as soon as a writer wants to -lock the data, no other reader is allowed to lock the data, whereas, -of course, the readers that already have locked the data are allowed -to finish their operation. As soon as the last reader unlocks the -data, the writer will lock it.

-

Even though GStaticRWLock is not opaque, it should only be used -with the following functions.

-

All of the g_static_rw_lock_* functions can be used even if -g_thread_init() has not been called. Then they do nothing, apart -from g_static_rw_lock_*_trylock, which does nothing but returning TRUE.

-

A read-write lock has a higher overhead than a mutex. For example, both -g_static_rw_lock_reader_lock() and g_static_rw_lock_reader_unlock() have -to lock and unlock a GStaticMutex, so it takes at least twice the time -to lock and unlock a GStaticRWLock that it does to lock and unlock a -GStaticMutex. So only data structures that are accessed by multiple -readers, and which keep the lock for a considerable time justify a -GStaticRWLock. The above example most probably would fare better with a -GStaticMutex.

-
-
-
-

G_STATIC_RW_LOCK_INIT

-
#define G_STATIC_RW_LOCK_INIT { G_STATIC_MUTEX_INIT, NULL, NULL, 0, FALSE, 0, 0 }
-
-

G_STATIC_RW_LOCK_INIT is deprecated and should not be used in newly-written code.

-

A GStaticRWLock must be initialized with this macro before it can -be used. This macro can used be to initialize a variable, but it -cannot be assigned to a variable. In that case you have to use -g_static_rw_lock_init().

-
- - - - - - - -
1
GStaticRWLock my_lock = G_STATIC_RW_LOCK_INIT;
-
- -

-
-
-
-

struct GStaticPrivate

-
struct GStaticPrivate {
-};
-
-

GStaticPrivate is deprecated and should not be used in newly-written code.

-

A GStaticPrivate works almost like a GPrivate, but it has one -significant advantage. It doesn't need to be created at run-time -like a GPrivate, but can be defined at compile-time. This is -similar to the difference between GMutex and GStaticMutex.

-

Now look at our give_me_next_number() example with GStaticPrivate:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
int
-give_me_next_number ()
-{
-  static GStaticPrivate current_number_key = G_STATIC_PRIVATE_INIT;
-  int *current_number = g_static_private_get (&current_number_key);
-
-  if (!current_number)
-    {
-      current_number = g_new (int, 1);
-      *current_number = 0;
-      g_static_private_set (&current_number_key, current_number, g_free);
-    }
-
-  *current_number = calc_next_number (*current_number);
-
-  return *current_number;
-}
-
- -

-
-
-
-

G_STATIC_PRIVATE_INIT

-
#define G_STATIC_PRIVATE_INIT 
-
-

G_STATIC_PRIVATE_INIT is deprecated and should not be used in newly-written code.

-

Every GStaticPrivate must be initialized with this macro, before it -can be used.

-
- - - - - - - -
1
GStaticPrivate my_private = G_STATIC_PRIVATE_INIT;
-
- -

-
-
-
-

See Also

-

GThread

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Double-ended-Queues.html b/docs/reference/glib/html/glib-Double-ended-Queues.html deleted file mode 100644 index 47b689387..000000000 --- a/docs/reference/glib/html/glib-Double-ended-Queues.html +++ /dev/null @@ -1,1841 +0,0 @@ - - - - -Double-ended Queues: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Double-ended Queues

-

Double-ended Queues — double-ended queue data structure

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GQueue * - -g_queue_new () -
-void - -g_queue_free () -
-void - -g_queue_free_full () -
-void - -g_queue_init () -
-void - -g_queue_clear () -
-gboolean - -g_queue_is_empty () -
-guint - -g_queue_get_length () -
-void - -g_queue_reverse () -
-GQueue * - -g_queue_copy () -
-void - -g_queue_foreach () -
-GList * - -g_queue_find () -
-GList * - -g_queue_find_custom () -
-void - -g_queue_sort () -
-void - -g_queue_push_head () -
-void - -g_queue_push_tail () -
-void - -g_queue_push_nth () -
-gpointer - -g_queue_pop_head () -
-gpointer - -g_queue_pop_tail () -
-gpointer - -g_queue_pop_nth () -
-gpointer - -g_queue_peek_head () -
-gpointer - -g_queue_peek_tail () -
-gpointer - -g_queue_peek_nth () -
-gint - -g_queue_index () -
-gboolean - -g_queue_remove () -
-guint - -g_queue_remove_all () -
-void - -g_queue_insert_before () -
-void - -g_queue_insert_after () -
-void - -g_queue_insert_sorted () -
-void - -g_queue_push_head_link () -
-void - -g_queue_push_tail_link () -
-void - -g_queue_push_nth_link () -
-GList * - -g_queue_pop_head_link () -
-GList * - -g_queue_pop_tail_link () -
-GList * - -g_queue_pop_nth_link () -
-GList * - -g_queue_peek_head_link () -
-GList * - -g_queue_peek_tail_link () -
-GList * - -g_queue_peek_nth_link () -
-gint - -g_queue_link_index () -
-void - -g_queue_unlink () -
-void - -g_queue_delete_link () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
structGQueue
#defineG_QUEUE_INIT
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The GQueue structure and its associated functions provide a standard -queue data structure. Internally, GQueue uses the same data structure -as GList to store elements.

-

The data contained in each element can be either integer values, by -using one of the Type Conversion Macros, -or simply pointers to any type of data.

-

To create a new GQueue, use g_queue_new().

-

To initialize a statically-allocated GQueue, use G_QUEUE_INIT or -g_queue_init().

-

To add elements, use g_queue_push_head(), g_queue_push_head_link(), -g_queue_push_tail() and g_queue_push_tail_link().

-

To remove elements, use g_queue_pop_head() and g_queue_pop_tail().

-

To free the entire queue, use g_queue_free().

-
-
-

Functions

-
-

g_queue_new ()

-
GQueue *
-g_queue_new (void);
-

Creates a new GQueue.

-
-

Returns

-

a newly allocated GQueue

-
-
-
-
-

g_queue_free ()

-
void
-g_queue_free (GQueue *queue);
-

Frees the memory allocated for the GQueue. Only call this function -if queue - was created with g_queue_new(). If queue elements contain -dynamically-allocated memory, they should be freed first.

-

If queue elements contain dynamically-allocated memory, you should -either use g_queue_free_full() or free them manually first.

-
-

Parameters

-
----- - - - - - -

queue

a GQueue

 
-
-
-
-
-

g_queue_free_full ()

-
void
-g_queue_free_full (GQueue *queue,
-                   GDestroyNotify free_func);
-

Convenience method, which frees all the memory used by a GQueue, -and calls the specified destroy function on every element's data.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a pointer to a GQueue

 

free_func

the function to be called to free each element's data

 
-
-

Since: 2.32

-
-
-
-

g_queue_init ()

-
void
-g_queue_init (GQueue *queue);
-

A statically-allocated GQueue must be initialized with this function -before it can be used. Alternatively you can initialize it with -G_QUEUE_INIT. It is not necessary to initialize queues created with -g_queue_new().

-
-

Parameters

-
----- - - - - - -

queue

an uninitialized GQueue

 
-
-

Since: 2.14

-
-
-
-

g_queue_clear ()

-
void
-g_queue_clear (GQueue *queue);
-

Removes all the elements in queue -. If queue elements contain -dynamically-allocated memory, they should be freed first.

-
-

Parameters

-
----- - - - - - -

queue

a GQueue

 
-
-

Since: 2.14

-
-
-
-

g_queue_is_empty ()

-
gboolean
-g_queue_is_empty (GQueue *queue);
-

Returns TRUE if the queue is empty.

-
-

Parameters

-
----- - - - - - -

queue

a GQueue.

 
-
-
-

Returns

-

TRUE if the queue is empty

-
-
-
-
-

g_queue_get_length ()

-
guint
-g_queue_get_length (GQueue *queue);
-

Returns the number of items in queue -.

-
-

Parameters

-
----- - - - - - -

queue

a GQueue

 
-
-
-

Returns

-

the number of items in queue -

-
-

Since: 2.4

-
-
-
-

g_queue_reverse ()

-
void
-g_queue_reverse (GQueue *queue);
-

Reverses the order of the items in queue -.

-
-

Parameters

-
----- - - - - - -

queue

a GQueue

 
-
-

Since: 2.4

-
-
-
-

g_queue_copy ()

-
GQueue *
-g_queue_copy (GQueue *queue);
-

Copies a queue -. Note that is a shallow copy. If the elements in the -queue consist of pointers to data, the pointers are copied, but the -actual data is not.

-
-

Parameters

-
----- - - - - - -

queue

a GQueue

 
-
-
-

Returns

-

a copy of queue -

-
-

Since: 2.4

-
-
-
-

g_queue_foreach ()

-
void
-g_queue_foreach (GQueue *queue,
-                 GFunc func,
-                 gpointer user_data);
-

Calls func - for each element in the queue passing user_data - to the -function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

queue

a GQueue

 

func

the function to call for each element's data

 

user_data

user data to pass to func -

 
-
-

Since: 2.4

-
-
-
-

g_queue_find ()

-
GList *
-g_queue_find (GQueue *queue,
-              gconstpointer data);
-

Finds the first link in queue - which contains data -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GQueue

 

data

data to find

 
-
-
-

Returns

-

the first link in queue -which contains data -

-
-

Since: 2.4

-
-
-
-

g_queue_find_custom ()

-
GList *
-g_queue_find_custom (GQueue *queue,
-                     gconstpointer data,
-                     GCompareFunc func);
-

Finds an element in a GQueue, using a supplied function to find the -desired element. It iterates over the queue, calling the given function -which should return 0 when the desired element is found. The function -takes two gconstpointer arguments, the GQueue element's data as the -first argument and the given user data as the second argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

queue

a GQueue

 

data

user data passed to func -

 

func

a GCompareFunc to call for each element. It should return 0 -when the desired element is found

 
-
-
-

Returns

-

the found link, or NULL if it wasn't found

-
-

Since: 2.4

-
-
-
-

g_queue_sort ()

-
void
-g_queue_sort (GQueue *queue,
-              GCompareDataFunc compare_func,
-              gpointer user_data);
-

Sorts queue - using compare_func -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

queue

a GQueue

 

compare_func

the GCompareDataFunc used to sort queue -. This function -is passed two elements of the queue and should return 0 if they are -equal, a negative value if the first comes before the second, and -a positive value if the second comes before the first.

 

user_data

user data passed to compare_func -

 
-
-

Since: 2.4

-
-
-
-

g_queue_push_head ()

-
void
-g_queue_push_head (GQueue *queue,
-                   gpointer data);
-

Adds a new element at the head of the queue.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GQueue.

 

data

the data for the new element.

 
-
-
-
-
-

g_queue_push_tail ()

-
void
-g_queue_push_tail (GQueue *queue,
-                   gpointer data);
-

Adds a new element at the tail of the queue.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GQueue

 

data

the data for the new element

 
-
-
-
-
-

g_queue_push_nth ()

-
void
-g_queue_push_nth (GQueue *queue,
-                  gpointer data,
-                  gint n);
-

Inserts a new element into queue - at the given position.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

queue

a GQueue

 

data

the data for the new element

 

n

the position to insert the new element. If n -is negative or -larger than the number of elements in the queue -, the element is -added to the end of the queue.

 
-
-

Since: 2.4

-
-
-
-

g_queue_pop_head ()

-
gpointer
-g_queue_pop_head (GQueue *queue);
-

Removes the first element of the queue and returns its data.

-
-

Parameters

-
----- - - - - - -

queue

a GQueue

 
-
-
-

Returns

-

the data of the first element in the queue, or NULL -if the queue is empty

-
-
-
-
-

g_queue_pop_tail ()

-
gpointer
-g_queue_pop_tail (GQueue *queue);
-

Removes the last element of the queue and returns its data.

-
-

Parameters

-
----- - - - - - -

queue

a GQueue

 
-
-
-

Returns

-

the data of the last element in the queue, or NULL -if the queue is empty

-
-
-
-
-

g_queue_pop_nth ()

-
gpointer
-g_queue_pop_nth (GQueue *queue,
-                 guint n);
-

Removes the n -'th element of queue - and returns its data.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GQueue

 

n

the position of the element

 
-
-
-

Returns

-

the element's data, or NULL if n -is off the end of queue -

-
-

Since: 2.4

-
-
-
-

g_queue_peek_head ()

-
gpointer
-g_queue_peek_head (GQueue *queue);
-

Returns the first element of the queue.

-
-

Parameters

-
----- - - - - - -

queue

a GQueue

 
-
-
-

Returns

-

the data of the first element in the queue, or NULL -if the queue is empty

-
-
-
-
-

g_queue_peek_tail ()

-
gpointer
-g_queue_peek_tail (GQueue *queue);
-

Returns the last element of the queue.

-
-

Parameters

-
----- - - - - - -

queue

a GQueue

 
-
-
-

Returns

-

the data of the last element in the queue, or NULL -if the queue is empty

-
-
-
-
-

g_queue_peek_nth ()

-
gpointer
-g_queue_peek_nth (GQueue *queue,
-                  guint n);
-

Returns the n -'th element of queue -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GQueue

 

n

the position of the element

 
-
-
-

Returns

-

the data for the n -'th element of queue -, -or NULL if n -is off the end of queue -

-
-

Since: 2.4

-
-
-
-

g_queue_index ()

-
gint
-g_queue_index (GQueue *queue,
-               gconstpointer data);
-

Returns the position of the first element in queue - which contains data -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GQueue

 

data

the data to find

 
-
-
-

Returns

-

the position of the first element in queue -which -contains data -, or -1 if no element in queue -contains data -

-
-

Since: 2.4

-
-
-
-

g_queue_remove ()

-
gboolean
-g_queue_remove (GQueue *queue,
-                gconstpointer data);
-

Removes the first element in queue - that contains data -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GQueue

 

data

the data to remove

 
-
-
-

Returns

-

TRUE if data -was found and removed from queue -

-
-

Since: 2.4

-
-
-
-

g_queue_remove_all ()

-
guint
-g_queue_remove_all (GQueue *queue,
-                    gconstpointer data);
-

Remove all elements whose data equals data - from queue -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GQueue

 

data

the data to remove

 
-
-
-

Returns

-

the number of elements removed from queue -

-
-

Since: 2.4

-
-
-
-

g_queue_insert_before ()

-
void
-g_queue_insert_before (GQueue *queue,
-                       GList *sibling,
-                       gpointer data);
-

Inserts data - into queue - before sibling -.

-

sibling - must be part of queue -. Since GLib 2.44 a NULL sibling pushes the -data at the tail of the queue.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

queue

a GQueue

 

sibling

a GList link that must be part of queue -, or NULL to -push at the tail of the queue.

[nullable]

data

the data to insert

 
-
-

Since: 2.4

-
-
-
-

g_queue_insert_after ()

-
void
-g_queue_insert_after (GQueue *queue,
-                      GList *sibling,
-                      gpointer data);
-

Inserts data - into queue - after sibling -.

-

sibling - must be part of queue -. Since GLib 2.44 a NULL sibling pushes the -data at the head of the queue.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

queue

a GQueue

 

sibling

a GList link that must be part of queue -, or NULL to -push at the head of the queue.

[nullable]

data

the data to insert

 
-
-

Since: 2.4

-
-
-
-

g_queue_insert_sorted ()

-
void
-g_queue_insert_sorted (GQueue *queue,
-                       gpointer data,
-                       GCompareDataFunc func,
-                       gpointer user_data);
-

Inserts data - into queue - using func - to determine the new position.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

queue

a GQueue

 

data

the data to insert

 

func

the GCompareDataFunc used to compare elements in the queue. It is -called with two elements of the queue -and user_data -. It should -return 0 if the elements are equal, a negative value if the first -element comes before the second, and a positive value if the second -element comes before the first.

 

user_data

user data passed to func -

 
-
-

Since: 2.4

-
-
-
-

g_queue_push_head_link ()

-
void
-g_queue_push_head_link (GQueue *queue,
-                        GList *link_);
-

Adds a new element at the head of the queue.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GQueue

 

link_

a single GList element, not a list with more than one element

 
-
-
-
-
-

g_queue_push_tail_link ()

-
void
-g_queue_push_tail_link (GQueue *queue,
-                        GList *link_);
-

Adds a new element at the tail of the queue.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GQueue

 

link_

a single GList element, not a list with more than one element

 
-
-
-
-
-

g_queue_push_nth_link ()

-
void
-g_queue_push_nth_link (GQueue *queue,
-                       gint n,
-                       GList *link_);
-

Inserts link - into queue - at the given position.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

queue

a GQueue

 

n

the position to insert the link. If this is negative or larger than -the number of elements in queue -, the link is added to the end of -queue -.

 

link_

the link to add to queue -

 
-
-

Since: 2.4

-
-
-
-

g_queue_pop_head_link ()

-
GList *
-g_queue_pop_head_link (GQueue *queue);
-

Removes and returns the first element of the queue.

-
-

Parameters

-
----- - - - - - -

queue

a GQueue

 
-
-
-

Returns

-

the GList element at the head of the queue, or NULL -if the queue is empty

-
-
-
-
-

g_queue_pop_tail_link ()

-
GList *
-g_queue_pop_tail_link (GQueue *queue);
-

Removes and returns the last element of the queue.

-
-

Parameters

-
----- - - - - - -

queue

a GQueue

 
-
-
-

Returns

-

the GList element at the tail of the queue, or NULL -if the queue is empty

-
-
-
-
-

g_queue_pop_nth_link ()

-
GList *
-g_queue_pop_nth_link (GQueue *queue,
-                      guint n);
-

Removes and returns the link at the given position.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GQueue

 

n

the link's position

 
-
-
-

Returns

-

the n -'th link, or NULL if n -is off the end of queue -

-
-

Since: 2.4

-
-
-
-

g_queue_peek_head_link ()

-
GList *
-g_queue_peek_head_link (GQueue *queue);
-

Returns the first link in queue -.

-
-

Parameters

-
----- - - - - - -

queue

a GQueue

 
-
-
-

Returns

-

the first link in queue -, or NULL if queue -is empty

-
-

Since: 2.4

-
-
-
-

g_queue_peek_tail_link ()

-
GList *
-g_queue_peek_tail_link (GQueue *queue);
-

Returns the last link in queue -.

-
-

Parameters

-
----- - - - - - -

queue

a GQueue

 
-
-
-

Returns

-

the last link in queue -, or NULL if queue -is empty

-
-

Since: 2.4

-
-
-
-

g_queue_peek_nth_link ()

-
GList *
-g_queue_peek_nth_link (GQueue *queue,
-                       guint n);
-

Returns the link at the given position

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GQueue

 

n

the position of the link

 
-
-
-

Returns

-

the link at the n -'th position, or NULL -if n -is off the end of the list

-
-

Since: 2.4

-
-
-
-

g_queue_link_index ()

-
gint
-g_queue_link_index (GQueue *queue,
-                    GList *link_);
-

Returns the position of link_ - in queue -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GQueue

 

link_

a GList link

 
-
-
-

Returns

-

the position of link_ -, or -1 if the link is -not part of queue -

-
-

Since: 2.4

-
-
-
-

g_queue_unlink ()

-
void
-g_queue_unlink (GQueue *queue,
-                GList *link_);
-

Unlinks link_ - so that it will no longer be part of queue -. -The link is not freed.

-

link_ - must be part of queue -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GQueue

 

link_

a GList link that must be part of queue -

 
-
-

Since: 2.4

-
-
-
-

g_queue_delete_link ()

-
void
-g_queue_delete_link (GQueue *queue,
-                     GList *link_);
-

Removes link_ - from queue - and frees it.

-

link_ - must be part of queue -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

queue

a GQueue

 

link_

a GList link that must be part of queue -

 
-
-

Since: 2.4

-
-
-
-

Types and Values

-
-

struct GQueue

-
struct GQueue {
-  GList *head;
-  GList *tail;
-  guint  length;
-};
-
-

Contains the public fields of a -Queue.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

GList *head;

a pointer to the first element of the queue

 

GList *tail;

a pointer to the last element of the queue

 

guint length;

the number of elements in the queue

 
-
-
-
-
-

G_QUEUE_INIT

-
#define G_QUEUE_INIT { NULL, NULL, 0 }
-
-

A statically-allocated GQueue must be initialized with this -macro before it can be used. This macro can be used to initialize -a variable, but it cannot be assigned to a variable. In that case -you have to use g_queue_init().

-
- - - - - - - -
1
GQueue my_queue = G_QUEUE_INIT;
-
- -

-

Since: 2.14

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Doubly-Linked-Lists.html b/docs/reference/glib/html/glib-Doubly-Linked-Lists.html deleted file mode 100644 index 27e3c48e4..000000000 --- a/docs/reference/glib/html/glib-Doubly-Linked-Lists.html +++ /dev/null @@ -1,1921 +0,0 @@ - - - - -Doubly-Linked Lists: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Doubly-Linked Lists

-

Doubly-Linked Lists — linked lists that can be iterated over in both directions

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GList * - -g_list_append () -
-GList * - -g_list_prepend () -
-GList * - -g_list_insert () -
-GList * - -g_list_insert_before () -
-GList * - -g_list_insert_sorted () -
-GList * - -g_list_remove () -
-GList * - -g_list_remove_link () -
-GList * - -g_list_delete_link () -
-GList * - -g_list_remove_all () -
-void - -g_list_free () -
-void - -g_list_free_full () -
-GList * - -g_list_alloc () -
-void - -g_list_free_1 () -
-guint - -g_list_length () -
-GList * - -g_list_copy () -
-GList * - -g_list_copy_deep () -
-GList * - -g_list_reverse () -
-GList * - -g_list_sort () -
-gint - -(*GCompareFunc) () -
-GList * - -g_list_insert_sorted_with_data () -
-GList * - -g_list_sort_with_data () -
-gint - -(*GCompareDataFunc) () -
-GList * - -g_list_concat () -
-void - -g_list_foreach () -
-void - -(*GFunc) () -
-GList * - -g_list_first () -
-GList * - -g_list_last () -
#define -g_list_previous() -
#define -g_list_next() -
-GList * - -g_list_nth () -
-gpointer - -g_list_nth_data () -
-GList * - -g_list_nth_prev () -
-GList * - -g_list_find () -
-GList * - -g_list_find_custom () -
-gint - -g_list_position () -
-gint - -g_list_index () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
structGList
#defineg_list_free1
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The GList structure and its associated functions provide a standard -doubly-linked list data structure.

-

Each element in the list contains a piece of data, together with -pointers which link to the previous and next elements in the list. -Using these pointers it is possible to move through the list in both -directions (unlike the singly-linked GSList, -which only allows movement through the list in the forward direction).

-

The double linked list does not keep track of the number of items -and does not keep track of both the start and end of the list. If -you want fast access to both the start and the end of the list, -and/or the number of items in the list, use a -GQueue instead.

-

The data contained in each element can be either integer values, by -using one of the Type Conversion Macros, -or simply pointers to any type of data.

-

List elements are allocated from the slice allocator, -which is more efficient than allocating elements individually.

-

Note that most of the GList functions expect to be passed a pointer -to the first element in the list. The functions which insert -elements return the new start of the list, which may have changed.

-

There is no function to create a GList. NULL is considered to be -a valid, empty list so you simply set a GList* to NULL to initialize -it.

-

To add elements, use g_list_append(), g_list_prepend(), -g_list_insert() and g_list_insert_sorted().

-

To visit all elements in the list, use a loop over the list:

-
- - - - - - - -
1
-2
-3
-4
-5
GList *l;
-for (l = list; l != NULL; l = l->next)
-  {
-    // do something with l->data
-  }
-
- -

-

To call a function for each element in the list, use g_list_foreach().

-

To loop over the list and modify it (e.g. remove a certain element) -a while loop is more appropriate, for example:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
GList *l = list;
-while (l != NULL)
-  {
-    GList *next = l->next;
-    if (should_be_removed (l))
-      {
-        // possibly free l->data
-        list = g_list_delete_link (list, l);
-      }
-    l = next;
-  }
-
- -

-

To remove elements, use g_list_remove().

-

To navigate in a list, use g_list_first(), g_list_last(), -g_list_next(), g_list_previous().

-

To find elements in the list use g_list_nth(), g_list_nth_data(), -g_list_find() and g_list_find_custom().

-

To find the index of an element use g_list_position() and -g_list_index().

-

To free the entire list, use g_list_free() or g_list_free_full().

-
-
-

Functions

-
-

g_list_append ()

-
GList *
-g_list_append (GList *list,
-               gpointer data);
-

Adds a new element on to the end of the list.

-

Note that the return value is the new start of the list, -if list - was empty; make sure you store the new value.

-

g_list_append() has to traverse the entire list to find the end, -which is inefficient when adding multiple elements. A common idiom -to avoid the inefficiency is to use g_list_prepend() and reverse -the list with g_list_reverse() when all elements have been added.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
// Notice that these are initialized to the empty list.
-GList *string_list = NULL, *number_list = NULL;
-
-// This is a list of strings.
-string_list = g_list_append (string_list, "first");
-string_list = g_list_append (string_list, "second");
-
-// This is a list of integers.
-number_list = g_list_append (number_list, GINT_TO_POINTER (27));
-number_list = g_list_append (number_list, GINT_TO_POINTER (14));
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a pointer to a GList

 

data

the data for the new element

 
-
-
-

Returns

-

either list -or the new start of the GList if list -was NULL

-
-
-
-
-

g_list_prepend ()

-
GList *
-g_list_prepend (GList *list,
-                gpointer data);
-

Prepends a new element on to the start of the list.

-

Note that the return value is the new start of the list, -which will have changed, so make sure you store the new value.

-
- - - - - - - -
1
-2
-3
-4
-5
// Notice that it is initialized to the empty list.
-GList *list = NULL;
-
-list = g_list_prepend (list, "last");
-list = g_list_prepend (list, "first");
-
- -

-

Do not use this function to prepend a new element to a different -element than the start of the list. Use g_list_insert_before() instead.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a pointer to a GList, this must point to the top of the list

 

data

the data for the new element

 
-
-
-

Returns

-

a pointer to the newly prepended element, which is the new -start of the GList

-
-
-
-
-

g_list_insert ()

-
GList *
-g_list_insert (GList *list,
-               gpointer data,
-               gint position);
-

Inserts a new element into the list at the given position.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

list

a pointer to a GList, this must point to the top of the list

 

data

the data for the new element

 

position

the position to insert the element. If this is -negative, or is larger than the number of elements in the -list, the new element is added on to the end of the list.

 
-
-
-

Returns

-

the (possibly changed) start of the GList

-
-
-
-
-

g_list_insert_before ()

-
GList *
-g_list_insert_before (GList *list,
-                      GList *sibling,
-                      gpointer data);
-

Inserts a new element into the list before the given position.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

list

a pointer to a GList, this must point to the top of the list

 

sibling

the list element before which the new element -is inserted or NULL to insert at the end of the list

 

data

the data for the new element

 
-
-
-

Returns

-

the (possibly changed) start of the GList

-
-
-
-
-

g_list_insert_sorted ()

-
GList *
-g_list_insert_sorted (GList *list,
-                      gpointer data,
-                      GCompareFunc func);
-

Inserts a new element into the list, using the given comparison -function to determine its position.

-

If you are adding many new elements to a list, and the number of -new elements is much larger than the length of the list, use -g_list_prepend() to add the new items and sort the list afterwards -with g_list_sort().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

list

a pointer to a GList, this must point to the top of the -already sorted list

 

data

the data for the new element

 

func

the function to compare elements in the list. It should -return a number > 0 if the first parameter comes after the -second parameter in the sort order.

 
-
-
-

Returns

-

the (possibly changed) start of the GList

-
-
-
-
-

g_list_remove ()

-
GList *
-g_list_remove (GList *list,
-               gconstpointer data);
-

Removes an element from a GList. -If two elements contain the same data, only the first is removed. -If none of the elements contain the data, the GList is unchanged.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GList, this must point to the top of the list

 

data

the data of the element to remove

 
-
-
-

Returns

-

the (possibly changed) start of the GList

-
-
-
-
-

g_list_remove_link ()

-
GList *
-g_list_remove_link (GList *list,
-                    GList *llink);
-

Removes an element from a GList, without freeing the element. -The removed element's prev and next links are set to NULL, so -that it becomes a self-contained list with one element.

-

This function is for example used to move an element in the list -(see the example for g_list_concat()) or to remove an element in -the list before freeing its data:

-
- - - - - - - -
1
-2
-3
list = g_list_remove_link (list, llink);
-free_some_data_that_may_access_the_list_again (llink->data);
-g_list_free (llink);
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GList, this must point to the top of the list

 

llink

an element in the GList

 
-
-
-

Returns

-

the (possibly changed) start of the GList

-
-
-
-
-

g_list_delete_link ()

-
GList *
-g_list_delete_link (GList *list,
-                    GList *link_);
-

Removes the node link_ from the list and frees it. -Compare this to g_list_remove_link() which removes the node -without freeing it.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GList, this must point to the top of the list

 

link_

node to delete from list -

 
-
-
-

Returns

-

the (possibly changed) start of the GList

-
-
-
-
-

g_list_remove_all ()

-
GList *
-g_list_remove_all (GList *list,
-                   gconstpointer data);
-

Removes all list nodes with data equal to data -. -Returns the new head of the list. Contrast with -g_list_remove() which removes only the first node -matching the given data.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GList, this must point to the top of the list

 

data

data to remove

 
-
-
-

Returns

-

the (possibly changed) start of the GList

-
-
-
-
-

g_list_free ()

-
void
-g_list_free (GList *list);
-

Frees all of the memory used by a GList. -The freed elements are returned to the slice allocator.

-

If list elements contain dynamically-allocated memory, you should -either use g_list_free_full() or free them manually first.

-
-

Parameters

-
----- - - - - - -

list

a GList

 
-
-
-
-
-

g_list_free_full ()

-
void
-g_list_free_full (GList *list,
-                  GDestroyNotify free_func);
-

Convenience method, which frees all the memory used by a GList, -and calls free_func - on every element's data.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a pointer to a GList

 

free_func

the function to be called to free each element's data

 
-
-

Since: 2.28

-
-
-
-

g_list_alloc ()

-
GList *
-g_list_alloc (void);
-

Allocates space for one GList element. It is called by -g_list_append(), g_list_prepend(), g_list_insert() and -g_list_insert_sorted() and so is rarely used on its own.

-
-

Returns

-

a pointer to the newly-allocated GList element

-
-
-
-
-

g_list_free_1 ()

-
void
-g_list_free_1 (GList *list);
-

Frees one GList element, but does not update links from the next and -previous elements in the list, so you should not call this function on an -element that is currently part of a list.

-

It is usually used after g_list_remove_link().

-
-

Parameters

-
----- - - - - - -

list

a GList element

 
-
-
-
-
-

g_list_length ()

-
guint
-g_list_length (GList *list);
-

Gets the number of elements in a GList.

-

This function iterates over the whole list to count its elements. -Use a GQueue instead of a GList if you regularly need the number -of items. To check whether the list is non-empty, it is faster to check -list - against NULL.

-
-

Parameters

-
----- - - - - - -

list

a GList, this must point to the top of the list

 
-
-
-

Returns

-

the number of elements in the GList

-
-
-
-
-

g_list_copy ()

-
GList *
-g_list_copy (GList *list);
-

Copies a GList.

-

Note that this is a "shallow" copy. If the list elements -consist of pointers to data, the pointers are copied but -the actual data is not. See g_list_copy_deep() if you need -to copy the data as well.

-
-

Parameters

-
----- - - - - - -

list

a GList, this must point to the top of the list

 
-
-
-

Returns

-

the start of the new list that holds the same data as list -

-
-
-
-
-

g_list_copy_deep ()

-
GList *
-g_list_copy_deep (GList *list,
-                  GCopyFunc func,
-                  gpointer user_data);
-

Makes a full (deep) copy of a GList.

-

In contrast with g_list_copy(), this function uses func - to make -a copy of each list element, in addition to copying the list -container itself.

-

func -, as a GCopyFunc, takes two arguments, the data to be copied -and a user_data - pointer. It's safe to pass NULL as user_data, -if the copy function takes only one argument.

-

For instance, if list - holds a list of GObjects, you can do:

-
- - - - - - - -
1
another_list = g_list_copy_deep (list, (GCopyFunc) g_object_ref, NULL);
-
- -

-

And, to entirely free the new list, you could do:

-
- - - - - - - -
1
g_list_free_full (another_list, g_object_unref);
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

list

a GList, this must point to the top of the list

 

func

a copy function used to copy every element in the list

 

user_data

user data passed to the copy function func -, or NULL

 
-
-
-

Returns

-

the start of the new list that holds a full copy of list -, -use g_list_free_full() to free it

-
-

Since: 2.34

-
-
-
-

g_list_reverse ()

-
GList *
-g_list_reverse (GList *list);
-

Reverses a GList. -It simply switches the next and prev pointers of each element.

-
-

Parameters

-
----- - - - - - -

list

a GList, this must point to the top of the list

 
-
-
-

Returns

-

the start of the reversed GList

-
-
-
-
-

g_list_sort ()

-
GList *
-g_list_sort (GList *list,
-             GCompareFunc compare_func);
-

Sorts a GList using the given comparison function. The algorithm -used is a stable sort.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GList, this must point to the top of the list

 

compare_func

the comparison function used to sort the GList. -This function is passed the data from 2 elements of the GList -and should return 0 if they are equal, a negative value if the -first element comes before the second, or a positive value if -the first element comes after the second.

 
-
-
-

Returns

-

the (possibly changed) start of the GList

-
-
-
-
-

GCompareFunc ()

-
gint
-(*GCompareFunc) (gconstpointer a,
-                 gconstpointer b);
-

Specifies the type of a comparison function used to compare two -values. The function should return a negative integer if the first -value comes before the second, 0 if they are equal, or a positive -integer if the first value comes after the second.

-
-

Parameters

-
----- - - - - - - - - - - - - -

a

a value

 

b

a value to compare with

 
-
-
-

Returns

-

negative value if a -< b -; zero if a -= b -; positive -value if a -> b -

-
-
-
-
-

g_list_insert_sorted_with_data ()

-
GList *
-g_list_insert_sorted_with_data (GList *list,
-                                gpointer data,
-                                GCompareDataFunc func,
-                                gpointer user_data);
-

Inserts a new element into the list, using the given comparison -function to determine its position.

-

If you are adding many new elements to a list, and the number of -new elements is much larger than the length of the list, use -g_list_prepend() to add the new items and sort the list afterwards -with g_list_sort().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

list

a pointer to a GList, this must point to the top of the -already sorted list

 

data

the data for the new element

 

func

the function to compare elements in the list. It should -return a number > 0 if the first parameter comes after the -second parameter in the sort order.

 

user_data

user data to pass to comparison function

 
-
-
-

Returns

-

the (possibly changed) start of the GList

-
-

Since: 2.10

-
-
-
-

g_list_sort_with_data ()

-
GList *
-g_list_sort_with_data (GList *list,
-                       GCompareDataFunc compare_func,
-                       gpointer user_data);
-

Like g_list_sort(), but the comparison function accepts -a user data argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

list

a GList, this must point to the top of the list

 

compare_func

comparison function

 

user_data

user data to pass to comparison function

 
-
-
-

Returns

-

the (possibly changed) start of the GList

-
-
-
-
-

GCompareDataFunc ()

-
gint
-(*GCompareDataFunc) (gconstpointer a,
-                     gconstpointer b,
-                     gpointer user_data);
-

Specifies the type of a comparison function used to compare two -values. The function should return a negative integer if the first -value comes before the second, 0 if they are equal, or a positive -integer if the first value comes after the second.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

a

a value

 

b

a value to compare with

 

user_data

user data

 
-
-
-

Returns

-

negative value if a -< b -; zero if a -= b -; positive -value if a -> b -

-
-
-
-
-

g_list_concat ()

-
GList *
-g_list_concat (GList *list1,
-               GList *list2);
-

Adds the second GList onto the end of the first GList. -Note that the elements of the second GList are not copied. -They are used directly.

-

This function is for example used to move an element in the list. -The following example moves an element to the top of the list:

-
- - - - - - - -
1
-2
list = g_list_remove_link (list, llink);
-list = g_list_concat (llink, list);
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

list1

a GList, this must point to the top of the list

 

list2

the GList to add to the end of the first GList, -this must point to the top of the list

 
-
-
-

Returns

-

the start of the new GList, which equals list1 -if not NULL

-
-
-
-
-

g_list_foreach ()

-
void
-g_list_foreach (GList *list,
-                GFunc func,
-                gpointer user_data);
-

Calls a function for each element of a GList.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

list

a GList, this must point to the top of the list

 

func

the function to call with each element's data

 

user_data

user data to pass to the function

 
-
-
-
-
-

GFunc ()

-
void
-(*GFunc) (gpointer data,
-          gpointer user_data);
-

Specifies the type of functions passed to g_list_foreach() and -g_slist_foreach().

-
-

Parameters

-
----- - - - - - - - - - - - - -

data

the element's data

 

user_data

user data passed to g_list_foreach() or g_slist_foreach()

 
-
-
-
-
-

g_list_first ()

-
GList *
-g_list_first (GList *list);
-

Gets the first element in a GList.

-
-

Parameters

-
----- - - - - - -

list

any GList element

 
-
-
-

Returns

-

the first element in the GList, -or NULL if the GList has no elements

-
-
-
-
-

g_list_last ()

-
GList *
-g_list_last (GList *list);
-

Gets the last element in a GList.

-
-

Parameters

-
----- - - - - - -

list

any GList element

 
-
-
-

Returns

-

the last element in the GList, -or NULL if the GList has no elements

-
-
-
-
-

g_list_previous()

-
#define             g_list_previous(list)
-

A convenience macro to get the previous element in a GList. -Note that it is considered perfectly acceptable to access -list->previous - directly.

-
-

Parameters

-
----- - - - - - -

list

an element in a GList

 
-
-
-

Returns

-

the previous element, or NULL if there are no previous -elements

-
-
-
-
-

g_list_next()

-
#define             g_list_next(list)
-

A convenience macro to get the next element in a GList. -Note that it is considered perfectly acceptable to access -list->next - directly.

-
-

Parameters

-
----- - - - - - -

list

an element in a GList

 
-
-
-

Returns

-

the next element, or NULL if there are no more elements

-
-
-
-
-

g_list_nth ()

-
GList *
-g_list_nth (GList *list,
-            guint n);
-

Gets the element at the given position in a GList.

-

This iterates over the list until it reaches the n --th position. If you -intend to iterate over every element, it is better to use a for-loop as -described in the GList introduction.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GList, this must point to the top of the list

 

n

the position of the element, counting from 0

 
-
-
-

Returns

-

the element, or NULL if the position is off -the end of the GList

-
-
-
-
-

g_list_nth_data ()

-
gpointer
-g_list_nth_data (GList *list,
-                 guint n);
-

Gets the data of the element at the given position.

-

This iterates over the list until it reaches the n --th position. If you -intend to iterate over every element, it is better to use a for-loop as -described in the GList introduction.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GList, this must point to the top of the list

 

n

the position of the element

 
-
-
-

Returns

-

the element's data, or NULL if the position -is off the end of the GList

-
-
-
-
-

g_list_nth_prev ()

-
GList *
-g_list_nth_prev (GList *list,
-                 guint n);
-

Gets the element n - places before list -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GList

 

n

the position of the element, counting from 0

 
-
-
-

Returns

-

the element, or NULL if the position is -off the end of the GList

-
-
-
-
-

g_list_find ()

-
GList *
-g_list_find (GList *list,
-             gconstpointer data);
-

Finds the element in a GList which contains the given data.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GList, this must point to the top of the list

 

data

the element data to find

 
-
-
-

Returns

-

the found GList element, or NULL if it is not found

-
-
-
-
-

g_list_find_custom ()

-
GList *
-g_list_find_custom (GList *list,
-                    gconstpointer data,
-                    GCompareFunc func);
-

Finds an element in a GList, using a supplied function to -find the desired element. It iterates over the list, calling -the given function which should return 0 when the desired -element is found. The function takes two gconstpointer arguments, -the GList element's data as the first argument and the -given user data.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

list

a GList, this must point to the top of the list

 

data

user data passed to the function

 

func

the function to call for each element. -It should return 0 when the desired element is found

 
-
-
-

Returns

-

the found GList element, or NULL if it is not found

-
-
-
-
-

g_list_position ()

-
gint
-g_list_position (GList *list,
-                 GList *llink);
-

Gets the position of the given element -in the GList (starting from 0).

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GList, this must point to the top of the list

 

llink

an element in the GList

 
-
-
-

Returns

-

the position of the element in the GList, -or -1 if the element is not found

-
-
-
-
-

g_list_index ()

-
gint
-g_list_index (GList *list,
-              gconstpointer data);
-

Gets the position of the element containing -the given data (starting from 0).

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GList, this must point to the top of the list

 

data

the data to find

 
-
-
-

Returns

-

the index of the element containing the data, -or -1 if the data is not found

-
-
-
-
-

Types and Values

-
-

struct GList

-
struct GList {
-  gpointer data;
-  GList *next;
-  GList *prev;
-};
-
-

The GList struct is used for each element in a doubly-linked list.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

gpointer data;

holds the element's data, which can be a pointer to any kind -of data, or any integer value using the -Type Conversion Macros

 

GList *next;

contains the link to the next element in the list

 

GList *prev;

contains the link to the previous element in the list

 
-
-
-
-
-

g_list_free1

-
#define             g_list_free1
-

Another name for g_list_free_1().

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Dynamic-Loading-of-Modules.html b/docs/reference/glib/html/glib-Dynamic-Loading-of-Modules.html deleted file mode 100644 index f7133e863..000000000 --- a/docs/reference/glib/html/glib-Dynamic-Loading-of-Modules.html +++ /dev/null @@ -1,660 +0,0 @@ - - - - -Dynamic Loading of Modules: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Dynamic Loading of Modules

-

Dynamic Loading of Modules — portable method for dynamically loading 'plug-ins'

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -g_module_supported () -
-gchar * - -g_module_build_path () -
-GModule * - -g_module_open () -
-gboolean - -g_module_symbol () -
const gchar * - -g_module_name () -
-void - -g_module_make_resident () -
-gboolean - -g_module_close () -
const gchar * - -g_module_error () -
const gchar * - -(*GModuleCheckInit) () -
-void - -(*GModuleUnload) () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - -
 GModule
enumGModuleFlags
#defineG_MODULE_SUFFIX
#defineG_MODULE_EXPORT
#defineG_MODULE_IMPORT
-
-
-

Includes

-
#include <gmodule.h>
-
-
-
-

Description

-

These functions provide a portable way to dynamically load object files -(commonly known as 'plug-ins'). The current implementation supports all -systems that provide an implementation of dlopen() (e.g. Linux/Sun), as -well as Windows platforms via DLLs.

-

A program which wants to use these functions must be linked to the -libraries output by the command pkg-config --libs gmodule-2.0.

-

To use them you must first determine whether dynamic loading -is supported on the platform by calling g_module_supported(). -If it is, you can open a module with g_module_open(), -find the module's symbols (e.g. function names) with g_module_symbol(), -and later close the module with g_module_close(). -g_module_name() will return the file name of a currently opened module.

-

If any of the above functions fail, the error status can be found with -g_module_error().

-

The GModule implementation features reference counting for opened modules, -and supports hook functions within a module which are called when the -module is loaded and unloaded (see GModuleCheckInit and GModuleUnload).

-

If your module introduces static data to common subsystems in the running -program, e.g. through calling -g_quark_from_static_string ("my-module-stuff"), -it must ensure that it is never unloaded, by calling g_module_make_resident().

-

Example: Calling a function defined in a GModule

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
// the function signature for 'say_hello'
-typedef void (* SayHelloFunc) (const char *message);
-
-gboolean
-just_say_hello (const char *filename, GError **error)
-{
-  SayHelloFunc  say_hello;
-  GModule      *module;
-
-  module = g_module_open (filename, G_MODULE_BIND_LAZY);
-  if (!module)
-    {
-      g_set_error (error, FOO_ERROR, FOO_ERROR_BLAH,
-                   "%s", g_module_error ());
-      return FALSE;
-    }
-
-  if (!g_module_symbol (module, "say_hello", (gpointer *)&say_hello))
-    {
-      g_set_error (error, SAY_ERROR, SAY_ERROR_OPEN,
-                   "%s: %s", filename, g_module_error ());
-      if (!g_module_close (module))
-        g_warning ("%s: %s", filename, g_module_error ());
-      return FALSE;
-    }
-
-  if (say_hello == NULL)
-    {
-      g_set_error (error, SAY_ERROR, SAY_ERROR_OPEN,
-                   "symbol say_hello is NULL");
-      if (!g_module_close (module))
-        g_warning ("%s: %s", filename, g_module_error ());
-      return FALSE;
-    }
-
-  // call our function in the module
-  say_hello ("Hello world!");
-
-  if (!g_module_close (module))
-    g_warning ("%s: %s", filename, g_module_error ());
-  return TRUE;
- }
-
- -

-
-
-

Functions

-
-

g_module_supported ()

-
gboolean
-g_module_supported (void);
-

Checks if modules are supported on the current platform.

-
-

Returns

-

TRUE if modules are supported

-
-
-
-
-

g_module_build_path ()

-
gchar *
-g_module_build_path (const gchar *directory,
-                     const gchar *module_name);
-

A portable way to build the filename of a module. The platform-specific -prefix and suffix are added to the filename, if needed, and the result -is added to the directory, using the correct separator character.

-

The directory should specify the directory where the module can be found. -It can be NULL or an empty string to indicate that the module is in a -standard platform-specific directory, though this is not recommended -since the wrong module may be found.

-

For example, calling g_module_build_path() on a Linux system with a -directory - of /lib and a module_name - of "mylibrary" will return -/lib/libmylibrary.so. On a Windows system, using \Windows as the -directory it will return \Windows\mylibrary.dll.

-
-

Parameters

-
----- - - - - - - - - - - - - -

directory

the directory where the module is. This can be -NULL or the empty string to indicate that the standard platform-specific -directories will be used, though that is not recommended.

[nullable]

module_name

the name of the module

 
-
-
-

Returns

-

the complete path of the module, including the standard library -prefix and suffix. This should be freed when no longer needed

-
-
-
-
-

g_module_open ()

-
GModule *
-g_module_open (const gchar *file_name,
-               GModuleFlags flags);
-

Opens a module. If the module has already been opened, -its reference count is incremented.

-

First of all g_module_open() tries to open file_name - as a module. -If that fails and file_name - has the ".la"-suffix (and is a libtool -archive) it tries to open the corresponding module. If that fails -and it doesn't have the proper module suffix for the platform -(G_MODULE_SUFFIX), this suffix will be appended and the corresponding -module will be opended. If that fails and file_name - doesn't have the -".la"-suffix, this suffix is appended and g_module_open() tries to open -the corresponding module. If eventually that fails as well, NULL is -returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

file_name

the name of the file containing the module, or NULL -to obtain a GModule representing the main program itself.

[nullable]

flags

the flags used for opening the module. This can be the -logical OR of any of the GModuleFlags

 
-
-
-

Returns

-

a GModule on success, or NULL on failure

-
-
-
-
-

g_module_symbol ()

-
gboolean
-g_module_symbol (GModule *module,
-                 const gchar *symbol_name,
-                 gpointer *symbol);
-

Gets a symbol pointer from a module, such as one exported -by G_MODULE_EXPORT. Note that a valid symbol can be NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

module

a GModule

 

symbol_name

the name of the symbol to find

 

symbol

returns the pointer to the symbol value.

[out]
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

g_module_name ()

-
const gchar *
-g_module_name (GModule *module);
-

Returns the filename that the module was opened with.

-

If module - refers to the application itself, "main" is returned.

-
-

Parameters

-
----- - - - - - -

module

a GModule

 
-
-
-

Returns

-

the filename of the module.

-

[transfer none]

-
-
-
-
-

g_module_make_resident ()

-
void
-g_module_make_resident (GModule *module);
-

Ensures that a module will never be unloaded. -Any future g_module_close() calls on the module will be ignored.

-
-

Parameters

-
----- - - - - - -

module

a GModule to make permanently resident

 
-
-
-
-
-

g_module_close ()

-
gboolean
-g_module_close (GModule *module);
-

Closes a module.

-
-

Parameters

-
----- - - - - - -

module

a GModule to close

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

g_module_error ()

-
const gchar *
-g_module_error (void);
-

Gets a string describing the last module error.

-
-

Returns

-

a string describing the last module error

-
-
-
-
-

GModuleCheckInit ()

-
const gchar *
-(*GModuleCheckInit) (GModule *module);
-

Specifies the type of the module initialization function. -If a module contains a function named g_module_check_init() it is called -automatically when the module is loaded. It is passed the GModule structure -and should return NULL on success or a string describing the initialization -error.

-
-

Parameters

-
----- - - - - - -

module

the GModule corresponding to the module which has just been loaded

 
-
-
-

Returns

-

NULL on success, or a string describing the initialization error

-
-
-
-
-

GModuleUnload ()

-
void
-(*GModuleUnload) (GModule *module);
-

Specifies the type of the module function called when it is unloaded. -If a module contains a function named g_module_unload() it is called -automatically when the module is unloaded. -It is passed the GModule structure.

-
-

Parameters

-
----- - - - - - -

module

the GModule about to be unloaded

 
-
-
-
-
-

Types and Values

-
-

GModule

-
typedef struct _GModule GModule;
-

The GModule struct is an opaque data structure to represent a -dynamically-loaded module. -It should only be accessed via the following functions.

-
-
-
-

enum GModuleFlags

-

Flags passed to g_module_open(). -Note that these flags are not supported on all platforms.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_MODULE_BIND_LAZY

-

specifies that symbols are only resolved when - needed. The default action is to bind all symbols when the module - is loaded.

-
 

G_MODULE_BIND_LOCAL

-

specifies that symbols in the module should - not be added to the global name space. The default action on most - platforms is to place symbols in the module in the global name space, - which may cause conflicts with existing symbols.

-
 

G_MODULE_BIND_MASK

-

mask for all flags.

-
 
-
-
-
-
-

G_MODULE_SUFFIX

-
#define G_MODULE_SUFFIX "so"
-
-

Expands to the proper shared library suffix for the current platform -without the leading dot. For most Unices and Linux this is "so", and -for Windows this is "dll".

-
-
-
-

G_MODULE_EXPORT

-
#  define G_MODULE_EXPORT		__declspec(dllexport)
-
-

Used to declare functions exported by libraries or modules.

-

When compiling for Windows, it marks the symbol as dllexport.

-

When compiling for Linux and Unices, it marks the symbol as having default -visibility. This is no-op unless the code is being compiled with a -non-default -visibility flag -such as hidden.

-
-
-
-

G_MODULE_IMPORT

-
#define G_MODULE_IMPORT		extern
-
-

Used to declare functions imported from modules.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Error-Reporting.html b/docs/reference/glib/html/glib-Error-Reporting.html deleted file mode 100644 index 2c5692635..000000000 --- a/docs/reference/glib/html/glib-Error-Reporting.html +++ /dev/null @@ -1,1250 +0,0 @@ - - - - -Error Reporting: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Error Reporting

-

Error Reporting — a system for reporting errors

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GError * - -g_error_new () -
-GError * - -g_error_new_literal () -
-GError * - -g_error_new_valist () -
-void - -g_error_free () -
-GError * - -g_error_copy () -
-gboolean - -g_error_matches () -
-void - -g_set_error () -
-void - -g_set_error_literal () -
-void - -g_propagate_error () -
-void - -g_clear_error () -
-void - -g_prefix_error () -
-void - -g_propagate_prefixed_error () -
-
-
-

Types and Values

-
---- - - - - -
structGError
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GLib provides a standard method of reporting errors from a called -function to the calling code. (This is the same problem solved by -exceptions in other languages.) It's important to understand that -this method is both a data type (the GError struct) and a set of -rules. If you use GError incorrectly, then your code will not -properly interoperate with other code that uses GError, and users -of your API will probably get confused. In most cases, using GError is -preferred over numeric error codes, but there are -situations where numeric error codes are useful for performance.

-

First and foremost: GError should only be used to report recoverable -runtime errors, never to report programming errors. If the programmer -has screwed up, then you should use g_warning(), g_return_if_fail(), -g_assert(), g_error(), or some similar facility. (Incidentally, -remember that the g_error() function should only be used for -programming errors, it should not be used to print any error -reportable via GError.)

-

Examples of recoverable runtime errors are "file not found" or -"failed to parse input." Examples of programming errors are "NULL -passed to strcmp()" or "attempted to free the same pointer twice." -These two kinds of errors are fundamentally different: runtime errors -should be handled or reported to the user, programming errors should -be eliminated by fixing the bug in the program. This is why most -functions in GLib and GTK+ do not use the GError facility.

-

Functions that can fail take a return location for a GError as their -last argument. On error, a new GError instance will be allocated and -returned to the caller via this argument. For example:

-
- - - - - - - -
1
-2
-3
-4
gboolean g_file_get_contents (const gchar  *filename,
-                              gchar       **contents,
-                              gsize        *length,
-                              GError      **error);
-
- -

-If you pass a non-NULL value for the error argument, it should -point to a location where an error can be placed. For example:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
gchar *contents;
-GError *err = NULL;
-
-g_file_get_contents ("foo.txt", &contents, NULL, &err);
-g_assert ((contents == NULL && err != NULL) || (contents != NULL && err == NULL));
-if (err != NULL)
-  {
-    // Report error to user, and free error
-    g_assert (contents == NULL);
-    fprintf (stderr, "Unable to read file: %s\n", err->message);
-    g_error_free (err);
-  }
-else
-  {
-    // Use file contents
-    g_assert (contents != NULL);
-  }
-
- -

-Note that err != NULL in this example is a reliable indicator -of whether g_file_get_contents() failed. Additionally, -g_file_get_contents() returns a boolean which -indicates whether it was successful.

-

Because g_file_get_contents() returns FALSE on failure, if you -are only interested in whether it failed and don't need to display -an error message, you can pass NULL for the error - argument:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
if (g_file_get_contents ("foo.txt", &contents, NULL, NULL)) // ignore errors
-  // no error occurred 
-  ;
-else
-  // error
-  ;
-
- -

-

The GError object contains three fields: domain - indicates the module -the error-reporting function is located in, code - indicates the specific -error that occurred, and message - is a user-readable error message with -as many details as possible. Several functions are provided to deal -with an error received from a called function: g_error_matches() -returns TRUE if the error matches a given domain and code, -g_propagate_error() copies an error into an error location (so the -calling function will receive it), and g_clear_error() clears an -error location by freeing the error and resetting the location to -NULL. To display an error to the user, simply display the message -, -perhaps along with additional context known only to the calling -function (the file being opened, or whatever - though in the -g_file_get_contents() case, the message - already contains a filename).

-

When implementing a function that can report errors, the basic -tool is g_set_error(). Typically, if a fatal error occurs you -want to g_set_error(), then return immediately. g_set_error() -does nothing if the error location passed to it is NULL. -Here's an example:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
gint
-foo_open_file (GError **error)
-{
-  gint fd;
-
-  fd = open ("file.txt", O_RDONLY);
-
-  if (fd < 0)
-    {
-      g_set_error (error,
-                   FOO_ERROR,                 // error domain
-                   FOO_ERROR_BLAH,            // error code
-                   "Failed to open file: %s", // error message format string
-                   g_strerror (errno));
-      return -1;
-    }
-  else
-    return fd;
-}
-
- -

-

Things are somewhat more complicated if you yourself call another -function that can report a GError. If the sub-function indicates -fatal errors in some way other than reporting a GError, such as -by returning TRUE on success, you can simply do the following:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
gboolean
-my_function_that_can_fail (GError **err)
-{
-  g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
-
-  if (!sub_function_that_can_fail (err))
-    {
-      // assert that error was set by the sub-function
-      g_assert (err == NULL || *err != NULL);
-      return FALSE;
-    }
-
-  // otherwise continue, no error occurred
-  g_assert (err == NULL || *err == NULL);
-}
-
- -

-

If the sub-function does not indicate errors other than by -reporting a GError (or if its return value does not reliably indicate -errors) you need to create a temporary GError -since the passed-in one may be NULL. g_propagate_error() is -intended for use in this case.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
gboolean
-my_function_that_can_fail (GError **err)
-{
-  GError *tmp_error;
-
-  g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
-
-  tmp_error = NULL;
-  sub_function_that_can_fail (&tmp_error);
-
-  if (tmp_error != NULL)
-    {
-      // store tmp_error in err, if err != NULL,
-      // otherwise call g_error_free() on tmp_error
-      g_propagate_error (err, tmp_error);
-      return FALSE;
-    }
-
-  // otherwise continue, no error occurred
-}
-
- -

-

Error pileups are always a bug. For example, this code is incorrect:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
gboolean
-my_function_that_can_fail (GError **err)
-{
-  GError *tmp_error;
-
-  g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
-
-  tmp_error = NULL;
-  sub_function_that_can_fail (&tmp_error);
-  other_function_that_can_fail (&tmp_error);
-
-  if (tmp_error != NULL)
-    {
-      g_propagate_error (err, tmp_error);
-      return FALSE;
-    }
-}
-
- -

-tmp_error - should be checked immediately after sub_function_that_can_fail(), -and either cleared or propagated upward. The rule is: after each error, -you must either handle the error, or return it to the calling function.

-

Note that passing NULL for the error location is the equivalent -of handling an error by always doing nothing about it. So the -following code is fine, assuming errors in sub_function_that_can_fail() -are not fatal to my_function_that_can_fail():

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
gboolean
-my_function_that_can_fail (GError **err)
-{
-  GError *tmp_error;
-
-  g_return_val_if_fail (err == NULL || *err == NULL, FALSE);
-
-  sub_function_that_can_fail (NULL); // ignore errors
-
-  tmp_error = NULL;
-  other_function_that_can_fail (&tmp_error);
-
-  if (tmp_error != NULL)
-    {
-      g_propagate_error (err, tmp_error);
-      return FALSE;
-    }
-}
-
- -

-

Note that passing NULL for the error location ignores errors; -it's equivalent to -try { sub_function_that_can_fail(); } catch (...) {} -in C++. It does not mean to leave errors unhandled; it means -to handle them by doing nothing.

-

Error domains and codes are conventionally named as follows:

-
    -
  • -

    The error domain is called <NAMESPACE>_<MODULE>_ERROR, -for example G_SPAWN_ERROR or G_THREAD_ERROR:

    -
    - - - - - - - -
    1
    -2
    -3
    -4
    -5
    -6
    -7
    #define G_SPAWN_ERROR g_spawn_error_quark ()
    -
    -GQuark
    -g_spawn_error_quark (void)
    -{
    -  return g_quark_from_static_string ("g-spawn-error-quark");
    -}
    -
    - -

    -
  • -
  • The quark function for the error domain is called -<namespace>_<module>_error_quark, -for example g_spawn_error_quark() or g_thread_error_quark().

  • -
  • The error codes are in an enumeration called -<Namespace><Module>Error; -for example, GThreadError or GSpawnError.

  • -
  • Members of the error code enumeration are called -<NAMESPACE>_<MODULE>_ERROR_<CODE>, -for example G_SPAWN_ERROR_FORK or G_THREAD_ERROR_AGAIN.

  • -
  • If there's a "generic" or "unknown" error code for unrecoverable -errors it doesn't make sense to distinguish with specific codes, -it should be called <NAMESPACE>_<MODULE>_ERROR_FAILED, -for example G_SPAWN_ERROR_FAILED. In the case of error code -enumerations that may be extended in future releases, you should -generally not handle this error code explicitly, but should -instead treat any unrecognized error code as equivalent to -FAILED.

  • -
-
-

Comparison of GError and traditional error handling

-

GError has several advantages over traditional numeric error codes: -importantly, tools like -gobject-introspection understand -GErrors and convert them to exceptions in bindings; the message includes -more information than just a code; and use of a domain helps prevent -misinterpretation of error codes.

-

GError has disadvantages though: it requires a memory allocation, and -formatting the error message string has a performance overhead. This makes it -unsuitable for use in retry loops where errors are a common case, rather than -being unusual. For example, using G_IO_ERROR_WOULD_BLOCK means hitting these -overheads in the normal control flow. String formatting overhead can be -eliminated by using g_set_error_literal() in some cases.

-

These performance issues can be compounded if a function wraps the GErrors -returned by the functions it calls: this multiplies the number of allocations -and string formatting operations. This can be partially mitigated by using -g_prefix_error().

-
-
-

Rules for use of GError -

-

Summary of rules for use of GError:

-
    -
  • Do not report programming errors via GError.

  • -
  • The last argument of a function that returns an error should -be a location where a GError can be placed (i.e. "GError** error"). -If GError is used with varargs, the GError** should be the last -argument before the "...".

  • -
  • The caller may pass NULL for the GError** if they are not interested -in details of the exact error that occurred.

  • -
  • If NULL is passed for the GError** argument, then errors should -not be returned to the caller, but your function should still -abort and return if an error occurs. That is, control flow should -not be affected by whether the caller wants to get a GError.

  • -
  • If a GError is reported, then your function by definition had a -fatal failure and did not complete whatever it was supposed to do. -If the failure was not fatal, then you handled it and you should not -report it. If it was fatal, then you must report it and discontinue -whatever you were doing immediately.

  • -
  • If a GError is reported, out parameters are not guaranteed to -be set to any defined value.

  • -
  • A GError* must be initialized to NULL before passing its address -to a function that can report errors.

  • -
  • "Piling up" errors is always a bug. That is, if you assign a -new GError to a GError* that is non-NULL, thus overwriting -the previous error, it indicates that you should have aborted -the operation instead of continuing. If you were able to continue, -you should have cleared the previous error with g_clear_error(). -g_set_error() will complain if you pile up errors.

  • -
  • By convention, if you return a boolean value indicating success -then TRUE means success and FALSE means failure. Avoid creating -functions which have a boolean return value and a GError parameter, -but where the boolean does something other than signal whether the -GError is set. Among other problems, it requires C callers to allocate -a temporary error. Instead, provide a "gboolean *" out parameter. -There are functions in GLib itself such as g_key_file_has_key() that -are deprecated because of this. If FALSE is returned, the error must -be set to a non-NULL value. One exception to this is that in situations -that are already considered to be undefined behaviour (such as when a -g_return_val_if_fail() check fails), the error need not be set. -Instead of checking separately whether the error is set, callers -should ensure that they do not provoke undefined behaviour, then -assume that the error will be set on failure.

  • -
  • A NULL return value is also frequently used to mean that an error -occurred. You should make clear in your documentation whether NULL -is a valid return value in non-error cases; if NULL is a valid value, -then users must check whether an error was returned to see if the -function succeeded.

  • -
  • When implementing a function that can report errors, you may want -to add a check at the top of your function that the error return -location is either NULL or contains a NULL error (e.g. -g_return_if_fail (error == NULL || *error == NULL);).

  • -
-
-
-
-

Functions

-
-

g_error_new ()

-
GError *
-g_error_new (GQuark domain,
-             gint code,
-             const gchar *format,
-             ...);
-

Creates a new GError with the given domain - and code -, -and a message formatted with format -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

domain

error domain

 

code

error code

 

format

printf()-style format for error message

 

...

parameters for message format

 
-
-
-

Returns

-

a new GError

-
-
-
-
-

g_error_new_literal ()

-
GError *
-g_error_new_literal (GQuark domain,
-                     gint code,
-                     const gchar *message);
-

Creates a new GError; unlike g_error_new(), message - is -not a printf()-style format string. Use this function if -message - contains text you don't have control over, -that could include printf() escape sequences.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

domain

error domain

 

code

error code

 

message

error message

 
-
-
-

Returns

-

a new GError

-
-
-
-
-

g_error_new_valist ()

-
GError *
-g_error_new_valist (GQuark domain,
-                    gint code,
-                    const gchar *format,
-                    va_list args);
-

Creates a new GError with the given domain - and code -, -and a message formatted with format -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

domain

error domain

 

code

error code

 

format

printf()-style format for error message

 

args

va_list of parameters for the message format

 
-
-
-

Returns

-

a new GError

-
-

Since: 2.22

-
-
-
-

g_error_free ()

-
void
-g_error_free (GError *error);
-

Frees a GError and associated resources.

-
-

Parameters

-
----- - - - - - -

error

a GError

 
-
-
-
-
-

g_error_copy ()

-
GError *
-g_error_copy (const GError *error);
-

Makes a copy of error -.

-
-

Parameters

-
----- - - - - - -

error

a GError

 
-
-
-

Returns

-

a new GError

-
-
-
-
-

g_error_matches ()

-
gboolean
-g_error_matches (const GError *error,
-                 GQuark domain,
-                 gint code);
-

Returns TRUE if error - matches domain - and code -, FALSE -otherwise. In particular, when error - is NULL, FALSE will -be returned.

-

If domain - contains a FAILED (or otherwise generic) error code, -you should generally not check for it explicitly, but should -instead treat any not-explicitly-recognized error code as being -equivalent to the FAILED code. This way, if the domain is -extended in the future to provide a more specific error code for -a certain case, your code will still work.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

error

a GError.

[nullable]

domain

an error domain

 

code

an error code

 
-
-
-

Returns

-

whether error -has domain -and code -

-
-
-
-
-

g_set_error ()

-
void
-g_set_error (GError **err,
-             GQuark domain,
-             gint code,
-             const gchar *format,
-             ...);
-

Does nothing if err - is NULL; if err - is non-NULL, then *err - -must be NULL. A new GError is created and assigned to *err -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

err

a return location for a GError.

[out callee-allocates][optional]

domain

error domain

 

code

error code

 

format

printf()-style format

 

...

args for format -

 
-
-
-
-
-

g_set_error_literal ()

-
void
-g_set_error_literal (GError **err,
-                     GQuark domain,
-                     gint code,
-                     const gchar *message);
-

Does nothing if err - is NULL; if err - is non-NULL, then *err - -must be NULL. A new GError is created and assigned to *err -. -Unlike g_set_error(), message - is not a printf()-style format string. -Use this function if message - contains text you don't have control over, -that could include printf() escape sequences.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

err

a return location for a GError.

[out callee-allocates][optional]

domain

error domain

 

code

error code

 

message

error message

 
-
-

Since: 2.18

-
-
-
-

g_propagate_error ()

-
void
-g_propagate_error (GError **dest,
-                   GError *src);
-

If dest - is NULL, free src -; otherwise, moves src - into *dest -. -The error variable dest - points to must be NULL.

-

src - must be non-NULL.

-

Note that src - is no longer valid after this call. If you want -to keep using the same GError*, you need to set it to NULL -after calling this function on it.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dest

error return location.

[out callee-allocates][optional][nullable]

src

error to move into the return location.

[transfer full]
-
-
-
-
-

g_clear_error ()

-
void
-g_clear_error (GError **err);
-

If err - or *err - is NULL, does nothing. Otherwise, -calls g_error_free() on *err - and sets *err - to NULL.

-
-

Parameters

-
----- - - - - - -

err

a GError return location

 
-
-
-
-
-

g_prefix_error ()

-
void
-g_prefix_error (GError **err,
-                const gchar *format,
-                ...);
-

Formats a string according to format - and prefix it to an existing -error message. If err - is NULL (ie: no error variable) then do -nothing.

-

If *err - is NULL (ie: an error variable is present but there is no -error condition) then also do nothing. Whether or not it makes sense -to take advantage of this feature is up to you.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

err

a return location for a GError.

[inout][optional]

format

printf()-style format string

 

...

arguments to format -

 
-
-

Since: 2.16

-
-
-
-

g_propagate_prefixed_error ()

-
void
-g_propagate_prefixed_error (GError **dest,
-                            GError *src,
-                            const gchar *format,
-                            ...);
-

If dest - is NULL, free src -; otherwise, moves src - into *dest -. -*dest - must be NULL. After the move, add a prefix as with -g_prefix_error().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

dest

error return location

 

src

error to move into the return location

 

format

printf()-style format string

 

...

arguments to format -

 
-
-

Since: 2.16

-
-
-
-

Types and Values

-
-

struct GError

-
struct GError {
-  GQuark       domain;
-  gint         code;
-  gchar       *message;
-};
-
-

The GError structure contains information about -an error that has occurred.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

GQuark domain;

error domain, e.g. G_FILE_ERROR

 

gint code;

error code, e.g. G_FILE_ERROR_NOENT

 

gchar *message;

human-readable informative error message

 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-File-Utilities.html b/docs/reference/glib/html/glib-File-Utilities.html deleted file mode 100644 index 776dfca17..000000000 --- a/docs/reference/glib/html/glib-File-Utilities.html +++ /dev/null @@ -1,2515 +0,0 @@ - - - - -File Utilities: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

File Utilities

-

File Utilities — various file-related functions

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GFileError - -g_file_error_from_errno () -
-gboolean - -g_file_get_contents () -
-gboolean - -g_file_set_contents () -
-gboolean - -g_file_test () -
-gint - -g_mkstemp () -
-gint - -g_mkstemp_full () -
-gint - -g_file_open_tmp () -
-gchar * - -g_file_read_link () -
-gint - -g_mkdir_with_parents () -
-gchar * - -g_mkdtemp () -
-gchar * - -g_mkdtemp_full () -
-gchar * - -g_dir_make_tmp () -
-GDir * - -g_dir_open () -
const gchar * - -g_dir_read_name () -
-void - -g_dir_rewind () -
-void - -g_dir_close () -
-GMappedFile * - -g_mapped_file_new () -
-GMappedFile * - -g_mapped_file_new_from_fd () -
-GMappedFile * - -g_mapped_file_ref () -
-void - -g_mapped_file_unref () -
-void - -g_mapped_file_free () -
-gsize - -g_mapped_file_get_length () -
-gchar * - -g_mapped_file_get_contents () -
-GBytes * - -g_mapped_file_get_bytes () -
-int - -g_open () -
-int - -g_rename () -
-int - -g_mkdir () -
-int - -g_stat () -
-int - -g_lstat () -
-int - -g_unlink () -
-int - -g_remove () -
-int - -g_rmdir () -
-FILE * - -g_fopen () -
-FILE * - -g_freopen () -
-int - -g_chmod () -
-int - -g_access () -
-int - -g_creat () -
-int - -g_chdir () -
-int - -g_utime () -
-gboolean - -g_close () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
enumGFileError
#defineG_FILE_ERROR
enumGFileTest
 GDir
 GMappedFile
typedefGStatBuf
-
-
-

Includes

-
#include <glib.h>
-#include <glib/gstdio.h>
-
-
-
-

Description

-

There is a group of functions which wrap the common POSIX functions -dealing with filenames (g_open(), g_rename(), g_mkdir(), g_stat(), -g_unlink(), g_remove(), g_fopen(), g_freopen()). The point of these -wrappers is to make it possible to handle file names with any Unicode -characters in them on Windows without having to use ifdefs and the -wide character API in the application code.

-

The pathname argument should be in the GLib file name encoding. -On POSIX this is the actual on-disk encoding which might correspond -to the locale settings of the process (or the G_FILENAME_ENCODING -environment variable), or not.

-

On Windows the GLib file name encoding is UTF-8. Note that the -Microsoft C library does not use UTF-8, but has separate APIs for -current system code page and wide characters (UTF-16). The GLib -wrappers call the wide character API if present (on modern Windows -systems), otherwise convert to/from the system code page.

-

Another group of functions allows to open and read directories -in the GLib file name encoding. These are g_dir_open(), -g_dir_read_name(), g_dir_rewind(), g_dir_close().

-
-
-

Functions

-
-

g_file_error_from_errno ()

-
GFileError
-g_file_error_from_errno (gint err_no);
-

Gets a GFileError constant based on the passed-in err_no -. -For example, if you pass in EEXIST this function returns -G_FILE_ERROR_EXIST. Unlike errno values, you can portably -assume that all GFileError values will exist.

-

Normally a GFileError value goes into a GError returned -from a function that manipulates files. So you would use -g_file_error_from_errno() when constructing a GError.

-
-

Parameters

-
----- - - - - - -

err_no

an "errno" value

 
-
-
-

Returns

-

GFileError corresponding to the given errno -

-
-
-
-
-

g_file_get_contents ()

-
gboolean
-g_file_get_contents (const gchar *filename,
-                     gchar **contents,
-                     gsize *length,
-                     GError **error);
-

Reads an entire file into allocated memory, with good error -checking.

-

If the call was successful, it returns TRUE and sets contents - to the file -contents and length - to the length of the file contents in bytes. The string -stored in contents - will be nul-terminated, so for text files you can pass -NULL for the length - argument. If the call was not successful, it returns -FALSE and sets error -. The error domain is G_FILE_ERROR. Possible error -codes are those in the GFileError enumeration. In the error case, -contents - is set to NULL and length - is set to zero.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

filename

name of a file to read contents from, in the GLib file name encoding.

[type filename]

contents

location to store an allocated string, use g_free() to free -the returned string.

[out][array length=length][element-type guint8]

length

location to store length in bytes of the contents, or NULL.

[nullable]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE on success, FALSE if an error occurred

-
-
-
-
-

g_file_set_contents ()

-
gboolean
-g_file_set_contents (const gchar *filename,
-                     const gchar *contents,
-                     gssize length,
-                     GError **error);
-

Writes all of contents - to a file named filename -, with good error checking. -If a file called filename - already exists it will be overwritten.

-

This write is atomic in the sense that it is first written to a temporary -file which is then renamed to the final name. Notes:

-
    -
  • On UNIX, if filename - already exists hard links to filename - will break. -Also since the file is recreated, existing permissions, access control -lists, metadata etc. may be lost. If filename - is a symbolic link, -the link itself will be replaced, not the linked file.

  • -
  • On Windows renaming a file will not remove an existing file with the -new name, so on Windows there is a race condition between the existing -file being removed and the temporary file being renamed.

  • -
  • On Windows there is no way to remove a file that is open to some -process, or mapped into memory. Thus, this function will fail if -filename - already exists and is open.

  • -
-

If the call was successful, it returns TRUE. If the call was not successful, -it returns FALSE and sets error -. The error domain is G_FILE_ERROR. -Possible error codes are those in the GFileError enumeration.

-

Note that the name for the temporary file is constructed by appending up -to 7 characters to filename -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

filename

name of a file to write contents -to, in the GLib file name -encoding.

[type filename]

contents

string to write to the file.

[array length=length][element-type guint8]

length

length of contents -, or -1 if contents -is a nul-terminated string

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE on success, FALSE if an error occurred

-
-

Since: 2.8

-
-
-
-

g_file_test ()

-
gboolean
-g_file_test (const gchar *filename,
-             GFileTest test);
-

Returns TRUE if any of the tests in the bitfield test - are -TRUE. For example, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR) -will return TRUE if the file exists; the check whether it's a -directory doesn't matter since the existence test is TRUE. With -the current set of available tests, there's no point passing in -more than one test at a time.

-

Apart from G_FILE_TEST_IS_SYMLINK all tests follow symbolic links, -so for a symbolic link to a regular file g_file_test() will return -TRUE for both G_FILE_TEST_IS_SYMLINK and G_FILE_TEST_IS_REGULAR.

-

Note, that for a dangling symbolic link g_file_test() will return -TRUE for G_FILE_TEST_IS_SYMLINK and FALSE for all other flags.

-

You should never use g_file_test() to test whether it is safe -to perform an operation, because there is always the possibility -of the condition changing before you actually perform the operation. -For example, you might think you could use G_FILE_TEST_IS_SYMLINK -to know whether it is safe to write to a file without being -tricked into writing into a different location. It doesn't work!

-
- - - - - - - -
1
-2
-3
-4
-5
-6
// DON'T DO THIS
-if (!g_file_test (filename, G_FILE_TEST_IS_SYMLINK)) 
-  {
-    fd = g_open (filename, O_WRONLY);
-    // write to fd
-  }
-
- -

-

Another thing to note is that G_FILE_TEST_EXISTS and -G_FILE_TEST_IS_EXECUTABLE are implemented using the access() -system call. This usually doesn't matter, but if your program -is setuid or setgid it means that these tests will give you -the answer for the real user ID and group ID, rather than the -effective user ID and group ID.

-

On Windows, there are no symlinks, so testing for -G_FILE_TEST_IS_SYMLINK will always return FALSE. Testing for -G_FILE_TEST_IS_EXECUTABLE will just check that the file exists and -its name indicates that it is executable, checking for well-known -extensions and those listed in the PATHEXT environment variable.

-
-

Parameters

-
----- - - - - - - - - - - - - -

filename

a filename to test in the -GLib file name encoding.

[type filename]

test

bitfield of GFileTest flags

 
-
-
-

Returns

-

whether a test was TRUE

-
-
-
-
-

g_mkstemp ()

-
gint
-g_mkstemp (gchar *tmpl);
-

Opens a temporary file. See the mkstemp() documentation -on most UNIX-like systems.

-

The parameter is a string that should follow the rules for -mkstemp() templates, i.e. contain the string "XXXXXX". -g_mkstemp() is slightly more flexible than mkstemp() in that the -sequence does not have to occur at the very end of the template. -The X string will be modified to form the name of a file that -didn't exist. The string should be in the GLib file name encoding. -Most importantly, on Windows it should be in UTF-8.

-

[skip]

-
-

Parameters

-
----- - - - - - -

tmpl

template filename.

[type filename]
-
-
-

Returns

-

A file handle (as from open()) to the file -opened for reading and writing. The file is opened in binary -mode on platforms where there is a difference. The file handle -should be closed with close(). In case of errors, -1 is -returned and errno will be set.

-
-
-
-
-

g_mkstemp_full ()

-
gint
-g_mkstemp_full (gchar *tmpl,
-                gint flags,
-                gint mode);
-

Opens a temporary file. See the mkstemp() documentation -on most UNIX-like systems.

-

The parameter is a string that should follow the rules for -mkstemp() templates, i.e. contain the string "XXXXXX". -g_mkstemp_full() is slightly more flexible than mkstemp() -in that the sequence does not have to occur at the very end of the -template and you can pass a mode - and additional flags -. The X -string will be modified to form the name of a file that didn't exist. -The string should be in the GLib file name encoding. Most importantly, -on Windows it should be in UTF-8.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

tmpl

template filename.

[type filename]

flags

flags to pass to an open() call in addition to O_EXCL -and O_CREAT, which are passed automatically

 

mode

permissions to create the temporary file with

 
-
-
-

Returns

-

A file handle (as from open()) to the file -opened for reading and writing. The file handle should be -closed with close(). In case of errors, -1 is returned -and errno will be set.

-
-

Since: 2.22

-
-
-
-

g_file_open_tmp ()

-
gint
-g_file_open_tmp (const gchar *tmpl,
-                 gchar **name_used,
-                 GError **error);
-

Opens a file for writing in the preferred directory for temporary -files (as returned by g_get_tmp_dir()).

-

tmpl - should be a string in the GLib file name encoding containing -a sequence of six 'X' characters, as the parameter to g_mkstemp(). -However, unlike these functions, the template should only be a -basename, no directory components are allowed. If template is -NULL, a default template is used.

-

Note that in contrast to g_mkstemp() (and mkstemp()) tmpl - is not -modified, and might thus be a read-only literal string.

-

Upon success, and if name_used - is non-NULL, the actual name used -is returned in name_used -. This string should be freed with g_free() -when not needed any longer. The returned name is in the GLib file -name encoding.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

tmpl

Template for file name, as in -g_mkstemp(), basename only, or NULL for a default template.

[type filename][nullable]

name_used

location to store actual name used, -or NULL.

[out][type filename]

error

return location for a GError

 
-
-
-

Returns

-

A file handle (as from open()) to the file opened for -reading and writing. The file is opened in binary mode on platforms -where there is a difference. The file handle should be closed with -close(). In case of errors, -1 is returned and error -will be set.

-
-
-
-
-

g_file_read_link ()

-
gchar *
-g_file_read_link (const gchar *filename,
-                  GError **error);
-

Reads the contents of the symbolic link filename - like the POSIX -readlink() function. The returned string is in the encoding used -for filenames. Use g_filename_to_utf8() to convert it to UTF-8.

-
-

Parameters

-
----- - - - - - - - - - - - - -

filename

the symbolic link.

[type filename]

error

return location for a GError

 
-
-
-

Returns

-

A newly-allocated string with the contents of -the symbolic link, or NULL if an error occurred.

-

[type filename]

-
-

Since: 2.4

-
-
-
-

g_mkdir_with_parents ()

-
gint
-g_mkdir_with_parents (const gchar *pathname,
-                      gint mode);
-

Create a directory if it doesn't already exist. Create intermediate -parent directories as needed, too.

-
-

Parameters

-
----- - - - - - - - - - - - - -

pathname

a pathname in the GLib file name encoding.

[type filename]

mode

permissions to use for newly created directories

 
-
-
-

Returns

-

0 if the directory already exists, or was successfully -created. Returns -1 if an error occurred, with errno set.

-
-

Since: 2.8

-
-
-
-

g_mkdtemp ()

-
gchar *
-g_mkdtemp (gchar *tmpl);
-

Creates a temporary directory. See the mkdtemp() documentation -on most UNIX-like systems.

-

The parameter is a string that should follow the rules for -mkdtemp() templates, i.e. contain the string "XXXXXX". -g_mkdtemp() is slightly more flexible than mkdtemp() in that the -sequence does not have to occur at the very end of the template. -The X string will be modified to form the name of a directory that -didn't exist. -The string should be in the GLib file name encoding. Most importantly, -on Windows it should be in UTF-8.

-

If you are going to be creating a temporary directory inside the -directory returned by g_get_tmp_dir(), you might want to use -g_dir_make_tmp() instead.

-

[skip]

-
-

Parameters

-
----- - - - - - -

tmpl

template directory name.

[type filename]
-
-
-

Returns

-

A pointer to tmpl -, which has been -modified to hold the directory name. In case of errors, NULL is -returned and errno will be set.

-

[nullable][type filename]

-
-

Since: 2.30

-
-
-
-

g_mkdtemp_full ()

-
gchar *
-g_mkdtemp_full (gchar *tmpl,
-                gint mode);
-

Creates a temporary directory. See the mkdtemp() documentation -on most UNIX-like systems.

-

The parameter is a string that should follow the rules for -mkdtemp() templates, i.e. contain the string "XXXXXX". -g_mkdtemp_full() is slightly more flexible than mkdtemp() in that the -sequence does not have to occur at the very end of the template -and you can pass a mode -. The X string will be modified to form -the name of a directory that didn't exist. The string should be -in the GLib file name encoding. Most importantly, on Windows it -should be in UTF-8.

-

If you are going to be creating a temporary directory inside the -directory returned by g_get_tmp_dir(), you might want to use -g_dir_make_tmp() instead.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

tmpl

template directory name.

[type filename]

mode

permissions to create the temporary directory with

 
-
-
-

Returns

-

A pointer to tmpl -, which has been -modified to hold the directory name. In case of errors, NULL is -returned, and errno will be set.

-

[nullable][type filename]

-
-

Since: 2.30

-
-
-
-

g_dir_make_tmp ()

-
gchar *
-g_dir_make_tmp (const gchar *tmpl,
-                GError **error);
-

Creates a subdirectory in the preferred directory for temporary -files (as returned by g_get_tmp_dir()).

-

tmpl - should be a string in the GLib file name encoding containing -a sequence of six 'X' characters, as the parameter to g_mkstemp(). -However, unlike these functions, the template should only be a -basename, no directory components are allowed. If template is -NULL, a default template is used.

-

Note that in contrast to g_mkdtemp() (and mkdtemp()) tmpl - is not -modified, and might thus be a read-only literal string.

-
-

Parameters

-
----- - - - - - - - - - - - - -

tmpl

Template for directory name, -as in g_mkdtemp(), basename only, or NULL for a default template.

[type filename][nullable]

error

return location for a GError

 
-
-
-

Returns

-

The actual name used. This string -should be freed with g_free() when not needed any longer and is -is in the GLib file name encoding. In case of errors, NULL is -returned and error -will be set.

-

[type filename]

-
-

Since: 2.30

-
-
-
-

g_dir_open ()

-
GDir *
-g_dir_open (const gchar *path,
-            guint flags,
-            GError **error);
-

Opens a directory for reading. The names of the files in the -directory can then be retrieved using g_dir_read_name(). Note -that the ordering is not defined.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

path

the path to the directory you are interested in. On Unix -in the on-disk encoding. On Windows in UTF-8

 

flags

Currently must be set to 0. Reserved for future use.

 

error

return location for a GError, or NULL. -If non-NULL, an error will be set if and only if -g_dir_open() fails.

 
-
-
-

Returns

-

a newly allocated GDir on success, NULL on failure. -If non-NULL, you must free the result with g_dir_close() -when you are finished with it.

-
-
-
-
-

g_dir_read_name ()

-
const gchar *
-g_dir_read_name (GDir *dir);
-

Retrieves the name of another entry in the directory, or NULL. -The order of entries returned from this function is not defined, -and may vary by file system or other operating-system dependent -factors.

-

NULL may also be returned in case of errors. On Unix, you can -check errno to find out if NULL was returned because of an error.

-

On Unix, the '.' and '..' entries are omitted, and the returned -name is in the on-disk encoding.

-

On Windows, as is true of all GLib functions which operate on -filenames, the returned name is in UTF-8.

-
-

Parameters

-
----- - - - - - -

dir

a GDir* created by g_dir_open()

 
-
-
-

Returns

-

The entry's name or NULL if there are no -more entries. The return value is owned by GLib and -must not be modified or freed.

-

[type filename]

-
-
-
-
-

g_dir_rewind ()

-
void
-g_dir_rewind (GDir *dir);
-

Resets the given directory. The next call to g_dir_read_name() -will return the first entry again.

-
-

Parameters

-
----- - - - - - -

dir

a GDir* created by g_dir_open()

 
-
-
-
-
-

g_dir_close ()

-
void
-g_dir_close (GDir *dir);
-

Closes the directory and deallocates all related resources.

-
-

Parameters

-
----- - - - - - -

dir

a GDir* created by g_dir_open()

 
-
-
-
-
-

g_mapped_file_new ()

-
GMappedFile *
-g_mapped_file_new (const gchar *filename,
-                   gboolean writable,
-                   GError **error);
-

Maps a file into memory. On UNIX, this is using the mmap() function.

-

If writable - is TRUE, the mapped buffer may be modified, otherwise -it is an error to modify the mapped buffer. Modifications to the buffer -are not visible to other processes mapping the same file, and are not -written back to the file.

-

Note that modifications of the underlying file might affect the contents -of the GMappedFile. Therefore, mapping should only be used if the file -will not be modified, or if all modifications of the file are done -atomically (e.g. using g_file_set_contents()).

-

If filename - is the name of an empty, regular file, the function -will successfully return an empty GMappedFile. In other cases of -size 0 (e.g. device files such as /dev/null), error - will be set -to the GFileError value G_FILE_ERROR_INVAL.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

filename

The path of the file to load, in the GLib -filename encoding.

[type filename]

writable

whether the mapping should be writable

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a newly allocated GMappedFile which must be unref'd -with g_mapped_file_unref(), or NULL if the mapping failed.

-
-

Since: 2.8

-
-
-
-

g_mapped_file_new_from_fd ()

-
GMappedFile *
-g_mapped_file_new_from_fd (gint fd,
-                           gboolean writable,
-                           GError **error);
-

Maps a file into memory. On UNIX, this is using the mmap() function.

-

If writable - is TRUE, the mapped buffer may be modified, otherwise -it is an error to modify the mapped buffer. Modifications to the buffer -are not visible to other processes mapping the same file, and are not -written back to the file.

-

Note that modifications of the underlying file might affect the contents -of the GMappedFile. Therefore, mapping should only be used if the file -will not be modified, or if all modifications of the file are done -atomically (e.g. using g_file_set_contents()).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

fd

The file descriptor of the file to load

 

writable

whether the mapping should be writable

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a newly allocated GMappedFile which must be unref'd -with g_mapped_file_unref(), or NULL if the mapping failed.

-
-

Since: 2.32

-
-
-
-

g_mapped_file_ref ()

-
GMappedFile *
-g_mapped_file_ref (GMappedFile *file);
-

Increments the reference count of file - by one. It is safe to call -this function from any thread.

-
-

Parameters

-
----- - - - - - -

file

a GMappedFile

 
-
-
-

Returns

-

the passed in GMappedFile.

-
-

Since: 2.22

-
-
-
-

g_mapped_file_unref ()

-
void
-g_mapped_file_unref (GMappedFile *file);
-

Decrements the reference count of file - by one. If the reference count -drops to 0, unmaps the buffer of file - and frees it.

-

It is safe to call this function from any thread.

-

Since 2.22

-
-

Parameters

-
----- - - - - - -

file

a GMappedFile

 
-
-
-
-
-

g_mapped_file_free ()

-
void
-g_mapped_file_free (GMappedFile *file);
-
-

g_mapped_file_free has been deprecated since version 2.22 and should not be used in newly-written code.

-

Use g_mapped_file_unref() instead.

-
-

This call existed before GMappedFile had refcounting and is currently -exactly the same as g_mapped_file_unref().

-
-

Parameters

-
----- - - - - - -

file

a GMappedFile

 
-
-

Since: 2.8

-
-
-
-

g_mapped_file_get_length ()

-
gsize
-g_mapped_file_get_length (GMappedFile *file);
-

Returns the length of the contents of a GMappedFile.

-
-

Parameters

-
----- - - - - - -

file

a GMappedFile

 
-
-
-

Returns

-

the length of the contents of file -.

-
-

Since: 2.8

-
-
-
-

g_mapped_file_get_contents ()

-
gchar *
-g_mapped_file_get_contents (GMappedFile *file);
-

Returns the contents of a GMappedFile.

-

Note that the contents may not be zero-terminated, -even if the GMappedFile is backed by a text file.

-

If the file is empty then NULL is returned.

-
-

Parameters

-
----- - - - - - -

file

a GMappedFile

 
-
-
-

Returns

-

the contents of file -, or NULL.

-
-

Since: 2.8

-
-
-
-

g_mapped_file_get_bytes ()

-
GBytes *
-g_mapped_file_get_bytes (GMappedFile *file);
-

Creates a new GBytes which references the data mapped from file -. -The mapped contents of the file must not be modified after creating this -bytes object, because a GBytes should be immutable.

-
-

Parameters

-
----- - - - - - -

file

a GMappedFile

 
-
-
-

Returns

-

A newly allocated GBytes referencing data -from file -.

-

[transfer full]

-
-

Since: 2.34

-
-
-
-

g_open ()

-
int
-g_open (const gchar *filename,
-        int flags,
-        int mode);
-

A wrapper for the POSIX open() function. The open() function is -used to convert a pathname into a file descriptor.

-

On POSIX systems file descriptors are implemented by the operating -system. On Windows, it's the C library that implements open() and -file descriptors. The actual Win32 API for opening files is quite -different, see MSDN documentation for CreateFile(). The Win32 API -uses file handles, which are more randomish integers, not small -integers like file descriptors.

-

Because file descriptors are specific to the C library on Windows, -the file descriptor returned by this function makes sense only to -functions in the same C library. Thus if the GLib-using code uses a -different C library than GLib does, the file descriptor returned by -this function cannot be passed to C library functions like write() -or read().

-

See your C library manual for more details about open().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

filename

a pathname in the GLib file name encoding -(UTF-8 on Windows).

[type filename]

flags

as in open()

 

mode

as in open()

 
-
-
-

Returns

-

a new file descriptor, or -1 if an error occurred. -The return value can be used exactly like the return value -from open().

-
-

Since: 2.6

-
-
-
-

g_rename ()

-
int
-g_rename (const gchar *oldfilename,
-          const gchar *newfilename);
-

A wrapper for the POSIX rename() function. The rename() function -renames a file, moving it between directories if required.

-

See your C library manual for more details about how rename() works -on your system. It is not possible in general on Windows to rename -a file that is open to some process.

-
-

Parameters

-
----- - - - - - - - - - - - - -

oldfilename

a pathname in the GLib file name encoding -(UTF-8 on Windows).

[type filename]

newfilename

a pathname in the GLib file name encoding.

[type filename]
-
-
-

Returns

-

0 if the renaming succeeded, -1 if an error occurred

-
-

Since: 2.6

-
-
-
-

g_mkdir ()

-
int
-g_mkdir (const gchar *filename,
-         int mode);
-

A wrapper for the POSIX mkdir() function. The mkdir() function -attempts to create a directory with the given name and permissions. -The mode argument is ignored on Windows.

-

See your C library manual for more details about mkdir().

-
-

Parameters

-
----- - - - - - - - - - - - - -

filename

a pathname in the GLib file name encoding -(UTF-8 on Windows).

[type filename]

mode

permissions to use for the newly created directory

 
-
-
-

Returns

-

0 if the directory was successfully created, -1 if an error -occurred

-
-

Since: 2.6

-
-
-
-

g_stat ()

-
int
-g_stat (const gchar *filename,
-        GStatBuf *buf);
-

A wrapper for the POSIX stat() function. The stat() function -returns information about a file. On Windows the stat() function in -the C library checks only the FAT-style READONLY attribute and does -not look at the ACL at all. Thus on Windows the protection bits in -the st_mode - field are a fabrication of little use.

-

On Windows the Microsoft C libraries have several variants of the -stat struct and stat() function with names like _stat(), _stat32(), -_stat32i64() and _stat64i32(). The one used here is for 32-bit code -the one with 32-bit size and time fields, specifically called _stat32().

-

In Microsoft's compiler, by default struct stat means one with -64-bit time fields while in MinGW struct stat is the legacy one -with 32-bit fields. To hopefully clear up this messs, the gstdio.h -header defines a type GStatBuf which is the appropriate struct type -depending on the platform and/or compiler being used. On POSIX it -is just struct stat, but note that even on POSIX platforms, stat() -might be a macro.

-

See your C library manual for more details about stat().

-
-

Parameters

-
----- - - - - - - - - - - - - -

filename

a pathname in the GLib file name encoding -(UTF-8 on Windows).

[type filename]

buf

a pointer to a stat struct, which will be filled with the file -information

 
-
-
-

Returns

-

0 if the information was successfully retrieved, --1 if an error occurred

-
-

Since: 2.6

-
-
-
-

g_lstat ()

-
int
-g_lstat (const gchar *filename,
-         GStatBuf *buf);
-

A wrapper for the POSIX lstat() function. The lstat() function is -like stat() except that in the case of symbolic links, it returns -information about the symbolic link itself and not the file that it -refers to. If the system does not support symbolic links g_lstat() -is identical to g_stat().

-

See your C library manual for more details about lstat().

-
-

Parameters

-
----- - - - - - - - - - - - - -

filename

a pathname in the GLib file name encoding -(UTF-8 on Windows).

[type filename]

buf

a pointer to a stat struct, which will be filled with the file -information

 
-
-
-

Returns

-

0 if the information was successfully retrieved, --1 if an error occurred

-
-

Since: 2.6

-
-
-
-

g_unlink ()

-
int
-g_unlink (const gchar *filename);
-

A wrapper for the POSIX unlink() function. The unlink() function -deletes a name from the filesystem. If this was the last link to the -file and no processes have it opened, the diskspace occupied by the -file is freed.

-

See your C library manual for more details about unlink(). Note -that on Windows, it is in general not possible to delete files that -are open to some process, or mapped into memory.

-
-

Parameters

-
----- - - - - - -

filename

a pathname in the GLib file name encoding -(UTF-8 on Windows).

[type filename]
-
-
-

Returns

-

0 if the name was successfully deleted, -1 if an error -occurred

-
-

Since: 2.6

-
-
-
-

g_remove ()

-
int
-g_remove (const gchar *filename);
-

A wrapper for the POSIX remove() function. The remove() function -deletes a name from the filesystem.

-

See your C library manual for more details about how remove() works -on your system. On Unix, remove() removes also directories, as it -calls unlink() for files and rmdir() for directories. On Windows, -although remove() in the C library only works for files, this -function tries first remove() and then if that fails rmdir(), and -thus works for both files and directories. Note however, that on -Windows, it is in general not possible to remove a file that is -open to some process, or mapped into memory.

-

If this function fails on Windows you can't infer too much from the -errno value. rmdir() is tried regardless of what caused remove() to -fail. Any errno value set by remove() will be overwritten by that -set by rmdir().

-
-

Parameters

-
----- - - - - - -

filename

a pathname in the GLib file name encoding -(UTF-8 on Windows).

[type filename]
-
-
-

Returns

-

0 if the file was successfully removed, -1 if an error -occurred

-
-

Since: 2.6

-
-
-
-

g_rmdir ()

-
int
-g_rmdir (const gchar *filename);
-

A wrapper for the POSIX rmdir() function. The rmdir() function -deletes a directory from the filesystem.

-

See your C library manual for more details about how rmdir() works -on your system.

-
-

Parameters

-
----- - - - - - -

filename

a pathname in the GLib file name encoding -(UTF-8 on Windows).

[type filename]
-
-
-

Returns

-

0 if the directory was successfully removed, -1 if an error -occurred

-
-

Since: 2.6

-
-
-
-

g_fopen ()

-
FILE *
-g_fopen (const gchar *filename,
-         const gchar *mode);
-

A wrapper for the stdio fopen() function. The fopen() function -opens a file and associates a new stream with it.

-

Because file descriptors are specific to the C library on Windows, -and a file descriptor is part of the FILE struct, the FILE* returned -by this function makes sense only to functions in the same C library. -Thus if the GLib-using code uses a different C library than GLib does, -the FILE* returned by this function cannot be passed to C library -functions like fprintf() or fread().

-

See your C library manual for more details about fopen().

-
-

Parameters

-
----- - - - - - - - - - - - - -

filename

a pathname in the GLib file name encoding -(UTF-8 on Windows).

[type filename]

mode

a string describing the mode in which the file should be opened

 
-
-
-

Returns

-

A FILE* if the file was successfully opened, or NULL if -an error occurred

-
-

Since: 2.6

-
-
-
-

g_freopen ()

-
FILE *
-g_freopen (const gchar *filename,
-           const gchar *mode,
-           FILE *stream);
-

A wrapper for the POSIX freopen() function. The freopen() function -opens a file and associates it with an existing stream.

-

See your C library manual for more details about freopen().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

filename

a pathname in the GLib file name encoding -(UTF-8 on Windows).

[type filename]

mode

a string describing the mode in which the file should be opened

 

stream

an existing stream which will be reused, or NULL.

[nullable]
-
-
-

Returns

-

A FILE* if the file was successfully opened, or NULL if -an error occurred.

-
-

Since: 2.6

-
-
-
-

g_chmod ()

-
int
-g_chmod (const gchar *filename,
-         int mode);
-

A wrapper for the POSIX chmod() function. The chmod() function is -used to set the permissions of a file system object.

-

On Windows the file protection mechanism is not at all POSIX-like, -and the underlying chmod() function in the C library just sets or -clears the FAT-style READONLY attribute. It does not touch any -ACL. Software that needs to manage file permissions on Windows -exactly should use the Win32 API.

-

See your C library manual for more details about chmod().

-
-

Parameters

-
----- - - - - - - - - - - - - -

filename

a pathname in the GLib file name encoding -(UTF-8 on Windows).

[type filename]

mode

as in chmod()

 
-
-
-

Returns

-

0 if the operation succeeded, -1 on error

-
-

Since: 2.8

-
-
-
-

g_access ()

-
int
-g_access (const gchar *filename,
-          int mode);
-

A wrapper for the POSIX access() function. This function is used to -test a pathname for one or several of read, write or execute -permissions, or just existence.

-

On Windows, the file protection mechanism is not at all POSIX-like, -and the underlying function in the C library only checks the -FAT-style READONLY attribute, and does not look at the ACL of a -file at all. This function is this in practise almost useless on -Windows. Software that needs to handle file permissions on Windows -more exactly should use the Win32 API.

-

See your C library manual for more details about access().

-
-

Parameters

-
----- - - - - - - - - - - - - -

filename

a pathname in the GLib file name encoding -(UTF-8 on Windows).

[type filename]

mode

as in access()

 
-
-
-

Returns

-

zero if the pathname refers to an existing file system -object that has all the tested permissions, or -1 otherwise -or on error.

-
-

Since: 2.8

-
-
-
-

g_creat ()

-
int
-g_creat (const gchar *filename,
-         int mode);
-

A wrapper for the POSIX creat() function. The creat() function is -used to convert a pathname into a file descriptor, creating a file -if necessary.

-

On POSIX systems file descriptors are implemented by the operating -system. On Windows, it's the C library that implements creat() and -file descriptors. The actual Windows API for opening files is -different, see MSDN documentation for CreateFile(). The Win32 API -uses file handles, which are more randomish integers, not small -integers like file descriptors.

-

Because file descriptors are specific to the C library on Windows, -the file descriptor returned by this function makes sense only to -functions in the same C library. Thus if the GLib-using code uses a -different C library than GLib does, the file descriptor returned by -this function cannot be passed to C library functions like write() -or read().

-

See your C library manual for more details about creat().

-
-

Parameters

-
----- - - - - - - - - - - - - -

filename

a pathname in the GLib file name encoding -(UTF-8 on Windows).

[type filename]

mode

as in creat()

 
-
-
-

Returns

-

a new file descriptor, or -1 if an error occurred. -The return value can be used exactly like the return value -from creat().

-
-

Since: 2.8

-
-
-
-

g_chdir ()

-
int
-g_chdir (const gchar *path);
-

A wrapper for the POSIX chdir() function. The function changes the -current directory of the process to path -.

-

See your C library manual for more details about chdir().

-
-

Parameters

-
----- - - - - - -

path

a pathname in the GLib file name encoding -(UTF-8 on Windows).

[type filename]
-
-
-

Returns

-

0 on success, -1 if an error occurred.

-
-

Since: 2.8

-
-
-
-

g_utime ()

-
int
-g_utime (const gchar *filename,
-         struct utimbuf *utb);
-

A wrapper for the POSIX utime() function. The utime() function -sets the access and modification timestamps of a file.

-

See your C library manual for more details about how utime() works -on your system.

-
-

Parameters

-
----- - - - - - - - - - - - - -

filename

a pathname in the GLib file name encoding -(UTF-8 on Windows).

[type filename]

utb

a pointer to a struct utimbuf.

 
-
-
-

Returns

-

0 if the operation was successful, -1 if an error occurred

-
-

Since: 2.18

-
-
-
-

g_close ()

-
gboolean
-g_close (gint fd,
-         GError **error);
-

This wraps the close() call; in case of error, errno will be -preserved, but the error will also be stored as a GError in error -.

-

Besides using GError, there is another major reason to prefer this -function over the call provided by the system; on Unix, it will -attempt to correctly handle EINTR, which has platform-specific -semantics.

-
-

Parameters

-
----- - - - - - - - - - - - - -

fd

A file descriptor

 

error

a GError

 
-
-
-

Returns

-

TRUE on success, FALSE if there was an error.

-
-

Since: 2.36

-
-
-
-

Types and Values

-
-

enum GFileError

-

Values corresponding to errno - codes returned from file operations -on UNIX. Unlike errno - codes, GFileError values are available on -all systems, even Windows. The exact meaning of each code depends -on what sort of file operation you were performing; the UNIX -documentation gives more details. The following error code descriptions -come from the GNU C Library manual, and are under the copyright -of that manual.

-

It's not very portable to make detailed assumptions about exactly -which errors will be returned from a given operation. Some errors -don't occur on some systems, etc., sometimes there are subtle -differences in when a system will report a given error, etc.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_FILE_ERROR_EXIST

-

Operation not permitted; only the owner of - the file (or other resource) or processes with special privileges - can perform the operation.

-
 

G_FILE_ERROR_ISDIR

-

File is a directory; you cannot open a directory - for writing, or create or remove hard links to it.

-
 

G_FILE_ERROR_ACCES

-

Permission denied; the file permissions do not - allow the attempted operation.

-
 

G_FILE_ERROR_NAMETOOLONG

-

Filename too long.

-
 

G_FILE_ERROR_NOENT

-

No such file or directory. This is a "file - doesn't exist" error for ordinary files that are referenced in - contexts where they are expected to already exist.

-
 

G_FILE_ERROR_NOTDIR

-

A file that isn't a directory was specified when - a directory is required.

-
 

G_FILE_ERROR_NXIO

-

No such device or address. The system tried to - use the device represented by a file you specified, and it - couldn't find the device. This can mean that the device file was - installed incorrectly, or that the physical device is missing or - not correctly attached to the computer.

-
 

G_FILE_ERROR_NODEV

-

The underlying file system of the specified file - does not support memory mapping.

-
 

G_FILE_ERROR_ROFS

-

The directory containing the new link can't be - modified because it's on a read-only file system.

-
 

G_FILE_ERROR_TXTBSY

-

Text file busy.

-
 

G_FILE_ERROR_FAULT

-

You passed in a pointer to bad memory. - (GLib won't reliably return this, don't pass in pointers to bad - memory.)

-
 

G_FILE_ERROR_LOOP

-

Too many levels of symbolic links were encountered - in looking up a file name. This often indicates a cycle of symbolic - links.

-
 

G_FILE_ERROR_NOSPC

-

No space left on device; write operation on a - file failed because the disk is full.

-
 

G_FILE_ERROR_NOMEM

-

No memory available. The system cannot allocate - more virtual memory because its capacity is full.

-
 

G_FILE_ERROR_MFILE

-

The current process has too many files open and - can't open any more. Duplicate descriptors do count toward this - limit.

-
 

G_FILE_ERROR_NFILE

-

There are too many distinct file openings in the - entire system.

-
 

G_FILE_ERROR_BADF

-

Bad file descriptor; for example, I/O on a - descriptor that has been closed or reading from a descriptor open - only for writing (or vice versa).

-
 

G_FILE_ERROR_INVAL

-

Invalid argument. This is used to indicate - various kinds of problems with passing the wrong argument to a - library function.

-
 

G_FILE_ERROR_PIPE

-

Broken pipe; there is no process reading from the - other end of a pipe. Every library function that returns this - error code also generates a 'SIGPIPE' signal; this signal - terminates the program if not handled or blocked. Thus, your - program will never actually see this code unless it has handled - or blocked 'SIGPIPE'.

-
 

G_FILE_ERROR_AGAIN

-

Resource temporarily unavailable; the call might - work if you try again later.

-
 

G_FILE_ERROR_INTR

-

Interrupted function call; an asynchronous signal - occurred and prevented completion of the call. When this - happens, you should try the call again.

-
 

G_FILE_ERROR_IO

-

Input/output error; usually used for physical read - or write errors. i.e. the disk or other physical device hardware - is returning errors.

-
 

G_FILE_ERROR_PERM

-

Operation not permitted; only the owner of the - file (or other resource) or processes with special privileges can - perform the operation.

-
 

G_FILE_ERROR_NOSYS

-

Function not implemented; this indicates that - the system is missing some functionality.

-
 

G_FILE_ERROR_FAILED

-

Does not correspond to a UNIX error code; this - is the standard "failed for unspecified reason" error code present - in all GError error code enumerations. Returned if no specific - code applies.

-
 
-
-
-
-
-

G_FILE_ERROR

-
#define G_FILE_ERROR g_file_error_quark ()
-
-

Error domain for file operations. Errors in this domain will -be from the GFileError enumeration. See GError for information -on error domains.

-
-
-
-

enum GFileTest

-

A test to perform on a file using g_file_test().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_FILE_TEST_IS_REGULAR

-

TRUE if the file is a regular file - (not a directory). Note that this test will also return TRUE - if the tested file is a symlink to a regular file.

-
 

G_FILE_TEST_IS_SYMLINK

-

TRUE if the file is a symlink.

-
 

G_FILE_TEST_IS_DIR

-

TRUE if the file is a directory.

-
 

G_FILE_TEST_IS_EXECUTABLE

-

TRUE if the file is executable.

-
 

G_FILE_TEST_EXISTS

-

TRUE if the file exists. It may or may not - be a regular file.

-
 
-
-
-
-
-

GDir

-
typedef struct _GDir GDir;
-

An opaque structure representing an opened directory.

-
-
-
-

GMappedFile

-
typedef struct _GMappedFile GMappedFile;
-

The GMappedFile represents a file mapping created with -g_mapped_file_new(). It has only private members and should -not be accessed directly.

-
-
-
-

GStatBuf

-
typedef struct _stat32 GStatBuf;
-
-

A type corresponding to the appropriate struct type for the stat() -system call, depending on the platform and/or compiler being used.

-

See g_stat() for more information.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-GDateTime.html b/docs/reference/glib/html/glib-GDateTime.html deleted file mode 100644 index 4ab74604b..000000000 --- a/docs/reference/glib/html/glib-GDateTime.html +++ /dev/null @@ -1,2385 +0,0 @@ - - - - -GDateTime: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GDateTime

-

GDateTime — a structure representing Date and Time

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -g_date_time_unref () -
-GDateTime * - -g_date_time_ref () -
-GDateTime * - -g_date_time_new_now () -
-GDateTime * - -g_date_time_new_now_local () -
-GDateTime * - -g_date_time_new_now_utc () -
-GDateTime * - -g_date_time_new_from_unix_local () -
-GDateTime * - -g_date_time_new_from_unix_utc () -
-GDateTime * - -g_date_time_new_from_timeval_local () -
-GDateTime * - -g_date_time_new_from_timeval_utc () -
-GDateTime * - -g_date_time_new () -
-GDateTime * - -g_date_time_new_local () -
-GDateTime * - -g_date_time_new_utc () -
-GDateTime * - -g_date_time_add () -
-GDateTime * - -g_date_time_add_years () -
-GDateTime * - -g_date_time_add_months () -
-GDateTime * - -g_date_time_add_weeks () -
-GDateTime * - -g_date_time_add_days () -
-GDateTime * - -g_date_time_add_hours () -
-GDateTime * - -g_date_time_add_minutes () -
-GDateTime * - -g_date_time_add_seconds () -
-GDateTime * - -g_date_time_add_full () -
-gint - -g_date_time_compare () -
-GTimeSpan - -g_date_time_difference () -
-guint - -g_date_time_hash () -
-gboolean - -g_date_time_equal () -
-void - -g_date_time_get_ymd () -
-gint - -g_date_time_get_year () -
-gint - -g_date_time_get_month () -
-gint - -g_date_time_get_day_of_month () -
-gint - -g_date_time_get_week_numbering_year () -
-gint - -g_date_time_get_week_of_year () -
-gint - -g_date_time_get_day_of_week () -
-gint - -g_date_time_get_day_of_year () -
-gint - -g_date_time_get_hour () -
-gint - -g_date_time_get_minute () -
-gint - -g_date_time_get_second () -
-gint - -g_date_time_get_microsecond () -
-gdouble - -g_date_time_get_seconds () -
-gint64 - -g_date_time_to_unix () -
-gboolean - -g_date_time_to_timeval () -
-GTimeSpan - -g_date_time_get_utc_offset () -
const gchar * - -g_date_time_get_timezone_abbreviation () -
-gboolean - -g_date_time_is_daylight_savings () -
-GDateTime * - -g_date_time_to_timezone () -
-GDateTime * - -g_date_time_to_local () -
-GDateTime * - -g_date_time_to_utc () -
-gchar * - -g_date_time_format () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
typedefGTimeSpan
#defineG_TIME_SPAN_DAY
#defineG_TIME_SPAN_HOUR
#defineG_TIME_SPAN_MINUTE
#defineG_TIME_SPAN_SECOND
#defineG_TIME_SPAN_MILLISECOND
 GDateTime
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GDateTime is a structure that combines a Gregorian date and time -into a single structure. It provides many conversion and methods to -manipulate dates and times. Time precision is provided down to -microseconds and the time can range (proleptically) from 0001-01-01 -00:00:00 to 9999-12-31 23:59:59.999999. GDateTime follows POSIX -time in the sense that it is oblivious to leap seconds.

-

GDateTime is an immutable object; once it has been created it cannot -be modified further. All modifiers will create a new GDateTime. -Nearly all such functions can fail due to the date or time going out -of range, in which case NULL will be returned.

-

GDateTime is reference counted: the reference count is increased by calling -g_date_time_ref() and decreased by calling g_date_time_unref(). When the -reference count drops to 0, the resources allocated by the GDateTime -structure are released.

-

Many parts of the API may produce non-obvious results. As an -example, adding two months to January 31st will yield March 31st -whereas adding one month and then one month again will yield either -March 28th or March 29th. Also note that adding 24 hours is not -always the same as adding one day (since days containing daylight -savings time transitions are either 23 or 25 hours in length).

-

GDateTime is available since GLib 2.26.

-
-
-

Functions

-
-

g_date_time_unref ()

-
void
-g_date_time_unref (GDateTime *datetime);
-

Atomically decrements the reference count of datetime - by one.

-

When the reference count reaches zero, the resources allocated by -datetime - are freed

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-

Since: 2.26

-
-
-
-

g_date_time_ref ()

-
GDateTime *
-g_date_time_ref (GDateTime *datetime);
-

Atomically increments the reference count of datetime - by one.

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the GDateTime with the reference count increased

-
-

Since: 2.26

-
-
-
-

g_date_time_new_now ()

-
GDateTime *
-g_date_time_new_now (GTimeZone *tz);
-

Creates a GDateTime corresponding to this exact instant in the given -time zone tz -. The time is as accurate as the system allows, to a -maximum accuracy of 1 microsecond.

-

This function will always succeed unless the system clock is set to -truly insane values (or unless GLib is still being used after the -year 9999).

-

You should release the return value by calling g_date_time_unref() -when you are done with it.

-
-

Parameters

-
----- - - - - - -

tz

a GTimeZone

 
-
-
-

Returns

-

a new GDateTime, or NULL

-
-

Since: 2.26

-
-
-
-

g_date_time_new_now_local ()

-
GDateTime *
-g_date_time_new_now_local (void);
-

Creates a GDateTime corresponding to this exact instant in the local -time zone.

-

This is equivalent to calling g_date_time_new_now() with the time -zone returned by g_time_zone_new_local().

-
-

Returns

-

a new GDateTime, or NULL

-
-

Since: 2.26

-
-
-
-

g_date_time_new_now_utc ()

-
GDateTime *
-g_date_time_new_now_utc (void);
-

Creates a GDateTime corresponding to this exact instant in UTC.

-

This is equivalent to calling g_date_time_new_now() with the time -zone returned by g_time_zone_new_utc().

-
-

Returns

-

a new GDateTime, or NULL

-
-

Since: 2.26

-
-
-
-

g_date_time_new_from_unix_local ()

-
GDateTime *
-g_date_time_new_from_unix_local (gint64 t);
-

Creates a GDateTime corresponding to the given Unix time t - in the -local time zone.

-

Unix time is the number of seconds that have elapsed since 1970-01-01 -00:00:00 UTC, regardless of the local time offset.

-

This call can fail (returning NULL) if t - represents a time outside -of the supported range of GDateTime.

-

You should release the return value by calling g_date_time_unref() -when you are done with it.

-
-

Parameters

-
----- - - - - - -

t

the Unix time

 
-
-
-

Returns

-

a new GDateTime, or NULL

-
-

Since: 2.26

-
-
-
-

g_date_time_new_from_unix_utc ()

-
GDateTime *
-g_date_time_new_from_unix_utc (gint64 t);
-

Creates a GDateTime corresponding to the given Unix time t - in UTC.

-

Unix time is the number of seconds that have elapsed since 1970-01-01 -00:00:00 UTC.

-

This call can fail (returning NULL) if t - represents a time outside -of the supported range of GDateTime.

-

You should release the return value by calling g_date_time_unref() -when you are done with it.

-
-

Parameters

-
----- - - - - - -

t

the Unix time

 
-
-
-

Returns

-

a new GDateTime, or NULL

-
-

Since: 2.26

-
-
-
-

g_date_time_new_from_timeval_local ()

-
GDateTime *
-g_date_time_new_from_timeval_local (const GTimeVal *tv);
-

Creates a GDateTime corresponding to the given GTimeVal tv - in the -local time zone.

-

The time contained in a GTimeVal is always stored in the form of -seconds elapsed since 1970-01-01 00:00:00 UTC, regardless of the -local time offset.

-

This call can fail (returning NULL) if tv - represents a time outside -of the supported range of GDateTime.

-

You should release the return value by calling g_date_time_unref() -when you are done with it.

-
-

Parameters

-
----- - - - - - -

tv

a GTimeVal

 
-
-
-

Returns

-

a new GDateTime, or NULL

-
-

Since: 2.26

-
-
-
-

g_date_time_new_from_timeval_utc ()

-
GDateTime *
-g_date_time_new_from_timeval_utc (const GTimeVal *tv);
-

Creates a GDateTime corresponding to the given GTimeVal tv - in UTC.

-

The time contained in a GTimeVal is always stored in the form of -seconds elapsed since 1970-01-01 00:00:00 UTC.

-

This call can fail (returning NULL) if tv - represents a time outside -of the supported range of GDateTime.

-

You should release the return value by calling g_date_time_unref() -when you are done with it.

-
-

Parameters

-
----- - - - - - -

tv

a GTimeVal

 
-
-
-

Returns

-

a new GDateTime, or NULL

-
-

Since: 2.26

-
-
-
-

g_date_time_new ()

-
GDateTime *
-g_date_time_new (GTimeZone *tz,
-                 gint year,
-                 gint month,
-                 gint day,
-                 gint hour,
-                 gint minute,
-                 gdouble seconds);
-

Creates a new GDateTime corresponding to the given date and time in -the time zone tz -.

-

The year - must be between 1 and 9999, month - between 1 and 12 and day - -between 1 and 28, 29, 30 or 31 depending on the month and the year.

-

hour - must be between 0 and 23 and minute - must be between 0 and 59.

-

seconds - must be at least 0.0 and must be strictly less than 60.0. -It will be rounded down to the nearest microsecond.

-

If the given time is not representable in the given time zone (for -example, 02:30 on March 14th 2010 in Toronto, due to daylight savings -time) then the time will be rounded up to the nearest existing time -(in this case, 03:00). If this matters to you then you should verify -the return value for containing the same as the numbers you gave.

-

In the case that the given time is ambiguous in the given time zone -(for example, 01:30 on November 7th 2010 in Toronto, due to daylight -savings time) then the time falling within standard (ie: -non-daylight) time is taken.

-

It not considered a programmer error for the values to this function -to be out of range, but in the case that they are, the function will -return NULL.

-

You should release the return value by calling g_date_time_unref() -when you are done with it.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

tz

a GTimeZone

 

year

the year component of the date

 

month

the month component of the date

 

day

the day component of the date

 

hour

the hour component of the date

 

minute

the minute component of the date

 

seconds

the number of seconds past the minute

 
-
-
-

Returns

-

a new GDateTime, or NULL

-
-

Since: 2.26

-
-
-
-

g_date_time_new_local ()

-
GDateTime *
-g_date_time_new_local (gint year,
-                       gint month,
-                       gint day,
-                       gint hour,
-                       gint minute,
-                       gdouble seconds);
-

Creates a new GDateTime corresponding to the given date and time in -the local time zone.

-

This call is equivalent to calling g_date_time_new() with the time -zone returned by g_time_zone_new_local().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

year

the year component of the date

 

month

the month component of the date

 

day

the day component of the date

 

hour

the hour component of the date

 

minute

the minute component of the date

 

seconds

the number of seconds past the minute

 
-
-
-

Returns

-

a GDateTime, or NULL

-
-

Since: 2.26

-
-
-
-

g_date_time_new_utc ()

-
GDateTime *
-g_date_time_new_utc (gint year,
-                     gint month,
-                     gint day,
-                     gint hour,
-                     gint minute,
-                     gdouble seconds);
-

Creates a new GDateTime corresponding to the given date and time in -UTC.

-

This call is equivalent to calling g_date_time_new() with the time -zone returned by g_time_zone_new_utc().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

year

the year component of the date

 

month

the month component of the date

 

day

the day component of the date

 

hour

the hour component of the date

 

minute

the minute component of the date

 

seconds

the number of seconds past the minute

 
-
-
-

Returns

-

a GDateTime, or NULL

-
-

Since: 2.26

-
-
-
-

g_date_time_add ()

-
GDateTime *
-g_date_time_add (GDateTime *datetime,
-                 GTimeSpan timespan);
-

Creates a copy of datetime - and adds the specified timespan to the copy.

-
-

Parameters

-
----- - - - - - - - - - - - - -

datetime

a GDateTime

 

timespan

a GTimeSpan

 
-
-
-

Returns

-

the newly created GDateTime which should be freed with -g_date_time_unref().

-
-

Since: 2.26

-
-
-
-

g_date_time_add_years ()

-
GDateTime *
-g_date_time_add_years (GDateTime *datetime,
-                       gint years);
-

Creates a copy of datetime - and adds the specified number of years to the -copy. Add negative values to subtract years.

-
-

Parameters

-
----- - - - - - - - - - - - - -

datetime

a GDateTime

 

years

the number of years

 
-
-
-

Returns

-

the newly created GDateTime which should be freed with -g_date_time_unref().

-
-

Since: 2.26

-
-
-
-

g_date_time_add_months ()

-
GDateTime *
-g_date_time_add_months (GDateTime *datetime,
-                        gint months);
-

Creates a copy of datetime - and adds the specified number of months to the -copy. Add negative values to subtract months.

-
-

Parameters

-
----- - - - - - - - - - - - - -

datetime

a GDateTime

 

months

the number of months

 
-
-
-

Returns

-

the newly created GDateTime which should be freed with -g_date_time_unref().

-
-

Since: 2.26

-
-
-
-

g_date_time_add_weeks ()

-
GDateTime *
-g_date_time_add_weeks (GDateTime *datetime,
-                       gint weeks);
-

Creates a copy of datetime - and adds the specified number of weeks to the -copy. Add negative values to subtract weeks.

-
-

Parameters

-
----- - - - - - - - - - - - - -

datetime

a GDateTime

 

weeks

the number of weeks

 
-
-
-

Returns

-

the newly created GDateTime which should be freed with -g_date_time_unref().

-
-

Since: 2.26

-
-
-
-

g_date_time_add_days ()

-
GDateTime *
-g_date_time_add_days (GDateTime *datetime,
-                      gint days);
-

Creates a copy of datetime - and adds the specified number of days to the -copy. Add negative values to subtract days.

-
-

Parameters

-
----- - - - - - - - - - - - - -

datetime

a GDateTime

 

days

the number of days

 
-
-
-

Returns

-

the newly created GDateTime which should be freed with -g_date_time_unref().

-
-

Since: 2.26

-
-
-
-

g_date_time_add_hours ()

-
GDateTime *
-g_date_time_add_hours (GDateTime *datetime,
-                       gint hours);
-

Creates a copy of datetime - and adds the specified number of hours. -Add negative values to subtract hours.

-
-

Parameters

-
----- - - - - - - - - - - - - -

datetime

a GDateTime

 

hours

the number of hours to add

 
-
-
-

Returns

-

the newly created GDateTime which should be freed with -g_date_time_unref().

-
-

Since: 2.26

-
-
-
-

g_date_time_add_minutes ()

-
GDateTime *
-g_date_time_add_minutes (GDateTime *datetime,
-                         gint minutes);
-

Creates a copy of datetime - adding the specified number of minutes. -Add negative values to subtract minutes.

-
-

Parameters

-
----- - - - - - - - - - - - - -

datetime

a GDateTime

 

minutes

the number of minutes to add

 
-
-
-

Returns

-

the newly created GDateTime which should be freed with -g_date_time_unref().

-
-

Since: 2.26

-
-
-
-

g_date_time_add_seconds ()

-
GDateTime *
-g_date_time_add_seconds (GDateTime *datetime,
-                         gdouble seconds);
-

Creates a copy of datetime - and adds the specified number of seconds. -Add negative values to subtract seconds.

-
-

Parameters

-
----- - - - - - - - - - - - - -

datetime

a GDateTime

 

seconds

the number of seconds to add

 
-
-
-

Returns

-

the newly created GDateTime which should be freed with -g_date_time_unref().

-
-

Since: 2.26

-
-
-
-

g_date_time_add_full ()

-
GDateTime *
-g_date_time_add_full (GDateTime *datetime,
-                      gint years,
-                      gint months,
-                      gint days,
-                      gint hours,
-                      gint minutes,
-                      gdouble seconds);
-

Creates a new GDateTime adding the specified values to the current date and -time in datetime -. Add negative values to subtract.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

datetime

a GDateTime

 

years

the number of years to add

 

months

the number of months to add

 

days

the number of days to add

 

hours

the number of hours to add

 

minutes

the number of minutes to add

 

seconds

the number of seconds to add

 
-
-
-

Returns

-

the newly created GDateTime that should be freed with -g_date_time_unref().

-
-

Since: 2.26

-
-
-
-

g_date_time_compare ()

-
gint
-g_date_time_compare (gconstpointer dt1,
-                     gconstpointer dt2);
-

A comparison function for GDateTimes that is suitable -as a GCompareFunc. Both GDateTimes must be non-NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dt1

first GDateTime to compare.

[not nullable]

dt2

second GDateTime to compare.

[not nullable]
-
-
-

Returns

-

-1, 0 or 1 if dt1 -is less than, equal to or greater -than dt2 -.

-
-

Since: 2.26

-
-
-
-

g_date_time_difference ()

-
GTimeSpan
-g_date_time_difference (GDateTime *end,
-                        GDateTime *begin);
-

Calculates the difference in time between end - and begin -. The -GTimeSpan that is returned is effectively end - - begin - (ie: -positive if the first parameter is larger).

-
-

Parameters

-
----- - - - - - - - - - - - - -

end

a GDateTime

 

begin

a GDateTime

 
-
-
-

Returns

-

the difference between the two GDateTime, as a time -span expressed in microseconds.

-
-

Since: 2.26

-
-
-
-

g_date_time_hash ()

-
guint
-g_date_time_hash (gconstpointer datetime);
-

Hashes datetime - into a guint, suitable for use within GHashTable.

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime.

[not nullable]
-
-
-

Returns

-

a guint containing the hash

-
-

Since: 2.26

-
-
-
-

g_date_time_equal ()

-
gboolean
-g_date_time_equal (gconstpointer dt1,
-                   gconstpointer dt2);
-

Checks to see if dt1 - and dt2 - are equal.

-

Equal here means that they represent the same moment after converting -them to the same time zone.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dt1

a GDateTime.

[not nullable]

dt2

a GDateTime.

[not nullable]
-
-
-

Returns

-

TRUE if dt1 -and dt2 -are equal

-
-

Since: 2.26

-
-
-
-

g_date_time_get_ymd ()

-
void
-g_date_time_get_ymd (GDateTime *datetime,
-                     gint *year,
-                     gint *month,
-                     gint *day);
-

Retrieves the Gregorian day, month, and year of a given GDateTime.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

datetime

a GDateTime.

 

year

the return location for the gregorian year, or NULL.

[out][optional]

month

the return location for the month of the year, or NULL.

[out][optional]

day

the return location for the day of the month, or NULL.

[out][optional]
-
-

Since: 2.26

-
-
-
-

g_date_time_get_year ()

-
gint
-g_date_time_get_year (GDateTime *datetime);
-

Retrieves the year represented by datetime - in the Gregorian calendar.

-
-

Parameters

-
----- - - - - - -

datetime

A GDateTime

 
-
-
-

Returns

-

the year represented by datetime -

-
-

Since: 2.26

-
-
-
-

g_date_time_get_month ()

-
gint
-g_date_time_get_month (GDateTime *datetime);
-

Retrieves the month of the year represented by datetime - in the Gregorian -calendar.

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the month represented by datetime -

-
-

Since: 2.26

-
-
-
-

g_date_time_get_day_of_month ()

-
gint
-g_date_time_get_day_of_month (GDateTime *datetime);
-

Retrieves the day of the month represented by datetime - in the gregorian -calendar.

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the day of the month

-
-

Since: 2.26

-
-
-
-

g_date_time_get_week_numbering_year ()

-
gint
-g_date_time_get_week_numbering_year (GDateTime *datetime);
-

Returns the ISO 8601 week-numbering year in which the week containing -datetime - falls.

-

This function, taken together with g_date_time_get_week_of_year() and -g_date_time_get_day_of_week() can be used to determine the full ISO -week date on which datetime - falls.

-

This is usually equal to the normal Gregorian year (as returned by -g_date_time_get_year()), except as detailed below:

-

For Thursday, the week-numbering year is always equal to the usual -calendar year. For other days, the number is such that every day -within a complete week (Monday to Sunday) is contained within the -same week-numbering year.

-

For Monday, Tuesday and Wednesday occurring near the end of the year, -this may mean that the week-numbering year is one greater than the -calendar year (so that these days have the same week-numbering year -as the Thursday occurring early in the next year).

-

For Friday, Saturday and Sunday occurring near the start of the year, -this may mean that the week-numbering year is one less than the -calendar year (so that these days have the same week-numbering year -as the Thursday occurring late in the previous year).

-

An equivalent description is that the week-numbering year is equal to -the calendar year containing the majority of the days in the current -week (Monday to Sunday).

-

Note that January 1 0001 in the proleptic Gregorian calendar is a -Monday, so this function never returns 0.

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the ISO 8601 week-numbering year for datetime -

-
-

Since: 2.26

-
-
-
-

g_date_time_get_week_of_year ()

-
gint
-g_date_time_get_week_of_year (GDateTime *datetime);
-

Returns the ISO 8601 week number for the week containing datetime -. -The ISO 8601 week number is the same for every day of the week (from -Moday through Sunday). That can produce some unusual results -(described below).

-

The first week of the year is week 1. This is the week that contains -the first Thursday of the year. Equivalently, this is the first week -that has more than 4 of its days falling within the calendar year.

-

The value 0 is never returned by this function. Days contained -within a year but occurring before the first ISO 8601 week of that -year are considered as being contained in the last week of the -previous year. Similarly, the final days of a calendar year may be -considered as being part of the first ISO 8601 week of the next year -if 4 or more days of that week are contained within the new year.

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the ISO 8601 week number for datetime -.

-
-

Since: 2.26

-
-
-
-

g_date_time_get_day_of_week ()

-
gint
-g_date_time_get_day_of_week (GDateTime *datetime);
-

Retrieves the ISO 8601 day of the week on which datetime - falls (1 is -Monday, 2 is Tuesday... 7 is Sunday).

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the day of the week

-
-

Since: 2.26

-
-
-
-

g_date_time_get_day_of_year ()

-
gint
-g_date_time_get_day_of_year (GDateTime *datetime);
-

Retrieves the day of the year represented by datetime - in the Gregorian -calendar.

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the day of the year

-
-

Since: 2.26

-
-
-
-

g_date_time_get_hour ()

-
gint
-g_date_time_get_hour (GDateTime *datetime);
-

Retrieves the hour of the day represented by datetime -

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the hour of the day

-
-

Since: 2.26

-
-
-
-

g_date_time_get_minute ()

-
gint
-g_date_time_get_minute (GDateTime *datetime);
-

Retrieves the minute of the hour represented by datetime -

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the minute of the hour

-
-

Since: 2.26

-
-
-
-

g_date_time_get_second ()

-
gint
-g_date_time_get_second (GDateTime *datetime);
-

Retrieves the second of the minute represented by datetime -

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the second represented by datetime -

-
-

Since: 2.26

-
-
-
-

g_date_time_get_microsecond ()

-
gint
-g_date_time_get_microsecond (GDateTime *datetime);
-

Retrieves the microsecond of the date represented by datetime -

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the microsecond of the second

-
-

Since: 2.26

-
-
-
-

g_date_time_get_seconds ()

-
gdouble
-g_date_time_get_seconds (GDateTime *datetime);
-

Retrieves the number of seconds since the start of the last minute, -including the fractional part.

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the number of seconds

-
-

Since: 2.26

-
-
-
-

g_date_time_to_unix ()

-
gint64
-g_date_time_to_unix (GDateTime *datetime);
-

Gives the Unix time corresponding to datetime -, rounding down to the -nearest second.

-

Unix time is the number of seconds that have elapsed since 1970-01-01 -00:00:00 UTC, regardless of the time zone associated with datetime -.

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the Unix time corresponding to datetime -

-
-

Since: 2.26

-
-
-
-

g_date_time_to_timeval ()

-
gboolean
-g_date_time_to_timeval (GDateTime *datetime,
-                        GTimeVal *tv);
-

Stores the instant in time that datetime - represents into tv -.

-

The time contained in a GTimeVal is always stored in the form of -seconds elapsed since 1970-01-01 00:00:00 UTC, regardless of the time -zone associated with datetime -.

-

On systems where 'long' is 32bit (ie: all 32bit systems and all -Windows systems), a GTimeVal is incapable of storing the entire -range of values that GDateTime is capable of expressing. On those -systems, this function returns FALSE to indicate that the time is -out of range.

-

On systems where 'long' is 64bit, this function never fails.

-
-

Parameters

-
----- - - - - - - - - - - - - -

datetime

a GDateTime

 

tv

a GTimeVal to modify

 
-
-
-

Returns

-

TRUE if successful, else FALSE

-
-

Since: 2.26

-
-
-
-

g_date_time_get_utc_offset ()

-
GTimeSpan
-g_date_time_get_utc_offset (GDateTime *datetime);
-

Determines the offset to UTC in effect at the time and in the time -zone of datetime -.

-

The offset is the number of microseconds that you add to UTC time to -arrive at local time for the time zone (ie: negative numbers for time -zones west of GMT, positive numbers for east).

-

If datetime - represents UTC time, then the offset is always zero.

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the number of microseconds that should be added to UTC to -get the local time

-
-

Since: 2.26

-
-
-
-

g_date_time_get_timezone_abbreviation ()

-
const gchar *
-g_date_time_get_timezone_abbreviation (GDateTime *datetime);
-

Determines the time zone abbreviation to be used at the time and in -the time zone of datetime -.

-

For example, in Toronto this is currently "EST" during the winter -months and "EDT" during the summer months when daylight savings -time is in effect.

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the time zone abbreviation. The returned -string is owned by the GDateTime and it should not be -modified or freed.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_date_time_is_daylight_savings ()

-
gboolean
-g_date_time_is_daylight_savings (GDateTime *datetime);
-

Determines if daylight savings time is in effect at the time and in -the time zone of datetime -.

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

TRUE if daylight savings time is in effect

-
-

Since: 2.26

-
-
-
-

g_date_time_to_timezone ()

-
GDateTime *
-g_date_time_to_timezone (GDateTime *datetime,
-                         GTimeZone *tz);
-

Create a new GDateTime corresponding to the same instant in time as -datetime -, but in the time zone tz -.

-

This call can fail in the case that the time goes out of bounds. For -example, converting 0001-01-01 00:00:00 UTC to a time zone west of -Greenwich will fail (due to the year 0 being out of range).

-

You should release the return value by calling g_date_time_unref() -when you are done with it.

-
-

Parameters

-
----- - - - - - - - - - - - - -

datetime

a GDateTime

 

tz

the new GTimeZone

 
-
-
-

Returns

-

a new GDateTime, or NULL

-
-

Since: 2.26

-
-
-
-

g_date_time_to_local ()

-
GDateTime *
-g_date_time_to_local (GDateTime *datetime);
-

Creates a new GDateTime corresponding to the same instant in time as -datetime -, but in the local time zone.

-

This call is equivalent to calling g_date_time_to_timezone() with the -time zone returned by g_time_zone_new_local().

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the newly created GDateTime

-
-

Since: 2.26

-
-
-
-

g_date_time_to_utc ()

-
GDateTime *
-g_date_time_to_utc (GDateTime *datetime);
-

Creates a new GDateTime corresponding to the same instant in time as -datetime -, but in UTC.

-

This call is equivalent to calling g_date_time_to_timezone() with the -time zone returned by g_time_zone_new_utc().

-
-

Parameters

-
----- - - - - - -

datetime

a GDateTime

 
-
-
-

Returns

-

the newly created GDateTime

-
-

Since: 2.26

-
-
-
-

g_date_time_format ()

-
gchar *
-g_date_time_format (GDateTime *datetime,
-                    const gchar *format);
-

Creates a newly allocated string representing the requested format -.

-

The format strings understood by this function are a subset of the -strftime() format language as specified by C99. The %D, %U and %W -conversions are not supported, nor is the 'E' modifier. The GNU -extensions %k, %l, %s and %P are supported, however, as are the -'0', '_' and '-' modifiers.

-

In contrast to strftime(), this function always produces a UTF-8 -string, regardless of the current locale. Note that the rendering of -many formats is locale-dependent and may not match the strftime() -output exactly.

-

The following format specifiers are supported:

-
    -
  • %a: the abbreviated weekday name according to the current locale

  • -
  • %A: the full weekday name according to the current locale

  • -
  • %b: the abbreviated month name according to the current locale

  • -
  • %B: the full month name according to the current locale

  • -
  • %c: the preferred date and time representation for the current locale

  • -
  • %C: the century number (year/100) as a 2-digit integer (00-99)

  • -
  • %d: the day of the month as a decimal number (range 01 to 31)

  • -
  • %e: the day of the month as a decimal number (range 1 to 31)

  • -
  • %F: equivalent to %Y-%m-%d (the ISO 8601 date format)

  • -
  • %g: the last two digits of the ISO 8601 week-based year as a -decimal number (00-99). This works well with %V and %u.

  • -
  • %G: the ISO 8601 week-based year as a decimal number. This works -well with %V and %u.

  • -
  • %h: equivalent to %b

  • -
  • %H: the hour as a decimal number using a 24-hour clock (range 00 to 23)

  • -
  • %I: the hour as a decimal number using a 12-hour clock (range 01 to 12)

  • -
  • %j: the day of the year as a decimal number (range 001 to 366)

  • -
  • %k: the hour (24-hour clock) as a decimal number (range 0 to 23); -single digits are preceded by a blank

  • -
  • %l: the hour (12-hour clock) as a decimal number (range 1 to 12); -single digits are preceded by a blank

  • -
  • %m: the month as a decimal number (range 01 to 12)

  • -
  • %M: the minute as a decimal number (range 00 to 59)

  • -
  • %p: either "AM" or "PM" according to the given time value, or the -corresponding strings for the current locale. Noon is treated as -"PM" and midnight as "AM".

  • -
  • %P: like %p but lowercase: "am" or "pm" or a corresponding string for -the current locale

  • -
  • %r: the time in a.m. or p.m. notation

  • -
  • %R: the time in 24-hour notation (%H:%M)

  • -
  • %s: the number of seconds since the Epoch, that is, since 1970-01-01 -00:00:00 UTC

  • -
  • %S: the second as a decimal number (range 00 to 60)

  • -
  • %t: a tab character

  • -
  • %T: the time in 24-hour notation with seconds (%H:%M:%S)

  • -
  • %u: the ISO 8601 standard day of the week as a decimal, range 1 to 7, -Monday being 1. This works well with %G and %V.

  • -
  • %V: the ISO 8601 standard week number of the current year as a decimal -number, range 01 to 53, where week 1 is the first week that has at -least 4 days in the new year. See g_date_time_get_week_of_year(). -This works well with %G and %u.

  • -
  • %w: the day of the week as a decimal, range 0 to 6, Sunday being 0. -This is not the ISO 8601 standard format -- use %u instead.

  • -
  • %x: the preferred date representation for the current locale without -the time

  • -
  • %X: the preferred time representation for the current locale without -the date

  • -
  • %y: the year as a decimal number without the century

  • -
  • %Y: the year as a decimal number including the century

  • -
  • %z: the time zone as an offset from UTC (+hhmm)

  • -
  • %:z: the time zone as an offset from UTC (+hh:mm). -This is a gnulib strftime() extension. Since: 2.38

  • -
  • %::z: the time zone as an offset from UTC (+hh:mm:ss). This is a -gnulib strftime() extension. Since: 2.38

  • -
  • %:::z: the time zone as an offset from UTC, with : to necessary -precision (e.g., -04, +05:30). This is a gnulib strftime() extension. Since: 2.38

  • -
  • %Z: the time zone or name or abbreviation

  • -
  • %%: a literal % character

  • -
-

Some conversion specifications can be modified by preceding the -conversion specifier by one or more modifier characters. The -following modifiers are supported for many of the numeric -conversions:

-
    -
  • O: Use alternative numeric symbols, if the current locale supports those.

  • -
  • _: Pad a numeric result with spaces. This overrides the default padding -for the specifier.

  • -
  • -: Do not pad a numeric result. This overrides the default padding -for the specifier.

  • -
  • 0: Pad a numeric result with zeros. This overrides the default padding -for the specifier.

  • -
-
-

Parameters

-
----- - - - - - - - - - - - - -

datetime

A GDateTime

 

format

a valid UTF-8 string, containing the format for the -GDateTime

 
-
-
-

Returns

-

a newly allocated string formatted to the requested format -or NULL in the case that there was an error. The string -should be freed with g_free().

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GTimeSpan

-
typedef gint64 GTimeSpan;
-
-

A value representing an interval of time, in microseconds.

-

Since: 2.26

-
-
-
-

G_TIME_SPAN_DAY

-
#define G_TIME_SPAN_DAY                 (G_GINT64_CONSTANT (86400000000))
-
-

Evaluates to a time span of one day.

-

Since: 2.26

-
-
-
-

G_TIME_SPAN_HOUR

-
#define G_TIME_SPAN_HOUR                (G_GINT64_CONSTANT (3600000000))
-
-

Evaluates to a time span of one hour.

-

Since: 2.26

-
-
-
-

G_TIME_SPAN_MINUTE

-
#define G_TIME_SPAN_MINUTE              (G_GINT64_CONSTANT (60000000))
-
-

Evaluates to a time span of one minute.

-

Since: 2.26

-
-
-
-

G_TIME_SPAN_SECOND

-
#define G_TIME_SPAN_SECOND              (G_GINT64_CONSTANT (1000000))
-
-

Evaluates to a time span of one second.

-

Since: 2.26

-
-
-
-

G_TIME_SPAN_MILLISECOND

-
#define G_TIME_SPAN_MILLISECOND         (G_GINT64_CONSTANT (1000))
-
-

Evaluates to a time span of one millisecond.

-

Since: 2.26

-
-
-
-

GDateTime

-
typedef struct _GDateTime GDateTime;
-

GDateTime is an opaque structure whose members -cannot be accessed directly.

-

Since: 2.26

-
-
-
-

See Also

-

GTimeZone

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-GTimeZone.html b/docs/reference/glib/html/glib-GTimeZone.html deleted file mode 100644 index ba2d069f7..000000000 --- a/docs/reference/glib/html/glib-GTimeZone.html +++ /dev/null @@ -1,654 +0,0 @@ - - - - -GTimeZone: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GTimeZone

-

GTimeZone — a structure representing a time zone

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -g_time_zone_unref () -
-GTimeZone * - -g_time_zone_ref () -
-GTimeZone * - -g_time_zone_new () -
-GTimeZone * - -g_time_zone_new_local () -
-GTimeZone * - -g_time_zone_new_utc () -
-gint - -g_time_zone_find_interval () -
-gint - -g_time_zone_adjust_time () -
const gchar * - -g_time_zone_get_abbreviation () -
-gint32 - -g_time_zone_get_offset () -
-gboolean - -g_time_zone_is_dst () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GTimeZone
enumGTimeType
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GTimeZone is a structure that represents a time zone, at no -particular point in time. It is refcounted and immutable.

-

A time zone contains a number of intervals. Each interval has -an abbreviation to describe it, an offet to UTC and a flag indicating -if the daylight savings time is in effect during that interval. A -time zone always has at least one interval -- interval 0.

-

Every UTC time is contained within exactly one interval, but a given -local time may be contained within zero, one or two intervals (due to -incontinuities associated with daylight savings time).

-

An interval may refer to a specific period of time (eg: the duration -of daylight savings time during 2010) or it may refer to many periods -of time that share the same properties (eg: all periods of daylight -savings time). It is also possible (usually for political reasons) -that some properties (like the abbreviation) change between intervals -without other properties changing.

-

GTimeZone is available since GLib 2.26.

-
-
-

Functions

-
-

g_time_zone_unref ()

-
void
-g_time_zone_unref (GTimeZone *tz);
-

Decreases the reference count on tz -.

-
-

Parameters

-
----- - - - - - -

tz

a GTimeZone

 
-
-

Since: 2.26

-
-
-
-

g_time_zone_ref ()

-
GTimeZone *
-g_time_zone_ref (GTimeZone *tz);
-

Increases the reference count on tz -.

-
-

Parameters

-
----- - - - - - -

tz

a GTimeZone

 
-
-
-

Returns

-

a new reference to tz -.

-
-

Since: 2.26

-
-
-
-

g_time_zone_new ()

-
GTimeZone *
-g_time_zone_new (const gchar *identifier);
-

Creates a GTimeZone corresponding to identifier -.

-

identifier - can either be an RFC3339/ISO 8601 time offset or -something that would pass as a valid value for the TZ environment -variable (including NULL).

-

In Windows, identifier - can also be the unlocalized name of a time -zone for standard time, for example "Pacific Standard Time".

-

Valid RFC3339 time offsets are "Z" (for UTC) or -"±hh:mm". ISO 8601 additionally specifies -"±hhmm" and "±hh". Offsets are -time values to be added to Coordinated Universal Time (UTC) to get -the local time.

-

In UNIX, the TZ environment variable typically corresponds -to the name of a file in the zoneinfo database, or string in -"std offset [dst [offset],start[/time],end[/time]]" (POSIX) format. -There are no spaces in the specification. The name of standard -and daylight savings time zone must be three or more alphabetic -characters. Offsets are time values to be added to local time to -get Coordinated Universal Time (UTC) and should be -"[±]hh[[:]mm[:ss]]". Dates are either -"Jn" (Julian day with n between 1 and 365, leap -years not counted), "n" (zero-based Julian day -with n between 0 and 365) or "Mm.w.d" (day d -(0 <= d <= 6) of week w (1 <= w <= 5) of month m (1 <= m <= 12), day -0 is a Sunday). Times are in local wall clock time, the default is -02:00:00.

-

In Windows, the "tzn[+|–]hh:mm[:ss]" format is used, but also -accepts POSIX format. The Windows format uses US rules for all time -zones; daylight savings time is 60 minutes behind the standard time -with date and time of change taken from Pacific Standard Time. -Offsets are time values to be added to the local time to get -Coordinated Universal Time (UTC).

-

g_time_zone_new_local() calls this function with the value of the -TZ environment variable. This function itself is independent of -the value of TZ, but if identifier - is NULL then /etc/localtime -will be consulted to discover the correct time zone on UNIX and the -registry will be consulted or GetTimeZoneInformation() will be used -to get the local time zone on Windows.

-

If intervals are not available, only time zone rules from TZ -environment variable or other means, then they will be computed -from year 1900 to 2037. If the maximum year for the rules is -available and it is greater than 2037, then it will followed -instead.

-

See -RFC3339 §5.6 -for a precise definition of valid RFC3339 time offsets -(the time-offset expansion) and ISO 8601 for the -full list of valid time offsets. See -The GNU C Library manual -for an explanation of the possible -values of the TZ environment variable. See -Microsoft Time Zone Index Values -for the list of time zones on Windows.

-

You should release the return value by calling g_time_zone_unref() -when you are done with it.

-
-

Parameters

-
----- - - - - - -

identifier

a timezone identifier.

[nullable]
-
-
-

Returns

-

the requested timezone

-
-

Since: 2.26

-
-
-
-

g_time_zone_new_local ()

-
GTimeZone *
-g_time_zone_new_local (void);
-

Creates a GTimeZone corresponding to local time. The local time -zone may change between invocations to this function; for example, -if the system administrator changes it.

-

This is equivalent to calling g_time_zone_new() with the value of -the TZ environment variable (including the possibility of NULL).

-

You should release the return value by calling g_time_zone_unref() -when you are done with it.

-
-

Returns

-

the local timezone

-
-

Since: 2.26

-
-
-
-

g_time_zone_new_utc ()

-
GTimeZone *
-g_time_zone_new_utc (void);
-

Creates a GTimeZone corresponding to UTC.

-

This is equivalent to calling g_time_zone_new() with a value like -"Z", "UTC", "+00", etc.

-

You should release the return value by calling g_time_zone_unref() -when you are done with it.

-
-

Returns

-

the universal timezone

-
-

Since: 2.26

-
-
-
-

g_time_zone_find_interval ()

-
gint
-g_time_zone_find_interval (GTimeZone *tz,
-                           GTimeType type,
-                           gint64 time_);
-

Finds an the interval within tz - that corresponds to the given time_ -. -The meaning of time_ - depends on type -.

-

If type - is G_TIME_TYPE_UNIVERSAL then this function will always -succeed (since universal time is monotonic and continuous).

-

Otherwise time_ - is treated as local time. The distinction between -G_TIME_TYPE_STANDARD and G_TIME_TYPE_DAYLIGHT is ignored except in -the case that the given time_ - is ambiguous. In Toronto, for example, -01:30 on November 7th 2010 occurred twice (once inside of daylight -savings time and the next, an hour later, outside of daylight savings -time). In this case, the different value of type - would result in a -different interval being returned.

-

It is still possible for this function to fail. In Toronto, for -example, 02:00 on March 14th 2010 does not exist (due to the leap -forward to begin daylight savings time). -1 is returned in that -case.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

tz

a GTimeZone

 

type

the GTimeType of time_ -

 

time_

a number of seconds since January 1, 1970

 
-
-
-

Returns

-

the interval containing time_ -, or -1 in case of failure

-
-

Since: 2.26

-
-
-
-

g_time_zone_adjust_time ()

-
gint
-g_time_zone_adjust_time (GTimeZone *tz,
-                         GTimeType type,
-                         gint64 *time_);
-

Finds an interval within tz - that corresponds to the given time_ -, -possibly adjusting time_ - if required to fit into an interval. -The meaning of time_ - depends on type -.

-

This function is similar to g_time_zone_find_interval(), with the -difference that it always succeeds (by making the adjustments -described below).

-

In any of the cases where g_time_zone_find_interval() succeeds then -this function returns the same value, without modifying time_ -.

-

This function may, however, modify time_ - in order to deal with -non-existent times. If the non-existent local time_ - of 02:30 were -requested on March 14th 2010 in Toronto then this function would -adjust time_ - to be 03:00 and return the interval containing the -adjusted time.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

tz

a GTimeZone

 

type

the GTimeType of time_ -

 

time_

a pointer to a number of seconds since January 1, 1970

 
-
-
-

Returns

-

the interval containing time_ -, never -1

-
-

Since: 2.26

-
-
-
-

g_time_zone_get_abbreviation ()

-
const gchar *
-g_time_zone_get_abbreviation (GTimeZone *tz,
-                              gint interval);
-

Determines the time zone abbreviation to be used during a particular -interval - of time in the time zone tz -.

-

For example, in Toronto this is currently "EST" during the winter -months and "EDT" during the summer months when daylight savings time -is in effect.

-
-

Parameters

-
----- - - - - - - - - - - - - -

tz

a GTimeZone

 

interval

an interval within the timezone

 
-
-
-

Returns

-

the time zone abbreviation, which belongs to tz -

-
-

Since: 2.26

-
-
-
-

g_time_zone_get_offset ()

-
gint32
-g_time_zone_get_offset (GTimeZone *tz,
-                        gint interval);
-

Determines the offset to UTC in effect during a particular interval - -of time in the time zone tz -.

-

The offset is the number of seconds that you add to UTC time to -arrive at local time for tz - (ie: negative numbers for time zones -west of GMT, positive numbers for east).

-
-

Parameters

-
----- - - - - - - - - - - - - -

tz

a GTimeZone

 

interval

an interval within the timezone

 
-
-
-

Returns

-

the number of seconds that should be added to UTC to get the -local time in tz -

-
-

Since: 2.26

-
-
-
-

g_time_zone_is_dst ()

-
gboolean
-g_time_zone_is_dst (GTimeZone *tz,
-                    gint interval);
-

Determines if daylight savings time is in effect during a particular -interval - of time in the time zone tz -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

tz

a GTimeZone

 

interval

an interval within the timezone

 
-
-
-

Returns

-

TRUE if daylight savings time is in effect

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GTimeZone

-
typedef struct _GTimeZone GTimeZone;
-

GTimeZone is an opaque structure whose members cannot be accessed -directly.

-

Since: 2.26

-
-
-
-

enum GTimeType

-

Disambiguates a given time in two ways.

-

First, specifies if the given time is in universal or local time.

-

Second, if the time is in local time, specifies if it is local -standard time or local daylight time. This is important for the case -where the same local time occurs twice (during daylight savings time -transitions, for example).

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_TIME_TYPE_STANDARD

-

the time is in local standard time

-
 

G_TIME_TYPE_DAYLIGHT

-

the time is in local daylight time

-
 

G_TIME_TYPE_UNIVERSAL

-

the time is in UTC

-
 
-
-
-
-
-

See Also

-

GDateTime

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-GUuid.html b/docs/reference/glib/html/glib-GUuid.html deleted file mode 100644 index c5b8384c2..000000000 --- a/docs/reference/glib/html/glib-GUuid.html +++ /dev/null @@ -1,134 +0,0 @@ - - - - -GUuid: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GUuid

-

GUuid — a universally unique identifier

-
-
-

Functions

-
---- - - - - - - - - - - -
-gboolean - -g_uuid_string_is_valid () -
-gchar * - -g_uuid_string_random () -
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

A UUID, or Universally unique identifier, is intended to uniquely -identify information in a distributed environment. For the -definition of UUID, see RFC 4122.

-

The creation of UUIDs does not require a centralized authority.

-

UUIDs are of relatively small size (128 bits, or 16 bytes). The -common string representation (ex: -1d6c0810-2bd6-45f3-9890-0268422a6f14) needs 37 bytes.

-

The UUID specification defines 5 versions, and calling -g_uuid_string_random() will generate a unique (or rather random) -UUID of the most common version, version 4.

-
-
-

Functions

-
-

g_uuid_string_is_valid ()

-
gboolean
-g_uuid_string_is_valid (const gchar *str);
-

Parses the string str - and verify if it is a UUID.

-

The function accepts the following syntax:

-
  • simple forms (e.g. f81d4fae-7dec-11d0-a765-00a0c91e6bf6)

-

Note that hyphens are required within the UUID string itself, -as per the aforementioned RFC.

-
-

Parameters

-
----- - - - - - -

str

a string representing a UUID

 
-
-
-

Returns

-

TRUE if str -is a valid UUID, FALSE otherwise.

-
-

Since: 2.52

-
-
-
-

g_uuid_string_random ()

-
gchar *
-g_uuid_string_random (void);
-

Generates a random UUID (RFC 4122 version 4) as a string.

-
-

Returns

-

A string that should be freed with g_free().

-

[transfer full]

-
-

Since: 2.52

-
-
-
-

Types and Values

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-GVariant.html b/docs/reference/glib/html/glib-GVariant.html deleted file mode 100644 index 9e431ecd4..000000000 --- a/docs/reference/glib/html/glib-GVariant.html +++ /dev/null @@ -1,7092 +0,0 @@ - - - - -GVariant: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GVariant

-

GVariant — strongly typed value datatype

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -g_variant_unref () -
-GVariant * - -g_variant_ref () -
-GVariant * - -g_variant_ref_sink () -
-gboolean - -g_variant_is_floating () -
-GVariant * - -g_variant_take_ref () -
const GVariantType * - -g_variant_get_type () -
const gchar * - -g_variant_get_type_string () -
-gboolean - -g_variant_is_of_type () -
-gboolean - -g_variant_is_container () -
-gint - -g_variant_compare () -
-GVariantClass - -g_variant_classify () -
-gboolean - -g_variant_check_format_string () -
-void - -g_variant_get () -
-void - -g_variant_get_va () -
-GVariant * - -g_variant_new () -
-GVariant * - -g_variant_new_va () -
-GVariant * - -g_variant_new_boolean () -
-GVariant * - -g_variant_new_byte () -
-GVariant * - -g_variant_new_int16 () -
-GVariant * - -g_variant_new_uint16 () -
-GVariant * - -g_variant_new_int32 () -
-GVariant * - -g_variant_new_uint32 () -
-GVariant * - -g_variant_new_int64 () -
-GVariant * - -g_variant_new_uint64 () -
-GVariant * - -g_variant_new_handle () -
-GVariant * - -g_variant_new_double () -
-GVariant * - -g_variant_new_string () -
-GVariant * - -g_variant_new_take_string () -
-GVariant * - -g_variant_new_printf () -
-GVariant * - -g_variant_new_object_path () -
-gboolean - -g_variant_is_object_path () -
-GVariant * - -g_variant_new_signature () -
-gboolean - -g_variant_is_signature () -
-GVariant * - -g_variant_new_variant () -
-GVariant * - -g_variant_new_strv () -
-GVariant * - -g_variant_new_objv () -
-GVariant * - -g_variant_new_bytestring () -
-GVariant * - -g_variant_new_bytestring_array () -
-gboolean - -g_variant_get_boolean () -
-guchar - -g_variant_get_byte () -
-gint16 - -g_variant_get_int16 () -
-guint16 - -g_variant_get_uint16 () -
-gint32 - -g_variant_get_int32 () -
-guint32 - -g_variant_get_uint32 () -
-gint64 - -g_variant_get_int64 () -
-guint64 - -g_variant_get_uint64 () -
-gint32 - -g_variant_get_handle () -
-gdouble - -g_variant_get_double () -
const gchar * - -g_variant_get_string () -
-gchar * - -g_variant_dup_string () -
-GVariant * - -g_variant_get_variant () -
const gchar ** - -g_variant_get_strv () -
-gchar ** - -g_variant_dup_strv () -
const gchar ** - -g_variant_get_objv () -
-gchar ** - -g_variant_dup_objv () -
const gchar * - -g_variant_get_bytestring () -
-gchar * - -g_variant_dup_bytestring () -
const gchar ** - -g_variant_get_bytestring_array () -
-gchar ** - -g_variant_dup_bytestring_array () -
-GVariant * - -g_variant_new_maybe () -
-GVariant * - -g_variant_new_array () -
-GVariant * - -g_variant_new_tuple () -
-GVariant * - -g_variant_new_dict_entry () -
-GVariant * - -g_variant_new_fixed_array () -
-GVariant * - -g_variant_get_maybe () -
-gsize - -g_variant_n_children () -
-GVariant * - -g_variant_get_child_value () -
-void - -g_variant_get_child () -
-GVariant * - -g_variant_lookup_value () -
-gboolean - -g_variant_lookup () -
-gconstpointer - -g_variant_get_fixed_array () -
-gsize - -g_variant_get_size () -
-gconstpointer - -g_variant_get_data () -
-GBytes * - -g_variant_get_data_as_bytes () -
-void - -g_variant_store () -
-GVariant * - -g_variant_new_from_data () -
-GVariant * - -g_variant_new_from_bytes () -
-GVariant * - -g_variant_byteswap () -
-GVariant * - -g_variant_get_normal_form () -
-gboolean - -g_variant_is_normal_form () -
-guint - -g_variant_hash () -
-gboolean - -g_variant_equal () -
-gchar * - -g_variant_print () -
-GString * - -g_variant_print_string () -
-GVariantIter * - -g_variant_iter_copy () -
-void - -g_variant_iter_free () -
-gsize - -g_variant_iter_init () -
-gsize - -g_variant_iter_n_children () -
-GVariantIter * - -g_variant_iter_new () -
-GVariant * - -g_variant_iter_next_value () -
-gboolean - -g_variant_iter_next () -
-gboolean - -g_variant_iter_loop () -
#define -G_VARIANT_BUILDER_INIT() -
-void - -g_variant_builder_unref () -
-GVariantBuilder * - -g_variant_builder_ref () -
-GVariantBuilder * - -g_variant_builder_new () -
-void - -g_variant_builder_init () -
-void - -g_variant_builder_clear () -
-void - -g_variant_builder_add_value () -
-void - -g_variant_builder_add () -
-void - -g_variant_builder_add_parsed () -
-GVariant * - -g_variant_builder_end () -
-void - -g_variant_builder_open () -
-void - -g_variant_builder_close () -
-void - -g_variant_dict_unref () -
-GVariantDict * - -g_variant_dict_ref () -
-GVariantDict * - -g_variant_dict_new () -
-void - -g_variant_dict_init () -
-void - -g_variant_dict_clear () -
-gboolean - -g_variant_dict_contains () -
-gboolean - -g_variant_dict_lookup () -
-GVariant * - -g_variant_dict_lookup_value () -
-void - -g_variant_dict_insert () -
-void - -g_variant_dict_insert_value () -
-gboolean - -g_variant_dict_remove () -
-GVariant * - -g_variant_dict_end () -
-GVariant * - -g_variant_parse () -
-GVariant * - -g_variant_new_parsed_va () -
-GVariant * - -g_variant_new_parsed () -
-gchar * - -g_variant_parse_error_print_context () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 GVariant
enumGVariantClass
structGVariantIter
structGVariantBuilder
structGVariantDict
enumGVariantParseError
#defineG_VARIANT_PARSE_ERROR
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GVariant is a variant datatype; it can contain one or more values -along with information about the type of the values.

-

A GVariant may contain simple types, like an integer, or a boolean value; -or complex types, like an array of two strings, or a dictionary of key -value pairs. A GVariant is also immutable: once it's been created neither -its type nor its content can be modified further.

-

GVariant is useful whenever data needs to be serialized, for example when -sending method parameters in DBus, or when saving settings using GSettings.

-

When creating a new GVariant, you pass the data you want to store in it -along with a string representing the type of data you wish to pass to it.

-

For instance, if you want to create a GVariant holding an integer value you -can use:

-
- - - - - - - -
1
GVariant *v = g_variant_new ('u', 40);
-
- -

-

The string 'u' in the first argument tells GVariant that the data passed to -the constructor (40) is going to be an unsigned integer.

-

More advanced examples of GVariant in use can be found in documentation for -GVariant format strings.

-

The range of possible values is determined by the type.

-

The type system used by GVariant is GVariantType.

-

GVariant instances always have a type and a value (which are given -at construction time). The type and value of a GVariant instance -can never change other than by the GVariant itself being -destroyed. A GVariant cannot contain a pointer.

-

GVariant is reference counted using g_variant_ref() and -g_variant_unref(). GVariant also has floating reference counts -- -see g_variant_ref_sink().

-

GVariant is completely threadsafe. A GVariant instance can be -concurrently accessed in any way from any number of threads without -problems.

-

GVariant is heavily optimised for dealing with data in serialised -form. It works particularly well with data located in memory-mapped -files. It can perform nearly all deserialisation operations in a -small constant time, usually touching only a single memory page. -Serialised GVariant data can also be sent over the network.

-

GVariant is largely compatible with D-Bus. Almost all types of -GVariant instances can be sent over D-Bus. See GVariantType for -exceptions. (However, GVariant's serialisation format is not the same -as the serialisation format of a D-Bus message body: use GDBusMessage, -in the gio library, for those.)

-

For space-efficiency, the GVariant serialisation format does not -automatically include the variant's length, type or endianness, -which must either be implied from context (such as knowledge that a -particular file format always contains a little-endian -G_VARIANT_TYPE_VARIANT which occupies the whole length of the file) -or supplied out-of-band (for instance, a length, type and/or endianness -indicator could be placed at the beginning of a file, network message -or network stream).

-

A GVariant's size is limited mainly by any lower level operating -system constraints, such as the number of bits in gsize. For -example, it is reasonable to have a 2GB file mapped into memory -with GMappedFile, and call g_variant_new_from_data() on it.

-

For convenience to C programmers, GVariant features powerful -varargs-based value construction and destruction. This feature is -designed to be embedded in other libraries.

-

There is a Python-inspired text language for describing GVariant -values. GVariant includes a printer for this language and a parser -with type inferencing.

-
-

Memory Use

-

GVariant tries to be quite efficient with respect to memory use. -This section gives a rough idea of how much memory is used by the -current implementation. The information here is subject to change -in the future.

-

The memory allocated by GVariant can be grouped into 4 broad -purposes: memory for serialised data, memory for the type -information cache, buffer management memory and memory for the -GVariant structure itself.

-
-
-

Serialised Data Memory

-

This is the memory that is used for storing GVariant data in -serialised form. This is what would be sent over the network or -what would end up on disk, not counting any indicator of the -endianness, or of the length or type of the top-level variant.

-

The amount of memory required to store a boolean is 1 byte. 16, -32 and 64 bit integers and double precision floating point numbers -use their "natural" size. Strings (including object path and -signature strings) are stored with a nul terminator, and as such -use the length of the string plus 1 byte.

-

Maybe types use no space at all to represent the null value and -use the same amount of space (sometimes plus one byte) as the -equivalent non-maybe-typed value to represent the non-null case.

-

Arrays use the amount of space required to store each of their -members, concatenated. Additionally, if the items stored in an -array are not of a fixed-size (ie: strings, other arrays, etc) -then an additional framing offset is stored for each item. The -size of this offset is either 1, 2 or 4 bytes depending on the -overall size of the container. Additionally, extra padding bytes -are added as required for alignment of child values.

-

Tuples (including dictionary entries) use the amount of space -required to store each of their members, concatenated, plus one -framing offset (as per arrays) for each non-fixed-sized item in -the tuple, except for the last one. Additionally, extra padding -bytes are added as required for alignment of child values.

-

Variants use the same amount of space as the item inside of the -variant, plus 1 byte, plus the length of the type string for the -item inside the variant.

-

As an example, consider a dictionary mapping strings to variants. -In the case that the dictionary is empty, 0 bytes are required for -the serialisation.

-

If we add an item "width" that maps to the int32 value of 500 then -we will use 4 byte to store the int32 (so 6 for the variant -containing it) and 6 bytes for the string. The variant must be -aligned to 8 after the 6 bytes of the string, so that's 2 extra -bytes. 6 (string) + 2 (padding) + 6 (variant) is 14 bytes used -for the dictionary entry. An additional 1 byte is added to the -array as a framing offset making a total of 15 bytes.

-

If we add another entry, "title" that maps to a nullable string -that happens to have a value of null, then we use 0 bytes for the -null value (and 3 bytes for the variant to contain it along with -its type string) plus 6 bytes for the string. Again, we need 2 -padding bytes. That makes a total of 6 + 2 + 3 = 11 bytes.

-

We now require extra padding between the two items in the array. -After the 14 bytes of the first item, that's 2 bytes required. -We now require 2 framing offsets for an extra two -bytes. 14 + 2 + 11 + 2 = 29 bytes to encode the entire two-item -dictionary.

-
-
-

Type Information Cache

-

For each GVariant type that currently exists in the program a type -information structure is kept in the type information cache. The -type information structure is required for rapid deserialisation.

-

Continuing with the above example, if a GVariant exists with the -type "a{sv}" then a type information struct will exist for -"a{sv}", "{sv}", "s", and "v". Multiple uses of the same type -will share the same type information. Additionally, all -single-digit types are stored in read-only static memory and do -not contribute to the writable memory footprint of a program using -GVariant.

-

Aside from the type information structures stored in read-only -memory, there are two forms of type information. One is used for -container types where there is a single element type: arrays and -maybe types. The other is used for container types where there -are multiple element types: tuples and dictionary entries.

-

Array type info structures are 6 * sizeof (void *), plus the -memory required to store the type string itself. This means that -on 32-bit systems, the cache entry for "a{sv}" would require 30 -bytes of memory (plus malloc overhead).

-

Tuple type info structures are 6 * sizeof (void *), plus 4 * -sizeof (void *) for each item in the tuple, plus the memory -required to store the type string itself. A 2-item tuple, for -example, would have a type information structure that consumed -writable memory in the size of 14 * sizeof (void *) (plus type -string) This means that on 32-bit systems, the cache entry for -"{sv}" would require 61 bytes of memory (plus malloc overhead).

-

This means that in total, for our "a{sv}" example, 91 bytes of -type information would be allocated.

-

The type information cache, additionally, uses a GHashTable to -store and lookup the cached items and stores a pointer to this -hash table in static storage. The hash table is freed when there -are zero items in the type cache.

-

Although these sizes may seem large it is important to remember -that a program will probably only have a very small number of -different types of values in it and that only one type information -structure is required for many different values of the same type.

-
-
-

Buffer Management Memory

-

GVariant uses an internal buffer management structure to deal -with the various different possible sources of serialised data -that it uses. The buffer is responsible for ensuring that the -correct call is made when the data is no longer in use by -GVariant. This may involve a g_free() or a g_slice_free() or -even g_mapped_file_unref().

-

One buffer management structure is used for each chunk of -serialised data. The size of the buffer management structure -is 4 * (void *). On 32-bit systems, that's 16 bytes.

-
-
-

GVariant structure

-

The size of a GVariant structure is 6 * (void *). On 32-bit -systems, that's 24 bytes.

-

GVariant structures only exist if they are explicitly created -with API calls. For example, if a GVariant is constructed out of -serialised data for the example given above (with the dictionary) -then although there are 9 individual values that comprise the -entire dictionary (two keys, two values, two variants containing -the values, two dictionary entries, plus the dictionary itself), -only 1 GVariant instance exists -- the one referring to the -dictionary.

-

If calls are made to start accessing the other values then -GVariant instances will exist for those values only for as long -as they are in use (ie: until you call g_variant_unref()). The -type information is shared. The serialised data and the buffer -management structure for that serialised data is shared by the -child.

-
-
-

Summary

-

To put the entire example together, for our dictionary mapping -strings to variants (with two entries, as given above), we are -using 91 bytes of memory for type information, 29 byes of memory -for the serialised data, 16 bytes for buffer management and 24 -bytes for the GVariant instance, or a total of 160 bytes, plus -malloc overhead. If we were to use g_variant_get_child_value() to -access the two dictionary entries, we would use an additional 48 -bytes. If we were to have other dictionaries of the same type, we -would use more memory for the serialised data and buffer -management for those dictionaries, but the type information would -be shared.

-
-
-
-

Functions

-
-

g_variant_unref ()

-
void
-g_variant_unref (GVariant *value);
-

Decreases the reference count of value -. When its reference count -drops to 0, the memory used by the variant is freed.

-
-

Parameters

-
----- - - - - - -

value

a GVariant

 
-
-

Since: 2.24

-
-
-
-

g_variant_ref ()

-
GVariant *
-g_variant_ref (GVariant *value);
-

Increases the reference count of value -.

-
-

Parameters

-
----- - - - - - -

value

a GVariant

 
-
-
-

Returns

-

the same value -

-
-

Since: 2.24

-
-
-
-

g_variant_ref_sink ()

-
GVariant *
-g_variant_ref_sink (GVariant *value);
-

GVariant uses a floating reference count system. All functions with -names starting with g_variant_new_ return floating -references.

-

Calling g_variant_ref_sink() on a GVariant with a floating reference -will convert the floating reference into a full reference. Calling -g_variant_ref_sink() on a non-floating GVariant results in an -additional normal reference being added.

-

In other words, if the value - is floating, then this call "assumes -ownership" of the floating reference, converting it to a normal -reference. If the value - is not floating, then this call adds a -new normal reference increasing the reference count by one.

-

All calls that result in a GVariant instance being inserted into a -container will call g_variant_ref_sink() on the instance. This means -that if the value was just created (and has only its floating -reference) then the container will assume sole ownership of the value -at that point and the caller will not need to unreference it. This -makes certain common styles of programming much easier while still -maintaining normal refcounting semantics in situations where values -are not floating.

-
-

Parameters

-
----- - - - - - -

value

a GVariant

 
-
-
-

Returns

-

the same value -

-
-

Since: 2.24

-
-
-
-

g_variant_is_floating ()

-
gboolean
-g_variant_is_floating (GVariant *value);
-

Checks whether value - has a floating reference count.

-

This function should only ever be used to assert that a given variant -is or is not floating, or for debug purposes. To acquire a reference -to a variant that might be floating, always use g_variant_ref_sink() -or g_variant_take_ref().

-

See g_variant_ref_sink() for more information about floating reference -counts.

-
-

Parameters

-
----- - - - - - -

value

a GVariant

 
-
-
-

Returns

-

whether value -is floating

-
-

Since: 2.26

-
-
-
-

g_variant_take_ref ()

-
GVariant *
-g_variant_take_ref (GVariant *value);
-

If value - is floating, sink it. Otherwise, do nothing.

-

Typically you want to use g_variant_ref_sink() in order to -automatically do the correct thing with respect to floating or -non-floating references, but there is one specific scenario where -this function is helpful.

-

The situation where this function is helpful is when creating an API -that allows the user to provide a callback function that returns a -GVariant. We certainly want to allow the user the flexibility to -return a non-floating reference from this callback (for the case -where the value that is being returned already exists).

-

At the same time, the style of the GVariant API makes it likely that -for newly-created GVariant instances, the user can be saved some -typing if they are allowed to return a GVariant with a floating -reference.

-

Using this function on the return value of the user's callback allows -the user to do whichever is more convenient for them. The caller -will alway receives exactly one full reference to the value: either -the one that was returned in the first place, or a floating reference -that has been converted to a full reference.

-

This function has an odd interaction when combined with -g_variant_ref_sink() running at the same time in another thread on -the same GVariant instance. If g_variant_ref_sink() runs first then -the result will be that the floating reference is converted to a hard -reference. If g_variant_take_ref() runs first then the result will -be that the floating reference is converted to a hard reference and -an additional reference on top of that one is added. It is best to -avoid this situation.

-
-

Parameters

-
----- - - - - - -

value

a GVariant

 
-
-
-

Returns

-

the same value -

-
-
-
-
-

g_variant_get_type ()

-
const GVariantType *
-g_variant_get_type (GVariant *value);
-

Determines the type of value -.

-

The return value is valid for the lifetime of value - and must not -be freed.

-
-

Parameters

-
----- - - - - - -

value

a GVariant

 
-
-
-

Returns

-

a GVariantType

-
-

Since: 2.24

-
-
-
-

g_variant_get_type_string ()

-
const gchar *
-g_variant_get_type_string (GVariant *value);
-

Returns the type string of value -. Unlike the result of calling -g_variant_type_peek_string(), this string is nul-terminated. This -string belongs to GVariant and must not be freed.

-
-

Parameters

-
----- - - - - - -

value

a GVariant

 
-
-
-

Returns

-

the type string for the type of value -

-
-

Since: 2.24

-
-
-
-

g_variant_is_of_type ()

-
gboolean
-g_variant_is_of_type (GVariant *value,
-                      const GVariantType *type);
-

Checks if a value has a type matching the provided type.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a GVariant instance

 

type

a GVariantType

 
-
-
-

Returns

-

TRUE if the type of value -matches type -

-
-

Since: 2.24

-
-
-
-

g_variant_is_container ()

-
gboolean
-g_variant_is_container (GVariant *value);
-

Checks if value - is a container.

-
-

Parameters

-
----- - - - - - -

value

a GVariant instance

 
-
-
-

Returns

-

TRUE if value -is a container

-
-

Since: 2.24

-
-
-
-

g_variant_compare ()

-
gint
-g_variant_compare (gconstpointer one,
-                   gconstpointer two);
-

Compares one - and two -.

-

The types of one - and two - are gconstpointer only to allow use of -this function with GTree, GPtrArray, etc. They must each be a -GVariant.

-

Comparison is only defined for basic types (ie: booleans, numbers, -strings). For booleans, FALSE is less than TRUE. Numbers are -ordered in the usual way. Strings are in ASCII lexographical order.

-

It is a programmer error to attempt to compare container values or -two values that have types that are not exactly equal. For example, -you cannot compare a 32-bit signed integer with a 32-bit unsigned -integer. Also note that this function is not particularly -well-behaved when it comes to comparison of doubles; in particular, -the handling of incomparable values (ie: NaN) is undefined.

-

If you only require an equality comparison, g_variant_equal() is more -general.

-
-

Parameters

-
----- - - - - - - - - - - - - -

one

a basic-typed GVariant instance.

[type GVariant]

two

a GVariant instance of the same type.

[type GVariant]
-
-
-

Returns

-

negative value if a < b; -zero if a = b; -positive value if a > b.

-
-

Since: 2.26

-
-
-
-

g_variant_classify ()

-
GVariantClass
-g_variant_classify (GVariant *value);
-

Classifies value - according to its top-level type.

-
-

Parameters

-
----- - - - - - -

value

a GVariant

 
-
-
-

Returns

-

the GVariantClass of value -

-
-

Since: 2.24

-
-
-
-

g_variant_check_format_string ()

-
gboolean
-g_variant_check_format_string (GVariant *value,
-                               const gchar *format_string,
-                               gboolean copy_only);
-

Checks if calling g_variant_get() with format_string - on value - would -be valid from a type-compatibility standpoint. format_string - is -assumed to be a valid format string (from a syntactic standpoint).

-

If copy_only - is TRUE then this function additionally checks that it -would be safe to call g_variant_unref() on value - immediately after -the call to g_variant_get() without invalidating the result. This is -only possible if deep copies are made (ie: there are no pointers to -the data inside of the soon-to-be-freed GVariant instance). If this -check fails then a g_critical() is printed and FALSE is returned.

-

This function is meant to be used by functions that wish to provide -varargs accessors to GVariant values of uncertain values (eg: -g_variant_lookup() or g_menu_model_get_item_attribute()).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

value

a GVariant

 

format_string

a valid GVariant format string

 

copy_only

TRUE to ensure the format string makes deep copies

 
-
-
-

Returns

-

TRUE if format_string -is safe to use

-
-

Since: 2.34

-
-
-
-

g_variant_get ()

-
void
-g_variant_get (GVariant *value,
-               const gchar *format_string,
-               ...);
-

Deconstructs a GVariant instance.

-

Think of this function as an analogue to scanf().

-

The arguments that are expected by this function are entirely -determined by format_string -. format_string - also restricts the -permissible types of value -. It is an error to give a value with -an incompatible type. See the section on -GVariant format strings. -Please note that the syntax of the format string is very likely to be -extended in the future.

-

format_string - determines the C types that are used for unpacking -the values and also determines if the values are copied or borrowed, -see the section on -GVariant format strings.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

value

a GVariant instance

 

format_string

a GVariant format string

 

...

arguments, as per format_string -

 
-
-

Since: 2.24

-
-
-
-

g_variant_get_va ()

-
void
-g_variant_get_va (GVariant *value,
-                  const gchar *format_string,
-                  const gchar **endptr,
-                  va_list *app);
-

This function is intended to be used by libraries based on GVariant -that want to provide g_variant_get()-like functionality to their -users.

-

The API is more general than g_variant_get() to allow a wider range -of possible uses.

-

format_string - must still point to a valid format string, but it only -need to be nul-terminated if endptr - is NULL. If endptr - is -non-NULL then it is updated to point to the first character past the -end of the format string.

-

app - is a pointer to a va_list. The arguments, according to -format_string -, are collected from this va_list and the list is left -pointing to the argument following the last.

-

These two generalisations allow mixing of multiple calls to -g_variant_new_va() and g_variant_get_va() within a single actual -varargs call by the user.

-

format_string - determines the C types that are used for unpacking -the values and also determines if the values are copied or borrowed, -see the section on -GVariant format strings.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

value

a GVariant

 

format_string

a string that is prefixed with a format string

 

endptr

location to store the end pointer, -or NULL.

[nullable][default NULL]

app

a pointer to a va_list

 
-
-

Since: 2.24

-
-
-
-

g_variant_new ()

-
GVariant *
-g_variant_new (const gchar *format_string,
-               ...);
-

Creates a new GVariant instance.

-

Think of this function as an analogue to g_strdup_printf().

-

The type of the created instance and the arguments that are expected -by this function are determined by format_string -. See the section on -GVariant format strings. Please note that -the syntax of the format string is very likely to be extended in the -future.

-

The first character of the format string must not be '*' '?' '@' or -'r'; in essence, a new GVariant must always be constructed by this -function (and not merely passed through it unmodified).

-

Note that the arguments must be of the correct width for their types -specified in format_string -. This can be achieved by casting them. See -the GVariant varargs documentation.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
MyFlags some_flags = FLAG_ONE | FLAG_TWO;
-const gchar *some_strings[] = { "a", "b", "c", NULL };
-GVariant *new_variant;
-
-new_variant = g_variant_new ("(t^as)",
-                             /<!-- -->* This cast is required. *<!-- -->/
-                             (guint64) some_flags,
-                             some_strings);
-
- -

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

format_string

a GVariant format string

 

...

arguments, as per format_string -

 
-
-
-

Returns

-

a new floating GVariant instance

-
-

Since: 2.24

-
-
-
-

g_variant_new_va ()

-
GVariant *
-g_variant_new_va (const gchar *format_string,
-                  const gchar **endptr,
-                  va_list *app);
-

This function is intended to be used by libraries based on -GVariant that want to provide g_variant_new()-like functionality -to their users.

-

The API is more general than g_variant_new() to allow a wider range -of possible uses.

-

format_string - must still point to a valid format string, but it only -needs to be nul-terminated if endptr - is NULL. If endptr - is -non-NULL then it is updated to point to the first character past the -end of the format string.

-

app - is a pointer to a va_list. The arguments, according to -format_string -, are collected from this va_list and the list is left -pointing to the argument following the last.

-

Note that the arguments in app - must be of the correct width for their -types specified in format_string - when collected into the va_list. -See the [GVariant varargs documentation][gvariant-varargs.

-

These two generalisations allow mixing of multiple calls to -g_variant_new_va() and g_variant_get_va() within a single actual -varargs call by the user.

-

The return value will be floating if it was a newly created GVariant -instance (for example, if the format string was "(ii)"). In the case -that the format_string was '*', '?', 'r', or a format starting with -'@' then the collected GVariant pointer will be returned unmodified, -without adding any additional references.

-

In order to behave correctly in all cases it is necessary for the -calling function to g_variant_ref_sink() the return result before -returning control to the user that originally provided the pointer. -At this point, the caller will have their own full reference to the -result. This can also be done by adding the result to a container, -or by passing it to another g_variant_new() call.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

format_string

a string that is prefixed with a format string

 

endptr

location to store the end pointer, -or NULL.

[nullable][default NULL]

app

a pointer to a va_list

 
-
-
-

Returns

-

a new, usually floating, GVariant

-
-

Since: 2.24

-
-
-
-

g_variant_new_boolean ()

-
GVariant *
-g_variant_new_boolean (gboolean value);
-

Creates a new boolean GVariant instance -- either TRUE or FALSE.

-
-

Parameters

-
----- - - - - - -

value

a gboolean value

 
-
-
-

Returns

-

a floating reference to a new boolean GVariant instance.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_byte ()

-
GVariant *
-g_variant_new_byte (guchar value);
-

Creates a new byte GVariant instance.

-
-

Parameters

-
----- - - - - - -

value

a guint8 value

 
-
-
-

Returns

-

a floating reference to a new byte GVariant instance.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_int16 ()

-
GVariant *
-g_variant_new_int16 (gint16 value);
-

Creates a new int16 GVariant instance.

-
-

Parameters

-
----- - - - - - -

value

a gint16 value

 
-
-
-

Returns

-

a floating reference to a new int16 GVariant instance.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_uint16 ()

-
GVariant *
-g_variant_new_uint16 (guint16 value);
-

Creates a new uint16 GVariant instance.

-
-

Parameters

-
----- - - - - - -

value

a guint16 value

 
-
-
-

Returns

-

a floating reference to a new uint16 GVariant instance.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_int32 ()

-
GVariant *
-g_variant_new_int32 (gint32 value);
-

Creates a new int32 GVariant instance.

-
-

Parameters

-
----- - - - - - -

value

a gint32 value

 
-
-
-

Returns

-

a floating reference to a new int32 GVariant instance.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_uint32 ()

-
GVariant *
-g_variant_new_uint32 (guint32 value);
-

Creates a new uint32 GVariant instance.

-
-

Parameters

-
----- - - - - - -

value

a guint32 value

 
-
-
-

Returns

-

a floating reference to a new uint32 GVariant instance.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_int64 ()

-
GVariant *
-g_variant_new_int64 (gint64 value);
-

Creates a new int64 GVariant instance.

-
-

Parameters

-
----- - - - - - -

value

a gint64 value

 
-
-
-

Returns

-

a floating reference to a new int64 GVariant instance.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_uint64 ()

-
GVariant *
-g_variant_new_uint64 (guint64 value);
-

Creates a new uint64 GVariant instance.

-
-

Parameters

-
----- - - - - - -

value

a guint64 value

 
-
-
-

Returns

-

a floating reference to a new uint64 GVariant instance.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_handle ()

-
GVariant *
-g_variant_new_handle (gint32 value);
-

Creates a new handle GVariant instance.

-

By convention, handles are indexes into an array of file descriptors -that are sent alongside a D-Bus message. If you're not interacting -with D-Bus, you probably don't need them.

-
-

Parameters

-
----- - - - - - -

value

a gint32 value

 
-
-
-

Returns

-

a floating reference to a new handle GVariant instance.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_double ()

-
GVariant *
-g_variant_new_double (gdouble value);
-

Creates a new double GVariant instance.

-
-

Parameters

-
----- - - - - - -

value

a gdouble floating point value

 
-
-
-

Returns

-

a floating reference to a new double GVariant instance.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_string ()

-
GVariant *
-g_variant_new_string (const gchar *string);
-

Creates a string GVariant with the contents of string -.

-

string - must be valid UTF-8, and must not be NULL. To encode -potentially-NULL strings, use g_variant_new() with ms as the -format string.

-
-

Parameters

-
----- - - - - - -

string

a normal UTF-8 nul-terminated string

 
-
-
-

Returns

-

a floating reference to a new string GVariant instance.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_take_string ()

-
GVariant *
-g_variant_new_take_string (gchar *string);
-

Creates a string GVariant with the contents of string -.

-

string - must be valid UTF-8, and must not be NULL. To encode -potentially-NULL strings, use this with g_variant_new_maybe().

-

This function consumes string -. g_free() will be called on string - -when it is no longer required.

-

You must not modify or access string - in any other way after passing -it to this function. It is even possible that string - is immediately -freed.

-

[skip]

-
-

Parameters

-
----- - - - - - -

string

a normal UTF-8 nul-terminated string

 
-
-
-

Returns

-

a floating reference to a new string -GVariant instance.

-

[transfer none]

-
-

Since: 2.38

-
-
-
-

g_variant_new_printf ()

-
GVariant *
-g_variant_new_printf (const gchar *format_string,
-                      ...);
-

Creates a string-type GVariant using printf formatting.

-

This is similar to calling g_strdup_printf() and then -g_variant_new_string() but it saves a temporary variable and an -unnecessary copy.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

format_string

a printf-style format string

 

...

arguments for format_string -

 
-
-
-

Returns

-

a floating reference to a new string -GVariant instance.

-

[transfer none]

-
-

Since: 2.38

-
-
-
-

g_variant_new_object_path ()

-
GVariant *
-g_variant_new_object_path (const gchar *object_path);
-

Creates a D-Bus object path GVariant with the contents of string -. -string - must be a valid D-Bus object path. Use -g_variant_is_object_path() if you're not sure.

-
-

Parameters

-
----- - - - - - -

object_path

a normal C nul-terminated string

 
-
-
-

Returns

-

a floating reference to a new object path GVariant instance.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_is_object_path ()

-
gboolean
-g_variant_is_object_path (const gchar *string);
-

Determines if a given string is a valid D-Bus object path. You -should ensure that a string is a valid D-Bus object path before -passing it to g_variant_new_object_path().

-

A valid object path starts with '/' followed by zero or more -sequences of characters separated by '/' characters. Each sequence -must contain only the characters "A-Z[0-9]_". No sequence -(including the one following the final '/' character) may be empty.

-
-

Parameters

-
----- - - - - - -

string

a normal C nul-terminated string

 
-
-
-

Returns

-

TRUE if string -is a D-Bus object path

-
-

Since: 2.24

-
-
-
-

g_variant_new_signature ()

-
GVariant *
-g_variant_new_signature (const gchar *signature);
-

Creates a D-Bus type signature GVariant with the contents of -string -. string - must be a valid D-Bus type signature. Use -g_variant_is_signature() if you're not sure.

-
-

Parameters

-
----- - - - - - -

signature

a normal C nul-terminated string

 
-
-
-

Returns

-

a floating reference to a new signature GVariant instance.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_is_signature ()

-
gboolean
-g_variant_is_signature (const gchar *string);
-

Determines if a given string is a valid D-Bus type signature. You -should ensure that a string is a valid D-Bus type signature before -passing it to g_variant_new_signature().

-

D-Bus type signatures consist of zero or more definite GVariantType -strings in sequence.

-
-

Parameters

-
----- - - - - - -

string

a normal C nul-terminated string

 
-
-
-

Returns

-

TRUE if string -is a D-Bus type signature

-
-

Since: 2.24

-
-
-
-

g_variant_new_variant ()

-
GVariant *
-g_variant_new_variant (GVariant *value);
-

Boxes value -. The result is a GVariant instance representing a -variant containing the original value.

-

If child - is a floating reference (see g_variant_ref_sink()), the new -instance takes ownership of child -.

-

[constructor]

-
-

Parameters

-
----- - - - - - -

value

a GVariant instance

 
-
-
-

Returns

-

a floating reference to a new variant GVariant instance.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_strv ()

-
GVariant *
-g_variant_new_strv (const gchar * const *strv,
-                    gssize length);
-

Constructs an array of strings GVariant from the given array of -strings.

-

If length - is -1 then strv - is NULL-terminated.

-
-

Parameters

-
----- - - - - - - - - - - - - -

strv

an array of strings.

[array length=length][element-type utf8]

length

the length of strv -, or -1

 
-
-
-

Returns

-

a new floating GVariant instance.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_objv ()

-
GVariant *
-g_variant_new_objv (const gchar * const *strv,
-                    gssize length);
-

Constructs an array of object paths GVariant from the given array of -strings.

-

Each string must be a valid GVariant object path; see -g_variant_is_object_path().

-

If length - is -1 then strv - is NULL-terminated.

-
-

Parameters

-
----- - - - - - - - - - - - - -

strv

an array of strings.

[array length=length][element-type utf8]

length

the length of strv -, or -1

 
-
-
-

Returns

-

a new floating GVariant instance.

-

[transfer none]

-
-

Since: 2.30

-
-
-
-

g_variant_new_bytestring ()

-
GVariant *
-g_variant_new_bytestring (const gchar *string);
-

Creates an array-of-bytes GVariant with the contents of string -. -This function is just like g_variant_new_string() except that the -string need not be valid UTF-8.

-

The nul terminator character at the end of the string is stored in -the array.

-
-

Parameters

-
----- - - - - - -

string

a normal -nul-terminated string in no particular encoding.

[array zero-terminated=1][element-type guint8]
-
-
-

Returns

-

a floating reference to a new bytestring GVariant instance.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_variant_new_bytestring_array ()

-
GVariant *
-g_variant_new_bytestring_array (const gchar * const *strv,
-                                gssize length);
-

Constructs an array of bytestring GVariant from the given array of -strings.

-

If length - is -1 then strv - is NULL-terminated.

-
-

Parameters

-
----- - - - - - - - - - - - - -

strv

an array of strings.

[array length=length]

length

the length of strv -, or -1

 
-
-
-

Returns

-

a new floating GVariant instance.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_variant_get_boolean ()

-
gboolean
-g_variant_get_boolean (GVariant *value);
-

Returns the boolean value of value -.

-

It is an error to call this function with a value - of any type -other than G_VARIANT_TYPE_BOOLEAN.

-
-

Parameters

-
----- - - - - - -

value

a boolean GVariant instance

 
-
-
-

Returns

-

TRUE or FALSE

-
-

Since: 2.24

-
-
-
-

g_variant_get_byte ()

-
guchar
-g_variant_get_byte (GVariant *value);
-

Returns the byte value of value -.

-

It is an error to call this function with a value - of any type -other than G_VARIANT_TYPE_BYTE.

-
-

Parameters

-
----- - - - - - -

value

a byte GVariant instance

 
-
-
-

Returns

-

a guchar

-
-

Since: 2.24

-
-
-
-

g_variant_get_int16 ()

-
gint16
-g_variant_get_int16 (GVariant *value);
-

Returns the 16-bit signed integer value of value -.

-

It is an error to call this function with a value - of any type -other than G_VARIANT_TYPE_INT16.

-
-

Parameters

-
----- - - - - - -

value

a int16 GVariant instance

 
-
-
-

Returns

-

a gint16

-
-

Since: 2.24

-
-
-
-

g_variant_get_uint16 ()

-
guint16
-g_variant_get_uint16 (GVariant *value);
-

Returns the 16-bit unsigned integer value of value -.

-

It is an error to call this function with a value - of any type -other than G_VARIANT_TYPE_UINT16.

-
-

Parameters

-
----- - - - - - -

value

a uint16 GVariant instance

 
-
-
-

Returns

-

a guint16

-
-

Since: 2.24

-
-
-
-

g_variant_get_int32 ()

-
gint32
-g_variant_get_int32 (GVariant *value);
-

Returns the 32-bit signed integer value of value -.

-

It is an error to call this function with a value - of any type -other than G_VARIANT_TYPE_INT32.

-
-

Parameters

-
----- - - - - - -

value

a int32 GVariant instance

 
-
-
-

Returns

-

a gint32

-
-

Since: 2.24

-
-
-
-

g_variant_get_uint32 ()

-
guint32
-g_variant_get_uint32 (GVariant *value);
-

Returns the 32-bit unsigned integer value of value -.

-

It is an error to call this function with a value - of any type -other than G_VARIANT_TYPE_UINT32.

-
-

Parameters

-
----- - - - - - -

value

a uint32 GVariant instance

 
-
-
-

Returns

-

a guint32

-
-

Since: 2.24

-
-
-
-

g_variant_get_int64 ()

-
gint64
-g_variant_get_int64 (GVariant *value);
-

Returns the 64-bit signed integer value of value -.

-

It is an error to call this function with a value - of any type -other than G_VARIANT_TYPE_INT64.

-
-

Parameters

-
----- - - - - - -

value

a int64 GVariant instance

 
-
-
-

Returns

-

a gint64

-
-

Since: 2.24

-
-
-
-

g_variant_get_uint64 ()

-
guint64
-g_variant_get_uint64 (GVariant *value);
-

Returns the 64-bit unsigned integer value of value -.

-

It is an error to call this function with a value - of any type -other than G_VARIANT_TYPE_UINT64.

-
-

Parameters

-
----- - - - - - -

value

a uint64 GVariant instance

 
-
-
-

Returns

-

a guint64

-
-

Since: 2.24

-
-
-
-

g_variant_get_handle ()

-
gint32
-g_variant_get_handle (GVariant *value);
-

Returns the 32-bit signed integer value of value -.

-

It is an error to call this function with a value - of any type other -than G_VARIANT_TYPE_HANDLE.

-

By convention, handles are indexes into an array of file descriptors -that are sent alongside a D-Bus message. If you're not interacting -with D-Bus, you probably don't need them.

-
-

Parameters

-
----- - - - - - -

value

a handle GVariant instance

 
-
-
-

Returns

-

a gint32

-
-

Since: 2.24

-
-
-
-

g_variant_get_double ()

-
gdouble
-g_variant_get_double (GVariant *value);
-

Returns the double precision floating point value of value -.

-

It is an error to call this function with a value - of any type -other than G_VARIANT_TYPE_DOUBLE.

-
-

Parameters

-
----- - - - - - -

value

a double GVariant instance

 
-
-
-

Returns

-

a gdouble

-
-

Since: 2.24

-
-
-
-

g_variant_get_string ()

-
const gchar *
-g_variant_get_string (GVariant *value,
-                      gsize *length);
-

Returns the string value of a GVariant instance with a string -type. This includes the types G_VARIANT_TYPE_STRING, -G_VARIANT_TYPE_OBJECT_PATH and G_VARIANT_TYPE_SIGNATURE.

-

The string will always be UTF-8 encoded, and will never be NULL.

-

If length - is non-NULL then the length of the string (in bytes) is -returned there. For trusted values, this information is already -known. For untrusted values, a strlen() will be performed.

-

It is an error to call this function with a value - of any type -other than those three.

-

The return value remains valid as long as value - exists.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a string GVariant instance

 

length

a pointer to a gsize, -to store the length.

[optional][default 0][out]
-
-
-

Returns

-

the constant string, UTF-8 encoded.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_dup_string ()

-
gchar *
-g_variant_dup_string (GVariant *value,
-                      gsize *length);
-

Similar to g_variant_get_string() except that instead of returning -a constant string, the string is duplicated.

-

The string will always be UTF-8 encoded.

-

The return value must be freed using g_free().

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a string GVariant instance

 

length

a pointer to a gsize, to store the length.

[out]
-
-
-

Returns

-

a newly allocated string, UTF-8 encoded.

-

[transfer full]

-
-

Since: 2.24

-
-
-
-

g_variant_get_variant ()

-
GVariant *
-g_variant_get_variant (GVariant *value);
-

Unboxes value -. The result is the GVariant instance that was -contained in value -.

-
-

Parameters

-
----- - - - - - -

value

a variant GVariant instance

 
-
-
-

Returns

-

the item contained in the variant.

-

[transfer full]

-
-

Since: 2.24

-
-
-
-

g_variant_get_strv ()

-
const gchar **
-g_variant_get_strv (GVariant *value,
-                    gsize *length);
-

Gets the contents of an array of strings GVariant. This call -makes a shallow copy; the return result should be released with -g_free(), but the individual strings must not be modified.

-

If length - is non-NULL then the number of elements in the result -is stored there. In any case, the resulting array will be -NULL-terminated.

-

For an empty array, length - will be set to 0 and a pointer to a -NULL pointer will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

an array of strings GVariant

 

length

the length of the result, or NULL.

[out][optional]
-
-
-

Returns

-

an array of constant strings.

-

[array length=length zero-terminated=1][transfer container]

-
-

Since: 2.24

-
-
-
-

g_variant_dup_strv ()

-
gchar **
-g_variant_dup_strv (GVariant *value,
-                    gsize *length);
-

Gets the contents of an array of strings GVariant. This call -makes a deep copy; the return result should be released with -g_strfreev().

-

If length - is non-NULL then the number of elements in the result -is stored there. In any case, the resulting array will be -NULL-terminated.

-

For an empty array, length - will be set to 0 and a pointer to a -NULL pointer will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

an array of strings GVariant

 

length

the length of the result, or NULL.

[out][optional]
-
-
-

Returns

-

an array of strings.

-

[array length=length zero-terminated=1][transfer full]

-
-

Since: 2.24

-
-
-
-

g_variant_get_objv ()

-
const gchar **
-g_variant_get_objv (GVariant *value,
-                    gsize *length);
-

Gets the contents of an array of object paths GVariant. This call -makes a shallow copy; the return result should be released with -g_free(), but the individual strings must not be modified.

-

If length - is non-NULL then the number of elements in the result -is stored there. In any case, the resulting array will be -NULL-terminated.

-

For an empty array, length - will be set to 0 and a pointer to a -NULL pointer will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

an array of object paths GVariant

 

length

the length of the result, or NULL.

[out][optional]
-
-
-

Returns

-

an array of constant strings.

-

[array length=length zero-terminated=1][transfer container]

-
-

Since: 2.30

-
-
-
-

g_variant_dup_objv ()

-
gchar **
-g_variant_dup_objv (GVariant *value,
-                    gsize *length);
-

Gets the contents of an array of object paths GVariant. This call -makes a deep copy; the return result should be released with -g_strfreev().

-

If length - is non-NULL then the number of elements in the result -is stored there. In any case, the resulting array will be -NULL-terminated.

-

For an empty array, length - will be set to 0 and a pointer to a -NULL pointer will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

an array of object paths GVariant

 

length

the length of the result, or NULL.

[out][optional]
-
-
-

Returns

-

an array of strings.

-

[array length=length zero-terminated=1][transfer full]

-
-

Since: 2.30

-
-
-
-

g_variant_get_bytestring ()

-
const gchar *
-g_variant_get_bytestring (GVariant *value);
-

Returns the string value of a GVariant instance with an -array-of-bytes type. The string has no particular encoding.

-

If the array does not end with a nul terminator character, the empty -string is returned. For this reason, you can always trust that a -non-NULL nul-terminated string will be returned by this function.

-

If the array contains a nul terminator character somewhere other than -the last byte then the returned string is the string, up to the first -such nul character.

-

g_variant_get_fixed_array() should be used instead if the array contains -arbitrary data that could not be nul-terminated or could contain nul bytes.

-

It is an error to call this function with a value - that is not an -array of bytes.

-

The return value remains valid as long as value - exists.

-
-

Parameters

-
----- - - - - - -

value

an array-of-bytes GVariant instance

 
-
-
-

Returns

-

the constant string.

-

[transfer none][array zero-terminated=1][element-type guint8]

-
-

Since: 2.26

-
-
-
-

g_variant_dup_bytestring ()

-
gchar *
-g_variant_dup_bytestring (GVariant *value,
-                          gsize *length);
-

Similar to g_variant_get_bytestring() except that instead of -returning a constant string, the string is duplicated.

-

The return value must be freed using g_free().

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

an array-of-bytes GVariant instance

 

length

a pointer to a gsize, to store -the length (not including the nul terminator).

[out][optional][default NULL]
-
-
-

Returns

-

a newly allocated string.

-

[transfer full][array zero-terminated=1 length=length][element-type guint8]

-
-

Since: 2.26

-
-
-
-

g_variant_get_bytestring_array ()

-
const gchar **
-g_variant_get_bytestring_array (GVariant *value,
-                                gsize *length);
-

Gets the contents of an array of array of bytes GVariant. This call -makes a shallow copy; the return result should be released with -g_free(), but the individual strings must not be modified.

-

If length - is non-NULL then the number of elements in the result is -stored there. In any case, the resulting array will be -NULL-terminated.

-

For an empty array, length - will be set to 0 and a pointer to a -NULL pointer will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

an array of array of bytes GVariant ('aay')

 

length

the length of the result, or NULL.

[out][optional]
-
-
-

Returns

-

an array of constant strings.

-

[array length=length][transfer container]

-
-

Since: 2.26

-
-
-
-

g_variant_dup_bytestring_array ()

-
gchar **
-g_variant_dup_bytestring_array (GVariant *value,
-                                gsize *length);
-

Gets the contents of an array of array of bytes GVariant. This call -makes a deep copy; the return result should be released with -g_strfreev().

-

If length - is non-NULL then the number of elements in the result is -stored there. In any case, the resulting array will be -NULL-terminated.

-

For an empty array, length - will be set to 0 and a pointer to a -NULL pointer will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

an array of array of bytes GVariant ('aay')

 

length

the length of the result, or NULL.

[out][optional]
-
-
-

Returns

-

an array of strings.

-

[array length=length][transfer full]

-
-

Since: 2.26

-
-
-
-

g_variant_new_maybe ()

-
GVariant *
-g_variant_new_maybe (const GVariantType *child_type,
-                     GVariant *child);
-

Depending on if child - is NULL, either wraps child - inside of a -maybe container or creates a Nothing instance for the given type -.

-

At least one of child_type - and child - must be non-NULL. -If child_type - is non-NULL then it must be a definite type. -If they are both non-NULL then child_type - must be the type -of child -.

-

If child - is a floating reference (see g_variant_ref_sink()), the new -instance takes ownership of child -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

child_type

the GVariantType of the child, or NULL.

[nullable]

child

the child value, or NULL.

[nullable]
-
-
-

Returns

-

a floating reference to a new GVariant maybe instance.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_array ()

-
GVariant *
-g_variant_new_array (const GVariantType *child_type,
-                     GVariant * const *children,
-                     gsize n_children);
-

Creates a new GVariant array from children -.

-

child_type - must be non-NULL if n_children - is zero. Otherwise, the -child type is determined by inspecting the first element of the -children - array. If child_type - is non-NULL then it must be a -definite type.

-

The items of the array are taken from the children - array. No entry -in the children - array may be NULL.

-

All items in the array must have the same type, which must be the -same as child_type -, if given.

-

If the children - are floating references (see g_variant_ref_sink()), the -new instance takes ownership of them as if via g_variant_ref_sink().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

child_type

the element type of the new array.

[nullable]

children

an array of -GVariant pointers, the children.

[nullable][array length=n_children]

n_children

the length of children -

 
-
-
-

Returns

-

a floating reference to a new GVariant array.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_tuple ()

-
GVariant *
-g_variant_new_tuple (GVariant * const *children,
-                     gsize n_children);
-

Creates a new tuple GVariant out of the items in children -. The -type is determined from the types of children -. No entry in the -children - array may be NULL.

-

If n_children - is 0 then the unit tuple is constructed.

-

If the children - are floating references (see g_variant_ref_sink()), the -new instance takes ownership of them as if via g_variant_ref_sink().

-
-

Parameters

-
----- - - - - - - - - - - - - -

children

the items to make the tuple out of.

[array length=n_children]

n_children

the length of children -

 
-
-
-

Returns

-

a floating reference to a new GVariant tuple.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_dict_entry ()

-
GVariant *
-g_variant_new_dict_entry (GVariant *key,
-                          GVariant *value);
-

Creates a new dictionary entry GVariant. key - and value - must be -non-NULL. key - must be a value of a basic type (ie: not a container).

-

If the key - or value - are floating references (see g_variant_ref_sink()), -the new instance takes ownership of them as if via g_variant_ref_sink().

-

[constructor]

-
-

Parameters

-
----- - - - - - - - - - - - - -

key

a basic GVariant, the key

 

value

a GVariant, the value

 
-
-
-

Returns

-

a floating reference to a new dictionary entry GVariant.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_fixed_array ()

-
GVariant *
-g_variant_new_fixed_array (const GVariantType *element_type,
-                           gconstpointer elements,
-                           gsize n_elements,
-                           gsize element_size);
-

Provides access to the serialised data for an array of fixed-sized -items.

-

value - must be an array with fixed-sized elements. Numeric types are -fixed-size as are tuples containing only other fixed-sized types.

-

element_size - must be the size of a single element in the array. -For example, if calling this function for an array of 32-bit integers, -you might say sizeof(gint32). This value isn't used except for the purpose -of a double-check that the form of the serialised data matches the caller's -expectation.

-

n_elements -, which must be non-NULL is set equal to the number of -items in the array.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

element_type

the GVariantType of each element

 

elements

a pointer to the fixed array of contiguous elements

 

n_elements

the number of elements

 

element_size

the size of each element

 
-
-
-

Returns

-

a floating reference to a new array GVariant instance.

-

[transfer none]

-
-

Since: 2.32

-
-
-
-

g_variant_get_maybe ()

-
GVariant *
-g_variant_get_maybe (GVariant *value);
-

Given a maybe-typed GVariant instance, extract its value. If the -value is Nothing, then this function returns NULL.

-
-

Parameters

-
----- - - - - - -

value

a maybe-typed value

 
-
-
-

Returns

-

the contents of value -, or NULL.

-

[nullable][transfer full]

-
-

Since: 2.24

-
-
-
-

g_variant_n_children ()

-
gsize
-g_variant_n_children (GVariant *value);
-

Determines the number of children in a container GVariant instance. -This includes variants, maybes, arrays, tuples and dictionary -entries. It is an error to call this function on any other type of -GVariant.

-

For variants, the return value is always 1. For values with maybe -types, it is always zero or one. For arrays, it is the length of the -array. For tuples it is the number of tuple items (which depends -only on the type). For dictionary entries, it is always 2

-

This function is O(1).

-
-

Parameters

-
----- - - - - - -

value

a container GVariant

 
-
-
-

Returns

-

the number of children in the container

-
-

Since: 2.24

-
-
-
-

g_variant_get_child_value ()

-
GVariant *
-g_variant_get_child_value (GVariant *value,
-                           gsize index_);
-

Reads a child item out of a container GVariant instance. This -includes variants, maybes, arrays, tuples and dictionary -entries. It is an error to call this function on any other type of -GVariant.

-

It is an error if index_ - is greater than the number of child items -in the container. See g_variant_n_children().

-

The returned value is never floating. You should free it with -g_variant_unref() when you're done with it.

-

This function is O(1).

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a container GVariant

 

index_

the index of the child to fetch

 
-
-
-

Returns

-

the child at the specified index.

-

[transfer full]

-
-

Since: 2.24

-
-
-
-

g_variant_get_child ()

-
void
-g_variant_get_child (GVariant *value,
-                     gsize index_,
-                     const gchar *format_string,
-                     ...);
-

Reads a child item out of a container GVariant instance and -deconstructs it according to format_string -. This call is -essentially a combination of g_variant_get_child_value() and -g_variant_get().

-

format_string - determines the C types that are used for unpacking -the values and also determines if the values are copied or borrowed, -see the section on -GVariant format strings.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

value

a container GVariant

 

index_

the index of the child to deconstruct

 

format_string

a GVariant format string

 

...

arguments, as per format_string -

 
-
-

Since: 2.24

-
-
-
-

g_variant_lookup_value ()

-
GVariant *
-g_variant_lookup_value (GVariant *dictionary,
-                        const gchar *key,
-                        const GVariantType *expected_type);
-

Looks up a value in a dictionary GVariant.

-

This function works with dictionaries of the type a{s*} (and equally -well with type a{o*}, but we only further discuss the string case -for sake of clarity).

-

In the event that dictionary - has the type a{sv}, the expected_type - -string specifies what type of value is expected to be inside of the -variant. If the value inside the variant has a different type then -NULL is returned. In the event that dictionary - has a value type other -than v then expected_type - must directly match the key type and it is -used to unpack the value directly or an error occurs.

-

In either case, if key - is not found in dictionary -, NULL is returned.

-

If the key is found and the value has the correct type, it is -returned. If expected_type - was specified then any non-NULL return -value will have this type.

-

This function is currently implemented with a linear scan. If you -plan to do many lookups then GVariantDict may be more efficient.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dictionary

a dictionary GVariant

 

key

the key to lookup in the dictionary

 

expected_type

a GVariantType, or NULL.

[nullable]
-
-
-

Returns

-

the value of the dictionary key, or NULL.

-

[transfer full]

-
-

Since: 2.28

-
-
-
-

g_variant_lookup ()

-
gboolean
-g_variant_lookup (GVariant *dictionary,
-                  const gchar *key,
-                  const gchar *format_string,
-                  ...);
-

Looks up a value in a dictionary GVariant.

-

This function is a wrapper around g_variant_lookup_value() and -g_variant_get(). In the case that NULL would have been returned, -this function returns FALSE. Otherwise, it unpacks the returned -value and returns TRUE.

-

format_string - determines the C types that are used for unpacking -the values and also determines if the values are copied or borrowed, -see the section on -GVariant format strings.

-

This function is currently implemented with a linear scan. If you -plan to do many lookups then GVariantDict may be more efficient.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

dictionary

a dictionary GVariant

 

key

the key to lookup in the dictionary

 

format_string

a GVariant format string

 

...

the arguments to unpack the value into

 
-
-
-

Returns

-

TRUE if a value was unpacked

-
-

Since: 2.28

-
-
-
-

g_variant_get_fixed_array ()

-
gconstpointer
-g_variant_get_fixed_array (GVariant *value,
-                           gsize *n_elements,
-                           gsize element_size);
-

Provides access to the serialised data for an array of fixed-sized -items.

-

value - must be an array with fixed-sized elements. Numeric types are -fixed-size, as are tuples containing only other fixed-sized types.

-

element_size - must be the size of a single element in the array, -as given by the section on -serialized data memory.

-

In particular, arrays of these fixed-sized types can be interpreted -as an array of the given C type, with element_size - set to the size -the appropriate type:

- -

For example, if calling this function for an array of 32-bit integers, -you might say sizeof(gint32). This value isn't used except for the purpose -of a double-check that the form of the serialised data matches the caller's -expectation.

-

n_elements -, which must be non-NULL, is set equal to the number of -items in the array.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

value

a GVariant array with fixed-sized elements

 

n_elements

a pointer to the location to store the number of items.

[out]

element_size

the size of each element

 
-
-
-

Returns

-

a pointer to -the fixed array.

-

[array length=n_elements][transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_get_size ()

-
gsize
-g_variant_get_size (GVariant *value);
-

Determines the number of bytes that would be required to store value - -with g_variant_store().

-

If value - has a fixed-sized type then this function always returned -that fixed size.

-

In the case that value - is already in serialised form or the size has -already been calculated (ie: this function has been called before) -then this function is O(1). Otherwise, the size is calculated, an -operation which is approximately O(n) in the number of values -involved.

-
-

Parameters

-
----- - - - - - -

value

a GVariant instance

 
-
-
-

Returns

-

the serialised size of value -

-
-

Since: 2.24

-
-
-
-

g_variant_get_data ()

-
gconstpointer
-g_variant_get_data (GVariant *value);
-

Returns a pointer to the serialised form of a GVariant instance. -The returned data may not be in fully-normalised form if read from an -untrusted source. The returned data must not be freed; it remains -valid for as long as value - exists.

-

If value - is a fixed-sized value that was deserialised from a -corrupted serialised container then NULL may be returned. In this -case, the proper thing to do is typically to use the appropriate -number of nul bytes in place of value -. If value - is not fixed-sized -then NULL is never returned.

-

In the case that value - is already in serialised form, this function -is O(1). If the value is not already in serialised form, -serialisation occurs implicitly and is approximately O(n) in the size -of the result.

-

To deserialise the data returned by this function, in addition to the -serialised data, you must know the type of the GVariant, and (if the -machine might be different) the endianness of the machine that stored -it. As a result, file formats or network messages that incorporate -serialised GVariants must include this information either -implicitly (for instance "the file always contains a -G_VARIANT_TYPE_VARIANT and it is always in little-endian order") or -explicitly (by storing the type and/or endianness in addition to the -serialised data).

-
-

Parameters

-
----- - - - - - -

value

a GVariant instance

 
-
-
-

Returns

-

the serialised form of value -, or NULL.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_get_data_as_bytes ()

-
GBytes *
-g_variant_get_data_as_bytes (GVariant *value);
-

Returns a pointer to the serialised form of a GVariant instance. -The semantics of this function are exactly the same as -g_variant_get_data(), except that the returned GBytes holds -a reference to the variant data.

-
-

Parameters

-
----- - - - - - -

value

a GVariant

 
-
-
-

Returns

-

A new GBytes representing the variant data.

-

[transfer full]

-
-

Since: 2.36

-
-
-
-

g_variant_store ()

-
void
-g_variant_store (GVariant *value,
-                 gpointer data);
-

Stores the serialised form of value - at data -. data - should be -large enough. See g_variant_get_size().

-

The stored data is in machine native byte order but may not be in -fully-normalised form if read from an untrusted source. See -g_variant_get_normal_form() for a solution.

-

As with g_variant_get_data(), to be able to deserialise the -serialised variant successfully, its type and (if the destination -machine might be different) its endianness must also be available.

-

This function is approximately O(n) in the size of data -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

the GVariant to store

 

data

the location to store the serialised data at.

[not nullable]
-
-

Since: 2.24

-
-
-
-

g_variant_new_from_data ()

-
GVariant *
-g_variant_new_from_data (const GVariantType *type,
-                         gconstpointer data,
-                         gsize size,
-                         gboolean trusted,
-                         GDestroyNotify notify,
-                         gpointer user_data);
-

Creates a new GVariant instance from serialised data.

-

type - is the type of GVariant instance that will be constructed. -The interpretation of data - depends on knowing the type.

-

data - is not modified by this function and must remain valid with an -unchanging value until such a time as notify - is called with -user_data -. If the contents of data - change before that time then -the result is undefined.

-

If data - is trusted to be serialised data in normal form then -trusted - should be TRUE. This applies to serialised data created -within this process or read from a trusted location on the disk (such -as a file installed in /usr/lib alongside your application). You -should set trusted to FALSE if data - is read from the network, a -file in the user's home directory, etc.

-

If data - was not stored in this machine's native endianness, any multi-byte -numeric values in the returned variant will also be in non-native -endianness. g_variant_byteswap() can be used to recover the original values.

-

notify - will be called with user_data - when data - is no longer -needed. The exact time of this call is unspecified and might even be -before this function returns.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

type

a definite GVariantType

 

data

the serialised data.

[array length=size][element-type guint8]

size

the size of data -

 

trusted

TRUE if data -is definitely in normal form

 

notify

function to call when data -is no longer needed.

[scope async]

user_data

data for notify -

 
-
-
-

Returns

-

a new floating GVariant of type type -.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_new_from_bytes ()

-
GVariant *
-g_variant_new_from_bytes (const GVariantType *type,
-                          GBytes *bytes,
-                          gboolean trusted);
-

Constructs a new serialised-mode GVariant instance. This is the -inner interface for creation of new serialised values that gets -called from various functions in gvariant.c.

-

A reference is taken on bytes -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

type

a GVariantType

 

bytes

a GBytes

 

trusted

if the contents of bytes -are trusted

 
-
-
-

Returns

-

a new GVariant with a floating reference.

-

[transfer none]

-
-

Since: 2.36

-
-
-
-

g_variant_byteswap ()

-
GVariant *
-g_variant_byteswap (GVariant *value);
-

Performs a byteswapping operation on the contents of value -. The -result is that all multi-byte numeric data contained in value - is -byteswapped. That includes 16, 32, and 64bit signed and unsigned -integers as well as file handles and double precision floating point -values.

-

This function is an identity mapping on any value that does not -contain multi-byte numeric data. That include strings, booleans, -bytes and containers containing only these things (recursively).

-

The returned value is always in normal form and is marked as trusted.

-
-

Parameters

-
----- - - - - - -

value

a GVariant

 
-
-
-

Returns

-

the byteswapped form of value -.

-

[transfer full]

-
-

Since: 2.24

-
-
-
-

g_variant_get_normal_form ()

-
GVariant *
-g_variant_get_normal_form (GVariant *value);
-

Gets a GVariant instance that has the same value as value - and is -trusted to be in normal form.

-

If value - is already trusted to be in normal form then a new -reference to value - is returned.

-

If value - is not already trusted, then it is scanned to check if it -is in normal form. If it is found to be in normal form then it is -marked as trusted and a new reference to it is returned.

-

If value - is found not to be in normal form then a new trusted -GVariant is created with the same value as value -.

-

It makes sense to call this function if you've received GVariant -data from untrusted sources and you want to ensure your serialised -output is definitely in normal form.

-
-

Parameters

-
----- - - - - - -

value

a GVariant

 
-
-
-

Returns

-

a trusted GVariant.

-

[transfer full]

-
-

Since: 2.24

-
-
-
-

g_variant_is_normal_form ()

-
gboolean
-g_variant_is_normal_form (GVariant *value);
-

Checks if value - is in normal form.

-

The main reason to do this is to detect if a given chunk of -serialised data is in normal form: load the data into a GVariant -using g_variant_new_from_data() and then use this function to -check.

-

If value - is found to be in normal form then it will be marked as -being trusted. If the value was already marked as being trusted then -this function will immediately return TRUE.

-
-

Parameters

-
----- - - - - - -

value

a GVariant instance

 
-
-
-

Returns

-

TRUE if value -is in normal form

-
-

Since: 2.24

-
-
-
-

g_variant_hash ()

-
guint
-g_variant_hash (gconstpointer value);
-

Generates a hash value for a GVariant instance.

-

The output of this function is guaranteed to be the same for a given -value only per-process. It may change between different processor -architectures or even different versions of GLib. Do not use this -function as a basis for building protocols or file formats.

-

The type of value - is gconstpointer only to allow use of this -function with GHashTable. value - must be a GVariant.

-
-

Parameters

-
----- - - - - - -

value

a basic GVariant value as a gconstpointer.

[type GVariant]
-
-
-

Returns

-

a hash value corresponding to value -

-
-

Since: 2.24

-
-
-
-

g_variant_equal ()

-
gboolean
-g_variant_equal (gconstpointer one,
-                 gconstpointer two);
-

Checks if one - and two - have the same type and value.

-

The types of one - and two - are gconstpointer only to allow use of -this function with GHashTable. They must each be a GVariant.

-
-

Parameters

-
----- - - - - - - - - - - - - -

one

a GVariant instance.

[type GVariant]

two

a GVariant instance.

[type GVariant]
-
-
-

Returns

-

TRUE if one -and two -are equal

-
-

Since: 2.24

-
-
-
-

g_variant_print ()

-
gchar *
-g_variant_print (GVariant *value,
-                 gboolean type_annotate);
-

Pretty-prints value - in the format understood by g_variant_parse().

-

The format is described here.

-

If type_annotate - is TRUE, then type information is included in -the output.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a GVariant

 

type_annotate

TRUE if type information should be included in -the output

 
-
-
-

Returns

-

a newly-allocated string holding the result.

-

[transfer full]

-
-

Since: 2.24

-
-
-
-

g_variant_print_string ()

-
GString *
-g_variant_print_string (GVariant *value,
-                        GString *string,
-                        gboolean type_annotate);
-

Behaves as g_variant_print(), but operates on a GString.

-

If string - is non-NULL then it is appended to and returned. Else, -a new empty GString is allocated and it is returned.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

value

a GVariant

 

string

a GString, or NULL.

[nullable][default NULL]

type_annotate

TRUE if type information should be included in -the output

 
-
-
-

Returns

-

a GString containing the string

-
-

Since: 2.24

-
-
-
-

g_variant_iter_copy ()

-
GVariantIter *
-g_variant_iter_copy (GVariantIter *iter);
-

Creates a new heap-allocated GVariantIter to iterate over the -container that was being iterated over by iter -. Iteration begins on -the new iterator from the current position of the old iterator but -the two copies are independent past that point.

-

Use g_variant_iter_free() to free the return value when you no longer -need it.

-

A reference is taken to the container that iter - is iterating over -and will be releated only when g_variant_iter_free() is called.

-
-

Parameters

-
----- - - - - - -

iter

a GVariantIter

 
-
-
-

Returns

-

a new heap-allocated GVariantIter.

-

[transfer full]

-
-

Since: 2.24

-
-
-
-

g_variant_iter_free ()

-
void
-g_variant_iter_free (GVariantIter *iter);
-

Frees a heap-allocated GVariantIter. Only call this function on -iterators that were returned by g_variant_iter_new() or -g_variant_iter_copy().

-
-

Parameters

-
----- - - - - - -

iter

a heap-allocated GVariantIter.

[transfer full]
-
-

Since: 2.24

-
-
-
-

g_variant_iter_init ()

-
gsize
-g_variant_iter_init (GVariantIter *iter,
-                     GVariant *value);
-

Initialises (without allocating) a GVariantIter. iter - may be -completely uninitialised prior to this call; its old value is -ignored.

-

The iterator remains valid for as long as value - exists, and need not -be freed in any way.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

iter

a pointer to a GVariantIter

 

value

a container GVariant

 
-
-
-

Returns

-

the number of items in value -

-
-

Since: 2.24

-
-
-
-

g_variant_iter_n_children ()

-
gsize
-g_variant_iter_n_children (GVariantIter *iter);
-

Queries the number of child items in the container that we are -iterating over. This is the total number of items -- not the number -of items remaining.

-

This function might be useful for preallocation of arrays.

-
-

Parameters

-
----- - - - - - -

iter

a GVariantIter

 
-
-
-

Returns

-

the number of children in the container

-
-

Since: 2.24

-
-
-
-

g_variant_iter_new ()

-
GVariantIter *
-g_variant_iter_new (GVariant *value);
-

Creates a heap-allocated GVariantIter for iterating over the items -in value -.

-

Use g_variant_iter_free() to free the return value when you no longer -need it.

-

A reference is taken to value - and will be released only when -g_variant_iter_free() is called.

-
-

Parameters

-
----- - - - - - -

value

a container GVariant

 
-
-
-

Returns

-

a new heap-allocated GVariantIter.

-

[transfer full]

-
-

Since: 2.24

-
-
-
-

g_variant_iter_next_value ()

-
GVariant *
-g_variant_iter_next_value (GVariantIter *iter);
-

Gets the next item in the container. If no more items remain then -NULL is returned.

-

Use g_variant_unref() to drop your reference on the return value when -you no longer need it.

-

Here is an example for iterating with g_variant_iter_next_value():

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
// recursively iterate a container
-void
-iterate_container_recursive (GVariant *container)
-{
-  GVariantIter iter;
-  GVariant *child;
-
-  g_variant_iter_init (&iter, container);
-  while ((child = g_variant_iter_next_value (&iter)))
-    {
-      g_print ("type '%s'\n", g_variant_get_type_string (child));
-
-      if (g_variant_is_container (child))
-        iterate_container_recursive (child);
-
-      g_variant_unref (child);
-    }
-}
-
- -

-
-

Parameters

-
----- - - - - - -

iter

a GVariantIter

 
-
-
-

Returns

-

a GVariant, or NULL.

-

[nullable][transfer full]

-
-

Since: 2.24

-
-
-
-

g_variant_iter_next ()

-
gboolean
-g_variant_iter_next (GVariantIter *iter,
-                     const gchar *format_string,
-                     ...);
-

Gets the next item in the container and unpacks it into the variable -argument list according to format_string -, returning TRUE.

-

If no more items remain then FALSE is returned.

-

All of the pointers given on the variable arguments list of this -function are assumed to point at uninitialised memory. It is the -responsibility of the caller to free all of the values returned by -the unpacking process.

-

Here is an example for memory management with g_variant_iter_next():

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
// Iterates a dictionary of type 'a{sv}'
-void
-iterate_dictionary (GVariant *dictionary)
-{
-  GVariantIter iter;
-  GVariant *value;
-  gchar *key;
-
-  g_variant_iter_init (&iter, dictionary);
-  while (g_variant_iter_next (&iter, "{sv}", &key, &value))
-    {
-      g_print ("Item '%s' has type '%s'\n", key,
-               g_variant_get_type_string (value));
-
-      // must free data for ourselves
-      g_variant_unref (value);
-      g_free (key);
-    }
-}
-
- -

-

For a solution that is likely to be more convenient to C programmers -when dealing with loops, see g_variant_iter_loop().

-

format_string - determines the C types that are used for unpacking -the values and also determines if the values are copied or borrowed.

-

See the section on -GVariant format strings.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

iter

a GVariantIter

 

format_string

a GVariant format string

 

...

the arguments to unpack the value into

 
-
-
-

Returns

-

TRUE if a value was unpacked, or FALSE if there as no value

-
-

Since: 2.24

-
-
-
-

g_variant_iter_loop ()

-
gboolean
-g_variant_iter_loop (GVariantIter *iter,
-                     const gchar *format_string,
-                     ...);
-

Gets the next item in the container and unpacks it into the variable -argument list according to format_string -, returning TRUE.

-

If no more items remain then FALSE is returned.

-

On the first call to this function, the pointers appearing on the -variable argument list are assumed to point at uninitialised memory. -On the second and later calls, it is assumed that the same pointers -will be given and that they will point to the memory as set by the -previous call to this function. This allows the previous values to -be freed, as appropriate.

-

This function is intended to be used with a while loop as -demonstrated in the following example. This function can only be -used when iterating over an array. It is only valid to call this -function with a string constant for the format string and the same -string constant must be used each time. Mixing calls to this -function and g_variant_iter_next() or g_variant_iter_next_value() on -the same iterator causes undefined behavior.

-

If you break out of a such a while loop using g_variant_iter_loop() then -you must free or unreference all the unpacked values as you would with -g_variant_get(). Failure to do so will cause a memory leak.

-

Here is an example for memory management with g_variant_iter_loop():

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
// Iterates a dictionary of type 'a{sv}'
-void
-iterate_dictionary (GVariant *dictionary)
-{
-  GVariantIter iter;
-  GVariant *value;
-  gchar *key;
-
-  g_variant_iter_init (&iter, dictionary);
-  while (g_variant_iter_loop (&iter, "{sv}", &key, &value))
-    {
-      g_print ("Item '%s' has type '%s'\n", key,
-               g_variant_get_type_string (value));
-
-      // no need to free 'key' and 'value' here
-      // unless breaking out of this loop
-    }
-}
-
- -

-

For most cases you should use g_variant_iter_next().

-

This function is really only useful when unpacking into GVariant or -GVariantIter in order to allow you to skip the call to -g_variant_unref() or g_variant_iter_free().

-

For example, if you are only looping over simple integer and string -types, g_variant_iter_next() is definitely preferred. For string -types, use the '&' prefix to avoid allocating any memory at all (and -thereby avoiding the need to free anything as well).

-

format_string - determines the C types that are used for unpacking -the values and also determines if the values are copied or borrowed.

-

See the section on -GVariant format strings.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

iter

a GVariantIter

 

format_string

a GVariant format string

 

...

the arguments to unpack the value into

 
-
-
-

Returns

-

TRUE if a value was unpacked, or FALSE if there was no -value

-
-

Since: 2.24

-
-
-
-

G_VARIANT_BUILDER_INIT()

-
#define G_VARIANT_BUILDER_INIT(variant_type) { { { 2942751021u, variant_type, { 0, } } } }
-
-

A stack-allocated GVariantBuilder must be initialized if it is -used together with g_auto() to avoid warnings or crashes if -function returns before g_variant_builder_init() is called on the -builder. This macro can be used as initializer instead of an -explicit zeroing a variable when declaring it and a following -g_variant_builder_init(), but it cannot be assigned to a variable.

-

The passed variant_type - should be a static GVariantType to avoid -lifetime issues, as copying the variant_type - does not happen in -the G_VARIANT_BUILDER_INIT() call, but rather in functions that -make sure that GVariantBuilder is valid.

-
- - - - - - - -
1
g_auto(GVariantBuilder) builder = G_VARIANT_BUILDER_INIT (G_VARIANT_TYPE_BYTESTRING);
-
- -

-
-

Parameters

-
----- - - - - - -

variant_type

a const GVariantType*

 
-
-

Since: 2.50

-
-
-
-

g_variant_builder_unref ()

-
void
-g_variant_builder_unref (GVariantBuilder *builder);
-

Decreases the reference count on builder -.

-

In the event that there are no more references, releases all memory -associated with the GVariantBuilder.

-

Don't call this on stack-allocated GVariantBuilder instances or bad -things will happen.

-
-

Parameters

-
----- - - - - - -

builder

a GVariantBuilder allocated by g_variant_builder_new().

[transfer full]
-
-

Since: 2.24

-
-
-
-

g_variant_builder_ref ()

-
GVariantBuilder *
-g_variant_builder_ref (GVariantBuilder *builder);
-

Increases the reference count on builder -.

-

Don't call this on stack-allocated GVariantBuilder instances or bad -things will happen.

-
-

Parameters

-
----- - - - - - -

builder

a GVariantBuilder allocated by g_variant_builder_new()

 
-
-
-

Returns

-

a new reference to builder -.

-

[transfer full]

-
-

Since: 2.24

-
-
-
-

g_variant_builder_new ()

-
GVariantBuilder *
-g_variant_builder_new (const GVariantType *type);
-

Allocates and initialises a new GVariantBuilder.

-

You should call g_variant_builder_unref() on the return value when it -is no longer needed. The memory will not be automatically freed by -any other call.

-

In most cases it is easier to place a GVariantBuilder directly on -the stack of the calling function and initialise it with -g_variant_builder_init().

-
-

Parameters

-
----- - - - - - -

type

a container type

 
-
-
-

Returns

-

a GVariantBuilder.

-

[transfer full]

-
-

Since: 2.24

-
-
-
-

g_variant_builder_init ()

-
void
-g_variant_builder_init (GVariantBuilder *builder,
-                        const GVariantType *type);
-

Initialises a GVariantBuilder structure.

-

type - must be non-NULL. It specifies the type of container to -construct. It can be an indefinite type such as -G_VARIANT_TYPE_ARRAY or a definite type such as "as" or "(ii)". -Maybe, array, tuple, dictionary entry and variant-typed values may be -constructed.

-

After the builder is initialised, values are added using -g_variant_builder_add_value() or g_variant_builder_add().

-

After all the child values are added, g_variant_builder_end() frees -the memory associated with the builder and returns the GVariant that -was created.

-

This function completely ignores the previous contents of builder -. -On one hand this means that it is valid to pass in completely -uninitialised memory. On the other hand, this means that if you are -initialising over top of an existing GVariantBuilder you need to -first call g_variant_builder_clear() in order to avoid leaking -memory.

-

You must not call g_variant_builder_ref() or -g_variant_builder_unref() on a GVariantBuilder that was initialised -with this function. If you ever pass a reference to a -GVariantBuilder outside of the control of your own code then you -should assume that the person receiving that reference may try to use -reference counting; you should use g_variant_builder_new() instead of -this function.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

builder

a GVariantBuilder

 

type

a container type

 
-
-

Since: 2.24

-
-
-
-

g_variant_builder_clear ()

-
void
-g_variant_builder_clear (GVariantBuilder *builder);
-

Releases all memory associated with a GVariantBuilder without -freeing the GVariantBuilder structure itself.

-

It typically only makes sense to do this on a stack-allocated -GVariantBuilder if you want to abort building the value part-way -through. This function need not be called if you call -g_variant_builder_end() and it also doesn't need to be called on -builders allocated with g_variant_builder_new (see -g_variant_builder_unref() for that).

-

This function leaves the GVariantBuilder structure set to all-zeros. -It is valid to call this function on either an initialised -GVariantBuilder or one that is set to all-zeros but it is not valid -to call this function on uninitialised memory.

-

[skip]

-
-

Parameters

-
----- - - - - - -

builder

a GVariantBuilder

 
-
-

Since: 2.24

-
-
-
-

g_variant_builder_add_value ()

-
void
-g_variant_builder_add_value (GVariantBuilder *builder,
-                             GVariant *value);
-

Adds value - to builder -.

-

It is an error to call this function in any way that would create an -inconsistent value to be constructed. Some examples of this are -putting different types of items into an array, putting the wrong -types or number of items in a tuple, putting more than one value into -a variant, etc.

-

If value - is a floating reference (see g_variant_ref_sink()), -the builder - instance takes ownership of value -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

builder

a GVariantBuilder

 

value

a GVariant

 
-
-

Since: 2.24

-
-
-
-

g_variant_builder_add ()

-
void
-g_variant_builder_add (GVariantBuilder *builder,
-                       const gchar *format_string,
-                       ...);
-

Adds to a GVariantBuilder.

-

This call is a convenience wrapper that is exactly equivalent to -calling g_variant_new() followed by g_variant_builder_add_value().

-

Note that the arguments must be of the correct width for their types -specified in format_string -. This can be achieved by casting them. See -the GVariant varargs documentation.

-

This function might be used as follows:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
GVariant *
-make_pointless_dictionary (void)
-{
-  GVariantBuilder builder;
-  int i;
-
-  g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY);
-  for (i = 0; i < 16; i++)
-    {
-      gchar buf[3];
-
-      sprintf (buf, "%d", i);
-      g_variant_builder_add (&builder, "{is}", i, buf);
-    }
-
-  return g_variant_builder_end (&builder);
-}
-
- -

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

builder

a GVariantBuilder

 

format_string

a GVariant varargs format string

 

...

arguments, as per format_string -

 
-
-

Since: 2.24

-
-
-
-

g_variant_builder_add_parsed ()

-
void
-g_variant_builder_add_parsed (GVariantBuilder *builder,
-                              const gchar *format,
-                              ...);
-

Adds to a GVariantBuilder.

-

This call is a convenience wrapper that is exactly equivalent to -calling g_variant_new_parsed() followed by -g_variant_builder_add_value().

-

Note that the arguments must be of the correct width for their types -specified in format_string -. This can be achieved by casting them. See -the GVariant varargs documentation.

-

This function might be used as follows:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
GVariant *
-make_pointless_dictionary (void)
-{
-  GVariantBuilder builder;
-  int i;
-
-  g_variant_builder_init (&builder, G_VARIANT_TYPE_ARRAY);
-  g_variant_builder_add_parsed (&builder, "{'width', <%i>}", 600);
-  g_variant_builder_add_parsed (&builder, "{'title', <%s>}", "foo");
-  g_variant_builder_add_parsed (&builder, "{'transparency', <0.5>}");
-  return g_variant_builder_end (&builder);
-}
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

builder

a GVariantBuilder

 

format

a text format GVariant

 

...

arguments as per format -

 
-
-

Since: 2.26

-
-
-
-

g_variant_builder_end ()

-
GVariant *
-g_variant_builder_end (GVariantBuilder *builder);
-

Ends the builder process and returns the constructed value.

-

It is not permissible to use builder - in any way after this call -except for reference counting operations (in the case of a -heap-allocated GVariantBuilder) or by reinitialising it with -g_variant_builder_init() (in the case of stack-allocated). This -means that for the stack-allocated builders there is no need to -call g_variant_builder_clear() after the call to -g_variant_builder_end().

-

It is an error to call this function in any way that would create an -inconsistent value to be constructed (ie: insufficient number of -items added to a container with a specific number of children -required). It is also an error to call this function if the builder -was created with an indefinite array or maybe type and no children -have been added; in this case it is impossible to infer the type of -the empty array.

-
-

Parameters

-
----- - - - - - -

builder

a GVariantBuilder

 
-
-
-

Returns

-

a new, floating, GVariant.

-

[transfer none]

-
-

Since: 2.24

-
-
-
-

g_variant_builder_open ()

-
void
-g_variant_builder_open (GVariantBuilder *builder,
-                        const GVariantType *type);
-

Opens a subcontainer inside the given builder -. When done adding -items to the subcontainer, g_variant_builder_close() must be called. type - -is the type of the container: so to build a tuple of several values, type - -must include the tuple itself.

-

It is an error to call this function in any way that would cause an -inconsistent value to be constructed (ie: adding too many values or -a value of an incorrect type).

-

Example of building a nested variant:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
GVariantBuilder builder;
-guint32 some_number = get_number ();
-g_autoptr (GHashTable) some_dict = get_dict ();
-GHashTableIter iter;
-const gchar *key;
-const GVariant *value;
-g_autoptr (GVariant) output = NULL;
-
-g_variant_builder_init (&builder, G_VARIANT_TYPE ("(ua{sv})"));
-g_variant_builder_add (&builder, "u", some_number);
-g_variant_builder_open (&builder, G_VARIANT_TYPE ("a{sv}"));
-
-g_hash_table_iter_init (&iter, some_dict);
-while (g_hash_table_iter_next (&iter, (gpointer *) &key, (gpointer *) &value))
-  {
-    g_variant_builder_open (&builder, G_VARIANT_TYPE ("{sv}"));
-    g_variant_builder_add (&builder, "s", key);
-    g_variant_builder_add (&builder, "v", value);
-    g_variant_builder_close (&builder);
-  }
-
-g_variant_builder_close (&builder);
-
-output = g_variant_builder_end (&builder);
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

builder

a GVariantBuilder

 

type

the GVariantType of the container

 
-
-

Since: 2.24

-
-
-
-

g_variant_builder_close ()

-
void
-g_variant_builder_close (GVariantBuilder *builder);
-

Closes the subcontainer inside the given builder - that was opened by -the most recent call to g_variant_builder_open().

-

It is an error to call this function in any way that would create an -inconsistent value to be constructed (ie: too few values added to the -subcontainer).

-
-

Parameters

-
----- - - - - - -

builder

a GVariantBuilder

 
-
-

Since: 2.24

-
-
-
-

g_variant_dict_unref ()

-
void
-g_variant_dict_unref (GVariantDict *dict);
-

Decreases the reference count on dict -.

-

In the event that there are no more references, releases all memory -associated with the GVariantDict.

-

Don't call this on stack-allocated GVariantDict instances or bad -things will happen.

-
-

Parameters

-
----- - - - - - -

dict

a heap-allocated GVariantDict.

[transfer full]
-
-

Since: 2.40

-
-
-
-

g_variant_dict_ref ()

-
GVariantDict *
-g_variant_dict_ref (GVariantDict *dict);
-

Increases the reference count on dict -.

-

Don't call this on stack-allocated GVariantDict instances or bad -things will happen.

-
-

Parameters

-
----- - - - - - -

dict

a heap-allocated GVariantDict

 
-
-
-

Returns

-

a new reference to dict -.

-

[transfer full]

-
-

Since: 2.40

-
-
-
-

g_variant_dict_new ()

-
GVariantDict *
-g_variant_dict_new (GVariant *from_asv);
-

Allocates and initialises a new GVariantDict.

-

You should call g_variant_dict_unref() on the return value when it -is no longer needed. The memory will not be automatically freed by -any other call.

-

In some cases it may be easier to place a GVariantDict directly on -the stack of the calling function and initialise it with -g_variant_dict_init(). This is particularly useful when you are -using GVariantDict to construct a GVariant.

-
-

Parameters

-
----- - - - - - -

from_asv

the GVariant with which to initialise the -dictionary.

[nullable]
-
-
-

Returns

-

a GVariantDict.

-

[transfer full]

-
-

Since: 2.40

-
-
-
-

g_variant_dict_init ()

-
void
-g_variant_dict_init (GVariantDict *dict,
-                     GVariant *from_asv);
-

Initialises a GVariantDict structure.

-

If from_asv - is given, it is used to initialise the dictionary.

-

This function completely ignores the previous contents of dict -. On -one hand this means that it is valid to pass in completely -uninitialised memory. On the other hand, this means that if you are -initialising over top of an existing GVariantDict you need to first -call g_variant_dict_clear() in order to avoid leaking memory.

-

You must not call g_variant_dict_ref() or g_variant_dict_unref() on a -GVariantDict that was initialised with this function. If you ever -pass a reference to a GVariantDict outside of the control of your -own code then you should assume that the person receiving that -reference may try to use reference counting; you should use -g_variant_dict_new() instead of this function.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

dict

a GVariantDict

 

from_asv

the initial value for dict -.

[nullable]
-
-

Since: 2.40

-
-
-
-

g_variant_dict_clear ()

-
void
-g_variant_dict_clear (GVariantDict *dict);
-

Releases all memory associated with a GVariantDict without freeing -the GVariantDict structure itself.

-

It typically only makes sense to do this on a stack-allocated -GVariantDict if you want to abort building the value part-way -through. This function need not be called if you call -g_variant_dict_end() and it also doesn't need to be called on dicts -allocated with g_variant_dict_new (see g_variant_dict_unref() for -that).

-

It is valid to call this function on either an initialised -GVariantDict or one that was previously cleared by an earlier call -to g_variant_dict_clear() but it is not valid to call this function -on uninitialised memory.

-
-

Parameters

-
----- - - - - - -

dict

a GVariantDict

 
-
-

Since: 2.40

-
-
-
-

g_variant_dict_contains ()

-
gboolean
-g_variant_dict_contains (GVariantDict *dict,
-                         const gchar *key);
-

Checks if key - exists in dict -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dict

a GVariantDict

 

key

the key to lookup in the dictionary

 
-
-
-

Returns

-

TRUE if key -is in dict -

-
-

Since: 2.40

-
-
-
-

g_variant_dict_lookup ()

-
gboolean
-g_variant_dict_lookup (GVariantDict *dict,
-                       const gchar *key,
-                       const gchar *format_string,
-                       ...);
-

Looks up a value in a GVariantDict.

-

This function is a wrapper around g_variant_dict_lookup_value() and -g_variant_get(). In the case that NULL would have been returned, -this function returns FALSE. Otherwise, it unpacks the returned -value and returns TRUE.

-

format_string - determines the C types that are used for unpacking the -values and also determines if the values are copied or borrowed, see the -section on GVariant format strings.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

dict

a GVariantDict

 

key

the key to lookup in the dictionary

 

format_string

a GVariant format string

 

...

the arguments to unpack the value into

 
-
-
-

Returns

-

TRUE if a value was unpacked

-
-

Since: 2.40

-
-
-
-

g_variant_dict_lookup_value ()

-
GVariant *
-g_variant_dict_lookup_value (GVariantDict *dict,
-                             const gchar *key,
-                             const GVariantType *expected_type);
-

Looks up a value in a GVariantDict.

-

If key - is not found in dictionary -, NULL is returned.

-

The expected_type - string specifies what type of value is expected. -If the value associated with key - has a different type then NULL is -returned.

-

If the key is found and the value has the correct type, it is -returned. If expected_type - was specified then any non-NULL return -value will have this type.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dict

a GVariantDict

 

key

the key to lookup in the dictionary

 

expected_type

a GVariantType, or NULL.

[nullable]
-
-
-

Returns

-

the value of the dictionary key, or NULL.

-

[transfer full]

-
-

Since: 2.40

-
-
-
-

g_variant_dict_insert ()

-
void
-g_variant_dict_insert (GVariantDict *dict,
-                       const gchar *key,
-                       const gchar *format_string,
-                       ...);
-

Inserts a value into a GVariantDict.

-

This call is a convenience wrapper that is exactly equivalent to -calling g_variant_new() followed by g_variant_dict_insert_value().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

dict

a GVariantDict

 

key

the key to insert a value for

 

format_string

a GVariant varargs format string

 

...

arguments, as per format_string -

 
-
-

Since: 2.40

-
-
-
-

g_variant_dict_insert_value ()

-
void
-g_variant_dict_insert_value (GVariantDict *dict,
-                             const gchar *key,
-                             GVariant *value);
-

Inserts (or replaces) a key in a GVariantDict.

-

value - is consumed if it is floating.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dict

a GVariantDict

 

key

the key to insert a value for

 

value

the value to insert

 
-
-

Since: 2.40

-
-
-
-

g_variant_dict_remove ()

-
gboolean
-g_variant_dict_remove (GVariantDict *dict,
-                       const gchar *key);
-

Removes a key and its associated value from a GVariantDict.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dict

a GVariantDict

 

key

the key to remove

 
-
-
-

Returns

-

TRUE if the key was found and removed

-
-

Since: 2.40

-
-
-
-

g_variant_dict_end ()

-
GVariant *
-g_variant_dict_end (GVariantDict *dict);
-

Returns the current value of dict - as a GVariant of type -G_VARIANT_TYPE_VARDICT, clearing it in the process.

-

It is not permissible to use dict - in any way after this call except -for reference counting operations (in the case of a heap-allocated -GVariantDict) or by reinitialising it with g_variant_dict_init() (in -the case of stack-allocated).

-
-

Parameters

-
----- - - - - - -

dict

a GVariantDict

 
-
-
-

Returns

-

a new, floating, GVariant.

-

[transfer none]

-
-

Since: 2.40

-
-
-
-

g_variant_parse ()

-
GVariant *
-g_variant_parse (const GVariantType *type,
-                 const gchar *text,
-                 const gchar *limit,
-                 const gchar **endptr,
-                 GError **error);
-

Parses a GVariant from a text representation.

-

A single GVariant is parsed from the content of text -.

-

The format is described here.

-

The memory at limit - will never be accessed and the parser behaves as -if the character at limit - is the nul terminator. This has the -effect of bounding text -.

-

If endptr - is non-NULL then text - is permitted to contain data -following the value that this function parses and endptr - will be -updated to point to the first character past the end of the text -parsed by this function. If endptr - is NULL and there is extra data -then an error is returned.

-

If type - is non-NULL then the value will be parsed to have that -type. This may result in additional parse errors (in the case that -the parsed value doesn't fit the type) but may also result in fewer -errors (in the case that the type would have been ambiguous, such as -with empty arrays).

-

In the event that the parsing is successful, the resulting GVariant -is returned. It is never floating, and must be freed with -g_variant_unref().

-

In case of any error, NULL will be returned. If error - is non-NULL -then it will be set to reflect the error that occurred.

-

Officially, the language understood by the parser is "any string -produced by g_variant_print()".

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

type

a GVariantType, or NULL.

[nullable]

text

a string containing a GVariant in text form

 

limit

a pointer to the end of text -, or NULL.

[nullable]

endptr

a location to store the end pointer, or NULL.

[nullable]

error

a pointer to a NULL GError pointer, or NULL.

[nullable]
-
-
-

Returns

-

a non-floating reference to a GVariant, or NULL

-
-
-
-
-

g_variant_new_parsed_va ()

-
GVariant *
-g_variant_new_parsed_va (const gchar *format,
-                         va_list *app);
-

Parses format - and returns the result.

-

This is the version of g_variant_new_parsed() intended to be used -from libraries.

-

The return value will be floating if it was a newly created GVariant -instance. In the case that format - simply specified the collection -of a GVariant pointer (eg: format - was "%*") then the collected -GVariant pointer will be returned unmodified, without adding any -additional references.

-

Note that the arguments in app - must be of the correct width for their types -specified in format - when collected into the va_list. See -the GVariant varargs documentation.

-

In order to behave correctly in all cases it is necessary for the -calling function to g_variant_ref_sink() the return result before -returning control to the user that originally provided the pointer. -At this point, the caller will have their own full reference to the -result. This can also be done by adding the result to a container, -or by passing it to another g_variant_new() call.

-
-

Parameters

-
----- - - - - - - - - - - - - -

format

a text format GVariant

 

app

a pointer to a va_list

 
-
-
-

Returns

-

a new, usually floating, GVariant

-
-
-
-
-

g_variant_new_parsed ()

-
GVariant *
-g_variant_new_parsed (const gchar *format,
-                      ...);
-

Parses format - and returns the result.

-

format - must be a text format GVariant with one extension: at any -point that a value may appear in the text, a '%' character followed -by a GVariant format string (as per g_variant_new()) may appear. In -that case, the same arguments are collected from the argument list as -g_variant_new() would have collected.

-

Note that the arguments must be of the correct width for their types -specified in format -. This can be achieved by casting them. See -the GVariant varargs documentation.

-

Consider this simple example:

-
- - - - - - - -
1
g_variant_new_parsed ("[('one', 1), ('two', %i), (%s, 3)]", 2, "three");
-
- -

-

In the example, the variable argument parameters are collected and -filled in as if they were part of the original string to produce the -result of

-
- - - - - - - -
1
[('one', 1), ('two', 2), ('three', 3)]
-
- -

-

This function is intended only to be used with format - as a string -literal. Any parse error is fatal to the calling process. If you -want to parse data from untrusted sources, use g_variant_parse().

-

You may not use this function to return, unmodified, a single -GVariant pointer from the argument list. ie: format - may not solely -be anything along the lines of "%*", "%?", "%r", or anything starting -with "%@".

-
-

Parameters

-
----- - - - - - - - - - - - - -

format

a text format GVariant

 

...

arguments as per format -

 
-
-
-

Returns

-

a new floating GVariant instance

-
-
-
-
-

g_variant_parse_error_print_context ()

-
gchar *
-g_variant_parse_error_print_context (GError *error,
-                                     const gchar *source_str);
-

Pretty-prints a message showing the context of a GVariant parse -error within the string for which parsing was attempted.

-

The resulting string is suitable for output to the console or other -monospace media where newlines are treated in the usual way.

-

The message will typically look something like one of the following:

-
- - - - - - - -
1
-2
-3
unterminated string constant:
-  (1, 2, 3, 'abc
-            ^^^^
-
- -

-

or

-
- - - - - - - -
1
-2
-3
unable to find a common type:
-  [1, 2, 3, 'str']
-   ^        ^^^^^
-
- -

-

The format of the message may change in a future version.

-

error - must have come from a failed attempt to g_variant_parse() and -source_str - must be exactly the same string that caused the error. -If source_str - was not nul-terminated when you passed it to -g_variant_parse() then you must add nul termination before using this -function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

error

a GError from the GVariantParseError domain

 

source_str

the string that was given to the parser

 
-
-
-

Returns

-

the printed message.

-

[transfer full]

-
-

Since: 2.40

-
-
-
-

Types and Values

-
-

GVariant

-
typedef struct _GVariant GVariant;
-

GVariant is an opaque data structure and can only be accessed -using the following functions.

-

Since: 2.24

-
-
-
-

enum GVariantClass

-

The range of possible top-level types of GVariant instances.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_VARIANT_CLASS_BOOLEAN

-

The GVariant is a boolean.

-
 

G_VARIANT_CLASS_BYTE

-

The GVariant is a byte.

-
 

G_VARIANT_CLASS_INT16

-

The GVariant is a signed 16 bit integer.

-
 

G_VARIANT_CLASS_UINT16

-

The GVariant is an unsigned 16 bit integer.

-
 

G_VARIANT_CLASS_INT32

-

The GVariant is a signed 32 bit integer.

-
 

G_VARIANT_CLASS_UINT32

-

The GVariant is an unsigned 32 bit integer.

-
 

G_VARIANT_CLASS_INT64

-

The GVariant is a signed 64 bit integer.

-
 

G_VARIANT_CLASS_UINT64

-

The GVariant is an unsigned 64 bit integer.

-
 

G_VARIANT_CLASS_HANDLE

-

The GVariant is a file handle index.

-
 

G_VARIANT_CLASS_DOUBLE

-

The GVariant is a double precision floating - point value.

-
 

G_VARIANT_CLASS_STRING

-

The GVariant is a normal string.

-
 

G_VARIANT_CLASS_OBJECT_PATH

-

The GVariant is a D-Bus object path - string.

-
 

G_VARIANT_CLASS_SIGNATURE

-

The GVariant is a D-Bus signature string.

-
 

G_VARIANT_CLASS_VARIANT

-

The GVariant is a variant.

-
 

G_VARIANT_CLASS_MAYBE

-

The GVariant is a maybe-typed value.

-
 

G_VARIANT_CLASS_ARRAY

-

The GVariant is an array.

-
 

G_VARIANT_CLASS_TUPLE

-

The GVariant is a tuple.

-
 

G_VARIANT_CLASS_DICT_ENTRY

-

The GVariant is a dictionary entry.

-
 
-
-

Since: 2.24

-
-
-
-

struct GVariantIter

-
struct GVariantIter {
-};
-
-

GVariantIter is an opaque data structure and can only be accessed -using the following functions.

-
-
-
-

struct GVariantBuilder

-
struct GVariantBuilder {
-};
-
-

A utility type for constructing container-type GVariant instances.

-

This is an opaque structure and may only be accessed using the -following functions.

-

GVariantBuilder is not threadsafe in any way. Do not attempt to -access it from more than one thread.

-
-
-
-

struct GVariantDict

-
struct GVariantDict {
-};
-
-

GVariantDict is a mutable interface to GVariant dictionaries.

-

It can be used for doing a sequence of dictionary lookups in an -efficient way on an existing GVariant dictionary or it can be used -to construct new dictionaries with a hashtable-like interface. It -can also be used for taking existing dictionaries and modifying them -in order to create new ones.

-

GVariantDict can only be used with G_VARIANT_TYPE_VARDICT -dictionaries.

-

It is possible to use GVariantDict allocated on the stack or on the -heap. When using a stack-allocated GVariantDict, you begin with a -call to g_variant_dict_init() and free the resources with a call to -g_variant_dict_clear().

-

Heap-allocated GVariantDict follows normal refcounting rules: you -allocate it with g_variant_dict_new() and use g_variant_dict_ref() -and g_variant_dict_unref().

-

g_variant_dict_end() is used to convert the GVariantDict back into a -dictionary-type GVariant. When used with stack-allocated instances, -this also implicitly frees all associated memory, but for -heap-allocated instances, you must still call g_variant_dict_unref() -afterwards.

-

You will typically want to use a heap-allocated GVariantDict when -you expose it as part of an API. For most other uses, the -stack-allocated form will be more convenient.

-

Consider the following two examples that do the same thing in each -style: take an existing dictionary and look up the "count" uint32 -key, adding 1 to it if it is found, or returning an error if the -key is not found. Each returns the new dictionary as a floating -GVariant.

-
-

Using a stack-allocated GVariantDict

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
GVariant *
-add_to_count (GVariant  *orig,
-              GError   **error)
-{
-  GVariantDict dict;
-  guint32 count;
-
-  g_variant_dict_init (&dict, orig);
-  if (!g_variant_dict_lookup (&dict, "count", "u", &count))
-    {
-      g_set_error (...);
-      g_variant_dict_clear (&dict);
-      return NULL;
-    }
-
-  g_variant_dict_insert (&dict, "count", "u", count + 1);
-
-  return g_variant_dict_end (&dict);
-}
-
- -

-
-
-

Using heap-allocated GVariantDict

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
GVariant *
-add_to_count (GVariant  *orig,
-              GError   **error)
-{
-  GVariantDict *dict;
-  GVariant *result;
-  guint32 count;
-
-  dict = g_variant_dict_new (orig);
-
-  if (g_variant_dict_lookup (dict, "count", "u", &count))
-    {
-      g_variant_dict_insert (dict, "count", "u", count + 1);
-      result = g_variant_dict_end (dict);
-    }
-  else
-    {
-      g_set_error (...);
-      result = NULL;
-    }
-
-  g_variant_dict_unref (dict);
-
-  return result;
-}
-
- -

-
-

Since: 2.40

-
-
-
-

enum GVariantParseError

-

Error codes returned by parsing text-format GVariants.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_VARIANT_PARSE_ERROR_FAILED

-

generic error (unused)

-
 

G_VARIANT_PARSE_ERROR_BASIC_TYPE_EXPECTED

-

a non-basic GVariantType was given where a basic type was expected

-
 

G_VARIANT_PARSE_ERROR_CANNOT_INFER_TYPE

-

cannot infer the GVariantType

-
 

G_VARIANT_PARSE_ERROR_DEFINITE_TYPE_EXPECTED

-

an indefinite GVariantType was given where a definite type was expected

-
 

G_VARIANT_PARSE_ERROR_INPUT_NOT_AT_END

-

extra data after parsing finished

-
 

G_VARIANT_PARSE_ERROR_INVALID_CHARACTER

-

invalid character in number or unicode escape

-
 

G_VARIANT_PARSE_ERROR_INVALID_FORMAT_STRING

-

not a valid GVariant format string

-
 

G_VARIANT_PARSE_ERROR_INVALID_OBJECT_PATH

-

not a valid object path

-
 

G_VARIANT_PARSE_ERROR_INVALID_SIGNATURE

-

not a valid type signature

-
 

G_VARIANT_PARSE_ERROR_INVALID_TYPE_STRING

-

not a valid GVariant type string

-
 

G_VARIANT_PARSE_ERROR_NO_COMMON_TYPE

-

could not find a common type for array entries

-
 

G_VARIANT_PARSE_ERROR_NUMBER_OUT_OF_RANGE

-

the numerical value is out of range of the given type

-
 

G_VARIANT_PARSE_ERROR_NUMBER_TOO_BIG

-

the numerical value is out of range for any type

-
 

G_VARIANT_PARSE_ERROR_TYPE_ERROR

-

cannot parse as variant of the specified type

-
 

G_VARIANT_PARSE_ERROR_UNEXPECTED_TOKEN

-

an unexpected token was encountered

-
 

G_VARIANT_PARSE_ERROR_UNKNOWN_KEYWORD

-

an unknown keyword was encountered

-
 

G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT

-

unterminated string constant

-
 

G_VARIANT_PARSE_ERROR_VALUE_EXPECTED

-

no value given

-
 
-
-
-
-
-

G_VARIANT_PARSE_ERROR

-
#define G_VARIANT_PARSE_ERROR (g_variant_parse_error_quark ())
-
-

Error domain for GVariant text format parsing. Specific error codes -are not currently defined for this domain. See GError for -information on error domains.

-
-
-
-

See Also

-

GVariantType

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-GVariantType.html b/docs/reference/glib/html/glib-GVariantType.html deleted file mode 100644 index 352a41d4e..000000000 --- a/docs/reference/glib/html/glib-GVariantType.html +++ /dev/null @@ -1,1831 +0,0 @@ - - - - -GVariantType: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GVariantType

-

GVariantType — introduction to the GVariant type system

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -G_VARIANT_TYPE() -
-void - -g_variant_type_free () -
-GVariantType * - -g_variant_type_copy () -
-GVariantType * - -g_variant_type_new () -
-gboolean - -g_variant_type_string_is_valid () -
-gboolean - -g_variant_type_string_scan () -
-gsize - -g_variant_type_get_string_length () -
const gchar * - -g_variant_type_peek_string () -
-gchar * - -g_variant_type_dup_string () -
-gboolean - -g_variant_type_is_definite () -
-gboolean - -g_variant_type_is_container () -
-gboolean - -g_variant_type_is_basic () -
-gboolean - -g_variant_type_is_maybe () -
-gboolean - -g_variant_type_is_array () -
-gboolean - -g_variant_type_is_tuple () -
-gboolean - -g_variant_type_is_dict_entry () -
-gboolean - -g_variant_type_is_variant () -
-guint - -g_variant_type_hash () -
-gboolean - -g_variant_type_equal () -
-gboolean - -g_variant_type_is_subtype_of () -
-GVariantType * - -g_variant_type_new_maybe () -
-GVariantType * - -g_variant_type_new_array () -
-GVariantType * - -g_variant_type_new_tuple () -
-GVariantType * - -g_variant_type_new_dict_entry () -
const GVariantType * - -g_variant_type_element () -
-gsize - -g_variant_type_n_items () -
const GVariantType * - -g_variant_type_first () -
const GVariantType * - -g_variant_type_next () -
const GVariantType * - -g_variant_type_key () -
const GVariantType * - -g_variant_type_value () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 GVariantType
#defineG_VARIANT_TYPE_BOOLEAN
#defineG_VARIANT_TYPE_BYTE
#defineG_VARIANT_TYPE_INT16
#defineG_VARIANT_TYPE_UINT16
#defineG_VARIANT_TYPE_INT32
#defineG_VARIANT_TYPE_UINT32
#defineG_VARIANT_TYPE_INT64
#defineG_VARIANT_TYPE_UINT64
#defineG_VARIANT_TYPE_HANDLE
#defineG_VARIANT_TYPE_DOUBLE
#defineG_VARIANT_TYPE_STRING
#defineG_VARIANT_TYPE_OBJECT_PATH
#defineG_VARIANT_TYPE_SIGNATURE
#defineG_VARIANT_TYPE_VARIANT
#defineG_VARIANT_TYPE_ANY
#defineG_VARIANT_TYPE_BASIC
#defineG_VARIANT_TYPE_MAYBE
#defineG_VARIANT_TYPE_ARRAY
#defineG_VARIANT_TYPE_TUPLE
#defineG_VARIANT_TYPE_UNIT
#defineG_VARIANT_TYPE_DICT_ENTRY
#defineG_VARIANT_TYPE_DICTIONARY
#defineG_VARIANT_TYPE_STRING_ARRAY
#defineG_VARIANT_TYPE_OBJECT_PATH_ARRAY
#defineG_VARIANT_TYPE_BYTESTRING
#defineG_VARIANT_TYPE_BYTESTRING_ARRAY
#defineG_VARIANT_TYPE_VARDICT
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

This section introduces the GVariant type system. It is based, in -large part, on the D-Bus type system, with two major changes and -some minor lifting of restrictions. The -D-Bus specification, -therefore, provides a significant amount of -information that is useful when working with GVariant.

-

The first major change with respect to the D-Bus type system is the -introduction of maybe (or "nullable") types. Any type in GVariant can be -converted to a maybe type, in which case, "nothing" (or "null") becomes a -valid value. Maybe types have been added by introducing the -character "m" to type strings.

-

The second major change is that the GVariant type system supports the -concept of "indefinite types" -- types that are less specific than -the normal types found in D-Bus. For example, it is possible to speak -of "an array of any type" in GVariant, where the D-Bus type system -would require you to speak of "an array of integers" or "an array of -strings". Indefinite types have been added by introducing the -characters "*", "?" and "r" to type strings.

-

Finally, all arbitrary restrictions relating to the complexity of -types are lifted along with the restriction that dictionary entries -may only appear nested inside of arrays.

-

Just as in D-Bus, GVariant types are described with strings ("type -strings"). Subject to the differences mentioned above, these strings -are of the same form as those found in DBus. Note, however: D-Bus -always works in terms of messages and therefore individual type -strings appear nowhere in its interface. Instead, "signatures" -are a concatenation of the strings of the type of each argument in a -message. GVariant deals with single values directly so GVariant type -strings always describe the type of exactly one value. This means -that a D-Bus signature string is generally not a valid GVariant type -string -- except in the case that it is the signature of a message -containing exactly one argument.

-

An indefinite type is similar in spirit to what may be called an -abstract type in other type systems. No value can exist that has an -indefinite type as its type, but values can exist that have types -that are subtypes of indefinite types. That is to say, -g_variant_get_type() will never return an indefinite type, but -calling g_variant_is_of_type() with an indefinite type may return -TRUE. For example, you cannot have a value that represents "an -array of no particular type", but you can have an "array of integers" -which certainly matches the type of "an array of no particular type", -since "array of integers" is a subtype of "array of no particular -type".

-

This is similar to how instances of abstract classes may not -directly exist in other type systems, but instances of their -non-abstract subtypes may. For example, in GTK, no object that has -the type of GtkBin can exist (since GtkBin is an abstract class), -but a GtkWindow can certainly be instantiated, and you would say -that the GtkWindow is a GtkBin (since GtkWindow is a subclass of -GtkBin).

-
-

GVariant Type Strings

-

A GVariant type string can be any of the following:

-
    -
  • any basic type string (listed below)

  • -
  • "v", "r" or "*"

  • -
  • one of the characters 'a' or 'm', followed by another type string

  • -
  • the character '(', followed by a concatenation of zero or more other -type strings, followed by the character ')'

  • -
  • the character '{', followed by a basic type string (see below), -followed by another type string, followed by the character '}'

  • -
-

A basic type string describes a basic type (as per -g_variant_type_is_basic()) and is always a single character in length. -The valid basic type strings are "b", "y", "n", "q", "i", "u", "x", "t", -"h", "d", "s", "o", "g" and "?".

-

The above definition is recursive to arbitrary depth. "aaaaai" and -"(ui(nq((y)))s)" are both valid type strings, as is -"a(aa(ui)(qna{ya(yd)}))".

-

The meaning of each of the characters is as follows:

-
    -
  • b: the type string of G_VARIANT_TYPE_BOOLEAN; a boolean value.

  • -
  • y: the type string of G_VARIANT_TYPE_BYTE; a byte.

  • -
  • n: the type string of G_VARIANT_TYPE_INT16; a signed 16 bit integer.

  • -
  • q: the type string of G_VARIANT_TYPE_UINT16; an unsigned 16 bit integer.

  • -
  • i: the type string of G_VARIANT_TYPE_INT32; a signed 32 bit integer.

  • -
  • u: the type string of G_VARIANT_TYPE_UINT32; an unsigned 32 bit integer.

  • -
  • x: the type string of G_VARIANT_TYPE_INT64; a signed 64 bit integer.

  • -
  • t: the type string of G_VARIANT_TYPE_UINT64; an unsigned 64 bit integer.

  • -
  • h: the type string of G_VARIANT_TYPE_HANDLE; a signed 32 bit value -that, by convention, is used as an index into an array of file -descriptors that are sent alongside a D-Bus message.

  • -
  • d: the type string of G_VARIANT_TYPE_DOUBLE; a double precision -floating point value.

  • -
  • s: the type string of G_VARIANT_TYPE_STRING; a string.

  • -
  • o: the type string of G_VARIANT_TYPE_OBJECT_PATH; a string in the form -of a D-Bus object path.

  • -
  • g: the type string of G_VARIANT_TYPE_STRING; a string in the form of -a D-Bus type signature.

  • -
  • ?: the type string of G_VARIANT_TYPE_BASIC; an indefinite type that -is a supertype of any of the basic types.

  • -
  • v: the type string of G_VARIANT_TYPE_VARIANT; a container type that -contain any other type of value.

  • -
  • a: used as a prefix on another type string to mean an array of that -type; the type string "ai", for example, is the type of an array of -signed 32-bit integers.

  • -
  • m: used as a prefix on another type string to mean a "maybe", or -"nullable", version of that type; the type string "ms", for example, -is the type of a value that maybe contains a string, or maybe contains -nothing.

  • -
  • (): used to enclose zero or more other concatenated type strings to -create a tuple type; the type string "(is)", for example, is the type of -a pair of an integer and a string.

  • -
  • r: the type string of G_VARIANT_TYPE_TUPLE; an indefinite type that is -a supertype of any tuple type, regardless of the number of items.

  • -
  • -

    {}: used to enclose a basic type string concatenated with another type -string to create a dictionary entry type, which usually appears inside of -an array to form a dictionary; the type string "a{sd}", for example, is -the type of a dictionary that maps strings to double precision floating -point values.

    -

    The first type (the basic type) is the key type and the second type is -the value type. The reason that the first type is restricted to being a -basic type is so that it can easily be hashed.

    -
  • -
  • *: the type string of G_VARIANT_TYPE_ANY; the indefinite type that is -a supertype of all types. Note that, as with all type strings, this -character represents exactly one type. It cannot be used inside of tuples -to mean "any number of items".

  • -
-

Any type string of a container that contains an indefinite type is, -itself, an indefinite type. For example, the type string "a*" -(corresponding to G_VARIANT_TYPE_ARRAY) is an indefinite type -that is a supertype of every array type. "(*s)" is a supertype -of all tuples that contain exactly two items where the second -item is a string.

-

"a{?*}" is an indefinite type that is a supertype of all arrays -containing dictionary entries where the key is any basic type and -the value is any type at all. This is, by definition, a dictionary, -so this type string corresponds to G_VARIANT_TYPE_DICTIONARY. Note -that, due to the restriction that the key of a dictionary entry must -be a basic type, "{**}" is not a valid type string.

-
-
-
-

Functions

-
-

G_VARIANT_TYPE()

-
# define G_VARIANT_TYPE(type_string)            (g_variant_type_checked_ ((type_string)))
-
-

Converts a string to a const GVariantType. Depending on the -current debugging level, this function may perform a runtime check -to ensure that string - is a valid GVariant type string.

-

It is always a programmer error to use this macro with an invalid -type string. If in doubt, use g_variant_type_string_is_valid() to -check if the string is valid.

-

Since 2.24

-
-

Parameters

-
----- - - - - - -

type_string

a well-formed GVariantType type string

 
-
-
-
-
-

g_variant_type_free ()

-
void
-g_variant_type_free (GVariantType *type);
-

Frees a GVariantType that was allocated with -g_variant_type_copy(), g_variant_type_new() or one of the container -type constructor functions.

-

In the case that type - is NULL, this function does nothing.

-

Since 2.24

-
-

Parameters

-
----- - - - - - -

type

a GVariantType, or NULL.

[nullable]
-
-
-
-
-

g_variant_type_copy ()

-
GVariantType *
-g_variant_type_copy (const GVariantType *type);
-

Makes a copy of a GVariantType. It is appropriate to call -g_variant_type_free() on the return value. type - may not be NULL.

-
-

Parameters

-
----- - - - - - -

type

a GVariantType

 
-
-
-

Returns

-

a new GVariantType

-

Since 2.24.

-

[transfer full]

-
-
-
-
-

g_variant_type_new ()

-
GVariantType *
-g_variant_type_new (const gchar *type_string);
-

Creates a new GVariantType corresponding to the type string given -by type_string -. It is appropriate to call g_variant_type_free() on -the return value.

-

It is a programmer error to call this function with an invalid type -string. Use g_variant_type_string_is_valid() if you are unsure.

-
-

Parameters

-
----- - - - - - -

type_string

a valid GVariant type string

 
-
-
-

Returns

-

a new GVariantType.

-

[transfer full]

-
-

Since: 2.24

-
-
-
-

g_variant_type_string_is_valid ()

-
gboolean
-g_variant_type_string_is_valid (const gchar *type_string);
-

Checks if type_string - is a valid GVariant type string. This call is -equivalent to calling g_variant_type_string_scan() and confirming -that the following character is a nul terminator.

-
-

Parameters

-
----- - - - - - -

type_string

a pointer to any string

 
-
-
-

Returns

-

TRUE if type_string -is exactly one valid type string

-

Since 2.24

-
-
-
-
-

g_variant_type_string_scan ()

-
gboolean
-g_variant_type_string_scan (const gchar *string,
-                            const gchar *limit,
-                            const gchar **endptr);
-

Scan for a single complete and valid GVariant type string in string -. -The memory pointed to by limit - (or bytes beyond it) is never -accessed.

-

If a valid type string is found, endptr - is updated to point to the -first character past the end of the string that was found and TRUE -is returned.

-

If there is no valid type string starting at string -, or if the type -string does not end before limit - then FALSE is returned.

-

For the simple case of checking if a string is a valid type string, -see g_variant_type_string_is_valid().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a pointer to any string

 

limit

the end of string -, or NULL.

[nullable]

endptr

location to store the end pointer, or NULL.

[out][optional]
-
-
-

Returns

-

TRUE if a valid type string was found

-
-

Since: 2.24

-
-
-
-

g_variant_type_get_string_length ()

-
gsize
-g_variant_type_get_string_length (const GVariantType *type);
-

Returns the length of the type string corresponding to the given -type -. This function must be used to determine the valid extent of -the memory region returned by g_variant_type_peek_string().

-
-

Parameters

-
----- - - - - - -

type

a GVariantType

 
-
-
-

Returns

-

the length of the corresponding type string

-

Since 2.24

-
-
-
-
-

g_variant_type_peek_string ()

-
const gchar *
-g_variant_type_peek_string (const GVariantType *type);
-

Returns the type string corresponding to the given type -. The -result is not nul-terminated; in order to determine its length you -must call g_variant_type_get_string_length().

-

To get a nul-terminated string, see g_variant_type_dup_string().

-

[skip]

-
-

Parameters

-
----- - - - - - -

type

a GVariantType

 
-
-
-

Returns

-

the corresponding type string (not nul-terminated)

-

Since 2.24

-
-
-
-
-

g_variant_type_dup_string ()

-
gchar *
-g_variant_type_dup_string (const GVariantType *type);
-

Returns a newly-allocated copy of the type string corresponding to -type -. The returned string is nul-terminated. It is appropriate to -call g_free() on the return value.

-
-

Parameters

-
----- - - - - - -

type

a GVariantType

 
-
-
-

Returns

-

the corresponding type string

-

Since 2.24.

-

[transfer full]

-
-
-
-
-

g_variant_type_is_definite ()

-
gboolean
-g_variant_type_is_definite (const GVariantType *type);
-

Determines if the given type - is definite (ie: not indefinite).

-

A type is definite if its type string does not contain any indefinite -type characters ('*', '?', or 'r').

-

A GVariant instance may not have an indefinite type, so calling -this function on the result of g_variant_get_type() will always -result in TRUE being returned. Calling this function on an -indefinite type like G_VARIANT_TYPE_ARRAY, however, will result in -FALSE being returned.

-
-

Parameters

-
----- - - - - - -

type

a GVariantType

 
-
-
-

Returns

-

TRUE if type -is definite

-

Since 2.24

-
-
-
-
-

g_variant_type_is_container ()

-
gboolean
-g_variant_type_is_container (const GVariantType *type);
-

Determines if the given type - is a container type.

-

Container types are any array, maybe, tuple, or dictionary -entry types plus the variant type.

-

This function returns TRUE for any indefinite type for which every -definite subtype is a container -- G_VARIANT_TYPE_ARRAY, for -example.

-
-

Parameters

-
----- - - - - - -

type

a GVariantType

 
-
-
-

Returns

-

TRUE if type -is a container type

-

Since 2.24

-
-
-
-
-

g_variant_type_is_basic ()

-
gboolean
-g_variant_type_is_basic (const GVariantType *type);
-

Determines if the given type - is a basic type.

-

Basic types are booleans, bytes, integers, doubles, strings, object -paths and signatures.

-

Only a basic type may be used as the key of a dictionary entry.

-

This function returns FALSE for all indefinite types except -G_VARIANT_TYPE_BASIC.

-
-

Parameters

-
----- - - - - - -

type

a GVariantType

 
-
-
-

Returns

-

TRUE if type -is a basic type

-

Since 2.24

-
-
-
-
-

g_variant_type_is_maybe ()

-
gboolean
-g_variant_type_is_maybe (const GVariantType *type);
-

Determines if the given type - is a maybe type. This is true if the -type string for type - starts with an 'm'.

-

This function returns TRUE for any indefinite type for which every -definite subtype is a maybe type -- G_VARIANT_TYPE_MAYBE, for -example.

-
-

Parameters

-
----- - - - - - -

type

a GVariantType

 
-
-
-

Returns

-

TRUE if type -is a maybe type

-

Since 2.24

-
-
-
-
-

g_variant_type_is_array ()

-
gboolean
-g_variant_type_is_array (const GVariantType *type);
-

Determines if the given type - is an array type. This is true if the -type string for type - starts with an 'a'.

-

This function returns TRUE for any indefinite type for which every -definite subtype is an array type -- G_VARIANT_TYPE_ARRAY, for -example.

-
-

Parameters

-
----- - - - - - -

type

a GVariantType

 
-
-
-

Returns

-

TRUE if type -is an array type

-

Since 2.24

-
-
-
-
-

g_variant_type_is_tuple ()

-
gboolean
-g_variant_type_is_tuple (const GVariantType *type);
-

Determines if the given type - is a tuple type. This is true if the -type string for type - starts with a '(' or if type - is -G_VARIANT_TYPE_TUPLE.

-

This function returns TRUE for any indefinite type for which every -definite subtype is a tuple type -- G_VARIANT_TYPE_TUPLE, for -example.

-
-

Parameters

-
----- - - - - - -

type

a GVariantType

 
-
-
-

Returns

-

TRUE if type -is a tuple type

-

Since 2.24

-
-
-
-
-

g_variant_type_is_dict_entry ()

-
gboolean
-g_variant_type_is_dict_entry (const GVariantType *type);
-

Determines if the given type - is a dictionary entry type. This is -true if the type string for type - starts with a '{'.

-

This function returns TRUE for any indefinite type for which every -definite subtype is a dictionary entry type -- -G_VARIANT_TYPE_DICT_ENTRY, for example.

-
-

Parameters

-
----- - - - - - -

type

a GVariantType

 
-
-
-

Returns

-

TRUE if type -is a dictionary entry type

-

Since 2.24

-
-
-
-
-

g_variant_type_is_variant ()

-
gboolean
-g_variant_type_is_variant (const GVariantType *type);
-

Determines if the given type - is the variant type.

-
-

Parameters

-
----- - - - - - -

type

a GVariantType

 
-
-
-

Returns

-

TRUE if type -is the variant type

-

Since 2.24

-
-
-
-
-

g_variant_type_hash ()

-
guint
-g_variant_type_hash (gconstpointer type);
-

Hashes type -.

-

The argument type of type - is only gconstpointer to allow use with -GHashTable without function pointer casting. A valid -GVariantType must be provided.

-
-

Parameters

-
----- - - - - - -

type

a GVariantType.

[type GVariantType]
-
-
-

Returns

-

the hash value

-

Since 2.24

-
-
-
-
-

g_variant_type_equal ()

-
gboolean
-g_variant_type_equal (gconstpointer type1,
-                      gconstpointer type2);
-

Compares type1 - and type2 - for equality.

-

Only returns TRUE if the types are exactly equal. Even if one type -is an indefinite type and the other is a subtype of it, FALSE will -be returned if they are not exactly equal. If you want to check for -subtypes, use g_variant_type_is_subtype_of().

-

The argument types of type1 - and type2 - are only gconstpointer to -allow use with GHashTable without function pointer casting. For -both arguments, a valid GVariantType must be provided.

-
-

Parameters

-
----- - - - - - - - - - - - - -

type1

a GVariantType.

[type GVariantType]

type2

a GVariantType.

[type GVariantType]
-
-
-

Returns

-

TRUE if type1 -and type2 -are exactly equal

-

Since 2.24

-
-
-
-
-

g_variant_type_is_subtype_of ()

-
gboolean
-g_variant_type_is_subtype_of (const GVariantType *type,
-                              const GVariantType *supertype);
-

Checks if type - is a subtype of supertype -.

-

This function returns TRUE if type - is a subtype of supertype -. All -types are considered to be subtypes of themselves. Aside from that, -only indefinite types can have subtypes.

-
-

Parameters

-
----- - - - - - - - - - - - - -

type

a GVariantType

 

supertype

a GVariantType

 
-
-
-

Returns

-

TRUE if type -is a subtype of supertype -

-

Since 2.24

-
-
-
-
-

g_variant_type_new_maybe ()

-
GVariantType *
-g_variant_type_new_maybe (const GVariantType *element);
-

Constructs the type corresponding to a maybe instance containing -type type - or Nothing.

-

It is appropriate to call g_variant_type_free() on the return value.

-

[constructor]

-
-

Parameters

-
----- - - - - - -

element

a GVariantType

 
-
-
-

Returns

-

a new maybe GVariantType

-

Since 2.24.

-

[transfer full]

-
-
-
-
-

g_variant_type_new_array ()

-
GVariantType *
-g_variant_type_new_array (const GVariantType *element);
-

Constructs the type corresponding to an array of elements of the -type type -.

-

It is appropriate to call g_variant_type_free() on the return value.

-

[constructor]

-
-

Parameters

-
----- - - - - - -

element

a GVariantType

 
-
-
-

Returns

-

a new array GVariantType

-

Since 2.24.

-

[transfer full]

-
-
-
-
-

g_variant_type_new_tuple ()

-
GVariantType *
-g_variant_type_new_tuple (const GVariantType * const *items,
-                          gint length);
-

Constructs a new tuple type, from items -.

-

length - is the number of items in items -, or -1 to indicate that -items - is NULL-terminated.

-

It is appropriate to call g_variant_type_free() on the return value.

-
-

Parameters

-
----- - - - - - - - - - - - - -

items

an array of GVariantTypes, one for each item.

[array length=length]

length

the length of items -, or -1

 
-
-
-

Returns

-

a new tuple GVariantType

-

Since 2.24.

-

[transfer full]

-
-
-
-
-

g_variant_type_new_dict_entry ()

-
GVariantType *
-g_variant_type_new_dict_entry (const GVariantType *key,
-                               const GVariantType *value);
-

Constructs the type corresponding to a dictionary entry with a key -of type key - and a value of type value -.

-

It is appropriate to call g_variant_type_free() on the return value.

-

[constructor]

-
-

Parameters

-
----- - - - - - - - - - - - - -

key

a basic GVariantType

 

value

a GVariantType

 
-
-
-

Returns

-

a new dictionary entry GVariantType

-

Since 2.24.

-

[transfer full]

-
-
-
-
-

g_variant_type_element ()

-
const GVariantType *
-g_variant_type_element (const GVariantType *type);
-

Determines the element type of an array or maybe type.

-

This function may only be used with array or maybe types.

-
-

Parameters

-
----- - - - - - -

type

an array or maybe GVariantType

 
-
-
-

Returns

-

the element type of type -

-

Since 2.24.

-

[transfer none]

-
-
-
-
-

g_variant_type_n_items ()

-
gsize
-g_variant_type_n_items (const GVariantType *type);
-

Determines the number of items contained in a tuple or -dictionary entry type.

-

This function may only be used with tuple or dictionary entry types, -but must not be used with the generic tuple type -G_VARIANT_TYPE_TUPLE.

-

In the case of a dictionary entry type, this function will always -return 2.

-
-

Parameters

-
----- - - - - - -

type

a tuple or dictionary entry GVariantType

 
-
-
-

Returns

-

the number of items in type -

-

Since 2.24

-
-
-
-
-

g_variant_type_first ()

-
const GVariantType *
-g_variant_type_first (const GVariantType *type);
-

Determines the first item type of a tuple or dictionary entry -type.

-

This function may only be used with tuple or dictionary entry types, -but must not be used with the generic tuple type -G_VARIANT_TYPE_TUPLE.

-

In the case of a dictionary entry type, this returns the type of -the key.

-

NULL is returned in case of type - being G_VARIANT_TYPE_UNIT.

-

This call, together with g_variant_type_next() provides an iterator -interface over tuple and dictionary entry types.

-
-

Parameters

-
----- - - - - - -

type

a tuple or dictionary entry GVariantType

 
-
-
-

Returns

-

the first item type of type -, or NULL

-

Since 2.24.

-

[transfer none]

-
-
-
-
-

g_variant_type_next ()

-
const GVariantType *
-g_variant_type_next (const GVariantType *type);
-

Determines the next item type of a tuple or dictionary entry -type.

-

type - must be the result of a previous call to -g_variant_type_first() or g_variant_type_next().

-

If called on the key type of a dictionary entry then this call -returns the value type. If called on the value type of a dictionary -entry then this call returns NULL.

-

For tuples, NULL is returned when type - is the last item in a tuple.

-
-

Parameters

-
----- - - - - - -

type

a GVariantType from a previous call

 
-
-
-

Returns

-

the next GVariantType after type -, or NULL

-

Since 2.24.

-

[transfer none]

-
-
-
-
-

g_variant_type_key ()

-
const GVariantType *
-g_variant_type_key (const GVariantType *type);
-

Determines the key type of a dictionary entry type.

-

This function may only be used with a dictionary entry type. Other -than the additional restriction, this call is equivalent to -g_variant_type_first().

-
-

Parameters

-
----- - - - - - -

type

a dictionary entry GVariantType

 
-
-
-

Returns

-

the key type of the dictionary entry

-

Since 2.24.

-

[transfer none]

-
-
-
-
-

g_variant_type_value ()

-
const GVariantType *
-g_variant_type_value (const GVariantType *type);
-

Determines the value type of a dictionary entry type.

-

This function may only be used with a dictionary entry type.

-
-

Parameters

-
----- - - - - - -

type

a dictionary entry GVariantType

 
-
-
-

Returns

-

the value type of the dictionary entry

-

Since 2.24.

-

[transfer none]

-
-
-
-
-

Types and Values

-
-

GVariantType

-
typedef struct _GVariantType GVariantType;
-

A type in the GVariant type system.

-

Two types may not be compared by value; use g_variant_type_equal() or -g_variant_type_is_subtype_of(). May be copied using -g_variant_type_copy() and freed using g_variant_type_free().

-
-
-
-

G_VARIANT_TYPE_BOOLEAN

-
#define G_VARIANT_TYPE_BOOLEAN              ((const GVariantType *) "b")
-
-

The type of a value that can be either TRUE or FALSE.

-
-
-
-

G_VARIANT_TYPE_BYTE

-
#define G_VARIANT_TYPE_BYTE                 ((const GVariantType *) "y")
-
-

The type of an integer value that can range from 0 to 255.

-
-
-
-

G_VARIANT_TYPE_INT16

-
#define G_VARIANT_TYPE_INT16                ((const GVariantType *) "n")
-
-

The type of an integer value that can range from -32768 to 32767.

-
-
-
-

G_VARIANT_TYPE_UINT16

-
#define G_VARIANT_TYPE_UINT16               ((const GVariantType *) "q")
-
-

The type of an integer value that can range from 0 to 65535. -There were about this many people living in Toronto in the 1870s.

-
-
-
-

G_VARIANT_TYPE_INT32

-
#define G_VARIANT_TYPE_INT32                ((const GVariantType *) "i")
-
-

The type of an integer value that can range from -2147483648 to -2147483647.

-
-
-
-

G_VARIANT_TYPE_UINT32

-
#define G_VARIANT_TYPE_UINT32               ((const GVariantType *) "u")
-
-

The type of an integer value that can range from 0 to 4294967295. -That's one number for everyone who was around in the late 1970s.

-
-
-
-

G_VARIANT_TYPE_INT64

-
#define G_VARIANT_TYPE_INT64                ((const GVariantType *) "x")
-
-

The type of an integer value that can range from --9223372036854775808 to 9223372036854775807.

-
-
-
-

G_VARIANT_TYPE_UINT64

-
#define G_VARIANT_TYPE_UINT64               ((const GVariantType *) "t")
-
-

The type of an integer value that can range from 0 to

-
  1. That's a really big number, but a Rubik's -cube can have a bit more than twice as many possible positions.

-
-
-
-

G_VARIANT_TYPE_HANDLE

-
#define G_VARIANT_TYPE_HANDLE               ((const GVariantType *) "h")
-
-

The type of a 32bit signed integer value, that by convention, is used -as an index into an array of file descriptors that are sent alongside -a D-Bus message.

-

If you are not interacting with D-Bus, then there is no reason to make -use of this type.

-
-
-
-

G_VARIANT_TYPE_DOUBLE

-
#define G_VARIANT_TYPE_DOUBLE               ((const GVariantType *) "d")
-
-

The type of a double precision IEEE754 floating point number. -These guys go up to about 1.80e308 (plus and minus) but miss out on -some numbers in between. In any case, that's far greater than the -estimated number of fundamental particles in the observable -universe.

-
-
-
-

G_VARIANT_TYPE_STRING

-
#define G_VARIANT_TYPE_STRING               ((const GVariantType *) "s")
-
-

The type of a string. "" is a string. NULL is not a string.

-
-
-
-

G_VARIANT_TYPE_OBJECT_PATH

-
#define G_VARIANT_TYPE_OBJECT_PATH          ((const GVariantType *) "o")
-
-

The type of a D-Bus object reference. These are strings of a -specific format used to identify objects at a given destination on -the bus.

-

If you are not interacting with D-Bus, then there is no reason to make -use of this type. If you are, then the D-Bus specification contains a -precise description of valid object paths.

-
-
-
-

G_VARIANT_TYPE_SIGNATURE

-
#define G_VARIANT_TYPE_SIGNATURE            ((const GVariantType *) "g")
-
-

The type of a D-Bus type signature. These are strings of a specific -format used as type signatures for D-Bus methods and messages.

-

If you are not interacting with D-Bus, then there is no reason to make -use of this type. If you are, then the D-Bus specification contains a -precise description of valid signature strings.

-
-
-
-

G_VARIANT_TYPE_VARIANT

-
#define G_VARIANT_TYPE_VARIANT              ((const GVariantType *) "v")
-
-

The type of a box that contains any other value (including another -variant).

-
-
-
-

G_VARIANT_TYPE_ANY

-
#define G_VARIANT_TYPE_ANY                  ((const GVariantType *) "*")
-
-

An indefinite type that is a supertype of every type (including -itself).

-
-
-
-

G_VARIANT_TYPE_BASIC

-
#define G_VARIANT_TYPE_BASIC                ((const GVariantType *) "?")
-
-

An indefinite type that is a supertype of every basic (ie: -non-container) type.

-
-
-
-

G_VARIANT_TYPE_MAYBE

-
#define G_VARIANT_TYPE_MAYBE                ((const GVariantType *) "m*")
-
-

An indefinite type that is a supertype of every maybe type.

-
-
-
-

G_VARIANT_TYPE_ARRAY

-
#define G_VARIANT_TYPE_ARRAY                ((const GVariantType *) "a*")
-
-

An indefinite type that is a supertype of every array type.

-
-
-
-

G_VARIANT_TYPE_TUPLE

-
#define G_VARIANT_TYPE_TUPLE                ((const GVariantType *) "r")
-
-

An indefinite type that is a supertype of every tuple type, -regardless of the number of items in the tuple.

-
-
-
-

G_VARIANT_TYPE_UNIT

-
#define G_VARIANT_TYPE_UNIT                 ((const GVariantType *) "()")
-
-

The empty tuple type. Has only one instance. Known also as "triv" -or "void".

-
-
-
-

G_VARIANT_TYPE_DICT_ENTRY

-
#define G_VARIANT_TYPE_DICT_ENTRY           ((const GVariantType *) "{?*}")
-
-

An indefinite type that is a supertype of every dictionary entry -type.

-
-
-
-

G_VARIANT_TYPE_DICTIONARY

-
#define G_VARIANT_TYPE_DICTIONARY           ((const GVariantType *) "a{?*}")
-
-

An indefinite type that is a supertype of every dictionary type -- -that is, any array type that has an element type equal to any -dictionary entry type.

-
-
-
-

G_VARIANT_TYPE_STRING_ARRAY

-
#define G_VARIANT_TYPE_STRING_ARRAY         ((const GVariantType *) "as")
-
-

The type of an array of strings.

-
-
-
-

G_VARIANT_TYPE_OBJECT_PATH_ARRAY

-
#define G_VARIANT_TYPE_OBJECT_PATH_ARRAY    ((const GVariantType *) "ao")
-
-

The type of an array of object paths.

-
-
-
-

G_VARIANT_TYPE_BYTESTRING

-
#define G_VARIANT_TYPE_BYTESTRING           ((const GVariantType *) "ay")
-
-

The type of an array of bytes. This type is commonly used to pass -around strings that may not be valid utf8. In that case, the -convention is that the nul terminator character should be included as -the last character in the array.

-
-
-
-

G_VARIANT_TYPE_BYTESTRING_ARRAY

-
#define G_VARIANT_TYPE_BYTESTRING_ARRAY     ((const GVariantType *) "aay")
-
-

The type of an array of byte strings (an array of arrays of bytes).

-
-
-
-

G_VARIANT_TYPE_VARDICT

-
#define G_VARIANT_TYPE_VARDICT              ((const GVariantType *) "a{sv}")
-
-

The type of a dictionary mapping strings to variants (the ubiquitous -"a{sv}" type).

-

Since: 2.30

-
-
-
-

See Also

-

GVariantType, GVariant

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Glob-style-pattern-matching.html b/docs/reference/glib/html/glib-Glob-style-pattern-matching.html deleted file mode 100644 index c2c1eea53..000000000 --- a/docs/reference/glib/html/glib-Glob-style-pattern-matching.html +++ /dev/null @@ -1,367 +0,0 @@ - - - - -Glob-style pattern matching: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Glob-style pattern matching

-

Glob-style pattern matching — matches strings against patterns containing '*' - (wildcard) and '?' (joker)

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GPatternSpec * - -g_pattern_spec_new () -
-void - -g_pattern_spec_free () -
-gboolean - -g_pattern_spec_equal () -
-gboolean - -g_pattern_match () -
-gboolean - -g_pattern_match_string () -
-gboolean - -g_pattern_match_simple () -
-
-
-

Types and Values

-
---- - - - - -
 GPatternSpec
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The g_pattern_match* functions match a string -against a pattern containing '*' and '?' wildcards with similar -semantics as the standard glob() function: '*' matches an arbitrary, -possibly empty, string, '?' matches an arbitrary character.

-

Note that in contrast to glob(), the '/' character can be matched by -the wildcards, there are no '[...]' character ranges and '*' and '?' -can not be escaped to include them literally in a pattern.

-

When multiple strings must be matched against the same pattern, it -is better to compile the pattern to a GPatternSpec using -g_pattern_spec_new() and use g_pattern_match_string() instead of -g_pattern_match_simple(). This avoids the overhead of repeated -pattern compilation.

-
-
-

Functions

-
-

g_pattern_spec_new ()

-
GPatternSpec *
-g_pattern_spec_new (const gchar *pattern);
-

Compiles a pattern to a GPatternSpec.

-
-

Parameters

-
----- - - - - - -

pattern

a zero-terminated UTF-8 encoded string

 
-
-
-

Returns

-

a newly-allocated GPatternSpec

-
-
-
-
-

g_pattern_spec_free ()

-
void
-g_pattern_spec_free (GPatternSpec *pspec);
-

Frees the memory allocated for the GPatternSpec.

-
-

Parameters

-
----- - - - - - -

pspec

a GPatternSpec

 
-
-
-
-
-

g_pattern_spec_equal ()

-
gboolean
-g_pattern_spec_equal (GPatternSpec *pspec1,
-                      GPatternSpec *pspec2);
-

Compares two compiled pattern specs and returns whether they will -match the same set of strings.

-
-

Parameters

-
----- - - - - - - - - - - - - -

pspec1

a GPatternSpec

 

pspec2

another GPatternSpec

 
-
-
-

Returns

-

Whether the compiled patterns are equal

-
-
-
-
-

g_pattern_match ()

-
gboolean
-g_pattern_match (GPatternSpec *pspec,
-                 guint string_length,
-                 const gchar *string,
-                 const gchar *string_reversed);
-

Matches a string against a compiled pattern. Passing the correct -length of the string given is mandatory. The reversed string can be -omitted by passing NULL, this is more efficient if the reversed -version of the string to be matched is not at hand, as -g_pattern_match() will only construct it if the compiled pattern -requires reverse matches.

-

Note that, if the user code will (possibly) match a string against a -multitude of patterns containing wildcards, chances are high that -some patterns will require a reversed string. In this case, it's -more efficient to provide the reversed string to avoid multiple -constructions thereof in the various calls to g_pattern_match().

-

Note also that the reverse of a UTF-8 encoded string can in general -not be obtained by g_strreverse(). This works only if the string -does not contain any multibyte characters. GLib offers the -g_utf8_strreverse() function to reverse UTF-8 encoded strings.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

pspec

a GPatternSpec

 

string_length

the length of string -(in bytes, i.e. strlen(), -not g_utf8_strlen())

 

string

the UTF-8 encoded string to match

 

string_reversed

the reverse of string -or NULL.

[nullable]
-
-
-

Returns

-

TRUE if string -matches pspec -

-
-
-
-
-

g_pattern_match_string ()

-
gboolean
-g_pattern_match_string (GPatternSpec *pspec,
-                        const gchar *string);
-

Matches a string against a compiled pattern. If the string is to be -matched against more than one pattern, consider using -g_pattern_match() instead while supplying the reversed string.

-
-

Parameters

-
----- - - - - - - - - - - - - -

pspec

a GPatternSpec

 

string

the UTF-8 encoded string to match

 
-
-
-

Returns

-

TRUE if string -matches pspec -

-
-
-
-
-

g_pattern_match_simple ()

-
gboolean
-g_pattern_match_simple (const gchar *pattern,
-                        const gchar *string);
-

Matches a string against a pattern given as a string. If this -function is to be called in a loop, it's more efficient to compile -the pattern once with g_pattern_spec_new() and call -g_pattern_match_string() repeatedly.

-
-

Parameters

-
----- - - - - - - - - - - - - -

pattern

the UTF-8 encoded pattern

 

string

the UTF-8 encoded string to match

 
-
-
-

Returns

-

TRUE if string -matches pspec -

-
-
-
-
-

Types and Values

-
-

GPatternSpec

-
typedef struct _GPatternSpec GPatternSpec;
-

A GPatternSpec struct is the 'compiled' form of a pattern. This -structure is opaque and its fields cannot be accessed directly.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Hash-Tables.html b/docs/reference/glib/html/glib-Hash-Tables.html deleted file mode 100644 index 8dcc18762..000000000 --- a/docs/reference/glib/html/glib-Hash-Tables.html +++ /dev/null @@ -1,2260 +0,0 @@ - - - - -Hash Tables: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Hash Tables

-

Hash Tables — associations between keys and values so that - given a key the value can be found quickly

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GHashTable * - -g_hash_table_new () -
-GHashTable * - -g_hash_table_new_full () -
-guint - -(*GHashFunc) () -
-gboolean - -(*GEqualFunc) () -
-gboolean - -g_hash_table_insert () -
-gboolean - -g_hash_table_replace () -
-gboolean - -g_hash_table_add () -
-gboolean - -g_hash_table_contains () -
-guint - -g_hash_table_size () -
-gpointer - -g_hash_table_lookup () -
-gboolean - -g_hash_table_lookup_extended () -
-void - -g_hash_table_foreach () -
-gpointer - -g_hash_table_find () -
-void - -(*GHFunc) () -
-gboolean - -g_hash_table_remove () -
-gboolean - -g_hash_table_steal () -
-guint - -g_hash_table_foreach_remove () -
-guint - -g_hash_table_foreach_steal () -
-void - -g_hash_table_remove_all () -
-void - -g_hash_table_steal_all () -
-GList * - -g_hash_table_get_keys () -
-GList * - -g_hash_table_get_values () -
-gpointer * - -g_hash_table_get_keys_as_array () -
-gboolean - -(*GHRFunc) () -
#define -g_hash_table_freeze() -
#define -g_hash_table_thaw() -
-void - -g_hash_table_destroy () -
-GHashTable * - -g_hash_table_ref () -
-void - -g_hash_table_unref () -
-void - -g_hash_table_iter_init () -
-gboolean - -g_hash_table_iter_next () -
-GHashTable * - -g_hash_table_iter_get_hash_table () -
-void - -g_hash_table_iter_replace () -
-void - -g_hash_table_iter_remove () -
-void - -g_hash_table_iter_steal () -
-gboolean - -g_direct_equal () -
-guint - -g_direct_hash () -
-gboolean - -g_int_equal () -
-guint - -g_int_hash () -
-gboolean - -g_int64_equal () -
-guint - -g_int64_hash () -
-gboolean - -g_double_equal () -
-guint - -g_double_hash () -
-gboolean - -g_str_equal () -
-guint - -g_str_hash () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GHashTable
structGHashTableIter
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

A GHashTable provides associations between keys and values which is -optimized so that given a key, the associated value can be found -very quickly.

-

Note that neither keys nor values are copied when inserted into the -GHashTable, so they must exist for the lifetime of the GHashTable. -This means that the use of static strings is OK, but temporary -strings (i.e. those created in buffers and those returned by GTK+ -widgets) should be copied with g_strdup() before being inserted.

-

If keys or values are dynamically allocated, you must be careful to -ensure that they are freed when they are removed from the -GHashTable, and also when they are overwritten by new insertions -into the GHashTable. It is also not advisable to mix static strings -and dynamically-allocated strings in a GHashTable, because it then -becomes difficult to determine whether the string should be freed.

-

To create a GHashTable, use g_hash_table_new().

-

To insert a key and value into a GHashTable, use -g_hash_table_insert().

-

To lookup a value corresponding to a given key, use -g_hash_table_lookup() and g_hash_table_lookup_extended().

-

g_hash_table_lookup_extended() can also be used to simply -check if a key is present in the hash table.

-

To remove a key and value, use g_hash_table_remove().

-

To call a function for each key and value pair use -g_hash_table_foreach() or use a iterator to iterate over the -key/value pairs in the hash table, see GHashTableIter.

-

To destroy a GHashTable use g_hash_table_destroy().

-

A common use-case for hash tables is to store information about a -set of keys, without associating any particular value with each -key. GHashTable optimizes one way of doing so: If you store only -key-value pairs where key == value, then GHashTable does not -allocate memory to store the values, which can be a considerable -space saving, if your set is large. The functions -g_hash_table_add() and g_hash_table_contains() are designed to be -used when using GHashTable this way.

-
-
-

Functions

-
-

g_hash_table_new ()

-
GHashTable *
-g_hash_table_new (GHashFunc hash_func,
-                  GEqualFunc key_equal_func);
-

Creates a new GHashTable with a reference count of 1.

-

Hash values returned by hash_func - are used to determine where keys -are stored within the GHashTable data structure. The g_direct_hash(), -g_int_hash(), g_int64_hash(), g_double_hash() and g_str_hash() -functions are provided for some common types of keys. -If hash_func - is NULL, g_direct_hash() is used.

-

key_equal_func - is used when looking up keys in the GHashTable. -The g_direct_equal(), g_int_equal(), g_int64_equal(), g_double_equal() -and g_str_equal() functions are provided for the most common types -of keys. If key_equal_func - is NULL, keys are compared directly in -a similar fashion to g_direct_equal(), but without the overhead of -a function call. key_equal_func - is called with the key from the hash table -as its first parameter, and the user-provided key to check against as -its second.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hash_func

a function to create a hash value from a key

 

key_equal_func

a function to check two keys for equality

 
-
-
-

Returns

-

a new GHashTable

-
-
-
-
-

g_hash_table_new_full ()

-
GHashTable *
-g_hash_table_new_full (GHashFunc hash_func,
-                       GEqualFunc key_equal_func,
-                       GDestroyNotify key_destroy_func,
-                       GDestroyNotify value_destroy_func);
-

Creates a new GHashTable like g_hash_table_new() with a reference -count of 1 and allows to specify functions to free the memory -allocated for the key and value that get called when removing the -entry from the GHashTable.

-

Since version 2.42 it is permissible for destroy notify functions to -recursively remove further items from the hash table. This is only -permissible if the application still holds a reference to the hash table. -This means that you may need to ensure that the hash table is empty by -calling g_hash_table_remove_all() before releasing the last reference using -g_hash_table_unref().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

hash_func

a function to create a hash value from a key

 

key_equal_func

a function to check two keys for equality

 

key_destroy_func

a function to free the memory allocated for the key -used when removing the entry from the GHashTable, or NULL -if you don't want to supply such a function.

[nullable]

value_destroy_func

a function to free the memory allocated for the -value used when removing the entry from the GHashTable, or NULL -if you don't want to supply such a function.

[nullable]
-
-
-

Returns

-

a new GHashTable

-
-
-
-
-

GHashFunc ()

-
guint
-(*GHashFunc) (gconstpointer key);
-

Specifies the type of the hash function which is passed to -g_hash_table_new() when a GHashTable is created.

-

The function is passed a key and should return a guint hash value. -The functions g_direct_hash(), g_int_hash() and g_str_hash() provide -hash functions which can be used when the key is a gpointer, gint*, -and gchar* respectively.

-

g_direct_hash() is also the appropriate hash function for keys -of the form GINT_TO_POINTER (n) (or similar macros).

-

<!-- FIXME: Need more here. --> A good hash functions should produce -hash values that are evenly distributed over a fairly large range. -The modulus is taken with the hash table size (a prime number) to -find the 'bucket' to place each key into. The function should also -be very fast, since it is called for each key lookup.

-

Note that the hash functions provided by GLib have these qualities, -but are not particularly robust against manufactured keys that -cause hash collisions. Therefore, you should consider choosing -a more secure hash function when using a GHashTable with keys -that originate in untrusted data (such as HTTP requests). -Using g_str_hash() in that situation might make your application -vulerable to -Algorithmic Complexity Attacks.

-

The key to choosing a good hash is unpredictability. Even -cryptographic hashes are very easy to find collisions for when the -remainder is taken modulo a somewhat predictable prime number. There -must be an element of randomness that an attacker is unable to guess.

-
-

Parameters

-
----- - - - - - -

key

a key

 
-
-
-

Returns

-

the hash value corresponding to the key

-
-
-
-
-

GEqualFunc ()

-
gboolean
-(*GEqualFunc) (gconstpointer a,
-               gconstpointer b);
-

Specifies the type of a function used to test two values for -equality. The function should return TRUE if both values are equal -and FALSE otherwise.

-
-

Parameters

-
----- - - - - - - - - - - - - -

a

a value

 

b

a value to compare with

 
-
-
-

Returns

-

TRUE if a -= b -; FALSE otherwise

-
-
-
-
-

g_hash_table_insert ()

-
gboolean
-g_hash_table_insert (GHashTable *hash_table,
-                     gpointer key,
-                     gpointer value);
-

Inserts a new key and value into a GHashTable.

-

If the key already exists in the GHashTable its current -value is replaced with the new value. If you supplied a -value_destroy_func - when creating the GHashTable, the old -value is freed using that function. If you supplied a -key_destroy_func - when creating the GHashTable, the passed -key is freed using that function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

hash_table

a GHashTable

 

key

a key to insert

 

value

the value to associate with the key

 
-
-
-

Returns

-

TRUE if the key did not exist yet

-
-
-
-
-

g_hash_table_replace ()

-
gboolean
-g_hash_table_replace (GHashTable *hash_table,
-                      gpointer key,
-                      gpointer value);
-

Inserts a new key and value into a GHashTable similar to -g_hash_table_insert(). The difference is that if the key -already exists in the GHashTable, it gets replaced by the -new key. If you supplied a value_destroy_func - when creating -the GHashTable, the old value is freed using that function. -If you supplied a key_destroy_func - when creating the -GHashTable, the old key is freed using that function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

hash_table

a GHashTable

 

key

a key to insert

 

value

the value to associate with the key

 
-
-
-

Returns

-

TRUE if the key did not exist yet

-
-
-
-
-

g_hash_table_add ()

-
gboolean
-g_hash_table_add (GHashTable *hash_table,
-                  gpointer key);
-

This is a convenience function for using a GHashTable as a set. It -is equivalent to calling g_hash_table_replace() with key - as both the -key and the value.

-

When a hash table only ever contains keys that have themselves as the -corresponding value it is able to be stored more efficiently. See -the discussion in the section description.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hash_table

a GHashTable

 

key

a key to insert

 
-
-
-

Returns

-

TRUE if the key did not exist yet

-
-

Since: 2.32

-
-
-
-

g_hash_table_contains ()

-
gboolean
-g_hash_table_contains (GHashTable *hash_table,
-                       gconstpointer key);
-

Checks if key - is in hash_table -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hash_table

a GHashTable

 

key

a key to check

 
-
-
-

Returns

-

TRUE if key -is in hash_table -, FALSE otherwise.

-
-

Since: 2.32

-
-
-
-

g_hash_table_size ()

-
guint
-g_hash_table_size (GHashTable *hash_table);
-

Returns the number of elements contained in the GHashTable.

-
-

Parameters

-
----- - - - - - -

hash_table

a GHashTable

 
-
-
-

Returns

-

the number of key/value pairs in the GHashTable.

-
-
-
-
-

g_hash_table_lookup ()

-
gpointer
-g_hash_table_lookup (GHashTable *hash_table,
-                     gconstpointer key);
-

Looks up a key in a GHashTable. Note that this function cannot -distinguish between a key that is not present and one which is present -and has the value NULL. If you need this distinction, use -g_hash_table_lookup_extended().

-
-

Parameters

-
----- - - - - - - - - - - - - -

hash_table

a GHashTable

 

key

the key to look up

 
-
-
-

Returns

-

the associated value, or NULL if the key is not found.

-

[nullable]

-
-
-
-
-

g_hash_table_lookup_extended ()

-
gboolean
-g_hash_table_lookup_extended (GHashTable *hash_table,
-                              gconstpointer lookup_key,
-                              gpointer *orig_key,
-                              gpointer *value);
-

Looks up a key in the GHashTable, returning the original key and the -associated value and a gboolean which is TRUE if the key was found. This -is useful if you need to free the memory allocated for the original key, -for example before calling g_hash_table_remove().

-

You can actually pass NULL for lookup_key - to test -whether the NULL key exists, provided the hash and equal functions -of hash_table - are NULL-safe.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

hash_table

a GHashTable

 

lookup_key

the key to look up

 

orig_key

return location for the original key.

[out][optional]

value

return location for the value associated -with the key.

[out][optional]
-
-
-

Returns

-

TRUE if the key was found in the GHashTable

-
-
-
-
-

g_hash_table_foreach ()

-
void
-g_hash_table_foreach (GHashTable *hash_table,
-                      GHFunc func,
-                      gpointer user_data);
-

Calls the given function for each of the key/value pairs in the -GHashTable. The function is passed the key and value of each -pair, and the given user_data - parameter. The hash table may not -be modified while iterating over it (you can't add/remove -items). To remove all items matching a predicate, use -g_hash_table_foreach_remove().

-

See g_hash_table_find() for performance caveats for linear -order searches in contrast to g_hash_table_lookup().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

hash_table

a GHashTable

 

func

the function to call for each key/value pair

 

user_data

user data to pass to the function

 
-
-
-
-
-

g_hash_table_find ()

-
gpointer
-g_hash_table_find (GHashTable *hash_table,
-                   GHRFunc predicate,
-                   gpointer user_data);
-

Calls the given function for key/value pairs in the GHashTable -until predicate - returns TRUE. The function is passed the key -and value of each pair, and the given user_data - parameter. The -hash table may not be modified while iterating over it (you can't -add/remove items).

-

Note, that hash tables are really only optimized for forward -lookups, i.e. g_hash_table_lookup(). So code that frequently issues -g_hash_table_find() or g_hash_table_foreach() (e.g. in the order of -once per every entry in a hash table) should probably be reworked -to use additional or different data structures for reverse lookups -(keep in mind that an O(n) find/foreach operation issued for all n -values in a hash table ends up needing O(n*n) operations).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

hash_table

a GHashTable

 

predicate

function to test the key/value pairs for a certain property

 

user_data

user data to pass to the function

 
-
-
-

Returns

-

The value of the first key/value pair is returned, -for which predicate -evaluates to TRUE. If no pair with the -requested property is found, NULL is returned.

-

[nullable]

-
-

Since: 2.4

-
-
-
-

GHFunc ()

-
void
-(*GHFunc) (gpointer key,
-           gpointer value,
-           gpointer user_data);
-

Specifies the type of the function passed to g_hash_table_foreach(). -It is called with each key/value pair, together with the user_data - -parameter which is passed to g_hash_table_foreach().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

key

a key

 

value

the value corresponding to the key

 

user_data

user data passed to g_hash_table_foreach()

 
-
-
-
-
-

g_hash_table_remove ()

-
gboolean
-g_hash_table_remove (GHashTable *hash_table,
-                     gconstpointer key);
-

Removes a key and its associated value from a GHashTable.

-

If the GHashTable was created using g_hash_table_new_full(), the -key and value are freed using the supplied destroy functions, otherwise -you have to make sure that any dynamically allocated values are freed -yourself.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hash_table

a GHashTable

 

key

the key to remove

 
-
-
-

Returns

-

TRUE if the key was found and removed from the GHashTable

-
-
-
-
-

g_hash_table_steal ()

-
gboolean
-g_hash_table_steal (GHashTable *hash_table,
-                    gconstpointer key);
-

Removes a key and its associated value from a GHashTable without -calling the key and value destroy functions.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hash_table

a GHashTable

 

key

the key to remove

 
-
-
-

Returns

-

TRUE if the key was found and removed from the GHashTable

-
-
-
-
-

g_hash_table_foreach_remove ()

-
guint
-g_hash_table_foreach_remove (GHashTable *hash_table,
-                             GHRFunc func,
-                             gpointer user_data);
-

Calls the given function for each key/value pair in the -GHashTable. If the function returns TRUE, then the key/value -pair is removed from the GHashTable. If you supplied key or -value destroy functions when creating the GHashTable, they are -used to free the memory allocated for the removed keys and values.

-

See GHashTableIter for an alternative way to loop over the -key/value pairs in the hash table.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

hash_table

a GHashTable

 

func

the function to call for each key/value pair

 

user_data

user data to pass to the function

 
-
-
-

Returns

-

the number of key/value pairs removed

-
-
-
-
-

g_hash_table_foreach_steal ()

-
guint
-g_hash_table_foreach_steal (GHashTable *hash_table,
-                            GHRFunc func,
-                            gpointer user_data);
-

Calls the given function for each key/value pair in the -GHashTable. If the function returns TRUE, then the key/value -pair is removed from the GHashTable, but no key or value -destroy functions are called.

-

See GHashTableIter for an alternative way to loop over the -key/value pairs in the hash table.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

hash_table

a GHashTable

 

func

the function to call for each key/value pair

 

user_data

user data to pass to the function

 
-
-
-

Returns

-

the number of key/value pairs removed.

-
-
-
-
-

g_hash_table_remove_all ()

-
void
-g_hash_table_remove_all (GHashTable *hash_table);
-

Removes all keys and their associated values from a GHashTable.

-

If the GHashTable was created using g_hash_table_new_full(), -the keys and values are freed using the supplied destroy functions, -otherwise you have to make sure that any dynamically allocated -values are freed yourself.

-
-

Parameters

-
----- - - - - - -

hash_table

a GHashTable

 
-
-

Since: 2.12

-
-
-
-

g_hash_table_steal_all ()

-
void
-g_hash_table_steal_all (GHashTable *hash_table);
-

Removes all keys and their associated values from a GHashTable -without calling the key and value destroy functions.

-
-

Parameters

-
----- - - - - - -

hash_table

a GHashTable

 
-
-

Since: 2.12

-
-
-
-

g_hash_table_get_keys ()

-
GList *
-g_hash_table_get_keys (GHashTable *hash_table);
-

Retrieves every key inside hash_table -. The returned data is valid -until changes to the hash release those keys.

-

This iterates over every entry in the hash table to build its return value. -To iterate over the entries in a GHashTable more efficiently, use a -GHashTableIter.

-
-

Parameters

-
----- - - - - - -

hash_table

a GHashTable

 
-
-
-

Returns

-

a GList containing all the keys -inside the hash table. The content of the list is owned by the -hash table and should not be modified or freed. Use g_list_free() -when done using the list.

-

[transfer container]

-
-

Since: 2.14

-
-
-
-

g_hash_table_get_values ()

-
GList *
-g_hash_table_get_values (GHashTable *hash_table);
-

Retrieves every value inside hash_table -. The returned data -is valid until hash_table - is modified.

-

This iterates over every entry in the hash table to build its return value. -To iterate over the entries in a GHashTable more efficiently, use a -GHashTableIter.

-
-

Parameters

-
----- - - - - - -

hash_table

a GHashTable

 
-
-
-

Returns

-

a GList containing all the values -inside the hash table. The content of the list is owned by the -hash table and should not be modified or freed. Use g_list_free() -when done using the list.

-

[transfer container]

-
-

Since: 2.14

-
-
-
-

g_hash_table_get_keys_as_array ()

-
gpointer *
-g_hash_table_get_keys_as_array (GHashTable *hash_table,
-                                guint *length);
-

Retrieves every key inside hash_table -, as an array.

-

The returned array is NULL-terminated but may contain NULL as a -key. Use length - to determine the true length if it's possible that -NULL was used as the value for a key.

-

Note: in the common case of a string-keyed GHashTable, the return -value of this function can be conveniently cast to (const gchar **).

-

This iterates over every entry in the hash table to build its return value. -To iterate over the entries in a GHashTable more efficiently, use a -GHashTableIter.

-

You should always free the return result with g_free(). In the -above-mentioned case of a string-keyed hash table, it may be -appropriate to use g_strfreev() if you call g_hash_table_steal_all() -first to transfer ownership of the keys.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hash_table

a GHashTable

 

length

the length of the returned array.

[out]
-
-
-

Returns

-

a -NULL-terminated array containing each key from the table.

-

[array length=length][transfer container]

-
-

Since: 2.40

-
-
-
-

GHRFunc ()

-
gboolean
-(*GHRFunc) (gpointer key,
-            gpointer value,
-            gpointer user_data);
-

Specifies the type of the function passed to -g_hash_table_foreach_remove(). It is called with each key/value -pair, together with the user_data - parameter passed to -g_hash_table_foreach_remove(). It should return TRUE if the -key/value pair should be removed from the GHashTable.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

key

a key

 

value

the value associated with the key

 

user_data

user data passed to g_hash_table_remove()

 
-
-
-

Returns

-

TRUE if the key/value pair should be removed from the -GHashTable

-
-
-
-
-

g_hash_table_freeze()

-
#define             g_hash_table_freeze(hash_table)
-

g_hash_table_freeze is deprecated and should not be used in newly-written code.

-

This function is deprecated and will be removed in the next major -release of GLib. It does nothing.

-
-

Parameters

-
----- - - - - - -

hash_table

a GHashTable

 
-
-
-
-
-

g_hash_table_thaw()

-
#define             g_hash_table_thaw(hash_table)
-

g_hash_table_thaw is deprecated and should not be used in newly-written code.

-

This function is deprecated and will be removed in the next major -release of GLib. It does nothing.

-
-

Parameters

-
----- - - - - - -

hash_table

a GHashTable

 
-
-
-
-
-

g_hash_table_destroy ()

-
void
-g_hash_table_destroy (GHashTable *hash_table);
-

Destroys all keys and values in the GHashTable and decrements its -reference count by 1. If keys and/or values are dynamically allocated, -you should either free them first or create the GHashTable with destroy -notifiers using g_hash_table_new_full(). In the latter case the destroy -functions you supplied will be called on all keys and values during the -destruction phase.

-
-

Parameters

-
----- - - - - - -

hash_table

a GHashTable

 
-
-
-
-
-

g_hash_table_ref ()

-
GHashTable *
-g_hash_table_ref (GHashTable *hash_table);
-

Atomically increments the reference count of hash_table - by one. -This function is MT-safe and may be called from any thread.

-
-

Parameters

-
----- - - - - - -

hash_table

a valid GHashTable

 
-
-
-

Returns

-

the passed in GHashTable

-
-

Since: 2.10

-
-
-
-

g_hash_table_unref ()

-
void
-g_hash_table_unref (GHashTable *hash_table);
-

Atomically decrements the reference count of hash_table - by one. -If the reference count drops to 0, all keys and values will be -destroyed, and all memory allocated by the hash table is released. -This function is MT-safe and may be called from any thread.

-
-

Parameters

-
----- - - - - - -

hash_table

a valid GHashTable

 
-
-

Since: 2.10

-
-
-
-

g_hash_table_iter_init ()

-
void
-g_hash_table_iter_init (GHashTableIter *iter,
-                        GHashTable *hash_table);
-

Initializes a key/value pair iterator and associates it with -hash_table -. Modifying the hash table after calling this function -invalidates the returned iterator.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
GHashTableIter iter;
-gpointer key, value;
-
-g_hash_table_iter_init (&iter, hash_table);
-while (g_hash_table_iter_next (&iter, &key, &value))
-  {
-    // do something with key and value
-  }
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

iter

an uninitialized GHashTableIter

 

hash_table

a GHashTable

 
-
-

Since: 2.16

-
-
-
-

g_hash_table_iter_next ()

-
gboolean
-g_hash_table_iter_next (GHashTableIter *iter,
-                        gpointer *key,
-                        gpointer *value);
-

Advances iter - and retrieves the key and/or value that are now -pointed to as a result of this advancement. If FALSE is returned, -key - and value - are not set, and the iterator becomes invalid.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

iter

an initialized GHashTableIter

 

key

a location to store the key.

[out][optional]

value

a location to store the value.

[out][optional]
-
-
-

Returns

-

FALSE if the end of the GHashTable has been reached.

-
-

Since: 2.16

-
-
-
-

g_hash_table_iter_get_hash_table ()

-
GHashTable *
-g_hash_table_iter_get_hash_table (GHashTableIter *iter);
-

Returns the GHashTable associated with iter -.

-
-

Parameters

-
----- - - - - - -

iter

an initialized GHashTableIter

 
-
-
-

Returns

-

the GHashTable associated with iter -.

-
-

Since: 2.16

-
-
-
-

g_hash_table_iter_replace ()

-
void
-g_hash_table_iter_replace (GHashTableIter *iter,
-                           gpointer value);
-

Replaces the value currently pointed to by the iterator -from its associated GHashTable. Can only be called after -g_hash_table_iter_next() returned TRUE.

-

If you supplied a value_destroy_func - when creating the -GHashTable, the old value is freed using that function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

iter

an initialized GHashTableIter

 

value

the value to replace with

 
-
-

Since: 2.30

-
-
-
-

g_hash_table_iter_remove ()

-
void
-g_hash_table_iter_remove (GHashTableIter *iter);
-

Removes the key/value pair currently pointed to by the iterator -from its associated GHashTable. Can only be called after -g_hash_table_iter_next() returned TRUE, and cannot be called -more than once for the same key/value pair.

-

If the GHashTable was created using g_hash_table_new_full(), -the key and value are freed using the supplied destroy functions, -otherwise you have to make sure that any dynamically allocated -values are freed yourself.

-

It is safe to continue iterating the GHashTable afterward:

-
- - - - - - - -
1
-2
-3
-4
-5
while (g_hash_table_iter_next (&iter, &key, &value))
-  {
-    if (condition)
-      g_hash_table_iter_remove (&iter);
-  }
-
- -

-
-

Parameters

-
----- - - - - - -

iter

an initialized GHashTableIter

 
-
-

Since: 2.16

-
-
-
-

g_hash_table_iter_steal ()

-
void
-g_hash_table_iter_steal (GHashTableIter *iter);
-

Removes the key/value pair currently pointed to by the -iterator from its associated GHashTable, without calling -the key and value destroy functions. Can only be called -after g_hash_table_iter_next() returned TRUE, and cannot -be called more than once for the same key/value pair.

-
-

Parameters

-
----- - - - - - -

iter

an initialized GHashTableIter

 
-
-

Since: 2.16

-
-
-
-

g_direct_equal ()

-
gboolean
-g_direct_equal (gconstpointer v1,
-                gconstpointer v2);
-

Compares two gpointer arguments and returns TRUE if they are equal. -It can be passed to g_hash_table_new() as the key_equal_func - -parameter, when using opaque pointers compared by pointer value as -keys in a GHashTable.

-

This equality function is also appropriate for keys that are integers -stored in pointers, such as GINT_TO_POINTER (n).

-
-

Parameters

-
----- - - - - - - - - - - - - -

v1

a key.

[nullable]

v2

a key to compare with v1 -.

[nullable]
-
-
-

Returns

-

TRUE if the two keys match.

-
-
-
-
-

g_direct_hash ()

-
guint
-g_direct_hash (gconstpointer v);
-

Converts a gpointer to a hash value. -It can be passed to g_hash_table_new() as the hash_func - parameter, -when using opaque pointers compared by pointer value as keys in a -GHashTable.

-

This hash function is also appropriate for keys that are integers -stored in pointers, such as GINT_TO_POINTER (n).

-
-

Parameters

-
----- - - - - - -

v

a gpointer key.

[nullable]
-
-
-

Returns

-

a hash value corresponding to the key.

-
-
-
-
-

g_int_equal ()

-
gboolean
-g_int_equal (gconstpointer v1,
-             gconstpointer v2);
-

Compares the two gint values being pointed to and returns -TRUE if they are equal. -It can be passed to g_hash_table_new() as the key_equal_func - -parameter, when using non-NULL pointers to integers as keys in a -GHashTable.

-

Note that this function acts on pointers to gint, not on gint -directly: if your hash table's keys are of the form -GINT_TO_POINTER (n), use g_direct_equal() instead.

-
-

Parameters

-
----- - - - - - - - - - - - - -

v1

a pointer to a gint key.

[not nullable]

v2

a pointer to a gint key to compare with v1 -.

[not nullable]
-
-
-

Returns

-

TRUE if the two keys match.

-
-
-
-
-

g_int_hash ()

-
guint
-g_int_hash (gconstpointer v);
-

Converts a pointer to a gint to a hash value. -It can be passed to g_hash_table_new() as the hash_func - parameter, -when using non-NULL pointers to integer values as keys in a GHashTable.

-

Note that this function acts on pointers to gint, not on gint -directly: if your hash table's keys are of the form -GINT_TO_POINTER (n), use g_direct_hash() instead.

-
-

Parameters

-
----- - - - - - -

v

a pointer to a gint key.

[not nullable]
-
-
-

Returns

-

a hash value corresponding to the key.

-
-
-
-
-

g_int64_equal ()

-
gboolean
-g_int64_equal (gconstpointer v1,
-               gconstpointer v2);
-

Compares the two gint64 values being pointed to and returns -TRUE if they are equal. -It can be passed to g_hash_table_new() as the key_equal_func - -parameter, when using non-NULL pointers to 64-bit integers as keys in a -GHashTable.

-
-

Parameters

-
----- - - - - - - - - - - - - -

v1

a pointer to a gint64 key.

[not nullable]

v2

a pointer to a gint64 key to compare with v1 -.

[not nullable]
-
-
-

Returns

-

TRUE if the two keys match.

-
-

Since: 2.22

-
-
-
-

g_int64_hash ()

-
guint
-g_int64_hash (gconstpointer v);
-

Converts a pointer to a gint64 to a hash value.

-

It can be passed to g_hash_table_new() as the hash_func - parameter, -when using non-NULL pointers to 64-bit integer values as keys in a -GHashTable.

-
-

Parameters

-
----- - - - - - -

v

a pointer to a gint64 key.

[not nullable]
-
-
-

Returns

-

a hash value corresponding to the key.

-
-

Since: 2.22

-
-
-
-

g_double_equal ()

-
gboolean
-g_double_equal (gconstpointer v1,
-                gconstpointer v2);
-

Compares the two gdouble values being pointed to and returns -TRUE if they are equal. -It can be passed to g_hash_table_new() as the key_equal_func - -parameter, when using non-NULL pointers to doubles as keys in a -GHashTable.

-
-

Parameters

-
----- - - - - - - - - - - - - -

v1

a pointer to a gdouble key.

[not nullable]

v2

a pointer to a gdouble key to compare with v1 -.

[not nullable]
-
-
-

Returns

-

TRUE if the two keys match.

-
-

Since: 2.22

-
-
-
-

g_double_hash ()

-
guint
-g_double_hash (gconstpointer v);
-

Converts a pointer to a gdouble to a hash value. -It can be passed to g_hash_table_new() as the hash_func - parameter, -It can be passed to g_hash_table_new() as the hash_func - parameter, -when using non-NULL pointers to doubles as keys in a GHashTable.

-
-

Parameters

-
----- - - - - - -

v

a pointer to a gdouble key.

[not nullable]
-
-
-

Returns

-

a hash value corresponding to the key.

-
-

Since: 2.22

-
-
-
-

g_str_equal ()

-
gboolean
-g_str_equal (gconstpointer v1,
-             gconstpointer v2);
-

Compares two strings for byte-by-byte equality and returns TRUE -if they are equal. It can be passed to g_hash_table_new() as the -key_equal_func - parameter, when using non-NULL strings as keys in a -GHashTable.

-

Note that this function is primarily meant as a hash table comparison -function. For a general-purpose, NULL-safe string comparison function, -see g_strcmp0().

-
-

Parameters

-
----- - - - - - - - - - - - - -

v1

a key.

[not nullable]

v2

a key to compare with v1 -.

[not nullable]
-
-
-

Returns

-

TRUE if the two keys match

-
-
-
-
-

g_str_hash ()

-
guint
-g_str_hash (gconstpointer v);
-

Converts a string to a hash value.

-

This function implements the widely used "djb" hash apparently -posted by Daniel Bernstein to comp.lang.c some time ago. The 32 -bit unsigned hash value starts at 5381 and for each byte 'c' in -the string, is updated: hash = hash * 33 + c. This function -uses the signed value of each byte.

-

It can be passed to g_hash_table_new() as the hash_func - parameter, -when using non-NULL strings as keys in a GHashTable.

-

Note that this function may not be a perfect fit for all use cases. -For example, it produces some hash collisions with strings as short -as 2.

-
-

Parameters

-
----- - - - - - -

v

a string key.

[not nullable]
-
-
-

Returns

-

a hash value corresponding to the key

-
-
-
-
-

Types and Values

-
-

GHashTable

-
typedef struct _GHashTable GHashTable;
-

The GHashTable struct is an opaque data structure to represent a -Hash Table. It should only be accessed via the -following functions.

-
-
-
-

struct GHashTableIter

-
struct GHashTableIter {
-};
-
-

A GHashTableIter structure represents an iterator that can be used -to iterate over the elements of a GHashTable. GHashTableIter -structures are typically allocated on the stack and then initialized -with g_hash_table_iter_init().

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Hook-Functions.html b/docs/reference/glib/html/glib-Hook-Functions.html deleted file mode 100644 index 637506858..000000000 --- a/docs/reference/glib/html/glib-Hook-Functions.html +++ /dev/null @@ -1,1797 +0,0 @@ - - - - -Hook Functions: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Hook Functions

-

Hook Functions — support for manipulating lists of hook functions

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -(*GHookFinalizeFunc) () -
-void - -(*GHookFunc) () -
-gboolean - -(*GHookCheckFunc) () -
-void - -g_hook_list_init () -
-void - -g_hook_list_invoke () -
-void - -g_hook_list_invoke_check () -
-void - -g_hook_list_marshal () -
-void - -(*GHookMarshaller) () -
-void - -g_hook_list_marshal_check () -
-gboolean - -(*GHookCheckMarshaller) () -
-void - -g_hook_list_clear () -
-GHook * - -g_hook_alloc () -
#define -g_hook_append() -
-void - -g_hook_prepend () -
-void - -g_hook_insert_before () -
-void - -g_hook_insert_sorted () -
-gint - -(*GHookCompareFunc) () -
-gint - -g_hook_compare_ids () -
-GHook * - -g_hook_get () -
-GHook * - -g_hook_find () -
-gboolean - -(*GHookFindFunc) () -
-GHook * - -g_hook_find_data () -
-GHook * - -g_hook_find_func () -
-GHook * - -g_hook_find_func_data () -
-GHook * - -g_hook_first_valid () -
-GHook * - -g_hook_next_valid () -
#define -G_HOOK_FLAGS() -
#define -G_HOOK() -
#define -G_HOOK_IS_VALID() -
#define -G_HOOK_ACTIVE() -
#define -G_HOOK_IN_CALL() -
#define -G_HOOK_IS_UNLINKED() -
-GHook * - -g_hook_ref () -
-void - -g_hook_unref () -
-void - -g_hook_free () -
-gboolean - -g_hook_destroy () -
-void - -g_hook_destroy_link () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
structGHookList
structGHook
enumGHookFlagMask
#defineG_HOOK_FLAG_USER_SHIFT
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The GHookList, GHook and their related functions provide support for -lists of hook functions. Functions can be added and removed from the lists, -and the list of hook functions can be invoked.

-
-
-

Functions

-
-

GHookFinalizeFunc ()

-
void
-(*GHookFinalizeFunc) (GHookList *hook_list,
-                      GHook *hook);
-

Defines the type of function to be called when a hook in a -list of hooks gets finalized.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hook_list

a GHookList

 

hook

the hook in hook_list -that gets finalized

 
-
-
-
-
-

GHookFunc ()

-
void
-(*GHookFunc) (gpointer data);
-

Defines the type of a hook function that can be invoked -by g_hook_list_invoke().

-
-

Parameters

-
----- - - - - - -

data

the data field of the GHook is passed to the hook function here

 
-
-
-
-
-

GHookCheckFunc ()

-
gboolean
-(*GHookCheckFunc) (gpointer data);
-

Defines the type of a hook function that can be invoked -by g_hook_list_invoke_check().

-
-

Parameters

-
----- - - - - - -

data

the data field of the GHook is passed to the hook function here

 
-
-
-

Returns

-

FALSE if the GHook should be destroyed

-
-
-
-
-

g_hook_list_init ()

-
void
-g_hook_list_init (GHookList *hook_list,
-                  guint hook_size);
-

Initializes a GHookList. -This must be called before the GHookList is used.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hook_list

a GHookList

 

hook_size

the size of each element in the GHookList, -typically sizeof (GHook).

 
-
-
-
-
-

g_hook_list_invoke ()

-
void
-g_hook_list_invoke (GHookList *hook_list,
-                    gboolean may_recurse);
-

Calls all of the GHook functions in a GHookList.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hook_list

a GHookList

 

may_recurse

TRUE if functions which are already running -(e.g. in another thread) can be called. If set to FALSE, -these are skipped

 
-
-
-
-
-

g_hook_list_invoke_check ()

-
void
-g_hook_list_invoke_check (GHookList *hook_list,
-                          gboolean may_recurse);
-

Calls all of the GHook functions in a GHookList. -Any function which returns FALSE is removed from the GHookList.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hook_list

a GHookList

 

may_recurse

TRUE if functions which are already running -(e.g. in another thread) can be called. If set to FALSE, -these are skipped

 
-
-
-
-
-

g_hook_list_marshal ()

-
void
-g_hook_list_marshal (GHookList *hook_list,
-                     gboolean may_recurse,
-                     GHookMarshaller marshaller,
-                     gpointer marshal_data);
-

Calls a function on each valid GHook.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

hook_list

a GHookList

 

may_recurse

TRUE if hooks which are currently running -(e.g. in another thread) are considered valid. If set to FALSE, -these are skipped

 

marshaller

the function to call for each GHook

 

marshal_data

data to pass to marshaller -

 
-
-
-
-
-

GHookMarshaller ()

-
void
-(*GHookMarshaller) (GHook *hook,
-                    gpointer marshal_data);
-

Defines the type of function used by g_hook_list_marshal().

-
-

Parameters

-
----- - - - - - - - - - - - - -

hook

a GHook

 

marshal_data

user data

 
-
-
-
-
-

g_hook_list_marshal_check ()

-
void
-g_hook_list_marshal_check (GHookList *hook_list,
-                           gboolean may_recurse,
-                           GHookCheckMarshaller marshaller,
-                           gpointer marshal_data);
-

Calls a function on each valid GHook and destroys it if the -function returns FALSE.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

hook_list

a GHookList

 

may_recurse

TRUE if hooks which are currently running -(e.g. in another thread) are considered valid. If set to FALSE, -these are skipped

 

marshaller

the function to call for each GHook

 

marshal_data

data to pass to marshaller -

 
-
-
-
-
-

GHookCheckMarshaller ()

-
gboolean
-(*GHookCheckMarshaller) (GHook *hook,
-                         gpointer marshal_data);
-

Defines the type of function used by g_hook_list_marshal_check().

-
-

Parameters

-
----- - - - - - - - - - - - - -

hook

a GHook

 

marshal_data

user data

 
-
-
-

Returns

-

FALSE if hook -should be destroyed

-
-
-
-
-

g_hook_list_clear ()

-
void
-g_hook_list_clear (GHookList *hook_list);
-

Removes all the GHook elements from a GHookList.

-
-

Parameters

-
----- - - - - - -

hook_list

a GHookList

 
-
-
-
-
-

g_hook_alloc ()

-
GHook *
-g_hook_alloc (GHookList *hook_list);
-

Allocates space for a GHook and initializes it.

-
-

Parameters

-
----- - - - - - -

hook_list

a GHookList

 
-
-
-

Returns

-

a new GHook

-
-
-
-
-

g_hook_append()

-
#define             g_hook_append( hook_list, hook )
-

Appends a GHook onto the end of a GHookList.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hook_list

a GHookList

 

hook

the GHook to add to the end of hook_list -

 
-
-
-
-
-

g_hook_prepend ()

-
void
-g_hook_prepend (GHookList *hook_list,
-                GHook *hook);
-

Prepends a GHook on the start of a GHookList.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hook_list

a GHookList

 

hook

the GHook to add to the start of hook_list -

 
-
-
-
-
-

g_hook_insert_before ()

-
void
-g_hook_insert_before (GHookList *hook_list,
-                      GHook *sibling,
-                      GHook *hook);
-

Inserts a GHook into a GHookList, before a given GHook.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

hook_list

a GHookList

 

sibling

the GHook to insert the new GHook before.

[nullable]

hook

the GHook to insert

 
-
-
-
-
-

g_hook_insert_sorted ()

-
void
-g_hook_insert_sorted (GHookList *hook_list,
-                      GHook *hook,
-                      GHookCompareFunc func);
-

Inserts a GHook into a GHookList, sorted by the given function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

hook_list

a GHookList

 

hook

the GHook to insert

 

func

the comparison function used to sort the GHook elements

 
-
-
-
-
-

GHookCompareFunc ()

-
gint
-(*GHookCompareFunc) (GHook *new_hook,
-                     GHook *sibling);
-

Defines the type of function used to compare GHook elements in -g_hook_insert_sorted().

-
-

Parameters

-
----- - - - - - - - - - - - - -

new_hook

the GHook being inserted

 

sibling

the GHook to compare with new_hook -

 
-
-
-

Returns

-

a value <= 0 if new_hook -should be before sibling -

-
-
-
-
-

g_hook_compare_ids ()

-
gint
-g_hook_compare_ids (GHook *new_hook,
-                    GHook *sibling);
-

Compares the ids of two GHook elements, returning a negative value -if the second id is greater than the first.

-
-

Parameters

-
----- - - - - - - - - - - - - -

new_hook

a GHook

 

sibling

a GHook to compare with new_hook -

 
-
-
-

Returns

-

a value <= 0 if the id of sibling -is >= the id of new_hook -

-
-
-
-
-

g_hook_get ()

-
GHook *
-g_hook_get (GHookList *hook_list,
-            gulong hook_id);
-

Returns the GHook with the given id, or NULL if it is not found.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hook_list

a GHookList

 

hook_id

a hook id

 
-
-
-

Returns

-

the GHook with the given id, or NULL if it is not found

-
-
-
-
-

g_hook_find ()

-
GHook *
-g_hook_find (GHookList *hook_list,
-             gboolean need_valids,
-             GHookFindFunc func,
-             gpointer data);
-

Finds a GHook in a GHookList using the given function to -test for a match.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

hook_list

a GHookList

 

need_valids

TRUE if GHook elements which have been destroyed -should be skipped

 

func

the function to call for each GHook, which should return -TRUE when the GHook has been found

 

data

the data to pass to func -

 
-
-
-

Returns

-

the found GHook or NULL if no matching GHook is found

-
-
-
-
-

GHookFindFunc ()

-
gboolean
-(*GHookFindFunc) (GHook *hook,
-                  gpointer data);
-

Defines the type of the function passed to g_hook_find().

-
-

Parameters

-
----- - - - - - - - - - - - - -

hook

a GHook

 

data

user data passed to g_hook_find_func()

 
-
-
-

Returns

-

TRUE if the required GHook has been found

-
-
-
-
-

g_hook_find_data ()

-
GHook *
-g_hook_find_data (GHookList *hook_list,
-                  gboolean need_valids,
-                  gpointer data);
-

Finds a GHook in a GHookList with the given data.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

hook_list

a GHookList

 

need_valids

TRUE if GHook elements which have been destroyed -should be skipped

 

data

the data to find

 
-
-
-

Returns

-

the GHook with the given data -or NULL if no matching -GHook is found

-
-
-
-
-

g_hook_find_func ()

-
GHook *
-g_hook_find_func (GHookList *hook_list,
-                  gboolean need_valids,
-                  gpointer func);
-

Finds a GHook in a GHookList with the given function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

hook_list

a GHookList

 

need_valids

TRUE if GHook elements which have been destroyed -should be skipped

 

func

the function to find

 
-
-
-

Returns

-

the GHook with the given func -or NULL if no matching -GHook is found

-
-
-
-
-

g_hook_find_func_data ()

-
GHook *
-g_hook_find_func_data (GHookList *hook_list,
-                       gboolean need_valids,
-                       gpointer func,
-                       gpointer data);
-

Finds a GHook in a GHookList with the given function and data.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

hook_list

a GHookList

 

need_valids

TRUE if GHook elements which have been destroyed -should be skipped

 

func

the function to find.

[not nullable]

data

the data to find

 
-
-
-

Returns

-

the GHook with the given func -and data -or NULL if -no matching GHook is found

-
-
-
-
-

g_hook_first_valid ()

-
GHook *
-g_hook_first_valid (GHookList *hook_list,
-                    gboolean may_be_in_call);
-

Returns the first GHook in a GHookList which has not been destroyed. -The reference count for the GHook is incremented, so you must call -g_hook_unref() to restore it when no longer needed. (Or call -g_hook_next_valid() if you are stepping through the GHookList.)

-
-

Parameters

-
----- - - - - - - - - - - - - -

hook_list

a GHookList

 

may_be_in_call

TRUE if hooks which are currently running -(e.g. in another thread) are considered valid. If set to FALSE, -these are skipped

 
-
-
-

Returns

-

the first valid GHook, or NULL if none are valid

-
-
-
-
-

g_hook_next_valid ()

-
GHook *
-g_hook_next_valid (GHookList *hook_list,
-                   GHook *hook,
-                   gboolean may_be_in_call);
-

Returns the next GHook in a GHookList which has not been destroyed. -The reference count for the GHook is incremented, so you must call -g_hook_unref() to restore it when no longer needed. (Or continue to call -g_hook_next_valid() until NULL is returned.)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

hook_list

a GHookList

 

hook

the current GHook

 

may_be_in_call

TRUE if hooks which are currently running -(e.g. in another thread) are considered valid. If set to FALSE, -these are skipped

 
-
-
-

Returns

-

the next valid GHook, or NULL if none are valid

-
-
-
-
-

G_HOOK_FLAGS()

-
#define G_HOOK_FLAGS(hook)		(G_HOOK (hook)->flags)
-
-

Gets the flags of a hook.

-
-

Parameters

-
----- - - - - - -

hook

a GHook

 
-
-
-
-
-

G_HOOK()

-
#define G_HOOK(hook)			((GHook*) (hook))
-
-

Casts a pointer to a GHook*.

-
-

Parameters

-
----- - - - - - -

hook

a pointer

 
-
-
-
-
-

G_HOOK_IS_VALID()

-
#define             G_HOOK_IS_VALID(hook)
-

Returns TRUE if the GHook is valid, i.e. it is in a GHookList, -it is active and it has not been destroyed.

-
-

Parameters

-
----- - - - - - -

hook

a GHook

 
-
-
-

Returns

-

TRUE if the GHook is valid

-
-
-
-
-

G_HOOK_ACTIVE()

-
#define             G_HOOK_ACTIVE(hook)
-

Returns TRUE if the GHook is active, which is normally the case -until the GHook is destroyed.

-
-

Parameters

-
----- - - - - - -

hook

a GHook

 
-
-
-

Returns

-

TRUE if the GHook is active

-
-
-
-
-

G_HOOK_IN_CALL()

-
#define             G_HOOK_IN_CALL(hook)
-

Returns TRUE if the GHook function is currently executing.

-
-

Parameters

-
----- - - - - - -

hook

a GHook

 
-
-
-

Returns

-

TRUE if the GHook function is currently executing

-
-
-
-
-

G_HOOK_IS_UNLINKED()

-
#define             G_HOOK_IS_UNLINKED(hook)
-

Returns TRUE if the GHook is not in a GHookList.

-
-

Parameters

-
----- - - - - - -

hook

a GHook

 
-
-
-

Returns

-

TRUE if the GHook is not in a GHookList

-
-
-
-
-

g_hook_ref ()

-
GHook *
-g_hook_ref (GHookList *hook_list,
-            GHook *hook);
-

Increments the reference count for a GHook.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hook_list

a GHookList

 

hook

the GHook to increment the reference count of

 
-
-
-

Returns

-

the hook -that was passed in (since 2.6)

-
-
-
-
-

g_hook_unref ()

-
void
-g_hook_unref (GHookList *hook_list,
-              GHook *hook);
-

Decrements the reference count of a GHook. -If the reference count falls to 0, the GHook is removed -from the GHookList and g_hook_free() is called to free it.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hook_list

a GHookList

 

hook

the GHook to unref

 
-
-
-
-
-

g_hook_free ()

-
void
-g_hook_free (GHookList *hook_list,
-             GHook *hook);
-

Calls the GHookList finalize_hook - function if it exists, -and frees the memory allocated for the GHook.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hook_list

a GHookList

 

hook

the GHook to free

 
-
-
-
-
-

g_hook_destroy ()

-
gboolean
-g_hook_destroy (GHookList *hook_list,
-                gulong hook_id);
-

Destroys a GHook, given its ID.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hook_list

a GHookList

 

hook_id

a hook ID

 
-
-
-

Returns

-

TRUE if the GHook was found in the GHookList and destroyed

-
-
-
-
-

g_hook_destroy_link ()

-
void
-g_hook_destroy_link (GHookList *hook_list,
-                     GHook *hook);
-

Removes one GHook from a GHookList, marking it -inactive and calling g_hook_unref() on it.

-
-

Parameters

-
----- - - - - - - - - - - - - -

hook_list

a GHookList

 

hook

the GHook to remove

 
-
-
-
-
-

Types and Values

-
-

struct GHookList

-
struct GHookList {
-  gulong	    seq_id;
-  guint		    hook_size : 16;
-  guint		    is_setup : 1;
-  GHook		   *hooks;
-  gpointer	    dummy3;
-  GHookFinalizeFunc finalize_hook;
-  gpointer	    dummy[2];
-};
-
-

The GHookList struct represents a list of hook functions.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

gulong seq_id;

the next free GHook id

 

guint hook_size : 16;

the size of the GHookList elements, in bytes

 

guint is_setup : 1;

1 if the GHookList has been initialized

 

GHook *hooks;

the first GHook element in the list

 

gpointer dummy3;

unused

 

GHookFinalizeFunc finalize_hook;

the function to call to finalize a GHook element. -The default behaviour is to call the hooks destroy -function

 

gpointer dummy[2];

unused

 
-
-
-
-
-

struct GHook

-
struct GHook {
-  gpointer	 data;
-  GHook		*next;
-  GHook		*prev;
-  guint		 ref_count;
-  gulong	 hook_id;
-  guint		 flags;
-  gpointer	 func;
-  GDestroyNotify destroy;
-};
-
-

The GHook struct represents a single hook function in a GHookList.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

gpointer data;

data which is passed to func when this hook is invoked

 

GHook *next;

pointer to the next hook in the list

 

GHook *prev;

pointer to the previous hook in the list

 

guint ref_count;

the reference count of this hook

 

gulong hook_id;

the id of this hook, which is unique within its list

 

guint flags;

flags which are set for this hook. See GHookFlagMask for -predefined flags

 

gpointer func;

the function to call when this hook is invoked. The possible -signatures for this function are GHookFunc and GHookCheckFunc

 

GDestroyNotify destroy;

the default finalize_hook -function of a GHookList calls -this member of the hook that is being finalized

 
-
-
-
-
-

enum GHookFlagMask

-

Flags used internally in the GHook implementation.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_HOOK_FLAG_ACTIVE

-

set if the hook has not been destroyed

-
 

G_HOOK_FLAG_IN_CALL

-

set if the hook is currently being run

-
 

G_HOOK_FLAG_MASK

-

A mask covering all bits reserved for - hook flags; see G_HOOK_FLAG_USER_SHIFT

-
 
-
-
-
-
-

G_HOOK_FLAG_USER_SHIFT

-
#define G_HOOK_FLAG_USER_SHIFT (4)
-
-

The position of the first bit which is not reserved for internal -use be the GHook implementation, i.e. -1 << G_HOOK_FLAG_USER_SHIFT is the first -bit which can be used for application-defined flags.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Hostname-Utilities.html b/docs/reference/glib/html/glib-Hostname-Utilities.html deleted file mode 100644 index 91124f989..000000000 --- a/docs/reference/glib/html/glib-Hostname-Utilities.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - -Hostname Utilities: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Hostname Utilities

-

Hostname Utilities — Internet hostname utilities

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - -
-gchar * - -g_hostname_to_ascii () -
-gchar * - -g_hostname_to_unicode () -
-gboolean - -g_hostname_is_non_ascii () -
-gboolean - -g_hostname_is_ascii_encoded () -
-gboolean - -g_hostname_is_ip_address () -
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

Functions for manipulating internet hostnames; in particular, for -converting between Unicode and ASCII-encoded forms of -Internationalized Domain Names (IDNs).

-

The -Internationalized Domain Names for Applications (IDNA) -standards allow for the use -of Unicode domain names in applications, while providing -backward-compatibility with the old ASCII-only DNS, by defining an -ASCII-Compatible Encoding of any given Unicode name, which can be -used with non-IDN-aware applications and protocols. (For example, -"Παν語.org" maps to "xn--4wa8awb4637h.org".)

-
-
-

Functions

-
-

g_hostname_to_ascii ()

-
gchar *
-g_hostname_to_ascii (const gchar *hostname);
-

Converts hostname - to its canonical ASCII form; an ASCII-only -string containing no uppercase letters and not ending with a -trailing dot.

-
-

Parameters

-
----- - - - - - -

hostname

a valid UTF-8 or ASCII hostname

 
-
-
-

Returns

-

an ASCII hostname, which must be freed, or NULL if -hostname -is in some way invalid.

-
-

Since: 2.22

-
-
-
-

g_hostname_to_unicode ()

-
gchar *
-g_hostname_to_unicode (const gchar *hostname);
-

Converts hostname - to its canonical presentation form; a UTF-8 -string in Unicode normalization form C, containing no uppercase -letters, no forbidden characters, and no ASCII-encoded segments, -and not ending with a trailing dot.

-

Of course if hostname - is not an internationalized hostname, then -the canonical presentation form will be entirely ASCII.

-
-

Parameters

-
----- - - - - - -

hostname

a valid UTF-8 or ASCII hostname

 
-
-
-

Returns

-

a UTF-8 hostname, which must be freed, or NULL if -hostname -is in some way invalid.

-
-

Since: 2.22

-
-
-
-

g_hostname_is_non_ascii ()

-
gboolean
-g_hostname_is_non_ascii (const gchar *hostname);
-

Tests if hostname - contains Unicode characters. If this returns -TRUE, you need to encode the hostname with g_hostname_to_ascii() -before using it in non-IDN-aware contexts.

-

Note that a hostname might contain a mix of encoded and unencoded -segments, and so it is possible for g_hostname_is_non_ascii() and -g_hostname_is_ascii_encoded() to both return TRUE for a name.

-
-

Parameters

-
----- - - - - - -

hostname

a hostname

 
-
-
-

Returns

-

TRUE if hostname -contains any non-ASCII characters

-
-

Since: 2.22

-
-
-
-

g_hostname_is_ascii_encoded ()

-
gboolean
-g_hostname_is_ascii_encoded (const gchar *hostname);
-

Tests if hostname - contains segments with an ASCII-compatible -encoding of an Internationalized Domain Name. If this returns -TRUE, you should decode the hostname with g_hostname_to_unicode() -before displaying it to the user.

-

Note that a hostname might contain a mix of encoded and unencoded -segments, and so it is possible for g_hostname_is_non_ascii() and -g_hostname_is_ascii_encoded() to both return TRUE for a name.

-
-

Parameters

-
----- - - - - - -

hostname

a hostname

 
-
-
-

Returns

-

TRUE if hostname -contains any ASCII-encoded -segments.

-
-

Since: 2.22

-
-
-
-

g_hostname_is_ip_address ()

-
gboolean
-g_hostname_is_ip_address (const gchar *hostname);
-

Tests if hostname - is the string form of an IPv4 or IPv6 address. -(Eg, "192.168.0.1".)

-
-

Parameters

-
----- - - - - - -

hostname

a hostname (or IP address in string form)

 
-
-
-

Returns

-

TRUE if hostname -is an IP address

-
-

Since: 2.22

-
-
-
-

Types and Values

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-I18N.html b/docs/reference/glib/html/glib-I18N.html deleted file mode 100644 index 5901b4e1b..000000000 --- a/docs/reference/glib/html/glib-I18N.html +++ /dev/null @@ -1,815 +0,0 @@ - - - - -Internationalization: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Internationalization

-

Internationalization — gettext support macros

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -Q_() -
#define -C_() -
#define -N_() -
#define -NC_() -
const gchar * - -g_dgettext () -
const gchar * - -g_dcgettext () -
const gchar * - -g_dngettext () -
const gchar * - -g_dpgettext () -
const gchar * - -g_dpgettext2 () -
const gchar * - -g_strip_context () -
const gchar * const * - -g_get_language_names () -
-gchar ** - -g_get_locale_variants () -
-
-
-

Includes

-
#include <glib.h>
-#include <glib/gi18n.h>
-
-
-
-

Description

-

GLib doesn't force any particular localization method upon its users. -But since GLib itself is localized using the gettext() mechanism, it seems -natural to offer the de-facto standard gettext() support macros in an -easy-to-use form.

-

In order to use these macros in an application, you must include -<glib/gi18n.h>. For use in a library, you must include -<glib/gi18n-lib.h> -after defining the GETTEXT_PACKAGE macro suitably for your library:

-
- - - - - - - -
1
-2
#define GETTEXT_PACKAGE "gtk20"
-#include <glib/gi18n-lib.h>
-
- -

-For an application, note that you also have to call bindtextdomain(), -bind_textdomain_codeset(), textdomain() and setlocale() early on in your -main() to make gettext() work. For example:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
#include <glib/gi18n.h>
-#include <locale.h>
-
-int
-main (int argc, char **argv)
-{
-  setlocale (LC_ALL, "");
-  bindtextdomain (GETTEXT_PACKAGE, DATADIR "/locale");
-  bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-  textdomain (GETTEXT_PACKAGE);
-
-  // Rest of your application.
-}
-
- -

-where DATADIR is as typically provided by automake.

-

For a library, you only have to call bindtextdomain() and -bind_textdomain_codeset() in your initialization function. If your library -doesn't have an initialization function, you can call the functions before -the first translated message.

-

The -gettext manual -covers details of how to integrate gettext into a project’s build system and -workflow.

-
-
-

Functions

-
-

Q_()

-
#define             Q_(String)
-

Like _(), but handles context in message ids. This has the advantage -that the string can be adorned with a prefix to guarantee uniqueness -and provide context to the translator.

-

One use case given in the gettext manual is GUI translation, where one -could e.g. disambiguate two "Open" menu entries as "File|Open" and -"Printer|Open". Another use case is the string "Russian" which may -have to be translated differently depending on whether it's the name -of a character set or a language. This could be solved by using -"charset|Russian" and "language|Russian".

-

See the C_() macro for a different way to mark up translatable strings -with context.

-

If you are using the Q_() macro, you need to make sure that you pass ---keyword=Q_ to xgettext when extracting messages. -If you are using GNU gettext >= 0.15, you can also use ---keyword=Q_:1g to let xgettext split the context -string off into a msgctxt line in the po file.

-
-

Parameters

-
----- - - - - - -

String

the string to be translated, with a '|'-separated prefix -which must not be translated

 
-
-
-

Returns

-

the translated message

-
-

Since: 2.4

-
-
-
-

C_()

-
#define             C_(Context,String)
-

Uses gettext to get the translation for String -. Context - is -used as a context. This is mainly useful for short strings which -may need different translations, depending on the context in which -they are used.

-
- - - - - - - -
1
-2
label1 = C_("Navigation", "Back");
-label2 = C_("Body part", "Back");
-
- -

-

If you are using the C_() macro, you need to make sure that you pass ---keyword=C_:1c,2 to xgettext when extracting messages. -Note that this only works with GNU gettext >= 0.15.

-
-

Parameters

-
----- - - - - - - - - - - - - -

Context

a message context, must be a string literal

 

String

a message id, must be a string literal

 
-
-
-

Returns

-

the translated message

-
-

Since: 2.16

-
-
-
-

N_()

-
#define             N_(String)
-

Only marks a string for translation. This is useful in situations -where the translated strings can't be directly used, e.g. in string -array initializers. To get the translated string, call gettext() -at runtime.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
{
-  static const char *messages[] = {
-    N_("some very meaningful message"),
-    N_("and another one")
-  };
-  const char *string;
-  ...
-  string
-    = index &gt; 1 ? _("a default message") : gettext (messages[index]);
-
-  fputs (string);
-  ...
-}
-
- -

-
-

Parameters

-
----- - - - - - -

String

the string to be translated

 
-
-

Since: 2.4

-
-
-
-

NC_()

-
#define             NC_(Context, String)
-

Only marks a string for translation, with context. -This is useful in situations where the translated strings can't -be directly used, e.g. in string array initializers. To get the -translated string, you should call g_dpgettext2() at runtime.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
{
-  static const char *messages[] = {
-    NC_("some context", "some very meaningful message"),
-    NC_("some context", "and another one")
-  };
-  const char *string;
-  ...
-  string
-    = index > 1 ? g_dpgettext2 (NULL, "some context", "a default message")
-                : g_dpgettext2 (NULL, "some context", messages[index]);
-
-  fputs (string);
-  ...
-}
-
- -

-

If you are using the NC_() macro, you need to make sure that you pass ---keyword=NC_:1c,2 to xgettext when extracting messages. -Note that this only works with GNU gettext >= 0.15. Intltool has support -for the NC_() macro since version 0.40.1.

-
-

Parameters

-
----- - - - - - - - - - - - - -

Context

a message context, must be a string literal

 

String

a message id, must be a string literal

 
-
-

Since: 2.18

-
-
-
-

g_dgettext ()

-
const gchar *
-g_dgettext (const gchar *domain,
-            const gchar *msgid);
-

This function is a wrapper of dgettext() which does not translate -the message if the default domain as set with textdomain() has no -translations for the current locale.

-

The advantage of using this function over dgettext() proper is that -libraries using this function (like GTK+) will not use translations -if the application using the library does not have translations for -the current locale. This results in a consistent English-only -interface instead of one having partial translations. For this -feature to work, the call to textdomain() and setlocale() should -precede any g_dgettext() invocations. For GTK+, it means calling -textdomain() before gtk_init or its variants.

-

This function disables translations if and only if upon its first -call all the following conditions hold:

-
    -
  • domain - is not NULL

  • -
  • textdomain() has been called to set a default text domain

  • -
  • there is no translations available for the default text domain -and the current locale

  • -
  • current locale is not "C" or any English locales (those -starting with "en_")

  • -
-

Note that this behavior may not be desired for example if an application -has its untranslated messages in a language other than English. In those -cases the application should call textdomain() after initializing GTK+.

-

Applications should normally not use this function directly, -but use the _() macro for translations.

-
-

Parameters

-
----- - - - - - - - - - - - - -

domain

the translation domain to use, or NULL to use -the domain set with textdomain().

[nullable]

msgid

message to translate

 
-
-
-

Returns

-

The translated string

-
-

Since: 2.18

-
-
-
-

g_dcgettext ()

-
const gchar *
-g_dcgettext (const gchar *domain,
-             const gchar *msgid,
-             gint category);
-

This is a variant of g_dgettext() that allows specifying a locale -category instead of always using LC_MESSAGES. See g_dgettext() for -more information about how this functions differs from calling -dcgettext() directly.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

domain

the translation domain to use, or NULL to use -the domain set with textdomain().

[nullable]

msgid

message to translate

 

category

a locale category

 
-
-
-

Returns

-

the translated string for the given locale category

-
-

Since: 2.26

-
-
-
-

g_dngettext ()

-
const gchar *
-g_dngettext (const gchar *domain,
-             const gchar *msgid,
-             const gchar *msgid_plural,
-             gulong n);
-

This function is a wrapper of dngettext() which does not translate -the message if the default domain as set with textdomain() has no -translations for the current locale.

-

See g_dgettext() for details of how this differs from dngettext() -proper.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

domain

the translation domain to use, or NULL to use -the domain set with textdomain().

[nullable]

msgid

message to translate

 

msgid_plural

plural form of the message

 

n

the quantity for which translation is needed

 
-
-
-

Returns

-

The translated string

-
-

Since: 2.18

-
-
-
-

g_dpgettext ()

-
const gchar *
-g_dpgettext (const gchar *domain,
-             const gchar *msgctxtid,
-             gsize msgidoffset);
-

This function is a variant of g_dgettext() which supports -a disambiguating message context. GNU gettext uses the -'\004' character to separate the message context and -message id in msgctxtid -. -If 0 is passed as msgidoffset -, this function will fall back to -trying to use the deprecated convention of using "|" as a separation -character.

-

This uses g_dgettext() internally. See that functions for differences -with dgettext() proper.

-

Applications should normally not use this function directly, -but use the C_() macro for translations with context.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

domain

the translation domain to use, or NULL to use -the domain set with textdomain().

[nullable]

msgctxtid

a combined message context and message id, separated -by a \004 character

 

msgidoffset

the offset of the message id in msgctxid -

 
-
-
-

Returns

-

The translated string

-
-

Since: 2.16

-
-
-
-

g_dpgettext2 ()

-
const gchar *
-g_dpgettext2 (const gchar *domain,
-              const gchar *context,
-              const gchar *msgid);
-

This function is a variant of g_dgettext() which supports -a disambiguating message context. GNU gettext uses the -'\004' character to separate the message context and -message id in msgctxtid -.

-

This uses g_dgettext() internally. See that functions for differences -with dgettext() proper.

-

This function differs from C_() in that it is not a macro and -thus you may use non-string-literals as context and msgid arguments.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

domain

the translation domain to use, or NULL to use -the domain set with textdomain().

[nullable]

context

the message context

 

msgid

the message

 
-
-
-

Returns

-

The translated string

-
-

Since: 2.18

-
-
-
-

g_strip_context ()

-
const gchar *
-g_strip_context (const gchar *msgid,
-                 const gchar *msgval);
-

An auxiliary function for gettext() support (see Q_()).

-
-

Parameters

-
----- - - - - - - - - - - - - -

msgid

a string

 

msgval

another string

 
-
-
-

Returns

-

msgval -, unless msgval -is identical to msgid -and contains a '|' character, in which case a pointer to -the substring of msgid after the first '|' character is returned.

-
-

Since: 2.4

-
-
-
-

g_get_language_names ()

-
const gchar * const *
-g_get_language_names (void);
-

Computes a list of applicable locale names, which can be used to -e.g. construct locale-dependent filenames or search paths. The returned -list is sorted from most desirable to least desirable and always contains -the default locale "C".

-

For example, if LANGUAGE=de:en_US, then the returned list is -"de", "en_US", "en", "C".

-

This function consults the environment variables LANGUAGE, LC_ALL, -LC_MESSAGES and LANG to find the list of locales specified by the -user.

-
-

Returns

-

a NULL-terminated array of strings owned by GLib -that must not be modified or freed.

-

[array zero-terminated=1][transfer none]

-
-

Since: 2.6

-
-
-
-

g_get_locale_variants ()

-
gchar **
-g_get_locale_variants (const gchar *locale);
-

Returns a list of derived variants of locale -, which can be used to -e.g. construct locale-dependent filenames or search paths. The returned -list is sorted from most desirable to least desirable. -This function handles territory, charset and extra locale modifiers.

-

For example, if locale - is "fr_BE", then the returned list -is "fr_BE", "fr".

-

If you need the list of variants for the current locale, -use g_get_language_names().

-
-

Parameters

-
----- - - - - - -

locale

a locale identifier

 
-
-
-

Returns

-

a newly -allocated array of newly allocated strings with the locale variants. Free with -g_strfreev().

-

[transfer full][array zero-terminated=1][element-type utf8]

-
-

Since: 2.28

-
-
-
-

Types and Values

-
-
-

See Also

-

the gettext manual

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-IO-Channels.html b/docs/reference/glib/html/glib-IO-Channels.html deleted file mode 100644 index 7fb77cc93..000000000 --- a/docs/reference/glib/html/glib-IO-Channels.html +++ /dev/null @@ -1,2627 +0,0 @@ - - - - -IO Channels: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

IO Channels

-

IO Channels — portable support for using files, pipes and sockets

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GIOChannel * - -g_io_channel_unix_new () -
-gint - -g_io_channel_unix_get_fd () -
-GIOChannel * - -g_io_channel_win32_new_fd () -
-GIOChannel * - -g_io_channel_win32_new_socket () -
-GIOChannel * - -g_io_channel_win32_new_messages () -
-void - -g_io_channel_init () -
-GIOChannel * - -g_io_channel_new_file () -
-GIOStatus - -g_io_channel_read_chars () -
-GIOStatus - -g_io_channel_read_unichar () -
-GIOStatus - -g_io_channel_read_line () -
-GIOStatus - -g_io_channel_read_line_string () -
-GIOStatus - -g_io_channel_read_to_end () -
-GIOStatus - -g_io_channel_write_chars () -
-GIOStatus - -g_io_channel_write_unichar () -
-GIOStatus - -g_io_channel_flush () -
-GIOStatus - -g_io_channel_seek_position () -
-GIOStatus - -g_io_channel_shutdown () -
-GIOChannelError - -g_io_channel_error_from_errno () -
-GIOChannel * - -g_io_channel_ref () -
-void - -g_io_channel_unref () -
-GSource * - -g_io_create_watch () -
-guint - -g_io_add_watch () -
-guint - -g_io_add_watch_full () -
-gboolean - -(*GIOFunc) () -
-gsize - -g_io_channel_get_buffer_size () -
-void - -g_io_channel_set_buffer_size () -
-GIOCondition - -g_io_channel_get_buffer_condition () -
-GIOFlags - -g_io_channel_get_flags () -
-GIOStatus - -g_io_channel_set_flags () -
const gchar * - -g_io_channel_get_line_term () -
-void - -g_io_channel_set_line_term () -
-gboolean - -g_io_channel_get_buffered () -
-void - -g_io_channel_set_buffered () -
const gchar * - -g_io_channel_get_encoding () -
-GIOStatus - -g_io_channel_set_encoding () -
-gboolean - -g_io_channel_get_close_on_unref () -
-void - -g_io_channel_set_close_on_unref () -
-GIOError - -g_io_channel_read () -
-GIOError - -g_io_channel_write () -
-GIOError - -g_io_channel_seek () -
-void - -g_io_channel_close () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
structGIOChannel
enumGSeekType
enumGIOStatus
enumGIOChannelError
#defineG_IO_CHANNEL_ERROR
enumGIOCondition
structGIOFuncs
enumGIOFlags
enumGIOError
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The GIOChannel data type aims to provide a portable method for -using file descriptors, pipes, and sockets, and integrating them -into the main event loop. Currently, -full support is available on UNIX platforms, support for Windows -is only partially complete.

-

To create a new GIOChannel on UNIX systems use -g_io_channel_unix_new(). This works for plain file descriptors, -pipes and sockets. Alternatively, a channel can be created for a -file in a system independent manner using g_io_channel_new_file().

-

Once a GIOChannel has been created, it can be used in a generic -manner with the functions g_io_channel_read_chars(), -g_io_channel_write_chars(), g_io_channel_seek_position(), and -g_io_channel_shutdown().

-

To add a GIOChannel to the main event loop, -use g_io_add_watch() or g_io_add_watch_full(). Here you specify which -events you are interested in on the GIOChannel, and provide a -function to be called whenever these events occur.

-

GIOChannel instances are created with an initial reference count of 1. -g_io_channel_ref() and g_io_channel_unref() can be used to -increment or decrement the reference count respectively. When the -reference count falls to 0, the GIOChannel is freed. (Though it -isn't closed automatically, unless it was created using -g_io_channel_new_file().) Using g_io_add_watch() or -g_io_add_watch_full() increments a channel's reference count.

-

The new functions g_io_channel_read_chars(), -g_io_channel_read_line(), g_io_channel_read_line_string(), -g_io_channel_read_to_end(), g_io_channel_write_chars(), -g_io_channel_seek_position(), and g_io_channel_flush() should not be -mixed with the deprecated functions g_io_channel_read(), -g_io_channel_write(), and g_io_channel_seek() on the same channel.

-
-
-

Functions

-
-

g_io_channel_unix_new ()

-
GIOChannel *
-g_io_channel_unix_new (int fd);
-

Creates a new GIOChannel given a file descriptor. On UNIX systems -this works for plain files, pipes, and sockets.

-

The returned GIOChannel has a reference count of 1.

-

The default encoding for GIOChannel is UTF-8. If your application -is reading output from a command using via pipe, you may need to set -the encoding to the encoding of the current locale (see -g_get_charset()) with the g_io_channel_set_encoding() function.

-

If you want to read raw binary data without interpretation, then -call the g_io_channel_set_encoding() function with NULL for the -encoding argument.

-

This function is available in GLib on Windows, too, but you should -avoid using it on Windows. The domain of file descriptors and -sockets overlap. There is no way for GLib to know which one you mean -in case the argument you pass to this function happens to be both a -valid file descriptor and socket. If that happens a warning is -issued, and GLib assumes that it is the file descriptor you mean.

-
-

Parameters

-
----- - - - - - -

fd

a file descriptor.

 
-
-
-

Returns

-

a new GIOChannel.

-
-
-
-
-

g_io_channel_unix_get_fd ()

-
gint
-g_io_channel_unix_get_fd (GIOChannel *channel);
-

Returns the file descriptor of the GIOChannel.

-

On Windows this function returns the file descriptor or socket of -the GIOChannel.

-
-

Parameters

-
----- - - - - - -

channel

a GIOChannel, created with g_io_channel_unix_new().

 
-
-
-

Returns

-

the file descriptor of the GIOChannel.

-
-
-
-
-

g_io_channel_win32_new_fd ()

-
GIOChannel *
-g_io_channel_win32_new_fd (gint fd);
-

Creates a new GIOChannel given a file descriptor on Windows. This -works for file descriptors from the C runtime.

-

This function works for file descriptors as returned by the open(), -creat(), pipe() and fileno() calls in the Microsoft C runtime. In -order to meaningfully use this function your code should use the -same C runtime as GLib uses, which is msvcrt.dll. Note that in -current Microsoft compilers it is near impossible to convince it to -build code that would use msvcrt.dll. The last Microsoft compiler -version that supported using msvcrt.dll as the C runtime was version

-
  1. The GNU compiler and toolchain for Windows, also known as Mingw, -fully supports msvcrt.dll.

-

If you have created a GIOChannel for a file descriptor and started -watching (polling) it, you shouldn't call read() on the file -descriptor. This is because adding polling for a file descriptor is -implemented in GLib on Windows by starting a thread that sits -blocked in a read() from the file descriptor most of the time. All -reads from the file descriptor should be done by this internal GLib -thread. Your code should call only g_io_channel_read().

-

This function is available only in GLib on Windows.

-
-

Parameters

-
----- - - - - - -

fd

a C library file descriptor.

 
-
-
-

Returns

-

a new GIOChannel.

-
-
-
-
-

g_io_channel_win32_new_socket ()

-
GIOChannel *
-g_io_channel_win32_new_socket (gint socket);
-

Creates a new GIOChannel given a socket on Windows.

-

This function works for sockets created by Winsock. It's available -only in GLib on Windows.

-

Polling a GSource created to watch a channel for a socket puts the -socket in non-blocking mode. This is a side-effect of the -implementation and unavoidable.

-
-

Parameters

-
----- - - - - - -

socket

a Winsock socket

 
-
-
-

Returns

-

a new GIOChannel

-
-
-
-
-

g_io_channel_win32_new_messages ()

-
GIOChannel *
-g_io_channel_win32_new_messages (gsize hwnd);
-

Creates a new GIOChannel given a window handle on Windows.

-

This function creates a GIOChannel that can be used to poll for -Windows messages for the window in question.

-
-

Parameters

-
----- - - - - - -

hwnd

a window handle.

 
-
-
-

Returns

-

a new GIOChannel.

-
-
-
-
-

g_io_channel_init ()

-
void
-g_io_channel_init (GIOChannel *channel);
-

Initializes a GIOChannel struct.

-

This is called by each of the above functions when creating a -GIOChannel, and so is not often needed by the application -programmer (unless you are creating a new type of GIOChannel).

-
-

Parameters

-
----- - - - - - -

channel

a GIOChannel

 
-
-
-
-
-

g_io_channel_new_file ()

-
GIOChannel *
-g_io_channel_new_file (const gchar *filename,
-                       const gchar *mode,
-                       GError **error);
-

Open a file filename - as a GIOChannel using mode mode -. This -channel will be closed when the last reference to it is dropped, -so there is no need to call g_io_channel_close() (though doing -so will not cause problems, as long as no attempt is made to -access the channel after it is closed).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

filename

A string containing the name of a file.

[type filename]

mode

One of "r", "w", "a", "r+", "w+", "a+". These have -the same meaning as in fopen()

 

error

A location to return an error of type G_FILE_ERROR

 
-
-
-

Returns

-

A GIOChannel on success, NULL on failure.

-
-
-
-
-

g_io_channel_read_chars ()

-
GIOStatus
-g_io_channel_read_chars (GIOChannel *channel,
-                         gchar *buf,
-                         gsize count,
-                         gsize *bytes_read,
-                         GError **error);
-

Replacement for g_io_channel_read() with the new API.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

buf

a buffer to read data into.

[out caller-allocates][array length=count][element-type guint8]

count

the size of the buffer. Note that the buffer may not be -complelely filled even if there is data in the buffer if the -remaining data is not a complete character.

[in]

bytes_read

The number of bytes read. This may be -zero even on success if count < 6 and the channel's encoding -is non-NULL. This indicates that the next UTF-8 character is -too wide for the buffer.

[out][optional]

error

a location to return an error of type GConvertError -or GIOChannelError.

 
-
-
-

Returns

-

the status of the operation.

-
-
-
-
-

g_io_channel_read_unichar ()

-
GIOStatus
-g_io_channel_read_unichar (GIOChannel *channel,
-                           gunichar *thechar,
-                           GError **error);
-

Reads a Unicode character from channel -. -This function cannot be called on a channel with NULL encoding.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

thechar

a location to return a character.

[out]

error

a location to return an error of type GConvertError -or GIOChannelError

 
-
-
-

Returns

-

a GIOStatus

-
-
-
-
-

g_io_channel_read_line ()

-
GIOStatus
-g_io_channel_read_line (GIOChannel *channel,
-                        gchar **str_return,
-                        gsize *length,
-                        gsize *terminator_pos,
-                        GError **error);
-

Reads a line, including the terminating character(s), -from a GIOChannel into a newly-allocated string. -str_return - will contain allocated memory if the return -is G_IO_STATUS_NORMAL.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

str_return

The line read from the GIOChannel, including the -line terminator. This data should be freed with g_free() -when no longer needed. This is a nul-terminated string. -If a length -of zero is returned, this will be NULL instead.

[out]

length

location to store length of the read data, or NULL.

[out][optional]

terminator_pos

location to store position of line terminator, or NULL.

[out][optional]

error

A location to return an error of type GConvertError -or GIOChannelError

 
-
-
-

Returns

-

the status of the operation.

-
-
-
-
-

g_io_channel_read_line_string ()

-
GIOStatus
-g_io_channel_read_line_string (GIOChannel *channel,
-                               GString *buffer,
-                               gsize *terminator_pos,
-                               GError **error);
-

Reads a line from a GIOChannel, using a GString as a buffer.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

buffer

a GString into which the line will be written. -If buffer -already contains data, the old data will -be overwritten.

 

terminator_pos

location to store position of line terminator, or NULL.

[nullable]

error

a location to store an error of type GConvertError -or GIOChannelError

 
-
-
-

Returns

-

the status of the operation.

-
-
-
-
-

g_io_channel_read_to_end ()

-
GIOStatus
-g_io_channel_read_to_end (GIOChannel *channel,
-                          gchar **str_return,
-                          gsize *length,
-                          GError **error);
-

Reads all the remaining data from the file.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

str_return

Location to -store a pointer to a string holding the remaining data in the -GIOChannel. This data should be freed with g_free() when no -longer needed. This data is terminated by an extra nul -character, but there may be other nuls in the intervening data.

[out][array length=length][element-type guint8]

length

location to store length of the data.

[out]

error

location to return an error of type GConvertError -or GIOChannelError

 
-
-
-

Returns

-

G_IO_STATUS_NORMAL on success. -This function never returns G_IO_STATUS_EOF.

-
-
-
-
-

g_io_channel_write_chars ()

-
GIOStatus
-g_io_channel_write_chars (GIOChannel *channel,
-                          const gchar *buf,
-                          gssize count,
-                          gsize *bytes_written,
-                          GError **error);
-

Replacement for g_io_channel_write() with the new API.

-

On seekable channels with encodings other than NULL or UTF-8, generic -mixing of reading and writing is not allowed. A call to g_io_channel_write_chars() -may only be made on a channel from which data has been read in the -cases described in the documentation for g_io_channel_set_encoding().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

buf

a buffer to write data from.

[array][element-type guint8]

count

the size of the buffer. If -1, the buffer -is taken to be a nul-terminated string.

 

bytes_written

The number of bytes written. This can be nonzero -even if the return value is not G_IO_STATUS_NORMAL. -If the return value is G_IO_STATUS_NORMAL and the -channel is blocking, this will always be equal -to count -if count ->= 0.

[out]

error

a location to return an error of type GConvertError -or GIOChannelError

 
-
-
-

Returns

-

the status of the operation.

-
-
-
-
-

g_io_channel_write_unichar ()

-
GIOStatus
-g_io_channel_write_unichar (GIOChannel *channel,
-                            gunichar thechar,
-                            GError **error);
-

Writes a Unicode character to channel -. -This function cannot be called on a channel with NULL encoding.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

thechar

a character

 

error

location to return an error of type GConvertError -or GIOChannelError

 
-
-
-

Returns

-

a GIOStatus

-
-
-
-
-

g_io_channel_flush ()

-
GIOStatus
-g_io_channel_flush (GIOChannel *channel,
-                    GError **error);
-

Flushes the write buffer for the GIOChannel.

-
-

Parameters

-
----- - - - - - - - - - - - - -

channel

a GIOChannel

 

error

location to store an error of type GIOChannelError

 
-
-
-

Returns

-

the status of the operation: One of -G_IO_STATUS_NORMAL, G_IO_STATUS_AGAIN, or -G_IO_STATUS_ERROR.

-
-
-
-
-

g_io_channel_seek_position ()

-
GIOStatus
-g_io_channel_seek_position (GIOChannel *channel,
-                            gint64 offset,
-                            GSeekType type,
-                            GError **error);
-

Replacement for g_io_channel_seek() with the new API.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

offset

The offset in bytes from the position specified by type -

 

type

a GSeekType. The type G_SEEK_CUR is only allowed in those -cases where a call to g_io_channel_set_encoding() -is allowed. See the documentation for -g_io_channel_set_encoding() for details.

 

error

A location to return an error of type GIOChannelError

 
-
-
-

Returns

-

the status of the operation.

-
-
-
-
-

g_io_channel_shutdown ()

-
GIOStatus
-g_io_channel_shutdown (GIOChannel *channel,
-                       gboolean flush,
-                       GError **err);
-

Close an IO channel. Any pending data to be written will be -flushed if flush - is TRUE. The channel will not be freed until the -last reference is dropped using g_io_channel_unref().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

flush

if TRUE, flush pending

 

err

location to store a GIOChannelError

 
-
-
-

Returns

-

the status of the operation.

-
-
-
-
-

g_io_channel_error_from_errno ()

-
GIOChannelError
-g_io_channel_error_from_errno (gint en);
-

Converts an errno error number to a GIOChannelError.

-
-

Parameters

-
----- - - - - - -

en

an errno error number, e.g. EINVAL

 
-
-
-

Returns

-

a GIOChannelError error number, e.g. -G_IO_CHANNEL_ERROR_INVAL.

-
-
-
-
-

g_io_channel_ref ()

-
GIOChannel *
-g_io_channel_ref (GIOChannel *channel);
-

Increments the reference count of a GIOChannel.

-
-

Parameters

-
----- - - - - - -

channel

a GIOChannel

 
-
-
-

Returns

-

the channel -that was passed in (since 2.6)

-
-
-
-
-

g_io_channel_unref ()

-
void
-g_io_channel_unref (GIOChannel *channel);
-

Decrements the reference count of a GIOChannel.

-
-

Parameters

-
----- - - - - - -

channel

a GIOChannel

 
-
-
-
-
-

g_io_create_watch ()

-
GSource *
-g_io_create_watch (GIOChannel *channel,
-                   GIOCondition condition);
-

Creates a GSource that's dispatched when condition - is met for the -given channel -. For example, if condition is G_IO_IN, the source will -be dispatched when there's data available for reading.

-

g_io_add_watch() is a simpler interface to this same functionality, for -the case where you want to add the source to the default main loop context -at the default priority.

-

On Windows, polling a GSource created to watch a channel for a socket -puts the socket in non-blocking mode. This is a side-effect of the -implementation and unavoidable.

-
-

Parameters

-
----- - - - - - - - - - - - - -

channel

a GIOChannel to watch

 

condition

conditions to watch for

 
-
-
-

Returns

-

a new GSource

-
-
-
-
-

g_io_add_watch ()

-
guint
-g_io_add_watch (GIOChannel *channel,
-                GIOCondition condition,
-                GIOFunc func,
-                gpointer user_data);
-

Adds the GIOChannel into the default main loop context -with the default priority.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

condition

the condition to watch for

 

func

the function to call when the condition is satisfied

 

user_data

user data to pass to func -

 
-
-
-

Returns

-

the event source id

-
-
-
-
-

g_io_add_watch_full ()

-
guint
-g_io_add_watch_full (GIOChannel *channel,
-                     gint priority,
-                     GIOCondition condition,
-                     GIOFunc func,
-                     gpointer user_data,
-                     GDestroyNotify notify);
-

Adds the GIOChannel into the default main loop context -with the given priority.

-

This internally creates a main loop source using g_io_create_watch() -and attaches it to the main loop context with g_source_attach(). -You can do these steps manually if you need greater control.

-

[rename-to g_io_add_watch]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

priority

the priority of the GIOChannel source

 

condition

the condition to watch for

 

func

the function to call when the condition is satisfied

 

user_data

user data to pass to func -

 

notify

the function to call when the source is removed

 
-
-
-

Returns

-

the event source id

-
-
-
-
-

GIOFunc ()

-
gboolean
-(*GIOFunc) (GIOChannel *source,
-            GIOCondition condition,
-            gpointer data);
-

Specifies the type of function passed to g_io_add_watch() or -g_io_add_watch_full(), which is called when the requested condition -on a GIOChannel is satisfied.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

source

the GIOChannel event source

 

condition

the condition which has been satisfied

 

data

user data set in g_io_add_watch() or g_io_add_watch_full()

 
-
-
-

Returns

-

the function should return FALSE if the event source -should be removed

-
-
-
-
-

g_io_channel_get_buffer_size ()

-
gsize
-g_io_channel_get_buffer_size (GIOChannel *channel);
-

Gets the buffer size.

-
-

Parameters

-
----- - - - - - -

channel

a GIOChannel

 
-
-
-

Returns

-

the size of the buffer.

-
-
-
-
-

g_io_channel_set_buffer_size ()

-
void
-g_io_channel_set_buffer_size (GIOChannel *channel,
-                              gsize size);
-

Sets the buffer size.

-
-

Parameters

-
----- - - - - - - - - - - - - -

channel

a GIOChannel

 

size

the size of the buffer, or 0 to let GLib pick a good size

 
-
-
-
-
-

g_io_channel_get_buffer_condition ()

-
GIOCondition
-g_io_channel_get_buffer_condition (GIOChannel *channel);
-

This function returns a GIOCondition depending on whether there -is data to be read/space to write data in the internal buffers in -the GIOChannel. Only the flags G_IO_IN and G_IO_OUT may be set.

-
-

Parameters

-
----- - - - - - -

channel

A GIOChannel

 
-
-
-

Returns

-

A GIOCondition

-
-
-
-
-

g_io_channel_get_flags ()

-
GIOFlags
-g_io_channel_get_flags (GIOChannel *channel);
-

Gets the current flags for a GIOChannel, including read-only -flags such as G_IO_FLAG_IS_READABLE.

-

The values of the flags G_IO_FLAG_IS_READABLE and G_IO_FLAG_IS_WRITABLE -are cached for internal use by the channel when it is created. -If they should change at some later point (e.g. partial shutdown -of a socket with the UNIX shutdown() function), the user -should immediately call g_io_channel_get_flags() to update -the internal values of these flags.

-
-

Parameters

-
----- - - - - - -

channel

a GIOChannel

 
-
-
-

Returns

-

the flags which are set on the channel

-
-
-
-
-

g_io_channel_set_flags ()

-
GIOStatus
-g_io_channel_set_flags (GIOChannel *channel,
-                        GIOFlags flags,
-                        GError **error);
-

Sets the (writeable) flags in channel - to (flags - & G_IO_FLAG_SET_MASK).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

flags

the flags to set on the IO channel

 

error

A location to return an error of type GIOChannelError

 
-
-
-

Returns

-

the status of the operation.

-
-
-
-
-

g_io_channel_get_line_term ()

-
const gchar *
-g_io_channel_get_line_term (GIOChannel *channel,
-                            gint *length);
-

This returns the string that GIOChannel uses to determine -where in the file a line break occurs. A value of NULL -indicates autodetection.

-
-

Parameters

-
----- - - - - - - - - - - - - -

channel

a GIOChannel

 

length

a location to return the length of the line terminator

 
-
-
-

Returns

-

The line termination string. This value -is owned by GLib and must not be freed.

-
-
-
-
-

g_io_channel_set_line_term ()

-
void
-g_io_channel_set_line_term (GIOChannel *channel,
-                            const gchar *line_term,
-                            gint length);
-

This sets the string that GIOChannel uses to determine -where in the file a line break occurs.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

line_term

The line termination string. Use NULL for -autodetect. Autodetection breaks on "\n", "\r\n", "\r", "\0", -and the Unicode paragraph separator. Autodetection should not be -used for anything other than file-based channels.

[nullable]

length

The length of the termination string. If -1 is passed, the -string is assumed to be nul-terminated. This option allows -termination strings with embedded nuls.

 
-
-
-
-
-

g_io_channel_get_buffered ()

-
gboolean
-g_io_channel_get_buffered (GIOChannel *channel);
-

Returns whether channel - is buffered.

-
-

Parameters

-
----- - - - - - -

channel

a GIOChannel

 
-
-
-

Returns

-

TRUE if the channel -is buffered.

-
-
-
-
-

g_io_channel_set_buffered ()

-
void
-g_io_channel_set_buffered (GIOChannel *channel,
-                           gboolean buffered);
-

The buffering state can only be set if the channel's encoding -is NULL. For any other encoding, the channel must be buffered.

-

A buffered channel can only be set unbuffered if the channel's -internal buffers have been flushed. Newly created channels or -channels which have returned G_IO_STATUS_EOF -not require such a flush. For write-only channels, a call to -g_io_channel_flush() is sufficient. For all other channels, -the buffers may be flushed by a call to g_io_channel_seek_position(). -This includes the possibility of seeking with seek type G_SEEK_CUR -and an offset of zero. Note that this means that socket-based -channels cannot be set unbuffered once they have had data -read from them.

-

On unbuffered channels, it is safe to mix read and write -calls from the new and old APIs, if this is necessary for -maintaining old code.

-

The default state of the channel is buffered.

-
-

Parameters

-
----- - - - - - - - - - - - - -

channel

a GIOChannel

 

buffered

whether to set the channel buffered or unbuffered

 
-
-
-
-
-

g_io_channel_get_encoding ()

-
const gchar *
-g_io_channel_get_encoding (GIOChannel *channel);
-

Gets the encoding for the input/output of the channel. -The internal encoding is always UTF-8. The encoding NULL -makes the channel safe for binary data.

-
-

Parameters

-
----- - - - - - -

channel

a GIOChannel

 
-
-
-

Returns

-

A string containing the encoding, this string is -owned by GLib and must not be freed.

-
-
-
-
-

g_io_channel_set_encoding ()

-
GIOStatus
-g_io_channel_set_encoding (GIOChannel *channel,
-                           const gchar *encoding,
-                           GError **error);
-

Sets the encoding for the input/output of the channel. -The internal encoding is always UTF-8. The default encoding -for the external file is UTF-8.

-

The encoding NULL is safe to use with binary data.

-

The encoding can only be set if one of the following conditions -is true:

-
-

Channels which do not meet one of the above conditions cannot call -g_io_channel_seek_position() with an offset of G_SEEK_CUR, and, if -they are "seekable", cannot call g_io_channel_write_chars() after -calling one of the API "read" functions.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

encoding

the encoding type.

[nullable]

error

location to store an error of type GConvertError

 
-
-
-

Returns

-

G_IO_STATUS_NORMAL if the encoding was successfully set

-
-
-
-
-

g_io_channel_get_close_on_unref ()

-
gboolean
-g_io_channel_get_close_on_unref (GIOChannel *channel);
-

Returns whether the file/socket/whatever associated with channel - -will be closed when channel - receives its final unref and is -destroyed. The default value of this is TRUE for channels created -by g_io_channel_new_file(), and FALSE for all other channels.

-
-

Parameters

-
----- - - - - - -

channel

a GIOChannel.

 
-
-
-

Returns

-

Whether the channel will be closed on the final unref of -the GIOChannel data structure.

-
-
-
-
-

g_io_channel_set_close_on_unref ()

-
void
-g_io_channel_set_close_on_unref (GIOChannel *channel,
-                                 gboolean do_close);
-

Setting this flag to TRUE for a channel you have already closed -can cause problems.

-
-

Parameters

-
----- - - - - - - - - - - - - -

channel

a GIOChannel

 

do_close

Whether to close the channel on the final unref of -the GIOChannel data structure. The default value of -this is TRUE for channels created by g_io_channel_new_file(), -and FALSE for all other channels.

 
-
-
-
-
-

g_io_channel_read ()

-
GIOError
-g_io_channel_read (GIOChannel *channel,
-                   gchar *buf,
-                   gsize count,
-                   gsize *bytes_read);
-
-

g_io_channel_read has been deprecated since version 2.2 and should not be used in newly-written code.

-

Use g_io_channel_read_chars() instead.

-
-

Reads data from a GIOChannel.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

buf

a buffer to read the data into (which should be at least -count bytes long)

 

count

the number of bytes to read from the GIOChannel

 

bytes_read

returns the number of bytes actually read

 
-
-
-

Returns

-

G_IO_ERROR_NONE if the operation was successful.

-
-
-
-
-

g_io_channel_write ()

-
GIOError
-g_io_channel_write (GIOChannel *channel,
-                    const gchar *buf,
-                    gsize count,
-                    gsize *bytes_written);
-
-

g_io_channel_write has been deprecated since version 2.2 and should not be used in newly-written code.

-

Use g_io_channel_write_chars() instead.

-
-

Writes data to a GIOChannel.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

buf

the buffer containing the data to write

 

count

the number of bytes to write

 

bytes_written

the number of bytes actually written

 
-
-
-

Returns

-

G_IO_ERROR_NONE if the operation was successful.

-
-
-
-
-

g_io_channel_seek ()

-
GIOError
-g_io_channel_seek (GIOChannel *channel,
-                   gint64 offset,
-                   GSeekType type);
-
-

g_io_channel_seek has been deprecated since version 2.2 and should not be used in newly-written code.

-

Use g_io_channel_seek_position() instead.

-
-

Sets the current position in the GIOChannel, similar to the standard -library function fseek().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

channel

a GIOChannel

 

offset

an offset, in bytes, which is added to the position specified -by type -

 

type

the position in the file, which can be G_SEEK_CUR (the current -position), G_SEEK_SET (the start of the file), or G_SEEK_END -(the end of the file)

 
-
-
-

Returns

-

G_IO_ERROR_NONE if the operation was successful.

-
-
-
-
-

g_io_channel_close ()

-
void
-g_io_channel_close (GIOChannel *channel);
-
-

g_io_channel_close has been deprecated since version 2.2 and should not be used in newly-written code.

-

Use g_io_channel_shutdown() instead.

-
-

Close an IO channel. Any pending data to be written will be -flushed, ignoring errors. The channel will not be freed until the -last reference is dropped using g_io_channel_unref().

-
-

Parameters

-
----- - - - - - -

channel

A GIOChannel

 
-
-
-
-
-

Types and Values

-
-

struct GIOChannel

-
struct GIOChannel {
-};
-
-

A data structure representing an IO Channel. The fields should be -considered private and should only be accessed with the following -functions.

-
-
-
-

enum GSeekType

-

An enumeration specifying the base position for a -g_io_channel_seek_position() operation.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_SEEK_CUR

-

the current position in the file.

-
 

G_SEEK_SET

-

the start of the file.

-
 

G_SEEK_END

-

the end of the file.

-
 
-
-
-
-
-

enum GIOStatus

-

Stati returned by most of the GIOFuncs functions.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_IO_STATUS_ERROR

-

An error occurred.

-
 

G_IO_STATUS_NORMAL

-

Success.

-
 

G_IO_STATUS_EOF

-

End of file.

-
 

G_IO_STATUS_AGAIN

-

Resource temporarily unavailable.

-
 
-
-
-
-
-

enum GIOChannelError

-

Error codes returned by GIOChannel operations.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_IO_CHANNEL_ERROR_FBIG

-

File too large.

-
 

G_IO_CHANNEL_ERROR_INVAL

-

Invalid argument.

-
 

G_IO_CHANNEL_ERROR_IO

-

IO error.

-
 

G_IO_CHANNEL_ERROR_ISDIR

-

File is a directory.

-
 

G_IO_CHANNEL_ERROR_NOSPC

-

No space left on device.

-
 

G_IO_CHANNEL_ERROR_NXIO

-

No such device or address.

-
 

G_IO_CHANNEL_ERROR_OVERFLOW

-

Value too large for defined datatype.

-
 

G_IO_CHANNEL_ERROR_PIPE

-

Broken pipe.

-
 

G_IO_CHANNEL_ERROR_FAILED

-

Some other error.

-
 
-
-
-
-
-

G_IO_CHANNEL_ERROR

-
#define G_IO_CHANNEL_ERROR g_io_channel_error_quark()
-
-

Error domain for GIOChannel operations. Errors in this domain will -be from the GIOChannelError enumeration. See GError for -information on error domains.

-
-
-
-

enum GIOCondition

-

A bitwise combination representing a condition to watch for on an -event source.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_IO_IN

-

There is data to read.

-
 

G_IO_OUT

-

Data can be written (without blocking).

-
 

G_IO_PRI

-

There is urgent data to read.

-
 

G_IO_ERR

-

Error condition.

-
 

G_IO_HUP

-

Hung up (the connection has been broken, usually for - pipes and sockets).

-
 

G_IO_NVAL

-

Invalid request. The file descriptor is not open.

-
 
-
-
-
-
-

struct GIOFuncs

-
struct GIOFuncs {
-  GIOStatus (*io_read)           (GIOChannel   *channel, 
-			          gchar        *buf, 
-				  gsize         count,
-				  gsize        *bytes_read,
-				  GError      **err);
-  GIOStatus (*io_write)          (GIOChannel   *channel, 
-				  const gchar  *buf, 
-				  gsize         count,
-				  gsize        *bytes_written,
-				  GError      **err);
-  GIOStatus (*io_seek)           (GIOChannel   *channel, 
-				  gint64        offset, 
-				  GSeekType     type,
-				  GError      **err);
-  GIOStatus  (*io_close)         (GIOChannel   *channel,
-				  GError      **err);
-  GSource*   (*io_create_watch)  (GIOChannel   *channel,
-				  GIOCondition  condition);
-  void       (*io_free)          (GIOChannel   *channel);
-  GIOStatus  (*io_set_flags)     (GIOChannel   *channel,
-                                  GIOFlags      flags,
-				  GError      **err);
-  GIOFlags   (*io_get_flags)     (GIOChannel   *channel);
-};
-
-

A table of functions used to handle different types of GIOChannel -in a generic way.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

io_read ()

reads raw bytes from the channel. This is called from -various functions such as g_io_channel_read_chars() to -read raw bytes from the channel. Encoding and buffering -issues are dealt with at a higher level.

 

io_write ()

writes raw bytes to the channel. This is called from -various functions such as g_io_channel_write_chars() to -write raw bytes to the channel. Encoding and buffering -issues are dealt with at a higher level.

 

io_seek ()

(optional) seeks the channel. This is called from -g_io_channel_seek() on channels that support it.

 

io_close ()

closes the channel. This is called from -g_io_channel_close() after flushing the buffers.

 

io_create_watch ()

creates a watch on the channel. This call -corresponds directly to g_io_create_watch().

 

io_free ()

called from g_io_channel_unref() when the channel needs to -be freed. This function must free the memory associated -with the channel, including freeing the GIOChannel -structure itself. The channel buffers have been flushed -and possibly io_close -has been called by the time this -function is called.

 

io_set_flags ()

sets the GIOFlags on the channel. This is called -from g_io_channel_set_flags() with all flags except -for G_IO_FLAG_APPEND and G_IO_FLAG_NONBLOCK masked -out.

 

io_get_flags ()

gets the GIOFlags for the channel. This function -need only return the G_IO_FLAG_APPEND and -G_IO_FLAG_NONBLOCK flags; g_io_channel_get_flags() -automatically adds the others as appropriate.

 
-
-
-
-
-

enum GIOFlags

-

Specifies properties of a GIOChannel. Some of the flags can only be -read with g_io_channel_get_flags(), but not changed with -g_io_channel_set_flags().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_IO_FLAG_APPEND

-

turns on append mode, corresponds to O_APPEND - (see the documentation of the UNIX open() syscall)

-
 

G_IO_FLAG_NONBLOCK

-

turns on nonblocking mode, corresponds to - O_NONBLOCK/O_NDELAY (see the documentation of the UNIX open() - syscall)

-
 

G_IO_FLAG_IS_READABLE

-

indicates that the io channel is readable. - This flag cannot be changed.

-
 

G_IO_FLAG_IS_WRITABLE

-

indicates that the io channel is writable. - This flag cannot be changed.

-
 

G_IO_FLAG_IS_WRITEABLE

-

a misspelled version of G_IO_FLAG_IS_WRITABLE - - that existed before the spelling was fixed in GLib 2.30. It is kept - here for compatibility reasons. Deprecated since 2.30

-
 

G_IO_FLAG_IS_SEEKABLE

-

indicates that the io channel is seekable, - i.e. that g_io_channel_seek_position() can be used on it. - This flag cannot be changed.

-
 

G_IO_FLAG_MASK

-

the mask that specifies all the valid flags.

-
 

G_IO_FLAG_GET_MASK

-

the mask of the flags that are returned from - g_io_channel_get_flags()

-
 

G_IO_FLAG_SET_MASK

-

the mask of the flags that the user can modify - with g_io_channel_set_flags()

-
 
-
-
-
-
-

enum GIOError

-

GIOError is only used by the deprecated functions -g_io_channel_read(), g_io_channel_write(), and g_io_channel_seek().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_IO_ERROR_NONE

-

no error

-
 

G_IO_ERROR_AGAIN

-

an EAGAIN error occurred

-
 

G_IO_ERROR_INVAL

-

an EINVAL error occurred

-
 

G_IO_ERROR_UNKNOWN

-

another error occurred

-
 
-
-
-
-
-

See Also

-

g_io_add_watch(), g_io_add_watch_full(), g_source_remove(), - GMainLoop

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Key-value-file-parser.html b/docs/reference/glib/html/glib-Key-value-file-parser.html deleted file mode 100644 index d0c3be375..000000000 --- a/docs/reference/glib/html/glib-Key-value-file-parser.html +++ /dev/null @@ -1,3532 +0,0 @@ - - - - -Key-value file parser: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Key-value file parser

-

Key-value file parser — parses .ini-like config files

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GKeyFile * - -g_key_file_new () -
-void - -g_key_file_free () -
-GKeyFile * - -g_key_file_ref () -
-void - -g_key_file_unref () -
-void - -g_key_file_set_list_separator () -
-gboolean - -g_key_file_load_from_file () -
-gboolean - -g_key_file_load_from_data () -
-gboolean - -g_key_file_load_from_bytes () -
-gboolean - -g_key_file_load_from_data_dirs () -
-gboolean - -g_key_file_load_from_dirs () -
-gchar * - -g_key_file_to_data () -
-gboolean - -g_key_file_save_to_file () -
-gchar * - -g_key_file_get_start_group () -
-gchar ** - -g_key_file_get_groups () -
-gchar ** - -g_key_file_get_keys () -
-gboolean - -g_key_file_has_group () -
-gboolean - -g_key_file_has_key () -
-gchar * - -g_key_file_get_value () -
-gchar * - -g_key_file_get_string () -
-gchar * - -g_key_file_get_locale_string () -
-gboolean - -g_key_file_get_boolean () -
-gint - -g_key_file_get_integer () -
-gint64 - -g_key_file_get_int64 () -
-guint64 - -g_key_file_get_uint64 () -
-gdouble - -g_key_file_get_double () -
-gchar ** - -g_key_file_get_string_list () -
-gchar ** - -g_key_file_get_locale_string_list () -
-gboolean * - -g_key_file_get_boolean_list () -
-gint * - -g_key_file_get_integer_list () -
-gdouble * - -g_key_file_get_double_list () -
-gchar * - -g_key_file_get_comment () -
-void - -g_key_file_set_value () -
-void - -g_key_file_set_string () -
-void - -g_key_file_set_locale_string () -
-void - -g_key_file_set_boolean () -
-void - -g_key_file_set_integer () -
-void - -g_key_file_set_int64 () -
-void - -g_key_file_set_uint64 () -
-void - -g_key_file_set_double () -
-void - -g_key_file_set_string_list () -
-void - -g_key_file_set_locale_string_list () -
-void - -g_key_file_set_boolean_list () -
-void - -g_key_file_set_integer_list () -
-void - -g_key_file_set_double_list () -
-gboolean - -g_key_file_set_comment () -
-gboolean - -g_key_file_remove_group () -
-gboolean - -g_key_file_remove_key () -
-gboolean - -g_key_file_remove_comment () -
-
- -
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GKeyFile lets you parse, edit or create files containing groups of -key-value pairs, which we call "key files" for lack of a better name. -Several freedesktop.org specifications use key files now, e.g the -Desktop Entry Specification -and the -Icon Theme Specification.

-

The syntax of key files is described in detail in the -Desktop Entry Specification, -here is a quick summary: Key files -consists of groups of key-value pairs, interspersed with comments.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
# this is just an example
-# there can be comments before the first group
-
-[First Group]
-
-Name=Key File Example\tthis value shows\nescaping
-
-# localized strings are stored in multiple key-value pairs
-Welcome=Hello
-Welcome[de]=Hallo
-Welcome[fr_FR]=Bonjour
-Welcome[it]=Ciao
-Welcome[be@latin]=Hello
-
-[Another Group]
-
-Numbers=2;20;-200;0
-
-Booleans=true;false;true;true
-
- -

-

Lines beginning with a '#' and blank lines are considered comments.

-

Groups are started by a header line containing the group name enclosed -in '[' and ']', and ended implicitly by the start of the next group or -the end of the file. Each key-value pair must be contained in a group.

-

Key-value pairs generally have the form key=value, with the -exception of localized strings, which have the form -key[locale]=value, with a locale identifier of the -form lang_COUNTRY@MODIFIER where COUNTRY and MODIFIER -are optional. -Space before and after the '=' character are ignored. Newline, tab, -carriage return and backslash characters in value are escaped as \n, -\t, \r, and \, respectively. To preserve leading spaces in values, -these can also be escaped as \s.

-

Key files can store strings (possibly with localized variants), integers, -booleans and lists of these. Lists are separated by a separator character, -typically ';' or ','. To use the list separator character in a value in -a list, it has to be escaped by prefixing it with a backslash.

-

This syntax is obviously inspired by the .ini files commonly met -on Windows, but there are some important differences:

-
    -
  • .ini files use the ';' character to begin comments, -key files use the '#' character.

  • -
  • Key files do not allow for ungrouped keys meaning only -comments can precede the first group.

  • -
  • Key files are always encoded in UTF-8.

  • -
  • Key and Group names are case-sensitive. For example, a group called -[GROUP] is a different from [group].

  • -
  • .ini files don't have a strongly typed boolean entry type, -they only have GetProfileInt(). In key files, only -true and false (in lower case) are allowed.

  • -
-

Note that in contrast to the -Desktop Entry Specification, -groups in key files may contain the same -key multiple times; the last entry wins. Key files may also contain -multiple groups with the same name; they are merged together. -Another difference is that keys and group names in key files are not -restricted to ASCII characters.

-
-
-

Functions

-
-

g_key_file_new ()

-
GKeyFile *
-g_key_file_new (void);
-

Creates a new empty GKeyFile object. Use -g_key_file_load_from_file(), g_key_file_load_from_data(), -g_key_file_load_from_dirs() or g_key_file_load_from_data_dirs() to -read an existing key file.

-
-

Returns

-

an empty GKeyFile.

-

[transfer full]

-
-

Since: 2.6

-
-
-
-

g_key_file_free ()

-
void
-g_key_file_free (GKeyFile *key_file);
-

Clears all keys and groups from key_file -, and decreases the -reference count by 1. If the reference count reaches zero, -frees the key file and all its allocated memory.

-

[skip]

-
-

Parameters

-
----- - - - - - -

key_file

a GKeyFile

 
-
-

Since: 2.6

-
-
-
-

g_key_file_ref ()

-
GKeyFile *
-g_key_file_ref (GKeyFile *key_file);
-

Increases the reference count of key_file -.

-

[skip]

-
-

Parameters

-
----- - - - - - -

key_file

a GKeyFile

 
-
-
-

Returns

-

the same key_file -.

-
-

Since: 2.32

-
-
-
-

g_key_file_unref ()

-
void
-g_key_file_unref (GKeyFile *key_file);
-

Decreases the reference count of key_file - by 1. If the reference count -reaches zero, frees the key file and all its allocated memory.

-
-

Parameters

-
----- - - - - - -

key_file

a GKeyFile

 
-
-

Since: 2.32

-
-
-
-

g_key_file_set_list_separator ()

-
void
-g_key_file_set_list_separator (GKeyFile *key_file,
-                               gchar separator);
-

Sets the character which is used to separate -values in lists. Typically ';' or ',' are used -as separators. The default list separator is ';'.

-
-

Parameters

-
----- - - - - - - - - - - - - -

key_file

a GKeyFile

 

separator

the separator

 
-
-

Since: 2.6

-
-
-
-

g_key_file_load_from_file ()

-
gboolean
-g_key_file_load_from_file (GKeyFile *key_file,
-                           const gchar *file,
-                           GKeyFileFlags flags,
-                           GError **error);
-

Loads a key file into an empty GKeyFile structure.

-

If the OS returns an error when opening or reading the file, a -G_FILE_ERROR is returned. If there is a problem parsing the file, a -G_KEY_FILE_ERROR is returned.

-

This function will never return a G_KEY_FILE_ERROR_NOT_FOUND error. If the -file - is not found, G_FILE_ERROR_NOENT is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

an empty GKeyFile struct

 

file

the path of a filename to load, in the GLib filename encoding.

[type filename]

flags

flags from GKeyFileFlags

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE if a key file could be loaded, FALSE otherwise

-
-

Since: 2.6

-
-
-
-

g_key_file_load_from_data ()

-
gboolean
-g_key_file_load_from_data (GKeyFile *key_file,
-                           const gchar *data,
-                           gsize length,
-                           GKeyFileFlags flags,
-                           GError **error);
-

Loads a key file from memory into an empty GKeyFile structure. -If the object cannot be created then error is set to a GKeyFileError.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key_file

an empty GKeyFile struct

 

data

key file loaded in memory

 

length

the length of data -in bytes (or (gsize)-1 if data is nul-terminated)

 

flags

flags from GKeyFileFlags

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE if a key file could be loaded, FALSE otherwise

-
-

Since: 2.6

-
-
-
-

g_key_file_load_from_bytes ()

-
gboolean
-g_key_file_load_from_bytes (GKeyFile *key_file,
-                            GBytes *bytes,
-                            GKeyFileFlags flags,
-                            GError **error);
-

Loads a key file from the data in bytes - into an empty GKeyFile structure. -If the object cannot be created then error is set to a GKeyFileError.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

an empty GKeyFile struct

 

bytes

a GBytes

 

flags

flags from GKeyFileFlags

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE if a key file could be loaded, FALSE otherwise

-
-

Since: 2.50

-
-
-
-

g_key_file_load_from_data_dirs ()

-
gboolean
-g_key_file_load_from_data_dirs (GKeyFile *key_file,
-                                const gchar *file,
-                                gchar **full_path,
-                                GKeyFileFlags flags,
-                                GError **error);
-

This function looks for a key file named file - in the paths -returned from g_get_user_data_dir() and g_get_system_data_dirs(), -loads the file into key_file - and returns the file's full path in -full_path -. If the file could not be loaded then an error is -set to either a GFileError or GKeyFileError.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key_file

an empty GKeyFile struct

 

file

a relative path to a filename to open and parse.

[type filename]

full_path

return location for a string containing the full path -of the file, or NULL.

[out][type filename][optional]

flags

flags from GKeyFileFlags

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE if a key file could be loaded, FALSE othewise

-
-

Since: 2.6

-
-
-
-

g_key_file_load_from_dirs ()

-
gboolean
-g_key_file_load_from_dirs (GKeyFile *key_file,
-                           const gchar *file,
-                           const gchar **search_dirs,
-                           gchar **full_path,
-                           GKeyFileFlags flags,
-                           GError **error);
-

This function looks for a key file named file - in the paths -specified in search_dirs -, loads the file into key_file - and -returns the file's full path in full_path -.

-

If the file could not be found in any of the search_dirs -, -G_KEY_FILE_ERROR_NOT_FOUND is returned. If -the file is found but the OS returns an error when opening or reading the -file, a G_FILE_ERROR is returned. If there is a problem parsing the file, a -G_KEY_FILE_ERROR is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key_file

an empty GKeyFile struct

 

file

a relative path to a filename to open and parse.

[type filename]

search_dirs

NULL-terminated array of directories to search.

[array zero-terminated=1][element-type filename]

full_path

return location for a string containing the full path -of the file, or NULL.

[out][type filename][optional]

flags

flags from GKeyFileFlags

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

TRUE if a key file could be loaded, FALSE otherwise

-
-

Since: 2.14

-
-
-
-

g_key_file_to_data ()

-
gchar *
-g_key_file_to_data (GKeyFile *key_file,
-                    gsize *length,
-                    GError **error);
-

This function outputs key_file - as a string.

-

Note that this function never reports an error, -so it is safe to pass NULL as error -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

length

return location for the length of the -returned string, or NULL.

[out][optional]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a newly allocated string holding -the contents of the GKeyFile

-
-

Since: 2.6

-
-
-
-

g_key_file_save_to_file ()

-
gboolean
-g_key_file_save_to_file (GKeyFile *key_file,
-                         const gchar *filename,
-                         GError **error);
-

Writes the contents of key_file - to filename - using -g_file_set_contents().

-

This function can fail for any of the reasons that -g_file_set_contents() may fail.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

filename

the name of the file to write to

 

error

a pointer to a NULL GError, or NULL

 
-
-
-

Returns

-

TRUE if successful, else FALSE with error -set

-
-

Since: 2.40

-
-
-
-

g_key_file_get_start_group ()

-
gchar *
-g_key_file_get_start_group (GKeyFile *key_file);
-

Returns the name of the start group of the file.

-
-

Parameters

-
----- - - - - - -

key_file

a GKeyFile

 
-
-
-

Returns

-

The start group of the key file.

-
-

Since: 2.6

-
-
-
-

g_key_file_get_groups ()

-
gchar **
-g_key_file_get_groups (GKeyFile *key_file,
-                       gsize *length);
-

Returns all groups in the key file loaded with key_file -. -The array of returned groups will be NULL-terminated, so -length - may optionally be NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

key_file

a GKeyFile

 

length

return location for the number of returned groups, or NULL.

[out][optional]
-
-
-

Returns

-

a newly-allocated NULL-terminated array of strings. -Use g_strfreev() to free it.

-

[array zero-terminated=1][transfer full]

-
-

Since: 2.6

-
-
-
-

g_key_file_get_keys ()

-
gchar **
-g_key_file_get_keys (GKeyFile *key_file,
-                     const gchar *group_name,
-                     gsize *length,
-                     GError **error);
-

Returns all keys for the group name group_name -. The array of -returned keys will be NULL-terminated, so length - may -optionally be NULL. In the event that the group_name - cannot -be found, NULL is returned and error - is set to -G_KEY_FILE_ERROR_GROUP_NOT_FOUND.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

length

return location for the number of keys returned, or NULL.

[out][optional]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a newly-allocated NULL-terminated array of strings. -Use g_strfreev() to free it.

-

[array zero-terminated=1][transfer full]

-
-

Since: 2.6

-
-
-
-

g_key_file_has_group ()

-
gboolean
-g_key_file_has_group (GKeyFile *key_file,
-                      const gchar *group_name);
-

Looks whether the key file has the group group_name -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 
-
-
-

Returns

-

TRUE if group_name -is a part of key_file -, FALSE -otherwise.

-
-

Since: 2.6

-
-
-
-

g_key_file_has_key ()

-
gboolean
-g_key_file_has_key (GKeyFile *key_file,
-                    const gchar *group_name,
-                    const gchar *key,
-                    GError **error);
-

Looks whether the key file has the key key - in the group -group_name -.

-

Note that this function does not follow the rules for GError strictly; -the return value both carries meaning and signals an error. To use -this function, you must pass a GError pointer in error -, and check -whether it is not NULL to see if an error occurred.

-

Language bindings should use g_key_file_get_value() to test whether -or not a key exists.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key name

 

error

return location for a GError

 
-
-
-

Returns

-

TRUE if key -is a part of group_name -, FALSE otherwise

-
-

Since: 2.6

-
-
-
-

g_key_file_get_value ()

-
gchar *
-g_key_file_get_value (GKeyFile *key_file,
-                      const gchar *group_name,
-                      const gchar *key,
-                      GError **error);
-

Returns the raw value associated with key - under group_name -. -Use g_key_file_get_string() to retrieve an unescaped UTF-8 string.

-

In the event the key cannot be found, NULL is returned and -error - is set to G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the -event that the group_name - cannot be found, NULL is returned -and error - is set to G_KEY_FILE_ERROR_GROUP_NOT_FOUND.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a newly allocated string or NULL if the specified -key cannot be found.

-
-

Since: 2.6

-
-
-
-

g_key_file_get_string ()

-
gchar *
-g_key_file_get_string (GKeyFile *key_file,
-                       const gchar *group_name,
-                       const gchar *key,
-                       GError **error);
-

Returns the string value associated with key - under group_name -. -Unlike g_key_file_get_value(), this function handles escape sequences -like \s.

-

In the event the key cannot be found, NULL is returned and -error - is set to G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the -event that the group_name - cannot be found, NULL is returned -and error - is set to G_KEY_FILE_ERROR_GROUP_NOT_FOUND.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a newly allocated string or NULL if the specified -key cannot be found.

-
-

Since: 2.6

-
-
-
-

g_key_file_get_locale_string ()

-
gchar *
-g_key_file_get_locale_string (GKeyFile *key_file,
-                              const gchar *group_name,
-                              const gchar *key,
-                              const gchar *locale,
-                              GError **error);
-

Returns the value associated with key - under group_name - -translated in the given locale - if available. If locale - is -NULL then the current locale is assumed.

-

If key - cannot be found then NULL is returned and error - is set -to G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the value associated -with key - cannot be interpreted or no suitable translation can -be found then the untranslated value is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

locale

a locale identifier or NULL.

[nullable]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a newly allocated string or NULL if the specified -key cannot be found.

-
-

Since: 2.6

-
-
-
-

g_key_file_get_boolean ()

-
gboolean
-g_key_file_get_boolean (GKeyFile *key_file,
-                        const gchar *group_name,
-                        const gchar *key,
-                        GError **error);
-

Returns the value associated with key - under group_name - as a -boolean.

-

If key - cannot be found then FALSE is returned and error - is set -to G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value -associated with key - cannot be interpreted as a boolean then FALSE -is returned and error - is set to G_KEY_FILE_ERROR_INVALID_VALUE.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

error

return location for a GError

 
-
-
-

Returns

-

the value associated with the key as a boolean, -or FALSE if the key was not found or could not be parsed.

-
-

Since: 2.6

-
-
-
-

g_key_file_get_integer ()

-
gint
-g_key_file_get_integer (GKeyFile *key_file,
-                        const gchar *group_name,
-                        const gchar *key,
-                        GError **error);
-

Returns the value associated with key - under group_name - as an -integer.

-

If key - cannot be found then 0 is returned and error - is set to -G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value associated -with key - cannot be interpreted as an integer, or is out of range -for a gint, then 0 is returned -and error - is set to G_KEY_FILE_ERROR_INVALID_VALUE.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

error

return location for a GError

 
-
-
-

Returns

-

the value associated with the key as an integer, or -0 if the key was not found or could not be parsed.

-
-

Since: 2.6

-
-
-
-

g_key_file_get_int64 ()

-
gint64
-g_key_file_get_int64 (GKeyFile *key_file,
-                      const gchar *group_name,
-                      const gchar *key,
-                      GError **error);
-

Returns the value associated with key - under group_name - as a signed -64-bit integer. This is similar to g_key_file_get_integer() but can return -64-bit results without truncation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a non-NULL GKeyFile

 

group_name

a non-NULL group name

 

key

a non-NULL key

 

error

return location for a GError

 
-
-
-

Returns

-

the value associated with the key as a signed 64-bit integer, or -0 if the key was not found or could not be parsed.

-
-

Since: 2.26

-
-
-
-

g_key_file_get_uint64 ()

-
guint64
-g_key_file_get_uint64 (GKeyFile *key_file,
-                       const gchar *group_name,
-                       const gchar *key,
-                       GError **error);
-

Returns the value associated with key - under group_name - as an unsigned -64-bit integer. This is similar to g_key_file_get_integer() but can return -large positive results without truncation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a non-NULL GKeyFile

 

group_name

a non-NULL group name

 

key

a non-NULL key

 

error

return location for a GError

 
-
-
-

Returns

-

the value associated with the key as an unsigned 64-bit integer, -or 0 if the key was not found or could not be parsed.

-
-

Since: 2.26

-
-
-
-

g_key_file_get_double ()

-
gdouble
-g_key_file_get_double (GKeyFile *key_file,
-                       const gchar *group_name,
-                       const gchar *key,
-                       GError **error);
-

Returns the value associated with key - under group_name - as a -double. If group_name - is NULL, the start_group is used.

-

If key - cannot be found then 0.0 is returned and error - is set to -G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the value associated -with key - cannot be interpreted as a double then 0.0 is returned -and error - is set to G_KEY_FILE_ERROR_INVALID_VALUE.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

error

return location for a GError

 
-
-
-

Returns

-

the value associated with the key as a double, or -0.0 if the key was not found or could not be parsed.

-
-

Since: 2.12

-
-
-
-

g_key_file_get_string_list ()

-
gchar **
-g_key_file_get_string_list (GKeyFile *key_file,
-                            const gchar *group_name,
-                            const gchar *key,
-                            gsize *length,
-                            GError **error);
-

Returns the values associated with key - under group_name -.

-

In the event the key cannot be found, NULL is returned and -error - is set to G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the -event that the group_name - cannot be found, NULL is returned -and error - is set to G_KEY_FILE_ERROR_GROUP_NOT_FOUND.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

length

return location for the number of returned strings, or NULL.

[out][optional]

error

return location for a GError, or NULL

 
-
-
-

Returns

-

a NULL-terminated string array or NULL if the specified -key cannot be found. The array should be freed with g_strfreev().

-

[array zero-terminated=1 length=length][element-type utf8][transfer full]

-
-

Since: 2.6

-
-
-
-

g_key_file_get_locale_string_list ()

-
gchar **
-g_key_file_get_locale_string_list (GKeyFile *key_file,
-                                   const gchar *group_name,
-                                   const gchar *key,
-                                   const gchar *locale,
-                                   gsize *length,
-                                   GError **error);
-

Returns the values associated with key - under group_name - -translated in the given locale - if available. If locale - is -NULL then the current locale is assumed.

-

If key - cannot be found then NULL is returned and error - is set -to G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the values associated -with key - cannot be interpreted or no suitable translations -can be found then the untranslated values are returned. The -returned array is NULL-terminated, so length - may optionally -be NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

locale

a locale identifier or NULL.

[nullable]

length

return location for the number of returned strings or NULL.

[out][optional]

error

return location for a GError or NULL

 
-
-
-

Returns

-

a newly allocated NULL-terminated string array -or NULL if the key isn't found. The string array should be freed -with g_strfreev().

-

[array zero-terminated=1 length=length][element-type utf8][transfer full]

-
-

Since: 2.6

-
-
-
-

g_key_file_get_boolean_list ()

-
gboolean *
-g_key_file_get_boolean_list (GKeyFile *key_file,
-                             const gchar *group_name,
-                             const gchar *key,
-                             gsize *length,
-                             GError **error);
-

Returns the values associated with key - under group_name - as -booleans.

-

If key - cannot be found then NULL is returned and error - is set to -G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the values associated -with key - cannot be interpreted as booleans then NULL is returned -and error - is set to G_KEY_FILE_ERROR_INVALID_VALUE.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

length

the number of booleans returned.

[out]

error

return location for a GError

 
-
-
-

Returns

-

the values associated with the key as a list of booleans, or NULL if the -key was not found or could not be parsed. The returned list of booleans -should be freed with g_free() when no longer needed.

-

[array length=length][element-type gboolean][transfer container]

-
-

Since: 2.6

-
-
-
-

g_key_file_get_integer_list ()

-
gint *
-g_key_file_get_integer_list (GKeyFile *key_file,
-                             const gchar *group_name,
-                             const gchar *key,
-                             gsize *length,
-                             GError **error);
-

Returns the values associated with key - under group_name - as -integers.

-

If key - cannot be found then NULL is returned and error - is set to -G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the values associated -with key - cannot be interpreted as integers, or are out of range for -gint, then NULL is returned -and error - is set to G_KEY_FILE_ERROR_INVALID_VALUE.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

length

the number of integers returned.

[out]

error

return location for a GError

 
-
-
-

Returns

-

the values associated with the key as a list of integers, or NULL if -the key was not found or could not be parsed. The returned list of -integers should be freed with g_free() when no longer needed.

-

[array length=length][element-type gint][transfer container]

-
-

Since: 2.6

-
-
-
-

g_key_file_get_double_list ()

-
gdouble *
-g_key_file_get_double_list (GKeyFile *key_file,
-                            const gchar *group_name,
-                            const gchar *key,
-                            gsize *length,
-                            GError **error);
-

Returns the values associated with key - under group_name - as -doubles.

-

If key - cannot be found then NULL is returned and error - is set to -G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if the values associated -with key - cannot be interpreted as doubles then NULL is returned -and error - is set to G_KEY_FILE_ERROR_INVALID_VALUE.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

length

the number of doubles returned.

[out]

error

return location for a GError

 
-
-
-

Returns

-

the values associated with the key as a list of doubles, or NULL if the -key was not found or could not be parsed. The returned list of doubles -should be freed with g_free() when no longer needed.

-

[array length=length][element-type gdouble][transfer container]

-
-

Since: 2.12

-
-
-
-

g_key_file_get_comment ()

-
gchar *
-g_key_file_get_comment (GKeyFile *key_file,
-                        const gchar *group_name,
-                        const gchar *key,
-                        GError **error);
-

Retrieves a comment above key - from group_name -. -If key - is NULL then comment - will be read from above -group_name -. If both key - and group_name - are NULL, then -comment - will be read from above the first group in the file.

-

Note that the returned string includes the '#' comment markers.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name, or NULL.

[nullable]

key

a key

 

error

return location for a GError

 
-
-
-

Returns

-

a comment that should be freed with g_free()

-
-

Since: 2.6

-
-
-
-

g_key_file_set_value ()

-
void
-g_key_file_set_value (GKeyFile *key_file,
-                      const gchar *group_name,
-                      const gchar *key,
-                      const gchar *value);
-

Associates a new value with key - under group_name -.

-

If key - cannot be found then it is created. If group_name - cannot -be found then it is created. To set an UTF-8 string which may contain -characters that need escaping (such as newlines or spaces), use -g_key_file_set_string().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

value

a string

 
-
-

Since: 2.6

-
-
-
-

g_key_file_set_string ()

-
void
-g_key_file_set_string (GKeyFile *key_file,
-                       const gchar *group_name,
-                       const gchar *key,
-                       const gchar *string);
-

Associates a new string value with key - under group_name -. -If key - cannot be found then it is created. -If group_name - cannot be found then it is created. -Unlike g_key_file_set_value(), this function handles characters -that need escaping, such as newlines.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

string

a string

 
-
-

Since: 2.6

-
-
-
-

g_key_file_set_locale_string ()

-
void
-g_key_file_set_locale_string (GKeyFile *key_file,
-                              const gchar *group_name,
-                              const gchar *key,
-                              const gchar *locale,
-                              const gchar *string);
-

Associates a string value for key - and locale - under group_name -. -If the translation for key - cannot be found then it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

locale

a locale identifier

 

string

a string

 
-
-

Since: 2.6

-
-
-
-

g_key_file_set_boolean ()

-
void
-g_key_file_set_boolean (GKeyFile *key_file,
-                        const gchar *group_name,
-                        const gchar *key,
-                        gboolean value);
-

Associates a new boolean value with key - under group_name -. -If key - cannot be found then it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

value

TRUE or FALSE

 
-
-

Since: 2.6

-
-
-
-

g_key_file_set_integer ()

-
void
-g_key_file_set_integer (GKeyFile *key_file,
-                        const gchar *group_name,
-                        const gchar *key,
-                        gint value);
-

Associates a new integer value with key - under group_name -. -If key - cannot be found then it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

value

an integer value

 
-
-

Since: 2.6

-
-
-
-

g_key_file_set_int64 ()

-
void
-g_key_file_set_int64 (GKeyFile *key_file,
-                      const gchar *group_name,
-                      const gchar *key,
-                      gint64 value);
-

Associates a new integer value with key - under group_name -. -If key - cannot be found then it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

value

an integer value

 
-
-

Since: 2.26

-
-
-
-

g_key_file_set_uint64 ()

-
void
-g_key_file_set_uint64 (GKeyFile *key_file,
-                       const gchar *group_name,
-                       const gchar *key,
-                       guint64 value);
-

Associates a new integer value with key - under group_name -. -If key - cannot be found then it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

value

an integer value

 
-
-

Since: 2.26

-
-
-
-

g_key_file_set_double ()

-
void
-g_key_file_set_double (GKeyFile *key_file,
-                       const gchar *group_name,
-                       const gchar *key,
-                       gdouble value);
-

Associates a new double value with key - under group_name -. -If key - cannot be found then it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

value

an double value

 
-
-

Since: 2.12

-
-
-
-

g_key_file_set_string_list ()

-
void
-g_key_file_set_string_list (GKeyFile *key_file,
-                            const gchar *group_name,
-                            const gchar *key,
-                            const gchar * const list[],
-                            gsize length);
-

Associates a list of string values for key - under group_name -. -If key - cannot be found then it is created. -If group_name - cannot be found then it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

list

an array of string values.

[array zero-terminated=1 length=length][element-type utf8]

length

number of string values in list -

 
-
-

Since: 2.6

-
-
-
-

g_key_file_set_locale_string_list ()

-
void
-g_key_file_set_locale_string_list (GKeyFile *key_file,
-                                   const gchar *group_name,
-                                   const gchar *key,
-                                   const gchar *locale,
-                                   const gchar * const list[],
-                                   gsize length);
-

Associates a list of string values for key - and locale - under -group_name -. If the translation for key - cannot be found then -it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

locale

a locale identifier

 

list

a NULL-terminated array of locale string values.

[array zero-terminated=1 length=length]

length

the length of list -

 
-
-

Since: 2.6

-
-
-
-

g_key_file_set_boolean_list ()

-
void
-g_key_file_set_boolean_list (GKeyFile *key_file,
-                             const gchar *group_name,
-                             const gchar *key,
-                             gboolean list[],
-                             gsize length);
-

Associates a list of boolean values with key - under group_name -. -If key - cannot be found then it is created. -If group_name - is NULL, the start_group is used.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

list

an array of boolean values.

[array length=length]

length

length of list -

 
-
-

Since: 2.6

-
-
-
-

g_key_file_set_integer_list ()

-
void
-g_key_file_set_integer_list (GKeyFile *key_file,
-                             const gchar *group_name,
-                             const gchar *key,
-                             gint list[],
-                             gsize length);
-

Associates a list of integer values with key - under group_name -. -If key - cannot be found then it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

list

an array of integer values.

[array length=length]

length

number of integer values in list -

 
-
-

Since: 2.6

-
-
-
-

g_key_file_set_double_list ()

-
void
-g_key_file_set_double_list (GKeyFile *key_file,
-                            const gchar *group_name,
-                            const gchar *key,
-                            gdouble list[],
-                            gsize length);
-

Associates a list of double values with key - under -group_name -. If key - cannot be found then it is created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key

 

list

an array of double values.

[array length=length]

length

number of double values in list -

 
-
-

Since: 2.12

-
-
-
-

g_key_file_set_comment ()

-
gboolean
-g_key_file_set_comment (GKeyFile *key_file,
-                        const gchar *group_name,
-                        const gchar *key,
-                        const gchar *comment,
-                        GError **error);
-

Places a comment above key - from group_name -.

-

If key - is NULL then comment - will be written above group_name -. -If both key - and group_name - are NULL, then comment - will be -written above the first group in the file.

-

Note that this function prepends a '#' comment marker to -each line of comment -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name, or NULL.

[nullable]

key

a key.

[nullable]

comment

a comment

 

error

return location for a GError

 
-
-
-

Returns

-

TRUE if the comment was written, FALSE otherwise

-
-

Since: 2.6

-
-
-
-

g_key_file_remove_group ()

-
gboolean
-g_key_file_remove_group (GKeyFile *key_file,
-                         const gchar *group_name,
-                         GError **error);
-

Removes the specified group, group_name -, -from the key file.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

error

return location for a GError or NULL

 
-
-
-

Returns

-

TRUE if the group was removed, FALSE otherwise

-
-

Since: 2.6

-
-
-
-

g_key_file_remove_key ()

-
gboolean
-g_key_file_remove_key (GKeyFile *key_file,
-                       const gchar *group_name,
-                       const gchar *key,
-                       GError **error);
-

Removes key - in group_name - from the key file.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name

 

key

a key name to remove

 

error

return location for a GError or NULL

 
-
-
-

Returns

-

TRUE if the key was removed, FALSE otherwise

-
-

Since: 2.6

-
-
-
-

g_key_file_remove_comment ()

-
gboolean
-g_key_file_remove_comment (GKeyFile *key_file,
-                           const gchar *group_name,
-                           const gchar *key,
-                           GError **error);
-

Removes a comment above key - from group_name -. -If key - is NULL then comment - will be removed above group_name -. -If both key - and group_name - are NULL, then comment - will -be removed above the first group in the file.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

key_file

a GKeyFile

 

group_name

a group name, or NULL.

[nullable]

key

a key.

[nullable]

error

return location for a GError

 
-
-
-

Returns

-

TRUE if the comment was removed, FALSE otherwise

-
-

Since: 2.6

-
-
-
-

Types and Values

-
-

GKeyFile

-
typedef struct _GKeyFile GKeyFile;
-

The GKeyFile struct contains only private data -and should not be accessed directly.

-
-
-
-

G_KEY_FILE_ERROR

-
#define G_KEY_FILE_ERROR g_key_file_error_quark()
-
-

Error domain for key file parsing. Errors in this domain will -be from the GKeyFileError enumeration.

-

See GError for information on error domains.

-
-
-
-

enum GKeyFileError

-

Error codes returned by key file parsing.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_KEY_FILE_ERROR_UNKNOWN_ENCODING

-

the text being parsed was in - an unknown encoding

-
 

G_KEY_FILE_ERROR_PARSE

-

document was ill-formed

-
 

G_KEY_FILE_ERROR_NOT_FOUND

-

the file was not found

-
 

G_KEY_FILE_ERROR_KEY_NOT_FOUND

-

a requested key was not found

-
 

G_KEY_FILE_ERROR_GROUP_NOT_FOUND

-

a requested group was not found

-
 

G_KEY_FILE_ERROR_INVALID_VALUE

-

a value could not be parsed

-
 
-
-
-
-
-

enum GKeyFileFlags

-

Flags which influence the parsing.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_KEY_FILE_NONE

-

No flags, default behaviour

-
 

G_KEY_FILE_KEEP_COMMENTS

-

Use this flag if you plan to write the - (possibly modified) contents of the key file back to a file; - otherwise all comments will be lost when the key file is - written back.

-
 

G_KEY_FILE_KEEP_TRANSLATIONS

-

Use this flag if you plan to write the - (possibly modified) contents of the key file back to a file; - otherwise only the translations for the current language will be - written back.

-
 
-
-
-
-
-

G_KEY_FILE_DESKTOP_GROUP

-
#define G_KEY_FILE_DESKTOP_GROUP                "Desktop Entry"
-
-

The name of the main group of a desktop entry file, as defined in the -Desktop Entry Specification. -Consult the specification for more -details about the meanings of the keys below.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_TYPE

-
#define G_KEY_FILE_DESKTOP_KEY_TYPE             "Type"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a string -giving the type of the desktop entry. Usually -G_KEY_FILE_DESKTOP_TYPE_APPLICATION, -G_KEY_FILE_DESKTOP_TYPE_LINK, or -G_KEY_FILE_DESKTOP_TYPE_DIRECTORY.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_VERSION

-
#define G_KEY_FILE_DESKTOP_KEY_VERSION          "Version"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a string -giving the version of the Desktop Entry Specification used for -the desktop entry file.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_NAME

-
#define G_KEY_FILE_DESKTOP_KEY_NAME             "Name"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a localized -string giving the specific name of the desktop entry.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME

-
#define G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME     "GenericName"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a localized -string giving the generic name of the desktop entry.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY

-
#define G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY       "NoDisplay"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean -stating whether the desktop entry should be shown in menus.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_COMMENT

-
#define G_KEY_FILE_DESKTOP_KEY_COMMENT          "Comment"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a localized -string giving the tooltip for the desktop entry.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_ICON

-
#define G_KEY_FILE_DESKTOP_KEY_ICON             "Icon"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a localized -string giving the name of the icon to be displayed for the desktop -entry.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_HIDDEN

-
#define G_KEY_FILE_DESKTOP_KEY_HIDDEN           "Hidden"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean -stating whether the desktop entry has been deleted by the user.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN

-
#define G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN     "OnlyShowIn"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a list of -strings identifying the environments that should display the -desktop entry.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN

-
#define G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN      "NotShowIn"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a list of -strings identifying the environments that should not display the -desktop entry.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_TRY_EXEC

-
#define G_KEY_FILE_DESKTOP_KEY_TRY_EXEC         "TryExec"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a string -giving the file name of a binary on disk used to determine if the -program is actually installed. It is only valid for desktop entries -with the Application type.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_EXEC

-
#define G_KEY_FILE_DESKTOP_KEY_EXEC             "Exec"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a string -giving the command line to execute. It is only valid for desktop -entries with the Application type.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_PATH

-
#define G_KEY_FILE_DESKTOP_KEY_PATH             "Path"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a string -containing the working directory to run the program in. It is only -valid for desktop entries with the Application type.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_TERMINAL

-
#define G_KEY_FILE_DESKTOP_KEY_TERMINAL         "Terminal"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean -stating whether the program should be run in a terminal window. -It is only valid for desktop entries with the -Application type.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_MIME_TYPE

-
#define G_KEY_FILE_DESKTOP_KEY_MIME_TYPE        "MimeType"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a list -of strings giving the MIME types supported by this desktop entry.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_CATEGORIES

-
#define G_KEY_FILE_DESKTOP_KEY_CATEGORIES       "Categories"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a list -of strings giving the categories in which the desktop entry -should be shown in a menu.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY

-
#define G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY   "StartupNotify"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean -stating whether the application supports the -Startup Notification Protocol Specification.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS

-
#define G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS "StartupWMClass"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is string -identifying the WM class or name hint of a window that the application -will create, which can be used to emulate Startup Notification with -older applications.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_URL

-
#define G_KEY_FILE_DESKTOP_KEY_URL              "URL"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a string -giving the URL to access. It is only valid for desktop entries -with the Link type.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_ACTIONS

-
#define G_KEY_FILE_DESKTOP_KEY_ACTIONS          "Actions"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a string list -giving the available application actions.

-

Since: 2.38

-
-
-
-

G_KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE

-
#define G_KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE "DBusActivatable"
-
-

A key under G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean set to true -if the application is D-Bus activatable.

-

Since: 2.38

-
-
-
-

G_KEY_FILE_DESKTOP_TYPE_APPLICATION

-
#define G_KEY_FILE_DESKTOP_TYPE_APPLICATION     "Application"
-
-

The value of the G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop -entries representing applications.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_TYPE_LINK

-
#define G_KEY_FILE_DESKTOP_TYPE_LINK            "Link"
-
-

The value of the G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop -entries representing links to documents.

-

Since: 2.14

-
-
-
-

G_KEY_FILE_DESKTOP_TYPE_DIRECTORY

-
#define G_KEY_FILE_DESKTOP_TYPE_DIRECTORY       "Directory"
-
-

The value of the G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop -entries representing directories.

-

Since: 2.14

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Keyed-Data-Lists.html b/docs/reference/glib/html/glib-Keyed-Data-Lists.html deleted file mode 100644 index 035e340d0..000000000 --- a/docs/reference/glib/html/glib-Keyed-Data-Lists.html +++ /dev/null @@ -1,999 +0,0 @@ - - - - -Keyed Data Lists: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Keyed Data Lists

-

Keyed Data Lists — lists of data elements which are accessible by a - string or GQuark identifier

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -g_datalist_init () -
#define -g_datalist_id_set_data() -
-void - -g_datalist_id_set_data_full () -
-gpointer - -g_datalist_id_get_data () -
#define -g_datalist_id_remove_data() -
-gpointer - -g_datalist_id_remove_no_notify () -
-gpointer - -(*GDuplicateFunc) () -
-gpointer - -g_datalist_id_dup_data () -
-gboolean - -g_datalist_id_replace_data () -
#define -g_datalist_set_data() -
#define -g_datalist_set_data_full() -
-gpointer - -g_datalist_get_data () -
#define -g_datalist_remove_data() -
#define -g_datalist_remove_no_notify() -
-void - -g_datalist_foreach () -
-void - -g_datalist_clear () -
-void - -g_datalist_set_flags () -
-void - -g_datalist_unset_flags () -
-guint - -g_datalist_get_flags () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GData
#defineG_DATALIST_FLAGS_MASK
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

Keyed data lists provide lists of arbitrary data elements which can -be accessed either with a string or with a GQuark corresponding to -the string.

-

The GQuark methods are quicker, since the strings have to be -converted to GQuarks anyway.

-

Data lists are used for associating arbitrary data with GObjects, -using g_object_set_data() and related functions.

-

To create a datalist, use g_datalist_init().

-

To add data elements to a datalist use g_datalist_id_set_data(), -g_datalist_id_set_data_full(), g_datalist_set_data() and -g_datalist_set_data_full().

-

To get data elements from a datalist use g_datalist_id_get_data() -and g_datalist_get_data().

-

To iterate over all data elements in a datalist use -g_datalist_foreach() (not thread-safe).

-

To remove data elements from a datalist use -g_datalist_id_remove_data() and g_datalist_remove_data().

-

To remove all data elements from a datalist, use g_datalist_clear().

-
-
-

Functions

-
-

g_datalist_init ()

-
void
-g_datalist_init (GData **datalist);
-

Resets the datalist to NULL. It does not free any memory or call -any destroy functions.

-
-

Parameters

-
----- - - - - - -

datalist

a pointer to a pointer to a datalist.

 
-
-
-
-
-

g_datalist_id_set_data()

-
#define             g_datalist_id_set_data(dl, q, d)
-

Sets the data corresponding to the given GQuark id. Any previous -data with the same key is removed, and its destroy function is -called.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dl

a datalist.

 

q

the GQuark to identify the data element.

 

d

the data element, or NULL to remove any previous element -corresponding to q -.

[nullable]
-
-
-
-
-

g_datalist_id_set_data_full ()

-
void
-g_datalist_id_set_data_full (GData **datalist,
-                             GQuark key_id,
-                             gpointer data,
-                             GDestroyNotify destroy_func);
-

Sets the data corresponding to the given GQuark id, and the -function to be called when the element is removed from the datalist. -Any previous data with the same key is removed, and its destroy -function is called.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

datalist

a datalist.

 

key_id

the GQuark to identify the data element.

 

data

the data element or NULL to remove any previous element -corresponding to key_id -.

[nullable]

destroy_func

the function to call when the data element is -removed. This function will be called with the data -element and can be used to free any memory allocated -for it. If data -is NULL, then destroy_func -must -also be NULL.

 
-
-
-
-
-

g_datalist_id_get_data ()

-
gpointer
-g_datalist_id_get_data (GData **datalist,
-                        GQuark key_id);
-

Retrieves the data element corresponding to key_id -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

datalist

a datalist.

 

key_id

the GQuark identifying a data element.

 
-
-
-

Returns

-

the data element, or NULL if it is not found.

-
-
-
-
-

g_datalist_id_remove_data()

-
#define             g_datalist_id_remove_data(dl, q)
-

Removes an element, using its GQuark identifier.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dl

a datalist.

 

q

the GQuark identifying the data element.

 
-
-
-
-
-

g_datalist_id_remove_no_notify ()

-
gpointer
-g_datalist_id_remove_no_notify (GData **datalist,
-                                GQuark key_id);
-

Removes an element, without calling its destroy notification -function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

datalist

a datalist.

 

key_id

the GQuark identifying a data element.

 
-
-
-

Returns

-

the data previously stored at key_id -, or NULL if none.

-
-
-
-
-

GDuplicateFunc ()

-
gpointer
-(*GDuplicateFunc) (gpointer data,
-                   gpointer user_data);
-

The type of functions that are used to 'duplicate' an object. -What this means depends on the context, it could just be -incrementing the reference count, if data - is a ref-counted -object.

-
-

Parameters

-
----- - - - - - - - - - - - - -

data

the data to duplicate

 

user_data

user data that was specified in g_datalist_id_dup_data()

 
-
-
-

Returns

-

a duplicate of data

-
-
-
-
-

g_datalist_id_dup_data ()

-
gpointer
-g_datalist_id_dup_data (GData **datalist,
-                        GQuark key_id,
-                        GDuplicateFunc dup_func,
-                        gpointer user_data);
-

This is a variant of g_datalist_id_get_data() which -returns a 'duplicate' of the value. dup_func - defines the -meaning of 'duplicate' in this context, it could e.g. -take a reference on a ref-counted object.

-

If the key_id - is not set in the datalist then dup_func - -will be called with a NULL argument.

-

Note that dup_func - is called while the datalist is locked, so it -is not allowed to read or modify the datalist.

-

This function can be useful to avoid races when multiple -threads are using the same datalist and the same key.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

datalist

location of a datalist

 

key_id

the GQuark identifying a data element

 

dup_func

function to duplicate the old value.

[nullable]

user_data

passed as user_data to dup_func -.

[nullable]
-
-
-

Returns

-

the result of calling dup_func -on the value -associated with key_id -in datalist -, or NULL if not set. -If dup_func -is NULL, the value is returned unmodified.

-
-

Since: 2.34

-
-
-
-

g_datalist_id_replace_data ()

-
gboolean
-g_datalist_id_replace_data (GData **datalist,
-                            GQuark key_id,
-                            gpointer oldval,
-                            gpointer newval,
-                            GDestroyNotify destroy,
-                            GDestroyNotify *old_destroy);
-

Compares the member that is associated with key_id - in -datalist - to oldval -, and if they are the same, replace -oldval - with newval -.

-

This is like a typical atomic compare-and-exchange -operation, for a member of datalist -.

-

If the previous value was replaced then ownership of the -old value (oldval -) is passed to the caller, including -the registred destroy notify for it (passed out in old_destroy -). -Its up to the caller to free this as he wishes, which may -or may not include using old_destroy - as sometimes replacement -should not destroy the object in the normal way.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

datalist

location of a datalist

 

key_id

the GQuark identifying a data element

 

oldval

the old value to compare against.

[nullable]

newval

the new value to replace it with.

[nullable]

destroy

destroy notify for the new value.

[nullable]

old_destroy

destroy notify for the existing value.

[nullable]
-
-
-

Returns

-

TRUE if the existing value for key_id -was replaced -by newval -, FALSE otherwise.

-
-

Since: 2.34

-
-
-
-

g_datalist_set_data()

-
#define             g_datalist_set_data(dl, k, d)
-

Sets the data element corresponding to the given string identifier.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dl

a datalist.

 

k

the string to identify the data element.

 

d

the data element, or NULL to remove any previous element -corresponding to k -.

[nullable]
-
-
-
-
-

g_datalist_set_data_full()

-
#define             g_datalist_set_data_full(dl, k, d, f)
-

Sets the data element corresponding to the given string identifier, -and the function to be called when the data element is removed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

dl

a datalist.

 

k

the string to identify the data element.

 

d

the data element, or NULL to remove any previous element -corresponding to k -.

[nullable]

f

the function to call when the data element is removed. This -function will be called with the data element and can be used to -free any memory allocated for it. If d -is NULL, then f -must -also be NULL.

 
-
-
-
-
-

g_datalist_get_data ()

-
gpointer
-g_datalist_get_data (GData **datalist,
-                     const gchar *key);
-

Gets a data element, using its string identifier. This is slower than -g_datalist_id_get_data() because it compares strings.

-
-

Parameters

-
----- - - - - - - - - - - - - -

datalist

a datalist.

 

key

the string identifying a data element.

 
-
-
-

Returns

-

the data element, or NULL if it is not found.

-
-
-
-
-

g_datalist_remove_data()

-
#define             g_datalist_remove_data(dl, k)
-

Removes an element using its string identifier. The data element's -destroy function is called if it has been set.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dl

a datalist.

 

k

the string identifying the data element.

 
-
-
-
-
-

g_datalist_remove_no_notify()

-
#define             g_datalist_remove_no_notify(dl, k)
-

Removes an element, without calling its destroy notifier.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dl

a datalist.

 

k

the string identifying the data element.

 
-
-
-
-
-

g_datalist_foreach ()

-
void
-g_datalist_foreach (GData **datalist,
-                    GDataForeachFunc func,
-                    gpointer user_data);
-

Calls the given function for each data element of the datalist. The -function is called with each data element's GQuark id and data, -together with the given user_data - parameter. Note that this -function is NOT thread-safe. So unless datalist - can be protected -from any modifications during invocation of this function, it should -not be called.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

datalist

a datalist.

 

func

the function to call for each data element.

 

user_data

user data to pass to the function.

 
-
-
-
-
-

g_datalist_clear ()

-
void
-g_datalist_clear (GData **datalist);
-

Frees all the data elements of the datalist. -The data elements' destroy functions are called -if they have been set.

-
-

Parameters

-
----- - - - - - -

datalist

a datalist.

 
-
-
-
-
-

g_datalist_set_flags ()

-
void
-g_datalist_set_flags (GData **datalist,
-                      guint flags);
-

Turns on flag values for a data list. This function is used -to keep a small number of boolean flags in an object with -a data list without using any additional space. It is -not generally useful except in circumstances where space -is very tight. (It is used in the base GObject type, for -example.)

-
-

Parameters

-
----- - - - - - - - - - - - - -

datalist

pointer to the location that holds a list

 

flags

the flags to turn on. The values of the flags are -restricted by G_DATALIST_FLAGS_MASK (currently -3; giving two possible boolean flags). -A value for flags -that doesn't fit within the mask is -an error.

 
-
-

Since: 2.8

-
-
-
-

g_datalist_unset_flags ()

-
void
-g_datalist_unset_flags (GData **datalist,
-                        guint flags);
-

Turns off flag values for a data list. See g_datalist_unset_flags()

-
-

Parameters

-
----- - - - - - - - - - - - - -

datalist

pointer to the location that holds a list

 

flags

the flags to turn off. The values of the flags are -restricted by G_DATALIST_FLAGS_MASK (currently -3: giving two possible boolean flags). -A value for flags -that doesn't fit within the mask is -an error.

 
-
-

Since: 2.8

-
-
-
-

g_datalist_get_flags ()

-
guint
-g_datalist_get_flags (GData **datalist);
-

Gets flags values packed in together with the datalist. -See g_datalist_set_flags().

-
-

Parameters

-
----- - - - - - -

datalist

pointer to the location that holds a list

 
-
-
-

Returns

-

the flags of the datalist

-
-

Since: 2.8

-
-
-
-

Types and Values

-
-

GData

-
typedef struct _GData GData;
-

The GData struct is an opaque data structure to represent a -Keyed Data List. It should only be -accessed via the following functions.

-
-
-
-

G_DATALIST_FLAGS_MASK

-
#define G_DATALIST_FLAGS_MASK 0x3
-
-

A bitmask that restricts the possible flags passed to -g_datalist_set_flags(). Passing a flags value where -flags & ~G_DATALIST_FLAGS_MASK != 0 is an error.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Lexical-Scanner.html b/docs/reference/glib/html/glib-Lexical-Scanner.html deleted file mode 100644 index 55ce3d9bd..000000000 --- a/docs/reference/glib/html/glib-Lexical-Scanner.html +++ /dev/null @@ -1,1992 +0,0 @@ - - - - -Lexical Scanner: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Lexical Scanner

-

Lexical Scanner — a general purpose lexical scanner

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GScanner * - -g_scanner_new () -
-void - -g_scanner_destroy () -
-void - -g_scanner_input_file () -
-void - -g_scanner_sync_file_offset () -
-void - -g_scanner_input_text () -
-GTokenType - -g_scanner_peek_next_token () -
-GTokenType - -g_scanner_get_next_token () -
-gboolean - -g_scanner_eof () -
-guint - -g_scanner_cur_line () -
-guint - -g_scanner_cur_position () -
-GTokenType - -g_scanner_cur_token () -
-GTokenValue - -g_scanner_cur_value () -
-guint - -g_scanner_set_scope () -
-void - -g_scanner_scope_add_symbol () -
-void - -g_scanner_scope_foreach_symbol () -
-gpointer - -g_scanner_scope_lookup_symbol () -
-void - -g_scanner_scope_remove_symbol () -
#define -g_scanner_add_symbol() -
#define -g_scanner_remove_symbol() -
#define -g_scanner_foreach_symbol() -
#define -g_scanner_freeze_symbol_table() -
#define -g_scanner_thaw_symbol_table() -
-gpointer - -g_scanner_lookup_symbol () -
-void - -g_scanner_warn () -
-void - -g_scanner_error () -
-void - -g_scanner_unexp_token () -
-void - -(*GScannerMsgFunc) () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
structGScanner
structGScannerConfig
#defineG_CSET_a_2_z
#defineG_CSET_A_2_Z
#defineG_CSET_DIGITS
#defineG_CSET_LATINC
#defineG_CSET_LATINS
enumGTokenType
unionGTokenValue
enumGErrorType
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The GScanner and its associated functions provide a -general purpose lexical scanner.

-
-
-

Functions

-
-

g_scanner_new ()

-
GScanner *
-g_scanner_new (const GScannerConfig *config_templ);
-

Creates a new GScanner.

-

The config_templ - structure specifies the initial settings -of the scanner, which are copied into the GScanner -config - field. If you pass NULL then the default settings -are used.

-
-

Parameters

-
----- - - - - - -

config_templ

the initial scanner settings

 
-
-
-

Returns

-

the new GScanner

-
-
-
-
-

g_scanner_destroy ()

-
void
-g_scanner_destroy (GScanner *scanner);
-

Frees all memory used by the GScanner.

-
-

Parameters

-
----- - - - - - -

scanner

a GScanner

 
-
-
-
-
-

g_scanner_input_file ()

-
void
-g_scanner_input_file (GScanner *scanner,
-                      gint input_fd);
-

Prepares to scan a file.

-
-

Parameters

-
----- - - - - - - - - - - - - -

scanner

a GScanner

 

input_fd

a file descriptor

 
-
-
-
-
-

g_scanner_sync_file_offset ()

-
void
-g_scanner_sync_file_offset (GScanner *scanner);
-

Rewinds the filedescriptor to the current buffer position -and blows the file read ahead buffer. This is useful for -third party uses of the scanners filedescriptor, which hooks -onto the current scanning position.

-
-

Parameters

-
----- - - - - - -

scanner

a GScanner

 
-
-
-
-
-

g_scanner_input_text ()

-
void
-g_scanner_input_text (GScanner *scanner,
-                      const gchar *text,
-                      guint text_len);
-

Prepares to scan a text buffer.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

scanner

a GScanner

 

text

the text buffer to scan

 

text_len

the length of the text buffer

 
-
-
-
-
-

g_scanner_peek_next_token ()

-
GTokenType
-g_scanner_peek_next_token (GScanner *scanner);
-

Parses the next token, without removing it from the input stream. -The token data is placed in the next_token -, next_value -, next_line -, -and next_position - fields of the GScanner structure.

-

Note that, while the token is not removed from the input stream -(i.e. the next call to g_scanner_get_next_token() will return the -same token), it will not be reevaluated. This can lead to surprising -results when changing scope or the scanner configuration after peeking -the next token. Getting the next token after switching the scope or -configuration will return whatever was peeked before, regardless of -any symbols that may have been added or removed in the new scope.

-
-

Parameters

-
----- - - - - - -

scanner

a GScanner

 
-
-
-

Returns

-

the type of the token

-
-
-
-
-

g_scanner_get_next_token ()

-
GTokenType
-g_scanner_get_next_token (GScanner *scanner);
-

Parses the next token just like g_scanner_peek_next_token() -and also removes it from the input stream. The token data is -placed in the token -, value -, line -, and position - fields of -the GScanner structure.

-
-

Parameters

-
----- - - - - - -

scanner

a GScanner

 
-
-
-

Returns

-

the type of the token

-
-
-
-
-

g_scanner_eof ()

-
gboolean
-g_scanner_eof (GScanner *scanner);
-

Returns TRUE if the scanner has reached the end of -the file or text buffer.

-
-

Parameters

-
----- - - - - - -

scanner

a GScanner

 
-
-
-

Returns

-

TRUE if the scanner has reached the end of -the file or text buffer

-
-
-
-
-

g_scanner_cur_line ()

-
guint
-g_scanner_cur_line (GScanner *scanner);
-

Returns the current line in the input stream (counting -from 1). This is the line of the last token parsed via -g_scanner_get_next_token().

-
-

Parameters

-
----- - - - - - -

scanner

a GScanner

 
-
-
-

Returns

-

the current line

-
-
-
-
-

g_scanner_cur_position ()

-
guint
-g_scanner_cur_position (GScanner *scanner);
-

Returns the current position in the current line (counting -from 0). This is the position of the last token parsed via -g_scanner_get_next_token().

-
-

Parameters

-
----- - - - - - -

scanner

a GScanner

 
-
-
-

Returns

-

the current position on the line

-
-
-
-
-

g_scanner_cur_token ()

-
GTokenType
-g_scanner_cur_token (GScanner *scanner);
-

Gets the current token type. This is simply the token - -field in the GScanner structure.

-
-

Parameters

-
----- - - - - - -

scanner

a GScanner

 
-
-
-

Returns

-

the current token type

-
-
-
-
-

g_scanner_cur_value ()

-
GTokenValue
-g_scanner_cur_value (GScanner *scanner);
-

Gets the current token value. This is simply the value - -field in the GScanner structure.

-
-

Parameters

-
----- - - - - - -

scanner

a GScanner

 
-
-
-

Returns

-

the current token value

-
-
-
-
-

g_scanner_set_scope ()

-
guint
-g_scanner_set_scope (GScanner *scanner,
-                     guint scope_id);
-

Sets the current scope.

-
-

Parameters

-
----- - - - - - - - - - - - - -

scanner

a GScanner

 

scope_id

the new scope id

 
-
-
-

Returns

-

the old scope id

-
-
-
-
-

g_scanner_scope_add_symbol ()

-
void
-g_scanner_scope_add_symbol (GScanner *scanner,
-                            guint scope_id,
-                            const gchar *symbol,
-                            gpointer value);
-

Adds a symbol to the given scope.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

scanner

a GScanner

 

scope_id

the scope id

 

symbol

the symbol to add

 

value

the value of the symbol

 
-
-
-
-
-

g_scanner_scope_foreach_symbol ()

-
void
-g_scanner_scope_foreach_symbol (GScanner *scanner,
-                                guint scope_id,
-                                GHFunc func,
-                                gpointer user_data);
-

Calls the given function for each of the symbol/value pairs -in the given scope of the GScanner. The function is passed -the symbol and value of each pair, and the given user_data - -parameter.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

scanner

a GScanner

 

scope_id

the scope id

 

func

the function to call for each symbol/value pair

 

user_data

user data to pass to the function

 
-
-
-
-
-

g_scanner_scope_lookup_symbol ()

-
gpointer
-g_scanner_scope_lookup_symbol (GScanner *scanner,
-                               guint scope_id,
-                               const gchar *symbol);
-

Looks up a symbol in a scope and return its value. If the -symbol is not bound in the scope, NULL is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

scanner

a GScanner

 

scope_id

the scope id

 

symbol

the symbol to look up

 
-
-
-

Returns

-

the value of symbol -in the given scope, or NULL -if symbol -is not bound in the given scope.

-
-
-
-
-

g_scanner_scope_remove_symbol ()

-
void
-g_scanner_scope_remove_symbol (GScanner *scanner,
-                               guint scope_id,
-                               const gchar *symbol);
-

Removes a symbol from a scope.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

scanner

a GScanner

 

scope_id

the scope id

 

symbol

the symbol to remove

 
-
-
-
-
-

g_scanner_add_symbol()

-
#define             g_scanner_add_symbol( scanner, symbol, value )
-
-

g_scanner_add_symbol has been deprecated since version 2.2 and should not be used in newly-written code.

-

Use g_scanner_scope_add_symbol() instead.

-
-

Adds a symbol to the default scope.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

scanner

a GScanner

 

symbol

the symbol to add

 

value

the value of the symbol

 
-
-
-
-
-

g_scanner_remove_symbol()

-
#define             g_scanner_remove_symbol( scanner, symbol )
-
-

g_scanner_remove_symbol has been deprecated since version 2.2 and should not be used in newly-written code.

-

Use g_scanner_scope_remove_symbol() instead.

-
-

Removes a symbol from the default scope.

-
-

Parameters

-
----- - - - - - - - - - - - - -

scanner

a GScanner

 

symbol

the symbol to remove

 
-
-
-
-
-

g_scanner_foreach_symbol()

-
#define             g_scanner_foreach_symbol( scanner, func, data )
-
-

g_scanner_foreach_symbol has been deprecated since version 2.2 and should not be used in newly-written code.

-

Use g_scanner_scope_foreach_symbol() instead.

-
-

Calls a function for each symbol in the default scope.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

scanner

a GScanner

 

func

the function to call with each symbol

 

data

data to pass to the function

 
-
-
-
-
-

g_scanner_freeze_symbol_table()

-
#define             g_scanner_freeze_symbol_table(scanner)
-
-

g_scanner_freeze_symbol_table has been deprecated since version 2.2 and should not be used in newly-written code.

-

This macro does nothing.

-
-

There is no reason to use this macro, since it does nothing.

-
-

Parameters

-
----- - - - - - -

scanner

a GScanner

 
-
-
-
-
-

g_scanner_thaw_symbol_table()

-
#define             g_scanner_thaw_symbol_table(scanner)
-
-

g_scanner_thaw_symbol_table has been deprecated since version 2.2 and should not be used in newly-written code.

-

This macro does nothing.

-
-

There is no reason to use this macro, since it does nothing.

-
-

Parameters

-
----- - - - - - -

scanner

a GScanner

 
-
-
-
-
-

g_scanner_lookup_symbol ()

-
gpointer
-g_scanner_lookup_symbol (GScanner *scanner,
-                         const gchar *symbol);
-

Looks up a symbol in the current scope and return its value. -If the symbol is not bound in the current scope, NULL is -returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

scanner

a GScanner

 

symbol

the symbol to look up

 
-
-
-

Returns

-

the value of symbol -in the current scope, or NULL -if symbol -is not bound in the current scope

-
-
-
-
-

g_scanner_warn ()

-
void
-g_scanner_warn (GScanner *scanner,
-                const gchar *format,
-                ...);
-

Outputs a warning message, via the GScanner message handler.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

scanner

a GScanner

 

format

the message format. See the printf() documentation

 

...

the parameters to insert into the format string

 
-
-
-
-
-

g_scanner_error ()

-
void
-g_scanner_error (GScanner *scanner,
-                 const gchar *format,
-                 ...);
-

Outputs an error message, via the GScanner message handler.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

scanner

a GScanner

 

format

the message format. See the printf() documentation

 

...

the parameters to insert into the format string

 
-
-
-
-
-

g_scanner_unexp_token ()

-
void
-g_scanner_unexp_token (GScanner *scanner,
-                       GTokenType expected_token,
-                       const gchar *identifier_spec,
-                       const gchar *symbol_spec,
-                       const gchar *symbol_name,
-                       const gchar *message,
-                       gint is_error);
-

Outputs a message through the scanner's msg_handler, -resulting from an unexpected token in the input stream. -Note that you should not call g_scanner_peek_next_token() -followed by g_scanner_unexp_token() without an intermediate -call to g_scanner_get_next_token(), as g_scanner_unexp_token() -evaluates the scanner's current token (not the peeked token) -to construct part of the message.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

scanner

a GScanner

 

expected_token

the expected token

 

identifier_spec

a string describing how the scanner's user -refers to identifiers (NULL defaults to "identifier"). -This is used if expected_token -is G_TOKEN_IDENTIFIER or -G_TOKEN_IDENTIFIER_NULL.

 

symbol_spec

a string describing how the scanner's user refers -to symbols (NULL defaults to "symbol"). This is used if -expected_token -is G_TOKEN_SYMBOL or any token value greater -than G_TOKEN_LAST.

 

symbol_name

the name of the symbol, if the scanner's current -token is a symbol.

 

message

a message string to output at the end of the -warning/error, or NULL.

 

is_error

if TRUE it is output as an error. If FALSE it is -output as a warning.

 
-
-
-
-
-

GScannerMsgFunc ()

-
void
-(*GScannerMsgFunc) (GScanner *scanner,
-                    gchar *message,
-                    gboolean error);
-

Specifies the type of the message handler function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

scanner

a GScanner

 

message

the message

 

error

TRUE if the message signals an error, -FALSE if it signals a warning.

 
-
-
-
-
-

Types and Values

-
-

struct GScanner

-
struct GScanner {
-  /* unused fields */
-  gpointer		user_data;
-  guint			max_parse_errors;
-  
-  /* g_scanner_error() increments this field */
-  guint			parse_errors;
-  
-  /* name of input stream, featured by the default message handler */
-  const gchar		*input_name;
-  
-  /* quarked data */
-  GData			*qdata;
-  
-  /* link into the scanner configuration */
-  GScannerConfig *config;
-  
-  /* fields filled in after g_scanner_get_next_token() */
-  GTokenType		token;
-  GTokenValue		value;
-  guint			line;
-  guint			position;
-  
-  /* fields filled in after g_scanner_peek_next_token() */
-  GTokenType		next_token;
-  GTokenValue		next_value;
-  guint			next_line;
-  guint			next_position;
-
-  /* handler function for _warn and _error */
-  GScannerMsgFunc msg_handler;
-};
-
-

The data structure representing a lexical scanner.

-

You should set input_name - after creating the scanner, since -it is used by the default message handler when displaying -warnings and errors. If you are scanning a file, the filename -would be a good choice.

-

The user_data - and max_parse_errors - fields are not used. -If you need to associate extra data with the scanner you -can place them here.

-

If you want to use your own message handler you can set the -msg_handler - field. The type of the message handler function -is declared by GScannerMsgFunc.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

gpointer user_data;

unused

 

guint max_parse_errors;

unused

 

guint parse_errors;

g_scanner_error() increments this field

 

const gchar *input_name;

name of input stream, featured by the default message handler

 

GData *qdata;

quarked data

 

GScannerConfig *config;

link into the scanner configuration

 

GTokenType token;

token parsed by the last g_scanner_get_next_token()

 

GTokenValue value;

value of the last token from g_scanner_get_next_token()

 

guint line;

line number of the last token from g_scanner_get_next_token()

 

guint position;

char number of the last token from g_scanner_get_next_token()

 

GTokenType next_token;

token parsed by the last g_scanner_peek_next_token()

 

GTokenValue next_value;

value of the last token from g_scanner_peek_next_token()

 

guint next_line;

line number of the last token from g_scanner_peek_next_token()

 

guint next_position;

char number of the last token from g_scanner_peek_next_token()

 

GScannerMsgFunc msg_handler;

handler function for _warn and _error

 
-
-
-
-
-

struct GScannerConfig

-
struct GScannerConfig {
-  /* Character sets
-   */
-  gchar		*cset_skip_characters;		/* default: " \t\n" */
-  gchar		*cset_identifier_first;
-  gchar		*cset_identifier_nth;
-  gchar		*cpair_comment_single;		/* default: "#\n" */
-  
-  /* Should symbol lookup work case sensitive?
-   */
-  guint		case_sensitive : 1;
-  
-  /* Boolean values to be adjusted "on the fly"
-   * to configure scanning behaviour.
-   */
-  guint		skip_comment_multi : 1;		/* C like comment */
-  guint		skip_comment_single : 1; /* single line comment */
-  guint		scan_comment_multi : 1;		/* scan multi line comments? */
-  guint		scan_identifier : 1;
-  guint		scan_identifier_1char : 1;
-  guint		scan_identifier_NULL : 1;
-  guint		scan_symbols : 1;
-  guint		scan_binary : 1;
-  guint		scan_octal : 1;
-  guint		scan_float : 1;
-  guint		scan_hex : 1;			/* '0x0ff0' */
-  guint		scan_hex_dollar : 1;		/* '$0ff0' */
-  guint		scan_string_sq : 1;		/* string: 'anything' */
-  guint		scan_string_dq : 1;		/* string: "\\-escapes!\n" */
-  guint		numbers_2_int : 1;		/* bin, octal, hex => int */
-  guint		int_2_float : 1;		/* int => G_TOKEN_FLOAT? */
-  guint		identifier_2_string : 1;
-  guint		char_2_token : 1;		/* return G_TOKEN_CHAR? */
-  guint		symbol_2_token : 1;
-  guint		scope_0_fallback : 1;		/* try scope 0 on lookups? */
-  guint		store_int64 : 1; 		/* use value.v_int64 rather than v_int */
-};
-
-

Specifies the GScanner parser configuration. Most settings can -be changed during the parsing phase and will affect the lexical -parsing of the next unpeeked token.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

gchar *cset_skip_characters;

specifies which characters should be skipped -by the scanner (the default is the whitespace characters: space, -tab, carriage-return and line-feed).

 

gchar *cset_identifier_first;

specifies the characters which can start -identifiers (the default is G_CSET_a_2_z, "_", and G_CSET_A_2_Z).

 

gchar *cset_identifier_nth;

specifies the characters which can be used -in identifiers, after the first character (the default is -G_CSET_a_2_z, "_0123456789", G_CSET_A_2_Z, G_CSET_LATINS, -G_CSET_LATINC).

 

gchar *cpair_comment_single;

specifies the characters at the start and -end of single-line comments. The default is "#\n" which means -that single-line comments start with a '#' and continue until -a '\n' (end of line).

 

guint case_sensitive : 1;

specifies if symbols are case sensitive (the -default is FALSE).

 

guint skip_comment_multi : 1;

specifies if multi-line comments are skipped -and not returned as tokens (the default is TRUE).

 

guint skip_comment_single : 1;

specifies if single-line comments are skipped -and not returned as tokens (the default is TRUE).

 

guint scan_comment_multi : 1;

specifies if multi-line comments are recognized -(the default is TRUE).

 

guint scan_identifier : 1;

specifies if identifiers are recognized (the -default is TRUE).

 

guint scan_identifier_1char : 1;

specifies if single-character -identifiers are recognized (the default is FALSE).

 

guint scan_identifier_NULL : 1;

specifies if NULL is reported as -G_TOKEN_IDENTIFIER_NULL (the default is FALSE).

 

guint scan_symbols : 1;

specifies if symbols are recognized (the default -is TRUE).

 

guint scan_binary : 1;

specifies if binary numbers are recognized (the -default is FALSE).

 

guint scan_octal : 1;

specifies if octal numbers are recognized (the -default is TRUE).

 

guint scan_float : 1;

specifies if floating point numbers are recognized -(the default is TRUE).

 

guint scan_hex : 1;

specifies if hexadecimal numbers are recognized (the -default is TRUE).

 

guint scan_hex_dollar : 1;

specifies if '$' is recognized as a prefix for -hexadecimal numbers (the default is FALSE).

 

guint scan_string_sq : 1;

specifies if strings can be enclosed in single -quotes (the default is TRUE).

 

guint scan_string_dq : 1;

specifies if strings can be enclosed in double -quotes (the default is TRUE).

 

guint numbers_2_int : 1;

specifies if binary, octal and hexadecimal numbers -are reported as G_TOKEN_INT (the default is TRUE).

 

guint int_2_float : 1;

specifies if all numbers are reported as G_TOKEN_FLOAT -(the default is FALSE).

 

guint identifier_2_string : 1;

specifies if identifiers are reported as strings -(the default is FALSE).

 

guint char_2_token : 1;

specifies if characters are reported by setting -token = ch or as G_TOKEN_CHAR (the default is TRUE).

 

guint symbol_2_token : 1;

specifies if symbols are reported by setting -token = v_symbol or as G_TOKEN_SYMBOL (the default is FALSE).

 

guint scope_0_fallback : 1;

specifies if a symbol is searched for in the -default scope in addition to the current scope (the default is FALSE).

 

guint store_int64 : 1;

use value.v_int64 rather than v_int

 
-
-
-
-
-

G_CSET_a_2_z

-
#define G_CSET_a_2_z "abcdefghijklmnopqrstuvwxyz"
-
-

The set of lowercase ASCII alphabet characters. -Used for specifying valid identifier characters -in GScannerConfig.

-
-
-
-

G_CSET_A_2_Z

-
#define G_CSET_A_2_Z "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-
-

The set of uppercase ASCII alphabet characters. -Used for specifying valid identifier characters -in GScannerConfig.

-
-
-
-

G_CSET_DIGITS

-
#define G_CSET_DIGITS "0123456789"
-
-

The set of ASCII digits. -Used for specifying valid identifier characters -in GScannerConfig.

-
-
-
-

G_CSET_LATINC

-
#define             G_CSET_LATINC
-

The set of uppercase ISO 8859-1 alphabet characters -which are not ASCII characters. -Used for specifying valid identifier characters -in GScannerConfig.

-
-
-
-

G_CSET_LATINS

-
#define             G_CSET_LATINS
-

The set of lowercase ISO 8859-1 alphabet characters -which are not ASCII characters. -Used for specifying valid identifier characters -in GScannerConfig.

-
-
-
-

enum GTokenType

-

The possible types of token returned from each -g_scanner_get_next_token() call.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_TOKEN_EOF

-

the end of the file

-
 

G_TOKEN_LEFT_PAREN

-

a '(' character

-
 

G_TOKEN_RIGHT_PAREN

-

a ')' character

-
 

G_TOKEN_LEFT_CURLY

-

a '{' character

-
 

G_TOKEN_RIGHT_CURLY

-

a '}' character

-
 

G_TOKEN_LEFT_BRACE

-

a '[' character

-
 

G_TOKEN_RIGHT_BRACE

-

a ']' character

-
 

G_TOKEN_EQUAL_SIGN

-

a '=' character

-
 

G_TOKEN_COMMA

-

a ',' character

-
 

G_TOKEN_NONE

-

not a token

-
 

G_TOKEN_ERROR

-

an error occurred

-
 

G_TOKEN_CHAR

-

a character

-
 

G_TOKEN_BINARY

-

a binary integer

-
 

G_TOKEN_OCTAL

-

an octal integer

-
 

G_TOKEN_INT

-

an integer

-
 

G_TOKEN_HEX

-

a hex integer

-
 

G_TOKEN_FLOAT

-

a floating point number

-
 

G_TOKEN_STRING

-

a string

-
 

G_TOKEN_SYMBOL

-

a symbol

-
 

G_TOKEN_IDENTIFIER

-

an identifier

-
 

G_TOKEN_IDENTIFIER_NULL

-

a null identifier

-
 

G_TOKEN_COMMENT_SINGLE

-

one line comment

-
 

G_TOKEN_COMMENT_MULTI

-

multi line comment

-
 
-
-
-
-
-

union GTokenValue

-

A union holding the value of the token.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

gpointer v_symbol;

token symbol value

 

gchar *v_identifier;

token identifier value

 

gulong v_binary;

token binary integer value

 

gulong v_octal;

octal integer value

 

gulong v_int;

integer value

 

guint64 v_int64;

64-bit integer value

 

gdouble v_float;

floating point value

 

gulong v_hex;

hex integer value

 

gchar *v_string;

string value

 

gchar *v_comment;

comment value

 

guchar v_char;

character value

 

guint v_error;

error value

 
-
-
-
-
-

enum GErrorType

-

The possible errors, used in the v_error - field -of GTokenValue, when the token is a G_TOKEN_ERROR.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_ERR_UNKNOWN

-

unknown error

-
 

G_ERR_UNEXP_EOF

-

unexpected end of file

-
 

G_ERR_UNEXP_EOF_IN_STRING

-

unterminated string constant

-
 

G_ERR_UNEXP_EOF_IN_COMMENT

-

unterminated comment

-
 

G_ERR_NON_DIGIT_IN_CONST

-

non-digit character in a number

-
 

G_ERR_DIGIT_RADIX

-

digit beyond radix in a number

-
 

G_ERR_FLOAT_RADIX

-

non-decimal floating point number

-
 

G_ERR_FLOAT_MALFORMED

-

malformed floating point number

-
 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Memory-Allocation.html b/docs/reference/glib/html/glib-Memory-Allocation.html deleted file mode 100644 index 43790f2a0..000000000 --- a/docs/reference/glib/html/glib-Memory-Allocation.html +++ /dev/null @@ -1,1473 +0,0 @@ - - - - -Memory Allocation: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Memory Allocation

-

Memory Allocation — general memory-handling

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -g_new() -
#define -g_new0() -
#define -g_renew() -
#define -g_try_new() -
#define -g_try_new0() -
#define -g_try_renew() -
-gpointer - -g_malloc () -
-gpointer - -g_malloc0 () -
-gpointer - -g_realloc () -
-gpointer - -g_try_malloc () -
-gpointer - -g_try_malloc0 () -
-gpointer - -g_try_realloc () -
-gpointer - -g_malloc_n () -
-gpointer - -g_malloc0_n () -
-gpointer - -g_realloc_n () -
-gpointer - -g_try_malloc_n () -
-gpointer - -g_try_malloc0_n () -
-gpointer - -g_try_realloc_n () -
-void - -g_free () -
-void - -g_clear_pointer () -
-gpointer - -g_steal_pointer () -
#define -g_alloca() -
#define -g_newa() -
#define -g_memmove() -
-gpointer - -g_memdup () -
-void - -g_mem_set_vtable () -
-gboolean - -g_mem_is_system_malloc () -
-void - -g_mem_profile () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
extern gboolean g_mem_gc_friendly
structGMemVTable
extern GMemVTable *glib_mem_profiler_table
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

These functions provide support for allocating and freeing memory.

-

If any call to allocate memory fails, the application is terminated. -This also means that there is no need to check if the call succeeded.

-

It's important to match g_malloc() (and wrappers such as g_new()) with -g_free(), g_slice_alloc() (and wrappers such as g_slice_new()) with -g_slice_free(), plain malloc() with free(), and (if you're using C++) -new with delete and new[] with delete[]. Otherwise bad things can happen, -since these allocators may use different memory pools (and new/delete call -constructors and destructors).

-
-
-

Functions

-
-

g_new()

-
#define             g_new(struct_type, n_structs)
-

Allocates n_structs - elements of type struct_type -. -The returned pointer is cast to a pointer to the given type. -If n_structs - is 0 it returns NULL. -Care is taken to avoid overflow when calculating the size of the allocated block.

-

Since the returned pointer is already casted to the right type, -it is normally unnecessary to cast it explicitly, and doing -so might hide memory allocation errors.

-
-

Parameters

-
----- - - - - - - - - - - - - -

struct_type

the type of the elements to allocate

 

n_structs

the number of elements to allocate

 
-
-
-

Returns

-

a pointer to the allocated memory, cast to a pointer to struct_type -

-
-
-
-
-

g_new0()

-
#define             g_new0(struct_type, n_structs)
-

Allocates n_structs - elements of type struct_type -, initialized to 0's. -The returned pointer is cast to a pointer to the given type. -If n_structs - is 0 it returns NULL. -Care is taken to avoid overflow when calculating the size of the allocated block.

-

Since the returned pointer is already casted to the right type, -it is normally unnecessary to cast it explicitly, and doing -so might hide memory allocation errors.

-
-

Parameters

-
----- - - - - - - - - - - - - -

struct_type

the type of the elements to allocate.

 

n_structs

the number of elements to allocate.

 
-
-
-

Returns

-

a pointer to the allocated memory, cast to a pointer to struct_type -.

-
-
-
-
-

g_renew()

-
#define             g_renew(struct_type, mem, n_structs)
-

Reallocates the memory pointed to by mem -, so that it now has space for -n_structs - elements of type struct_type -. It returns the new address of -the memory, which may have been moved. -Care is taken to avoid overflow when calculating the size of the allocated block.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

struct_type

the type of the elements to allocate

 

mem

the currently allocated memory

 

n_structs

the number of elements to allocate

 
-
-
-

Returns

-

a pointer to the new allocated memory, cast to a pointer to struct_type -

-
-
-
-
-

g_try_new()

-
#define             g_try_new(struct_type, n_structs)
-

Attempts to allocate n_structs - elements of type struct_type -, and returns -NULL on failure. Contrast with g_new(), which aborts the program on failure. -The returned pointer is cast to a pointer to the given type. -The function returns NULL when n_structs - is 0 of if an overflow occurs.

-
-

Parameters

-
----- - - - - - - - - - - - - -

struct_type

the type of the elements to allocate

 

n_structs

the number of elements to allocate

 
-
-
-

Returns

-

a pointer to the allocated memory, cast to a pointer to struct_type -

-
-

Since: 2.8

-
-
-
-

g_try_new0()

-
#define             g_try_new0(struct_type, n_structs)
-

Attempts to allocate n_structs - elements of type struct_type -, initialized -to 0's, and returns NULL on failure. Contrast with g_new0(), which aborts -the program on failure. -The returned pointer is cast to a pointer to the given type. -The function returns NULL when n_structs - is 0 or if an overflow occurs.

-
-

Parameters

-
----- - - - - - - - - - - - - -

struct_type

the type of the elements to allocate

 

n_structs

the number of elements to allocate

 
-
-
-

Returns

-

a pointer to the allocated memory, cast to a pointer to struct_type -

-
-

Since: 2.8

-
-
-
-

g_try_renew()

-
#define             g_try_renew(struct_type, mem, n_structs)
-

Attempts to reallocate the memory pointed to by mem -, so that it now has -space for n_structs - elements of type struct_type -, and returns NULL on -failure. Contrast with g_renew(), which aborts the program on failure. -It returns the new address of the memory, which may have been moved. -The function returns NULL if an overflow occurs.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

struct_type

the type of the elements to allocate

 

mem

the currently allocated memory

 

n_structs

the number of elements to allocate

 
-
-
-

Returns

-

a pointer to the new allocated memory, cast to a pointer to struct_type -

-
-

Since: 2.8

-
-
-
-

g_malloc ()

-
gpointer
-g_malloc (gsize n_bytes);
-

Allocates n_bytes - bytes of memory. -If n_bytes - is 0 it returns NULL.

-
-

Parameters

-
----- - - - - - -

n_bytes

the number of bytes to allocate

 
-
-
-

Returns

-

a pointer to the allocated memory

-
-
-
-
-

g_malloc0 ()

-
gpointer
-g_malloc0 (gsize n_bytes);
-

Allocates n_bytes - bytes of memory, initialized to 0's. -If n_bytes - is 0 it returns NULL.

-
-

Parameters

-
----- - - - - - -

n_bytes

the number of bytes to allocate

 
-
-
-

Returns

-

a pointer to the allocated memory

-
-
-
-
-

g_realloc ()

-
gpointer
-g_realloc (gpointer mem,
-           gsize n_bytes);
-

Reallocates the memory pointed to by mem -, so that it now has space for -n_bytes - bytes of memory. It returns the new address of the memory, which may -have been moved. mem - may be NULL, in which case it's considered to -have zero-length. n_bytes - may be 0, in which case NULL will be returned -and mem - will be freed unless it is NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

mem

the memory to reallocate.

[nullable]

n_bytes

new size of the memory in bytes

 
-
-
-

Returns

-

the new address of the allocated memory

-
-
-
-
-

g_try_malloc ()

-
gpointer
-g_try_malloc (gsize n_bytes);
-

Attempts to allocate n_bytes -, and returns NULL on failure. -Contrast with g_malloc(), which aborts the program on failure.

-
-

Parameters

-
----- - - - - - -

n_bytes

number of bytes to allocate.

 
-
-
-

Returns

-

the allocated memory, or NULL.

-
-
-
-
-

g_try_malloc0 ()

-
gpointer
-g_try_malloc0 (gsize n_bytes);
-

Attempts to allocate n_bytes -, initialized to 0's, and returns NULL on -failure. Contrast with g_malloc0(), which aborts the program on failure.

-
-

Parameters

-
----- - - - - - -

n_bytes

number of bytes to allocate

 
-
-
-

Returns

-

the allocated memory, or NULL

-
-

Since: 2.8

-
-
-
-

g_try_realloc ()

-
gpointer
-g_try_realloc (gpointer mem,
-               gsize n_bytes);
-

Attempts to realloc mem - to a new size, n_bytes -, and returns NULL -on failure. Contrast with g_realloc(), which aborts the program -on failure.

-

If mem - is NULL, behaves the same as g_try_malloc().

-
-

Parameters

-
----- - - - - - - - - - - - - -

mem

previously-allocated memory, or NULL.

[nullable]

n_bytes

number of bytes to allocate.

 
-
-
-

Returns

-

the allocated memory, or NULL.

-
-
-
-
-

g_malloc_n ()

-
gpointer
-g_malloc_n (gsize n_blocks,
-            gsize n_block_bytes);
-

This function is similar to g_malloc(), allocating (n_blocks - * n_block_bytes -) bytes, -but care is taken to detect possible overflow during multiplication.

-
-

Parameters

-
----- - - - - - - - - - - - - -

n_blocks

the number of blocks to allocate

 

n_block_bytes

the size of each block in bytes

 
-
-
-

Returns

-

a pointer to the allocated memory

-
-

Since: 2.24

-
-
-
-

g_malloc0_n ()

-
gpointer
-g_malloc0_n (gsize n_blocks,
-             gsize n_block_bytes);
-

This function is similar to g_malloc0(), allocating (n_blocks - * n_block_bytes -) bytes, -but care is taken to detect possible overflow during multiplication.

-
-

Parameters

-
----- - - - - - - - - - - - - -

n_blocks

the number of blocks to allocate

 

n_block_bytes

the size of each block in bytes

 
-
-
-

Returns

-

a pointer to the allocated memory

-
-

Since: 2.24

-
-
-
-

g_realloc_n ()

-
gpointer
-g_realloc_n (gpointer mem,
-             gsize n_blocks,
-             gsize n_block_bytes);
-

This function is similar to g_realloc(), allocating (n_blocks - * n_block_bytes -) bytes, -but care is taken to detect possible overflow during multiplication.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

mem

the memory to reallocate.

[nullable]

n_blocks

the number of blocks to allocate

 

n_block_bytes

the size of each block in bytes

 
-
-
-

Returns

-

the new address of the allocated memory

-
-

Since: 2.24

-
-
-
-

g_try_malloc_n ()

-
gpointer
-g_try_malloc_n (gsize n_blocks,
-                gsize n_block_bytes);
-

This function is similar to g_try_malloc(), allocating (n_blocks - * n_block_bytes -) bytes, -but care is taken to detect possible overflow during multiplication.

-
-

Parameters

-
----- - - - - - - - - - - - - -

n_blocks

the number of blocks to allocate

 

n_block_bytes

the size of each block in bytes

 
-
-
-

Returns

-

the allocated memory, or NULL.

-
-

Since: 2.24

-
-
-
-

g_try_malloc0_n ()

-
gpointer
-g_try_malloc0_n (gsize n_blocks,
-                 gsize n_block_bytes);
-

This function is similar to g_try_malloc0(), allocating (n_blocks - * n_block_bytes -) bytes, -but care is taken to detect possible overflow during multiplication.

-
-

Parameters

-
----- - - - - - - - - - - - - -

n_blocks

the number of blocks to allocate

 

n_block_bytes

the size of each block in bytes

 
-
-
-

Returns

-

the allocated memory, or NULL

-
-

Since: 2.24

-
-
-
-

g_try_realloc_n ()

-
gpointer
-g_try_realloc_n (gpointer mem,
-                 gsize n_blocks,
-                 gsize n_block_bytes);
-

This function is similar to g_try_realloc(), allocating (n_blocks - * n_block_bytes -) bytes, -but care is taken to detect possible overflow during multiplication.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

mem

previously-allocated memory, or NULL.

[nullable]

n_blocks

the number of blocks to allocate

 

n_block_bytes

the size of each block in bytes

 
-
-
-

Returns

-

the allocated memory, or NULL.

-
-

Since: 2.24

-
-
-
-

g_free ()

-
void
-g_free (gpointer mem);
-

Frees the memory pointed to by mem -.

-

If mem - is NULL it simply returns, so there is no need to check mem - -against NULL before calling this function.

-
-

Parameters

-
----- - - - - - -

mem

the memory to free.

[nullable]
-
-
-
-
-

g_clear_pointer ()

-
void
-g_clear_pointer (gpointer *pp,
-                 GDestroyNotify destroy);
-

Clears a reference to a variable.

-

pp - must not be NULL.

-

If the reference is NULL then this function does nothing. -Otherwise, the variable is destroyed using destroy - and the -pointer is set to NULL.

-

A macro is also included that allows this function to be used without -pointer casts.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

pp

a pointer to a variable, struct member etc. holding a -pointer.

[not nullable]

destroy

a function to which a gpointer can be passed, to destroy *pp -

 
-
-

Since: 2.34

-
-
-
-

g_steal_pointer ()

-
gpointer
-g_steal_pointer (gpointer pp);
-

Sets pp - to NULL, returning the value that was there before.

-

Conceptually, this transfers the ownership of the pointer from the -referenced variable to the "caller" of the macro (ie: "steals" the -reference).

-

The return value will be properly typed, according to the type of -pp -.

-

This can be very useful when combined with g_autoptr() to prevent the -return value of a function from being automatically freed. Consider -the following example (which only works on GCC and clang):

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
GObject *
-create_object (void)
-{
-  g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL);
-
-  if (early_error_case)
-    return NULL;
-
-  return g_steal_pointer (&obj);
-}
-
- -

-

It can also be used in similar ways for 'out' parameters and is -particularly useful for dealing with optional out parameters:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
gboolean
-get_object (GObject **obj_out)
-{
-  g_autoptr(GObject) obj = g_object_new (G_TYPE_OBJECT, NULL);
-
-  if (early_error_case)
-    return FALSE;
-
-  if (obj_out)
-    *obj_out = g_steal_pointer (&obj);
-
-  return TRUE;
-}
-
- -

-

In the above example, the object will be automatically freed in the -early error case and also in the case that NULL was given for -obj_out -.

-
-

Parameters

-
----- - - - - - -

pp

a pointer to a pointer.

[not nullable]
-
-

Since: 2.44

-
-
-
-

g_alloca()

-
#define             g_alloca(size)
-

Allocates size - bytes on the stack; these bytes will be freed when the current -stack frame is cleaned up. This macro essentially just wraps the alloca() -function present on most UNIX variants. -Thus it provides the same advantages and pitfalls as alloca():

-
    -
  • alloca() is very fast, as on most systems it's implemented by just adjusting -the stack pointer register.

  • -
  • It doesn't cause any memory fragmentation, within its scope, separate alloca() -blocks just build up and are released together at function end.

  • -
  • Allocation sizes have to fit into the current stack frame. For instance in a -threaded environment on Linux, the per-thread stack size is limited to 2 Megabytes, -so be sparse with alloca() uses.

  • -
  • Allocation failure due to insufficient stack space is not indicated with a NULL -return like e.g. with malloc(). Instead, most systems probably handle it the same -way as out of stack space situations from infinite function recursion, i.e. -with a segmentation fault.

  • -
  • Special care has to be taken when mixing alloca() with GNU C variable sized arrays. -Stack space allocated with alloca() in the same scope as a variable sized array -will be freed together with the variable sized array upon exit of that scope, and -not upon exit of the enclosing function scope.

  • -
-
-

Parameters

-
----- - - - - - -

size

number of bytes to allocate.

 
-
-
-

Returns

-

space for size -bytes, allocated on the stack

-
-
-
-
-

g_newa()

-
#define             g_newa(struct_type, n_structs)
-

Wraps g_alloca() in a more typesafe manner.

-
-

Parameters

-
----- - - - - - - - - - - - - -

struct_type

Type of memory chunks to be allocated

 

n_structs

Number of chunks to be allocated

 
-
-
-

Returns

-

Pointer to stack space for n_structs -chunks of type struct_type -

-
-
-
-
-

g_memmove()

-
#define             g_memmove(dest,src,len)
-
-

g_memmove has been deprecated since version 2.40 and should not be used in newly-written code.

-

Just use memmove().

-
-

Copies a block of memory len - bytes long, from src - to dest -. -The source and destination areas may overlap.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dest

the destination address to copy the bytes to.

 

src

the source address to copy the bytes from.

 

len

the number of bytes to copy.

 
-
-
-
-
-

g_memdup ()

-
gpointer
-g_memdup (gconstpointer mem,
-          guint byte_size);
-

Allocates byte_size - bytes of memory, and copies byte_size - bytes into it -from mem -. If mem - is NULL it returns NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

mem

the memory to copy.

 

byte_size

the number of bytes to copy.

 
-
-
-

Returns

-

a pointer to the newly-allocated copy of the memory, or NULL if mem -is NULL.

-
-
-
-
-

g_mem_set_vtable ()

-
void
-g_mem_set_vtable (GMemVTable *vtable);
-
-

g_mem_set_vtable has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use other memory profiling tools instead

-
-

This function used to let you override the memory allocation function. -However, its use was incompatible with the use of global constructors -in GLib and GIO, because those use the GLib allocators before main is -reached. Therefore this function is now deprecated and is just a stub.

-
-

Parameters

-
----- - - - - - -

vtable

table of memory allocation routines.

 
-
-
-
-
-

g_mem_is_system_malloc ()

-
gboolean
-g_mem_is_system_malloc (void);
-
-

g_mem_is_system_malloc has been deprecated since version 2.46 and should not be used in newly-written code.

-

GLib always uses the system malloc, so this function always -returns TRUE.

-
-

Checks whether the allocator used by g_malloc() is the system's -malloc implementation. If it returns TRUE memory allocated with -malloc() can be used interchangeable with memory allocated using g_malloc(). -This function is useful for avoiding an extra copy of allocated memory returned -by a non-GLib-based API.

-
-

Returns

-

if TRUE, malloc() and g_malloc() can be mixed.

-
-
-
-
-

g_mem_profile ()

-
void
-g_mem_profile (void);
-
-

g_mem_profile has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use other memory profiling tools instead

-
-

GLib used to support some tools for memory profiling, but this -no longer works. There are many other useful tools for memory -profiling these days which can be used instead.

-
-
-
-

Types and Values

-
-

g_mem_gc_friendly

-
extern gboolean g_mem_gc_friendly;
-
-

This variable is TRUE if the G_DEBUG environment variable -includes the key gc-friendly.

-
-
-
-

struct GMemVTable

-
struct GMemVTable {
-  gpointer (*malloc)      (gsize    n_bytes);
-  gpointer (*realloc)     (gpointer mem,
-			   gsize    n_bytes);
-  void     (*free)        (gpointer mem);
-  /* optional; set to NULL if not used ! */
-  gpointer (*calloc)      (gsize    n_blocks,
-			   gsize    n_block_bytes);
-  gpointer (*try_malloc)  (gsize    n_bytes);
-  gpointer (*try_realloc) (gpointer mem,
-			   gsize    n_bytes);
-};
-
-

A set of functions used to perform memory allocation. The same GMemVTable must -be used for all allocations in the same program; a call to g_mem_set_vtable(), -if it exists, should be prior to any use of GLib.

-

This functions related to this has been deprecated in 2.46, and no longer work.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

malloc ()

function to use for allocating memory.

 

realloc ()

function to use for reallocating memory.

 

free ()

function to use to free memory.

 

calloc ()

function to use for allocating zero-filled memory.

 

try_malloc ()

function to use for allocating memory without a default error handler.

 

try_realloc ()

function to use for reallocating memory without a default error handler.

 
-
-
-
-
-

glib_mem_profiler_table

-
extern GMemVTable *glib_mem_profiler_table;
-
-
-

glib_mem_profiler_table has been deprecated since version 2.46 and should not be used in newly-written code.

-

Use other memory profiling tools instead

-
-

Used to be a GMemVTable containing profiling variants of the memory -allocation functions, but this variable shouldn't be modified anymore.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Memory-Slices.html b/docs/reference/glib/html/glib-Memory-Slices.html deleted file mode 100644 index dba8f6b25..000000000 --- a/docs/reference/glib/html/glib-Memory-Slices.html +++ /dev/null @@ -1,652 +0,0 @@ - - - - -Memory Slices: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Memory Slices

-

Memory Slices — efficient way to allocate groups of equal-sized - chunks of memory

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gpointer - -g_slice_alloc () -
-gpointer - -g_slice_alloc0 () -
-gpointer - -g_slice_copy () -
-void - -g_slice_free1 () -
-void - -g_slice_free_chain_with_offset () -
#define -g_slice_new() -
#define -g_slice_new0() -
#define -g_slice_dup() -
#define -g_slice_free() -
#define -g_slice_free_chain() -
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

Memory slices provide a space-efficient and multi-processing scalable -way to allocate equal-sized pieces of memory, just like the original -GMemChunks (from GLib 2.8), while avoiding their excessive -memory-waste, scalability and performance problems.

-

To achieve these goals, the slice allocator uses a sophisticated, -layered design that has been inspired by Bonwick's slab allocator -(Bonwick94 -Jeff Bonwick, The slab allocator: An object-caching kernel -memory allocator. USENIX 1994, and -Bonwick01 -Bonwick and Jonathan Adams, Magazines and vmem: Extending the -slab allocator to many cpu's and arbitrary resources. USENIX 2001)

-

It uses posix_memalign() to optimize allocations of many equally-sized -chunks, and has per-thread free lists (the so-called magazine layer) -to quickly satisfy allocation requests of already known structure sizes. -This is accompanied by extra caching logic to keep freed memory around -for some time before returning it to the system. Memory that is unused -due to alignment constraints is used for cache colorization (random -distribution of chunk addresses) to improve CPU cache utilization. The -caching layer of the slice allocator adapts itself to high lock contention -to improve scalability.

-

The slice allocator can allocate blocks as small as two pointers, and -unlike malloc(), it does not reserve extra space per block. For large block -sizes, g_slice_new() and g_slice_alloc() will automatically delegate to the -system malloc() implementation. For newly written code it is recommended -to use the new g_slice API instead of g_malloc() and -friends, as long as objects are not resized during their lifetime and the -object size used at allocation time is still available when freeing.

-

Here is an example for using the slice allocator:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
gchar *mem[10000];
-gint i;
-
-// Allocate 10000 blocks.
-for (i = 0; i < 10000; i++)
-  {
-    mem[i] = g_slice_alloc (50);
-
-    // Fill in the memory with some junk.
-    for (j = 0; j < 50; j++)
-      mem[i][j] = i * j;
-  }
-
-// Now free all of the blocks.
-for (i = 0; i < 10000; i++)
-  g_slice_free1 (50, mem[i]);
-
- -

-

And here is an example for using the using the slice allocator -with data structures:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
GRealArray *array;
-
-// Allocate one block, using the g_slice_new() macro.
-array = g_slice_new (GRealArray);
-
-// We can now use array just like a normal pointer to a structure.
-array->data            = NULL;
-array->len             = 0;
-array->alloc           = 0;
-array->zero_terminated = (zero_terminated ? 1 : 0);
-array->clear           = (clear ? 1 : 0);
-array->elt_size        = elt_size;
-
-// We can free the block, so it can be reused.
-g_slice_free (GRealArray, array);
-
- -

-
-
-

Functions

-
-

g_slice_alloc ()

-
gpointer
-g_slice_alloc (gsize block_size);
-

Allocates a block of memory from the slice allocator. -The block adress handed out can be expected to be aligned -to at least 1 * sizeof (void*), -though in general slices are 2 * sizeof (void*) bytes aligned, -if a malloc() fallback implementation is used instead, -the alignment may be reduced in a libc dependent fashion. -Note that the underlying slice allocation mechanism can -be changed with the G_SLICE=always-malloc -environment variable.

-
-

Parameters

-
----- - - - - - -

block_size

the number of bytes to allocate

 
-
-
-

Returns

-

a pointer to the allocated memory block, which will be NULL if and -only if mem_size -is 0

-
-

Since: 2.10

-
-
-
-

g_slice_alloc0 ()

-
gpointer
-g_slice_alloc0 (gsize block_size);
-

Allocates a block of memory via g_slice_alloc() and initializes -the returned memory to 0. Note that the underlying slice allocation -mechanism can be changed with the G_SLICE=always-malloc -environment variable.

-
-

Parameters

-
----- - - - - - -

block_size

the number of bytes to allocate

 
-
-
-

Returns

-

a pointer to the allocated block, which will be NULL if and only -if mem_size -is 0

-
-

Since: 2.10

-
-
-
-

g_slice_copy ()

-
gpointer
-g_slice_copy (gsize block_size,
-              gconstpointer mem_block);
-

Allocates a block of memory from the slice allocator -and copies block_size - bytes into it from mem_block -.

-

mem_block - must be non-NULL if block_size - is non-zero.

-
-

Parameters

-
----- - - - - - - - - - - - - -

block_size

the number of bytes to allocate

 

mem_block

the memory to copy

 
-
-
-

Returns

-

a pointer to the allocated memory block, which will be NULL if and -only if mem_size -is 0

-
-

Since: 2.14

-
-
-
-

g_slice_free1 ()

-
void
-g_slice_free1 (gsize block_size,
-               gpointer mem_block);
-

Frees a block of memory.

-

The memory must have been allocated via g_slice_alloc() or -g_slice_alloc0() and the block_size - has to match the size -specified upon allocation. Note that the exact release behaviour -can be changed with the G_DEBUG=gc-friendly environment -variable, also see G_SLICE for related debugging options.

-

If mem_block - is NULL, this function does nothing.

-
-

Parameters

-
----- - - - - - - - - - - - - -

block_size

the size of the block

 

mem_block

a pointer to the block to free

 
-
-

Since: 2.10

-
-
-
-

g_slice_free_chain_with_offset ()

-
void
-g_slice_free_chain_with_offset (gsize block_size,
-                                gpointer mem_chain,
-                                gsize next_offset);
-

Frees a linked list of memory blocks of structure type type -.

-

The memory blocks must be equal-sized, allocated via -g_slice_alloc() or g_slice_alloc0() and linked together by a -next - pointer (similar to GSList). The offset of the next - -field in each block is passed as third argument. -Note that the exact release behaviour can be changed with the -G_DEBUG=gc-friendly environment variable, also see -G_SLICE for related debugging options.

-

If mem_chain - is NULL, this function does nothing.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

block_size

the size of the blocks

 

mem_chain

a pointer to the first block of the chain

 

next_offset

the offset of the next -field in the blocks

 
-
-

Since: 2.10

-
-
-
-

g_slice_new()

-
#define             g_slice_new(type)
-

A convenience macro to allocate a block of memory from the -slice allocator.

-

It calls g_slice_alloc() with sizeof (@type) and casts the -returned pointer to a pointer of the given type, avoiding a type -cast in the source code. Note that the underlying slice allocation -mechanism can be changed with the G_SLICE=always-malloc -environment variable.

-

This can never return NULL as the minimum allocation size from -sizeof (@type) is 1 byte.

-
-

Parameters

-
----- - - - - - -

type

the type to allocate, typically a structure name

 
-
-
-

Returns

-

a pointer to the allocated block, cast to a pointer -to type -.

-

[not nullable]

-
-

Since: 2.10

-
-
-
-

g_slice_new0()

-
#define             g_slice_new0(type)
-

A convenience macro to allocate a block of memory from the -slice allocator and set the memory to 0.

-

It calls g_slice_alloc0() with sizeof (@type) -and casts the returned pointer to a pointer of the given type, -avoiding a type cast in the source code. -Note that the underlying slice allocation mechanism can -be changed with the G_SLICE=always-malloc -environment variable.

-

This can never return NULL as the minimum allocation size from -sizeof (@type) is 1 byte.

-
-

Parameters

-
----- - - - - - -

type

the type to allocate, typically a structure name

 
-
-
-

Returns

-

a pointer to the allocated block, cast to a pointer -to type -.

-

[not nullable]

-
-

Since: 2.10

-
-
-
-

g_slice_dup()

-
#define             g_slice_dup(type, mem)
-

A convenience macro to duplicate a block of memory using -the slice allocator.

-

It calls g_slice_copy() with sizeof (@type) -and casts the returned pointer to a pointer of the given type, -avoiding a type cast in the source code. -Note that the underlying slice allocation mechanism can -be changed with the G_SLICE=always-malloc -environment variable.

-

This can never return NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

type

the type to duplicate, typically a structure name

 

mem

the memory to copy into the allocated block.

[not nullable]
-
-
-

Returns

-

a pointer to the allocated block, cast to a pointer -to type -.

-

[not nullable]

-
-

Since: 2.14

-
-
-
-

g_slice_free()

-
#define             g_slice_free(type, mem)
-

A convenience macro to free a block of memory that has -been allocated from the slice allocator.

-

It calls g_slice_free1() using sizeof (type) -as the block size. -Note that the exact release behaviour can be changed with the -G_DEBUG=gc-friendly environment variable, also see -G_SLICE for related debugging options.

-

If mem - is NULL, this macro does nothing.

-
-

Parameters

-
----- - - - - - - - - - - - - -

type

the type of the block to free, typically a structure name

 

mem

a pointer to the block to free

 
-
-

Since: 2.10

-
-
-
-

g_slice_free_chain()

-
#define             g_slice_free_chain(type, mem_chain, next)
-

Frees a linked list of memory blocks of structure type type -. -The memory blocks must be equal-sized, allocated via -g_slice_alloc() or g_slice_alloc0() and linked together by -a next - pointer (similar to GSList). The name of the -next - field in type - is passed as third argument. -Note that the exact release behaviour can be changed with the -G_DEBUG=gc-friendly environment variable, also see -G_SLICE for related debugging options.

-

If mem_chain - is NULL, this function does nothing.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

type

the type of the mem_chain -blocks

 

mem_chain

a pointer to the first block of the chain

 

next

the field name of the next pointer in type -

 
-
-

Since: 2.10

-
-
-
-

Types and Values

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Message-Logging.html b/docs/reference/glib/html/glib-Message-Logging.html deleted file mode 100644 index 61cdcd610..000000000 --- a/docs/reference/glib/html/glib-Message-Logging.html +++ /dev/null @@ -1,2018 +0,0 @@ - - - - -Message Output and Debugging Functions: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Message Output and Debugging Functions

-

Message Output and Debugging Functions — functions to output messages and help debug applications

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -(*GLogFunc) () -
-void - -g_log () -
-void - -g_logv () -
#define -g_message() -
#define -g_warning() -
#define -g_critical() -
#define -g_error() -
#define -g_info() -
#define -g_debug() -
-guint - -g_log_set_handler () -
-guint - -g_log_set_handler_full () -
-void - -g_log_remove_handler () -
-GLogLevelFlags - -g_log_set_always_fatal () -
-GLogLevelFlags - -g_log_set_fatal_mask () -
-void - -g_log_default_handler () -
-GLogFunc - -g_log_set_default_handler () -
-void - -g_log_structured () -
-void - -g_log_variant () -
-void - -g_log_structured_array () -
#defineG_DEBUG_HERE
-GLogWriterOutput - -(*GLogWriterFunc) () -
-void - -g_log_set_writer_func () -
-gboolean - -g_log_writer_supports_color () -
-gboolean - -g_log_writer_is_journald () -
-gchar * - -g_log_writer_format_fields () -
-GLogWriterOutput - -g_log_writer_journald () -
-GLogWriterOutput - -g_log_writer_standard_streams () -
-GLogWriterOutput - -g_log_writer_default () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
#defineG_LOG_DOMAIN
#defineG_LOG_FATAL_MASK
#defineG_LOG_LEVEL_USER_SHIFT
enumGLogLevelFlags
structGLogField
enumGLogWriterOutput
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

These functions provide support for outputting messages.

-

The g_return family of macros (g_return_if_fail(), -g_return_val_if_fail(), g_return_if_reached(), -g_return_val_if_reached()) should only be used for programming -errors, a typical use case is checking for invalid parameters at -the beginning of a public function. They should not be used if -you just mean "if (error) return", they should only be used if -you mean "if (bug in program) return". The program behavior is -generally considered undefined after one of these checks fails. -They are not intended for normal control flow, only to give a -perhaps-helpful warning before giving up.

-

Structured logging output is supported using g_log_structured(). This differs -from the traditional g_log() API in that log messages are handled as a -collection of key–value pairs representing individual pieces of information, -rather than as a single string containing all the information in an arbitrary -format.

-

The convenience macros g_info(), g_message(), g_debug(), g_warning() and g_error() -will use the traditional g_log() API unless you define the symbol -G_LOG_USE_STRUCTURED before including glib.h. But note that even messages -logged through the traditional g_log() API are ultimatively passed to -g_log_structured(), so that all log messages end up in same destination. -If G_LOG_USE_STRUCTURED is defined, g_test_expect_message() will become -ineffective for the wrapper macros g_warning() and friends (see -Testing for Messages).

-

The support for structured logging was motivated by the following needs (some -of which were supported previously; others weren’t):

-
    -
  • Support for multiple logging levels.

  • -
  • Structured log support with the ability to add MESSAGE_IDs (see -g_log_structured()).

  • -
  • Moving the responsibility for filtering log messages from the program to -the log viewer — instead of libraries and programs installing log handlers -(with g_log_set_handler()) which filter messages before output, all log -messages are outputted, and the log viewer program (such as journalctl) -must filter them. This is based on the idea that bugs are sometimes hard -to reproduce, so it is better to log everything possible and then use -tools to analyse the logs than it is to not be able to reproduce a bug to -get additional log data. Code which uses logging in performance-critical -sections should compile out the g_log_structured() calls in -release builds, and compile them in in debugging builds.

  • -
  • A single writer function which handles all log messages in a process, from -all libraries and program code; rather than multiple log handlers with -poorly defined interactions between them. This allows a program to easily -change its logging policy by changing the writer function, for example to -log to an additional location or to change what logging output fallbacks -are used. The log writer functions provided by GLib are exposed publicly -so they can be used from programs’ log writers. This allows log writer -policy and implementation to be kept separate.

  • -
  • If a library wants to add standard information to all of its log messages -(such as library state) or to redact private data (such as passwords or -network credentials), it should use a wrapper function around its -g_log_structured() calls or implement that in the single log writer -function.

  • -
  • If a program wants to pass context data from a g_log_structured() call to -its log writer function so that, for example, it can use the correct -server connection to submit logs to, that user data can be passed as a -zero-length GLogField to g_log_structured_array().

  • -
  • Color output needed to be supported on the terminal, to make reading -through logs easier.

  • -
-
-

Using Structured Logging

-

To use structured logging (rather than the old-style logging), either use -the g_log_structured() and g_log_structured_array() functions; or define -G_LOG_USE_STRUCTURED before including any GLib header, and use the -g_message(), g_debug(), g_error() (etc.) macros.

-

You do not need to define G_LOG_USE_STRUCTURED to use g_log_structured(), -but it is a good idea to avoid confusion.

-
-
-

Log Domains

-

Log domains may be used to broadly split up the origins of log messages. -Typically, there are one or a few log domains per application or library. -G_LOG_DOMAIN should be used to define the default log domain for the current -compilation unit — it is typically defined at the top of a source file, or in -the preprocessor flags for a group of source files.

-

Log domains must be unique, and it is recommended that they are the -application or library name, optionally followed by a hyphen and a sub-domain -name. For example, bloatpad or bloatpad-io.

-
-
-

Debug Message Output

-

The default log functions (g_log_default_handler() for the old-style API and -g_log_writer_default() for the structured API) both drop debug and -informational messages by default, unless the log domains of those messages -are listed in the G_MESSAGES_DEBUG environment variable (or it is set to -all).

-

It is recommended that custom log writer functions re-use the -G_MESSAGES_DEBUG environment variable, rather than inventing a custom one, -so that developers can re-use the same debugging techniques and tools across -projects.

-
-
-

Testing for Messages

-

With the old g_log() API, g_test_expect_message() and -g_test_assert_expected_messages() could be used in simple cases to check -whether some code under test had emitted a given log message. These -functions have been deprecated with the structured logging API, for several -reasons:

-
    -
  • They relied on an internal queue which was too inflexible for many use -cases, where messages might be emitted in several orders, some -messages might not be emitted deterministically, or messages might be -emitted by unrelated log domains.

  • -
  • They do not support structured log fields.

  • -
  • Examining the log output of code is a bad approach to testing it, and -while it might be necessary for legacy code which uses g_log(), it should -be avoided for new code using g_log_structured().

  • -
-

They will continue to work as before if g_log() is in use (and -G_LOG_USE_STRUCTURED is not defined). They will do nothing if used with the -structured logging API.

-

Examining the log output of code is discouraged: libraries should not emit to -stderr during defined behaviour, and hence this should not be tested. If -the log emissions of a library during undefined behaviour need to be tested, -they should be limited to asserting that the library aborts and prints a -suitable error message before aborting. This should be done with -g_test_trap_assert_stderr().

-

If it is really necessary to test the structured log messages emitted by a -particular piece of code – and the code cannot be restructured to be more -suitable to more conventional unit testing – you should write a custom log -writer function (see g_log_set_writer_func()) which appends all log messages -to a queue. When you want to check the log messages, examine and clear the -queue, ignoring irrelevant log messages (for example, from log domains other -than the one under test).

-
-
-
-

Functions

-
-

GLogFunc ()

-
void
-(*GLogFunc) (const gchar *log_domain,
-             GLogLevelFlags log_level,
-             const gchar *message,
-             gpointer user_data);
-

Specifies the prototype of log handler functions.

-

The default log handler, g_log_default_handler(), automatically appends a -new-line character to message - when printing it. It is advised that any -custom log handler functions behave similarly, so that logging calls in user -code do not need modifying to add a new-line character to the message if the -log handler is changed.

-

This is not used if structured logging is enabled; see -Using Structured Logging.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

log_domain

the log domain of the message

 

log_level

the log level of the message (including the -fatal and recursion flags)

 

message

the message to process

 

user_data

user data, set in g_log_set_handler()

 
-
-
-
-
-

g_log ()

-
void
-g_log (const gchar *log_domain,
-       GLogLevelFlags log_level,
-       const gchar *format,
-       ...);
-

Logs an error or debugging message.

-

If the log level has been set as fatal, the abort() -function is called to terminate the program.

-

If g_log_default_handler() is used as the log handler function, a new-line -character will automatically be appended to @..., and need not be entered -manually.

-

If structured logging is enabled this will -output via the structured log writer function (see g_log_set_writer_func()).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

log_domain

the log domain, usually G_LOG_DOMAIN, or NULL -for the default.

[nullable]

log_level

the log level, either from GLogLevelFlags -or a user-defined level

 

format

the message format. See the printf() documentation

 

...

the parameters to insert into the format string

 
-
-
-
-
-

g_logv ()

-
void
-g_logv (const gchar *log_domain,
-        GLogLevelFlags log_level,
-        const gchar *format,
-        va_list args);
-

Logs an error or debugging message.

-

If the log level has been set as fatal, the abort() -function is called to terminate the program.

-

If g_log_default_handler() is used as the log handler function, a new-line -character will automatically be appended to @..., and need not be entered -manually.

-

If structured logging is enabled this will -output via the structured log writer function (see g_log_set_writer_func()).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

log_domain

the log domain, or NULL for the default "" -application domain.

[nullable]

log_level

the log level

 

format

the message format. See the printf() documentation

 

args

the parameters to insert into the format string

 
-
-
-
-
-

g_message()

-
#define             g_message(...)
-

A convenience function/macro to log a normal message.

-

If g_log_default_handler() is used as the log handler function, a new-line -character will automatically be appended to @..., and need not be entered -manually.

-

If structured logging is enabled, this will use g_log_structured(); -otherwise it will use g_log(). See -Using Structured Logging.

-
-

Parameters

-
----- - - - - - -

...

format string, followed by parameters to insert -into the format string (as with printf())

 
-
-
-
-
-

g_warning()

-
#define             g_warning(...)
-

A convenience function/macro to log a warning message.

-

This is not intended for end user error reporting. Use of GError is -preferred for that instead, as it allows calling functions to perform actions -conditional on the type of error.

-

You can make warnings fatal at runtime by setting the G_DEBUG -environment variable (see -Running GLib Applications).

-

If g_log_default_handler() is used as the log handler function, -a newline character will automatically be appended to @..., and -need not be entered manually.

-

If structured logging is enabled, this will use g_log_structured(); -otherwise it will use g_log(). See -Using Structured Logging.

-
-

Parameters

-
----- - - - - - -

...

format string, followed by parameters to insert -into the format string (as with printf())

 
-
-
-
-
-

g_critical()

-
#define             g_critical(...)
-

Logs a "critical warning" (G_LOG_LEVEL_CRITICAL). -It's more or less application-defined what constitutes -a critical vs. a regular warning. You could call -g_log_set_always_fatal() to make critical warnings exit -the program, then use g_critical() for fatal errors, for -example.

-

You can also make critical warnings fatal at runtime by -setting the G_DEBUG environment variable (see -Running GLib Applications).

-

If g_log_default_handler() is used as the log handler function, a new-line -character will automatically be appended to @..., and need not be entered -manually.

-

If structured logging is enabled, this will use g_log_structured(); -otherwise it will use g_log(). See -Using Structured Logging.

-
-

Parameters

-
----- - - - - - -

...

format string, followed by parameters to insert -into the format string (as with printf())

 
-
-
-
-
-

g_error()

-
#define             g_error(...)
-

A convenience function/macro to log an error message.

-

This is not intended for end user error reporting. Use of GError is -preferred for that instead, as it allows calling functions to perform actions -conditional on the type of error.

-

Error messages are always fatal, resulting in a call to -abort() to terminate the application. This function will -result in a core dump; don't use it for errors you expect. -Using this function indicates a bug in your program, i.e. -an assertion failure.

-

If g_log_default_handler() is used as the log handler function, a new-line -character will automatically be appended to @..., and need not be entered -manually.

-

If structured logging is enabled, this will use g_log_structured(); -otherwise it will use g_log(). See -Using Structured Logging.

-
-

Parameters

-
----- - - - - - -

...

format string, followed by parameters to insert -into the format string (as with printf())

 
-
-
-
-
-

g_info()

-
#define             g_info(...)
-

A convenience function/macro to log an informational message. Seldom used.

-

If g_log_default_handler() is used as the log handler function, a new-line -character will automatically be appended to @..., and need not be entered -manually.

-

Such messages are suppressed by the g_log_default_handler() and -g_log_writer_default() unless the G_MESSAGES_DEBUG environment variable is -set appropriately.

-

If structured logging is enabled, this will use g_log_structured(); -otherwise it will use g_log(). See -Using Structured Logging.

-
-

Parameters

-
----- - - - - - -

...

format string, followed by parameters to insert -into the format string (as with printf())

 
-
-

Since: 2.40

-
-
-
-

g_debug()

-
#define             g_debug(...)
-

A convenience function/macro to log a debug message.

-

If g_log_default_handler() is used as the log handler function, a new-line -character will automatically be appended to @..., and need not be entered -manually.

-

Such messages are suppressed by the g_log_default_handler() and -g_log_writer_default() unless the G_MESSAGES_DEBUG environment variable is -set appropriately.

-

If structured logging is enabled, this will use g_log_structured(); -otherwise it will use g_log(). See -Using Structured Logging.

-
-

Parameters

-
----- - - - - - -

...

format string, followed by parameters to insert -into the format string (as with printf())

 
-
-

Since: 2.6

-
-
-
-

g_log_set_handler ()

-
guint
-g_log_set_handler (const gchar *log_domain,
-                   GLogLevelFlags log_levels,
-                   GLogFunc log_func,
-                   gpointer user_data);
-

Sets the log handler for a domain and a set of log levels. -To handle fatal and recursive messages the log_levels - parameter -must be combined with the G_LOG_FLAG_FATAL and G_LOG_FLAG_RECURSION -bit flags.

-

Note that since the G_LOG_LEVEL_ERROR log level is always fatal, if -you want to set a handler for this log level you must combine it with -G_LOG_FLAG_FATAL.

-

This has no effect if structured logging is enabled; see -Using Structured Logging.

-

Here is an example for adding a log handler for all warning messages -in the default domain:

-
- - - - - - - -
1
-2
g_log_set_handler (NULL, G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL
-                   | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
-
- -

-

This example adds a log handler for all critical messages from GTK+:

-
- - - - - - - -
1
-2
g_log_set_handler ("Gtk", G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL
-                   | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
-
- -

-

This example adds a log handler for all messages from GLib:

-
- - - - - - - -
1
-2
g_log_set_handler ("GLib", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL
-                   | G_LOG_FLAG_RECURSION, my_log_handler, NULL);
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

log_domain

the log domain, or NULL for the default "" -application domain.

[nullable]

log_levels

the log levels to apply the log handler for. -To handle fatal and recursive messages as well, combine -the log levels with the G_LOG_FLAG_FATAL and -G_LOG_FLAG_RECURSION bit flags.

 

log_func

the log handler function

 

user_data

data passed to the log handler

 
-
-
-

Returns

-

the id of the new handler

-
-
-
-
-

g_log_set_handler_full ()

-
guint
-g_log_set_handler_full (const gchar *log_domain,
-                        GLogLevelFlags log_levels,
-                        GLogFunc log_func,
-                        gpointer user_data,
-                        GDestroyNotify destroy);
-

Like g_log_sets_handler(), but takes a destroy notify for the user_data -.

-

This has no effect if structured logging is enabled; see -Using Structured Logging.

-

[rename-to g_log_set_handler]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

log_domain

the log domain, or NULL for the default "" -application domain.

[nullable]

log_levels

the log levels to apply the log handler for. -To handle fatal and recursive messages as well, combine -the log levels with the G_LOG_FLAG_FATAL and -G_LOG_FLAG_RECURSION bit flags.

 

log_func

the log handler function

 

user_data

data passed to the log handler

 

destroy

destroy notify for user_data -, or NULL

 
-
-
-

Returns

-

the id of the new handler

-
-

Since: 2.46

-
-
-
-

g_log_remove_handler ()

-
void
-g_log_remove_handler (const gchar *log_domain,
-                      guint handler_id);
-

Removes the log handler.

-

This has no effect if structured logging is enabled; see -Using Structured Logging.

-
-

Parameters

-
----- - - - - - - - - - - - - -

log_domain

the log domain

 

handler_id

the id of the handler, which was returned -in g_log_set_handler()

 
-
-
-
-
-

g_log_set_always_fatal ()

-
GLogLevelFlags
-g_log_set_always_fatal (GLogLevelFlags fatal_mask);
-

Sets the message levels which are always fatal, in any log domain. -When a message with any of these levels is logged the program terminates. -You can only set the levels defined by GLib to be fatal. -G_LOG_LEVEL_ERROR is always fatal.

-

You can also make some message levels fatal at runtime by setting -the G_DEBUG environment variable (see -Running GLib Applications).

-

Libraries should not call this function, as it affects all messages logged -by a process, including those from other libraries.

-

Structured log messages (using g_log_structured() and -g_log_structured_array()) are fatal only if the default log writer is used; -otherwise it is up to the writer function to determine which log messages -are fatal. See Using Structured Logging.

-
-

Parameters

-
----- - - - - - -

fatal_mask

the mask containing bits set for each level -of error which is to be fatal

 
-
-
-

Returns

-

the old fatal mask

-
-
-
-
-

g_log_set_fatal_mask ()

-
GLogLevelFlags
-g_log_set_fatal_mask (const gchar *log_domain,
-                      GLogLevelFlags fatal_mask);
-

Sets the log levels which are fatal in the given domain. -G_LOG_LEVEL_ERROR is always fatal.

-

This has no effect on structured log messages (using g_log_structured() or -g_log_structured_array()). To change the fatal behaviour for specific log -messages, programs must install a custom log writer function using -g_log_set_writer_func(). See -Using Structured Logging.

-
-

Parameters

-
----- - - - - - - - - - - - - -

log_domain

the log domain

 

fatal_mask

the new fatal mask

 
-
-
-

Returns

-

the old fatal mask for the log domain

-
-
-
-
-

g_log_default_handler ()

-
void
-g_log_default_handler (const gchar *log_domain,
-                       GLogLevelFlags log_level,
-                       const gchar *message,
-                       gpointer unused_data);
-

The default log handler set up by GLib; g_log_set_default_handler() -allows to install an alternate default log handler. -This is used if no log handler has been set for the particular log -domain and log level combination. It outputs the message to stderr -or stdout and if the log level is fatal it calls abort(). It automatically -prints a new-line character after the message, so one does not need to be -manually included in message -.

-

The behavior of this log handler can be influenced by a number of -environment variables:

-
    -
  • G_MESSAGES_PREFIXED: A :-separated list of log levels for which -messages should be prefixed by the program name and PID of the -aplication.

  • -
  • G_MESSAGES_DEBUG: A space-separated list of log domains for -which debug and informational messages are printed. By default -these messages are not printed.

  • -
-

stderr is used for levels G_LOG_LEVEL_ERROR, G_LOG_LEVEL_CRITICAL, -G_LOG_LEVEL_WARNING and G_LOG_LEVEL_MESSAGE. stdout is used for -the rest.

-

This has no effect if structured logging is enabled; see -Using Structured Logging.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

log_domain

the log domain of the message, or NULL for the -default "" application domain.

[nullable]

log_level

the level of the message

 

message

the message.

[nullable]

unused_data

data passed from g_log() which is unused.

[nullable]
-
-
-
-
-

g_log_set_default_handler ()

-
GLogFunc
-g_log_set_default_handler (GLogFunc log_func,
-                           gpointer user_data);
-

Installs a default log handler which is used if no -log handler has been set for the particular log domain -and log level combination. By default, GLib uses -g_log_default_handler() as default log handler.

-

This has no effect if structured logging is enabled; see -Using Structured Logging.

-
-

Parameters

-
----- - - - - - - - - - - - - -

log_func

the log handler function

 

user_data

data passed to the log handler

 
-
-
-

Returns

-

the previous default log handler

-
-

Since: 2.6

-
-
-
-

g_log_structured ()

-
void
-g_log_structured (const gchar *log_domain,
-                  GLogLevelFlags log_level,
-                  ...);
-

Log a message with structured data. The message will be passed through to -the log writer set by the application using g_log_set_writer_func(). If the -message is fatal (i.e. its log level is G_LOG_LEVEL_ERROR), the program will -be aborted at the end of this function.

-

The structured data is provided as key–value pairs, where keys are UTF-8 -strings, and values are arbitrary pointers — typically pointing to UTF-8 -strings, but that is not a requirement. To pass binary (non-nul-terminated) -structured data, use g_log_structured_array(). The keys for structured data -should follow the systemd journal -fields -specification. It is suggested that custom keys are namespaced according to -the code which sets them. For example, custom keys from GLib all have a -GLIB_ prefix.

-

The log_domain - will be converted into a GLIB_DOMAIN field. log_level - will -be converted into a -PRIORITY -field. The format string will have its placeholders substituted for the provided -values and be converted into a -MESSAGE -field.

-

Other fields you may commonly want to pass into this function:

- -

Note that CODE_FILE, CODE_LINE and CODE_FUNC are automatically set by -the logging macros, G_DEBUG_HERE(), g_message(), g_warning(), g_critical(), -g_error(), etc, if the symbols G_LOG_USE_STRUCTURED is defined before including -glib.h.

-

For example:

-
- - - - - - - -
1
-2
-3
-4
-5
g_log_structured (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,
-                  "MESSAGE_ID", "06d4df59e6c24647bfe69d2c27ef0b4e",
-                  "MY_APPLICATION_CUSTOM_FIELD", "some debug string",
-                  "MESSAGE", "This is a debug message about pointer %p and integer %u.",
-                  some_pointer, some_integer);
-
- -

-

Note that each MESSAGE_ID must be uniquely and randomly -generated. -If adding a MESSAGE_ID, consider shipping a message -catalog with -your software.

-

To pass a user data pointer to the log writer function which is specific to -this logging call, you must use g_log_structured_array() and pass the pointer -as a field with GLogField.length set to zero, otherwise it will be -interpreted as a string.

-

For example:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
const GLogField fields[] = {
-  { "MESSAGE", "This is a debug message.", -1 },
-  { "MESSAGE_ID", "fcfb2e1e65c3494386b74878f1abf893", -1 },
-  { "MY_APPLICATION_CUSTOM_FIELD", "some debug string", -1 },
-  { "MY_APPLICATION_STATE", state_object, 0 },
-};
-g_log_structured_array (G_LOG_LEVEL_DEBUG, fields, G_N_ELEMENTS (fields));
-
- -

-

Note also that, even if no other structured fields are specified, there -must always be a "MESSAGE" key before the format string. The "MESSAGE"-format -pair has to be the last of the key-value pairs, and "MESSAGE" is the only -field for which printf()-style formatting is supported.

-

The default writer function for stdout and stderr will automatically -append a new-line character after the message, so you should not add one -manually to the format string.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

log_domain

log domain, usually G_LOG_DOMAIN

 

log_level

log level, either from GLogLevelFlags, or a user-defined -level

 

...

key-value pairs of structured data to add to the log entry, followed -by the key "MESSAGE", followed by a printf()-style message format, -followed by parameters to insert in the format string

 
-
-

Since: 2.50

-
-
-
-

g_log_variant ()

-
void
-g_log_variant (const gchar *log_domain,
-               GLogLevelFlags log_level,
-               GVariant *fields);
-

Log a message with structured data, accepting the data within a GVariant. This -version is especially useful for use in other languages, via introspection.

-

The only mandatory item in the fields - dictionary is the "MESSAGE" which must -contain the text shown to the user.

-

The values in the fields - dictionary are likely to be of type String -(G_VARIANT_TYPE_STRING). Array of bytes (G_VARIANT_TYPE_BYTESTRING) is also -supported. In this case the message is handled as binary and will be forwarded -to the log writer as such. The size of the array should not be higher than -G_MAXSSIZE. Otherwise it will be truncated to this size. For other types -g_variant_print() will be used to convert the value into a string.

-

For more details on its usage and about the parameters, see g_log_structured().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

log_domain

log domain, usually G_LOG_DOMAIN.

[nullable]

log_level

log level, either from GLogLevelFlags, or a user-defined -level

 

fields

a dictionary (GVariant of the type G_VARIANT_TYPE_VARDICT) -containing the key-value pairs of message data.

 
-
-

Since: 2.50

-
-
-
-

g_log_structured_array ()

-
void
-g_log_structured_array (GLogLevelFlags log_level,
-                        const GLogField *fields,
-                        gsize n_fields);
-

Log a message with structured data. The message will be passed through to the -log writer set by the application using g_log_set_writer_func(). If the -message is fatal (i.e. its log level is G_LOG_LEVEL_ERROR), the program will -be aborted at the end of this function.

-

See g_log_structured() for more documentation.

-

This assumes that log_level - is already present in fields - (typically as the -PRIORITY field).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

log_level

log level, either from GLogLevelFlags, or a user-defined -level

 

fields

key–value pairs of structured data to add -to the log message.

[array length=n_fields]

n_fields

number of elements in the fields -array

 
-
-

Since: 2.50

-
-
-
-

G_DEBUG_HERE

-
#define             G_DEBUG_HERE()
-

A convenience form of g_log_structured(), recommended to be added to -functions when debugging. It prints the current monotonic time and the code -location using G_STRLOC.

-

Since: 2.50

-
-
-
-

GLogWriterFunc ()

-
GLogWriterOutput
-(*GLogWriterFunc) (GLogLevelFlags log_level,
-                   const GLogField *fields,
-                   gsize n_fields,
-                   gpointer user_data);
-

Writer function for log entries. A log entry is a collection of one or more -GLogFields, using the standard field names from journal -specification. -See g_log_structured() for more information.

-

Writer functions must ignore fields which they do not recognise, unless they -can write arbitrary binary output, as field values may be arbitrary binary.

-

log_level - is guaranteed to be included in fields - as the PRIORITY field, -but is provided separately for convenience of deciding whether or where to -output the log entry.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

log_level

log level of the message

 

fields

fields forming the message.

[array length=n_fields]

n_fields

number of fields -

 

user_data

user data passed to g_log_set_writer_func()

 
-
-
-

Returns

-

G_LOG_WRITER_HANDLED if the log entry was handled successfully; -G_LOG_WRITER_UNHANDLED otherwise

-
-

Since: 2.50

-
-
-
-

g_log_set_writer_func ()

-
void
-g_log_set_writer_func (GLogWriterFunc func,
-                       gpointer user_data,
-                       GDestroyNotify user_data_free);
-

Set a writer function which will be called to format and write out each log -message. Each program should set a writer function, or the default writer -(g_log_writer_default()) will be used.

-

Libraries **must not** call this function — only programs are allowed to -install a writer function, as there must be a single, central point where -log messages are formatted and outputted.

-

There can only be one writer function. It is an error to set more than one.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

func

log writer function, which must not be NULL

 

user_data

user data to pass to func -.

[closure func]

user_data_free

function to free user_data -once it’s -finished with, if non-NULL.

[destroy func]
-
-

Since: 2.50

-
-
-
-

g_log_writer_supports_color ()

-
gboolean
-g_log_writer_supports_color (gint output_fd);
-

Check whether the given output_fd - file descriptor supports ANSI color -escape sequences. If so, they can safely be used when formatting log -messages.

-
-

Parameters

-
----- - - - - - -

output_fd

output file descriptor to check

 
-
-
-

Returns

-

TRUE if ANSI color escapes are supported, FALSE otherwise

-
-

Since: 2.50

-
-
-
-

g_log_writer_is_journald ()

-
gboolean
-g_log_writer_is_journald (gint output_fd);
-

Check whether the given output_fd - file descriptor is a connection to the -systemd journal, or something else (like a log file or stdout or -stderr).

-
-

Parameters

-
----- - - - - - -

output_fd

output file descriptor to check

 
-
-
-

Returns

-

TRUE if output_fd -points to the journal, FALSE otherwise

-
-

Since: 2.50

-
-
-
-

g_log_writer_format_fields ()

-
gchar *
-g_log_writer_format_fields (GLogLevelFlags log_level,
-                            const GLogField *fields,
-                            gsize n_fields,
-                            gboolean use_color);
-

Format a structured log message as a string suitable for outputting to the -terminal (or elsewhere). This will include the values of all fields it knows -how to interpret, which includes MESSAGE and GLIB_DOMAIN (see the -documentation for g_log_structured()). It does not include values from -unknown fields.

-

The returned string does **not** have a trailing new-line character. It is -encoded in the character set of the current locale, which is not necessarily -UTF-8.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

log_level

log level, either from GLogLevelFlags, or a user-defined -level

 

fields

key–value pairs of structured data forming -the log message.

[array length=n_fields]

n_fields

number of elements in the fields -array

 

use_color

TRUE to use ANSI color escape sequences when formatting the -message, FALSE to not

 
-
-
-

Returns

-

string containing the formatted log message, in -the character set of the current locale.

-

[transfer full]

-
-

Since: 2.50

-
-
-
-

g_log_writer_journald ()

-
GLogWriterOutput
-g_log_writer_journald (GLogLevelFlags log_level,
-                       const GLogField *fields,
-                       gsize n_fields,
-                       gpointer user_data);
-

Format a structured log message and send it to the systemd journal as a set -of key–value pairs. All fields are sent to the journal, but if a field has -length zero (indicating program-specific data) then only its key will be -sent.

-

This is suitable for use as a GLogWriterFunc.

-

If GLib has been compiled without systemd support, this function is still -defined, but will always return G_LOG_WRITER_UNHANDLED.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

log_level

log level, either from GLogLevelFlags, or a user-defined -level

 

fields

key–value pairs of structured data forming -the log message.

[array length=n_fields]

n_fields

number of elements in the fields -array

 

user_data

user data passed to g_log_set_writer_func()

 
-
-
-

Returns

-

G_LOG_WRITER_HANDLED on success, G_LOG_WRITER_UNHANDLED otherwise

-
-

Since: 2.50

-
-
-
-

g_log_writer_standard_streams ()

-
GLogWriterOutput
-g_log_writer_standard_streams (GLogLevelFlags log_level,
-                               const GLogField *fields,
-                               gsize n_fields,
-                               gpointer user_data);
-

Format a structured log message and print it to either stdout or stderr, -depending on its log level. G_LOG_LEVEL_INFO and G_LOG_LEVEL_DEBUG messages -are sent to stdout; all other log levels are sent to stderr. Only fields -which are understood by this function are included in the formatted string -which is printed.

-

If the output stream supports ANSI color escape sequences, they will be used -in the output.

-

A trailing new-line character is added to the log message when it is printed.

-

This is suitable for use as a GLogWriterFunc.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

log_level

log level, either from GLogLevelFlags, or a user-defined -level

 

fields

key–value pairs of structured data forming -the log message.

[array length=n_fields]

n_fields

number of elements in the fields -array

 

user_data

user data passed to g_log_set_writer_func()

 
-
-
-

Returns

-

G_LOG_WRITER_HANDLED on success, G_LOG_WRITER_UNHANDLED otherwise

-
-

Since: 2.50

-
-
-
-

g_log_writer_default ()

-
GLogWriterOutput
-g_log_writer_default (GLogLevelFlags log_level,
-                      const GLogField *fields,
-                      gsize n_fields,
-                      gpointer user_data);
-

Format a structured log message and output it to the default log destination -for the platform. On Linux, this is typically the systemd journal, falling -back to stdout or stderr if running from the terminal or if output is -being redirected to a file.

-

Support for other platform-specific logging mechanisms may be added in -future. Distributors of GLib may modify this function to impose their own -(documented) platform-specific log writing policies.

-

This is suitable for use as a GLogWriterFunc, and is the default writer used -if no other is set using g_log_set_writer_func().

-

As with g_log_default_handler(), this function drops debug and informational -messages unless their log domain (or all) is listed in the space-separated -G_MESSAGES_DEBUG environment variable.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

log_level

log level, either from GLogLevelFlags, or a user-defined -level

 

fields

key–value pairs of structured data forming -the log message.

[array length=n_fields]

n_fields

number of elements in the fields -array

 

user_data

user data passed to g_log_set_writer_func()

 
-
-
-

Returns

-

G_LOG_WRITER_HANDLED on success, G_LOG_WRITER_UNHANDLED otherwise

-
-

Since: 2.50

-
-
-
-

Types and Values

-
-

G_LOG_DOMAIN

-
#define G_LOG_DOMAIN    ((gchar*) 0)
-
-

Defines the log domain.

-

For applications, this is typically left as the default NULL -(or "") domain. Libraries should define this so that any messages -which they log can be differentiated from messages from other -libraries and application code. But be careful not to define -it in any public header files.

-

For example, GTK+ uses this in its Makefile.am:

-
- - - - - - - -
1
AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Gtk\"
-
- -

-
-
-
-

G_LOG_FATAL_MASK

-
#define G_LOG_FATAL_MASK        (G_LOG_FLAG_RECURSION | G_LOG_LEVEL_ERROR)
-
-

GLib log levels that are considered fatal by default.

-

This is not used if structured logging is enabled; see -Using Structured Logging.

-
-
-
-

G_LOG_LEVEL_USER_SHIFT

-
#define G_LOG_LEVEL_USER_SHIFT  (8)
-
-

Log levels below 1<<G_LOG_LEVEL_USER_SHIFT are used by GLib. -Higher bits can be used for user-defined log levels.

-
-
-
-

enum GLogLevelFlags

-

Flags specifying the level of log messages.

-

It is possible to change how GLib treats messages of the various -levels using g_log_set_handler() and g_log_set_fatal_mask().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_LOG_FLAG_RECURSION

-

internal flag

-
 

G_LOG_FLAG_FATAL

-

internal flag

-
 

G_LOG_LEVEL_ERROR

-

log level for errors, see g_error(). - This level is also used for messages produced by g_assert().

-
 

G_LOG_LEVEL_CRITICAL

-

log level for critical warning messages, see - g_critical(). - This level is also used for messages produced by g_return_if_fail() - and g_return_val_if_fail().

-
 

G_LOG_LEVEL_WARNING

-

log level for warnings, see g_warning()

-
 

G_LOG_LEVEL_MESSAGE

-

log level for messages, see g_message()

-
 

G_LOG_LEVEL_INFO

-

log level for informational messages, see g_info()

-
 

G_LOG_LEVEL_DEBUG

-

log level for debug messages, see g_debug()

-
 

G_LOG_LEVEL_MASK

-

a mask including all log levels

-
 
-
-
-
-
-

struct GLogField

-
struct GLogField {
-  const gchar *key;
-  gconstpointer value;
-  gssize length;
-};
-
-

Structure representing a single field in a structured log entry. See -g_log_structured() for details.

-

Log fields may contain arbitrary values, including binary with embedded nul -bytes. If the field contains a string, the string must be UTF-8 encoded and -have a trailing nul byte. Otherwise, length - must be set to a non-negative -value.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

const gchar *key;

field name (UTF-8 string)

 

gconstpointer value;

field value (arbitrary bytes)

 

gssize length;

length of value -, in bytes, or -1 if it is nul-terminated

 
-
-

Since: 2.50

-
-
-
-

enum GLogWriterOutput

-

Return values from GLogWriterFuncs to indicate whether the given log entry -was successfully handled by the writer, or whether there was an error in -handling it (and hence a fallback writer should be used).

-

If a GLogWriterFunc ignores a log entry, it should return -G_LOG_WRITER_HANDLED.

-
-

Members

-
----- - - - - - - - - - - - - -

G_LOG_WRITER_HANDLED

-

Log writer has handled the log entry.

-
 

G_LOG_WRITER_UNHANDLED

-

Log writer could not handle the log entry.

-
 
-
-

Since: 2.50

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Miscellaneous-Macros.html b/docs/reference/glib/html/glib-Miscellaneous-Macros.html deleted file mode 100644 index 68cb27b92..000000000 --- a/docs/reference/glib/html/glib-Miscellaneous-Macros.html +++ /dev/null @@ -1,1633 +0,0 @@ - - - - -Miscellaneous Macros: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Miscellaneous Macros

-

Miscellaneous Macros — specialized macros which are not used often

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -g_auto() -
#define -g_autoptr() -
#define -G_DEFINE_AUTOPTR_CLEANUP_FUNC() -
#define -G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC() -
#define -G_DEFINE_AUTO_CLEANUP_FREE_FUNC() -
#define -G_VA_COPY() -
#define -G_STRINGIFY() -
#define -G_PASTE() -
#define -G_STATIC_ASSERT() -
#define -G_STATIC_ASSERT_EXPR() -
#define -G_GNUC_CHECK_VERSION() -
#define -G_GNUC_ALLOC_SIZE() -
#define -G_GNUC_ALLOC_SIZE2() -
#define -G_GNUC_DEPRECATED_FOR() -
#define -G_GNUC_PRINTF() -
#define -G_GNUC_SCANF() -
#define -G_GNUC_FORMAT() -
#define -G_DEPRECATED_FOR() -
#define -G_UNAVAILABLE() -
#define -G_LIKELY() -
#define -G_UNLIKELY() -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#defineG_INLINE_FUNC
#defineg_autofree
#defineG_STMT_START
#defineG_STMT_END
#defineG_BEGIN_DECLS
#defineG_END_DECLS
#defineG_GNUC_EXTENSION
#defineG_GNUC_CONST
#defineG_GNUC_PURE
#defineG_GNUC_MALLOC
#defineG_GNUC_DEPRECATED
#defineG_GNUC_BEGIN_IGNORE_DEPRECATIONS
#defineG_GNUC_END_IGNORE_DEPRECATIONS
#defineG_GNUC_NORETURN
#defineG_GNUC_UNUSED
#defineG_GNUC_NULL_TERMINATED
#defineG_GNUC_WARN_UNUSED_RESULT
#defineG_GNUC_FUNCTION
#defineG_GNUC_PRETTY_FUNCTION
#defineG_GNUC_NO_INSTRUMENT
#defineG_HAVE_GNUC_VISIBILITY
#defineG_GNUC_INTERNAL
#defineG_GNUC_MAY_ALIAS
#defineG_DEPRECATED
#defineG_STRLOC
#defineG_STRFUNC
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

These macros provide more specialized features which are not -needed so often by application programmers.

-
-
-

Functions

-
-

g_auto()

-
#define             g_auto(TypeName)
-

Helper to declare a variable with automatic cleanup.

-

The variable is cleaned up in a way appropriate to its type when the -variable goes out of scope. The type must support this.

-

This feature is only supported on GCC and clang. This macro is not -defined on other compilers and should not be used in programs that -are intended to be portable to those compilers.

-

This is meant to be used with stack-allocated structures and -non-pointer types. For the (more commonly used) pointer version, see -g_autoptr().

-

This macro can be used to avoid having to do explicit cleanups of -local variables when exiting functions. It often vastly simplifies -handling of error conditions, removing the need for various tricks -such as 'goto out' or repeating of cleanup code. It is also helpful -for non-error cases.

-

Consider the following example:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
GVariant *
-my_func(void)
-{
-  g_auto(GQueue) queue = G_QUEUE_INIT;
-  g_auto(GVariantBuilder) builder;
-  g_auto(GStrv) strv;
-
-  g_variant_builder_init (&builder, G_VARIANT_TYPE_VARDICT);
-  strv = g_strsplit("a:b:c", ":", -1);
-
-  ...
-
-  if (error_condition)
-    return NULL;
-
-  ...
-
-  return g_variant_builder_end (&builder);
-}
-
- -

-

You must initialize the variable in some way -- either by use of an -initialiser or by ensuring that an _init function will be called on -it unconditionally before it goes out of scope.

-
-

Parameters

-
----- - - - - - -

TypeName

a supported variable type

 
-
-

Since: 2.44

-
-
-
-

g_autoptr()

-
#define             g_autoptr(TypeName)
-

Helper to declare a pointer variable with automatic cleanup.

-

The variable is cleaned up in a way appropriate to its type when the -variable goes out of scope. The type must support this.

-

This feature is only supported on GCC and clang. This macro is not -defined on other compilers and should not be used in programs that -are intended to be portable to those compilers.

-

This is meant to be used to declare pointers to types with cleanup -functions. The type of the variable is a pointer to TypeName -. You -must not add your own '*'.

-

This macro can be used to avoid having to do explicit cleanups of -local variables when exiting functions. It often vastly simplifies -handling of error conditions, removing the need for various tricks -such as 'goto out' or repeating of cleanup code. It is also helpful -for non-error cases.

-

Consider the following example:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
gboolean
-check_exists(GVariant *dict)
-{
-  g_autoptr(GVariant) dirname, basename = NULL;
-  g_autofree gchar *path = NULL;
-
-  dirname = g_variant_lookup_value (dict, "dirname", G_VARIANT_TYPE_STRING);
-
-  if (dirname == NULL)
-    return FALSE;
-
-  basename = g_variant_lookup_value (dict, "basename", G_VARIANT_TYPE_STRING);
-
-  if (basename == NULL)
-    return FALSE;
-
-  path = g_build_filename (g_variant_get_string (dirname, NULL),
-                           g_variant_get_string (basename, NULL),
-                           NULL);
-
-  return g_access (path, R_OK) == 0;
-}
-
- -

-

You must initialise the variable in some way -- either by use of an -initialiser or by ensuring that it is assigned to unconditionally -before it goes out of scope.

-

See also g_auto(), g_autofree() and g_steal_pointer().

-
-

Parameters

-
----- - - - - - -

TypeName

a supported variable type

 
-
-

Since: 2.44

-
-
-
-

G_DEFINE_AUTOPTR_CLEANUP_FUNC()

-
#define             G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func)
-

Defines the appropriate cleanup function for a pointer type.

-

The function will not be called if the variable to be cleaned up -contains NULL.

-

This will typically be the _free() or _unref() function for the given -type.

-

With this definition, it will be possible to use g_autoptr() with -TypeName -.

-
- - - - - - - -
1
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GObject, g_object_unref)
-
- -

-

This macro should be used unconditionally; it is a no-op on compilers -where cleanup is not supported.

-
-

Parameters

-
----- - - - - - - - - - - - - -

TypeName

a type name to define a g_autoptr() cleanup function for

 

func

the cleanup function

 
-
-

Since: 2.44

-
-
-
-

G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC()

-
#define             G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(TypeName, func)
-

Defines the appropriate cleanup function for a type.

-

This will typically be the _clear() function for the given type.

-

With this definition, it will be possible to use g_auto() with -TypeName -.

-
- - - - - - - -
1
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GQueue, g_queue_clear)
-
- -

-

This macro should be used unconditionally; it is a no-op on compilers -where cleanup is not supported.

-
-

Parameters

-
----- - - - - - - - - - - - - -

TypeName

a type name to define a g_auto() cleanup function for

 

func

the clear function

 
-
-

Since: 2.44

-
-
-
-

G_DEFINE_AUTO_CLEANUP_FREE_FUNC()

-
#define             G_DEFINE_AUTO_CLEANUP_FREE_FUNC(TypeName, func, none)
-

Defines the appropriate cleanup function for a type.

-

With this definition, it will be possible to use g_auto() with -TypeName -.

-

This function will be rarely used. It is used with pointer-based -typedefs and non-pointer types where the value of the variable -represents a resource that must be freed. Two examples are GStrv -and file descriptors.

-

none - specifies the "none" value for the type in question. It is -probably something like NULL or -1. If the variable is found to -contain this value then the free function will not be called.

-
- - - - - - - -
1
G_DEFINE_AUTO_CLEANUP_FREE_FUNC(GStrv, g_strfreev, NULL)
-
- -

-

This macro should be used unconditionally; it is a no-op on compilers -where cleanup is not supported.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

TypeName

a type name to define a g_auto() cleanup function for

 

func

the free function

 

none

the "none" value for the type

 
-
-

Since: 2.44

-
-
-
-

G_VA_COPY()

-
#define             G_VA_COPY(ap1,ap2)
-

Portable way to copy va_list variables.

-

In order to use this function, you must include string.h yourself, -because this macro may use memmove() and GLib does not include -string.h for you.

-
-

Parameters

-
----- - - - - - - - - - - - - -

ap1

the va_list variable to place a copy of ap2 -in

 

ap2

a va_list

 
-
-
-
-
-

G_STRINGIFY()

-
#define G_STRINGIFY(macro_or_string) G_STRINGIFY_ARG (macro_or_string)
-
-

Accepts a macro or a string and converts it into a string after -preprocessor argument expansion. For example, the following code:

-
- - - - - - - -
1
-2
#define AGE 27
-const gchar *greeting = G_STRINGIFY (AGE) " today!";
-
- -

-

is transformed by the preprocessor into (code equivalent to):

-
- - - - - - - -
1
const gchar *greeting = "27 today!";
-
- -

-
-

Parameters

-
----- - - - - - -

macro_or_string

a macro or a string

 
-
-
-
-
-

G_PASTE()

-
#define G_PASTE(identifier1,identifier2)      G_PASTE_ARGS (identifier1, identifier2)
-
-

Yields a new preprocessor pasted identifier -identifier1identifier2 - from its expanded -arguments identifier1 - and identifier2 -. For example, -the following code:

-
- - - - - - - -
1
-2
-3
-4
#define GET(traveller,method) G_PASTE(traveller_get_, method) (traveller)
-const gchar *name = GET (traveller, name);
-const gchar *quest = GET (traveller, quest);
-GdkColor *favourite = GET (traveller, favourite_colour);
-
- -

-

is transformed by the preprocessor into:

-
- - - - - - - -
1
-2
-3
const gchar *name = traveller_get_name (traveller);
-const gchar *quest = traveller_get_quest (traveller);
-GdkColor *favourite = traveller_get_favourite_colour (traveller);
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

identifier1

an identifier

 

identifier2

an identifier

 
-
-

Since: 2.20

-
-
-
-

G_STATIC_ASSERT()

-
#define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
-
-

The G_STATIC_ASSERT() macro lets the programmer check -a condition at compile time, the condition needs to -be compile time computable. The macro can be used in -any place where a typedef is valid.

-

A typedef is generally allowed in exactly the same places that -a variable declaration is allowed. For this reason, you should -not use G_STATIC_ASSERT() in the middle of blocks of code.

-

The macro should only be used once per source code line.

-
-

Parameters

-
----- - - - - - -

expr

a constant expression

 
-
-

Since: 2.20

-
-
-
-

G_STATIC_ASSERT_EXPR()

-
#define G_STATIC_ASSERT_EXPR(expr) ((void) sizeof (char[(expr) ? 1 : -1]))
-
-

The G_STATIC_ASSERT_EXPR() macro lets the programmer check -a condition at compile time. The condition needs to be -compile time computable.

-

Unlike G_STATIC_ASSERT(), this macro evaluates to an expression -and, as such, can be used in the middle of other expressions. -Its value should be ignored. This can be accomplished by placing -it as the first argument of a comma expression.

-
- - - - - - - -
1
-2
#define ADD_ONE_TO_INT(x) \
-  (G_STATIC_ASSERT_EXPR(sizeof (x) == sizeof (int)), ((x) + 1))
-
- -

-
-

Parameters

-
----- - - - - - -

expr

a constant expression

 
-
-

Since: 2.30

-
-
-
-

G_GNUC_CHECK_VERSION()

-
#define             G_GNUC_CHECK_VERSION(major, minor)
-

Expands to a a check for a compiler with __GNUC__ defined and a version -greater than or equal to the major and minor numbers provided. For example, -the following would only match on compilers such as GCC 4.8 or newer.

-
- - - - - - - -
1
-2
#if G_GNUC_CHECK_VERSION(4, 8)
-#endif
-
- -

-

Since: 2.42

-
-
-
-

G_GNUC_ALLOC_SIZE()

-
#define G_GNUC_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
-
-

Expands to the GNU C alloc_size function attribute if the compiler -is a new enough gcc. This attribute tells the compiler that the -function returns a pointer to memory of a size that is specified -by the xth - function parameter.

-

Place the attribute after the function declaration, just before the -semicolon.

-

See the GNU C documentation for more details.

-
-

Parameters

-
----- - - - - - -

x

the index of the argument specifying the allocation size

 
-
-

Since: 2.18

-
-
-
-

G_GNUC_ALLOC_SIZE2()

-
#define G_GNUC_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y)))
-
-

Expands to the GNU C alloc_size function attribute if the compiler is a -new enough gcc. This attribute tells the compiler that the function returns -a pointer to memory of a size that is specified by the product of two -function parameters.

-

Place the attribute after the function declaration, just before the -semicolon.

-

See the GNU C documentation for more details.

-
-

Parameters

-
----- - - - - - - - - - - - - -

x

the index of the argument specifying one factor of the allocation size

 

y

the index of the argument specifying the second factor of the allocation size

 
-
-

Since: 2.18

-
-
-
-

G_GNUC_DEPRECATED_FOR()

-
#define             G_GNUC_DEPRECATED_FOR(f)
-

Like G_GNUC_DEPRECATED, but names the intended replacement for the -deprecated symbol if the version of gcc in use is new enough to support -custom deprecation messages.

-

Place the attribute after the declaration, just before the semicolon.

-

See the GNU C documentation for more details.

-

Note that if f - is a macro, it will be expanded in the warning message. -You can enclose it in quotes to prevent this. (The quotes will show up -in the warning, but it's better than showing the macro expansion.)

-
-

Parameters

-
----- - - - - - -

f

the intended replacement for the deprecated symbol, -such as the name of a function

 
-
-

Since: 2.26

-
-
-
-

G_GNUC_PRINTF()

-
#define             G_GNUC_PRINTF( format_idx, arg_idx )
-

Expands to the GNU C format function attribute if the compiler is gcc. -This is used for declaring functions which take a variable number of -arguments, with the same syntax as printf(). It allows the compiler -to type-check the arguments passed to the function.

-

Place the attribute after the function declaration, just before the -semicolon.

-

See the -GNU C documentation -for more details.

-
- - - - - - - -
1
-2
-3
-4
gint g_snprintf (gchar  *string,
-                 gulong       n,
-                 gchar const *format,
-                 ...) G_GNUC_PRINTF (3, 4);
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

format_idx

the index of the argument corresponding to the -format string (the arguments are numbered from 1)

 

arg_idx

the index of the first of the format arguments, or 0 if -there are no format arguments

 
-
-
-
-
-

G_GNUC_SCANF()

-
#define             G_GNUC_SCANF( format_idx, arg_idx )
-

Expands to the GNU C format function attribute if the compiler is gcc. -This is used for declaring functions which take a variable number of -arguments, with the same syntax as scanf(). It allows the compiler -to type-check the arguments passed to the function.

-

See the -GNU C documentation -for details.

-
-

Parameters

-
----- - - - - - - - - - - - - -

format_idx

the index of the argument corresponding to -the format string (the arguments are numbered from 1)

 

arg_idx

the index of the first of the format arguments, or 0 if -there are no format arguments

 
-
-
-
-
-

G_GNUC_FORMAT()

-
#define             G_GNUC_FORMAT( arg_idx )
-

Expands to the GNU C format_arg function attribute if the compiler -is gcc. This function attribute specifies that a function takes a -format string for a printf(), scanf(), strftime() or strfmon() style -function and modifies it, so that the result can be passed to a printf(), -scanf(), strftime() or strfmon() style function (with the remaining -arguments to the format function the same as they would have been -for the unmodified string).

-

Place the attribute after the function declaration, just before the -semicolon.

-

See the GNU C documentation for more details.

-
- - - - - - - -
1
gchar *g_dgettext (gchar *domain_name, gchar *msgid) G_GNUC_FORMAT (2);
-
- -

-
-

Parameters

-
----- - - - - - -

arg_idx

the index of the argument

 
-
-
-
-
-

G_DEPRECATED_FOR()

-
#define G_DEPRECATED_FOR(f) __attribute__((__deprecated__("Use '" #f "' instead")))
-
-

This macro is similar to G_GNUC_DEPRECATED_FOR, and can be used to mark -functions declarations as deprecated. Unlike G_GNUC_DEPRECATED_FOR, it -is meant to be portable across different compilers and must be placed -before the function declaration.

-
-

Parameters

-
----- - - - - - -

f

the name of the function that this function was deprecated for

 
-
-

Since: 2.32

-
-
-
-

G_UNAVAILABLE()

-
#define G_UNAVAILABLE(maj,min) __attribute__((deprecated("Not available before " #maj "." #min)))
-
-

This macro can be used to mark a function declaration as unavailable. -It must be placed before the function declaration. Use of a function -that has been annotated with this macros will produce a compiler warning.

-
-

Parameters

-
----- - - - - - - - - - - - - -

maj

the major version that introduced the symbol

 

min

the minor version that introduced the symbol

 
-
-

Since: 2.32

-
-
-
-

G_LIKELY()

-
#define G_LIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR((expr)), 1))
-
-

Hints the compiler that the expression is likely to evaluate to -a true value. The compiler may use this information for optimizations.

-
- - - - - - - -
1
-2
if (G_LIKELY (random () != 1))
-  g_print ("not one");
-
- -

-
-

Parameters

-
----- - - - - - -

expr

the expression

 
-
-
-

Returns

-

the value of expr -

-
-

Since: 2.2

-
-
-
-

G_UNLIKELY()

-
#define G_UNLIKELY(expr) (__builtin_expect (_G_BOOLEAN_EXPR((expr)), 0))
-
-

Hints the compiler that the expression is unlikely to evaluate to -a true value. The compiler may use this information for optimizations.

-
- - - - - - - -
1
-2
if (G_UNLIKELY (random () == 1))
-  g_print ("a random one");
-
- -

-
-

Parameters

-
----- - - - - - -

expr

the expression

 
-
-
-

Returns

-

the value of expr -

-
-

Since: 2.2

-
-
-
-

Types and Values

-
-

G_INLINE_FUNC

-
#  define G_INLINE_FUNC extern
-
-
-

G_INLINE_FUNC has been deprecated since version 2.48 and should not be used in newly-written code.

-

Use "static inline" instead

-
-

This macro used to be used to conditionally define inline functions -in a compatible way before this feature was supported in all -compilers. These days, GLib requires inlining support from the -compiler, so your GLib-using programs can safely assume that the -"inline" keywork works properly.

-

Never use this macro anymore. Just say "static inline".

-
-
-
-

g_autofree

-
#define             g_autofree
-

Macro to add an attribute to pointer variable to ensure automatic -cleanup using g_free().

-

This macro differs from g_autoptr() in that it is an attribute supplied -before the type name, rather than wrapping the type definition. Instead -of using a type-specific lookup, this macro always calls g_free() directly.

-

This means it's useful for any type that is returned from -g_malloc().

-

Otherwise, this macro has similar constraints as g_autoptr() - only -supported on GCC and clang, the variable must be initialized, etc.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
gboolean
-operate_on_malloc_buf (void)
-{
-  g_autofree guint8* membuf = NULL;
-
-  membuf = g_malloc (8192);
-
-  /<!-- -->* Some computation on membuf *<!-- -->/
-
-  /<!-- -->* membuf will be automatically freed here *<!-- -->/
-  return TRUE;
-}
-
- -

-

Since: 2.44

-
-
-
-

G_STMT_START

-
#define G_STMT_START  do
-
-

Used within multi-statement macros so that they can be used in places -where only one statement is expected by the compiler.

-
-
-
-

G_STMT_END

-
#define             G_STMT_END
-

Used within multi-statement macros so that they can be used in places -where only one statement is expected by the compiler.

-
-
-
-

G_BEGIN_DECLS

-
#define G_BEGIN_DECLS  extern "C" {
-
-

Used (along with G_END_DECLS) to bracket header files. If the -compiler in use is a C++ compiler, adds extern "C" -around the header.

-
-
-
-

G_END_DECLS

-
#define G_END_DECLS    }
-
-

Used (along with G_BEGIN_DECLS) to bracket header files. If the -compiler in use is a C++ compiler, adds extern "C" -around the header.

-
-
-
-

G_GNUC_EXTENSION

-
#define G_GNUC_EXTENSION __extension__
-
-

Expands to __extension__ when gcc is used as the compiler. This simply -tells gcc not to warn about the following non-standard code when compiling -with the -pedantic option.

-
-
-
-

G_GNUC_CONST

-
#define             G_GNUC_CONST
-

Expands to the GNU C const function attribute if the compiler is gcc. -Declaring a function as const enables better optimization of calls to -the function. A const function doesn't examine any values except its -parameters, and has no effects except its return value.

-

Place the attribute after the declaration, just before the semicolon.

-

See the GNU C documentation for more details.

-

A function that has pointer arguments and examines the data pointed to -must not be declared const. Likewise, a function that calls a non-const -function usually must not be const. It doesn't make sense for a const -function to return void.

-
-
-
-

G_GNUC_PURE

-
#define G_GNUC_PURE __attribute__((__pure__))
-
-

Expands to the GNU C pure function attribute if the compiler is gcc. -Declaring a function as pure enables better optimization of calls to -the function. A pure function has no effects except its return value -and the return value depends only on the parameters and/or global -variables.

-

Place the attribute after the declaration, just before the semicolon.

-

See the GNU C documentation for more details.

-
-
-
-

G_GNUC_MALLOC

-
#define G_GNUC_MALLOC __attribute__((__malloc__))
-
-

Expands to the GNU C malloc function attribute if the compiler is gcc. -Declaring a function as malloc enables better optimization of the function. -A function can have the malloc attribute if it returns a pointer which is -guaranteed to not alias with any other pointer when the function returns -(in practice, this means newly allocated memory).

-

Place the attribute after the declaration, just before the semicolon.

-

See the GNU C documentation for more details.

-

Since: 2.6

-
-
-
-

G_GNUC_DEPRECATED

-
#define G_GNUC_DEPRECATED __attribute__((__deprecated__))
-
-

Expands to the GNU C deprecated attribute if the compiler is gcc. -It can be used to mark typedefs, variables and functions as deprecated. -When called with the -Wdeprecated-declarations option, -gcc will generate warnings when deprecated interfaces are used.

-

Place the attribute after the declaration, just before the semicolon.

-

See the GNU C documentation for more details.

-

Since: 2.2

-
-
-
-

G_GNUC_BEGIN_IGNORE_DEPRECATIONS

-
#define             G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-

Tells gcc (if it is a new enough version) to temporarily stop emitting -warnings when functions marked with G_GNUC_DEPRECATED or -G_GNUC_DEPRECATED_FOR are called. This is useful for when you have -one deprecated function calling another one, or when you still have -regression tests for deprecated functions.

-

Use G_GNUC_END_IGNORE_DEPRECATIONS to begin warning again. (If you -are not compiling with -Wdeprecated-declarations then neither macro -has any effect.)

-

This macro can be used either inside or outside of a function body, -but must appear on a line by itself.

-

Since: 2.32

-
-
-
-

G_GNUC_END_IGNORE_DEPRECATIONS

-
#define             G_GNUC_END_IGNORE_DEPRECATIONS
-

Undoes the effect of G_GNUC_BEGIN_IGNORE_DEPRECATIONS, telling -gcc to begin outputting warnings again (assuming those warnings -had been enabled to begin with).

-

This macro can be used either inside or outside of a function body, -but must appear on a line by itself.

-

Since: 2.32

-
-
-
-

G_GNUC_NORETURN

-
#define             G_GNUC_NORETURN
-

Expands to the GNU C noreturn function attribute if the compiler is gcc. -It is used for declaring functions which never return. It enables -optimization of the function, and avoids possible compiler warnings.

-

Place the attribute after the declaration, just before the semicolon.

-

See the GNU C documentation for more details.

-
-
-
-

G_GNUC_UNUSED

-
#define             G_GNUC_UNUSED
-

Expands to the GNU C unused function attribute if the compiler is gcc. -It is used for declaring functions and arguments which may never be used. -It avoids possible compiler warnings.

-

For functions, place the attribute after the declaration, just before the -semicolon. For arguments, place the attribute at the beginning of the -argument declaration.

-
- - - - - - - -
1
-2
void my_unused_function (G_GNUC_UNUSED gint unused_argument,
-                         gint other_argument) G_GNUC_UNUSED;
-
- -

-

See the GNU C documentation for more details.

-
-
-
-

G_GNUC_NULL_TERMINATED

-
#define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
-
-

Expands to the GNU C sentinel function attribute if the compiler is gcc. -This function attribute only applies to variadic functions and instructs -the compiler to check that the argument list is terminated with an -explicit NULL.

-

Place the attribute after the declaration, just before the semicolon.

-

See the GNU C documentation for more details.

-

Since: 2.8

-
-
-
-

G_GNUC_WARN_UNUSED_RESULT

-
#define G_GNUC_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
-
-

Expands to the GNU C warn_unused_result function attribute if the compiler -is gcc. This function attribute makes the compiler emit a warning if the -result of a function call is ignored.

-

Place the attribute after the declaration, just before the semicolon.

-

See the GNU C documentation for more details.

-

Since: 2.10

-
-
-
-

G_GNUC_FUNCTION

-
#define G_GNUC_FUNCTION         __FUNCTION__
-
-
-

G_GNUC_FUNCTION has been deprecated since version 2.16 and should not be used in newly-written code.

-

Use G_STRFUNC() instead

-
-

Expands to "" on all modern compilers, and to __FUNCTION__ on gcc -version 2.x. Don't use it.

-
-
-
-

G_GNUC_PRETTY_FUNCTION

-
#define G_GNUC_PRETTY_FUNCTION  __PRETTY_FUNCTION__
-
-
-

G_GNUC_PRETTY_FUNCTION has been deprecated since version 2.16 and should not be used in newly-written code.

-

Use G_STRFUNC() instead

-
-

Expands to "" on all modern compilers, and to __PRETTY_FUNCTION__ -on gcc version 2.x. Don't use it.

-
-
-
-

G_GNUC_NO_INSTRUMENT

-
#define             G_GNUC_NO_INSTRUMENT
-

Expands to the GNU C no_instrument_function function attribute if the -compiler is gcc. Functions with this attribute will not be instrumented -for profiling, when the compiler is called with the --finstrument-functions option.

-

Place the attribute after the declaration, just before the semicolon.

-

See the GNU C documentation for more details.

-
-
-
-

G_HAVE_GNUC_VISIBILITY

-
#define G_HAVE_GNUC_VISIBILITY 1
-
-

Defined to 1 if gcc-style visibility handling is supported.

-
-
-
-

G_GNUC_INTERNAL

-
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
-
-

This attribute can be used for marking library functions as being used -internally to the library only, which may allow the compiler to handle -function calls more efficiently. Note that static functions do not need -to be marked as internal in this way. See the GNU C documentation for -details.

-

When using a compiler that supports the GNU C hidden visibility attribute, -this macro expands to __attribute__((visibility("hidden"))). -When using the Sun Studio compiler, it expands to __hidden.

-

Note that for portability, the attribute should be placed before the -function declaration. While GCC allows the macro after the declaration, -Sun Studio does not.

-
- - - - - - - -
1
-2
-3
-4
-5
G_GNUC_INTERNAL
-void _g_log_fallback_handler (const gchar    *log_domain,
-                              GLogLevelFlags  log_level,
-                              const gchar    *message,
-                              gpointer        unused_data);
-
- -

-

Since: 2.6

-
-
-
-

G_GNUC_MAY_ALIAS

-
#define G_GNUC_MAY_ALIAS __attribute__((may_alias))
-
-

Expands to the GNU C may_alias type attribute if the compiler is gcc. -Types with this attribute will not be subjected to type-based alias -analysis, but are assumed to alias with any other type, just like char.

-

See the GNU C documentation for details.

-

Since: 2.14

-
-
-
-

G_DEPRECATED

-
#define G_DEPRECATED __attribute__((__deprecated__))
-
-

This macro is similar to G_GNUC_DEPRECATED, and can be used to mark -functions declarations as deprecated. Unlike G_GNUC_DEPRECATED, it is -meant to be portable across different compilers and must be placed -before the function declaration.

-

Since: 2.32

-
-
-
-

G_STRLOC

-
#define G_STRLOC __FILE__ ":" G_STRINGIFY (__LINE__) ":" __PRETTY_FUNCTION__ "()"
-
-

Expands to a string identifying the current code position.

-
-
-
-

G_STRFUNC

-
#define G_STRFUNC     ((const char*) (__PRETTY_FUNCTION__))
-
-

Expands to a string identifying the current function.

-

Since: 2.4

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Miscellaneous-Utility-Functions.html b/docs/reference/glib/html/glib-Miscellaneous-Utility-Functions.html deleted file mode 100644 index 5b5553660..000000000 --- a/docs/reference/glib/html/glib-Miscellaneous-Utility-Functions.html +++ /dev/null @@ -1,2254 +0,0 @@ - - - - -Miscellaneous Utility Functions: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Miscellaneous Utility Functions

-

Miscellaneous Utility Functions — a selection of portable utility functions

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const gchar * - -g_get_application_name () -
-void - -g_set_application_name () -
const gchar * - -g_get_prgname () -
-void - -g_set_prgname () -
-gchar ** - -g_get_environ () -
const gchar * - -g_environ_getenv () -
-gchar ** - -g_environ_setenv () -
-gchar ** - -g_environ_unsetenv () -
const gchar * - -g_getenv () -
-gboolean - -g_setenv () -
-void - -g_unsetenv () -
-gchar ** - -g_listenv () -
const gchar * - -g_get_user_name () -
const gchar * - -g_get_real_name () -
const gchar * - -g_get_user_cache_dir () -
const gchar * - -g_get_user_data_dir () -
const gchar * - -g_get_user_config_dir () -
const gchar * - -g_get_user_runtime_dir () -
const gchar * - -g_get_user_special_dir () -
const gchar * const * - -g_get_system_data_dirs () -
const gchar * const * - -g_get_system_config_dirs () -
-void - -g_reload_user_special_dirs_cache () -
const gchar * - -g_get_host_name () -
const gchar * - -g_get_home_dir () -
const gchar * - -g_get_tmp_dir () -
-gchar * - -g_get_current_dir () -
const gchar * - -g_basename () -
-gboolean - -g_path_is_absolute () -
const gchar * - -g_path_skip_root () -
-gchar * - -g_path_get_basename () -
-gchar * - -g_path_get_dirname () -
-gchar * - -g_build_filename () -
-gchar * - -g_build_filenamev () -
-gchar * - -g_build_path () -
-gchar * - -g_build_pathv () -
-gchar * - -g_format_size () -
-gchar * - -g_format_size_full () -
-gchar * - -g_format_size_for_display () -
-gchar * - -g_find_program_in_path () -
#define -g_bit_nth_lsf() -
#define -g_bit_nth_msf() -
#define -g_bit_storage() -
-guint - -g_spaced_primes_closest () -
-void - -g_atexit () -
-guint - -g_parse_debug_string () -
-void - -(*GVoidFunc) () -
-void - -(*GFreeFunc) () -
-void - -g_qsort_with_data () -
-void - -g_nullify_pointer () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
enumGUserDirectory
#defineg_dirname
enumGFormatSizeFlags
structGDebugKey
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

These are portable utility functions.

-
-
-

Functions

-
-

g_get_application_name ()

-
const gchar *
-g_get_application_name (void);
-

Gets a human-readable name for the application, as set by -g_set_application_name(). This name should be localized if -possible, and is intended for display to the user. Contrast with -g_get_prgname(), which gets a non-localized name. If -g_set_application_name() has not been called, returns the result of -g_get_prgname() (which may be NULL if g_set_prgname() has also not -been called).

-
-

Returns

-

human-readable application name. may return NULL

-
-

Since: 2.2

-
-
-
-

g_set_application_name ()

-
void
-g_set_application_name (const gchar *application_name);
-

Sets a human-readable name for the application. This name should be -localized if possible, and is intended for display to the user. -Contrast with g_set_prgname(), which sets a non-localized name. -g_set_prgname() will be called automatically by gtk_init(), -but g_set_application_name() will not.

-

Note that for thread safety reasons, this function can only -be called once.

-

The application name will be used in contexts such as error messages, -or when displaying an application's name in the task list.

-
-

Parameters

-
----- - - - - - -

application_name

localized name of the application

 
-
-

Since: 2.2

-
-
-
-

g_get_prgname ()

-
const gchar *
-g_get_prgname (void);
-

Gets the name of the program. This name should not be localized, -in contrast to g_get_application_name().

-

If you are using GDK or GTK+ the program name is set in gdk_init(), -which is called by gtk_init(). The program name is found by taking -the last component of argv -[0].

-
-

Returns

-

the name of the program. The returned string belongs -to GLib and must not be modified or freed.

-
-
-
-
-

g_set_prgname ()

-
void
-g_set_prgname (const gchar *prgname);
-

Sets the name of the program. This name should not be localized, -in contrast to g_set_application_name().

-

Note that for thread-safety reasons this function can only be called once.

-
-

Parameters

-
----- - - - - - -

prgname

the name of the program.

 
-
-
-
-
-

g_get_environ ()

-
gchar **
-g_get_environ (void);
-

Gets the list of environment variables for the current process.

-

The list is NULL terminated and each item in the list is of the -form 'NAME=VALUE'.

-

This is equivalent to direct access to the 'environ' global variable, -except portable.

-

The return value is freshly allocated and it should be freed with -g_strfreev() when it is no longer needed.

-
-

Returns

-

the list of -environment variables.

-

[array zero-terminated=1][transfer full]

-
-

Since: 2.28

-
-
-
-

g_environ_getenv ()

-
const gchar *
-g_environ_getenv (gchar **envp,
-                  const gchar *variable);
-

Returns the value of the environment variable variable - in the -provided list envp -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

envp

an environment -list (eg, as returned from g_get_environ()), or NULL -for an empty environment list.

[nullable][array zero-terminated=1][transfer none]

variable

the environment variable to get

 
-
-
-

Returns

-

the value of the environment variable, or NULL if -the environment variable is not set in envp -. The returned -string is owned by envp -, and will be freed if variable -is -set or unset again.

-
-

Since: 2.32

-
-
-
-

g_environ_setenv ()

-
gchar **
-g_environ_setenv (gchar **envp,
-                  const gchar *variable,
-                  const gchar *value,
-                  gboolean overwrite);
-

Sets the environment variable variable - in the provided list -envp - to value -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

envp

an -environment list that can be freed using g_strfreev() (e.g., as -returned from g_get_environ()), or NULL for an empty -environment list.

[nullable][array zero-terminated=1][transfer full]

variable

the environment variable to set, must not contain '='

 

value

the value for to set the variable to

 

overwrite

whether to change the variable if it already exists

 
-
-
-

Returns

-

the -updated environment list. Free it using g_strfreev().

-

[array zero-terminated=1][transfer full]

-
-

Since: 2.32

-
-
-
-

g_environ_unsetenv ()

-
gchar **
-g_environ_unsetenv (gchar **envp,
-                    const gchar *variable);
-

Removes the environment variable variable - from the provided -environment envp -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

envp

an environment -list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()), -or NULL for an empty environment list.

[nullable][array zero-terminated=1][transfer full]

variable

the environment variable to remove, must not contain '='

 
-
-
-

Returns

-

the -updated environment list. Free it using g_strfreev().

-

[array zero-terminated=1][transfer full]

-
-

Since: 2.32

-
-
-
-

g_getenv ()

-
const gchar *
-g_getenv (const gchar *variable);
-

Returns the value of an environment variable.

-

On UNIX, the name and value are byte strings which might or might not -be in some consistent character set and encoding. On Windows, they are -in UTF-8. -On Windows, in case the environment variable's value contains -references to other environment variables, they are expanded.

-
-

Parameters

-
----- - - - - - -

variable

the environment variable to get

 
-
-
-

Returns

-

the value of the environment variable, or NULL if -the environment variable is not found. The returned string -may be overwritten by the next call to g_getenv(), g_setenv() -or g_unsetenv().

-
-
-
-
-

g_setenv ()

-
gboolean
-g_setenv (const gchar *variable,
-          const gchar *value,
-          gboolean overwrite);
-

Sets an environment variable. On UNIX, both the variable's name and -value can be arbitrary byte strings, except that the variable's name -cannot contain '='. On Windows, they should be in UTF-8.

-

Note that on some systems, when variables are overwritten, the memory -used for the previous variables and its value isn't reclaimed.

-

You should be mindful of the fact that environment variable handling -in UNIX is not thread-safe, and your program may crash if one thread -calls g_setenv() while another thread is calling getenv(). (And note -that many functions, such as gettext(), call getenv() internally.) -This function is only safe to use at the very start of your program, -before creating any other threads (or creating objects that create -worker threads of their own).

-

If you need to set up the environment for a child process, you can -use g_get_environ() to get an environment array, modify that with -g_environ_setenv() and g_environ_unsetenv(), and then pass that -array directly to execvpe(), g_spawn_async(), or the like.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

variable

the environment variable to set, must not contain '='.

 

value

the value for to set the variable to.

 

overwrite

whether to change the variable if it already exists.

 
-
-
-

Returns

-

FALSE if the environment variable couldn't be set.

-
-

Since: 2.4

-
-
-
-

g_unsetenv ()

-
void
-g_unsetenv (const gchar *variable);
-

Removes an environment variable from the environment.

-

Note that on some systems, when variables are overwritten, the -memory used for the previous variables and its value isn't reclaimed.

-

You should be mindful of the fact that environment variable handling -in UNIX is not thread-safe, and your program may crash if one thread -calls g_unsetenv() while another thread is calling getenv(). (And note -that many functions, such as gettext(), call getenv() internally.) This -function is only safe to use at the very start of your program, before -creating any other threads (or creating objects that create worker -threads of their own).

-

If you need to set up the environment for a child process, you can -use g_get_environ() to get an environment array, modify that with -g_environ_setenv() and g_environ_unsetenv(), and then pass that -array directly to execvpe(), g_spawn_async(), or the like.

-
-

Parameters

-
----- - - - - - -

variable

the environment variable to remove, must not contain '='

 
-
-

Since: 2.4

-
-
-
-

g_listenv ()

-
gchar **
-g_listenv (void);
-

Gets the names of all variables set in the environment.

-

Programs that want to be portable to Windows should typically use -this function and g_getenv() instead of using the environ array -from the C library directly. On Windows, the strings in the environ -array are in system codepage encoding, while in most of the typical -use cases for environment variables in GLib-using programs you want -the UTF-8 encoding that this function and g_getenv() provide.

-
-

Returns

-

a NULL-terminated -list of strings which must be freed with g_strfreev().

-

[array zero-terminated=1][transfer full]

-
-

Since: 2.8

-
-
-
-

g_get_user_name ()

-
const gchar *
-g_get_user_name (void);
-

Gets the user name of the current user. The encoding of the returned -string is system-defined. On UNIX, it might be the preferred file name -encoding, or something else, and there is no guarantee that it is even -consistent on a machine. On Windows, it is always UTF-8.

-
-

Returns

-

the user name of the current user.

-

[type filename]

-
-
-
-
-

g_get_real_name ()

-
const gchar *
-g_get_real_name (void);
-

Gets the real name of the user. This usually comes from the user's -entry in the passwd file. The encoding of the returned string is -system-defined. (On Windows, it is, however, always UTF-8.) If the -real user name cannot be determined, the string "Unknown" is -returned.

-
-

Returns

-

the user's real name.

-

[type filename]

-
-
-
-
-

g_get_user_cache_dir ()

-
const gchar *
-g_get_user_cache_dir (void);
-

Returns a base directory in which to store non-essential, cached -data specific to particular user.

-

On UNIX platforms this is determined using the mechanisms described -in the -XDG Base Directory Specification. -In this case the directory retrieved will be XDG_CACHE_HOME.

-

On Windows is the directory that serves as a common repository for -temporary Internet files. A typical path is -C:\Documents and Settings\username\Local Settings\Temporary Internet Files. -See documentation for CSIDL_INTERNET_CACHE.

-
-

Returns

-

a string owned by GLib that must not be modified -or freed.

-

[type filename]

-
-

Since: 2.6

-
-
-
-

g_get_user_data_dir ()

-
const gchar *
-g_get_user_data_dir (void);
-

Returns a base directory in which to access application data such -as icons that is customized for a particular user.

-

On UNIX platforms this is determined using the mechanisms described -in the -XDG Base Directory Specification. -In this case the directory retrieved will be XDG_DATA_HOME.

-

On Windows this is the folder to use for local (as opposed to -roaming) application data. See documentation for -CSIDL_LOCAL_APPDATA. Note that on Windows it thus is the same as -what g_get_user_config_dir() returns.

-
-

Returns

-

a string owned by GLib that must not be modified -or freed.

-

[type filename]

-
-

Since: 2.6

-
-
-
-

g_get_user_config_dir ()

-
const gchar *
-g_get_user_config_dir (void);
-

Returns a base directory in which to store user-specific application -configuration information such as user preferences and settings.

-

On UNIX platforms this is determined using the mechanisms described -in the -XDG Base Directory Specification. -In this case the directory retrieved will be XDG_CONFIG_HOME.

-

On Windows this is the folder to use for local (as opposed to -roaming) application data. See documentation for -CSIDL_LOCAL_APPDATA. Note that on Windows it thus is the same as -what g_get_user_data_dir() returns.

-
-

Returns

-

a string owned by GLib that must not be modified -or freed.

-

[type filename]

-
-

Since: 2.6

-
-
-
-

g_get_user_runtime_dir ()

-
const gchar *
-g_get_user_runtime_dir (void);
-

Returns a directory that is unique to the current user on the local -system.

-

On UNIX platforms this is determined using the mechanisms described -in the -XDG Base Directory Specification. -This is the directory -specified in the XDG_RUNTIME_DIR environment variable. -In the case that this variable is not set, we return the value of -g_get_user_cache_dir(), after verifying that it exists.

-

On Windows this is the folder to use for local (as opposed to -roaming) application data. See documentation for -CSIDL_LOCAL_APPDATA. Note that on Windows it thus is the same as -what g_get_user_config_dir() returns.

-
-

Returns

-

a string owned by GLib that must not be -modified or freed.

-

[type filename]

-
-

Since: 2.28

-
-
-
-

g_get_user_special_dir ()

-
const gchar *
-g_get_user_special_dir (GUserDirectory directory);
-

Returns the full path of a special directory using its logical id.

-

On UNIX this is done using the XDG special user directories. -For compatibility with existing practise, G_USER_DIRECTORY_DESKTOP -falls back to $HOME/Desktop when XDG special user directories have -not been set up.

-

Depending on the platform, the user might be able to change the path -of the special directory without requiring the session to restart; GLib -will not reflect any change once the special directories are loaded.

-
-

Parameters

-
----- - - - - - -

directory

the logical id of special directory

 
-
-
-

Returns

-

the path to the specified special directory, or -NULL if the logical id was not found. The returned string is owned by -GLib and should not be modified or freed.

-

[type filename]

-
-

Since: 2.14

-
-
-
-

g_get_system_data_dirs ()

-
const gchar * const *
-g_get_system_data_dirs (void);
-

Returns an ordered list of base directories in which to access -system-wide application data.

-

On UNIX platforms this is determined using the mechanisms described -in the -XDG Base Directory Specification -In this case the list of directories retrieved will be XDG_DATA_DIRS.

-

On Windows the first elements in the list are the Application Data -and Documents folders for All Users. (These can be determined only -on Windows 2000 or later and are not present in the list on other -Windows versions.) See documentation for CSIDL_COMMON_APPDATA and -CSIDL_COMMON_DOCUMENTS.

-

Then follows the "share" subfolder in the installation folder for -the package containing the DLL that calls this function, if it can -be determined.

-

Finally the list contains the "share" subfolder in the installation -folder for GLib, and in the installation folder for the package the -application's .exe file belongs to.

-

The installation folders above are determined by looking up the -folder where the module (DLL or EXE) in question is located. If the -folder's name is "bin", its parent is used, otherwise the folder -itself.

-

Note that on Windows the returned list can vary depending on where -this function is called.

-
-

Returns

-

a NULL-terminated array of strings owned by GLib that must not be -modified or freed.

-

[array zero-terminated=1][element-type filename][transfer none]

-
-

Since: 2.6

-
-
-
-

g_get_system_config_dirs ()

-
const gchar * const *
-g_get_system_config_dirs (void);
-

Returns an ordered list of base directories in which to access -system-wide configuration information.

-

On UNIX platforms this is determined using the mechanisms described -in the -XDG Base Directory Specification. -In this case the list of directories retrieved will be XDG_CONFIG_DIRS.

-

On Windows is the directory that contains application data for all users. -A typical path is C:\Documents and Settings\All Users\Application Data. -This folder is used for application data that is not user specific. -For example, an application can store a spell-check dictionary, a database -of clip art, or a log file in the CSIDL_COMMON_APPDATA folder. -This information will not roam and is available to anyone using the computer.

-
-

Returns

-

a NULL-terminated array of strings owned by GLib that must not be -modified or freed.

-

[array zero-terminated=1][element-type filename][transfer none]

-
-

Since: 2.6

-
-
-
-

g_reload_user_special_dirs_cache ()

-
void
-g_reload_user_special_dirs_cache (void);
-

Resets the cache used for g_get_user_special_dir(), so -that the latest on-disk version is used. Call this only -if you just changed the data on disk yourself.

-

Due to threadsafety issues this may cause leaking of strings -that were previously returned from g_get_user_special_dir() -that can't be freed. We ensure to only leak the data for -the directories that actually changed value though.

-

Since: 2.22

-
-
-
-

g_get_host_name ()

-
const gchar *
-g_get_host_name (void);
-

Return a name for the machine.

-

The returned name is not necessarily a fully-qualified domain name, -or even present in DNS or some other name service at all. It need -not even be unique on your local network or site, but usually it -is. Callers should not rely on the return value having any specific -properties like uniqueness for security purposes. Even if the name -of the machine is changed while an application is running, the -return value from this function does not change. The returned -string is owned by GLib and should not be modified or freed. If no -name can be determined, a default fixed string "localhost" is -returned.

-
-

Returns

-

the host name of the machine.

-
-

Since: 2.8

-
-
-
-

g_get_home_dir ()

-
const gchar *
-g_get_home_dir (void);
-

Gets the current user's home directory.

-

As with most UNIX tools, this function will return the value of the -HOME environment variable if it is set to an existing absolute path -name, falling back to the passwd file in the case that it is unset.

-

If the path given in HOME is non-absolute, does not exist, or is -not a directory, the result is undefined.

-

Before version 2.36 this function would ignore the HOME environment -variable, taking the value from the passwd database instead. This was -changed to increase the compatibility of GLib with other programs (and -the XDG basedir specification) and to increase testability of programs -based on GLib (by making it easier to run them from test frameworks).

-

If your program has a strong requirement for either the new or the -old behaviour (and if you don't wish to increase your GLib -dependency to ensure that the new behaviour is in effect) then you -should either directly check the HOME environment variable yourself -or unset it before calling any functions in GLib.

-
-

Returns

-

the current user's home directory.

-

[type filename]

-
-
-
-
-

g_get_tmp_dir ()

-
const gchar *
-g_get_tmp_dir (void);
-

Gets the directory to use for temporary files.

-

On UNIX, this is taken from the TMPDIR environment variable. -If the variable is not set, P_tmpdir is -used, as defined by the system C library. Failing that, a -hard-coded default of "/tmp" is returned.

-

On Windows, the TEMP environment variable is used, with the -root directory of the Windows installation (eg: "C:\") used -as a default.

-

The encoding of the returned string is system-defined. On Windows, -it is always UTF-8. The return value is never NULL or the empty -string.

-
-

Returns

-

the directory to use for temporary files.

-

[type filename]

-
-
-
-
-

g_get_current_dir ()

-
gchar *
-g_get_current_dir (void);
-

Gets the current directory.

-

The returned string should be freed when no longer needed. -The encoding of the returned string is system defined. -On Windows, it is always UTF-8.

-

Since GLib 2.40, this function will return the value of the "PWD" -environment variable if it is set and it happens to be the same as -the current directory. This can make a difference in the case that -the current directory is the target of a symbolic link.

-
-

Returns

-

the current directory.

-

[type filename]

-
-
-
-
-

g_basename ()

-
const gchar *
-g_basename (const gchar *file_name);
-
-

g_basename has been deprecated since version 2.2 and should not be used in newly-written code.

-

Use g_path_get_basename() instead, but notice - that g_path_get_basename() allocates new memory for the - returned string, unlike this function which returns a pointer - into the argument.

-
-

Gets the name of the file without any leading directory -components. It returns a pointer into the given file name -string.

-
-

Parameters

-
----- - - - - - -

file_name

the name of the file.

[type filename]
-
-
-

Returns

-

the name of the file without any leading -directory components.

-

[type filename]

-
-
-
-
-

g_path_is_absolute ()

-
gboolean
-g_path_is_absolute (const gchar *file_name);
-

Returns TRUE if the given file_name - is an absolute file name. -Note that this is a somewhat vague concept on Windows.

-

On POSIX systems, an absolute file name is well-defined. It always -starts from the single root directory. For example "/usr/local".

-

On Windows, the concepts of current drive and drive-specific -current directory introduce vagueness. This function interprets as -an absolute file name one that either begins with a directory -separator such as "\Users\tml" or begins with the root on a drive, -for example "C:\Windows". The first case also includes UNC paths -such as "\myserver\docs\foo". In all cases, either slashes or -backslashes are accepted.

-

Note that a file name relative to the current drive root does not -truly specify a file uniquely over time and across processes, as -the current drive is a per-process value and can be changed.

-

File names relative the current directory on some specific drive, -such as "D:foo/bar", are not interpreted as absolute by this -function, but they obviously are not relative to the normal current -directory as returned by getcwd() or g_get_current_dir() -either. Such paths should be avoided, or need to be handled using -Windows-specific code.

-
-

Parameters

-
----- - - - - - -

file_name

a file name.

[type filename]
-
-
-

Returns

-

TRUE if file_name -is absolute

-
-
-
-
-

g_path_skip_root ()

-
const gchar *
-g_path_skip_root (const gchar *file_name);
-

Returns a pointer into file_name - after the root component, -i.e. after the "/" in UNIX or "C:\" under Windows. If file_name - -is not an absolute path it returns NULL.

-
-

Parameters

-
----- - - - - - -

file_name

a file name.

[type filename]
-
-
-

Returns

-

a pointer into file_name -after the -root component.

-

[type filename][nullable]

-
-
-
-
-

g_path_get_basename ()

-
gchar *
-g_path_get_basename (const gchar *file_name);
-

Gets the last component of the filename.

-

If file_name - ends with a directory separator it gets the component -before the last slash. If file_name - consists only of directory -separators (and on Windows, possibly a drive letter), a single -separator is returned. If file_name - is empty, it gets ".".

-
-

Parameters

-
----- - - - - - -

file_name

the name of the file.

[type filename]
-
-
-

Returns

-

a newly allocated string containing the last -component of the filename.

-

[type filename]

-
-
-
-
-

g_path_get_dirname ()

-
gchar *
-g_path_get_dirname (const gchar *file_name);
-

Gets the directory components of a file name.

-

If the file name has no directory components "." is returned. -The returned string should be freed when no longer needed.

-
-

Parameters

-
----- - - - - - -

file_name

the name of the file.

[type filename]
-
-
-

Returns

-

the directory components of the file.

-

[type filename]

-
-
-
-
-

g_build_filename ()

-
gchar *
-g_build_filename (const gchar *first_element,
-                  ...);
-

Creates a filename from a series of elements using the correct -separator for filenames.

-

On Unix, this function behaves identically to g_build_path -(G_DIR_SEPARATOR_S, first_element, ....).

-

On Windows, it takes into account that either the backslash -(\ or slash (/) can be used as separator in filenames, but -otherwise behaves as on UNIX. When file pathname separators need -to be inserted, the one that last previously occurred in the -parameters (reading from left to right) is used.

-

No attempt is made to force the resulting filename to be an absolute -path. If the first element is a relative path, the result will -be a relative path.

-
-

Parameters

-
----- - - - - - - - - - - - - -

first_element

the first element in the path.

[type filename]

...

remaining elements in path, terminated by NULL

 
-
-
-

Returns

-

a newly-allocated string that must be freed with -g_free().

-

[type filename]

-
-
-
-
-

g_build_filenamev ()

-
gchar *
-g_build_filenamev (gchar **args);
-

Behaves exactly like g_build_filename(), but takes the path elements -as a string array, instead of varargs. This function is mainly -meant for language bindings.

-
-

Parameters

-
----- - - - - - -

args

NULL-terminated -array of strings containing the path elements.

[array zero-terminated=1][element-type filename]
-
-
-

Returns

-

a newly-allocated string that must be freed -with g_free().

-

[type filename]

-
-

Since: 2.8

-
-
-
-

g_build_path ()

-
gchar *
-g_build_path (const gchar *separator,
-              const gchar *first_element,
-              ...);
-

Creates a path from a series of elements using separator - as the -separator between elements. At the boundary between two elements, -any trailing occurrences of separator in the first element, or -leading occurrences of separator in the second element are removed -and exactly one copy of the separator is inserted.

-

Empty elements are ignored.

-

The number of leading copies of the separator on the result is -the same as the number of leading copies of the separator on -the first non-empty element.

-

The number of trailing copies of the separator on the result is -the same as the number of trailing copies of the separator on -the last non-empty element. (Determination of the number of -trailing copies is done without stripping leading copies, so -if the separator is ABA, then ABABA has 1 trailing copy.)

-

However, if there is only a single non-empty element, and there -are no characters in that element not part of the leading or -trailing separators, then the result is exactly the original value -of that element.

-

Other than for determination of the number of leading and trailing -copies of the separator, elements consisting only of copies -of the separator are ignored.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

separator

a string used to separator the elements of the path.

[type filename]

first_element

the first element in the path.

[type filename]

...

remaining elements in path, terminated by NULL

 
-
-
-

Returns

-

a newly-allocated string that must be freed with -g_free().

-

[type filename]

-
-
-
-
-

g_build_pathv ()

-
gchar *
-g_build_pathv (const gchar *separator,
-               gchar **args);
-

Behaves exactly like g_build_path(), but takes the path elements -as a string array, instead of varargs. This function is mainly -meant for language bindings.

-
-

Parameters

-
----- - - - - - - - - - - - - -

separator

a string used to separator the elements of the path.

 

args

NULL-terminated -array of strings containing the path elements.

[array zero-terminated=1][element-type filename]
-
-
-

Returns

-

a newly-allocated string that must be freed -with g_free().

-

[type filename]

-
-

Since: 2.8

-
-
-
-

g_format_size ()

-
gchar *
-g_format_size (guint64 size);
-

Formats a size (for example the size of a file) into a human readable -string. Sizes are rounded to the nearest size prefix (kB, MB, GB) -and are displayed rounded to the nearest tenth. E.g. the file size -3292528 bytes will be converted into the string "3.2 MB".

-

The prefix units base is 1000 (i.e. 1 kB is 1000 bytes).

-

This string should be freed with g_free() when not needed any longer.

-

See g_format_size_full() for more options about how the size might be -formatted.

-
-

Parameters

-
----- - - - - - -

size

a size in bytes

 
-
-
-

Returns

-

a newly-allocated formatted string containing a human readable -file size

-
-

Since: 2.30

-
-
-
-

g_format_size_full ()

-
gchar *
-g_format_size_full (guint64 size,
-                    GFormatSizeFlags flags);
-

Formats a size.

-

This function is similar to g_format_size() but allows for flags -that modify the output. See GFormatSizeFlags.

-
-

Parameters

-
----- - - - - - - - - - - - - -

size

a size in bytes

 

flags

GFormatSizeFlags to modify the output

 
-
-
-

Returns

-

a newly-allocated formatted string containing a human -readable file size

-
-

Since: 2.30

-
-
-
-

g_format_size_for_display ()

-
gchar *
-g_format_size_for_display (goffset size);
-
-

g_format_size_for_display has been deprecated since version 2.30 and should not be used in newly-written code.

-

This function is broken due to its use of SI - suffixes to denote IEC units. Use g_format_size() instead.

-
-

Formats a size (for example the size of a file) into a human -readable string. Sizes are rounded to the nearest size prefix -(KB, MB, GB) and are displayed rounded to the nearest tenth. -E.g. the file size 3292528 bytes will be converted into the -string "3.1 MB".

-

The prefix units base is 1024 (i.e. 1 KB is 1024 bytes).

-

This string should be freed with g_free() when not needed any longer.

-
-

Parameters

-
----- - - - - - -

size

a size in bytes

 
-
-
-

Returns

-

a newly-allocated formatted string containing a human -readable file size

-
-

Since: 2.16

-
-
-
-

g_find_program_in_path ()

-
gchar *
-g_find_program_in_path (const gchar *program);
-

Locates the first executable named program - in the user's path, in the -same way that execvp() would locate it. Returns an allocated string -with the absolute path name, or NULL if the program is not found in -the path. If program - is already an absolute path, returns a copy of -program - if program - exists and is executable, and NULL otherwise.

-

On Windows, if program - does not have a file type suffix, tries -with the suffixes .exe, .cmd, .bat and .com, and the suffixes in -the PATHEXT environment variable.

-

On Windows, it looks for the file in the same way as CreateProcess() -would. This means first in the directory where the executing -program was loaded from, then in the current directory, then in the -Windows 32-bit system directory, then in the Windows directory, and -finally in the directories in the PATH environment variable. If -the program is found, the return value contains the full name -including the type suffix.

-
-

Parameters

-
----- - - - - - -

program

a program name in the GLib file name encoding.

[type filename]
-
-
-

Returns

-

a newly-allocated string with the absolute path, -or NULL.

-

[type filename]

-
-
-
-
-

g_bit_nth_lsf()

-
#define             g_bit_nth_lsf(mask, nth_bit)
-

Find the position of the first bit set in mask -, searching -from (but not including) nth_bit - upwards. Bits are numbered -from 0 (least significant) to sizeof(gulong) * 8 - 1 (31 or 63, -usually). To start searching from the 0th bit, set nth_bit - to -1.

-
-

Parameters

-
----- - - - - - - - - - - - - -

mask

a gulong containing flags

 

nth_bit

the index of the bit to start the search from

 
-
-
-

Returns

-

the index of the first bit set which is higher than nth_bit -, or -1 -if no higher bits are set

-
-
-
-
-

g_bit_nth_msf()

-
#define             g_bit_nth_msf(mask, nth_bit)
-

Find the position of the first bit set in mask -, searching -from (but not including) nth_bit - downwards. Bits are numbered -from 0 (least significant) to sizeof(gulong) * 8 - 1 (31 or 63, -usually). To start searching from the last bit, set nth_bit - to --1 or GLIB_SIZEOF_LONG * 8.

-
-

Parameters

-
----- - - - - - - - - - - - - -

mask

a gulong containing flags

 

nth_bit

the index of the bit to start the search from

 
-
-
-

Returns

-

the index of the first bit set which is lower than nth_bit -, or -1 -if no lower bits are set

-
-
-
-
-

g_bit_storage()

-
#define             g_bit_storage(number)
-

Gets the number of bits used to hold number -, -e.g. if number - is 4, 3 bits are needed.

-
-

Parameters

-
----- - - - - - -

number

a guint

 
-
-
-

Returns

-

the number of bits used to hold number -

-
-
-
-
-

g_spaced_primes_closest ()

-
guint
-g_spaced_primes_closest (guint num);
-

Gets the smallest prime number from a built-in array of primes which -is larger than num -. This is used within GLib to calculate the optimum -size of a GHashTable.

-

The built-in array of primes ranges from 11 to 13845163 such that -each prime is approximately 1.5-2 times the previous prime.

-
-

Parameters

-
----- - - - - - -

num

a guint

 
-
-
-

Returns

-

the smallest prime number from a built-in array of primes -which is larger than num -

-
-
-
-
-

g_atexit ()

-
void
-g_atexit (GVoidFunc func);
-
-

g_atexit has been deprecated since version 2.32 and should not be used in newly-written code.

-

It is best to avoid g_atexit().

-
-

Specifies a function to be called at normal program termination.

-

Since GLib 2.8.2, on Windows g_atexit() actually is a preprocessor -macro that maps to a call to the atexit() function in the C -library. This means that in case the code that calls g_atexit(), -i.e. atexit(), is in a DLL, the function will be called when the -DLL is detached from the program. This typically makes more sense -than that the function is called when the GLib DLL is detached, -which happened earlier when g_atexit() was a function in the GLib -DLL.

-

The behaviour of atexit() in the context of dynamically loaded -modules is not formally specified and varies wildly.

-

On POSIX systems, calling g_atexit() (or atexit()) in a dynamically -loaded module which is unloaded before the program terminates might -well cause a crash at program exit.

-

Some POSIX systems implement atexit() like Windows, and have each -dynamically loaded module maintain an own atexit chain that is -called when the module is unloaded.

-

On other POSIX systems, before a dynamically loaded module is -unloaded, the registered atexit functions (if any) residing in that -module are called, regardless where the code that registered them -resided. This is presumably the most robust approach.

-

As can be seen from the above, for portability it's best to avoid -calling g_atexit() (or atexit()) except in the main executable of a -program.

-
-

Parameters

-
----- - - - - - -

func

the function to call on normal program termination.

[scope async]
-
-
-
-
-

g_parse_debug_string ()

-
guint
-g_parse_debug_string (const gchar *string,
-                      const GDebugKey *keys,
-                      guint nkeys);
-

Parses a string containing debugging options -into a guint containing bit flags. This is used -within GDK and GTK+ to parse the debug options passed on the -command line or through environment variables.

-

If string - is equal to "all", all flags are set. Any flags -specified along with "all" in string - are inverted; thus, -"all,foo,bar" or "foo,bar,all" sets all flags except those -corresponding to "foo" and "bar".

-

If string - is equal to "help", all the available keys in keys - -are printed out to standard error.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a list of debug options separated by colons, spaces, or -commas, or NULL.

[nullable]

keys

pointer to an array of GDebugKey which associate -strings with bit flags.

[array length=nkeys]

nkeys

the number of GDebugKeys in the array.

 
-
-
-

Returns

-

the combined set of bit flags.

-
-
-
-
-

GVoidFunc ()

-
void
-(*GVoidFunc) (void);
-

GVoidFunc is deprecated and should not be used in newly-written code.

-

Declares a type of function which takes no arguments -and has no return value. It is used to specify the type -function passed to g_atexit().

-
-
-
-

GFreeFunc ()

-
void
-(*GFreeFunc) (gpointer data);
-

Declares a type of function which takes an arbitrary -data pointer argument and has no return value. It is -not currently used in GLib or GTK+.

-
-

Parameters

-
----- - - - - - -

data

a data pointer

 
-
-
-
-
-

g_qsort_with_data ()

-
void
-g_qsort_with_data (gconstpointer pbase,
-                   gint total_elems,
-                   gsize size,
-                   GCompareDataFunc compare_func,
-                   gpointer user_data);
-

This is just like the standard C qsort() function, but -the comparison routine accepts a user data argument.

-

This is guaranteed to be a stable sort since version 2.32.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

pbase

start of array to sort.

[not nullable]

total_elems

elements in the array

 

size

size of each element

 

compare_func

function to compare elements

 

user_data

data to pass to compare_func -

 
-
-
-
-
-

g_nullify_pointer ()

-
void
-g_nullify_pointer (gpointer *nullify_location);
-

Set the pointer at the specified location to NULL.

-
-

Parameters

-
----- - - - - - -

nullify_location

the memory address of the pointer.

[not nullable]
-
-
-
-
-

Types and Values

-
-

enum GUserDirectory

-

These are logical ids for special directories which are defined -depending on the platform used. You should use g_get_user_special_dir() -to retrieve the full path associated to the logical id.

-

The GUserDirectory enumeration can be extended at later date. Not -every platform has a directory for every logical id in this -enumeration.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_USER_DIRECTORY_DESKTOP

-

the user's Desktop directory

-
 

G_USER_DIRECTORY_DOCUMENTS

-

the user's Documents directory

-
 

G_USER_DIRECTORY_DOWNLOAD

-

the user's Downloads directory

-
 

G_USER_DIRECTORY_MUSIC

-

the user's Music directory

-
 

G_USER_DIRECTORY_PICTURES

-

the user's Pictures directory

-
 

G_USER_DIRECTORY_PUBLIC_SHARE

-

the user's shared directory

-
 

G_USER_DIRECTORY_TEMPLATES

-

the user's Templates directory

-
 

G_USER_DIRECTORY_VIDEOS

-

the user's Movies directory

-
 

G_USER_N_DIRECTORIES

-

the number of enum values

-
 
-
-

Since: 2.14

-
-
-
-

g_dirname

-
#define             g_dirname
-
-

g_dirname is deprecated and should not be used in newly-written code.

-

use g_path_get_dirname() instead

-
-

Gets the directory components of a file name.

-

If the file name has no directory components "." is returned. -The returned string should be freed when no longer needed.

-
-

Parameters

-
----- - - - - - -

file_name

the name of the file.

[type filename]
-
-
-

Returns

-

the directory components of the file.

-

[type filename]

-
-
-
-
-

enum GFormatSizeFlags

-

Flags to modify the format of the string returned by g_format_size_full().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_FORMAT_SIZE_DEFAULT

-

behave the same as g_format_size()

-
 

G_FORMAT_SIZE_LONG_FORMAT

-

include the exact number of bytes as part - of the returned string. For example, "45.6 kB (45,612 bytes)".

-
 

G_FORMAT_SIZE_IEC_UNITS

-

use IEC (base 1024) units with "KiB"-style - suffixes. IEC units should only be used for reporting things with - a strong "power of 2" basis, like RAM sizes or RAID stripe sizes. - Network and storage sizes should be reported in the normal SI units.

-
 
-
-
-
-
-

struct GDebugKey

-
struct GDebugKey {
-  const gchar *key;
-  guint	       value;
-};
-
-

Associates a string with a bit flag. -Used in g_parse_debug_string().

-
-

Members

-
----- - - - - - - - - - - - - -

const gchar *key;

the string

 

guint value;

the flag

 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-N-ary-Trees.html b/docs/reference/glib/html/glib-N-ary-Trees.html deleted file mode 100644 index 63364f05b..000000000 --- a/docs/reference/glib/html/glib-N-ary-Trees.html +++ /dev/null @@ -1,1961 +0,0 @@ - - - - -N-ary Trees: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

N-ary Trees

-

N-ary Trees — trees of data with any number of branches

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GNode * - -g_node_new () -
-GNode * - -g_node_copy () -
-gpointer - -(*GCopyFunc) () -
-GNode * - -g_node_copy_deep () -
-GNode * - -g_node_insert () -
-GNode * - -g_node_insert_before () -
-GNode * - -g_node_insert_after () -
#define -g_node_append() -
-GNode * - -g_node_prepend () -
#define -g_node_insert_data() -
#define -g_node_insert_data_after() -
#define -g_node_insert_data_before() -
#define -g_node_append_data() -
#define -g_node_prepend_data() -
-void - -g_node_reverse_children () -
-void - -g_node_traverse () -
-gboolean - -(*GNodeTraverseFunc) () -
-void - -g_node_children_foreach () -
-void - -(*GNodeForeachFunc) () -
-GNode * - -g_node_get_root () -
-GNode * - -g_node_find () -
-GNode * - -g_node_find_child () -
-gint - -g_node_child_index () -
-gint - -g_node_child_position () -
#define -g_node_first_child() -
-GNode * - -g_node_last_child () -
-GNode * - -g_node_nth_child () -
-GNode * - -g_node_first_sibling () -
#define -g_node_next_sibling() -
#define -g_node_prev_sibling() -
-GNode * - -g_node_last_sibling () -
#define -G_NODE_IS_LEAF() -
#define -G_NODE_IS_ROOT() -
-guint - -g_node_depth () -
-guint - -g_node_n_nodes () -
-guint - -g_node_n_children () -
-gboolean - -g_node_is_ancestor () -
-guint - -g_node_max_height () -
-void - -g_node_unlink () -
-void - -g_node_destroy () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
structGNode
enumGTraverseType
enumGTraverseFlags
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The GNode struct and its associated functions provide a N-ary tree -data structure, where nodes in the tree can contain arbitrary data.

-

To create a new tree use g_node_new().

-

To insert a node into a tree use g_node_insert(), -g_node_insert_before(), g_node_append() and g_node_prepend().

-

To create a new node and insert it into a tree use -g_node_insert_data(), g_node_insert_data_after(), -g_node_insert_data_before(), g_node_append_data() -and g_node_prepend_data().

-

To reverse the children of a node use g_node_reverse_children().

-

To find a node use g_node_get_root(), g_node_find(), -g_node_find_child(), g_node_child_index(), g_node_child_position(), -g_node_first_child(), g_node_last_child(), g_node_nth_child(), -g_node_first_sibling(), g_node_prev_sibling(), g_node_next_sibling() -or g_node_last_sibling().

-

To get information about a node or tree use G_NODE_IS_LEAF(), -G_NODE_IS_ROOT(), g_node_depth(), g_node_n_nodes(), -g_node_n_children(), g_node_is_ancestor() or g_node_max_height().

-

To traverse a tree, calling a function for each node visited in the -traversal, use g_node_traverse() or g_node_children_foreach().

-

To remove a node or subtree from a tree use g_node_unlink() or -g_node_destroy().

-
-
-

Functions

-
-

g_node_new ()

-
GNode *
-g_node_new (gpointer data);
-

Creates a new GNode containing the given data. -Used to create the first node in a tree.

-
-

Parameters

-
----- - - - - - -

data

the data of the new node

 
-
-
-

Returns

-

a new GNode

-
-
-
-
-

g_node_copy ()

-
GNode *
-g_node_copy (GNode *node);
-

Recursively copies a GNode (but does not deep-copy the data inside the -nodes, see g_node_copy_deep() if you need that).

-
-

Parameters

-
----- - - - - - -

node

a GNode

 
-
-
-

Returns

-

a new GNode containing the same data pointers

-
-
-
-
-

GCopyFunc ()

-
gpointer
-(*GCopyFunc) (gconstpointer src,
-              gpointer data);
-

A function of this signature is used to copy the node data -when doing a deep-copy of a tree.

-
-

Parameters

-
----- - - - - - - - - - - - - -

src

A pointer to the data which should be copied.

[not nullable]

data

Additional data

 
-
-
-

Returns

-

A pointer to the copy.

-

[not nullable]

-
-

Since: 2.4

-
-
-
-

g_node_copy_deep ()

-
GNode *
-g_node_copy_deep (GNode *node,
-                  GCopyFunc copy_func,
-                  gpointer data);
-

Recursively copies a GNode and its data.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

node

a GNode

 

copy_func

the function which is called to copy the data inside each node, -or NULL to use the original data.

 

data

data to pass to copy_func -

 
-
-
-

Returns

-

a new GNode containing copies of the data in node -.

-
-

Since: 2.4

-
-
-
-

g_node_insert ()

-
GNode *
-g_node_insert (GNode *parent,
-               gint position,
-               GNode *node);
-

Inserts a GNode beneath the parent at the given position.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

parent

the GNode to place node -under

 

position

the position to place node -at, with respect to its siblings -If position is -1, node -is inserted as the last child of parent -

 

node

the GNode to insert

 
-
-
-

Returns

-

the inserted GNode

-
-
-
-
-

g_node_insert_before ()

-
GNode *
-g_node_insert_before (GNode *parent,
-                      GNode *sibling,
-                      GNode *node);
-

Inserts a GNode beneath the parent before the given sibling.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

parent

the GNode to place node -under

 

sibling

the sibling GNode to place node -before. -If sibling is NULL, the node is inserted as the last child of parent -.

 

node

the GNode to insert

 
-
-
-

Returns

-

the inserted GNode

-
-
-
-
-

g_node_insert_after ()

-
GNode *
-g_node_insert_after (GNode *parent,
-                     GNode *sibling,
-                     GNode *node);
-

Inserts a GNode beneath the parent after the given sibling.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

parent

the GNode to place node -under

 

sibling

the sibling GNode to place node -after. -If sibling is NULL, the node is inserted as the first child of parent -.

 

node

the GNode to insert

 
-
-
-

Returns

-

the inserted GNode

-
-
-
-
-

g_node_append()

-
#define             g_node_append(parent, node)
-

Inserts a GNode as the last child of the given parent.

-
-

Parameters

-
----- - - - - - - - - - - - - -

parent

the GNode to place the new GNode under

 

node

the GNode to insert

 
-
-
-

Returns

-

the inserted GNode

-
-
-
-
-

g_node_prepend ()

-
GNode *
-g_node_prepend (GNode *parent,
-                GNode *node);
-

Inserts a GNode as the first child of the given parent.

-
-

Parameters

-
----- - - - - - - - - - - - - -

parent

the GNode to place the new GNode under

 

node

the GNode to insert

 
-
-
-

Returns

-

the inserted GNode

-
-
-
-
-

g_node_insert_data()

-
#define             g_node_insert_data(parent, position, data)
-

Inserts a new GNode at the given position.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

parent

the GNode to place the new GNode under

 

position

the position to place the new GNode at. If position is -1, -the new GNode is inserted as the last child of parent -

 

data

the data for the new GNode

 
-
-
-

Returns

-

the new GNode

-
-
-
-
-

g_node_insert_data_after()

-
#define             g_node_insert_data_after(parent, sibling, data)
-

Inserts a new GNode after the given sibling.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

parent

the GNode to place the new GNode under

 

sibling

the sibling GNode to place the new GNode after

 

data

the data for the new GNode

 
-
-
-

Returns

-

the new GNode

-
-
-
-
-

g_node_insert_data_before()

-
#define             g_node_insert_data_before(parent, sibling, data)
-

Inserts a new GNode before the given sibling.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

parent

the GNode to place the new GNode under

 

sibling

the sibling GNode to place the new GNode before

 

data

the data for the new GNode

 
-
-
-

Returns

-

the new GNode

-
-
-
-
-

g_node_append_data()

-
#define             g_node_append_data(parent, data)
-

Inserts a new GNode as the last child of the given parent.

-
-

Parameters

-
----- - - - - - - - - - - - - -

parent

the GNode to place the new GNode under

 

data

the data for the new GNode

 
-
-
-

Returns

-

the new GNode

-
-
-
-
-

g_node_prepend_data()

-
#define             g_node_prepend_data(parent, data)
-

Inserts a new GNode as the first child of the given parent.

-
-

Parameters

-
----- - - - - - - - - - - - - -

parent

the GNode to place the new GNode under

 

data

the data for the new GNode

 
-
-
-

Returns

-

the new GNode

-
-
-
-
-

g_node_reverse_children ()

-
void
-g_node_reverse_children (GNode *node);
-

Reverses the order of the children of a GNode. -(It doesn't change the order of the grandchildren.)

-
-

Parameters

-
----- - - - - - -

node

a GNode.

 
-
-
-
-
-

g_node_traverse ()

-
void
-g_node_traverse (GNode *root,
-                 GTraverseType order,
-                 GTraverseFlags flags,
-                 gint max_depth,
-                 GNodeTraverseFunc func,
-                 gpointer data);
-

Traverses a tree starting at the given root GNode. -It calls the given function for each node visited. -The traversal can be halted at any point by returning TRUE from func -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

root

the root GNode of the tree to traverse

 

order

the order in which nodes are visited - G_IN_ORDER, -G_PRE_ORDER, G_POST_ORDER, or G_LEVEL_ORDER.

 

flags

which types of children are to be visited, one of -G_TRAVERSE_ALL, G_TRAVERSE_LEAVES and G_TRAVERSE_NON_LEAVES

 

max_depth

the maximum depth of the traversal. Nodes below this -depth will not be visited. If max_depth is -1 all nodes in -the tree are visited. If depth is 1, only the root is visited. -If depth is 2, the root and its children are visited. And so on.

 

func

the function to call for each visited GNode

 

data

user data to pass to the function

 
-
-
-
-
-

GNodeTraverseFunc ()

-
gboolean
-(*GNodeTraverseFunc) (GNode *node,
-                      gpointer data);
-

Specifies the type of function passed to g_node_traverse(). The -function is called with each of the nodes visited, together with the -user data passed to g_node_traverse(). If the function returns -TRUE, then the traversal is stopped.

-
-

Parameters

-
----- - - - - - - - - - - - - -

node

a GNode.

 

data

user data passed to g_node_traverse().

 
-
-
-

Returns

-

TRUE to stop the traversal.

-
-
-
-
-

g_node_children_foreach ()

-
void
-g_node_children_foreach (GNode *node,
-                         GTraverseFlags flags,
-                         GNodeForeachFunc func,
-                         gpointer data);
-

Calls a function for each of the children of a GNode. -Note that it doesn't descend beneath the child nodes.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

node

a GNode

 

flags

which types of children are to be visited, one of -G_TRAVERSE_ALL, G_TRAVERSE_LEAVES and G_TRAVERSE_NON_LEAVES

 

func

the function to call for each visited node

 

data

user data to pass to the function

 
-
-
-
-
-

GNodeForeachFunc ()

-
void
-(*GNodeForeachFunc) (GNode *node,
-                     gpointer data);
-

Specifies the type of function passed to g_node_children_foreach(). -The function is called with each child node, together with the user -data passed to g_node_children_foreach().

-
-

Parameters

-
----- - - - - - - - - - - - - -

node

a GNode.

 

data

user data passed to g_node_children_foreach().

 
-
-
-
-
-

g_node_get_root ()

-
GNode *
-g_node_get_root (GNode *node);
-

Gets the root of a tree.

-
-

Parameters

-
----- - - - - - -

node

a GNode

 
-
-
-

Returns

-

the root of the tree

-
-
-
-
-

g_node_find ()

-
GNode *
-g_node_find (GNode *root,
-             GTraverseType order,
-             GTraverseFlags flags,
-             gpointer data);
-

Finds a GNode in a tree.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

root

the root GNode of the tree to search

 

order

the order in which nodes are visited - G_IN_ORDER, -G_PRE_ORDER, G_POST_ORDER, or G_LEVEL_ORDER

 

flags

which types of children are to be searched, one of -G_TRAVERSE_ALL, G_TRAVERSE_LEAVES and G_TRAVERSE_NON_LEAVES

 

data

the data to find

 
-
-
-

Returns

-

the found GNode, or NULL if the data is not found

-
-
-
-
-

g_node_find_child ()

-
GNode *
-g_node_find_child (GNode *node,
-                   GTraverseFlags flags,
-                   gpointer data);
-

Finds the first child of a GNode with the given data.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

node

a GNode

 

flags

which types of children are to be searched, one of -G_TRAVERSE_ALL, G_TRAVERSE_LEAVES and G_TRAVERSE_NON_LEAVES

 

data

the data to find

 
-
-
-

Returns

-

the found child GNode, or NULL if the data is not found

-
-
-
-
-

g_node_child_index ()

-
gint
-g_node_child_index (GNode *node,
-                    gpointer data);
-

Gets the position of the first child of a GNode -which contains the given data.

-
-

Parameters

-
----- - - - - - - - - - - - - -

node

a GNode

 

data

the data to find

 
-
-
-

Returns

-

the index of the child of node -which contains -data -, or -1 if the data is not found

-
-
-
-
-

g_node_child_position ()

-
gint
-g_node_child_position (GNode *node,
-                       GNode *child);
-

Gets the position of a GNode with respect to its siblings. -child - must be a child of node -. The first child is numbered 0, -the second 1, and so on.

-
-

Parameters

-
----- - - - - - - - - - - - - -

node

a GNode

 

child

a child of node -

 
-
-
-

Returns

-

the position of child -with respect to its siblings

-
-
-
-
-

g_node_first_child()

-
#define             g_node_first_child(node)
-

Gets the first child of a GNode.

-
-

Parameters

-
----- - - - - - -

node

a GNode

 
-
-
-

Returns

-

the first child of node -, or NULL if node -is NULL -or has no children

-
-
-
-
-

g_node_last_child ()

-
GNode *
-g_node_last_child (GNode *node);
-

Gets the last child of a GNode.

-
-

Parameters

-
----- - - - - - -

node

a GNode (must not be NULL)

 
-
-
-

Returns

-

the last child of node -, or NULL if node -has no children

-
-
-
-
-

g_node_nth_child ()

-
GNode *
-g_node_nth_child (GNode *node,
-                  guint n);
-

Gets a child of a GNode, using the given index. -The first child is at index 0. If the index is -too big, NULL is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

node

a GNode

 

n

the index of the desired child

 
-
-
-

Returns

-

the child of node -at index n -

-
-
-
-
-

g_node_first_sibling ()

-
GNode *
-g_node_first_sibling (GNode *node);
-

Gets the first sibling of a GNode. -This could possibly be the node itself.

-
-

Parameters

-
----- - - - - - -

node

a GNode

 
-
-
-

Returns

-

the first sibling of node -

-
-
-
-
-

g_node_next_sibling()

-
#define             g_node_next_sibling(node)
-

Gets the next sibling of a GNode.

-
-

Parameters

-
----- - - - - - -

node

a GNode

 
-
-
-

Returns

-

the next sibling of node -, or NULL if node -is the last node -or NULL

-
-
-
-
-

g_node_prev_sibling()

-
#define             g_node_prev_sibling(node)
-

Gets the previous sibling of a GNode.

-
-

Parameters

-
----- - - - - - -

node

a GNode

 
-
-
-

Returns

-

the previous sibling of node -, or NULL if node -is the first -node or NULL

-
-
-
-
-

g_node_last_sibling ()

-
GNode *
-g_node_last_sibling (GNode *node);
-

Gets the last sibling of a GNode. -This could possibly be the node itself.

-
-

Parameters

-
----- - - - - - -

node

a GNode

 
-
-
-

Returns

-

the last sibling of node -

-
-
-
-
-

G_NODE_IS_LEAF()

-
#define	 G_NODE_IS_LEAF(node) (((GNode*) (node))->children == NULL)
-
-

Returns TRUE if a GNode is a leaf node.

-
-

Parameters

-
----- - - - - - -

node

a GNode

 
-
-
-

Returns

-

TRUE if the GNode is a leaf node -(i.e. it has no children)

-
-
-
-
-

G_NODE_IS_ROOT()

-
#define             G_NODE_IS_ROOT(node)
-

Returns TRUE if a GNode is the root of a tree.

-
-

Parameters

-
----- - - - - - -

node

a GNode

 
-
-
-

Returns

-

TRUE if the GNode is the root of a tree -(i.e. it has no parent or siblings)

-
-
-
-
-

g_node_depth ()

-
guint
-g_node_depth (GNode *node);
-

Gets the depth of a GNode.

-

If node - is NULL the depth is 0. The root node has a depth of 1. -For the children of the root node the depth is 2. And so on.

-
-

Parameters

-
----- - - - - - -

node

a GNode

 
-
-
-

Returns

-

the depth of the GNode

-
-
-
-
-

g_node_n_nodes ()

-
guint
-g_node_n_nodes (GNode *root,
-                GTraverseFlags flags);
-

Gets the number of nodes in a tree.

-
-

Parameters

-
----- - - - - - - - - - - - - -

root

a GNode

 

flags

which types of children are to be counted, one of -G_TRAVERSE_ALL, G_TRAVERSE_LEAVES and G_TRAVERSE_NON_LEAVES

 
-
-
-

Returns

-

the number of nodes in the tree

-
-
-
-
-

g_node_n_children ()

-
guint
-g_node_n_children (GNode *node);
-

Gets the number of children of a GNode.

-
-

Parameters

-
----- - - - - - -

node

a GNode

 
-
-
-

Returns

-

the number of children of node -

-
-
-
-
-

g_node_is_ancestor ()

-
gboolean
-g_node_is_ancestor (GNode *node,
-                    GNode *descendant);
-

Returns TRUE if node - is an ancestor of descendant -. -This is true if node is the parent of descendant -, -or if node is the grandparent of descendant - etc.

-
-

Parameters

-
----- - - - - - - - - - - - - -

node

a GNode

 

descendant

a GNode

 
-
-
-

Returns

-

TRUE if node -is an ancestor of descendant -

-
-
-
-
-

g_node_max_height ()

-
guint
-g_node_max_height (GNode *root);
-

Gets the maximum height of all branches beneath a GNode. -This is the maximum distance from the GNode to all leaf nodes.

-

If root - is NULL, 0 is returned. If root - has no children, -1 is returned. If root - has children, 2 is returned. And so on.

-
-

Parameters

-
----- - - - - - -

root

a GNode

 
-
-
-

Returns

-

the maximum height of the tree beneath root -

-
-
-
-
-

g_node_unlink ()

-
void
-g_node_unlink (GNode *node);
-

Unlinks a GNode from a tree, resulting in two separate trees.

-
-

Parameters

-
----- - - - - - -

node

the GNode to unlink, which becomes the root of a new tree

 
-
-
-
-
-

g_node_destroy ()

-
void
-g_node_destroy (GNode *root);
-

Removes root - and its children from the tree, freeing any memory -allocated.

-
-

Parameters

-
----- - - - - - -

root

the root of the tree/subtree to destroy

 
-
-
-
-
-

Types and Values

-
-

struct GNode

-
struct GNode {
-  gpointer data;
-  GNode	  *next;
-  GNode	  *prev;
-  GNode	  *parent;
-  GNode	  *children;
-};
-
-

The GNode struct represents one node in a n-ary tree.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

gpointer data;

contains the actual data of the node.

 

GNode *next;

points to the node's next sibling (a sibling is another -GNode with the same parent).

 

GNode *prev;

points to the node's previous sibling.

 

GNode *parent;

points to the parent of the GNode, or is NULL if the -GNode is the root of the tree.

 

GNode *children;

points to the first child of the GNode. The other -children are accessed by using the next -pointer of each -child.

 
-
-
-
-
-

enum GTraverseType

-

Specifies the type of traveral performed by g_tree_traverse(), -g_node_traverse() and g_node_find(). The different orders are -illustrated here:

-
    -
  • In order: A, B, C, D, E, F, G, H, I -

  • -
  • Pre order: F, B, A, D, C, E, G, I, H -

  • -
  • Post order: A, C, E, D, B, H, I, G, F -

  • -
  • Level order: F, B, G, A, D, I, C, E, H -

  • -
-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_IN_ORDER

-

vists a node's left child first, then the node itself, - then its right child. This is the one to use if you - want the output sorted according to the compare - function.

-
 

G_PRE_ORDER

-

visits a node, then its children.

-
 

G_POST_ORDER

-

visits the node's children, then the node itself.

-
 

G_LEVEL_ORDER

-

is not implemented for - balanced binary trees. - For n-ary trees, it - vists the root node first, then its children, then - its grandchildren, and so on. Note that this is less - efficient than the other orders.

-
 
-
-
-
-
-

enum GTraverseFlags

-

Specifies which nodes are visited during several of the tree -functions, including g_node_traverse() and g_node_find().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_TRAVERSE_LEAVES

-

only leaf nodes should be visited. This name has - been introduced in 2.6, for older version use - G_TRAVERSE_LEAFS.

-
 

G_TRAVERSE_NON_LEAVES

-

only non-leaf nodes should be visited. This - name has been introduced in 2.6, for older - version use G_TRAVERSE_NON_LEAFS.

-
 

G_TRAVERSE_ALL

-

all nodes should be visited.

-
 

G_TRAVERSE_MASK

-

a mask of all traverse flags.

-
 

G_TRAVERSE_LEAFS

-

identical to G_TRAVERSE_LEAVES.

-
 

G_TRAVERSE_NON_LEAFS

-

identical to G_TRAVERSE_NON_LEAVES.

-
 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Numerical-Definitions.html b/docs/reference/glib/html/glib-Numerical-Definitions.html deleted file mode 100644 index 2f6dc32da..000000000 --- a/docs/reference/glib/html/glib-Numerical-Definitions.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - -Numerical Definitions: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Numerical Definitions

-

Numerical Definitions — mathematical constants, and floating point decomposition

-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#defineG_IEEE754_FLOAT_BIAS
#defineG_IEEE754_DOUBLE_BIAS
unionGFloatIEEE754
unionGDoubleIEEE754
#defineG_E
#defineG_LN2
#defineG_LN10
#defineG_PI
#defineG_PI_2
#defineG_PI_4
#defineG_SQRT2
#defineG_LOG_2_BASE_10
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GLib offers mathematical constants such as G_PI for the value of pi; -many platforms have these in the C library, but some don't, the GLib -versions always exist.

-

The GFloatIEEE754 and GDoubleIEEE754 unions are used to access the -sign, mantissa and exponent of IEEE floats and doubles. These unions are -defined as appropriate for a given platform. IEEE floats and doubles are -supported (used for storage) by at least Intel, PPC and Sparc. See -IEEE 754-2008 -for more information about IEEE number formats.

-
-
-

Functions

-

-
-
-

Types and Values

-
-

G_IEEE754_FLOAT_BIAS

-
#define G_IEEE754_FLOAT_BIAS (127)
-
-

The bias by which exponents in single-precision floats are offset.

-
-
-
-

G_IEEE754_DOUBLE_BIAS

-
#define G_IEEE754_DOUBLE_BIAS (1023)
-
-

The bias by which exponents in double-precision floats are offset.

-
-
-
-

union GFloatIEEE754

-

The GFloatIEEE754 and GDoubleIEEE754 unions are used to access the sign, -mantissa and exponent of IEEE floats and doubles. These unions are defined -as appropriate for a given platform. IEEE floats and doubles are supported -(used for storage) by at least Intel, PPC and Sparc.

-
-

Members

-
----- - -
-
-
-
-
-

union GDoubleIEEE754

-

The GFloatIEEE754 and GDoubleIEEE754 unions are used to access the sign, -mantissa and exponent of IEEE floats and doubles. These unions are defined -as appropriate for a given platform. IEEE floats and doubles are supported -(used for storage) by at least Intel, PPC and Sparc.

-
-

Members

-
----- - - - - - -

gdouble v_double;

the double value

 
-
-
-
-
-

G_E

-
#define G_E     2.7182818284590452353602874713526624977572470937000
-
-

The base of natural logarithms.

-
-
-
-

G_LN2

-
#define G_LN2   0.69314718055994530941723212145817656807550013436026
-
-

The natural logarithm of 2.

-
-
-
-

G_LN10

-
#define G_LN10  2.3025850929940456840179914546843642076011014886288
-
-

The natural logarithm of 10.

-
-
-
-

G_PI

-
#define G_PI    3.1415926535897932384626433832795028841971693993751
-
-

The value of pi (ratio of circle's circumference to its diameter).

-
-
-
-

G_PI_2

-
#define G_PI_2  1.5707963267948966192313216916397514420985846996876
-
-

Pi divided by 2.

-
-
-
-

G_PI_4

-
#define G_PI_4  0.78539816339744830961566084581987572104929234984378
-
-

Pi divided by 4.

-
-
-
-

G_SQRT2

-
#define G_SQRT2 1.4142135623730950488016887242096980785696718753769
-
-

The square root of two.

-
-
-
-

G_LOG_2_BASE_10

-
#define G_LOG_2_BASE_10		(0.30102999566398119521)
-
-

Multiplying the base 2 exponent by this number yields the base 10 exponent.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Perl-compatible-regular-expressions.html b/docs/reference/glib/html/glib-Perl-compatible-regular-expressions.html deleted file mode 100644 index 88956d5d9..000000000 --- a/docs/reference/glib/html/glib-Perl-compatible-regular-expressions.html +++ /dev/null @@ -1,3523 +0,0 @@ - - - - -Perl-compatible regular expressions: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Perl-compatible regular expressions

-

Perl-compatible regular expressions — matches strings against regular expressions

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -(*GRegexEvalCallback) () -
-GRegex * - -g_regex_new () -
-GRegex * - -g_regex_ref () -
-void - -g_regex_unref () -
const gchar * - -g_regex_get_pattern () -
-gint - -g_regex_get_max_backref () -
-gint - -g_regex_get_capture_count () -
-gboolean - -g_regex_get_has_cr_or_lf () -
-gint - -g_regex_get_max_lookbehind () -
-gint - -g_regex_get_string_number () -
-GRegexCompileFlags - -g_regex_get_compile_flags () -
-GRegexMatchFlags - -g_regex_get_match_flags () -
-gchar * - -g_regex_escape_string () -
-gchar * - -g_regex_escape_nul () -
-gboolean - -g_regex_match_simple () -
-gboolean - -g_regex_match () -
-gboolean - -g_regex_match_full () -
-gboolean - -g_regex_match_all () -
-gboolean - -g_regex_match_all_full () -
-gchar ** - -g_regex_split_simple () -
-gchar ** - -g_regex_split () -
-gchar ** - -g_regex_split_full () -
-gchar * - -g_regex_replace () -
-gchar * - -g_regex_replace_literal () -
-gchar * - -g_regex_replace_eval () -
-gboolean - -g_regex_check_replacement () -
-GRegex * - -g_match_info_get_regex () -
const gchar * - -g_match_info_get_string () -
-GMatchInfo * - -g_match_info_ref () -
-void - -g_match_info_unref () -
-void - -g_match_info_free () -
-gboolean - -g_match_info_matches () -
-gboolean - -g_match_info_next () -
-gint - -g_match_info_get_match_count () -
-gboolean - -g_match_info_is_partial_match () -
-gchar * - -g_match_info_expand_references () -
-gchar * - -g_match_info_fetch () -
-gboolean - -g_match_info_fetch_pos () -
-gchar * - -g_match_info_fetch_named () -
-gboolean - -g_match_info_fetch_named_pos () -
-gchar ** - -g_match_info_fetch_all () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
enumGRegexError
#defineG_REGEX_ERROR
enumGRegexCompileFlags
enumGRegexMatchFlags
 GRegex
 GMatchInfo
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The g_regex_*() functions implement regular -expression pattern matching using syntax and semantics similar to -Perl regular expression.

-

Some functions accept a start_position - argument, setting it differs -from just passing over a shortened string and setting G_REGEX_MATCH_NOTBOL -in the case of a pattern that begins with any kind of lookbehind assertion. -For example, consider the pattern "\Biss\B" which finds occurrences of "iss" -in the middle of words. ("\B" matches only if the current position in the -subject is not a word boundary.) When applied to the string "Mississipi" -from the fourth byte, namely "issipi", it does not match, because "\B" is -always false at the start of the subject, which is deemed to be a word -boundary. However, if the entire string is passed , but with -start_position - set to 4, it finds the second occurrence of "iss" because -it is able to look behind the starting point to discover that it is -preceded by a letter.

-

Note that, unless you set the G_REGEX_RAW flag, all the strings passed -to these functions must be encoded in UTF-8. The lengths and the positions -inside the strings are in bytes and not in characters, so, for instance, -"\xc3\xa0" (i.e. "à") is two bytes long but it is treated as a -single character. If you set G_REGEX_RAW the strings can be non-valid -UTF-8 strings and a byte is treated as a character, so "\xc3\xa0" is two -bytes and two characters long.

-

When matching a pattern, "\n" matches only against a "\n" character in -the string, and "\r" matches only a "\r" character. To match any newline -sequence use "\R". This particular group matches either the two-character -sequence CR + LF ("\r\n"), or one of the single characters LF (linefeed, -U+000A, "\n"), VT vertical tab, U+000B, "\v"), FF (formfeed, U+000C, "\f"), -CR (carriage return, U+000D, "\r"), NEL (next line, U+0085), LS (line -separator, U+2028), or PS (paragraph separator, U+2029).

-

The behaviour of the dot, circumflex, and dollar metacharacters are -affected by newline characters, the default is to recognize any newline -character (the same characters recognized by "\R"). This can be changed -with G_REGEX_NEWLINE_CR, G_REGEX_NEWLINE_LF and G_REGEX_NEWLINE_CRLF -compile options, and with G_REGEX_MATCH_NEWLINE_ANY, -G_REGEX_MATCH_NEWLINE_CR, G_REGEX_MATCH_NEWLINE_LF and -G_REGEX_MATCH_NEWLINE_CRLF match options. These settings are also -relevant when compiling a pattern if G_REGEX_EXTENDED is set, and an -unescaped "#" outside a character class is encountered. This indicates -a comment that lasts until after the next newline.

-

When setting the G_REGEX_JAVASCRIPT_COMPAT flag, pattern syntax and pattern -matching is changed to be compatible with the way that regular expressions -work in JavaScript. More precisely, a lonely ']' character in the pattern -is a syntax error; the '\x' escape only allows 0 to 2 hexadecimal digits, and -you must use the '\u' escape sequence with 4 hex digits to specify a unicode -codepoint instead of '\x' or 'x{....}'. If '\x' or '\u' are not followed by -the specified number of hex digits, they match 'x' and 'u' literally; also -'\U' always matches 'U' instead of being an error in the pattern. Finally, -pattern matching is modified so that back references to an unset subpattern -group produces a match with the empty string instead of an error. See -pcreapi(3) for more information.

-

Creating and manipulating the same GRegex structure from different -threads is not a problem as GRegex does not modify its internal -state between creation and destruction, on the other hand GMatchInfo -is not threadsafe.

-

The regular expressions low-level functionalities are obtained through -the excellent -PCRE -library written by Philip Hazel.

-
-
-

Functions

-
-

GRegexEvalCallback ()

-
gboolean
-(*GRegexEvalCallback) (const GMatchInfo *match_info,
-                       GString *result,
-                       gpointer user_data);
-

Specifies the type of the function passed to g_regex_replace_eval(). -It is called for each occurrence of the pattern in the string passed -to g_regex_replace_eval(), and it should append the replacement to -result -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

match_info

the GMatchInfo generated by the match. -Use g_match_info_get_regex() and g_match_info_get_string() if you -need the GRegex or the matched string.

 

result

a GString containing the new string

 

user_data

user data passed to g_regex_replace_eval()

 
-
-
-

Returns

-

FALSE to continue the replacement process, TRUE to stop it

-
-

Since: 2.14

-
-
-
-

g_regex_new ()

-
GRegex *
-g_regex_new (const gchar *pattern,
-             GRegexCompileFlags compile_options,
-             GRegexMatchFlags match_options,
-             GError **error);
-

Compiles the regular expression to an internal form, and does -the initial setup of the GRegex structure.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

pattern

the regular expression

 

compile_options

compile options for the regular expression, or 0

 

match_options

match options for the regular expression, or 0

 

error

return location for a GError

 
-
-
-

Returns

-

a GRegex structure or NULL if an error occured. Call -g_regex_unref() when you are done with it.

-

[nullable]

-
-

Since: 2.14

-
-
-
-

g_regex_ref ()

-
GRegex *
-g_regex_ref (GRegex *regex);
-

Increases reference count of regex - by 1.

-
-

Parameters

-
----- - - - - - -

regex

a GRegex

 
-
-
-

Returns

-

regex -

-
-

Since: 2.14

-
-
-
-

g_regex_unref ()

-
void
-g_regex_unref (GRegex *regex);
-

Decreases reference count of regex - by 1. When reference count drops -to zero, it frees all the memory associated with the regex structure.

-
-

Parameters

-
----- - - - - - -

regex

a GRegex

 
-
-

Since: 2.14

-
-
-
-

g_regex_get_pattern ()

-
const gchar *
-g_regex_get_pattern (const GRegex *regex);
-

Gets the pattern string associated with regex -, i.e. a copy of -the string passed to g_regex_new().

-
-

Parameters

-
----- - - - - - -

regex

a GRegex structure

 
-
-
-

Returns

-

the pattern of regex -

-
-

Since: 2.14

-
-
-
-

g_regex_get_max_backref ()

-
gint
-g_regex_get_max_backref (const GRegex *regex);
-

Returns the number of the highest back reference -in the pattern, or 0 if the pattern does not contain -back references.

-
-

Parameters

-
----- - - - - - -

regex

a GRegex

 
-
-
-

Returns

-

the number of the highest back reference

-
-

Since: 2.14

-
-
-
-

g_regex_get_capture_count ()

-
gint
-g_regex_get_capture_count (const GRegex *regex);
-

Returns the number of capturing subpatterns in the pattern.

-
-

Parameters

-
----- - - - - - -

regex

a GRegex

 
-
-
-

Returns

-

the number of capturing subpatterns

-
-

Since: 2.14

-
-
-
-

g_regex_get_has_cr_or_lf ()

-
gboolean
-g_regex_get_has_cr_or_lf (const GRegex *regex);
-

Checks whether the pattern contains explicit CR or LF references.

-
-

Parameters

-
----- - - - - - -

regex

a GRegex structure

 
-
-
-

Returns

-

TRUE if the pattern contains explicit CR or LF references

-
-

Since: 2.34

-
-
-
-

g_regex_get_max_lookbehind ()

-
gint
-g_regex_get_max_lookbehind (const GRegex *regex);
-

Gets the number of characters in the longest lookbehind assertion in the -pattern. This information is useful when doing multi-segment matching using -the partial matching facilities.

-
-

Parameters

-
----- - - - - - -

regex

a GRegex structure

 
-
-
-

Returns

-

the number of characters in the longest lookbehind assertion.

-
-

Since: 2.38

-
-
-
-

g_regex_get_string_number ()

-
gint
-g_regex_get_string_number (const GRegex *regex,
-                           const gchar *name);
-

Retrieves the number of the subexpression named name -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

regex

GRegex structure

 

name

name of the subexpression

 
-
-
-

Returns

-

The number of the subexpression or -1 if name -does not exists

-
-

Since: 2.14

-
-
-
-

g_regex_get_compile_flags ()

-
GRegexCompileFlags
-g_regex_get_compile_flags (const GRegex *regex);
-

Returns the compile options that regex - was created with.

-

Depending on the version of PCRE that is used, this may or may not -include flags set by option expressions such as (?i) found at the -top-level within the compiled pattern.

-
-

Parameters

-
----- - - - - - -

regex

a GRegex

 
-
-
-

Returns

-

flags from GRegexCompileFlags

-
-

Since: 2.26

-
-
-
-

g_regex_get_match_flags ()

-
GRegexMatchFlags
-g_regex_get_match_flags (const GRegex *regex);
-

Returns the match options that regex - was created with.

-
-

Parameters

-
----- - - - - - -

regex

a GRegex

 
-
-
-

Returns

-

flags from GRegexMatchFlags

-
-

Since: 2.26

-
-
-
-

g_regex_escape_string ()

-
gchar *
-g_regex_escape_string (const gchar *string,
-                       gint length);
-

Escapes the special characters used for regular expressions -in string -, for instance "a.b*c" becomes "a.b*c". This -function is useful to dynamically generate regular expressions.

-

string - can contain nul characters that are replaced with "\0", -in this case remember to specify the correct length of string - -in length -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

string

the string to escape.

[array length=length]

length

the length of string -, or -1 if string -is nul-terminated

 
-
-
-

Returns

-

a newly-allocated escaped string

-
-

Since: 2.14

-
-
-
-

g_regex_escape_nul ()

-
gchar *
-g_regex_escape_nul (const gchar *string,
-                    gint length);
-

Escapes the nul characters in string - to "\x00". It can be used -to compile a regex with embedded nul characters.

-

For completeness, length - can be -1 for a nul-terminated string. -In this case the output string will be of course equal to string -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

string

the string to escape

 

length

the length of string -

 
-
-
-

Returns

-

a newly-allocated escaped string

-
-

Since: 2.30

-
-
-
-

g_regex_match_simple ()

-
gboolean
-g_regex_match_simple (const gchar *pattern,
-                      const gchar *string,
-                      GRegexCompileFlags compile_options,
-                      GRegexMatchFlags match_options);
-

Scans for a match in string - for pattern -.

-

This function is equivalent to g_regex_match() but it does not -require to compile the pattern with g_regex_new(), avoiding some -lines of code when you need just to do a match without extracting -substrings, capture counts, and so on.

-

If this function is to be called on the same pattern - more than -once, it's more efficient to compile the pattern once with -g_regex_new() and then use g_regex_match().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

pattern

the regular expression

 

string

the string to scan for matches

 

compile_options

compile options for the regular expression, or 0

 

match_options

match options, or 0

 
-
-
-

Returns

-

TRUE if the string matched, FALSE otherwise

-
-

Since: 2.14

-
-
-
-

g_regex_match ()

-
gboolean
-g_regex_match (const GRegex *regex,
-               const gchar *string,
-               GRegexMatchFlags match_options,
-               GMatchInfo **match_info);
-

Scans for a match in string for the pattern in regex -. -The match_options - are combined with the match options specified -when the regex - structure was created, letting you have more -flexibility in reusing GRegex structures.

-

A GMatchInfo structure, used to get information on the match, -is stored in match_info - if not NULL. Note that if match_info - -is not NULL then it is created even if the function returns FALSE, -i.e. you must free it regardless if regular expression actually matched.

-

To retrieve all the non-overlapping matches of the pattern in -string you can use g_match_info_next().

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
static void
-print_uppercase_words (const gchar *string)
-{
-  // Print all uppercase-only words.
-  GRegex *regex;
-  GMatchInfo *match_info;
- 
-  regex = g_regex_new ("[A-Z]+", 0, 0, NULL);
-  g_regex_match (regex, string, 0, &match_info);
-  while (g_match_info_matches (match_info))
-    {
-      gchar *word = g_match_info_fetch (match_info, 0);
-      g_print ("Found: %s\n", word);
-      g_free (word);
-      g_match_info_next (match_info, NULL);
-    }
-  g_match_info_free (match_info);
-  g_regex_unref (regex);
-}
-
- -

-

string - is not copied and is used in GMatchInfo internally. If -you use any GMatchInfo method (except g_match_info_free()) after -freeing or modifying string - then the behaviour is undefined.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

regex

a GRegex structure from g_regex_new()

 

string

the string to scan for matches

 

match_options

match options

 

match_info

pointer to location where to store -the GMatchInfo, or NULL if you do not need it.

[out][optional]
-
-
-

Returns

-

TRUE is the string matched, FALSE otherwise

-
-

Since: 2.14

-
-
-
-

g_regex_match_full ()

-
gboolean
-g_regex_match_full (const GRegex *regex,
-                    const gchar *string,
-                    gssize string_len,
-                    gint start_position,
-                    GRegexMatchFlags match_options,
-                    GMatchInfo **match_info,
-                    GError **error);
-

Scans for a match in string for the pattern in regex -. -The match_options - are combined with the match options specified -when the regex - structure was created, letting you have more -flexibility in reusing GRegex structures.

-

Setting start_position - differs from just passing over a shortened -string and setting G_REGEX_MATCH_NOTBOL in the case of a pattern -that begins with any kind of lookbehind assertion, such as "\b".

-

A GMatchInfo structure, used to get information on the match, is -stored in match_info - if not NULL. Note that if match_info - is -not NULL then it is created even if the function returns FALSE, -i.e. you must free it regardless if regular expression actually -matched.

-

string - is not copied and is used in GMatchInfo internally. If -you use any GMatchInfo method (except g_match_info_free()) after -freeing or modifying string - then the behaviour is undefined.

-

To retrieve all the non-overlapping matches of the pattern in -string you can use g_match_info_next().

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
static void
-print_uppercase_words (const gchar *string)
-{
-  // Print all uppercase-only words.
-  GRegex *regex;
-  GMatchInfo *match_info;
-  GError *error = NULL;
-  
-  regex = g_regex_new ("[A-Z]+", 0, 0, NULL);
-  g_regex_match_full (regex, string, -1, 0, 0, &match_info, &error);
-  while (g_match_info_matches (match_info))
-    {
-      gchar *word = g_match_info_fetch (match_info, 0);
-      g_print ("Found: %s\n", word);
-      g_free (word);
-      g_match_info_next (match_info, &error);
-    }
-  g_match_info_free (match_info);
-  g_regex_unref (regex);
-  if (error != NULL)
-    {
-      g_printerr ("Error while matching: %s\n", error->message);
-      g_error_free (error);
-    }
-}
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

regex

a GRegex structure from g_regex_new()

 

string

the string to scan for matches.

[array length=string_len]

string_len

the length of string -, or -1 if string -is nul-terminated

 

start_position

starting index of the string to match, in bytes

 

match_options

match options

 

match_info

pointer to location where to store -the GMatchInfo, or NULL if you do not need it.

[out][optional]

error

location to store the error occurring, or NULL to ignore errors

 
-
-
-

Returns

-

TRUE is the string matched, FALSE otherwise

-
-

Since: 2.14

-
-
-
-

g_regex_match_all ()

-
gboolean
-g_regex_match_all (const GRegex *regex,
-                   const gchar *string,
-                   GRegexMatchFlags match_options,
-                   GMatchInfo **match_info);
-

Using the standard algorithm for regular expression matching only -the longest match in the string is retrieved. This function uses -a different algorithm so it can retrieve all the possible matches. -For more documentation see g_regex_match_all_full().

-

A GMatchInfo structure, used to get information on the match, is -stored in match_info - if not NULL. Note that if match_info - is -not NULL then it is created even if the function returns FALSE, -i.e. you must free it regardless if regular expression actually -matched.

-

string - is not copied and is used in GMatchInfo internally. If -you use any GMatchInfo method (except g_match_info_free()) after -freeing or modifying string - then the behaviour is undefined.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

regex

a GRegex structure from g_regex_new()

 

string

the string to scan for matches

 

match_options

match options

 

match_info

pointer to location where to store -the GMatchInfo, or NULL if you do not need it.

[out][optional]
-
-
-

Returns

-

TRUE is the string matched, FALSE otherwise

-
-

Since: 2.14

-
-
-
-

g_regex_match_all_full ()

-
gboolean
-g_regex_match_all_full (const GRegex *regex,
-                        const gchar *string,
-                        gssize string_len,
-                        gint start_position,
-                        GRegexMatchFlags match_options,
-                        GMatchInfo **match_info,
-                        GError **error);
-

Using the standard algorithm for regular expression matching only -the longest match in the string is retrieved, it is not possible -to obtain all the available matches. For instance matching -"<a> <b> <c>" against the pattern "<.*>" -you get "<a> <b> <c>".

-

This function uses a different algorithm (called DFA, i.e. deterministic -finite automaton), so it can retrieve all the possible matches, all -starting at the same point in the string. For instance matching -"<a> <b> <c>" against the pattern "<.*>;" -you would obtain three matches: "<a> <b> <c>", -"<a> <b>" and "<a>".

-

The number of matched strings is retrieved using -g_match_info_get_match_count(). To obtain the matched strings and -their position you can use, respectively, g_match_info_fetch() and -g_match_info_fetch_pos(). Note that the strings are returned in -reverse order of length; that is, the longest matching string is -given first.

-

Note that the DFA algorithm is slower than the standard one and it -is not able to capture substrings, so backreferences do not work.

-

Setting start_position - differs from just passing over a shortened -string and setting G_REGEX_MATCH_NOTBOL in the case of a pattern -that begins with any kind of lookbehind assertion, such as "\b".

-

A GMatchInfo structure, used to get information on the match, is -stored in match_info - if not NULL. Note that if match_info - is -not NULL then it is created even if the function returns FALSE, -i.e. you must free it regardless if regular expression actually -matched.

-

string - is not copied and is used in GMatchInfo internally. If -you use any GMatchInfo method (except g_match_info_free()) after -freeing or modifying string - then the behaviour is undefined.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

regex

a GRegex structure from g_regex_new()

 

string

the string to scan for matches.

[array length=string_len]

string_len

the length of string -, or -1 if string -is nul-terminated

 

start_position

starting index of the string to match, in bytes

 

match_options

match options

 

match_info

pointer to location where to store -the GMatchInfo, or NULL if you do not need it.

[out][optional]

error

location to store the error occurring, or NULL to ignore errors

 
-
-
-

Returns

-

TRUE is the string matched, FALSE otherwise

-
-

Since: 2.14

-
-
-
-

g_regex_split_simple ()

-
gchar **
-g_regex_split_simple (const gchar *pattern,
-                      const gchar *string,
-                      GRegexCompileFlags compile_options,
-                      GRegexMatchFlags match_options);
-

Breaks the string on the pattern, and returns an array of -the tokens. If the pattern contains capturing parentheses, -then the text for each of the substrings will also be returned. -If the pattern does not match anywhere in the string, then the -whole string is returned as the first token.

-

This function is equivalent to g_regex_split() but it does -not require to compile the pattern with g_regex_new(), avoiding -some lines of code when you need just to do a split without -extracting substrings, capture counts, and so on.

-

If this function is to be called on the same pattern - more than -once, it's more efficient to compile the pattern once with -g_regex_new() and then use g_regex_split().

-

As a special case, the result of splitting the empty string "" -is an empty vector, not a vector containing a single string. -The reason for this special case is that being able to represent -a empty vector is typically more useful than consistent handling -of empty elements. If you do need to represent empty elements, -you'll need to check for the empty string before calling this -function.

-

A pattern that can match empty strings splits string - into -separate characters wherever it matches the empty string between -characters. For example splitting "ab c" using as a separator -"\s*", you will get "a", "b" and "c".

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

pattern

the regular expression

 

string

the string to scan for matches

 

compile_options

compile options for the regular expression, or 0

 

match_options

match options, or 0

 
-
-
-

Returns

-

a NULL-terminated array of strings. Free -it using g_strfreev().

-

[transfer full]

-
-

Since: 2.14

-
-
-
-

g_regex_split ()

-
gchar **
-g_regex_split (const GRegex *regex,
-               const gchar *string,
-               GRegexMatchFlags match_options);
-

Breaks the string on the pattern, and returns an array of the tokens. -If the pattern contains capturing parentheses, then the text for each -of the substrings will also be returned. If the pattern does not match -anywhere in the string, then the whole string is returned as the first -token.

-

As a special case, the result of splitting the empty string "" is an -empty vector, not a vector containing a single string. The reason for -this special case is that being able to represent a empty vector is -typically more useful than consistent handling of empty elements. If -you do need to represent empty elements, you'll need to check for the -empty string before calling this function.

-

A pattern that can match empty strings splits string - into separate -characters wherever it matches the empty string between characters. -For example splitting "ab c" using as a separator "\s*", you will get -"a", "b" and "c".

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

regex

a GRegex structure

 

string

the string to split with the pattern

 

match_options

match time option flags

 
-
-
-

Returns

-

a NULL-terminated gchar ** array. Free -it using g_strfreev().

-

[transfer full]

-
-

Since: 2.14

-
-
-
-

g_regex_split_full ()

-
gchar **
-g_regex_split_full (const GRegex *regex,
-                    const gchar *string,
-                    gssize string_len,
-                    gint start_position,
-                    GRegexMatchFlags match_options,
-                    gint max_tokens,
-                    GError **error);
-

Breaks the string on the pattern, and returns an array of the tokens. -If the pattern contains capturing parentheses, then the text for each -of the substrings will also be returned. If the pattern does not match -anywhere in the string, then the whole string is returned as the first -token.

-

As a special case, the result of splitting the empty string "" is an -empty vector, not a vector containing a single string. The reason for -this special case is that being able to represent a empty vector is -typically more useful than consistent handling of empty elements. If -you do need to represent empty elements, you'll need to check for the -empty string before calling this function.

-

A pattern that can match empty strings splits string - into separate -characters wherever it matches the empty string between characters. -For example splitting "ab c" using as a separator "\s*", you will get -"a", "b" and "c".

-

Setting start_position - differs from just passing over a shortened -string and setting G_REGEX_MATCH_NOTBOL in the case of a pattern -that begins with any kind of lookbehind assertion, such as "\b".

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

regex

a GRegex structure

 

string

the string to split with the pattern.

[array length=string_len]

string_len

the length of string -, or -1 if string -is nul-terminated

 

start_position

starting index of the string to match, in bytes

 

match_options

match time option flags

 

max_tokens

the maximum number of tokens to split string -into. -If this is less than 1, the string is split completely

 

error

return location for a GError

 
-
-
-

Returns

-

a NULL-terminated gchar ** array. Free -it using g_strfreev().

-

[transfer full]

-
-

Since: 2.14

-
-
-
-

g_regex_replace ()

-
gchar *
-g_regex_replace (const GRegex *regex,
-                 const gchar *string,
-                 gssize string_len,
-                 gint start_position,
-                 const gchar *replacement,
-                 GRegexMatchFlags match_options,
-                 GError **error);
-

Replaces all occurrences of the pattern in regex - with the -replacement text. Backreferences of the form '\number' or -'\g<number>' in the replacement text are interpolated by the -number-th captured subexpression of the match, '\g<name>' refers -to the captured subexpression with the given name. '\0' refers -to the complete match, but '\0' followed by a number is the octal -representation of a character. To include a literal '\' in the -replacement, write '\'.

-

There are also escapes that changes the case of the following text:

-
    -
  • \l: Convert to lower case the next character

  • -
  • \u: Convert to upper case the next character

  • -
  • \L: Convert to lower case till \E

  • -
  • \U: Convert to upper case till \E

  • -
  • \E: End case modification

  • -
-

If you do not need to use backreferences use g_regex_replace_literal().

-

The replacement - string must be UTF-8 encoded even if G_REGEX_RAW was -passed to g_regex_new(). If you want to use not UTF-8 encoded stings -you can use g_regex_replace_literal().

-

Setting start_position - differs from just passing over a shortened -string and setting G_REGEX_MATCH_NOTBOL in the case of a pattern that -begins with any kind of lookbehind assertion, such as "\b".

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

regex

a GRegex structure

 

string

the string to perform matches against.

[array length=string_len]

string_len

the length of string -, or -1 if string -is nul-terminated

 

start_position

starting index of the string to match, in bytes

 

replacement

text to replace each match with

 

match_options

options for the match

 

error

location to store the error occurring, or NULL to ignore errors

 
-
-
-

Returns

-

a newly allocated string containing the replacements

-
-

Since: 2.14

-
-
-
-

g_regex_replace_literal ()

-
gchar *
-g_regex_replace_literal (const GRegex *regex,
-                         const gchar *string,
-                         gssize string_len,
-                         gint start_position,
-                         const gchar *replacement,
-                         GRegexMatchFlags match_options,
-                         GError **error);
-

Replaces all occurrences of the pattern in regex - with the -replacement text. replacement - is replaced literally, to -include backreferences use g_regex_replace().

-

Setting start_position - differs from just passing over a -shortened string and setting G_REGEX_MATCH_NOTBOL in the -case of a pattern that begins with any kind of lookbehind -assertion, such as "\b".

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

regex

a GRegex structure

 

string

the string to perform matches against.

[array length=string_len]

string_len

the length of string -, or -1 if string -is nul-terminated

 

start_position

starting index of the string to match, in bytes

 

replacement

text to replace each match with

 

match_options

options for the match

 

error

location to store the error occurring, or NULL to ignore errors

 
-
-
-

Returns

-

a newly allocated string containing the replacements

-
-

Since: 2.14

-
-
-
-

g_regex_replace_eval ()

-
gchar *
-g_regex_replace_eval (const GRegex *regex,
-                      const gchar *string,
-                      gssize string_len,
-                      gint start_position,
-                      GRegexMatchFlags match_options,
-                      GRegexEvalCallback eval,
-                      gpointer user_data,
-                      GError **error);
-

Replaces occurrences of the pattern in regex with the output of -eval - for that occurrence.

-

Setting start_position - differs from just passing over a shortened -string and setting G_REGEX_MATCH_NOTBOL in the case of a pattern -that begins with any kind of lookbehind assertion, such as "\b".

-

The following example uses g_regex_replace_eval() to replace multiple -strings at once:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
static gboolean
-eval_cb (const GMatchInfo *info,
-         GString          *res,
-         gpointer          data)
-{
-  gchar *match;
-  gchar *r;
-
-   match = g_match_info_fetch (info, 0);
-   r = g_hash_table_lookup ((GHashTable *)data, match);
-   g_string_append (res, r);
-   g_free (match);
-
-   return FALSE;
-}
-
-...
-
-GRegex *reg;
-GHashTable *h;
-gchar *res;
-
-h = g_hash_table_new (g_str_hash, g_str_equal);
-
-g_hash_table_insert (h, "1", "ONE");
-g_hash_table_insert (h, "2", "TWO");
-g_hash_table_insert (h, "3", "THREE");
-g_hash_table_insert (h, "4", "FOUR");
-
-reg = g_regex_new ("1|2|3|4", 0, 0, NULL);
-res = g_regex_replace_eval (reg, text, -1, 0, 0, eval_cb, h, NULL);
-g_hash_table_destroy (h);
-
-...
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

regex

a GRegex structure from g_regex_new()

 

string

string to perform matches against.

[array length=string_len]

string_len

the length of string -, or -1 if string -is nul-terminated

 

start_position

starting index of the string to match, in bytes

 

match_options

options for the match

 

eval

a function to call for each match

 

user_data

user data to pass to the function

 

error

location to store the error occurring, or NULL to ignore errors

 
-
-
-

Returns

-

a newly allocated string containing the replacements

-
-

Since: 2.14

-
-
-
-

g_regex_check_replacement ()

-
gboolean
-g_regex_check_replacement (const gchar *replacement,
-                           gboolean *has_references,
-                           GError **error);
-

Checks whether replacement - is a valid replacement string -(see g_regex_replace()), i.e. that all escape sequences in -it are valid.

-

If has_references - is not NULL then replacement - is checked -for pattern references. For instance, replacement text 'foo\n' -does not contain references and may be evaluated without information -about actual match, but '\0\1' (whole match followed by first -subpattern) requires valid GMatchInfo object.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

replacement

the replacement string

 

has_references

location to store information about -references in replacement -or NULL.

[out][optional]

error

location to store error

 
-
-
-

Returns

-

whether replacement -is a valid replacement string

-
-

Since: 2.14

-
-
-
-

g_match_info_get_regex ()

-
GRegex *
-g_match_info_get_regex (const GMatchInfo *match_info);
-

Returns GRegex object used in match_info -. It belongs to Glib -and must not be freed. Use g_regex_ref() if you need to keep it -after you free match_info - object.

-
-

Parameters

-
----- - - - - - -

match_info

a GMatchInfo

 
-
-
-

Returns

-

GRegex object used in match_info -

-
-

Since: 2.14

-
-
-
-

g_match_info_get_string ()

-
const gchar *
-g_match_info_get_string (const GMatchInfo *match_info);
-

Returns the string searched with match_info -. This is the -string passed to g_regex_match() or g_regex_replace() so -you may not free it before calling this function.

-
-

Parameters

-
----- - - - - - -

match_info

a GMatchInfo

 
-
-
-

Returns

-

the string searched with match_info -

-
-

Since: 2.14

-
-
-
-

g_match_info_ref ()

-
GMatchInfo *
-g_match_info_ref (GMatchInfo *match_info);
-

Increases reference count of match_info - by 1.

-
-

Parameters

-
----- - - - - - -

match_info

a GMatchInfo

 
-
-
-

Returns

-

match_info -

-
-

Since: 2.30

-
-
-
-

g_match_info_unref ()

-
void
-g_match_info_unref (GMatchInfo *match_info);
-

Decreases reference count of match_info - by 1. When reference count drops -to zero, it frees all the memory associated with the match_info structure.

-
-

Parameters

-
----- - - - - - -

match_info

a GMatchInfo

 
-
-

Since: 2.30

-
-
-
-

g_match_info_free ()

-
void
-g_match_info_free (GMatchInfo *match_info);
-

If match_info - is not NULL, calls g_match_info_unref(); otherwise does -nothing.

-
-

Parameters

-
----- - - - - - -

match_info

a GMatchInfo, or NULL.

[nullable]
-
-

Since: 2.14

-
-
-
-

g_match_info_matches ()

-
gboolean
-g_match_info_matches (const GMatchInfo *match_info);
-

Returns whether the previous match operation succeeded.

-
-

Parameters

-
----- - - - - - -

match_info

a GMatchInfo structure

 
-
-
-

Returns

-

TRUE if the previous match operation succeeded, -FALSE otherwise

-
-

Since: 2.14

-
-
-
-

g_match_info_next ()

-
gboolean
-g_match_info_next (GMatchInfo *match_info,
-                   GError **error);
-

Scans for the next match using the same parameters of the previous -call to g_regex_match_full() or g_regex_match() that returned -match_info -.

-

The match is done on the string passed to the match function, so you -cannot free it before calling this function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

match_info

a GMatchInfo structure

 

error

location to store the error occurring, or NULL to ignore errors

 
-
-
-

Returns

-

TRUE is the string matched, FALSE otherwise

-
-

Since: 2.14

-
-
-
-

g_match_info_get_match_count ()

-
gint
-g_match_info_get_match_count (const GMatchInfo *match_info);
-

Retrieves the number of matched substrings (including substring 0, -that is the whole matched text), so 1 is returned if the pattern -has no substrings in it and 0 is returned if the match failed.

-

If the last match was obtained using the DFA algorithm, that is -using g_regex_match_all() or g_regex_match_all_full(), the retrieved -count is not that of the number of capturing parentheses but that of -the number of matched substrings.

-
-

Parameters

-
----- - - - - - -

match_info

a GMatchInfo structure

 
-
-
-

Returns

-

Number of matched substrings, or -1 if an error occurred

-
-

Since: 2.14

-
-
-
-

g_match_info_is_partial_match ()

-
gboolean
-g_match_info_is_partial_match (const GMatchInfo *match_info);
-

Usually if the string passed to g_regex_match*() matches as far as -it goes, but is too short to match the entire pattern, FALSE is -returned. There are circumstances where it might be helpful to -distinguish this case from other cases in which there is no match.

-

Consider, for example, an application where a human is required to -type in data for a field with specific formatting requirements. An -example might be a date in the form ddmmmyy, defined by the pattern -"^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$". -If the application sees the user’s keystrokes one by one, and can -check that what has been typed so far is potentially valid, it is -able to raise an error as soon as a mistake is made.

-

GRegex supports the concept of partial matching by means of the -G_REGEX_MATCH_PARTIAL_SOFT and G_REGEX_MATCH_PARTIAL_HARD flags. -When they are used, the return code for -g_regex_match() or g_regex_match_full() is, as usual, TRUE -for a complete match, FALSE otherwise. But, when these functions -return FALSE, you can check if the match was partial calling -g_match_info_is_partial_match().

-

The difference between G_REGEX_MATCH_PARTIAL_SOFT and -G_REGEX_MATCH_PARTIAL_HARD is that when a partial match is encountered -with G_REGEX_MATCH_PARTIAL_SOFT, matching continues to search for a -possible complete match, while with G_REGEX_MATCH_PARTIAL_HARD matching -stops at the partial match. -When both G_REGEX_MATCH_PARTIAL_SOFT and G_REGEX_MATCH_PARTIAL_HARD -are set, the latter takes precedence.

-

There were formerly some restrictions on the pattern for partial matching. -The restrictions no longer apply.

-

See pcrepartial(3) for more information on partial matching.

-
-

Parameters

-
----- - - - - - -

match_info

a GMatchInfo structure

 
-
-
-

Returns

-

TRUE if the match was partial, FALSE otherwise

-
-

Since: 2.14

-
-
-
-

g_match_info_expand_references ()

-
gchar *
-g_match_info_expand_references (const GMatchInfo *match_info,
-                                const gchar *string_to_expand,
-                                GError **error);
-

Returns a new string containing the text in string_to_expand - with -references and escape sequences expanded. References refer to the last -match done with string - against regex - and have the same syntax used by -g_regex_replace().

-

The string_to_expand - must be UTF-8 encoded even if G_REGEX_RAW was -passed to g_regex_new().

-

The backreferences are extracted from the string passed to the match -function, so you cannot call this function after freeing the string.

-

match_info - may be NULL in which case string_to_expand - must not -contain references. For instance "foo\n" does not refer to an actual -pattern and '\n' merely will be replaced with \n character, -while to expand "\0" (whole match) one needs the result of a match. -Use g_regex_check_replacement() to find out whether string_to_expand - -contains references.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

match_info

a GMatchInfo or NULL.

[nullable]

string_to_expand

the string to expand

 

error

location to store the error occurring, or NULL to ignore errors

 
-
-
-

Returns

-

the expanded string, or NULL if an error occurred.

-

[nullable]

-
-

Since: 2.14

-
-
-
-

g_match_info_fetch ()

-
gchar *
-g_match_info_fetch (const GMatchInfo *match_info,
-                    gint match_num);
-

Retrieves the text matching the match_num -'th capturing -parentheses. 0 is the full text of the match, 1 is the first paren -set, 2 the second, and so on.

-

If match_num - is a valid sub pattern but it didn't match anything -(e.g. sub pattern 1, matching "b" against "(a)?b") then an empty -string is returned.

-

If the match was obtained using the DFA algorithm, that is using -g_regex_match_all() or g_regex_match_all_full(), the retrieved -string is not that of a set of parentheses but that of a matched -substring. Substrings are matched in reverse order of length, so -0 is the longest match.

-

The string is fetched from the string passed to the match function, -so you cannot call this function after freeing the string.

-
-

Parameters

-
----- - - - - - - - - - - - - -

match_info

GMatchInfo structure

 

match_num

number of the sub expression

 
-
-
-

Returns

-

The matched substring, or NULL if an error -occurred. You have to free the string yourself.

-

[nullable]

-
-

Since: 2.14

-
-
-
-

g_match_info_fetch_pos ()

-
gboolean
-g_match_info_fetch_pos (const GMatchInfo *match_info,
-                        gint match_num,
-                        gint *start_pos,
-                        gint *end_pos);
-

Retrieves the position in bytes of the match_num -'th capturing -parentheses. 0 is the full text of the match, 1 is the first -paren set, 2 the second, and so on.

-

If match_num - is a valid sub pattern but it didn't match anything -(e.g. sub pattern 1, matching "b" against "(a)?b") then start_pos - -and end_pos - are set to -1 and TRUE is returned.

-

If the match was obtained using the DFA algorithm, that is using -g_regex_match_all() or g_regex_match_all_full(), the retrieved -position is not that of a set of parentheses but that of a matched -substring. Substrings are matched in reverse order of length, so -0 is the longest match.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

match_info

GMatchInfo structure

 

match_num

number of the sub expression

 

start_pos

pointer to location where to store -the start position, or NULL.

[out][optional]

end_pos

pointer to location where to store -the end position, or NULL.

[out][optional]
-
-
-

Returns

-

TRUE if the position was fetched, FALSE otherwise. If -the position cannot be fetched, start_pos -and end_pos -are left -unchanged

-
-

Since: 2.14

-
-
-
-

g_match_info_fetch_named ()

-
gchar *
-g_match_info_fetch_named (const GMatchInfo *match_info,
-                          const gchar *name);
-

Retrieves the text matching the capturing parentheses named name -.

-

If name - is a valid sub pattern name but it didn't match anything -(e.g. sub pattern "X", matching "b" against "(?P<X>a)?b") -then an empty string is returned.

-

The string is fetched from the string passed to the match function, -so you cannot call this function after freeing the string.

-
-

Parameters

-
----- - - - - - - - - - - - - -

match_info

GMatchInfo structure

 

name

name of the subexpression

 
-
-
-

Returns

-

The matched substring, or NULL if an error -occurred. You have to free the string yourself.

-

[nullable]

-
-

Since: 2.14

-
-
-
-

g_match_info_fetch_named_pos ()

-
gboolean
-g_match_info_fetch_named_pos (const GMatchInfo *match_info,
-                              const gchar *name,
-                              gint *start_pos,
-                              gint *end_pos);
-

Retrieves the position in bytes of the capturing parentheses named name -.

-

If name - is a valid sub pattern name but it didn't match anything -(e.g. sub pattern "X", matching "b" against "(?P<X>a)?b") -then start_pos - and end_pos - are set to -1 and TRUE is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

match_info

GMatchInfo structure

 

name

name of the subexpression

 

start_pos

pointer to location where to store -the start position, or NULL.

[out][optional]

end_pos

pointer to location where to store -the end position, or NULL.

[out][optional]
-
-
-

Returns

-

TRUE if the position was fetched, FALSE otherwise. -If the position cannot be fetched, start_pos -and end_pos -are left unchanged.

-
-

Since: 2.14

-
-
-
-

g_match_info_fetch_all ()

-
gchar **
-g_match_info_fetch_all (const GMatchInfo *match_info);
-

Bundles up pointers to each of the matching substrings from a match -and stores them in an array of gchar pointers. The first element in -the returned array is the match number 0, i.e. the entire matched -text.

-

If a sub pattern didn't match anything (e.g. sub pattern 1, matching -"b" against "(a)?b") then an empty string is inserted.

-

If the last match was obtained using the DFA algorithm, that is using -g_regex_match_all() or g_regex_match_all_full(), the retrieved -strings are not that matched by sets of parentheses but that of the -matched substring. Substrings are matched in reverse order of length, -so the first one is the longest match.

-

The strings are fetched from the string passed to the match function, -so you cannot call this function after freeing the string.

-
-

Parameters

-
----- - - - - - -

match_info

a GMatchInfo structure

 
-
-
-

Returns

-

a NULL-terminated array of gchar * -pointers. It must be freed using g_strfreev(). If the previous -match failed NULL is returned.

-

[transfer full]

-
-

Since: 2.14

-
-
-
-

Types and Values

-
-

enum GRegexError

-

Error codes returned by regular expressions functions.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_REGEX_ERROR_COMPILE

-

Compilation of the regular expression failed.

-
 

G_REGEX_ERROR_OPTIMIZE

-

Optimization of the regular expression failed.

-
 

G_REGEX_ERROR_REPLACE

-

Replacement failed due to an ill-formed replacement - string.

-
 

G_REGEX_ERROR_MATCH

-

The match process failed.

-
 

G_REGEX_ERROR_INTERNAL

-

Internal error of the regular expression engine. - Since 2.16

-
 

G_REGEX_ERROR_STRAY_BACKSLASH

-

"\" at end of pattern. Since 2.16

-
 

G_REGEX_ERROR_MISSING_CONTROL_CHAR

-

"\c" at end of pattern. Since 2.16

-
 

G_REGEX_ERROR_UNRECOGNIZED_ESCAPE

-

Unrecognized character follows "\". - Since 2.16

-
 

G_REGEX_ERROR_QUANTIFIERS_OUT_OF_ORDER

-

Numbers out of order in "{}" - quantifier. Since 2.16

-
 

G_REGEX_ERROR_QUANTIFIER_TOO_BIG

-

Number too big in "{}" quantifier. - Since 2.16

-
 

G_REGEX_ERROR_UNTERMINATED_CHARACTER_CLASS

-

Missing terminating "]" for - character class. Since 2.16

-
 

G_REGEX_ERROR_INVALID_ESCAPE_IN_CHARACTER_CLASS

-

Invalid escape sequence - in character class. Since 2.16

-
 

G_REGEX_ERROR_RANGE_OUT_OF_ORDER

-

Range out of order in character class. - Since 2.16

-
 

G_REGEX_ERROR_NOTHING_TO_REPEAT

-

Nothing to repeat. Since 2.16

-
 

G_REGEX_ERROR_UNRECOGNIZED_CHARACTER

-

Unrecognized character after "(?", - "(?<" or "(?P". Since 2.16

-
 

G_REGEX_ERROR_POSIX_NAMED_CLASS_OUTSIDE_CLASS

-

POSIX named classes are - supported only within a class. Since 2.16

-
 

G_REGEX_ERROR_UNMATCHED_PARENTHESIS

-

Missing terminating ")" or ")" - without opening "(". Since 2.16

-
 

G_REGEX_ERROR_INEXISTENT_SUBPATTERN_REFERENCE

-

Reference to non-existent - subpattern. Since 2.16

-
 

G_REGEX_ERROR_UNTERMINATED_COMMENT

-

Missing terminating ")" after comment. - Since 2.16

-
 

G_REGEX_ERROR_EXPRESSION_TOO_LARGE

-

Regular expression too large. - Since 2.16

-
 

G_REGEX_ERROR_MEMORY_ERROR

-

Failed to get memory. Since 2.16

-
 

G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND

-

Lookbehind assertion is not - fixed length. Since 2.16

-
 

G_REGEX_ERROR_MALFORMED_CONDITION

-

Malformed number or name after "(?(". - Since 2.16

-
 

G_REGEX_ERROR_TOO_MANY_CONDITIONAL_BRANCHES

-

Conditional group contains - more than two branches. Since 2.16

-
 

G_REGEX_ERROR_ASSERTION_EXPECTED

-

Assertion expected after "(?(". - Since 2.16

-
 

G_REGEX_ERROR_UNKNOWN_POSIX_CLASS_NAME

-

Unknown POSIX class name. - Since 2.16

-
 

G_REGEX_ERROR_POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED

-

POSIX collating - elements are not supported. Since 2.16

-
 

G_REGEX_ERROR_HEX_CODE_TOO_LARGE

-

Character value in "\x{...}" sequence - is too large. Since 2.16

-
 

G_REGEX_ERROR_INVALID_CONDITION

-

Invalid condition "(?(0)". Since 2.16

-
 

G_REGEX_ERROR_SINGLE_BYTE_MATCH_IN_LOOKBEHIND

-

\C not allowed in - lookbehind assertion. Since 2.16

-
 

G_REGEX_ERROR_INFINITE_LOOP

-

Recursive call could loop indefinitely. - Since 2.16

-
 

G_REGEX_ERROR_MISSING_SUBPATTERN_NAME_TERMINATOR

-

Missing terminator - in subpattern name. Since 2.16

-
 

G_REGEX_ERROR_DUPLICATE_SUBPATTERN_NAME

-

Two named subpatterns have - the same name. Since 2.16

-
 

G_REGEX_ERROR_MALFORMED_PROPERTY

-

Malformed "\P" or "\p" sequence. - Since 2.16

-
 

G_REGEX_ERROR_UNKNOWN_PROPERTY

-

Unknown property name after "\P" or - "\p". Since 2.16

-
 

G_REGEX_ERROR_SUBPATTERN_NAME_TOO_LONG

-

Subpattern name is too long - (maximum 32 characters). Since 2.16

-
 

G_REGEX_ERROR_TOO_MANY_SUBPATTERNS

-

Too many named subpatterns (maximum - 10,000). Since 2.16

-
 

G_REGEX_ERROR_INVALID_OCTAL_VALUE

-

Octal value is greater than "\377". - Since 2.16

-
 

G_REGEX_ERROR_TOO_MANY_BRANCHES_IN_DEFINE

-

"DEFINE" group contains more - than one branch. Since 2.16

-
 

G_REGEX_ERROR_DEFINE_REPETION

-

Repeating a "DEFINE" group is not allowed. - This error is never raised. Since: 2.16 Deprecated: 2.34

-
 

G_REGEX_ERROR_INCONSISTENT_NEWLINE_OPTIONS

-

Inconsistent newline options. - Since 2.16

-
 

G_REGEX_ERROR_MISSING_BACK_REFERENCE

-

"\g" is not followed by a braced, - angle-bracketed, or quoted name or number, or by a plain number. Since: 2.16

-
 

G_REGEX_ERROR_INVALID_RELATIVE_REFERENCE

-

relative reference must not be zero. Since: 2.34

-
 

G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN

-

the backtracing - control verb used does not allow an argument. Since: 2.34

-
 

G_REGEX_ERROR_UNKNOWN_BACKTRACKING_CONTROL_VERB

-

unknown backtracing - control verb. Since: 2.34

-
 

G_REGEX_ERROR_NUMBER_TOO_BIG

-

number is too big in escape sequence. Since: 2.34

-
 

G_REGEX_ERROR_MISSING_SUBPATTERN_NAME

-

Missing subpattern name. Since: 2.34

-
 

G_REGEX_ERROR_MISSING_DIGIT

-

Missing digit. Since 2.34

-
 

G_REGEX_ERROR_INVALID_DATA_CHARACTER

-

In JavaScript compatibility mode, - "[" is an invalid data character. Since: 2.34

-
 

G_REGEX_ERROR_EXTRA_SUBPATTERN_NAME

-

different names for subpatterns of the - same number are not allowed. Since: 2.34

-
 

G_REGEX_ERROR_BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED

-

the backtracing control - verb requires an argument. Since: 2.34

-
 

G_REGEX_ERROR_INVALID_CONTROL_CHAR

-

"\c" must be followed by an ASCII - character. Since: 2.34

-
 

G_REGEX_ERROR_MISSING_NAME

-

"\k" is not followed by a braced, angle-bracketed, or - quoted name. Since: 2.34

-
 

G_REGEX_ERROR_NOT_SUPPORTED_IN_CLASS

-

"\N" is not supported in a class. Since: 2.34

-
 

G_REGEX_ERROR_TOO_MANY_FORWARD_REFERENCES

-

too many forward references. Since: 2.34

-
 

G_REGEX_ERROR_NAME_TOO_LONG

-

the name is too long in "(*MARK)", "(*PRUNE)", - "(*SKIP)", or "(*THEN)". Since: 2.34

-
 

G_REGEX_ERROR_CHARACTER_VALUE_TOO_LARGE

-

the character value in the \u sequence is - too large. Since: 2.34

-
 
-
-

Since: 2.14

-
-
-
-

G_REGEX_ERROR

-
#define G_REGEX_ERROR g_regex_error_quark ()
-
-

Error domain for regular expressions. Errors in this domain will be -from the GRegexError enumeration. See GError for information on -error domains.

-

Since: 2.14

-
-
-
-

enum GRegexCompileFlags

-

Flags specifying compile-time options.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_REGEX_CASELESS

-

Letters in the pattern match both upper- and - lowercase letters. This option can be changed within a pattern - by a "(?i)" option setting.

-
 

G_REGEX_MULTILINE

-

By default, GRegex treats the strings as consisting - of a single line of characters (even if it actually contains - newlines). The "start of line" metacharacter ("^") matches only - at the start of the string, while the "end of line" metacharacter - ("$") matches only at the end of the string, or before a terminating - newline (unless G_REGEX_DOLLAR_ENDONLY is set). When - G_REGEX_MULTILINE is set, the "start of line" and "end of line" - constructs match immediately following or immediately before any - newline in the string, respectively, as well as at the very start - and end. This can be changed within a pattern by a "(?m)" option - setting.

-
 

G_REGEX_DOTALL

-

A dot metacharater (".") in the pattern matches all - characters, including newlines. Without it, newlines are excluded. - This option can be changed within a pattern by a ("?s") option setting.

-
 

G_REGEX_EXTENDED

-

Whitespace data characters in the pattern are - totally ignored except when escaped or inside a character class. - Whitespace does not include the VT character (code 11). In addition, - characters between an unescaped "#" outside a character class and - the next newline character, inclusive, are also ignored. This can - be changed within a pattern by a "(?x)" option setting.

-
 

G_REGEX_ANCHORED

-

The pattern is forced to be "anchored", that is, - it is constrained to match only at the first matching point in the - string that is being searched. This effect can also be achieved by - appropriate constructs in the pattern itself such as the "^" - metacharater.

-
 

G_REGEX_DOLLAR_ENDONLY

-

A dollar metacharacter ("$") in the pattern - matches only at the end of the string. Without this option, a - dollar also matches immediately before the final character if - it is a newline (but not before any other newlines). This option - is ignored if G_REGEX_MULTILINE is set.

-
 

G_REGEX_UNGREEDY

-

Inverts the "greediness" of the quantifiers so that - they are not greedy by default, but become greedy if followed by "?". - It can also be set by a "(?U)" option setting within the pattern.

-
 

G_REGEX_RAW

-

Usually strings must be valid UTF-8 strings, using this - flag they are considered as a raw sequence of bytes.

-
 

G_REGEX_NO_AUTO_CAPTURE

-

Disables the use of numbered capturing - parentheses in the pattern. Any opening parenthesis that is not - followed by "?" behaves as if it were followed by "?:" but named - parentheses can still be used for capturing (and they acquire numbers - in the usual way).

-
 

G_REGEX_OPTIMIZE

-

Optimize the regular expression. If the pattern will - be used many times, then it may be worth the effort to optimize it - to improve the speed of matches.

-
 

G_REGEX_FIRSTLINE

-

Limits an unanchored pattern to match before (or at) the - first newline. Since: 2.34

-
 

G_REGEX_DUPNAMES

-

Names used to identify capturing subpatterns need not - be unique. This can be helpful for certain types of pattern when it - is known that only one instance of the named subpattern can ever be - matched.

-
 

G_REGEX_NEWLINE_CR

-

Usually any newline character or character sequence is - recognized. If this option is set, the only recognized newline character - is '\r'.

-
 

G_REGEX_NEWLINE_LF

-

Usually any newline character or character sequence is - recognized. If this option is set, the only recognized newline character - is '\n'.

-
 

G_REGEX_NEWLINE_CRLF

-

Usually any newline character or character sequence is - recognized. If this option is set, the only recognized newline character - sequence is '\r\n'.

-
 

G_REGEX_NEWLINE_ANYCRLF

-

Usually any newline character or character sequence - is recognized. If this option is set, the only recognized newline character - sequences are '\r', '\n', and '\r\n'. Since: 2.34

-
 

G_REGEX_BSR_ANYCRLF

-

Usually any newline character or character sequence - is recognised. If this option is set, then "\R" only recognizes the newline - characters '\r', '\n' and '\r\n'. Since: 2.34

-
 

G_REGEX_JAVASCRIPT_COMPAT

-

Changes behaviour so that it is compatible with - JavaScript rather than PCRE. Since: 2.34

-
 
-
-

Since: 2.14

-
-
-
-

enum GRegexMatchFlags

-

Flags specifying match-time options.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_REGEX_MATCH_ANCHORED

-

The pattern is forced to be "anchored", that is, - it is constrained to match only at the first matching point in the - string that is being searched. This effect can also be achieved by - appropriate constructs in the pattern itself such as the "^" - metacharater.

-
 

G_REGEX_MATCH_NOTBOL

-

Specifies that first character of the string is - not the beginning of a line, so the circumflex metacharacter should - not match before it. Setting this without G_REGEX_MULTILINE (at - compile time) causes circumflex never to match. This option affects - only the behaviour of the circumflex metacharacter, it does not - affect "\A".

-
 

G_REGEX_MATCH_NOTEOL

-

Specifies that the end of the subject string is - not the end of a line, so the dollar metacharacter should not match - it nor (except in multiline mode) a newline immediately before it. - Setting this without G_REGEX_MULTILINE (at compile time) causes - dollar never to match. This option affects only the behaviour of - the dollar metacharacter, it does not affect "\Z" or "\z".

-
 

G_REGEX_MATCH_NOTEMPTY

-

An empty string is not considered to be a valid - match if this option is set. If there are alternatives in the pattern, - they are tried. If all the alternatives match the empty string, the - entire match fails. For example, if the pattern "a?b?" is applied to - a string not beginning with "a" or "b", it matches the empty string - at the start of the string. With this flag set, this match is not - valid, so GRegex searches further into the string for occurrences - of "a" or "b".

-
 

G_REGEX_MATCH_PARTIAL

-

Turns on the partial matching feature, for more - documentation on partial matching see g_match_info_is_partial_match().

-
 

G_REGEX_MATCH_NEWLINE_CR

-

Overrides the newline definition set when - creating a new GRegex, setting the '\r' character as line terminator.

-
 

G_REGEX_MATCH_NEWLINE_LF

-

Overrides the newline definition set when - creating a new GRegex, setting the '\n' character as line terminator.

-
 

G_REGEX_MATCH_NEWLINE_CRLF

-

Overrides the newline definition set when - creating a new GRegex, setting the '\r\n' characters sequence as line terminator.

-
 

G_REGEX_MATCH_NEWLINE_ANY

-

Overrides the newline definition set when - creating a new GRegex, any Unicode newline sequence - is recognised as a newline. These are '\r', '\n' and '\rn', and the - single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), - U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and - U+2029 PARAGRAPH SEPARATOR.

-
 

G_REGEX_MATCH_NEWLINE_ANYCRLF

-

Overrides the newline definition set when - creating a new GRegex; any '\r', '\n', or '\r\n' character sequence - is recognized as a newline. Since: 2.34

-
 

G_REGEX_MATCH_BSR_ANYCRLF

-

Overrides the newline definition for "\R" set when - creating a new GRegex; only '\r', '\n', or '\r\n' character sequences - are recognized as a newline by "\R". Since: 2.34

-
 

G_REGEX_MATCH_BSR_ANY

-

Overrides the newline definition for "\R" set when - creating a new GRegex; any Unicode newline character or character sequence - are recognized as a newline by "\R". These are '\r', '\n' and '\rn', and the - single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), - U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and - U+2029 PARAGRAPH SEPARATOR. Since: 2.34

-
 

G_REGEX_MATCH_PARTIAL_SOFT

-

An alias for G_REGEX_MATCH_PARTIAL. Since: 2.34

-
 

G_REGEX_MATCH_PARTIAL_HARD

-

Turns on the partial matching feature. In contrast to - to G_REGEX_MATCH_PARTIAL_SOFT, this stops matching as soon as a partial match - is found, without continuing to search for a possible complete match. See - g_match_info_is_partial_match() for more information. Since: 2.34

-
 

G_REGEX_MATCH_NOTEMPTY_ATSTART

-

Like G_REGEX_MATCH_NOTEMPTY, but only applied to - the start of the matched string. For anchored - patterns this can only happen for pattern containing "\K". Since: 2.34

-
 
-
-

Since: 2.14

-
-
-
-

GRegex

-
typedef struct _GRegex GRegex;
-

A GRegex is the "compiled" form of a regular expression pattern. -This structure is opaque and its fields cannot be accessed directly.

-

Since: 2.14

-
-
-
-

GMatchInfo

-
typedef struct _GMatchInfo GMatchInfo;
-

A GMatchInfo is an opaque struct used to return information about -matches.

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Pointer-Arrays.html b/docs/reference/glib/html/glib-Pointer-Arrays.html deleted file mode 100644 index 8fa1e435e..000000000 --- a/docs/reference/glib/html/glib-Pointer-Arrays.html +++ /dev/null @@ -1,1046 +0,0 @@ - - - - -Pointer Arrays: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Pointer Arrays

-

Pointer Arrays — arrays of pointers to any type of data, which - grow automatically as new elements are added

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GPtrArray * - -g_ptr_array_new () -
-GPtrArray * - -g_ptr_array_sized_new () -
-GPtrArray * - -g_ptr_array_new_with_free_func () -
-GPtrArray * - -g_ptr_array_new_full () -
-void - -g_ptr_array_set_free_func () -
-GPtrArray * - -g_ptr_array_ref () -
-void - -g_ptr_array_unref () -
-void - -g_ptr_array_add () -
-void - -g_ptr_array_insert () -
-gboolean - -g_ptr_array_remove () -
-gpointer - -g_ptr_array_remove_index () -
-gboolean - -g_ptr_array_remove_fast () -
-gpointer - -g_ptr_array_remove_index_fast () -
-GPtrArray * - -g_ptr_array_remove_range () -
-void - -g_ptr_array_sort () -
-void - -g_ptr_array_sort_with_data () -
-void - -g_ptr_array_set_size () -
#define -g_ptr_array_index() -
-gpointer * - -g_ptr_array_free () -
-void - -g_ptr_array_foreach () -
-
-
-

Types and Values

-
---- - - - - -
structGPtrArray
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

Pointer Arrays are similar to Arrays but are used only for storing -pointers.

-

If you remove elements from the array, elements at the end of the -array are moved into the space previously occupied by the removed -element. This means that you should not rely on the index of particular -elements remaining the same. You should also be careful when deleting -elements while iterating over the array.

-

To create a pointer array, use g_ptr_array_new().

-

To add elements to a pointer array, use g_ptr_array_add().

-

To remove elements from a pointer array, use g_ptr_array_remove(), -g_ptr_array_remove_index() or g_ptr_array_remove_index_fast().

-

To access an element of a pointer array, use g_ptr_array_index().

-

To set the size of a pointer array, use g_ptr_array_set_size().

-

To free a pointer array, use g_ptr_array_free().

-

An example using a GPtrArray:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
GPtrArray *array;
-gchar *string1 = "one";
-gchar *string2 = "two";
-gchar *string3 = "three";
-
-array = g_ptr_array_new ();
-g_ptr_array_add (array, (gpointer) string1);
-g_ptr_array_add (array, (gpointer) string2);
-g_ptr_array_add (array, (gpointer) string3);
-
-if (g_ptr_array_index (array, 0) != (gpointer) string1)
-  g_print ("ERROR: got %p instead of %p\n",
-           g_ptr_array_index (array, 0), string1);
-
-g_ptr_array_free (array, TRUE);
-
- -

-
-
-

Functions

-
-

g_ptr_array_new ()

-
GPtrArray *
-g_ptr_array_new (void);
-

Creates a new GPtrArray with a reference count of 1.

-
-

Returns

-

the new GPtrArray

-
-
-
-
-

g_ptr_array_sized_new ()

-
GPtrArray *
-g_ptr_array_sized_new (guint reserved_size);
-

Creates a new GPtrArray with reserved_size - pointers preallocated -and a reference count of 1. This avoids frequent reallocation, if -you are going to add many pointers to the array. Note however that -the size of the array is still 0.

-
-

Parameters

-
----- - - - - - -

reserved_size

number of pointers preallocated

 
-
-
-

Returns

-

the new GPtrArray

-
-
-
-
-

g_ptr_array_new_with_free_func ()

-
GPtrArray *
-g_ptr_array_new_with_free_func (GDestroyNotify element_free_func);
-

Creates a new GPtrArray with a reference count of 1 and use -element_free_func - for freeing each element when the array is destroyed -either via g_ptr_array_unref(), when g_ptr_array_free() is called with -free_segment - set to TRUE or when removing elements.

-
-

Parameters

-
----- - - - - - -

element_free_func

A function to free elements with -destroy array -or NULL.

[nullable]
-
-
-

Returns

-

A new GPtrArray

-
-

Since: 2.22

-
-
-
-

g_ptr_array_new_full ()

-
GPtrArray *
-g_ptr_array_new_full (guint reserved_size,
-                      GDestroyNotify element_free_func);
-

Creates a new GPtrArray with reserved_size - pointers preallocated -and a reference count of 1. This avoids frequent reallocation, if -you are going to add many pointers to the array. Note however that -the size of the array is still 0. It also set element_free_func - -for freeing each element when the array is destroyed either via -g_ptr_array_unref(), when g_ptr_array_free() is called with -free_segment - set to TRUE or when removing elements.

-
-

Parameters

-
----- - - - - - - - - - - - - -

reserved_size

number of pointers preallocated

 

element_free_func

A function to free elements with -destroy array -or NULL.

[nullable]
-
-
-

Returns

-

A new GPtrArray

-
-

Since: 2.30

-
-
-
-

g_ptr_array_set_free_func ()

-
void
-g_ptr_array_set_free_func (GPtrArray *array,
-                           GDestroyNotify element_free_func);
-

Sets a function for freeing each element when array - is destroyed -either via g_ptr_array_unref(), when g_ptr_array_free() is called -with free_segment - set to TRUE or when removing elements.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

A GPtrArray

 

element_free_func

A function to free elements with -destroy array -or NULL.

[nullable]
-
-

Since: 2.22

-
-
-
-

g_ptr_array_ref ()

-
GPtrArray *
-g_ptr_array_ref (GPtrArray *array);
-

Atomically increments the reference count of array - by one. -This function is thread-safe and may be called from any thread.

-
-

Parameters

-
----- - - - - - -

array

a GPtrArray

 
-
-
-

Returns

-

The passed in GPtrArray

-
-

Since: 2.22

-
-
-
-

g_ptr_array_unref ()

-
void
-g_ptr_array_unref (GPtrArray *array);
-

Atomically decrements the reference count of array - by one. If the -reference count drops to 0, the effect is the same as calling -g_ptr_array_free() with free_segment - set to TRUE. This function -is MT-safe and may be called from any thread.

-
-

Parameters

-
----- - - - - - -

array

A GPtrArray

 
-
-

Since: 2.22

-
-
-
-

g_ptr_array_add ()

-
void
-g_ptr_array_add (GPtrArray *array,
-                 gpointer data);
-

Adds a pointer to the end of the pointer array. The array will grow -in size automatically if necessary.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GPtrArray

 

data

the pointer to add

 
-
-
-
-
-

g_ptr_array_insert ()

-
void
-g_ptr_array_insert (GPtrArray *array,
-                    gint index_,
-                    gpointer data);
-

Inserts an element into the pointer array at the given index. The -array will grow in size automatically if necessary.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

array

a GPtrArray

 

index_

the index to place the new element at, or -1 to append

 

data

the pointer to add.

 
-
-

Since: 2.40

-
-
-
-

g_ptr_array_remove ()

-
gboolean
-g_ptr_array_remove (GPtrArray *array,
-                    gpointer data);
-

Removes the first occurrence of the given pointer from the pointer -array. The following elements are moved down one place. If array - -has a non-NULL GDestroyNotify function it is called for the -removed element.

-

It returns TRUE if the pointer was removed, or FALSE if the -pointer was not found.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GPtrArray

 

data

the pointer to remove

 
-
-
-

Returns

-

TRUE if the pointer is removed, FALSE if the pointer -is not found in the array

-
-
-
-
-

g_ptr_array_remove_index ()

-
gpointer
-g_ptr_array_remove_index (GPtrArray *array,
-                          guint index_);
-

Removes the pointer at the given index from the pointer array. -The following elements are moved down one place. If array - has -a non-NULL GDestroyNotify function it is called for the removed -element.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GPtrArray

 

index_

the index of the pointer to remove

 
-
-
-

Returns

-

the pointer which was removed

-
-
-
-
-

g_ptr_array_remove_fast ()

-
gboolean
-g_ptr_array_remove_fast (GPtrArray *array,
-                         gpointer data);
-

Removes the first occurrence of the given pointer from the pointer -array. The last element in the array is used to fill in the space, -so this function does not preserve the order of the array. But it -is faster than g_ptr_array_remove(). If array - has a non-NULL -GDestroyNotify function it is called for the removed element.

-

It returns TRUE if the pointer was removed, or FALSE if the -pointer was not found.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GPtrArray

 

data

the pointer to remove

 
-
-
-

Returns

-

TRUE if the pointer was found in the array

-
-
-
-
-

g_ptr_array_remove_index_fast ()

-
gpointer
-g_ptr_array_remove_index_fast (GPtrArray *array,
-                               guint index_);
-

Removes the pointer at the given index from the pointer array. -The last element in the array is used to fill in the space, so -this function does not preserve the order of the array. But it -is faster than g_ptr_array_remove_index(). If array - has a non-NULL -GDestroyNotify function it is called for the removed element.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GPtrArray

 

index_

the index of the pointer to remove

 
-
-
-

Returns

-

the pointer which was removed

-
-
-
-
-

g_ptr_array_remove_range ()

-
GPtrArray *
-g_ptr_array_remove_range (GPtrArray *array,
-                          guint index_,
-                          guint length);
-

Removes the given number of pointers starting at the given index -from a GPtrArray. The following elements are moved to close the -gap. If array - has a non-NULL GDestroyNotify function it is -called for the removed elements.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

array

a GPtrArray -

 

index_

the index of the first pointer to remove

 

length

the number of pointers to remove

 
-
-
-

Returns

-

the array -

-
-

Since: 2.4

-
-
-
-

g_ptr_array_sort ()

-
void
-g_ptr_array_sort (GPtrArray *array,
-                  GCompareFunc compare_func);
-

Sorts the array, using compare_func - which should be a qsort()-style -comparison function (returns less than zero for first arg is less -than second arg, zero for equal, greater than zero if irst arg is -greater than second arg).

-

Note that the comparison function for g_ptr_array_sort() doesn't -take the pointers from the array as arguments, it takes pointers to -the pointers in the array.

-

This is guaranteed to be a stable sort since version 2.32.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GPtrArray

 

compare_func

comparison function

 
-
-
-
-
-

g_ptr_array_sort_with_data ()

-
void
-g_ptr_array_sort_with_data (GPtrArray *array,
-                            GCompareDataFunc compare_func,
-                            gpointer user_data);
-

Like g_ptr_array_sort(), but the comparison function has an extra -user data argument.

-

Note that the comparison function for g_ptr_array_sort_with_data() -doesn't take the pointers from the array as arguments, it takes -pointers to the pointers in the array.

-

This is guaranteed to be a stable sort since version 2.32.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

array

a GPtrArray

 

compare_func

comparison function

 

user_data

data to pass to compare_func -

 
-
-
-
-
-

g_ptr_array_set_size ()

-
void
-g_ptr_array_set_size (GPtrArray *array,
-                      gint length);
-

Sets the size of the array. When making the array larger, -newly-added elements will be set to NULL. When making it smaller, -if array - has a non-NULL GDestroyNotify function then it will be -called for the removed elements.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GPtrArray

 

length

the new length of the pointer array

 
-
-
-
-
-

g_ptr_array_index()

-
#define             g_ptr_array_index(array,index_)
-

Returns the pointer at the given index of the pointer array.

-

This does not perform bounds checking on the given index_ -, -so you are responsible for checking it against the array length.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GPtrArray

 

index_

the index of the pointer to return

 
-
-
-

Returns

-

the pointer at the given index

-
-
-
-
-

g_ptr_array_free ()

-
gpointer *
-g_ptr_array_free (GPtrArray *array,
-                  gboolean free_seg);
-

Frees the memory allocated for the GPtrArray. If free_seg - is TRUE -it frees the memory block holding the elements as well. Pass FALSE -if you want to free the GPtrArray wrapper but preserve the -underlying array for use elsewhere. If the reference count of array - -is greater than one, the GPtrArray wrapper is preserved but the -size of array - will be set to zero.

-

If array contents point to dynamically-allocated memory, they should -be freed separately if free_seg - is TRUE and no GDestroyNotify -function has been set for array -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

array

a GPtrArray

 

free_seg

if TRUE the actual pointer array is freed as well

 
-
-
-

Returns

-

the pointer array if free_seg -is FALSE, otherwise NULL. -The pointer array should be freed using g_free().

-
-
-
-
-

g_ptr_array_foreach ()

-
void
-g_ptr_array_foreach (GPtrArray *array,
-                     GFunc func,
-                     gpointer user_data);
-

Calls a function for each element of a GPtrArray.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

array

a GPtrArray

 

func

the function to call for each array element

 

user_data

user data to pass to the function

 
-
-

Since: 2.4

-
-
-
-

Types and Values

-
-

struct GPtrArray

-
struct GPtrArray {
-  gpointer *pdata;
-  guint	    len;
-};
-
-

Contains the public fields of a pointer array.

-
-

Members

-
----- - - - - - - - - - - - - -

gpointer *pdata;

points to the array of pointers, which may be moved when the -array grows

 

guint len;

number of pointers in the array

 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Quarks.html b/docs/reference/glib/html/glib-Quarks.html deleted file mode 100644 index fef28cb5c..000000000 --- a/docs/reference/glib/html/glib-Quarks.html +++ /dev/null @@ -1,371 +0,0 @@ - - - - -Quarks: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Quarks

-

Quarks — a 2-way association between a string and a - unique integer identifier

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -G_DEFINE_QUARK() -
-GQuark - -g_quark_from_string () -
-GQuark - -g_quark_from_static_string () -
const gchar * - -g_quark_to_string () -
-GQuark - -g_quark_try_string () -
const gchar * - -g_intern_string () -
const gchar * - -g_intern_static_string () -
-
-
-

Types and Values

-
---- - - - - -
typedefGQuark
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

Quarks are associations between strings and integer identifiers. -Given either the string or the GQuark identifier it is possible to -retrieve the other.

-

Quarks are used for both datasets and -keyed data lists.

-

To create a new quark from a string, use g_quark_from_string() or -g_quark_from_static_string().

-

To find the string corresponding to a given GQuark, use -g_quark_to_string().

-

To find the GQuark corresponding to a given string, use -g_quark_try_string().

-

Another use for the string pool maintained for the quark functions -is string interning, using g_intern_string() or -g_intern_static_string(). An interned string is a canonical -representation for a string. One important advantage of interned -strings is that they can be compared for equality by a simple -pointer comparison, rather than using strcmp().

-
-
-

Functions

-
-

G_DEFINE_QUARK()

-
#define             G_DEFINE_QUARK(QN, q_n)
-

A convenience macro which defines a function returning the -GQuark for the name QN -. The function will be named -q_n_quark() -.

-

Note that the quark name will be stringified automatically -in the macro, so you shouldn't use double quotes.

-
-

Parameters

-
----- - - - - - - - - - - - - -

QN

the name to return a GQuark for

 

q_n

prefix for the function name

 
-
-

Since: 2.34

-
-
-
-

g_quark_from_string ()

-
GQuark
-g_quark_from_string (const gchar *string);
-

Gets the GQuark identifying the given string. If the string does -not currently have an associated GQuark, a new GQuark is created, -using a copy of the string.

-
-

Parameters

-
----- - - - - - -

string

a string.

[nullable]
-
-
-

Returns

-

the GQuark identifying the string, or 0 if string -is NULL

-
-
-
-
-

g_quark_from_static_string ()

-
GQuark
-g_quark_from_static_string (const gchar *string);
-

Gets the GQuark identifying the given (static) string. If the -string does not currently have an associated GQuark, a new GQuark -is created, linked to the given string.

-

Note that this function is identical to g_quark_from_string() except -that if a new GQuark is created the string itself is used rather -than a copy. This saves memory, but can only be used if the string -will continue to exist until the program terminates. It can be used -with statically allocated strings in the main program, but not with -statically allocated memory in dynamically loaded modules, if you -expect to ever unload the module again (e.g. do not use this -function in GTK+ theme engines).

-
-

Parameters

-
----- - - - - - -

string

a string.

[nullable]
-
-
-

Returns

-

the GQuark identifying the string, or 0 if string -is NULL

-
-
-
-
-

g_quark_to_string ()

-
const gchar *
-g_quark_to_string (GQuark quark);
-

Gets the string associated with the given GQuark.

-
-

Parameters

-
----- - - - - - -

quark

a GQuark.

 
-
-
-

Returns

-

the string associated with the GQuark

-
-
-
-
-

g_quark_try_string ()

-
GQuark
-g_quark_try_string (const gchar *string);
-

Gets the GQuark associated with the given string, or 0 if string is -NULL or it has no associated GQuark.

-

If you want the GQuark to be created if it doesn't already exist, -use g_quark_from_string() or g_quark_from_static_string().

-
-

Parameters

-
----- - - - - - -

string

a string.

[nullable]
-
-
-

Returns

-

the GQuark associated with the string, or 0 if string -is -NULL or there is no GQuark associated with it

-
-
-
-
-

g_intern_string ()

-
const gchar *
-g_intern_string (const gchar *string);
-

Returns a canonical representation for string -. Interned strings -can be compared for equality by comparing the pointers, instead of -using strcmp().

-
-

Parameters

-
----- - - - - - -

string

a string.

[nullable]
-
-
-

Returns

-

a canonical representation for the string

-
-

Since: 2.10

-
-
-
-

g_intern_static_string ()

-
const gchar *
-g_intern_static_string (const gchar *string);
-

Returns a canonical representation for string -. Interned strings -can be compared for equality by comparing the pointers, instead of -using strcmp(). g_intern_static_string() does not copy the string, -therefore string - must not be freed or modified.

-
-

Parameters

-
----- - - - - - -

string

a static string.

[nullable]
-
-
-

Returns

-

a canonical representation for the string

-
-

Since: 2.10

-
-
-
-

Types and Values

-
-

GQuark

-
typedef guint32 GQuark;
-
-

A GQuark is a non-zero integer which uniquely identifies a -particular string. A GQuark value of zero is associated to NULL.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Random-Numbers.html b/docs/reference/glib/html/glib-Random-Numbers.html deleted file mode 100644 index a38ae5da8..000000000 --- a/docs/reference/glib/html/glib-Random-Numbers.html +++ /dev/null @@ -1,760 +0,0 @@ - - - - -Random Numbers: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Random Numbers

-

Random Numbers — pseudo-random number generator

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GRand * - -g_rand_new_with_seed () -
-GRand * - -g_rand_new_with_seed_array () -
-GRand * - -g_rand_new () -
-GRand * - -g_rand_copy () -
-void - -g_rand_free () -
-void - -g_rand_set_seed () -
-void - -g_rand_set_seed_array () -
#define -g_rand_boolean() -
-guint32 - -g_rand_int () -
-gint32 - -g_rand_int_range () -
-gdouble - -g_rand_double () -
-gdouble - -g_rand_double_range () -
-void - -g_random_set_seed () -
#defineg_random_boolean
-guint32 - -g_random_int () -
-gint32 - -g_random_int_range () -
-gdouble - -g_random_double () -
-gdouble - -g_random_double_range () -
-
-
-

Types and Values

-
---- - - - - -
 GRand
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The following functions allow you to use a portable, fast and good -pseudo-random number generator (PRNG).

-

Do not use this API for cryptographic purposes such as key -generation, nonces, salts or one-time pads.

-

This PRNG is suitable for non-cryptographic use such as in games -(shuffling a card deck, generating levels), generating data for -a test suite, etc. If you need random data for cryptographic -purposes, it is recommended to use platform-specific APIs such -as /dev/random on UNIX, or CryptGenRandom() on Windows.

-

GRand uses the Mersenne Twister PRNG, which was originally -developed by Makoto Matsumoto and Takuji Nishimura. Further -information can be found at -this page.

-

If you just need a random number, you simply call the g_random_* -functions, which will create a globally used GRand and use the -according g_rand_* functions internally. Whenever you need a -stream of reproducible random numbers, you better create a -GRand yourself and use the g_rand_* functions directly, which -will also be slightly faster. Initializing a GRand with a -certain seed will produce exactly the same series of random -numbers on all platforms. This can thus be used as a seed for -e.g. games.

-

The g_rand*_range functions will return high quality equally -distributed random numbers, whereas for example the -(g_random_int()%max) approach often -doesn't yield equally distributed numbers.

-

GLib changed the seeding algorithm for the pseudo-random number -generator Mersenne Twister, as used by GRand. This was necessary, -because some seeds would yield very bad pseudo-random streams. -Also the pseudo-random integers generated by g_rand*_int_range() -will have a slightly better equal distribution with the new -version of GLib.

-

The original seeding and generation algorithms, as found in -GLib 2.0.x, can be used instead of the new ones by setting the -environment variable G_RANDOM_VERSION to the value of '2.0'. -Use the GLib-2.0 algorithms only if you have sequences of numbers -generated with Glib-2.0 that you need to reproduce exactly.

-
-
-

Functions

-
-

g_rand_new_with_seed ()

-
GRand *
-g_rand_new_with_seed (guint32 seed);
-

Creates a new random number generator initialized with seed -.

-
-

Parameters

-
----- - - - - - -

seed

a value to initialize the random number generator

 
-
-
-

Returns

-

the new GRand

-
-
-
-
-

g_rand_new_with_seed_array ()

-
GRand *
-g_rand_new_with_seed_array (const guint32 *seed,
-                            guint seed_length);
-

Creates a new random number generator initialized with seed -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

seed

an array of seeds to initialize the random number generator

 

seed_length

an array of seeds to initialize the random number -generator

 
-
-
-

Returns

-

the new GRand

-
-

Since: 2.4

-
-
-
-

g_rand_new ()

-
GRand *
-g_rand_new (void);
-

Creates a new random number generator initialized with a seed taken -either from /dev/urandom (if existing) or from the current time -(as a fallback).

-

On Windows, the seed is taken from rand_s().

-
-

Returns

-

the new GRand

-
-
-
-
-

g_rand_copy ()

-
GRand *
-g_rand_copy (GRand *rand_);
-

Copies a GRand into a new one with the same exact state as before. -This way you can take a snapshot of the random number generator for -replaying later.

-
-

Parameters

-
----- - - - - - -

rand_

a GRand

 
-
-
-

Returns

-

the new GRand

-
-

Since: 2.4

-
-
-
-

g_rand_free ()

-
void
-g_rand_free (GRand *rand_);
-

Frees the memory allocated for the GRand.

-
-

Parameters

-
----- - - - - - -

rand_

a GRand

 
-
-
-
-
-

g_rand_set_seed ()

-
void
-g_rand_set_seed (GRand *rand_,
-                 guint32 seed);
-

Sets the seed for the random number generator GRand to seed -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

rand_

a GRand

 

seed

a value to reinitialize the random number generator

 
-
-
-
-
-

g_rand_set_seed_array ()

-
void
-g_rand_set_seed_array (GRand *rand_,
-                       const guint32 *seed,
-                       guint seed_length);
-

Initializes the random number generator by an array of longs. -Array can be of arbitrary size, though only the first 624 values -are taken. This function is useful if you have many low entropy -seeds, or if you require more then 32 bits of actual entropy for -your application.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

rand_

a GRand

 

seed

array to initialize with

 

seed_length

length of array

 
-
-

Since: 2.4

-
-
-
-

g_rand_boolean()

-
#define             g_rand_boolean(rand_)
-

Returns a random gboolean from rand_ -. -This corresponds to a unbiased coin toss.

-
-

Parameters

-
----- - - - - - -

rand_

a GRand

 
-
-
-

Returns

-

a random gboolean

-
-
-
-
-

g_rand_int ()

-
guint32
-g_rand_int (GRand *rand_);
-

Returns the next random guint32 from rand_ - equally distributed over -the range [0..2^32-1].

-
-

Parameters

-
----- - - - - - -

rand_

a GRand

 
-
-
-

Returns

-

a random number

-
-
-
-
-

g_rand_int_range ()

-
gint32
-g_rand_int_range (GRand *rand_,
-                  gint32 begin,
-                  gint32 end);
-

Returns the next random gint32 from rand_ - equally distributed over -the range [begin -..end --1].

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

rand_

a GRand

 

begin

lower closed bound of the interval

 

end

upper open bound of the interval

 
-
-
-

Returns

-

a random number

-
-
-
-
-

g_rand_double ()

-
gdouble
-g_rand_double (GRand *rand_);
-

Returns the next random gdouble from rand_ - equally distributed over -the range [0..1).

-
-

Parameters

-
----- - - - - - -

rand_

a GRand

 
-
-
-

Returns

-

a random number

-
-
-
-
-

g_rand_double_range ()

-
gdouble
-g_rand_double_range (GRand *rand_,
-                     gdouble begin,
-                     gdouble end);
-

Returns the next random gdouble from rand_ - equally distributed over -the range [begin -..end -).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

rand_

a GRand

 

begin

lower closed bound of the interval

 

end

upper open bound of the interval

 
-
-
-

Returns

-

a random number

-
-
-
-
-

g_random_set_seed ()

-
void
-g_random_set_seed (guint32 seed);
-

Sets the seed for the global random number generator, which is used -by the g_random_* functions, to seed -.

-
-

Parameters

-
----- - - - - - -

seed

a value to reinitialize the global random number generator

 
-
-
-
-
-

g_random_boolean

-
#define             g_random_boolean()
-

Returns a random gboolean. -This corresponds to a unbiased coin toss.

-
-

Returns

-

a random gboolean

-
-
-
-
-

g_random_int ()

-
guint32
-g_random_int (void);
-

Return a random guint32 equally distributed over the range -[0..2^32-1].

-
-

Returns

-

a random number

-
-
-
-
-

g_random_int_range ()

-
gint32
-g_random_int_range (gint32 begin,
-                    gint32 end);
-

Returns a random gint32 equally distributed over the range -[begin -..end --1].

-
-

Parameters

-
----- - - - - - - - - - - - - -

begin

lower closed bound of the interval

 

end

upper open bound of the interval

 
-
-
-

Returns

-

a random number

-
-
-
-
-

g_random_double ()

-
gdouble
-g_random_double (void);
-

Returns a random gdouble equally distributed over the range [0..1).

-
-

Returns

-

a random number

-
-
-
-
-

g_random_double_range ()

-
gdouble
-g_random_double_range (gdouble begin,
-                       gdouble end);
-

Returns a random gdouble equally distributed over the range -[begin -..end -).

-
-

Parameters

-
----- - - - - - - - - - - - - -

begin

lower closed bound of the interval

 

end

upper open bound of the interval

 
-
-
-

Returns

-

a random number

-
-
-
-
-

Types and Values

-
-

GRand

-
typedef struct _GRand GRand;
-

The GRand struct is an opaque data structure. It should only be -accessed through the g_rand_* functions.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Relations-and-Tuples.html b/docs/reference/glib/html/glib-Relations-and-Tuples.html deleted file mode 100644 index af5c650b1..000000000 --- a/docs/reference/glib/html/glib-Relations-and-Tuples.html +++ /dev/null @@ -1,653 +0,0 @@ - - - - -Relations and Tuples: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Relations and Tuples

-

Relations and Tuples — tables of data which can be indexed on any - number of fields

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GRelation * - -g_relation_new () -
-void - -g_relation_index () -
-void - -g_relation_insert () -
-gboolean - -g_relation_exists () -
-gint - -g_relation_count () -
-GTuples * - -g_relation_select () -
-gint - -g_relation_delete () -
-void - -g_relation_destroy () -
-void - -g_relation_print () -
-void - -g_tuples_destroy () -
-gpointer - -g_tuples_index () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GRelation
structGTuples
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

A GRelation is a table of data which can be indexed on any number -of fields, rather like simple database tables. A GRelation contains -a number of records, called tuples. Each record contains a number of -fields. Records are not ordered, so it is not possible to find the -record at a particular index.

-

Note that GRelation tables are currently limited to 2 fields.

-

To create a GRelation, use g_relation_new().

-

To specify which fields should be indexed, use g_relation_index(). -Note that this must be called before any tuples are added to the -GRelation.

-

To add records to a GRelation use g_relation_insert().

-

To determine if a given record appears in a GRelation, use -g_relation_exists(). Note that fields are compared directly, so -pointers must point to the exact same position (i.e. different -copies of the same string will not match.)

-

To count the number of records which have a particular value in a -given field, use g_relation_count().

-

To get all the records which have a particular value in a given -field, use g_relation_select(). To access fields of the resulting -records, use g_tuples_index(). To free the resulting records use -g_tuples_destroy().

-

To delete all records which have a particular value in a given -field, use g_relation_delete().

-

To destroy the GRelation, use g_relation_destroy().

-

To help debug GRelation objects, use g_relation_print().

-

GRelation has been marked as deprecated, since this API has never -been fully implemented, is not very actively maintained and rarely -used.

-
-
-

Functions

-
-

g_relation_new ()

-
GRelation *
-g_relation_new (gint fields);
-
-

g_relation_new has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Creates a new GRelation with the given number of fields. Note that -currently the number of fields must be 2.

-
-

Parameters

-
----- - - - - - -

fields

the number of fields.

 
-
-
-

Returns

-

a new GRelation.

-
-
-
-
-

g_relation_index ()

-
void
-g_relation_index (GRelation *relation,
-                  gint field,
-                  GHashFunc hash_func,
-                  GEqualFunc key_equal_func);
-
-

g_relation_index has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Creates an index on the given field. Note that this must be called -before any records are added to the GRelation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

relation

a GRelation.

 

field

the field to index, counting from 0.

 

hash_func

a function to produce a hash value from the field data.

 

key_equal_func

a function to compare two values of the given field.

 
-
-
-
-
-

g_relation_insert ()

-
void
-g_relation_insert (GRelation *relation,
-                   ...);
-
-

g_relation_insert has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Inserts a record into a GRelation.

-
-

Parameters

-
----- - - - - - - - - - - - - -

relation

a GRelation.

 

...

the fields of the record to add. These must match the -number of fields in the GRelation, and of type gpointer -or gconstpointer.

 
-
-
-
-
-

g_relation_exists ()

-
gboolean
-g_relation_exists (GRelation *relation,
-                   ...);
-
-

g_relation_exists has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Returns TRUE if a record with the given values exists in a -GRelation. Note that the values are compared directly, so that, for -example, two copies of the same string will not match.

-
-

Parameters

-
----- - - - - - - - - - - - - -

relation

a GRelation.

 

...

the fields of the record to compare. The number must match -the number of fields in the GRelation.

 
-
-
-

Returns

-

TRUE if a record matches.

-
-
-
-
-

g_relation_count ()

-
gint
-g_relation_count (GRelation *relation,
-                  gconstpointer key,
-                  gint field);
-
-

g_relation_count has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Returns the number of tuples in a GRelation that have the given -value in the given field.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

relation

a GRelation.

 

key

the value to compare with.

 

field

the field of each record to match.

 
-
-
-

Returns

-

the number of matches.

-
-
-
-
-

g_relation_select ()

-
GTuples *
-g_relation_select (GRelation *relation,
-                   gconstpointer key,
-                   gint field);
-
-

g_relation_select has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Returns all of the tuples which have the given key in the given -field. Use g_tuples_index() to access the returned records. The -returned records should be freed with g_tuples_destroy().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

relation

a GRelation.

 

key

the value to compare with.

 

field

the field of each record to match.

 
-
-
-

Returns

-

the records (tuples) that matched.

-
-
-
-
-

g_relation_delete ()

-
gint
-g_relation_delete (GRelation *relation,
-                   gconstpointer key,
-                   gint field);
-
-

g_relation_delete has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Deletes any records from a GRelation that have the given key value -in the given field.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

relation

a GRelation.

 

key

the value to compare with.

 

field

the field of each record to match.

 
-
-
-

Returns

-

the number of records deleted.

-
-
-
-
-

g_relation_destroy ()

-
void
-g_relation_destroy (GRelation *relation);
-
-

g_relation_destroy has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Destroys the GRelation, freeing all memory allocated. However, it -does not free memory allocated for the tuple data, so you should -free that first if appropriate.

-
-

Parameters

-
----- - - - - - -

relation

a GRelation.

 
-
-
-
-
-

g_relation_print ()

-
void
-g_relation_print (GRelation *relation);
-
-

g_relation_print has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Outputs information about all records in a GRelation, as well as -the indexes. It is for debugging.

-
-

Parameters

-
----- - - - - - -

relation

a GRelation.

 
-
-
-
-
-

g_tuples_destroy ()

-
void
-g_tuples_destroy (GTuples *tuples);
-
-

g_tuples_destroy has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Frees the records which were returned by g_relation_select(). This -should always be called after g_relation_select() when you are -finished with the records. The records are not removed from the -GRelation.

-
-

Parameters

-
----- - - - - - -

tuples

the tuple data to free.

 
-
-
-
-
-

g_tuples_index ()

-
gpointer
-g_tuples_index (GTuples *tuples,
-                gint index_,
-                gint field);
-
-

g_tuples_index has been deprecated since version 2.26 and should not be used in newly-written code.

-

Rarely used API

-
-

Gets a field from the records returned by g_relation_select(). It -returns the given field of the record at the given index. The -returned value should not be changed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

tuples

the tuple data, returned by g_relation_select().

 

index_

the index of the record.

 

field

the field to return.

 
-
-
-

Returns

-

the field of the record.

-
-
-
-
-

Types and Values

-
-

GRelation

-
typedef struct _GRelation GRelation;
-

The GRelation struct is an opaque data structure to represent a -Relation. It should -only be accessed via the following functions.

-
-
-
-

struct GTuples

-
struct GTuples {
-  guint len;
-};
-
-

The GTuples struct is used to return records (or tuples) from the -GRelation by g_relation_select(). It only contains one public -member - the number of records that matched. To access the matched -records, you must use g_tuples_index().

-
-

Members

-
----- - - - - - -

guint len;

the number of records that matched.

 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Sequences.html b/docs/reference/glib/html/glib-Sequences.html deleted file mode 100644 index 09e5d318b..000000000 --- a/docs/reference/glib/html/glib-Sequences.html +++ /dev/null @@ -1,2068 +0,0 @@ - - - - -Sequences: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Sequences

-

Sequences — scalable lists

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gint - -(*GSequenceIterCompareFunc) () -
-GSequence * - -g_sequence_new () -
-void - -g_sequence_free () -
-gint - -g_sequence_get_length () -
-gboolean - -g_sequence_is_empty () -
-void - -g_sequence_foreach () -
-void - -g_sequence_foreach_range () -
-void - -g_sequence_sort () -
-void - -g_sequence_sort_iter () -
-GSequenceIter * - -g_sequence_get_begin_iter () -
-GSequenceIter * - -g_sequence_get_end_iter () -
-GSequenceIter * - -g_sequence_get_iter_at_pos () -
-GSequenceIter * - -g_sequence_append () -
-GSequenceIter * - -g_sequence_prepend () -
-GSequenceIter * - -g_sequence_insert_before () -
-void - -g_sequence_move () -
-void - -g_sequence_swap () -
-GSequenceIter * - -g_sequence_insert_sorted () -
-GSequenceIter * - -g_sequence_insert_sorted_iter () -
-void - -g_sequence_sort_changed () -
-void - -g_sequence_sort_changed_iter () -
-void - -g_sequence_remove () -
-void - -g_sequence_remove_range () -
-void - -g_sequence_move_range () -
-GSequenceIter * - -g_sequence_search () -
-GSequenceIter * - -g_sequence_search_iter () -
-GSequenceIter * - -g_sequence_lookup () -
-GSequenceIter * - -g_sequence_lookup_iter () -
-gpointer - -g_sequence_get () -
-void - -g_sequence_set () -
-gboolean - -g_sequence_iter_is_begin () -
-gboolean - -g_sequence_iter_is_end () -
-GSequenceIter * - -g_sequence_iter_next () -
-GSequenceIter * - -g_sequence_iter_prev () -
-gint - -g_sequence_iter_get_position () -
-GSequenceIter * - -g_sequence_iter_move () -
-GSequence * - -g_sequence_iter_get_sequence () -
-gint - -g_sequence_iter_compare () -
-GSequenceIter * - -g_sequence_range_get_midpoint () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GSequence
typedefGSequenceIter
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The GSequence data structure has the API of a list, but is -implemented internally with a balanced binary tree. This means that -it is possible to maintain a sorted list of n elements in time O(n log n). -The data contained in each element can be either integer values, by using -of the Type Conversion Macros, or simply -pointers to any type of data.

-

A GSequence is accessed through "iterators", represented by a -GSequenceIter. An iterator represents a position between two -elements of the sequence. For example, the "begin" iterator -represents the gap immediately before the first element of the -sequence, and the "end" iterator represents the gap immediately -after the last element. In an empty sequence, the begin and end -iterators are the same.

-

Some methods on GSequence operate on ranges of items. For example -g_sequence_foreach_range() will call a user-specified function on -each element with the given range. The range is delimited by the -gaps represented by the passed-in iterators, so if you pass in the -begin and end iterators, the range in question is the entire -sequence.

-

The function g_sequence_get() is used with an iterator to access the -element immediately following the gap that the iterator represents. -The iterator is said to "point" to that element.

-

Iterators are stable across most operations on a GSequence. For -example an iterator pointing to some element of a sequence will -continue to point to that element even after the sequence is sorted. -Even moving an element to another sequence using for example -g_sequence_move_range() will not invalidate the iterators pointing -to it. The only operation that will invalidate an iterator is when -the element it points to is removed from any sequence.

-
-
-

Functions

-
-

GSequenceIterCompareFunc ()

-
gint
-(*GSequenceIterCompareFunc) (GSequenceIter *a,
-                             GSequenceIter *b,
-                             gpointer data);
-

A GSequenceIterCompareFunc is a function used to compare iterators. -It must return zero if the iterators compare equal, a negative value -if a - comes before b -, and a positive value if b - comes before a -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

a

a GSequenceIter

 

b

a GSequenceIter

 

data

user data

 
-
-
-

Returns

-

zero if the iterators are equal, a negative value if a -comes before b -, and a positive value if b -comes before a -.

-
-
-
-
-

g_sequence_new ()

-
GSequence *
-g_sequence_new (GDestroyNotify data_destroy);
-

Creates a new GSequence. The data_destroy - function, if non-NULL will -be called on all items when the sequence is destroyed and on items that -are removed from the sequence.

-
-

Parameters

-
----- - - - - - -

data_destroy

a GDestroyNotify function, or NULL.

[nullable]
-
-
-

Returns

-

a new GSequence

-
-

Since: 2.14

-
-
-
-

g_sequence_free ()

-
void
-g_sequence_free (GSequence *seq);
-

Frees the memory allocated for seq -. If seq - has a data destroy -function associated with it, that function is called on all items -in seq -.

-
-

Parameters

-
----- - - - - - -

seq

a GSequence

 
-
-

Since: 2.14

-
-
-
-

g_sequence_get_length ()

-
gint
-g_sequence_get_length (GSequence *seq);
-

Returns the length of seq -. Note that this method is O(h) where `h' is the -height of the tree. It is thus more efficient to use g_sequence_is_empty() -when comparing the length to zero.

-
-

Parameters

-
----- - - - - - -

seq

a GSequence

 
-
-
-

Returns

-

the length of seq -

-
-

Since: 2.14

-
-
-
-

g_sequence_is_empty ()

-
gboolean
-g_sequence_is_empty (GSequence *seq);
-

Returns TRUE if the sequence contains zero items.

-

This function is functionally identical to checking the result of -g_sequence_get_length() being equal to zero. However this function is -implemented in O(1) running time.

-
-

Parameters

-
----- - - - - - -

seq

a GSequence

 
-
-
-

Returns

-

TRUE if the sequence is empty, otherwise FALSE.

-
-

Since: 2.48

-
-
-
-

g_sequence_foreach ()

-
void
-g_sequence_foreach (GSequence *seq,
-                    GFunc func,
-                    gpointer user_data);
-

Calls func - for each item in the sequence passing user_data - -to the function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

seq

a GSequence

 

func

the function to call for each item in seq -

 

user_data

user data passed to func -

 
-
-

Since: 2.14

-
-
-
-

g_sequence_foreach_range ()

-
void
-g_sequence_foreach_range (GSequenceIter *begin,
-                          GSequenceIter *end,
-                          GFunc func,
-                          gpointer user_data);
-

Calls func - for each item in the range (begin -, end -) passing -user_data - to the function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

begin

a GSequenceIter

 

end

a GSequenceIter

 

func

a GFunc

 

user_data

user data passed to func -

 
-
-

Since: 2.14

-
-
-
-

g_sequence_sort ()

-
void
-g_sequence_sort (GSequence *seq,
-                 GCompareDataFunc cmp_func,
-                 gpointer cmp_data);
-

Sorts seq - using cmp_func -.

-

cmp_func - is passed two items of seq - and should -return 0 if they are equal, a negative value if the -first comes before the second, and a positive value -if the second comes before the first.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

seq

a GSequence

 

cmp_func

the function used to sort the sequence

 

cmp_data

user data passed to cmp_func -

 
-
-

Since: 2.14

-
-
-
-

g_sequence_sort_iter ()

-
void
-g_sequence_sort_iter (GSequence *seq,
-                      GSequenceIterCompareFunc cmp_func,
-                      gpointer cmp_data);
-

Like g_sequence_sort(), but uses a GSequenceIterCompareFunc instead -of a GCompareDataFunc as the compare function

-

cmp_func - is called with two iterators pointing into seq -. It should -return 0 if the iterators are equal, a negative value if the first -iterator comes before the second, and a positive value if the second -iterator comes before the first.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

seq

a GSequence

 

cmp_func

the function used to compare iterators in the sequence

 

cmp_data

user data passed to cmp_func -

 
-
-

Since: 2.14

-
-
-
-

g_sequence_get_begin_iter ()

-
GSequenceIter *
-g_sequence_get_begin_iter (GSequence *seq);
-

Returns the begin iterator for seq -.

-
-

Parameters

-
----- - - - - - -

seq

a GSequence

 
-
-
-

Returns

-

the begin iterator for seq -.

-
-

Since: 2.14

-
-
-
-

g_sequence_get_end_iter ()

-
GSequenceIter *
-g_sequence_get_end_iter (GSequence *seq);
-

Returns the end iterator for seg -

-
-

Parameters

-
----- - - - - - -

seq

a GSequence

 
-
-
-

Returns

-

the end iterator for seq -

-
-

Since: 2.14

-
-
-
-

g_sequence_get_iter_at_pos ()

-
GSequenceIter *
-g_sequence_get_iter_at_pos (GSequence *seq,
-                            gint pos);
-

Returns the iterator at position pos -. If pos - is negative or larger -than the number of items in seq -, the end iterator is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

seq

a GSequence

 

pos

a position in seq -, or -1 for the end

 
-
-
-

Returns

-

The GSequenceIter at position pos -

-
-

Since: 2.14

-
-
-
-

g_sequence_append ()

-
GSequenceIter *
-g_sequence_append (GSequence *seq,
-                   gpointer data);
-

Adds a new item to the end of seq -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

seq

a GSequence

 

data

the data for the new item

 
-
-
-

Returns

-

an iterator pointing to the new item

-
-

Since: 2.14

-
-
-
-

g_sequence_prepend ()

-
GSequenceIter *
-g_sequence_prepend (GSequence *seq,
-                    gpointer data);
-

Adds a new item to the front of seq -

-
-

Parameters

-
----- - - - - - - - - - - - - -

seq

a GSequence

 

data

the data for the new item

 
-
-
-

Returns

-

an iterator pointing to the new item

-
-

Since: 2.14

-
-
-
-

g_sequence_insert_before ()

-
GSequenceIter *
-g_sequence_insert_before (GSequenceIter *iter,
-                          gpointer data);
-

Inserts a new item just before the item pointed to by iter -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

iter

a GSequenceIter

 

data

the data for the new item

 
-
-
-

Returns

-

an iterator pointing to the new item

-
-

Since: 2.14

-
-
-
-

g_sequence_move ()

-
void
-g_sequence_move (GSequenceIter *src,
-                 GSequenceIter *dest);
-

Moves the item pointed to by src - to the position indicated by dest -. -After calling this function dest - will point to the position immediately -after src -. It is allowed for src - and dest - to point into different -sequences.

-
-

Parameters

-
----- - - - - - - - - - - - - -

src

a GSequenceIter pointing to the item to move

 

dest

a GSequenceIter pointing to the position to which -the item is moved

 
-
-

Since: 2.14

-
-
-
-

g_sequence_swap ()

-
void
-g_sequence_swap (GSequenceIter *a,
-                 GSequenceIter *b);
-

Swaps the items pointed to by a - and b -. It is allowed for a - and b - -to point into difference sequences.

-
-

Parameters

-
----- - - - - - - - - - - - - -

a

a GSequenceIter

 

b

a GSequenceIter

 
-
-

Since: 2.14

-
-
-
-

g_sequence_insert_sorted ()

-
GSequenceIter *
-g_sequence_insert_sorted (GSequence *seq,
-                          gpointer data,
-                          GCompareDataFunc cmp_func,
-                          gpointer cmp_data);
-

Inserts data - into sequence - using func - to determine the new -position. The sequence must already be sorted according to cmp_func -; -otherwise the new position of data - is undefined.

-

cmp_func - is called with two items of the seq - and user_data -. -It should return 0 if the items are equal, a negative value -if the first item comes before the second, and a positive value -if the second item comes before the first.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

seq

a GSequence

 

data

the data to insert

 

cmp_func

the function used to compare items in the sequence

 

cmp_data

user data passed to cmp_func -.

 
-
-
-

Returns

-

a GSequenceIter pointing to the new item.

-
-

Since: 2.14

-
-
-
-

g_sequence_insert_sorted_iter ()

-
GSequenceIter *
-g_sequence_insert_sorted_iter (GSequence *seq,
-                               gpointer data,
-                               GSequenceIterCompareFunc iter_cmp,
-                               gpointer cmp_data);
-

Like g_sequence_insert_sorted(), but uses -a GSequenceIterCompareFunc instead of a GCompareDataFunc as -the compare function.

-

iter_cmp - is called with two iterators pointing into seq -. -It should return 0 if the iterators are equal, a negative -value if the first iterator comes before the second, and a -positive value if the second iterator comes before the first.

-

It is called with two iterators pointing into seq -. It should -return 0 if the iterators are equal, a negative value if the -first iterator comes before the second, and a positive value -if the second iterator comes before the first.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

seq

a GSequence

 

data

data for the new item

 

iter_cmp

the function used to compare iterators in the sequence

 

cmp_data

user data passed to cmp_func -

 
-
-
-

Returns

-

a GSequenceIter pointing to the new item

-
-

Since: 2.14

-
-
-
-

g_sequence_sort_changed ()

-
void
-g_sequence_sort_changed (GSequenceIter *iter,
-                         GCompareDataFunc cmp_func,
-                         gpointer cmp_data);
-

Moves the data pointed to a new position as indicated by cmp_func -. This -function should be called for items in a sequence already sorted according -to cmp_func - whenever some aspect of an item changes so that cmp_func - -may return different values for that item.

-

cmp_func - is called with two items of the seq - and user_data -. -It should return 0 if the items are equal, a negative value if -the first item comes before the second, and a positive value if -the second item comes before the first.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

iter

A GSequenceIter

 

cmp_func

the function used to compare items in the sequence

 

cmp_data

user data passed to cmp_func -.

 
-
-

Since: 2.14

-
-
-
-

g_sequence_sort_changed_iter ()

-
void
-g_sequence_sort_changed_iter (GSequenceIter *iter,
-                              GSequenceIterCompareFunc iter_cmp,
-                              gpointer cmp_data);
-

Like g_sequence_sort_changed(), but uses -a GSequenceIterCompareFunc instead of a GCompareDataFunc as -the compare function.

-

iter_cmp - is called with two iterators pointing into seq -. It should -return 0 if the iterators are equal, a negative value if the first -iterator comes before the second, and a positive value if the second -iterator comes before the first.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

iter

a GSequenceIter

 

iter_cmp

the function used to compare iterators in the sequence

 

cmp_data

user data passed to cmp_func -

 
-
-

Since: 2.14

-
-
-
-

g_sequence_remove ()

-
void
-g_sequence_remove (GSequenceIter *iter);
-

Removes the item pointed to by iter -. It is an error to pass the -end iterator to this function.

-

If the sequence has a data destroy function associated with it, this -function is called on the data for the removed item.

-
-

Parameters

-
----- - - - - - -

iter

a GSequenceIter

 
-
-

Since: 2.14

-
-
-
-

g_sequence_remove_range ()

-
void
-g_sequence_remove_range (GSequenceIter *begin,
-                         GSequenceIter *end);
-

Removes all items in the (begin -, end -) range.

-

If the sequence has a data destroy function associated with it, this -function is called on the data for the removed items.

-
-

Parameters

-
----- - - - - - - - - - - - - -

begin

a GSequenceIter

 

end

a GSequenceIter

 
-
-

Since: 2.14

-
-
-
-

g_sequence_move_range ()

-
void
-g_sequence_move_range (GSequenceIter *dest,
-                       GSequenceIter *begin,
-                       GSequenceIter *end);
-

Inserts the (begin -, end -) range at the destination pointed to by ptr. -The begin - and end - iters must point into the same sequence. It is -allowed for dest - to point to a different sequence than the one pointed -into by begin - and end -.

-

If dest - is NULL, the range indicated by begin - and end - is -removed from the sequence. If dest - iter points to a place within -the (begin -, end -) range, the range does not move.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dest

a GSequenceIter

 

begin

a GSequenceIter

 

end

a GSequenceIter

 
-
-

Since: 2.14

-
-
-
-

g_sequence_search ()

-
GSequenceIter *
-g_sequence_search (GSequence *seq,
-                   gpointer data,
-                   GCompareDataFunc cmp_func,
-                   gpointer cmp_data);
-

Returns an iterator pointing to the position where data - would -be inserted according to cmp_func - and cmp_data -.

-

cmp_func - is called with two items of the seq - and user_data -. -It should return 0 if the items are equal, a negative value if -the first item comes before the second, and a positive value if -the second item comes before the first.

-

If you are simply searching for an existing element of the sequence, -consider using g_sequence_lookup().

-

This function will fail if the data contained in the sequence is -unsorted. Use g_sequence_insert_sorted() or -g_sequence_insert_sorted_iter() to add data to your sequence or, if -you want to add a large amount of data, call g_sequence_sort() after -doing unsorted insertions.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

seq

a GSequence

 

data

data for the new item

 

cmp_func

the function used to compare items in the sequence

 

cmp_data

user data passed to cmp_func -

 
-
-
-

Returns

-

an GSequenceIter pointing to the position where data -would have been inserted according to cmp_func -and cmp_data -

-
-

Since: 2.14

-
-
-
-

g_sequence_search_iter ()

-
GSequenceIter *
-g_sequence_search_iter (GSequence *seq,
-                        gpointer data,
-                        GSequenceIterCompareFunc iter_cmp,
-                        gpointer cmp_data);
-

Like g_sequence_search(), but uses a GSequenceIterCompareFunc -instead of a GCompareDataFunc as the compare function.

-

iter_cmp - is called with two iterators pointing into seq -. -It should return 0 if the iterators are equal, a negative value -if the first iterator comes before the second, and a positive -value if the second iterator comes before the first.

-

If you are simply searching for an existing element of the sequence, -consider using g_sequence_lookup_iter().

-

This function will fail if the data contained in the sequence is -unsorted. Use g_sequence_insert_sorted() or -g_sequence_insert_sorted_iter() to add data to your sequence or, if -you want to add a large amount of data, call g_sequence_sort() after -doing unsorted insertions.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

seq

a GSequence

 

data

data for the new item

 

iter_cmp

the function used to compare iterators in the sequence

 

cmp_data

user data passed to iter_cmp -

 
-
-
-

Returns

-

a GSequenceIter pointing to the position in seq -where data -would have been inserted according to iter_cmp -and cmp_data -

-
-

Since: 2.14

-
-
-
-

g_sequence_lookup ()

-
GSequenceIter *
-g_sequence_lookup (GSequence *seq,
-                   gpointer data,
-                   GCompareDataFunc cmp_func,
-                   gpointer cmp_data);
-

Returns an iterator pointing to the position of the first item found -equal to data - according to cmp_func - and cmp_data -. If more than one -item is equal, it is not guaranteed that it is the first which is -returned. In that case, you can use g_sequence_iter_next() and -g_sequence_iter_prev() to get others.

-

cmp_func - is called with two items of the seq - and user_data -. -It should return 0 if the items are equal, a negative value if -the first item comes before the second, and a positive value if -the second item comes before the first.

-

This function will fail if the data contained in the sequence is -unsorted. Use g_sequence_insert_sorted() or -g_sequence_insert_sorted_iter() to add data to your sequence or, if -you want to add a large amount of data, call g_sequence_sort() after -doing unsorted insertions.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

seq

a GSequence

 

data

data to lookup

 

cmp_func

the function used to compare items in the sequence

 

cmp_data

user data passed to cmp_func -

 
-
-
-

Returns

-

an GSequenceIter pointing to the position of the -first item found equal to data -according to cmp_func -and -cmp_data -, or NULL if no such item exists

-
-

Since: 2.28

-
-
-
-

g_sequence_lookup_iter ()

-
GSequenceIter *
-g_sequence_lookup_iter (GSequence *seq,
-                        gpointer data,
-                        GSequenceIterCompareFunc iter_cmp,
-                        gpointer cmp_data);
-

Like g_sequence_lookup(), but uses a GSequenceIterCompareFunc -instead of a GCompareDataFunc as the compare function.

-

iter_cmp - is called with two iterators pointing into seq -. -It should return 0 if the iterators are equal, a negative value -if the first iterator comes before the second, and a positive -value if the second iterator comes before the first.

-

This function will fail if the data contained in the sequence is -unsorted. Use g_sequence_insert_sorted() or -g_sequence_insert_sorted_iter() to add data to your sequence or, if -you want to add a large amount of data, call g_sequence_sort() after -doing unsorted insertions.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

seq

a GSequence

 

data

data to lookup

 

iter_cmp

the function used to compare iterators in the sequence

 

cmp_data

user data passed to iter_cmp -

 
-
-
-

Returns

-

an GSequenceIter pointing to the position of -the first item found equal to data -according to cmp_func -and cmp_data -, or NULL if no such item exists

-
-

Since: 2.28

-
-
-
-

g_sequence_get ()

-
gpointer
-g_sequence_get (GSequenceIter *iter);
-

Returns the data that iter - points to.

-
-

Parameters

-
----- - - - - - -

iter

a GSequenceIter

 
-
-
-

Returns

-

the data that iter -points to

-
-

Since: 2.14

-
-
-
-

g_sequence_set ()

-
void
-g_sequence_set (GSequenceIter *iter,
-                gpointer data);
-

Changes the data for the item pointed to by iter - to be data -. If -the sequence has a data destroy function associated with it, that -function is called on the existing data that iter - pointed to.

-
-

Parameters

-
----- - - - - - - - - - - - - -

iter

a GSequenceIter

 

data

new data for the item

 
-
-

Since: 2.14

-
-
-
-

g_sequence_iter_is_begin ()

-
gboolean
-g_sequence_iter_is_begin (GSequenceIter *iter);
-

Returns whether iter - is the begin iterator

-
-

Parameters

-
----- - - - - - -

iter

a GSequenceIter

 
-
-
-

Returns

-

whether iter -is the begin iterator

-
-

Since: 2.14

-
-
-
-

g_sequence_iter_is_end ()

-
gboolean
-g_sequence_iter_is_end (GSequenceIter *iter);
-

Returns whether iter - is the end iterator

-
-

Parameters

-
----- - - - - - -

iter

a GSequenceIter

 
-
-
-

Returns

-

Whether iter -is the end iterator

-
-

Since: 2.14

-
-
-
-

g_sequence_iter_next ()

-
GSequenceIter *
-g_sequence_iter_next (GSequenceIter *iter);
-

Returns an iterator pointing to the next position after iter -. -If iter - is the end iterator, the end iterator is returned.

-
-

Parameters

-
----- - - - - - -

iter

a GSequenceIter

 
-
-
-

Returns

-

a GSequenceIter pointing to the next position after iter -

-
-

Since: 2.14

-
-
-
-

g_sequence_iter_prev ()

-
GSequenceIter *
-g_sequence_iter_prev (GSequenceIter *iter);
-

Returns an iterator pointing to the previous position before iter -. -If iter - is the begin iterator, the begin iterator is returned.

-
-

Parameters

-
----- - - - - - -

iter

a GSequenceIter

 
-
-
-

Returns

-

a GSequenceIter pointing to the previous position -before iter -

-
-

Since: 2.14

-
-
-
-

g_sequence_iter_get_position ()

-
gint
-g_sequence_iter_get_position (GSequenceIter *iter);
-

Returns the position of iter -

-
-

Parameters

-
----- - - - - - -

iter

a GSequenceIter

 
-
-
-

Returns

-

the position of iter -

-
-

Since: 2.14

-
-
-
-

g_sequence_iter_move ()

-
GSequenceIter *
-g_sequence_iter_move (GSequenceIter *iter,
-                      gint delta);
-

Returns the GSequenceIter which is delta - positions away from iter -. -If iter - is closer than -delta - positions to the beginning of the sequence, -the begin iterator is returned. If iter - is closer than delta - positions -to the end of the sequence, the end iterator is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

iter

a GSequenceIter

 

delta

A positive or negative number indicating how many positions away -from iter -the returned GSequenceIter will be

 
-
-
-

Returns

-

a GSequenceIter which is delta -positions away from iter -

-
-

Since: 2.14

-
-
-
-

g_sequence_iter_get_sequence ()

-
GSequence *
-g_sequence_iter_get_sequence (GSequenceIter *iter);
-

Returns the GSequence that iter - points into.

-
-

Parameters

-
----- - - - - - -

iter

a GSequenceIter

 
-
-
-

Returns

-

the GSequence that iter -points into

-
-

Since: 2.14

-
-
-
-

g_sequence_iter_compare ()

-
gint
-g_sequence_iter_compare (GSequenceIter *a,
-                         GSequenceIter *b);
-

Returns a negative number if a - comes before b -, 0 if they are equal, -and a positive number if a - comes after b -.

-

The a - and b - iterators must point into the same sequence.

-
-

Parameters

-
----- - - - - - - - - - - - - -

a

a GSequenceIter

 

b

a GSequenceIter

 
-
-
-

Returns

-

a negative number if a -comes before b -, 0 if they are -equal, and a positive number if a -comes after b -

-
-

Since: 2.14

-
-
-
-

g_sequence_range_get_midpoint ()

-
GSequenceIter *
-g_sequence_range_get_midpoint (GSequenceIter *begin,
-                               GSequenceIter *end);
-

Finds an iterator somewhere in the range (begin -, end -). This -iterator will be close to the middle of the range, but is not -guaranteed to be exactly in the middle.

-

The begin - and end - iterators must both point to the same sequence -and begin - must come before or be equal to end - in the sequence.

-
-

Parameters

-
----- - - - - - - - - - - - - -

begin

a GSequenceIter

 

end

a GSequenceIter

 
-
-
-

Returns

-

a GSequenceIter pointing somewhere in the -(begin -, end -) range

-
-

Since: 2.14

-
-
-
-

Types and Values

-
-

GSequence

-
typedef struct _GSequence GSequence;
-

The GSequence struct is an opaque data type representing a -sequence data type.

-
-
-
-

GSequenceIter

-
typedef struct _GSequenceNode  GSequenceIter;
-
-

The GSequenceIter struct is an opaque data type representing an -iterator pointing into a GSequence.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Shell-related-Utilities.html b/docs/reference/glib/html/glib-Shell-related-Utilities.html deleted file mode 100644 index 8ae1abffb..000000000 --- a/docs/reference/glib/html/glib-Shell-related-Utilities.html +++ /dev/null @@ -1,298 +0,0 @@ - - - - -Shell-related Utilities: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Shell-related Utilities

-

Shell-related Utilities — shell-like commandline handling

-
-
-

Functions

-
---- - - - - - - - - - - - - - - -
-gboolean - -g_shell_parse_argv () -
-gchar * - -g_shell_quote () -
-gchar * - -g_shell_unquote () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
enumGShellError
#defineG_SHELL_ERROR
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GLib provides the functions g_shell_quote() and g_shell_unquote() -to handle shell-like quoting in strings. The function g_shell_parse_argv() -parses a string similar to the way a POSIX shell (/bin/sh) would.

-

Note that string handling in shells has many obscure and historical -corner-cases which these functions do not necessarily reproduce. They -are good enough in practice, though.

-
-
-

Functions

-
-

g_shell_parse_argv ()

-
gboolean
-g_shell_parse_argv (const gchar *command_line,
-                    gint *argcp,
-                    gchar ***argvp,
-                    GError **error);
-

Parses a command line into an argument vector, in much the same way -the shell would, but without many of the expansions the shell would -perform (variable expansion, globs, operators, filename expansion, -etc. are not supported). The results are defined to be the same as -those you would get from a UNIX98 /bin/sh, as long as the input -contains none of the unsupported shell expansions. If the input -does contain such expansions, they are passed through -literally. Possible errors are those from the G_SHELL_ERROR -domain. Free the returned vector with g_strfreev().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

command_line

command line to parse

 

argcp

return location for number of args.

[out][optional]

argvp

return -location for array of args.

[out][optional][array length=argcp zero-terminated=1]

error

return location for error.

[optional]
-
-
-

Returns

-

TRUE on success, FALSE if error set

-
-
-
-
-

g_shell_quote ()

-
gchar *
-g_shell_quote (const gchar *unquoted_string);
-

Quotes a string so that the shell (/bin/sh) will interpret the -quoted string to mean unquoted_string -. If you pass a filename to -the shell, for example, you should first quote it with this -function. The return value must be freed with g_free(). The -quoting style used is undefined (single or double quotes may be -used).

-
-

Parameters

-
----- - - - - - -

unquoted_string

a literal string

 
-
-
-

Returns

-

quoted string

-
-
-
-
-

g_shell_unquote ()

-
gchar *
-g_shell_unquote (const gchar *quoted_string,
-                 GError **error);
-

Unquotes a string as the shell (/bin/sh) would. Only handles -quotes; if a string contains file globs, arithmetic operators, -variables, backticks, redirections, or other special-to-the-shell -features, the result will be different from the result a real shell -would produce (the variables, backticks, etc. will be passed -through literally instead of being expanded). This function is -guaranteed to succeed if applied to the result of -g_shell_quote(). If it fails, it returns NULL and sets the -error. The quoted_string - need not actually contain quoted or -escaped text; g_shell_unquote() simply goes through the string and -unquotes/unescapes anything that the shell would. Both single and -double quotes are handled, as are escapes including escaped -newlines. The return value must be freed with g_free(). Possible -errors are in the G_SHELL_ERROR domain.

-

Shell quoting rules are a bit strange. Single quotes preserve the -literal string exactly. escape sequences are not allowed; not even -\' - if you want a ' in the quoted text, you have to do something -like 'foo'\''bar'. Double quotes allow $, `, ", \, and newline to -be escaped with backslash. Otherwise double quotes preserve things -literally.

-
-

Parameters

-
----- - - - - - - - - - - - - -

quoted_string

shell-quoted string

 

error

error return location or NULL

 
-
-
-

Returns

-

an unquoted string

-
-
-
-
-

Types and Values

-
-

enum GShellError

-

Error codes returned by shell functions.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_SHELL_ERROR_BAD_QUOTING

-

Mismatched or otherwise mangled quoting.

-
 

G_SHELL_ERROR_EMPTY_STRING

-

String to be parsed was empty.

-
 

G_SHELL_ERROR_FAILED

-

Some other error.

-
 
-
-
-
-
-

G_SHELL_ERROR

-
#define G_SHELL_ERROR g_shell_error_quark ()
-
-

Error domain for shell functions. Errors in this domain will be from -the GShellError enumeration. See GError for information on error -domains.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Simple-XML-Subset-Parser.html b/docs/reference/glib/html/glib-Simple-XML-Subset-Parser.html deleted file mode 100644 index 3de2691f1..000000000 --- a/docs/reference/glib/html/glib-Simple-XML-Subset-Parser.html +++ /dev/null @@ -1,1478 +0,0 @@ - - - - -Simple XML Subset Parser: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Simple XML Subset Parser

-

Simple XML Subset Parser — parses a subset of XML

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gchar * - -g_markup_escape_text () -
-gchar * - -g_markup_printf_escaped () -
-gchar * - -g_markup_vprintf_escaped () -
-GMarkupParseContext * - -g_markup_parse_context_new () -
-gboolean - -g_markup_parse_context_parse () -
-gboolean - -g_markup_parse_context_end_parse () -
-void - -g_markup_parse_context_free () -
-void - -g_markup_parse_context_get_position () -
const gchar * - -g_markup_parse_context_get_element () -
const GSList * - -g_markup_parse_context_get_element_stack () -
-gpointer - -g_markup_parse_context_get_user_data () -
-void - -g_markup_parse_context_push () -
-gpointer - -g_markup_parse_context_pop () -
-GMarkupParseContext * - -g_markup_parse_context_ref () -
-void - -g_markup_parse_context_unref () -
-gboolean - -g_markup_collect_attributes () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
enumGMarkupError
#defineG_MARKUP_ERROR
enumGMarkupParseFlags
 GMarkupParseContext
structGMarkupParser
enumGMarkupCollectType
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The "GMarkup" parser is intended to parse a simple markup format -that's a subset of XML. This is a small, efficient, easy-to-use -parser. It should not be used if you expect to interoperate with -other applications generating full-scale XML. However, it's very -useful for application data files, config files, etc. where you -know your application will be the only one writing the file. -Full-scale XML parsers should be able to parse the subset used by -GMarkup, so you can easily migrate to full-scale XML at a later -time if the need arises.

-

GMarkup is not guaranteed to signal an error on all invalid XML; -the parser may accept documents that an XML parser would not. -However, XML documents which are not well-formed (which is a -weaker condition than being valid. See the -XML specification -for definitions of these terms.) are not considered valid GMarkup -documents.

-

Simplifications to XML include:

-
    -
  • Only UTF-8 encoding is allowed

  • -
  • No user-defined entities

  • -
  • Processing instructions, comments and the doctype declaration -are "passed through" but are not interpreted in any way

  • -
  • No DTD or validation

  • -
-

The markup format does support:

-
    -
  • Elements

  • -
  • Attributes

  • -
  • 5 standard entities: &amp; &lt; &gt; &quot; &apos;

  • -
  • Character references

  • -
  • Sections marked as CDATA

  • -
-
-
-

Functions

-
-

g_markup_escape_text ()

-
gchar *
-g_markup_escape_text (const gchar *text,
-                      gssize length);
-

Escapes text so that the markup parser will parse it verbatim. -Less than, greater than, ampersand, etc. are replaced with the -corresponding entities. This function would typically be used -when writing out a file to be parsed with the markup parser.

-

Note that this function doesn't protect whitespace and line endings -from being processed according to the XML rules for normalization -of line endings and attribute values.

-

Note also that this function will produce character references in -the range of &x1; ... &x1f; for all control sequences -except for tabstop, newline and carriage return. The character -references in this range are not valid XML 1.0, but they are -valid XML 1.1 and will be accepted by the GMarkup parser.

-
-

Parameters

-
----- - - - - - - - - - - - - -

text

some valid UTF-8 text

 

length

length of text -in bytes, or -1 if the text is nul-terminated

 
-
-
-

Returns

-

a newly allocated string with the escaped text

-
-
-
-
-

g_markup_printf_escaped ()

-
gchar *
-g_markup_printf_escaped (const char *format,
-                         ...);
-

Formats arguments according to format -, escaping -all string and character arguments in the fashion -of g_markup_escape_text(). This is useful when you -want to insert literal strings into XML-style markup -output, without having to worry that the strings -might themselves contain markup.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
const char *store = "Fortnum & Mason";
-const char *item = "Tea";
-char *output;
-
-output = g_markup_printf_escaped ("<purchase>"
-                                  "<store>%s</store>"
-                                  "<item>%s</item>"
-                                  "</purchase>",
-                                  store, item);
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

format

printf() style format string

 

...

the arguments to insert in the format string

 
-
-
-

Returns

-

newly allocated result from formatting -operation. Free with g_free().

-
-

Since: 2.4

-
-
-
-

g_markup_vprintf_escaped ()

-
gchar *
-g_markup_vprintf_escaped (const char *format,
-                          va_list args);
-

Formats the data in args - according to format -, escaping -all string and character arguments in the fashion -of g_markup_escape_text(). See g_markup_printf_escaped().

-
-

Parameters

-
----- - - - - - - - - - - - - -

format

printf() style format string

 

args

variable argument list, similar to vprintf()

 
-
-
-

Returns

-

newly allocated result from formatting -operation. Free with g_free().

-
-

Since: 2.4

-
-
-
-

g_markup_parse_context_new ()

-
GMarkupParseContext *
-g_markup_parse_context_new (const GMarkupParser *parser,
-                            GMarkupParseFlags flags,
-                            gpointer user_data,
-                            GDestroyNotify user_data_dnotify);
-

Creates a new parse context. A parse context is used to parse -marked-up documents. You can feed any number of documents into -a context, as long as no errors occur; once an error occurs, -the parse context can't continue to parse text (you have to -free it and create a new parse context).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

parser

a GMarkupParser

 

flags

one or more GMarkupParseFlags

 

user_data

user data to pass to GMarkupParser functions

 

user_data_dnotify

user data destroy notifier called when -the parse context is freed

 
-
-
-

Returns

-

a new GMarkupParseContext

-
-
-
-
-

g_markup_parse_context_parse ()

-
gboolean
-g_markup_parse_context_parse (GMarkupParseContext *context,
-                              const gchar *text,
-                              gssize text_len,
-                              GError **error);
-

Feed some data to the GMarkupParseContext.

-

The data need not be valid UTF-8; an error will be signaled if -it's invalid. The data need not be an entire document; you can -feed a document into the parser incrementally, via multiple calls -to this function. Typically, as you receive data from a network -connection or file, you feed each received chunk of data into this -function, aborting the process if an error occurs. Once an error -is reported, no further data may be fed to the GMarkupParseContext; -all errors are fatal.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

context

a GMarkupParseContext

 

text

chunk of text to parse

 

text_len

length of text -in bytes

 

error

return location for a GError

 
-
-
-

Returns

-

FALSE if an error occurred, TRUE on success

-
-
-
-
-

g_markup_parse_context_end_parse ()

-
gboolean
-g_markup_parse_context_end_parse (GMarkupParseContext *context,
-                                  GError **error);
-

Signals to the GMarkupParseContext that all data has been -fed into the parse context with g_markup_parse_context_parse().

-

This function reports an error if the document isn't complete, -for example if elements are still open.

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GMarkupParseContext

 

error

return location for a GError

 
-
-
-

Returns

-

TRUE on success, FALSE if an error was set

-
-
-
-
-

g_markup_parse_context_free ()

-
void
-g_markup_parse_context_free (GMarkupParseContext *context);
-

Frees a GMarkupParseContext.

-

This function can't be called from inside one of the -GMarkupParser functions or while a subparser is pushed.

-
-

Parameters

-
----- - - - - - -

context

a GMarkupParseContext

 
-
-
-
-
-

g_markup_parse_context_get_position ()

-
void
-g_markup_parse_context_get_position (GMarkupParseContext *context,
-                                     gint *line_number,
-                                     gint *char_number);
-

Retrieves the current line number and the number of the character on -that line. Intended for use in error messages; there are no strict -semantics for what constitutes the "current" line number other than -"the best number we could come up with for error messages."

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

context

a GMarkupParseContext

 

line_number

return location for a line number, or NULL.

[nullable]

char_number

return location for a char-on-line number, or NULL.

[nullable]
-
-
-
-
-

g_markup_parse_context_get_element ()

-
const gchar *
-g_markup_parse_context_get_element (GMarkupParseContext *context);
-

Retrieves the name of the currently open element.

-

If called from the start_element or end_element handlers this will -give the element_name as passed to those functions. For the parent -elements, see g_markup_parse_context_get_element_stack().

-
-

Parameters

-
----- - - - - - -

context

a GMarkupParseContext

 
-
-
-

Returns

-

the name of the currently open element, or NULL

-
-

Since: 2.2

-
-
-
-

g_markup_parse_context_get_element_stack ()

-
const GSList *
-g_markup_parse_context_get_element_stack
-                               (GMarkupParseContext *context);
-

Retrieves the element stack from the internal state of the parser.

-

The returned GSList is a list of strings where the first item is -the currently open tag (as would be returned by -g_markup_parse_context_get_element()) and the next item is its -immediate parent.

-

This function is intended to be used in the start_element and -end_element handlers where g_markup_parse_context_get_element() -would merely return the name of the element that is being -processed.

-
-

Parameters

-
----- - - - - - -

context

a GMarkupParseContext

 
-
-
-

Returns

-

the element stack, which must not be modified

-
-

Since: 2.16

-
-
-
-

g_markup_parse_context_get_user_data ()

-
gpointer
-g_markup_parse_context_get_user_data (GMarkupParseContext *context);
-

Returns the user_data associated with context -.

-

This will either be the user_data that was provided to -g_markup_parse_context_new() or to the most recent call -of g_markup_parse_context_push().

-
-

Parameters

-
----- - - - - - -

context

a GMarkupParseContext

 
-
-
-

Returns

-

the provided user_data. The returned data belongs to -the markup context and will be freed when -g_markup_parse_context_free() is called.

-
-

Since: 2.18

-
-
-
-

g_markup_parse_context_push ()

-
void
-g_markup_parse_context_push (GMarkupParseContext *context,
-                             const GMarkupParser *parser,
-                             gpointer user_data);
-

Temporarily redirects markup data to a sub-parser.

-

This function may only be called from the start_element handler of -a GMarkupParser. It must be matched with a corresponding call to -g_markup_parse_context_pop() in the matching end_element handler -(except in the case that the parser aborts due to an error).

-

All tags, text and other data between the matching tags is -redirected to the subparser given by parser -. user_data - is used -as the user_data for that parser. user_data - is also passed to the -error callback in the event that an error occurs. This includes -errors that occur in subparsers of the subparser.

-

The end tag matching the start tag for which this call was made is -handled by the previous parser (which is given its own user_data) -which is why g_markup_parse_context_pop() is provided to allow "one -last access" to the user_data - provided to this function. In the -case of error, the user_data - provided here is passed directly to -the error callback of the subparser and g_markup_parse_context_pop() -should not be called. In either case, if user_data - was allocated -then it ought to be freed from both of these locations.

-

This function is not intended to be directly called by users -interested in invoking subparsers. Instead, it is intended to be -used by the subparsers themselves to implement a higher-level -interface.

-

As an example, see the following implementation of a simple -parser that counts the number of tags encountered.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
typedef struct
-{
-  gint tag_count;
-} CounterData;
-
-static void
-counter_start_element (GMarkupParseContext  *context,
-                       const gchar          *element_name,
-                       const gchar         **attribute_names,
-                       const gchar         **attribute_values,
-                       gpointer              user_data,
-                       GError              **error)
-{
-  CounterData *data = user_data;
-
-  data->tag_count++;
-}
-
-static void
-counter_error (GMarkupParseContext *context,
-               GError              *error,
-               gpointer             user_data)
-{
-  CounterData *data = user_data;
-
-  g_slice_free (CounterData, data);
-}
-
-static GMarkupParser counter_subparser =
-{
-  counter_start_element,
-  NULL,
-  NULL,
-  NULL,
-  counter_error
-};
-
- -

-

In order to allow this parser to be easily used as a subparser, the -following interface is provided:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
void
-start_counting (GMarkupParseContext *context)
-{
-  CounterData *data = g_slice_new (CounterData);
-
-  data->tag_count = 0;
-  g_markup_parse_context_push (context, &counter_subparser, data);
-}
-
-gint
-end_counting (GMarkupParseContext *context)
-{
-  CounterData *data = g_markup_parse_context_pop (context);
-  int result;
-
-  result = data->tag_count;
-  g_slice_free (CounterData, data);
-
-  return result;
-}
-
- -

-

The subparser would then be used as follows:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
static void start_element (context, element_name, ...)
-{
-  if (strcmp (element_name, "count-these") == 0)
-    start_counting (context);
-
-  // else, handle other tags...
-}
-
-static void end_element (context, element_name, ...)
-{
-  if (strcmp (element_name, "count-these") == 0)
-    g_print ("Counted %d tags\n", end_counting (context));
-
-  // else, handle other tags...
-}
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

context

a GMarkupParseContext

 

parser

a GMarkupParser

 

user_data

user data to pass to GMarkupParser functions

 
-
-

Since: 2.18

-
-
-
-

g_markup_parse_context_pop ()

-
gpointer
-g_markup_parse_context_pop (GMarkupParseContext *context);
-

Completes the process of a temporary sub-parser redirection.

-

This function exists to collect the user_data allocated by a -matching call to g_markup_parse_context_push(). It must be called -in the end_element handler corresponding to the start_element -handler during which g_markup_parse_context_push() was called. -You must not call this function from the error callback -- the -user_data - is provided directly to the callback in that case.

-

This function is not intended to be directly called by users -interested in invoking subparsers. Instead, it is intended to -be used by the subparsers themselves to implement a higher-level -interface.

-
-

Parameters

-
----- - - - - - -

context

a GMarkupParseContext

 
-
-
-

Returns

-

the user data passed to g_markup_parse_context_push()

-
-

Since: 2.18

-
-
-
-

g_markup_parse_context_ref ()

-
GMarkupParseContext *
-g_markup_parse_context_ref (GMarkupParseContext *context);
-

Increases the reference count of context -.

-
-

Parameters

-
----- - - - - - -

context

a GMarkupParseContext

 
-
-
-

Returns

-

the same context -

-
-

Since: 2.36

-
-
-
-

g_markup_parse_context_unref ()

-
void
-g_markup_parse_context_unref (GMarkupParseContext *context);
-

Decreases the reference count of context -. When its reference count -drops to 0, it is freed.

-
-

Parameters

-
----- - - - - - -

context

a GMarkupParseContext

 
-
-

Since: 2.36

-
-
-
-

g_markup_collect_attributes ()

-
gboolean
-g_markup_collect_attributes (const gchar *element_name,
-                             const gchar **attribute_names,
-                             const gchar **attribute_values,
-                             GError **error,
-                             GMarkupCollectType first_type,
-                             const gchar *first_attr,
-                             ...);
-

Collects the attributes of the element from the data passed to the -GMarkupParser start_element function, dealing with common error -conditions and supporting boolean values.

-

This utility function is not required to write a parser but can save -a lot of typing.

-

The element_name -, attribute_names -, attribute_values - and error - -parameters passed to the start_element callback should be passed -unmodified to this function.

-

Following these arguments is a list of "supported" attributes to collect. -It is an error to specify multiple attributes with the same name. If any -attribute not in the list appears in the attribute_names - array then an -unknown attribute error will result.

-

The GMarkupCollectType field allows specifying the type of collection -to perform and if a given attribute must appear or is optional.

-

The attribute name is simply the name of the attribute to collect.

-

The pointer should be of the appropriate type (see the descriptions -under GMarkupCollectType) and may be NULL in case a particular -attribute is to be allowed but ignored.

-

This function deals with issuing errors for missing attributes -(of type G_MARKUP_ERROR_MISSING_ATTRIBUTE), unknown attributes -(of type G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE) and duplicate -attributes (of type G_MARKUP_ERROR_INVALID_CONTENT) as well -as parse errors for boolean-valued attributes (again of type -G_MARKUP_ERROR_INVALID_CONTENT). In all of these cases FALSE -will be returned and error - will be set as appropriate.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

element_name

the current tag name

 

attribute_names

the attribute names

 

attribute_values

the attribute values

 

error

a pointer to a GError or NULL

 

first_type

the GMarkupCollectType of the first attribute

 

first_attr

the name of the first attribute

 

...

a pointer to the storage location of the first attribute -(or NULL), followed by more types names and pointers, ending -with G_MARKUP_COLLECT_INVALID

 
-
-
-

Returns

-

TRUE if successful

-
-

Since: 2.16

-
-
-
-

Types and Values

-
-

enum GMarkupError

-

Error codes returned by markup parsing.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_MARKUP_ERROR_BAD_UTF8

-

text being parsed was not valid UTF-8

-
 

G_MARKUP_ERROR_EMPTY

-

document contained nothing, or only whitespace

-
 

G_MARKUP_ERROR_PARSE

-

document was ill-formed

-
 

G_MARKUP_ERROR_UNKNOWN_ELEMENT

-

error should be set by GMarkupParser - functions; element wasn't known

-
 

G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE

-

error should be set by GMarkupParser - functions; attribute wasn't known

-
 

G_MARKUP_ERROR_INVALID_CONTENT

-

error should be set by GMarkupParser - functions; content was invalid

-
 

G_MARKUP_ERROR_MISSING_ATTRIBUTE

-

error should be set by GMarkupParser - functions; a required attribute was missing

-
 
-
-
-
-
-

G_MARKUP_ERROR

-
#define G_MARKUP_ERROR g_markup_error_quark ()
-
-

Error domain for markup parsing. -Errors in this domain will be from the GMarkupError enumeration. -See GError for information on error domains.

-
-
-
-

enum GMarkupParseFlags

-

Flags that affect the behaviour of the parser.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG

-

flag you should not use

-
 

G_MARKUP_TREAT_CDATA_AS_TEXT

-

When this flag is set, CDATA marked - sections are not passed literally to the passthrough - function of - the parser. Instead, the content of the section (without the - <![CDATA[ and ]]>) is - passed to the text - function. This flag was added in GLib 2.12

-
 

G_MARKUP_PREFIX_ERROR_POSITION

-

Normally errors caught by GMarkup - itself have line/column information prefixed to them to let the - caller know the location of the error. When this flag is set the - location information is also prefixed to errors generated by the - GMarkupParser implementation functions

-
 

G_MARKUP_IGNORE_QUALIFIED

-

Ignore (don't report) qualified - attributes and tags, along with their contents. A qualified - attribute or tag is one that contains ':' in its name (ie: is in - another namespace). Since: 2.40.

-
 
-
-
-
-
-

GMarkupParseContext

-
typedef struct _GMarkupParseContext GMarkupParseContext;
-

A parse context is used to parse a stream of bytes that -you expect to contain marked-up text.

-

See g_markup_parse_context_new(), GMarkupParser, and so -on for more details.

-
-
-
-

struct GMarkupParser

-
struct GMarkupParser {
-  /* Called for open tags <foo bar="baz"> */
-  void (*start_element)  (GMarkupParseContext *context,
-                          const gchar         *element_name,
-                          const gchar        **attribute_names,
-                          const gchar        **attribute_values,
-                          gpointer             user_data,
-                          GError             **error);
-
-  /* Called for close tags </foo> */
-  void (*end_element)    (GMarkupParseContext *context,
-                          const gchar         *element_name,
-                          gpointer             user_data,
-                          GError             **error);
-
-  /* Called for character data */
-  /* text is not nul-terminated */
-  void (*text)           (GMarkupParseContext *context,
-                          const gchar         *text,
-                          gsize                text_len,
-                          gpointer             user_data,
-                          GError             **error);
-
-  /* Called for strings that should be re-saved verbatim in this same
-   * position, but are not otherwise interpretable.  At the moment
-   * this includes comments and processing instructions.
-   */
-  /* text is not nul-terminated. */
-  void (*passthrough)    (GMarkupParseContext *context,
-                          const gchar         *passthrough_text,
-                          gsize                text_len,
-                          gpointer             user_data,
-                          GError             **error);
-
-  /* Called on error, including one set by other
-   * methods in the vtable. The GError should not be freed.
-   */
-  void (*error)          (GMarkupParseContext *context,
-                          GError              *error,
-                          gpointer             user_data);
-};
-
-

Any of the fields in GMarkupParser can be NULL, in which case they -will be ignored. Except for the error - function, any of these callbacks -can set an error; in particular the G_MARKUP_ERROR_UNKNOWN_ELEMENT, -G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and G_MARKUP_ERROR_INVALID_CONTENT -errors are intended to be set from these callbacks. If you set an error -from a callback, g_markup_parse_context_parse() will report that error -back to its caller.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

start_element ()

Callback to invoke when the opening tag of an element -is seen. The callback's attribute_names -and attribute_values -parameters -are NULL-terminated.

 

end_element ()

Callback to invoke when the closing tag of an element -is seen. Note that this is also called for empty tags like -<empty/>.

 

text ()

Callback to invoke when some text is seen (text is always -inside an element). Note that the text of an element may be spread -over multiple calls of this function. If the -G_MARKUP_TREAT_CDATA_AS_TEXT flag is set, this function is also -called for the content of CDATA marked sections.

 

passthrough ()

Callback to invoke for comments, processing instructions -and doctype declarations; if you're re-writing the parsed document, -write the passthrough text back out in the same position. If the -G_MARKUP_TREAT_CDATA_AS_TEXT flag is not set, this function is also -called for CDATA marked sections.

 

error ()

Callback to invoke when an error occurs.

 
-
-
-
-
-

enum GMarkupCollectType

-

A mixed enumerated type and flags field. You must specify one type -(string, strdup, boolean, tristate). Additionally, you may optionally -bitwise OR the type with the flag G_MARKUP_COLLECT_OPTIONAL.

-

It is likely that this enum will be extended in the future to -support other types.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_MARKUP_COLLECT_INVALID

-

used to terminate the list of attributes - to collect

-
 

G_MARKUP_COLLECT_STRING

-

collect the string pointer directly from - the attribute_values[] array. Expects a parameter of type (const - char **). If G_MARKUP_COLLECT_OPTIONAL is specified and the - attribute isn't present then the pointer will be set to NULL

-
 

G_MARKUP_COLLECT_STRDUP

-

as with G_MARKUP_COLLECT_STRING, but - expects a parameter of type (char **) and g_strdup()s the - returned pointer. The pointer must be freed with g_free()

-
 

G_MARKUP_COLLECT_BOOLEAN

-

expects a parameter of type (gboolean *) - and parses the attribute value as a boolean. Sets FALSE if the - attribute isn't present. Valid boolean values consist of - (case-insensitive) "false", "f", "no", "n", "0" and "true", "t", - "yes", "y", "1"

-
 

G_MARKUP_COLLECT_TRISTATE

-

as with G_MARKUP_COLLECT_BOOLEAN, but - in the case of a missing attribute a value is set that compares - equal to neither FALSE nor TRUE G_MARKUP_COLLECT_OPTIONAL is - implied

-
 

G_MARKUP_COLLECT_OPTIONAL

-

can be bitwise ORed with the other fields. - If present, allows the attribute not to appear. A default value - is set depending on what value type is used

-
 
-
-
-
-
-

See Also

-

XML Specification

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Singly-Linked-Lists.html b/docs/reference/glib/html/glib-Singly-Linked-Lists.html deleted file mode 100644 index ff4851aac..000000000 --- a/docs/reference/glib/html/glib-Singly-Linked-Lists.html +++ /dev/null @@ -1,1535 +0,0 @@ - - - - -Singly-Linked Lists: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Singly-Linked Lists

-

Singly-Linked Lists — linked lists that can be iterated in one direction

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GSList * - -g_slist_alloc () -
-GSList * - -g_slist_append () -
-GSList * - -g_slist_prepend () -
-GSList * - -g_slist_insert () -
-GSList * - -g_slist_insert_before () -
-GSList * - -g_slist_insert_sorted () -
-GSList * - -g_slist_remove () -
-GSList * - -g_slist_remove_link () -
-GSList * - -g_slist_delete_link () -
-GSList * - -g_slist_remove_all () -
-void - -g_slist_free () -
-void - -g_slist_free_full () -
-void - -g_slist_free_1 () -
-guint - -g_slist_length () -
-GSList * - -g_slist_copy () -
-GSList * - -g_slist_copy_deep () -
-GSList * - -g_slist_reverse () -
-GSList * - -g_slist_insert_sorted_with_data () -
-GSList * - -g_slist_sort () -
-GSList * - -g_slist_sort_with_data () -
-GSList * - -g_slist_concat () -
-void - -g_slist_foreach () -
-GSList * - -g_slist_last () -
#define -g_slist_next() -
-GSList * - -g_slist_nth () -
-gpointer - -g_slist_nth_data () -
-GSList * - -g_slist_find () -
-GSList * - -g_slist_find_custom () -
-gint - -g_slist_position () -
-gint - -g_slist_index () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
structGSList
#defineg_slist_free1
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The GSList structure and its associated functions provide a -standard singly-linked list data structure.

-

Each element in the list contains a piece of data, together with a -pointer which links to the next element in the list. Using this -pointer it is possible to move through the list in one direction -only (unlike the double-linked lists, -which allow movement in both directions).

-

The data contained in each element can be either integer values, by -using one of the Type Conversion Macros, -or simply pointers to any type of data.

-

List elements are allocated from the slice allocator, -which is more efficient than allocating elements individually.

-

Note that most of the GSList functions expect to be passed a -pointer to the first element in the list. The functions which insert -elements return the new start of the list, which may have changed.

-

There is no function to create a GSList. NULL is considered to be -the empty list so you simply set a GSList* to NULL.

-

To add elements, use g_slist_append(), g_slist_prepend(), -g_slist_insert() and g_slist_insert_sorted().

-

To remove elements, use g_slist_remove().

-

To find elements in the list use g_slist_last(), g_slist_next(), -g_slist_nth(), g_slist_nth_data(), g_slist_find() and -g_slist_find_custom().

-

To find the index of an element use g_slist_position() and -g_slist_index().

-

To call a function for each element in the list use -g_slist_foreach().

-

To free the entire list, use g_slist_free().

-
-
-

Functions

-
-

g_slist_alloc ()

-
GSList *
-g_slist_alloc (void);
-

Allocates space for one GSList element. It is called by the -g_slist_append(), g_slist_prepend(), g_slist_insert() and -g_slist_insert_sorted() functions and so is rarely used on its own.

-
-

Returns

-

a pointer to the newly-allocated GSList element.

-
-
-
-
-

g_slist_append ()

-
GSList *
-g_slist_append (GSList *list,
-                gpointer data);
-

Adds a new element on to the end of the list.

-

The return value is the new start of the list, which may -have changed, so make sure you store the new value.

-

Note that g_slist_append() has to traverse the entire list -to find the end, which is inefficient when adding multiple -elements. A common idiom to avoid the inefficiency is to prepend -the elements and reverse the list when all elements have been added.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
// Notice that these are initialized to the empty list.
-GSList *list = NULL, *number_list = NULL;
-
-// This is a list of strings.
-list = g_slist_append (list, "first");
-list = g_slist_append (list, "second");
-
-// This is a list of integers.
-number_list = g_slist_append (number_list, GINT_TO_POINTER (27));
-number_list = g_slist_append (number_list, GINT_TO_POINTER (14));
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GSList

 

data

the data for the new element

 
-
-
-

Returns

-

the new start of the GSList

-
-
-
-
-

g_slist_prepend ()

-
GSList *
-g_slist_prepend (GSList *list,
-                 gpointer data);
-

Adds a new element on to the start of the list.

-

The return value is the new start of the list, which -may have changed, so make sure you store the new value.

-
- - - - - - - -
1
-2
-3
-4
// Notice that it is initialized to the empty list.
-GSList *list = NULL;
-list = g_slist_prepend (list, "last");
-list = g_slist_prepend (list, "first");
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GSList

 

data

the data for the new element

 
-
-
-

Returns

-

the new start of the GSList

-
-
-
-
-

g_slist_insert ()

-
GSList *
-g_slist_insert (GSList *list,
-                gpointer data,
-                gint position);
-

Inserts a new element into the list at the given position.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

list

a GSList

 

data

the data for the new element

 

position

the position to insert the element. -If this is negative, or is larger than the number -of elements in the list, the new element is added on -to the end of the list.

 
-
-
-

Returns

-

the new start of the GSList

-
-
-
-
-

g_slist_insert_before ()

-
GSList *
-g_slist_insert_before (GSList *slist,
-                       GSList *sibling,
-                       gpointer data);
-

Inserts a node before sibling - containing data -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

slist

a GSList

 

sibling

node to insert data -before

 

data

data to put in the newly-inserted node

 
-
-
-

Returns

-

the new head of the list.

-
-
-
-
-

g_slist_insert_sorted ()

-
GSList *
-g_slist_insert_sorted (GSList *list,
-                       gpointer data,
-                       GCompareFunc func);
-

Inserts a new element into the list, using the given -comparison function to determine its position.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

list

a GSList

 

data

the data for the new element

 

func

the function to compare elements in the list. -It should return a number > 0 if the first parameter -comes after the second parameter in the sort order.

 
-
-
-

Returns

-

the new start of the GSList

-
-
-
-
-

g_slist_remove ()

-
GSList *
-g_slist_remove (GSList *list,
-                gconstpointer data);
-

Removes an element from a GSList. -If two elements contain the same data, only the first is removed. -If none of the elements contain the data, the GSList is unchanged.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GSList

 

data

the data of the element to remove

 
-
-
-

Returns

-

the new start of the GSList

-
-
-
-
-

g_slist_remove_link ()

-
GSList *
-g_slist_remove_link (GSList *list,
-                     GSList *link_);
-

Removes an element from a GSList, without -freeing the element. The removed element's next -link is set to NULL, so that it becomes a -self-contained list with one element.

-

Removing arbitrary nodes from a singly-linked list -requires time that is proportional to the length of the list -(ie. O(n)). If you find yourself using g_slist_remove_link() -frequently, you should consider a different data structure, -such as the doubly-linked GList.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GSList

 

link_

an element in the GSList

 
-
-
-

Returns

-

the new start of the GSList, without the element

-
-
-
-
-

g_slist_delete_link ()

-
GSList *
-g_slist_delete_link (GSList *list,
-                     GSList *link_);
-

Removes the node link_ from the list and frees it. -Compare this to g_slist_remove_link() which removes the node -without freeing it.

-

Removing arbitrary nodes from a singly-linked list requires time -that is proportional to the length of the list (ie. O(n)). If you -find yourself using g_slist_delete_link() frequently, you should -consider a different data structure, such as the doubly-linked -GList.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GSList

 

link_

node to delete

 
-
-
-

Returns

-

the new head of list -

-
-
-
-
-

g_slist_remove_all ()

-
GSList *
-g_slist_remove_all (GSList *list,
-                    gconstpointer data);
-

Removes all list nodes with data equal to data -. -Returns the new head of the list. Contrast with -g_slist_remove() which removes only the first node -matching the given data.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GSList

 

data

data to remove

 
-
-
-

Returns

-

new head of list -

-
-
-
-
-

g_slist_free ()

-
void
-g_slist_free (GSList *list);
-

Frees all of the memory used by a GSList. -The freed elements are returned to the slice allocator.

-

If list elements contain dynamically-allocated memory, -you should either use g_slist_free_full() or free them manually -first.

-
-

Parameters

-
----- - - - - - -

list

a GSList

 
-
-
-
-
-

g_slist_free_full ()

-
void
-g_slist_free_full (GSList *list,
-                   GDestroyNotify free_func);
-

Convenience method, which frees all the memory used by a GSList, and -calls the specified destroy function on every element's data.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a pointer to a GSList

 

free_func

the function to be called to free each element's data

 
-
-

Since: 2.28

-
-
-
-

g_slist_free_1 ()

-
void
-g_slist_free_1 (GSList *list);
-

Frees one GSList element. -It is usually used after g_slist_remove_link().

-
-

Parameters

-
----- - - - - - -

list

a GSList element

 
-
-
-
-
-

g_slist_length ()

-
guint
-g_slist_length (GSList *list);
-

Gets the number of elements in a GSList.

-

This function iterates over the whole list to -count its elements. To check whether the list is non-empty, it is faster to -check list - against NULL.

-
-

Parameters

-
----- - - - - - -

list

a GSList

 
-
-
-

Returns

-

the number of elements in the GSList

-
-
-
-
-

g_slist_copy ()

-
GSList *
-g_slist_copy (GSList *list);
-

Copies a GSList.

-

Note that this is a "shallow" copy. If the list elements -consist of pointers to data, the pointers are copied but -the actual data isn't. See g_slist_copy_deep() if you need -to copy the data as well.

-
-

Parameters

-
----- - - - - - -

list

a GSList

 
-
-
-

Returns

-

a copy of list -

-
-
-
-
-

g_slist_copy_deep ()

-
GSList *
-g_slist_copy_deep (GSList *list,
-                   GCopyFunc func,
-                   gpointer user_data);
-

Makes a full (deep) copy of a GSList.

-

In contrast with g_slist_copy(), this function uses func - to make a copy of -each list element, in addition to copying the list container itself.

-

func -, as a GCopyFunc, takes two arguments, the data to be copied and a user -pointer. It's safe to pass NULL as user_data, if the copy function takes only -one argument.

-

For instance, if list - holds a list of GObjects, you can do:

-
- - - - - - - -
1
another_list = g_slist_copy_deep (list, (GCopyFunc) g_object_ref, NULL);
-
- -

-

And, to entirely free the new list, you could do:

-
- - - - - - - -
1
g_slist_free_full (another_list, g_object_unref);
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

list

a GSList

 

func

a copy function used to copy every element in the list

 

user_data

user data passed to the copy function func -, or NULL

 
-
-
-

Returns

-

a full copy of list -, use g_slist_free_full to free it

-
-

Since: 2.34

-
-
-
-

g_slist_reverse ()

-
GSList *
-g_slist_reverse (GSList *list);
-

Reverses a GSList.

-
-

Parameters

-
----- - - - - - -

list

a GSList

 
-
-
-

Returns

-

the start of the reversed GSList

-
-
-
-
-

g_slist_insert_sorted_with_data ()

-
GSList *
-g_slist_insert_sorted_with_data (GSList *list,
-                                 gpointer data,
-                                 GCompareDataFunc func,
-                                 gpointer user_data);
-

Inserts a new element into the list, using the given -comparison function to determine its position.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

list

a GSList

 

data

the data for the new element

 

func

the function to compare elements in the list. -It should return a number > 0 if the first parameter -comes after the second parameter in the sort order.

 

user_data

data to pass to comparison function

 
-
-
-

Returns

-

the new start of the GSList

-
-

Since: 2.10

-
-
-
-

g_slist_sort ()

-
GSList *
-g_slist_sort (GSList *list,
-              GCompareFunc compare_func);
-

Sorts a GSList using the given comparison function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GSList

 

compare_func

the comparison function used to sort the GSList. -This function is passed the data from 2 elements of the GSList -and should return 0 if they are equal, a negative value if the -first element comes before the second, or a positive value if -the first element comes after the second.

 
-
-
-

Returns

-

the start of the sorted GSList

-
-
-
-
-

g_slist_sort_with_data ()

-
GSList *
-g_slist_sort_with_data (GSList *list,
-                        GCompareDataFunc compare_func,
-                        gpointer user_data);
-

Like g_slist_sort(), but the sort function accepts a user data argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

list

a GSList

 

compare_func

comparison function

 

user_data

data to pass to comparison function

 
-
-
-

Returns

-

new head of the list

-
-
-
-
-

g_slist_concat ()

-
GSList *
-g_slist_concat (GSList *list1,
-                GSList *list2);
-

Adds the second GSList onto the end of the first GSList. -Note that the elements of the second GSList are not copied. -They are used directly.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list1

a GSList

 

list2

the GSList to add to the end of the first GSList

 
-
-
-

Returns

-

the start of the new GSList

-
-
-
-
-

g_slist_foreach ()

-
void
-g_slist_foreach (GSList *list,
-                 GFunc func,
-                 gpointer user_data);
-

Calls a function for each element of a GSList.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

list

a GSList

 

func

the function to call with each element's data

 

user_data

user data to pass to the function

 
-
-
-
-
-

g_slist_last ()

-
GSList *
-g_slist_last (GSList *list);
-

Gets the last element in a GSList.

-

This function iterates over the whole list.

-
-

Parameters

-
----- - - - - - -

list

a GSList

 
-
-
-

Returns

-

the last element in the GSList, -or NULL if the GSList has no elements

-
-
-
-
-

g_slist_next()

-
#define             g_slist_next(slist)
-

A convenience macro to get the next element in a GSList.

-
-

Parameters

-
----- - - - - - -

slist

an element in a GSList.

 
-
-
-

Returns

-

the next element, or NULL if there are no more elements.

-
-
-
-
-

g_slist_nth ()

-
GSList *
-g_slist_nth (GSList *list,
-             guint n);
-

Gets the element at the given position in a GSList.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GSList

 

n

the position of the element, counting from 0

 
-
-
-

Returns

-

the element, or NULL if the position is off -the end of the GSList

-
-
-
-
-

g_slist_nth_data ()

-
gpointer
-g_slist_nth_data (GSList *list,
-                  guint n);
-

Gets the data of the element at the given position.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GSList

 

n

the position of the element

 
-
-
-

Returns

-

the element's data, or NULL if the position -is off the end of the GSList

-
-
-
-
-

g_slist_find ()

-
GSList *
-g_slist_find (GSList *list,
-              gconstpointer data);
-

Finds the element in a GSList which -contains the given data.

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GSList

 

data

the element data to find

 
-
-
-

Returns

-

the found GSList element, -or NULL if it is not found

-
-
-
-
-

g_slist_find_custom ()

-
GSList *
-g_slist_find_custom (GSList *list,
-                     gconstpointer data,
-                     GCompareFunc func);
-

Finds an element in a GSList, using a supplied function to -find the desired element. It iterates over the list, calling -the given function which should return 0 when the desired -element is found. The function takes two gconstpointer arguments, -the GSList element's data as the first argument and the -given user data.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

list

a GSList

 

data

user data passed to the function

 

func

the function to call for each element. -It should return 0 when the desired element is found

 
-
-
-

Returns

-

the found GSList element, or NULL if it is not found

-
-
-
-
-

g_slist_position ()

-
gint
-g_slist_position (GSList *list,
-                  GSList *llink);
-

Gets the position of the given element -in the GSList (starting from 0).

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GSList

 

llink

an element in the GSList

 
-
-
-

Returns

-

the position of the element in the GSList, -or -1 if the element is not found

-
-
-
-
-

g_slist_index ()

-
gint
-g_slist_index (GSList *list,
-               gconstpointer data);
-

Gets the position of the element containing -the given data (starting from 0).

-
-

Parameters

-
----- - - - - - - - - - - - - -

list

a GSList

 

data

the data to find

 
-
-
-

Returns

-

the index of the element containing the data, -or -1 if the data is not found

-
-
-
-
-

Types and Values

-
-

struct GSList

-
struct GSList {
-  gpointer data;
-  GSList *next;
-};
-
-

The GSList struct is used for each element in the singly-linked -list.

-
-

Members

-
----- - - - - - - - - - - - - -

gpointer data;

holds the element's data, which can be a pointer to any kind -of data, or any integer value using the -Type Conversion Macros

 

GSList *next;

contains the link to the next element in the list.

 
-
-
-
-
-

g_slist_free1

-
#define             g_slist_free1
-

A macro which does the same as g_slist_free_1().

-

Since: 2.10

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Spawning-Processes.html b/docs/reference/glib/html/glib-Spawning-Processes.html deleted file mode 100644 index df6d38e97..000000000 --- a/docs/reference/glib/html/glib-Spawning-Processes.html +++ /dev/null @@ -1,1153 +0,0 @@ - - - - -Spawning Processes: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Spawning Processes

-

Spawning Processes — process launching

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -(*GSpawnChildSetupFunc) () -
-gboolean - -g_spawn_async_with_pipes () -
-gboolean - -g_spawn_async () -
-gboolean - -g_spawn_sync () -
-gboolean - -g_spawn_check_exit_status () -
-gboolean - -g_spawn_command_line_async () -
-gboolean - -g_spawn_command_line_sync () -
-void - -g_spawn_close_pid () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
enumGSpawnError
#defineG_SPAWN_ERROR
enumGSpawnFlags
#defineG_SPAWN_EXIT_ERROR
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GLib supports spawning of processes with an API that is more -convenient than the bare UNIX fork() and exec().

-

The g_spawn family of functions has synchronous (g_spawn_sync()) -and asynchronous variants (g_spawn_async(), g_spawn_async_with_pipes()), -as well as convenience variants that take a complete shell-like -commandline (g_spawn_command_line_sync(), g_spawn_command_line_async()).

-

See GSubprocess in GIO for a higher-level API that provides -stream interfaces for communication with child processes.

-
-
-

Functions

-
-

GSpawnChildSetupFunc ()

-
void
-(*GSpawnChildSetupFunc) (gpointer user_data);
-

Specifies the type of the setup function passed to g_spawn_async(), -g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very -limited ways, be used to affect the child's execution.

-

On POSIX platforms, the function is called in the child after GLib -has performed all the setup it plans to perform, but before calling -exec(). Actions taken in this function will only affect the child, -not the parent.

-

On Windows, the function is called in the parent. Its usefulness on -Windows is thus questionable. In many cases executing the child setup -function in the parent can have ill effects, and you should be very -careful when porting software to Windows that uses child setup -functions.

-

However, even on POSIX, you are extremely limited in what you can -safely do from a GSpawnChildSetupFunc, because any mutexes that were -held by other threads in the parent process at the time of the fork() -will still be locked in the child process, and they will never be -unlocked (since the threads that held them don't exist in the child). -POSIX allows only async-signal-safe functions (see signal(7)) to be -called in the child between fork() and exec(), which drastically limits -the usefulness of child setup functions.

-

In particular, it is not safe to call any function which may -call malloc(), which includes POSIX functions such as setenv(). -If you need to set up the child environment differently from -the parent, you should use g_get_environ(), g_environ_setenv(), -and g_environ_unsetenv(), and then pass the complete environment -list to the g_spawn... function.

-
-

Parameters

-
----- - - - - - -

user_data

user data to pass to the function.

 
-
-
-
-
-

g_spawn_async_with_pipes ()

-
gboolean
-g_spawn_async_with_pipes (const gchar *working_directory,
-                          gchar **argv,
-                          gchar **envp,
-                          GSpawnFlags flags,
-                          GSpawnChildSetupFunc child_setup,
-                          gpointer user_data,
-                          GPid *child_pid,
-                          gint *standard_input,
-                          gint *standard_output,
-                          gint *standard_error,
-                          GError **error);
-

Executes a child program asynchronously (your program will not -block waiting for the child to exit). The child program is -specified by the only argument that must be provided, argv -. -argv - should be a NULL-terminated array of strings, to be passed -as the argument vector for the child. The first string in argv - -is of course the name of the program to execute. By default, the -name of the program must be a full path. If flags - contains the -G_SPAWN_SEARCH_PATH flag, the PATH environment variable is -used to search for the executable. If flags - contains the -G_SPAWN_SEARCH_PATH_FROM_ENVP flag, the PATH variable from -envp - is used to search for the executable. If both the -G_SPAWN_SEARCH_PATH and G_SPAWN_SEARCH_PATH_FROM_ENVP flags -are set, the PATH variable from envp - takes precedence over -the environment variable.

-

If the program name is not a full path and G_SPAWN_SEARCH_PATH flag is not -used, then the program will be run from the current directory (or -working_directory -, if specified); this might be unexpected or even -dangerous in some cases when the current directory is world-writable.

-

On Windows, note that all the string or string vector arguments to -this function and the other g_spawn*() functions are in UTF-8, the -GLib file name encoding. Unicode characters that are not part of -the system codepage passed in these arguments will be correctly -available in the spawned program only if it uses wide character API -to retrieve its command line. For C programs built with Microsoft's -tools it is enough to make the program have a wmain() instead of -main(). wmain() has a wide character argument vector as parameter.

-

At least currently, mingw doesn't support wmain(), so if you use -mingw to develop the spawned program, it should call -g_win32_get_command_line() to get arguments in UTF-8.

-

On Windows the low-level child process creation API CreateProcess() -doesn't use argument vectors, but a command line. The C runtime -library's spawn*() family of functions (which g_spawn_async_with_pipes() -eventually calls) paste the argument vector elements together into -a command line, and the C runtime startup code does a corresponding -reconstruction of an argument vector from the command line, to be -passed to main(). Complications arise when you have argument vector -elements that contain spaces of double quotes. The spawn*() functions -don't do any quoting or escaping, but on the other hand the startup -code does do unquoting and unescaping in order to enable receiving -arguments with embedded spaces or double quotes. To work around this -asymmetry, g_spawn_async_with_pipes() will do quoting and escaping on -argument vector elements that need it before calling the C runtime -spawn() function.

-

The returned child_pid - on Windows is a handle to the child -process, not its identifier. Process handles and process -identifiers are different concepts on Windows.

-

envp - is a NULL-terminated array of strings, where each string -has the form KEY=VALUE. This will become the child's environment. -If envp - is NULL, the child inherits its parent's environment.

-

flags - should be the bitwise OR of any flags you want to affect the -function's behaviour. The G_SPAWN_DO_NOT_REAP_CHILD means that the -child will not automatically be reaped; you must use a child watch to -be notified about the death of the child process. Eventually you must -call g_spawn_close_pid() on the child_pid -, in order to free -resources which may be associated with the child process. (On Unix, -using a child watch is equivalent to calling waitpid() or handling -the SIGCHLD signal manually. On Windows, calling g_spawn_close_pid() -is equivalent to calling CloseHandle() on the process handle returned -in child_pid -). See g_child_watch_add().

-

G_SPAWN_LEAVE_DESCRIPTORS_OPEN means that the parent's open file -descriptors will be inherited by the child; otherwise all descriptors -except stdin/stdout/stderr will be closed before calling exec() in -the child. G_SPAWN_SEARCH_PATH means that argv -[0] need not be an -absolute path, it will be looked for in the PATH environment -variable. G_SPAWN_SEARCH_PATH_FROM_ENVP means need not be an -absolute path, it will be looked for in the PATH variable from -envp -. If both G_SPAWN_SEARCH_PATH and G_SPAWN_SEARCH_PATH_FROM_ENVP -are used, the value from envp - takes precedence over the environment. -G_SPAWN_STDOUT_TO_DEV_NULL means that the child's standard output -will be discarded, instead of going to the same location as the parent's -standard output. If you use this flag, standard_output - must be NULL. -G_SPAWN_STDERR_TO_DEV_NULL means that the child's standard error -will be discarded, instead of going to the same location as the parent's -standard error. If you use this flag, standard_error - must be NULL. -G_SPAWN_CHILD_INHERITS_STDIN means that the child will inherit the parent's -standard input (by default, the child's standard input is attached to -/dev/null). If you use this flag, standard_input - must be NULL. -G_SPAWN_FILE_AND_ARGV_ZERO means that the first element of argv - is -the file to execute, while the remaining elements are the actual -argument vector to pass to the file. Normally g_spawn_async_with_pipes() -uses argv -[0] as the file to execute, and passes all of argv - to the child.

-

child_setup - and user_data - are a function and user data. On POSIX -platforms, the function is called in the child after GLib has -performed all the setup it plans to perform (including creating -pipes, closing file descriptors, etc.) but before calling exec(). -That is, child_setup - is called just before calling exec() in the -child. Obviously actions taken in this function will only affect -the child, not the parent.

-

On Windows, there is no separate fork() and exec() functionality. -Child processes are created and run with a single API call, -CreateProcess(). There is no sensible thing child_setup - -could be used for on Windows so it is ignored and not called.

-

If non-NULL, child_pid - will on Unix be filled with the child's -process ID. You can use the process ID to send signals to the child, -or to use g_child_watch_add() (or waitpid()) if you specified the -G_SPAWN_DO_NOT_REAP_CHILD flag. On Windows, child_pid - will be -filled with a handle to the child process only if you specified the -G_SPAWN_DO_NOT_REAP_CHILD flag. You can then access the child -process using the Win32 API, for example wait for its termination -with the WaitFor*() functions, or examine its exit code with -GetExitCodeProcess(). You should close the handle with CloseHandle() -or g_spawn_close_pid() when you no longer need it.

-

If non-NULL, the standard_input -, standard_output -, standard_error - -locations will be filled with file descriptors for writing to the child's -standard input or reading from its standard output or standard error. -The caller of g_spawn_async_with_pipes() must close these file descriptors -when they are no longer in use. If these parameters are NULL, the -corresponding pipe won't be created.

-

If standard_input - is NULL, the child's standard input is attached to -/dev/null unless G_SPAWN_CHILD_INHERITS_STDIN is set.

-

If standard_error - is NULL, the child's standard error goes to the same -location as the parent's standard error unless G_SPAWN_STDERR_TO_DEV_NULL -is set.

-

If standard_output - is NULL, the child's standard output goes to the same -location as the parent's standard output unless G_SPAWN_STDOUT_TO_DEV_NULL -is set.

-

error - can be NULL to ignore errors, or non-NULL to report errors. -If an error is set, the function returns FALSE. Errors are reported -even if they occur in the child (for example if the executable in -argv -[0] is not found). Typically the message field of returned -errors should be displayed to users. Possible errors are those from -the G_SPAWN_ERROR domain.

-

If an error occurs, child_pid -, standard_input -, standard_output -, -and standard_error - will not be filled with valid values.

-

If child_pid - is not NULL and an error does not occur then the returned -process reference must be closed using g_spawn_close_pid().

-

If you are writing a GTK+ application, and the program you -are spawning is a graphical application, too, then you may -want to use gdk_spawn_on_screen_with_pipes() instead to ensure that -the spawned program opens its windows on the right screen.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

working_directory

child's current working directory, or NULL to inherit parent's, in the GLib file name encoding.

[type filename][nullable]

argv

child's argument vector, in the GLib file name encoding.

[array zero-terminated=1]

envp

child's environment, or NULL to inherit parent's, in the GLib file name encoding.

[array zero-terminated=1][nullable]

flags

flags from GSpawnFlags

 

child_setup

function to run in the child just before exec().

[scope async][nullable]

user_data

user data for child_setup -.

[closure]

child_pid

return location for child process ID, or NULL.

[out][optional]

standard_input

return location for file descriptor to write to child's stdin, or NULL.

[out][optional]

standard_output

return location for file descriptor to read child's stdout, or NULL.

[out][optional]

standard_error

return location for file descriptor to read child's stderr, or NULL.

[out][optional]

error

return location for error

 
-
-
-

Returns

-

TRUE on success, FALSE if an error was set

-
-
-
-
-

g_spawn_async ()

-
gboolean
-g_spawn_async (const gchar *working_directory,
-               gchar **argv,
-               gchar **envp,
-               GSpawnFlags flags,
-               GSpawnChildSetupFunc child_setup,
-               gpointer user_data,
-               GPid *child_pid,
-               GError **error);
-

See g_spawn_async_with_pipes() for a full description; this function -simply calls the g_spawn_async_with_pipes() without any pipes.

-

You should call g_spawn_close_pid() on the returned child process -reference when you don't need it any more.

-

If you are writing a GTK+ application, and the program you are -spawning is a graphical application, too, then you may want to -use gdk_spawn_on_screen() instead to ensure that the spawned program -opens its windows on the right screen.

-

Note that the returned child_pid - on Windows is a handle to the child -process and not its identifier. Process handles and process identifiers -are different concepts on Windows.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

working_directory

child's current working directory, or NULL to inherit parent's.

[type filename][nullable]

argv

child's argument vector.

[array zero-terminated=1]

envp

child's environment, or NULL to inherit parent's.

[array zero-terminated=1][nullable]

flags

flags from GSpawnFlags

 

child_setup

function to run in the child just before exec().

[scope async][nullable]

user_data

user data for child_setup -.

[closure]

child_pid

return location for child process reference, or NULL.

[out][optional]

error

return location for error

 
-
-
-

Returns

-

TRUE on success, FALSE if error is set

-
-
-
-
-

g_spawn_sync ()

-
gboolean
-g_spawn_sync (const gchar *working_directory,
-              gchar **argv,
-              gchar **envp,
-              GSpawnFlags flags,
-              GSpawnChildSetupFunc child_setup,
-              gpointer user_data,
-              gchar **standard_output,
-              gchar **standard_error,
-              gint *exit_status,
-              GError **error);
-

Executes a child synchronously (waits for the child to exit before returning). -All output from the child is stored in standard_output - and standard_error -, -if those parameters are non-NULL. Note that you must set the -G_SPAWN_STDOUT_TO_DEV_NULL and G_SPAWN_STDERR_TO_DEV_NULL flags when -passing NULL for standard_output - and standard_error -.

-

If exit_status - is non-NULL, the platform-specific exit status of -the child is stored there; see the documentation of -g_spawn_check_exit_status() for how to use and interpret this. -Note that it is invalid to pass G_SPAWN_DO_NOT_REAP_CHILD in -flags -.

-

If an error occurs, no data is returned in standard_output -, -standard_error -, or exit_status -.

-

This function calls g_spawn_async_with_pipes() internally; see that -function for full details on the other parameters and details on -how these functions work on Windows.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

working_directory

child's current working directory, or NULL to inherit parent's.

[type filename][nullable]

argv

child's argument vector.

[array zero-terminated=1]

envp

child's environment, or NULL to inherit parent's.

[array zero-terminated=1][nullable]

flags

flags from GSpawnFlags

 

child_setup

function to run in the child just before exec().

[scope async][nullable]

user_data

user data for child_setup -.

[closure]

standard_output

return location for child output, or NULL.

[out][array zero-terminated=1][element-type guint8][optional]

standard_error

return location for child error messages, or NULL.

[out][array zero-terminated=1][element-type guint8][optional]

exit_status

return location for child exit status, as returned by waitpid(), or NULL.

[out][optional]

error

return location for error, or NULL

 
-
-
-

Returns

-

TRUE on success, FALSE if an error was set

-
-
-
-
-

g_spawn_check_exit_status ()

-
gboolean
-g_spawn_check_exit_status (gint exit_status,
-                           GError **error);
-

Set error - if exit_status - indicates the child exited abnormally -(e.g. with a nonzero exit code, or via a fatal signal).

-

The g_spawn_sync() and g_child_watch_add() family of APIs return an -exit status for subprocesses encoded in a platform-specific way. -On Unix, this is guaranteed to be in the same format waitpid() returns, -and on Windows it is guaranteed to be the result of GetExitCodeProcess().

-

Prior to the introduction of this function in GLib 2.34, interpreting -exit_status - required use of platform-specific APIs, which is problematic -for software using GLib as a cross-platform layer.

-

Additionally, many programs simply want to determine whether or not -the child exited successfully, and either propagate a GError or -print a message to standard error. In that common case, this function -can be used. Note that the error message in error - will contain -human-readable information about the exit status.

-

The domain - and code - of error - have special semantics in the case -where the process has an "exit code", as opposed to being killed by -a signal. On Unix, this happens if WIFEXITED() would be true of -exit_status -. On Windows, it is always the case.

-

The special semantics are that the actual exit code will be the -code set in error -, and the domain will be G_SPAWN_EXIT_ERROR. -This allows you to differentiate between different exit codes.

-

If the process was terminated by some means other than an exit -status, the domain will be G_SPAWN_ERROR, and the code will be -G_SPAWN_ERROR_FAILED.

-

This function just offers convenience; you can of course also check -the available platform via a macro such as G_OS_UNIX, and use -WIFEXITED() and WEXITSTATUS() on exit_status - directly. Do not attempt -to scan or parse the error message string; it may be translated and/or -change in future versions of GLib.

-
-

Parameters

-
----- - - - - - - - - - - - - -

exit_status

An exit code as returned from g_spawn_sync()

 

error

a GError

 
-
-
-

Returns

-

TRUE if child exited successfully, FALSE otherwise (and -error -will be set)

-
-

Since: 2.34

-
-
-
-

g_spawn_command_line_async ()

-
gboolean
-g_spawn_command_line_async (const gchar *command_line,
-                            GError **error);
-

A simple version of g_spawn_async() that parses a command line with -g_shell_parse_argv() and passes it to g_spawn_async(). Runs a -command line in the background. Unlike g_spawn_async(), the -G_SPAWN_SEARCH_PATH flag is enabled, other flags are not. Note -that G_SPAWN_SEARCH_PATH can have security implications, so -consider using g_spawn_async() directly if appropriate. Possible -errors are those from g_shell_parse_argv() and g_spawn_async().

-

The same concerns on Windows apply as for g_spawn_command_line_sync().

-
-

Parameters

-
----- - - - - - - - - - - - - -

command_line

a command line

 

error

return location for errors

 
-
-
-

Returns

-

TRUE on success, FALSE if error is set

-
-
-
-
-

g_spawn_command_line_sync ()

-
gboolean
-g_spawn_command_line_sync (const gchar *command_line,
-                           gchar **standard_output,
-                           gchar **standard_error,
-                           gint *exit_status,
-                           GError **error);
-

A simple version of g_spawn_sync() with little-used parameters -removed, taking a command line instead of an argument vector. See -g_spawn_sync() for full details. command_line - will be parsed by -g_shell_parse_argv(). Unlike g_spawn_sync(), the G_SPAWN_SEARCH_PATH flag -is enabled. Note that G_SPAWN_SEARCH_PATH can have security -implications, so consider using g_spawn_sync() directly if -appropriate. Possible errors are those from g_spawn_sync() and those -from g_shell_parse_argv().

-

If exit_status - is non-NULL, the platform-specific exit status of -the child is stored there; see the documentation of -g_spawn_check_exit_status() for how to use and interpret this.

-

On Windows, please note the implications of g_shell_parse_argv() -parsing command_line -. Parsing is done according to Unix shell rules, not -Windows command interpreter rules. -Space is a separator, and backslashes are -special. Thus you cannot simply pass a command_line - containing -canonical Windows paths, like "c:\program files\app\app.exe", as -the backslashes will be eaten, and the space will act as a -separator. You need to enclose such paths with single quotes, like -"'c:\program files\app\app.exe' 'e:\folder\argument.txt'".

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

command_line

a command line

 

standard_output

return location for child output.

[out][array zero-terminated=1][element-type guint8][optional]

standard_error

return location for child errors.

[out][array zero-terminated=1][element-type guint8][optional]

exit_status

return location for child exit status, as returned by waitpid().

[out][optional]

error

return location for errors

 
-
-
-

Returns

-

TRUE on success, FALSE if an error was set

-
-
-
-
-

g_spawn_close_pid ()

-
void
-g_spawn_close_pid (GPid pid);
-

On some platforms, notably Windows, the GPid type represents a resource -which must be closed to prevent resource leaking. g_spawn_close_pid() -is provided for this purpose. It should be used on all platforms, even -though it doesn't do anything under UNIX.

-
-

Parameters

-
----- - - - - - -

pid

The process reference to close

 
-
-
-
-
-

Types and Values

-
-

enum GSpawnError

-

Error codes returned by spawning processes.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_SPAWN_ERROR_FORK

-

Fork failed due to lack of memory.

-
 

G_SPAWN_ERROR_READ

-

Read or select on pipes failed.

-
 

G_SPAWN_ERROR_CHDIR

-

Changing to working directory failed.

-
 

G_SPAWN_ERROR_ACCES

-

execv() returned EACCES

-
 

G_SPAWN_ERROR_PERM

-

execv() returned EPERM

-
 

G_SPAWN_ERROR_TOO_BIG

-

execv() returned E2BIG

-
 

G_SPAWN_ERROR_2BIG

-

deprecated alias for G_SPAWN_ERROR_TOO_BIG

-
 

G_SPAWN_ERROR_NOEXEC

-

execv() returned ENOEXEC

-
 

G_SPAWN_ERROR_NAMETOOLONG

-

execv() returned ENAMETOOLONG

-
 

G_SPAWN_ERROR_NOENT

-

execv() returned ENOENT

-
 

G_SPAWN_ERROR_NOMEM

-

execv() returned ENOMEM

-
 

G_SPAWN_ERROR_NOTDIR

-

execv() returned ENOTDIR

-
 

G_SPAWN_ERROR_LOOP

-

execv() returned ELOOP

-
 

G_SPAWN_ERROR_TXTBUSY

-

execv() returned ETXTBUSY

-
 

G_SPAWN_ERROR_IO

-

execv() returned EIO

-
 

G_SPAWN_ERROR_NFILE

-

execv() returned ENFILE

-
 

G_SPAWN_ERROR_MFILE

-

execv() returned EMFILE

-
 

G_SPAWN_ERROR_INVAL

-

execv() returned EINVAL

-
 

G_SPAWN_ERROR_ISDIR

-

execv() returned EISDIR

-
 

G_SPAWN_ERROR_LIBBAD

-

execv() returned ELIBBAD

-
 

G_SPAWN_ERROR_FAILED

-

Some other fatal failure, - error->message should explain.

-
 
-
-
-
-
-

G_SPAWN_ERROR

-
#define G_SPAWN_ERROR g_spawn_error_quark ()
-
-

Error domain for spawning processes. Errors in this domain will -be from the GSpawnError enumeration. See GError for information on -error domains.

-
-
-
-

enum GSpawnFlags

-

Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_SPAWN_DEFAULT

-

no flags, default behaviour

-
 

G_SPAWN_LEAVE_DESCRIPTORS_OPEN

-

the parent's open file descriptors will - be inherited by the child; otherwise all descriptors except stdin, - stdout and stderr will be closed before calling exec() in the child.

-
 

G_SPAWN_DO_NOT_REAP_CHILD

-

the child will not be automatically reaped; - you must use g_child_watch_add() yourself (or call waitpid() or handle - SIGCHLD yourself), or the child will become a zombie.

-
 

G_SPAWN_SEARCH_PATH

-

argv[0] need not be an absolute path, it will be - looked for in the user's PATH.

-
 

G_SPAWN_STDOUT_TO_DEV_NULL

-

the child's standard output will be discarded, - instead of going to the same location as the parent's standard output.

-
 

G_SPAWN_STDERR_TO_DEV_NULL

-

the child's standard error will be discarded.

-
 

G_SPAWN_CHILD_INHERITS_STDIN

-

the child will inherit the parent's standard - input (by default, the child's standard input is attached to /dev/null).

-
 

G_SPAWN_FILE_AND_ARGV_ZERO

-

the first element of argv is the file to - execute, while the remaining elements are the actual argument vector - to pass to the file. Normally g_spawn_async_with_pipes() uses argv[0] - as the file to execute, and passes all of argv to the child.

-
 

G_SPAWN_SEARCH_PATH_FROM_ENVP

-

if argv[0] is not an abolute path, - it will be looked for in the PATH from the passed child environment. - Since: 2.34

-
 

G_SPAWN_CLOEXEC_PIPES

-

create all pipes with the O_CLOEXEC flag set. - Since: 2.40

-
 
-
-
-
-
-

G_SPAWN_EXIT_ERROR

-
#define G_SPAWN_EXIT_ERROR g_spawn_exit_error_quark ()
-
-

Error domain used by g_spawn_check_exit_status(). The code -will be the program exit code.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Standard-Macros.html b/docs/reference/glib/html/glib-Standard-Macros.html deleted file mode 100644 index 47658e40b..000000000 --- a/docs/reference/glib/html/glib-Standard-Macros.html +++ /dev/null @@ -1,585 +0,0 @@ - - - - -Standard Macros: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Standard Macros

-

Standard Macros — commonly-used macros

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -G_IS_DIR_SEPARATOR() -
#define -MIN() -
#define -MAX() -
#define -ABS() -
#define -CLAMP() -
#define -G_STRUCT_MEMBER() -
#define -G_STRUCT_MEMBER_P() -
#define -G_STRUCT_OFFSET() -
#define -G_N_ELEMENTS() -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#defineG_OS_WIN32
#defineG_OS_UNIX
#defineG_DIR_SEPARATOR
#defineG_DIR_SEPARATOR_S
#defineG_SEARCHPATH_SEPARATOR
#defineG_SEARCHPATH_SEPARATOR_S
#defineTRUE
#defineFALSE
#defineNULL
#defineG_MEM_ALIGN
#defineG_CONST_RETURN
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

These macros provide a few commonly-used features.

-
-
-

Functions

-
-

G_IS_DIR_SEPARATOR()

-
#define G_IS_DIR_SEPARATOR(c) ((c) == G_DIR_SEPARATOR || (c) == '/')
-
-

Checks whether a character is a directory -separator. It returns TRUE for '/' on UNIX -machines and for '\' or '/' under Windows.

-
-

Parameters

-
----- - - - - - -

c

a character

 
-
-

Since: 2.6

-
-
-
-

MIN()

-
#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
-
-

Calculates the minimum of a - and b -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

a

a numeric value

 

b

a numeric value

 
-
-
-

Returns

-

the minimum of a -and b -.

-
-
-
-
-

MAX()

-
#define MAX(a, b)  (((a) > (b)) ? (a) : (b))
-
-

Calculates the maximum of a - and b -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

a

a numeric value

 

b

a numeric value

 
-
-
-

Returns

-

the maximum of a -and b -.

-
-
-
-
-

ABS()

-
#define ABS(a)	   (((a) < 0) ? -(a) : (a))
-
-

Calculates the absolute value of a -. -The absolute value is simply the number with any negative sign taken away.

-

For example,

-
    -
  • ABS(-10) is 10.

  • -
  • ABS(10) is also 10.

  • -
-
-

Parameters

-
----- - - - - - -

a

a numeric value

 
-
-
-

Returns

-

the absolute value of a -.

-
-
-
-
-

CLAMP()

-
#define CLAMP(x, low, high)  (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
-
-

Ensures that x - is between the limits set by low - and high -. If low - is -greater than high - the result is undefined.

-

For example,

-
    -
  • CLAMP(5, 10, 15) is 10.

  • -
  • CLAMP(15, 5, 10) is 10.

  • -
  • CLAMP(20, 15, 25) is 20.

  • -
-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

x

the value to clamp

 

low

the minimum value allowed

 

high

the maximum value allowed

 
-
-
-

Returns

-

the value of x -clamped to the range between low -and high -

-
-
-
-
-

G_STRUCT_MEMBER()

-
#define             G_STRUCT_MEMBER(member_type, struct_p, struct_offset)
-

Returns a member of a structure at a given offset, using the given type.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

member_type

the type of the struct field

 

struct_p

a pointer to a struct

 

struct_offset

the offset of the field from the start of the struct, -in bytes

 
-
-
-

Returns

-

the struct member

-
-
-
-
-

G_STRUCT_MEMBER_P()

-
#define             G_STRUCT_MEMBER_P(struct_p, struct_offset)
-

Returns an untyped pointer to a given offset of a struct.

-
-

Parameters

-
----- - - - - - - - - - - - - -

struct_p

a pointer to a struct

 

struct_offset

the offset from the start of the struct, in bytes

 
-
-
-

Returns

-

an untyped pointer to struct_p -plus struct_offset -bytes

-
-
-
-
-

G_STRUCT_OFFSET()

-
#define             G_STRUCT_OFFSET(struct_type, member)
-

Returns the offset, in bytes, of a member of a struct.

-
-

Parameters

-
----- - - - - - - - - - - - - -

struct_type

a structure type, e.g. GtkWidget

 

member

a field in the structure, e.g. window -

 
-
-
-

Returns

-

the offset of member -from the start of struct_type -

-
-
-
-
-

G_N_ELEMENTS()

-
#define G_N_ELEMENTS(arr)		(sizeof (arr) / sizeof ((arr)[0]))
-
-

Determines the number of elements in an array. The array must be -declared so the compiler knows its size at compile-time; this -macro will not work on an array allocated on the heap, only static -arrays or arrays on the stack.

-
-

Parameters

-
----- - - - - - -

arr

the array

 
-
-
-
-
-

Types and Values

-
-

G_OS_WIN32

-
#define G_OS_WIN32
-
-

This macro is defined only on Windows. So you can bracket -Windows-specific code in "#ifdef G_OS_WIN32".

-
-
-
-

G_OS_UNIX

-
#define G_OS_UNIX
-
-

This macro is defined only on UNIX. So you can bracket -UNIX-specific code in "#ifdef G_OS_UNIX".

-
-
-
-

G_DIR_SEPARATOR

-
#define G_DIR_SEPARATOR '\\'
-
-

The directory separator character. -This is '/' on UNIX machines and '\' under Windows.

-
-
-
-

G_DIR_SEPARATOR_S

-
#define G_DIR_SEPARATOR_S "\\"
-
-

The directory separator as a string. -This is "/" on UNIX machines and "\" under Windows.

-
-
-
-

G_SEARCHPATH_SEPARATOR

-
#define G_SEARCHPATH_SEPARATOR ';'
-
-

The search path separator character. -This is ':' on UNIX machines and ';' under Windows.

-
-
-
-

G_SEARCHPATH_SEPARATOR_S

-
#define G_SEARCHPATH_SEPARATOR_S ";"
-
-

The search path separator as a string. -This is ":" on UNIX machines and ";" under Windows.

-
-
-
-

TRUE

-
#define TRUE (!FALSE)
-
-

Defines the TRUE value for the gboolean type.

-
-
-
-

FALSE

-
#define FALSE (0)
-
-

Defines the FALSE value for the gboolean type.

-
-
-
-

NULL

-
#  define NULL        (0L)
-
-

Defines the standard NULL pointer.

-
-
-
-

G_MEM_ALIGN

-
#  define G_MEM_ALIGN GLIB_SIZEOF_VOID_P
-
-

Indicates the number of bytes to which memory will be aligned on the -current platform.

-
-
-
-

G_CONST_RETURN

-
#define G_CONST_RETURN
-
-
-

G_CONST_RETURN has been deprecated since version 2.30 and should not be used in newly-written code.

-

API providers should replace all existing uses with -const and API consumers should adjust their code accordingly

-
-

If G_DISABLE_CONST_RETURNS is defined, this macro expands -to nothing. By default, the macro expands to const. The macro -can be used in place of const for functions that return a value -that should not be modified. The purpose of this macro is to allow -us to turn on const for returned constant strings by default, while -allowing programmers who find that annoying to turn it off. This macro -should only be used for return values and for "out" parameters, it -doesn't make sense for "in" parameters.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-String-Chunks.html b/docs/reference/glib/html/glib-String-Chunks.html deleted file mode 100644 index 97c7b7bf1..000000000 --- a/docs/reference/glib/html/glib-String-Chunks.html +++ /dev/null @@ -1,369 +0,0 @@ - - - - -String Chunks: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

String Chunks

-

String Chunks — efficient storage of groups of strings

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GStringChunk * - -g_string_chunk_new () -
-gchar * - -g_string_chunk_insert () -
-gchar * - -g_string_chunk_insert_const () -
-gchar * - -g_string_chunk_insert_len () -
-void - -g_string_chunk_clear () -
-void - -g_string_chunk_free () -
-
-
-

Types and Values

-
---- - - - - -
 GStringChunk
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

String chunks are used to store groups of strings. Memory is -allocated in blocks, and as strings are added to the GStringChunk -they are copied into the next free position in a block. When a block -is full a new block is allocated.

-

When storing a large number of strings, string chunks are more -efficient than using g_strdup() since fewer calls to malloc() are -needed, and less memory is wasted in memory allocation overheads.

-

By adding strings with g_string_chunk_insert_const() it is also -possible to remove duplicates.

-

To create a new GStringChunk use g_string_chunk_new().

-

To add strings to a GStringChunk use g_string_chunk_insert().

-

To add strings to a GStringChunk, but without duplicating strings -which are already in the GStringChunk, use -g_string_chunk_insert_const().

-

To free the entire GStringChunk use g_string_chunk_free(). It is -not possible to free individual strings.

-
-
-

Functions

-
-

g_string_chunk_new ()

-
GStringChunk *
-g_string_chunk_new (gsize size);
-

Creates a new GStringChunk.

-
-

Parameters

-
----- - - - - - -

size

the default size of the blocks of memory which are -allocated to store the strings. If a particular string -is larger than this default size, a larger block of -memory will be allocated for it.

 
-
-
-

Returns

-

a new GStringChunk

-
-
-
-
-

g_string_chunk_insert ()

-
gchar *
-g_string_chunk_insert (GStringChunk *chunk,
-                       const gchar *string);
-

Adds a copy of string - to the GStringChunk. -It returns a pointer to the new copy of the string -in the GStringChunk. The characters in the string -can be changed, if necessary, though you should not -change anything after the end of the string.

-

Unlike g_string_chunk_insert_const(), this function -does not check for duplicates. Also strings added -with g_string_chunk_insert() will not be searched -by g_string_chunk_insert_const() when looking for -duplicates.

-
-

Parameters

-
----- - - - - - - - - - - - - -

chunk

a GStringChunk

 

string

the string to add

 
-
-
-

Returns

-

a pointer to the copy of string -within -the GStringChunk

-
-
-
-
-

g_string_chunk_insert_const ()

-
gchar *
-g_string_chunk_insert_const (GStringChunk *chunk,
-                             const gchar *string);
-

Adds a copy of string - to the GStringChunk, unless the same -string has already been added to the GStringChunk with -g_string_chunk_insert_const().

-

This function is useful if you need to copy a large number -of strings but do not want to waste space storing duplicates. -But you must remember that there may be several pointers to -the same string, and so any changes made to the strings -should be done very carefully.

-

Note that g_string_chunk_insert_const() will not return a -pointer to a string added with g_string_chunk_insert(), even -if they do match.

-
-

Parameters

-
----- - - - - - - - - - - - - -

chunk

a GStringChunk

 

string

the string to add

 
-
-
-

Returns

-

a pointer to the new or existing copy of string -within the GStringChunk

-
-
-
-
-

g_string_chunk_insert_len ()

-
gchar *
-g_string_chunk_insert_len (GStringChunk *chunk,
-                           const gchar *string,
-                           gssize len);
-

Adds a copy of the first len - bytes of string - to the GStringChunk. -The copy is nul-terminated.

-

Since this function does not stop at nul bytes, it is the caller's -responsibility to ensure that string - has at least len - addressable -bytes.

-

The characters in the returned string can be changed, if necessary, -though you should not change anything after the end of the string.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

chunk

a GStringChunk

 

string

bytes to insert

 

len

number of bytes of string -to insert, or -1 to insert a -nul-terminated string

 
-
-
-

Returns

-

a pointer to the copy of string -within the GStringChunk

-
-

Since: 2.4

-
-
-
-

g_string_chunk_clear ()

-
void
-g_string_chunk_clear (GStringChunk *chunk);
-

Frees all strings contained within the GStringChunk. -After calling g_string_chunk_clear() it is not safe to -access any of the strings which were contained within it.

-
-

Parameters

-
----- - - - - - -

chunk

a GStringChunk

 
-
-

Since: 2.14

-
-
-
-

g_string_chunk_free ()

-
void
-g_string_chunk_free (GStringChunk *chunk);
-

Frees all memory allocated by the GStringChunk. -After calling g_string_chunk_free() it is not safe to -access any of the strings which were contained within it.

-
-

Parameters

-
----- - - - - - -

chunk

a GStringChunk

 
-
-
-
-
-

Types and Values

-
-

GStringChunk

-
typedef struct _GStringChunk GStringChunk;
-

An opaque data structure representing String Chunks. -It should only be accessed by using the following functions.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-String-Utility-Functions.html b/docs/reference/glib/html/glib-String-Utility-Functions.html deleted file mode 100644 index 0ed024825..000000000 --- a/docs/reference/glib/html/glib-String-Utility-Functions.html +++ /dev/null @@ -1,4060 +0,0 @@ - - - - -String Utility Functions: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

String Utility Functions

-

String Utility Functions — various string-related functions

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gchar * - -g_strdup () -
-gchar * - -g_strndup () -
-gchar ** - -g_strdupv () -
-gchar * - -g_strnfill () -
-gchar * - -g_stpcpy () -
-gchar * - -g_strstr_len () -
-gchar * - -g_strrstr () -
-gchar * - -g_strrstr_len () -
-gboolean - -g_str_has_prefix () -
-gboolean - -g_str_has_suffix () -
-int - -g_strcmp0 () -
-gchar * - -g_str_to_ascii () -
-gchar ** - -g_str_tokenize_and_fold () -
-gboolean - -g_str_match_string () -
-gsize - -g_strlcpy () -
-gsize - -g_strlcat () -
-gchar * - -g_strdup_printf () -
-gchar * - -g_strdup_vprintf () -
-gint - -g_printf () -
-gint - -g_vprintf () -
-gint - -g_fprintf () -
-gint - -g_vfprintf () -
-gint - -g_sprintf () -
-gint - -g_vsprintf () -
-gint - -g_snprintf () -
-gint - -g_vsnprintf () -
-gint - -g_vasprintf () -
-gsize - -g_printf_string_upper_bound () -
-gboolean - -g_str_is_ascii () -
-gboolean - -g_ascii_isalnum () -
-gboolean - -g_ascii_isalpha () -
-gboolean - -g_ascii_iscntrl () -
-gboolean - -g_ascii_isdigit () -
-gboolean - -g_ascii_isgraph () -
-gboolean - -g_ascii_islower () -
-gboolean - -g_ascii_isprint () -
-gboolean - -g_ascii_ispunct () -
-gboolean - -g_ascii_isspace () -
-gboolean - -g_ascii_isupper () -
-gboolean - -g_ascii_isxdigit () -
-gint - -g_ascii_digit_value () -
-gint - -g_ascii_xdigit_value () -
-gint - -g_ascii_strcasecmp () -
-gint - -g_ascii_strncasecmp () -
-gchar * - -g_ascii_strup () -
-gchar * - -g_ascii_strdown () -
-gchar - -g_ascii_tolower () -
-gchar - -g_ascii_toupper () -
-GString * - -g_string_ascii_up () -
-GString * - -g_string_ascii_down () -
-gchar * - -g_strup () -
-gchar * - -g_strdown () -
-gint - -g_strcasecmp () -
-gint - -g_strncasecmp () -
-gchar * - -g_strreverse () -
-gint64 - -g_ascii_strtoll () -
-guint64 - -g_ascii_strtoull () -
-gdouble - -g_ascii_strtod () -
-gchar * - -g_ascii_dtostr () -
-gchar * - -g_ascii_formatd () -
-gdouble - -g_strtod () -
-gchar * - -g_strchug () -
-gchar * - -g_strchomp () -
#define -g_strstrip() -
-gchar * - -g_strdelimit () -
-gchar * - -g_strescape () -
-gchar * - -g_strcompress () -
-gchar * - -g_strcanon () -
-gchar ** - -g_strsplit () -
-gchar ** - -g_strsplit_set () -
-void - -g_strfreev () -
-gchar * - -g_strconcat () -
-gchar * - -g_strjoin () -
-gchar * - -g_strjoinv () -
-guint - -g_strv_length () -
-gboolean - -g_strv_contains () -
const gchar * - -g_strerror () -
const gchar * - -g_strsignal () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
#defineG_ASCII_DTOSTR_BUF_SIZE
#defineG_STR_DELIMITERS
typedefGStrv
-
-
-

Includes

-
#include <glib.h>
-#include <glib/gprintf.h>
-
-
-
-

Description

-

This section describes a number of utility functions for creating, -duplicating, and manipulating strings.

-

Note that the functions g_printf(), g_fprintf(), g_sprintf(), -g_snprintf(), g_vprintf(), g_vfprintf(), g_vsprintf() and g_vsnprintf() -are declared in the header gprintf.h which is not included in glib.h -(otherwise using glib.h would drag in stdio.h), so you'll have to -explicitly include <glib/gprintf.h> in order to use the GLib -printf() functions.

-
-

String precision pitfalls

-

While you may use the printf() functions to format UTF-8 strings, -notice that the precision of a %Ns parameter is interpreted -as the number of bytes, not characters to print. On top of that, -the GNU libc implementation of the printf() functions has the -"feature" that it checks that the string given for the %Ns -parameter consists of a whole number of characters in the current -encoding. So, unless you are sure you are always going to be in an -UTF-8 locale or your know your text is restricted to ASCII, avoid -using %Ns. If your intention is to format strings for a -certain number of columns, then %Ns is not a correct solution -anyway, since it fails to take wide characters (see g_unichar_iswide()) -into account.

-

Note also that there are various printf() parameters which are platform -dependent. GLib provides platform independent macros for these parameters -which should be used instead. A common example is G_GUINT64_FORMAT, which -should be used instead of %llu or similar parameters for formatting -64-bit integers. These macros are all named G_*_FORMAT; see -Basic Types.

-
-
-
-

Functions

-
-

g_strdup ()

-
gchar *
-g_strdup (const gchar *str);
-

Duplicates a string. If str - is NULL it returns NULL. -The returned string should be freed with g_free() -when no longer needed.

-
-

Parameters

-
----- - - - - - -

str

the string to duplicate.

[nullable]
-
-
-

Returns

-

a newly-allocated copy of str -

-
-
-
-
-

g_strndup ()

-
gchar *
-g_strndup (const gchar *str,
-           gsize n);
-

Duplicates the first n - bytes of a string, returning a newly-allocated -buffer n - + 1 bytes long which will always be nul-terminated. If str - -is less than n - bytes long the buffer is padded with nuls. If str - is -NULL it returns NULL. The returned value should be freed when no longer -needed.

-

To copy a number of characters from a UTF-8 encoded string, -use g_utf8_strncpy() instead.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

the string to duplicate

 

n

the maximum number of bytes to copy from str -

 
-
-
-

Returns

-

a newly-allocated buffer containing the first n -bytes -of str -, nul-terminated

-
-
-
-
-

g_strdupv ()

-
gchar **
-g_strdupv (gchar **str_array);
-

Copies NULL-terminated array of strings. The copy is a deep copy; -the new array should be freed by first freeing each string, then -the array itself. g_strfreev() does this for you. If called -on a NULL value, g_strdupv() simply returns NULL.

-
-

Parameters

-
----- - - - - - -

str_array

a NULL-terminated array of strings.

[nullable]
-
-
-

Returns

-

a new NULL-terminated array of strings.

-

[nullable]

-
-
-
-
-

g_strnfill ()

-
gchar *
-g_strnfill (gsize length,
-            gchar fill_char);
-

Creates a new string length - bytes long filled with fill_char -. -The returned string should be freed when no longer needed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

length

the length of the new string

 

fill_char

the byte to fill the string with

 
-
-
-

Returns

-

a newly-allocated string filled the fill_char -

-
-
-
-
-

g_stpcpy ()

-
gchar *
-g_stpcpy (gchar *dest,
-          const char *src);
-

Copies a nul-terminated string into the dest buffer, include the -trailing nul, and return a pointer to the trailing nul byte. -This is useful for concatenating multiple strings together -without having to repeatedly scan for the end.

-
-

Parameters

-
----- - - - - - - - - - - - - -

dest

destination buffer.

 

src

source string.

 
-
-
-

Returns

-

a pointer to trailing nul byte.

-
-
-
-
-

g_strstr_len ()

-
gchar *
-g_strstr_len (const gchar *haystack,
-              gssize haystack_len,
-              const gchar *needle);
-

Searches the string haystack - for the first occurrence -of the string needle -, limiting the length of the search -to haystack_len -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

haystack

a string

 

haystack_len

the maximum length of haystack -. Note that -1 is -a valid length, if haystack -is nul-terminated, meaning it will -search through the whole string.

 

needle

the string to search for

 
-
-
-

Returns

-

a pointer to the found occurrence, or -NULL if not found.

-
-
-
-
-

g_strrstr ()

-
gchar *
-g_strrstr (const gchar *haystack,
-           const gchar *needle);
-

Searches the string haystack - for the last occurrence -of the string needle -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

haystack

a nul-terminated string

 

needle

the nul-terminated string to search for

 
-
-
-

Returns

-

a pointer to the found occurrence, or -NULL if not found.

-
-
-
-
-

g_strrstr_len ()

-
gchar *
-g_strrstr_len (const gchar *haystack,
-               gssize haystack_len,
-               const gchar *needle);
-

Searches the string haystack - for the last occurrence -of the string needle -, limiting the length of the search -to haystack_len -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

haystack

a nul-terminated string

 

haystack_len

the maximum length of haystack -

 

needle

the nul-terminated string to search for

 
-
-
-

Returns

-

a pointer to the found occurrence, or -NULL if not found.

-
-
-
-
-

g_str_has_prefix ()

-
gboolean
-g_str_has_prefix (const gchar *str,
-                  const gchar *prefix);
-

Looks whether the string str - begins with prefix -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

a nul-terminated string

 

prefix

the nul-terminated prefix to look for

 
-
-
-

Returns

-

TRUE if str -begins with prefix -, FALSE otherwise.

-
-

Since: 2.2

-
-
-
-

g_str_has_suffix ()

-
gboolean
-g_str_has_suffix (const gchar *str,
-                  const gchar *suffix);
-

Looks whether the string str - ends with suffix -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

a nul-terminated string

 

suffix

the nul-terminated suffix to look for

 
-
-
-

Returns

-

TRUE if str -end with suffix -, FALSE otherwise.

-
-

Since: 2.2

-
-
-
-

g_strcmp0 ()

-
int
-g_strcmp0 (const char *str1,
-           const char *str2);
-

Compares str1 - and str2 - like strcmp(). Handles NULL -gracefully by sorting it before non-NULL strings. -Comparing two NULL pointers returns 0.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str1

a C string or NULL.

[nullable]

str2

another C string or NULL.

[nullable]
-
-
-

Returns

-

an integer less than, equal to, or greater than zero, if str1 -is <, == or > than str2 -.

-
-

Since: 2.16

-
-
-
-

g_str_to_ascii ()

-
gchar *
-g_str_to_ascii (const gchar *str,
-                const gchar *from_locale);
-

Transliterate str - to plain ASCII.

-

For best results, str - should be in composed normalised form.

-

This function performs a reasonably good set of character -replacements. The particular set of replacements that is done may -change by version or even by runtime environment.

-

If the source language of str - is known, it can used to improve the -accuracy of the translation by passing it as from_locale -. It should -be a valid POSIX locale string (of the form -"language_territory[modifier -]").

-

If from_locale - is NULL then the current locale is used.

-

If you want to do translation for no specific locale, and you want it -to be done independently of the currently locale, specify "C" for -from_locale -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

a string, in UTF-8

 

from_locale

the source locale, if known.

[nullable]
-
-
-

Returns

-

a string in plain ASCII

-
-

Since: 2.40

-
-
-
-

g_str_tokenize_and_fold ()

-
gchar **
-g_str_tokenize_and_fold (const gchar *string,
-                         const gchar *translit_locale,
-                         gchar ***ascii_alternates);
-

Tokenises string - and performs folding on each token.

-

A token is a non-empty sequence of alphanumeric characters in the -source string, separated by non-alphanumeric characters. An -"alphanumeric" character for this purpose is one that matches -g_unichar_isalnum() or g_unichar_ismark().

-

Each token is then (Unicode) normalised and case-folded. If -ascii_alternates - is non-NULL and some of the returned tokens -contain non-ASCII characters, ASCII alternatives will be generated.

-

The number of ASCII alternatives that are generated and the method -for doing so is unspecified, but translit_locale - (if specified) may -improve the transliteration if the language of the source string is -known.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a string

 

translit_locale

the language code (like 'de' or -'en_GB') from which string -originates.

[nullable]

ascii_alternates

a -return location for ASCII alternates.

[out][transfer full][array zero-terminated=1]
-
-
-

Returns

-

the folded tokens.

-

[transfer full][array zero-terminated=1]

-
-

Since: 2.40

-
-
-
-

g_str_match_string ()

-
gboolean
-g_str_match_string (const gchar *search_term,
-                    const gchar *potential_hit,
-                    gboolean accept_alternates);
-

Checks if a search conducted for search_term - should match -potential_hit -.

-

This function calls g_str_tokenize_and_fold() on both -search_term - and potential_hit -. ASCII alternates are never taken -for search_term - but will be taken for potential_hit - according to -the value of accept_alternates -.

-

A hit occurs when each folded token in search_term - is a prefix of a -folded token from potential_hit -.

-

Depending on how you're performing the search, it will typically be -faster to call g_str_tokenize_and_fold() on each string in -your corpus and build an index on the returned folded tokens, then -call g_str_tokenize_and_fold() on the search term and -perform lookups into that index.

-

As some examples, searching for "fred" would match the potential hit -"Smith, Fred" and also "Frédéric". Searching for "Fréd" would match -"Frédéric" but not "Frederic" (due to the one-directional nature of -accent matching). Searching "fo" would match "Foo" and "Bar Foo -Baz", but not "SFO" (because no word as "fo" as a prefix).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

search_term

the search term from the user

 

potential_hit

the text that may be a hit

 

accept_alternates

TRUE to accept ASCII alternates

 
-
-
-

Returns

-

TRUE if potential_hit -is a hit

-
-

Since: 2.40

-
-
-
-

g_strlcpy ()

-
gsize
-g_strlcpy (gchar *dest,
-           const gchar *src,
-           gsize dest_size);
-

Portability wrapper that calls strlcpy() on systems which have it, -and emulates strlcpy() otherwise. Copies src - to dest -; dest - is -guaranteed to be nul-terminated; src - must be nul-terminated; -dest_size - is the buffer size, not the number of bytes to copy.

-

At most dest_size - - 1 characters will be copied. Always nul-terminates -(unless dest_size - is 0). This function does not allocate memory. Unlike -strncpy(), this function doesn't pad dest - (so it's often faster). It -returns the size of the attempted result, strlen (src), so if -retval - >= dest_size -, truncation occurred.

-

Caveat: strlcpy() is supposedly more secure than strcpy() or strncpy(), -but if you really want to avoid screwups, g_strdup() is an even better -idea.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dest

destination buffer

 

src

source buffer

 

dest_size

length of dest -in bytes

 
-
-
-

Returns

-

length of src -

-
-
-
-
-

g_strlcat ()

-
gsize
-g_strlcat (gchar *dest,
-           const gchar *src,
-           gsize dest_size);
-

Portability wrapper that calls strlcat() on systems which have it, -and emulates it otherwise. Appends nul-terminated src - string to dest -, -guaranteeing nul-termination for dest -. The total size of dest - won't -exceed dest_size -.

-

At most dest_size - - 1 characters will be copied. Unlike strncat(), -dest_size - is the full size of dest, not the space left over. This -function does not allocate memory. It always nul-terminates (unless -dest_size - == 0 or there were no nul characters in the dest_size - -characters of dest to start with).

-

Caveat: this is supposedly a more secure alternative to strcat() or -strncat(), but for real security g_strconcat() is harder to mess up.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dest

destination buffer, already containing one nul-terminated string

 

src

source buffer

 

dest_size

length of dest -buffer in bytes (not length of existing string -inside dest -)

 
-
-
-

Returns

-

size of attempted result, which is MIN (dest_size, strlen -(original dest)) + strlen (src), so if retval >= dest_size, -truncation occurred.

-
-
-
-
-

g_strdup_printf ()

-
gchar *
-g_strdup_printf (const gchar *format,
-                 ...);
-

Similar to the standard C sprintf() function but safer, since it -calculates the maximum space required and allocates memory to hold -the result. The returned string should be freed with g_free() when no -longer needed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

format

a standard printf() format string, but notice -string precision pitfalls

 

...

the parameters to insert into the format string

 
-
-
-

Returns

-

a newly-allocated string holding the result

-
-
-
-
-

g_strdup_vprintf ()

-
gchar *
-g_strdup_vprintf (const gchar *format,
-                  va_list args);
-

Similar to the standard C vsprintf() function but safer, since it -calculates the maximum space required and allocates memory to hold -the result. The returned string should be freed with g_free() when -no longer needed.

-

See also g_vasprintf(), which offers the same functionality, but -additionally returns the length of the allocated string.

-
-

Parameters

-
----- - - - - - - - - - - - - -

format

a standard printf() format string, but notice -string precision pitfalls

 

args

the list of parameters to insert into the format string

 
-
-
-

Returns

-

a newly-allocated string holding the result

-
-
-
-
-

g_printf ()

-
gint
-g_printf (gchar const *format,
-          ...);
-

An implementation of the standard printf() function which supports -positional parameters, as specified in the Single Unix Specification.

-

As with the standard printf(), this does not automatically append a trailing -new-line character to the message, so typically format - should end with its -own new-line character.

-
-

Parameters

-
----- - - - - - - - - - - - - -

format

a standard printf() format string, but notice -string precision pitfalls

 

...

the arguments to insert in the output.

 
-
-
-

Returns

-

the number of bytes printed.

-
-

Since: 2.2

-
-
-
-

g_vprintf ()

-
gint
-g_vprintf (gchar const *format,
-           va_list args);
-

An implementation of the standard vprintf() function which supports -positional parameters, as specified in the Single Unix Specification.

-
-

Parameters

-
----- - - - - - - - - - - - - -

format

a standard printf() format string, but notice -string precision pitfalls

 

args

the list of arguments to insert in the output.

 
-
-
-

Returns

-

the number of bytes printed.

-
-

Since: 2.2

-
-
-
-

g_fprintf ()

-
gint
-g_fprintf (FILE *file,
-           gchar const *format,
-           ...);
-

An implementation of the standard fprintf() function which supports -positional parameters, as specified in the Single Unix Specification.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

the stream to write to.

[not nullable]

format

a standard printf() format string, but notice -string precision pitfalls

 

...

the arguments to insert in the output.

 
-
-
-

Returns

-

the number of bytes printed.

-
-

Since: 2.2

-
-
-
-

g_vfprintf ()

-
gint
-g_vfprintf (FILE *file,
-            gchar const *format,
-            va_list args);
-

An implementation of the standard fprintf() function which supports -positional parameters, as specified in the Single Unix Specification.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file

the stream to write to.

[not nullable]

format

a standard printf() format string, but notice -string precision pitfalls

 

args

the list of arguments to insert in the output.

 
-
-
-

Returns

-

the number of bytes printed.

-
-

Since: 2.2

-
-
-
-

g_sprintf ()

-
gint
-g_sprintf (gchar *string,
-           gchar const *format,
-           ...);
-

An implementation of the standard sprintf() function which supports -positional parameters, as specified in the Single Unix Specification.

-

Note that it is usually better to use g_snprintf(), to avoid the -risk of buffer overflow.

-

See also g_strdup_printf().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

A pointer to a memory buffer to contain the resulting string. It -is up to the caller to ensure that the allocated buffer is large -enough to hold the formatted result

 

format

a standard printf() format string, but notice -string precision pitfalls

 

...

the arguments to insert in the output.

 
-
-
-

Returns

-

the number of bytes printed.

-
-

Since: 2.2

-
-
-
-

g_vsprintf ()

-
gint
-g_vsprintf (gchar *string,
-            gchar const *format,
-            va_list args);
-

An implementation of the standard vsprintf() function which supports -positional parameters, as specified in the Single Unix Specification.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

the buffer to hold the output.

 

format

a standard printf() format string, but notice -string precision pitfalls

 

args

the list of arguments to insert in the output.

 
-
-
-

Returns

-

the number of bytes printed.

-
-

Since: 2.2

-
-
-
-

g_snprintf ()

-
gint
-g_snprintf (gchar *string,
-            gulong n,
-            gchar const *format,
-            ...);
-

A safer form of the standard sprintf() function. The output is guaranteed -to not exceed n - characters (including the terminating nul character), so -it is easy to ensure that a buffer overflow cannot occur.

-

See also g_strdup_printf().

-

In versions of GLib prior to 1.2.3, this function may return -1 if the -output was truncated, and the truncated string may not be nul-terminated. -In versions prior to 1.3.12, this function returns the length of the output -string.

-

The return value of g_snprintf() conforms to the snprintf() -function as standardized in ISO C99. Note that this is different from -traditional snprintf(), which returns the length of the output string.

-

The format string may contain positional parameters, as specified in -the Single Unix Specification.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

string

the buffer to hold the output.

 

n

the maximum number of bytes to produce (including the -terminating nul character).

 

format

a standard printf() format string, but notice -string precision pitfalls

 

...

the arguments to insert in the output.

 
-
-
-

Returns

-

the number of bytes which would be produced if the buffer -was large enough.

-
-
-
-
-

g_vsnprintf ()

-
gint
-g_vsnprintf (gchar *string,
-             gulong n,
-             gchar const *format,
-             va_list args);
-

A safer form of the standard vsprintf() function. The output is guaranteed -to not exceed n - characters (including the terminating nul character), so -it is easy to ensure that a buffer overflow cannot occur.

-

See also g_strdup_vprintf().

-

In versions of GLib prior to 1.2.3, this function may return -1 if the -output was truncated, and the truncated string may not be nul-terminated. -In versions prior to 1.3.12, this function returns the length of the output -string.

-

The return value of g_vsnprintf() conforms to the vsnprintf() function -as standardized in ISO C99. Note that this is different from traditional -vsnprintf(), which returns the length of the output string.

-

The format string may contain positional parameters, as specified in -the Single Unix Specification.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

string

the buffer to hold the output.

 

n

the maximum number of bytes to produce (including the -terminating nul character).

 

format

a standard printf() format string, but notice -string precision pitfalls][string-precision]

 

args

the list of arguments to insert in the output.

 
-
-
-

Returns

-

the number of bytes which would be produced if the buffer -was large enough.

-
-
-
-
-

g_vasprintf ()

-
gint
-g_vasprintf (gchar **string,
-             gchar const *format,
-             va_list args);
-

An implementation of the GNU vasprintf() function which supports -positional parameters, as specified in the Single Unix Specification. -This function is similar to g_vsprintf(), except that it allocates a -string to hold the output, instead of putting the output in a buffer -you allocate in advance.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

the return location for the newly-allocated string.

 

format

a standard printf() format string, but notice -string precision pitfalls

 

args

the list of arguments to insert in the output.

 
-
-
-

Returns

-

the number of bytes printed.

-
-

Since: 2.4

-
-
-
-

g_printf_string_upper_bound ()

-
gsize
-g_printf_string_upper_bound (const gchar *format,
-                             va_list args);
-

Calculates the maximum space needed to store the output -of the sprintf() function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

format

the format string. See the printf() documentation

 

args

the parameters to be inserted into the format string

 
-
-
-

Returns

-

the maximum space needed to store the formatted string

-
-
-
-
-

g_str_is_ascii ()

-
gboolean
-g_str_is_ascii (const gchar *str);
-

Determines if a string is pure ASCII. A string is pure ASCII if it -contains no bytes with the high bit set.

-
-

Parameters

-
----- - - - - - -

str

a string

 
-
-
-

Returns

-

TRUE if str -is ASCII

-
-

Since: 2.40

-
-
-
-

g_ascii_isalnum ()

-
gboolean
-g_ascii_isalnum (gchar c);
-

Determines whether a character is alphanumeric.

-

Unlike the standard C library isalnum() function, this only -recognizes standard ASCII letters and ignores the locale, -returning FALSE for all non-ASCII characters. Also, unlike -the standard library function, this takes a char, not an int, -so don't call it on EOF, but no need to cast to guchar before -passing a possibly non-ASCII character in.

-
-

Parameters

-
----- - - - - - -

c

any character

 
-
-
-

Returns

-

TRUE if c -is an ASCII alphanumeric character

-
-
-
-
-

g_ascii_isalpha ()

-
gboolean
-g_ascii_isalpha (gchar c);
-

Determines whether a character is alphabetic (i.e. a letter).

-

Unlike the standard C library isalpha() function, this only -recognizes standard ASCII letters and ignores the locale, -returning FALSE for all non-ASCII characters. Also, unlike -the standard library function, this takes a char, not an int, -so don't call it on EOF, but no need to cast to guchar before -passing a possibly non-ASCII character in.

-
-

Parameters

-
----- - - - - - -

c

any character

 
-
-
-

Returns

-

TRUE if c -is an ASCII alphabetic character

-
-
-
-
-

g_ascii_iscntrl ()

-
gboolean
-g_ascii_iscntrl (gchar c);
-

Determines whether a character is a control character.

-

Unlike the standard C library iscntrl() function, this only -recognizes standard ASCII control characters and ignores the -locale, returning FALSE for all non-ASCII characters. Also, -unlike the standard library function, this takes a char, not -an int, so don't call it on EOF, but no need to cast to guchar -before passing a possibly non-ASCII character in.

-
-

Parameters

-
----- - - - - - -

c

any character

 
-
-
-

Returns

-

TRUE if c -is an ASCII control character.

-
-
-
-
-

g_ascii_isdigit ()

-
gboolean
-g_ascii_isdigit (gchar c);
-

Determines whether a character is digit (0-9).

-

Unlike the standard C library isdigit() function, this takes -a char, not an int, so don't call it on EOF, but no need to -cast to guchar before passing a possibly non-ASCII character in.

-
-

Parameters

-
----- - - - - - -

c

any character

 
-
-
-

Returns

-

TRUE if c -is an ASCII digit.

-
-
-
-
-

g_ascii_isgraph ()

-
gboolean
-g_ascii_isgraph (gchar c);
-

Determines whether a character is a printing character and not a space.

-

Unlike the standard C library isgraph() function, this only -recognizes standard ASCII characters and ignores the locale, -returning FALSE for all non-ASCII characters. Also, unlike -the standard library function, this takes a char, not an int, -so don't call it on EOF, but no need to cast to guchar before -passing a possibly non-ASCII character in.

-
-

Parameters

-
----- - - - - - -

c

any character

 
-
-
-

Returns

-

TRUE if c -is an ASCII printing character other than space.

-
-
-
-
-

g_ascii_islower ()

-
gboolean
-g_ascii_islower (gchar c);
-

Determines whether a character is an ASCII lower case letter.

-

Unlike the standard C library islower() function, this only -recognizes standard ASCII letters and ignores the locale, -returning FALSE for all non-ASCII characters. Also, unlike -the standard library function, this takes a char, not an int, -so don't call it on EOF, but no need to worry about casting -to guchar before passing a possibly non-ASCII character in.

-
-

Parameters

-
----- - - - - - -

c

any character

 
-
-
-

Returns

-

TRUE if c -is an ASCII lower case letter

-
-
-
-
-

g_ascii_isprint ()

-
gboolean
-g_ascii_isprint (gchar c);
-

Determines whether a character is a printing character.

-

Unlike the standard C library isprint() function, this only -recognizes standard ASCII characters and ignores the locale, -returning FALSE for all non-ASCII characters. Also, unlike -the standard library function, this takes a char, not an int, -so don't call it on EOF, but no need to cast to guchar before -passing a possibly non-ASCII character in.

-
-

Parameters

-
----- - - - - - -

c

any character

 
-
-
-

Returns

-

TRUE if c -is an ASCII printing character.

-
-
-
-
-

g_ascii_ispunct ()

-
gboolean
-g_ascii_ispunct (gchar c);
-

Determines whether a character is a punctuation character.

-

Unlike the standard C library ispunct() function, this only -recognizes standard ASCII letters and ignores the locale, -returning FALSE for all non-ASCII characters. Also, unlike -the standard library function, this takes a char, not an int, -so don't call it on EOF, but no need to cast to guchar before -passing a possibly non-ASCII character in.

-
-

Parameters

-
----- - - - - - -

c

any character

 
-
-
-

Returns

-

TRUE if c -is an ASCII punctuation character.

-
-
-
-
-

g_ascii_isspace ()

-
gboolean
-g_ascii_isspace (gchar c);
-

Determines whether a character is a white-space character.

-

Unlike the standard C library isspace() function, this only -recognizes standard ASCII white-space and ignores the locale, -returning FALSE for all non-ASCII characters. Also, unlike -the standard library function, this takes a char, not an int, -so don't call it on EOF, but no need to cast to guchar before -passing a possibly non-ASCII character in.

-
-

Parameters

-
----- - - - - - -

c

any character

 
-
-
-

Returns

-

TRUE if c -is an ASCII white-space character

-
-
-
-
-

g_ascii_isupper ()

-
gboolean
-g_ascii_isupper (gchar c);
-

Determines whether a character is an ASCII upper case letter.

-

Unlike the standard C library isupper() function, this only -recognizes standard ASCII letters and ignores the locale, -returning FALSE for all non-ASCII characters. Also, unlike -the standard library function, this takes a char, not an int, -so don't call it on EOF, but no need to worry about casting -to guchar before passing a possibly non-ASCII character in.

-
-

Parameters

-
----- - - - - - -

c

any character

 
-
-
-

Returns

-

TRUE if c -is an ASCII upper case letter

-
-
-
-
-

g_ascii_isxdigit ()

-
gboolean
-g_ascii_isxdigit (gchar c);
-

Determines whether a character is a hexadecimal-digit character.

-

Unlike the standard C library isxdigit() function, this takes -a char, not an int, so don't call it on EOF, but no need to -cast to guchar before passing a possibly non-ASCII character in.

-
-

Parameters

-
----- - - - - - -

c

any character

 
-
-
-

Returns

-

TRUE if c -is an ASCII hexadecimal-digit character.

-
-
-
-
-

g_ascii_digit_value ()

-
gint
-g_ascii_digit_value (gchar c);
-

Determines the numeric value of a character as a decimal digit. -Differs from g_unichar_digit_value() because it takes a char, so -there's no worry about sign extension if characters are signed.

-
-

Parameters

-
----- - - - - - -

c

an ASCII character

 
-
-
-

Returns

-

If c -is a decimal digit (according to g_ascii_isdigit()), -its numeric value. Otherwise, -1.

-
-
-
-
-

g_ascii_xdigit_value ()

-
gint
-g_ascii_xdigit_value (gchar c);
-

Determines the numeric value of a character as a hexidecimal -digit. Differs from g_unichar_xdigit_value() because it takes -a char, so there's no worry about sign extension if characters -are signed.

-
-

Parameters

-
----- - - - - - -

c

an ASCII character.

 
-
-
-

Returns

-

If c -is a hex digit (according to g_ascii_isxdigit()), -its numeric value. Otherwise, -1.

-
-
-
-
-

g_ascii_strcasecmp ()

-
gint
-g_ascii_strcasecmp (const gchar *s1,
-                    const gchar *s2);
-

Compare two strings, ignoring the case of ASCII characters.

-

Unlike the BSD strcasecmp() function, this only recognizes standard -ASCII letters and ignores the locale, treating all non-ASCII -bytes as if they are not letters.

-

This function should be used only on strings that are known to be -in encodings where the bytes corresponding to ASCII letters always -represent themselves. This includes UTF-8 and the ISO-8859-* -charsets, but not for instance double-byte encodings like the -Windows Codepage 932, where the trailing bytes of double-byte -characters include all ASCII letters. If you compare two CP932 -strings using this function, you will get false matches.

-

Both s1 - and s2 - must be non-NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

s1

string to compare with s2 -

 

s2

string to compare with s1 -

 
-
-
-

Returns

-

0 if the strings match, a negative value if s1 -< s2 -, -or a positive value if s1 -> s2 -.

-
-
-
-
-

g_ascii_strncasecmp ()

-
gint
-g_ascii_strncasecmp (const gchar *s1,
-                     const gchar *s2,
-                     gsize n);
-

Compare s1 - and s2 -, ignoring the case of ASCII characters and any -characters after the first n - in each string.

-

Unlike the BSD strcasecmp() function, this only recognizes standard -ASCII letters and ignores the locale, treating all non-ASCII -characters as if they are not letters.

-

The same warning as in g_ascii_strcasecmp() applies: Use this -function only on strings known to be in encodings where bytes -corresponding to ASCII letters always represent themselves.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

s1

string to compare with s2 -

 

s2

string to compare with s1 -

 

n

number of characters to compare

 
-
-
-

Returns

-

0 if the strings match, a negative value if s1 -< s2 -, -or a positive value if s1 -> s2 -.

-
-
-
-
-

g_ascii_strup ()

-
gchar *
-g_ascii_strup (const gchar *str,
-               gssize len);
-

Converts all lower case ASCII letters to upper case ASCII letters.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

a string

 

len

length of str -in bytes, or -1 if str -is nul-terminated

 
-
-
-

Returns

-

a newly allocated string, with all the lower case -characters in str -converted to upper case, with semantics that -exactly match g_ascii_toupper(). (Note that this is unlike the -old g_strup(), which modified the string in place.)

-
-
-
-
-

g_ascii_strdown ()

-
gchar *
-g_ascii_strdown (const gchar *str,
-                 gssize len);
-

Converts all upper case ASCII letters to lower case ASCII letters.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

a string

 

len

length of str -in bytes, or -1 if str -is nul-terminated

 
-
-
-

Returns

-

a newly-allocated string, with all the upper case -characters in str -converted to lower case, with semantics that -exactly match g_ascii_tolower(). (Note that this is unlike the -old g_strdown(), which modified the string in place.)

-
-
-
-
-

g_ascii_tolower ()

-
gchar
-g_ascii_tolower (gchar c);
-

Convert a character to ASCII lower case.

-

Unlike the standard C library tolower() function, this only -recognizes standard ASCII letters and ignores the locale, returning -all non-ASCII characters unchanged, even if they are lower case -letters in a particular character set. Also unlike the standard -library function, this takes and returns a char, not an int, so -don't call it on EOF but no need to worry about casting to guchar -before passing a possibly non-ASCII character in.

-
-

Parameters

-
----- - - - - - -

c

any character

 
-
-
-

Returns

-

the result of converting c -to lower case. If c -is -not an ASCII upper case letter, c -is returned unchanged.

-
-
-
-
-

g_ascii_toupper ()

-
gchar
-g_ascii_toupper (gchar c);
-

Convert a character to ASCII upper case.

-

Unlike the standard C library toupper() function, this only -recognizes standard ASCII letters and ignores the locale, returning -all non-ASCII characters unchanged, even if they are upper case -letters in a particular character set. Also unlike the standard -library function, this takes and returns a char, not an int, so -don't call it on EOF but no need to worry about casting to guchar -before passing a possibly non-ASCII character in.

-
-

Parameters

-
----- - - - - - -

c

any character

 
-
-
-

Returns

-

the result of converting c -to upper case. If c -is not -an ASCII lower case letter, c -is returned unchanged.

-
-
-
-
-

g_string_ascii_up ()

-
GString *
-g_string_ascii_up (GString *string);
-

Converts all lowercase ASCII letters to uppercase ASCII letters.

-
-

Parameters

-
----- - - - - - -

string

a GString

 
-
-
-

Returns

-

passed-in string -pointer, with all the -lowercase characters converted to uppercase in place, -with semantics that exactly match g_ascii_toupper().

-

[transfer none]

-
-
-
-
-

g_string_ascii_down ()

-
GString *
-g_string_ascii_down (GString *string);
-

Converts all uppercase ASCII letters to lowercase ASCII letters.

-
-

Parameters

-
----- - - - - - -

string

a GString

 
-
-
-

Returns

-

passed-in string -pointer, with all the -uppercase characters converted to lowercase in place, -with semantics that exactly match g_ascii_tolower().

-

[transfer none]

-
-
-
-
-

g_strup ()

-
gchar *
-g_strup (gchar *string);
-
-

g_strup has been deprecated since version 2.2 and should not be used in newly-written code.

-

This function is totally broken for the reasons - discussed in the g_strncasecmp() docs - use g_ascii_strup() - or g_utf8_strup() instead.

-
-

Converts a string to upper case.

-
-

Parameters

-
----- - - - - - -

string

the string to convert

 
-
-
-

Returns

-

the string

-
-
-
-
-

g_strdown ()

-
gchar *
-g_strdown (gchar *string);
-
-

g_strdown has been deprecated since version 2.2 and should not be used in newly-written code.

-

This function is totally broken for the reasons discussed -in the g_strncasecmp() docs - use g_ascii_strdown() or g_utf8_strdown() -instead.

-
-

Converts a string to lower case.

-
-

Parameters

-
----- - - - - - -

string

the string to convert.

 
-
-
-

Returns

-

the string

-
-
-
-
-

g_strcasecmp ()

-
gint
-g_strcasecmp (const gchar *s1,
-              const gchar *s2);
-
-

g_strcasecmp has been deprecated since version 2.2 and should not be used in newly-written code.

-

See g_strncasecmp() for a discussion of why this - function is deprecated and how to replace it.

-
-

A case-insensitive string comparison, corresponding to the standard -strcasecmp() function on platforms which support it.

-
-

Parameters

-
----- - - - - - - - - - - - - -

s1

a string

 

s2

a string to compare with s1 -

 
-
-
-

Returns

-

0 if the strings match, a negative value if s1 -< s2 -, -or a positive value if s1 -> s2 -.

-
-
-
-
-

g_strncasecmp ()

-
gint
-g_strncasecmp (const gchar *s1,
-               const gchar *s2,
-               guint n);
-
-

g_strncasecmp has been deprecated since version 2.2 and should not be used in newly-written code.

-

The problem with g_strncasecmp() is that it does - the comparison by calling toupper()/tolower(). These functions - are locale-specific and operate on single bytes. However, it is - impossible to handle things correctly from an internationalization - standpoint by operating on bytes, since characters may be multibyte. - Thus g_strncasecmp() is broken if your string is guaranteed to be - ASCII, since it is locale-sensitive, and it's broken if your string - is localized, since it doesn't work on many encodings at all, - including UTF-8, EUC-JP, etc.

-

There are therefore two replacement techniques: g_ascii_strncasecmp(), - which only works on ASCII and is not locale-sensitive, and - g_utf8_casefold() followed by strcmp() on the resulting strings, - which is good for case-insensitive sorting of UTF-8.

-
-

A case-insensitive string comparison, corresponding to the standard -strncasecmp() function on platforms which support it. It is similar -to g_strcasecmp() except it only compares the first n - characters of -the strings.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

s1

a string

 

s2

a string to compare with s1 -

 

n

the maximum number of characters to compare

 
-
-
-

Returns

-

0 if the strings match, a negative value if s1 -< s2 -, -or a positive value if s1 -> s2 -.

-
-
-
-
-

g_strreverse ()

-
gchar *
-g_strreverse (gchar *string);
-

Reverses all of the bytes in a string. For example, -g_strreverse ("abcdef") will result in "fedcba".

-

Note that g_strreverse() doesn't work on UTF-8 strings -containing multibyte characters. For that purpose, use -g_utf8_strreverse().

-
-

Parameters

-
----- - - - - - -

string

the string to reverse

 
-
-
-

Returns

-

the same pointer passed in as string -

-
-
-
-
-

g_ascii_strtoll ()

-
gint64
-g_ascii_strtoll (const gchar *nptr,
-                 gchar **endptr,
-                 guint base);
-

Converts a string to a gint64 value. -This function behaves like the standard strtoll() function -does in the C locale. It does this without actually -changing the current locale, since that would not be -thread-safe.

-

This function is typically used when reading configuration -files or other non-user input that should be locale independent. -To handle input from the user you should normally use the -locale-sensitive system strtoll() function.

-

If the correct value would cause overflow, G_MAXINT64 or G_MININT64 -is returned, and ERANGE is stored in errno. -If the base is outside the valid range, zero is returned, and -EINVAL is stored in errno. If the -string conversion fails, zero is returned, and endptr - returns nptr - -(if endptr - is non-NULL).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

nptr

the string to convert to a numeric value.

 

endptr

if non-NULL, it returns the -character after the last character used in the conversion.

[out][transfer none][optional]

base

to be used for the conversion, 2..36 or 0

 
-
-
-

Returns

-

the gint64 value or zero on error.

-
-

Since: 2.12

-
-
-
-

g_ascii_strtoull ()

-
guint64
-g_ascii_strtoull (const gchar *nptr,
-                  gchar **endptr,
-                  guint base);
-

Converts a string to a guint64 value. -This function behaves like the standard strtoull() function -does in the C locale. It does this without actually -changing the current locale, since that would not be -thread-safe.

-

This function is typically used when reading configuration -files or other non-user input that should be locale independent. -To handle input from the user you should normally use the -locale-sensitive system strtoull() function.

-

If the correct value would cause overflow, G_MAXUINT64 -is returned, and ERANGE is stored in errno. -If the base is outside the valid range, zero is returned, and -EINVAL is stored in errno. -If the string conversion fails, zero is returned, and endptr - returns -nptr - (if endptr - is non-NULL).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

nptr

the string to convert to a numeric value.

 

endptr

if non-NULL, it returns the -character after the last character used in the conversion.

[out][transfer none][optional]

base

to be used for the conversion, 2..36 or 0

 
-
-
-

Returns

-

the guint64 value or zero on error.

-
-

Since: 2.2

-
-
-
-

g_ascii_strtod ()

-
gdouble
-g_ascii_strtod (const gchar *nptr,
-                gchar **endptr);
-

Converts a string to a gdouble value.

-

This function behaves like the standard strtod() function -does in the C locale. It does this without actually changing -the current locale, since that would not be thread-safe. -A limitation of the implementation is that this function -will still accept localized versions of infinities and NANs.

-

This function is typically used when reading configuration -files or other non-user input that should be locale independent. -To handle input from the user you should normally use the -locale-sensitive system strtod() function.

-

To convert from a gdouble to a string in a locale-insensitive -way, use g_ascii_dtostr().

-

If the correct value would cause overflow, plus or minus HUGE_VAL -is returned (according to the sign of the value), and ERANGE is -stored in errno. If the correct value would cause underflow, -zero is returned and ERANGE is stored in errno.

-

This function resets errno before calling strtod() so that -you can reliably detect overflow and underflow.

-
-

Parameters

-
----- - - - - - - - - - - - - -

nptr

the string to convert to a numeric value.

 

endptr

if non-NULL, it returns the -character after the last character used in the conversion.

[out][transfer none][optional]
-
-
-

Returns

-

the gdouble value.

-
-
-
-
-

g_ascii_dtostr ()

-
gchar *
-g_ascii_dtostr (gchar *buffer,
-                gint buf_len,
-                gdouble d);
-

Converts a gdouble to a string, using the '.' as -decimal point.

-

This function generates enough precision that converting -the string back using g_ascii_strtod() gives the same machine-number -(on machines with IEEE compatible 64bit doubles). It is -guaranteed that the size of the resulting string will never -be larger than G_ASCII_DTOSTR_BUF_SIZE - bytes, including the terminating -nul character, which is always added.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

buffer

A buffer to place the resulting string in

 

buf_len

The length of the buffer.

 

d

The gdouble to convert

 
-
-
-

Returns

-

The pointer to the buffer with the converted string.

-
-
-
-
-

g_ascii_formatd ()

-
gchar *
-g_ascii_formatd (gchar *buffer,
-                 gint buf_len,
-                 const gchar *format,
-                 gdouble d);
-

Converts a gdouble to a string, using the '.' as -decimal point. To format the number you pass in -a printf()-style format string. Allowed conversion -specifiers are 'e', 'E', 'f', 'F', 'g' and 'G'.

-

The returned buffer is guaranteed to be nul-terminated.

-

If you just want to want to serialize the value into a -string, use g_ascii_dtostr().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

buffer

A buffer to place the resulting string in

 

buf_len

The length of the buffer.

 

format

The printf()-style format to use for the -code to use for converting.

 

d

The gdouble to convert

 
-
-
-

Returns

-

The pointer to the buffer with the converted string.

-
-
-
-
-

g_strtod ()

-
gdouble
-g_strtod (const gchar *nptr,
-          gchar **endptr);
-

Converts a string to a gdouble value. -It calls the standard strtod() function to handle the conversion, but -if the string is not completely converted it attempts the conversion -again with g_ascii_strtod(), and returns the best match.

-

This function should seldom be used. The normal situation when reading -numbers not for human consumption is to use g_ascii_strtod(). Only when -you know that you must expect both locale formatted and C formatted numbers -should you use this. Make sure that you don't pass strings such as comma -separated lists of values, since the commas may be interpreted as a decimal -point in some locales, causing unexpected results.

-
-

Parameters

-
----- - - - - - - - - - - - - -

nptr

the string to convert to a numeric value.

 

endptr

if non-NULL, it returns the -character after the last character used in the conversion.

[out][transfer none][optional]
-
-
-

Returns

-

the gdouble value.

-
-
-
-
-

g_strchug ()

-
gchar *
-g_strchug (gchar *string);
-

Removes leading whitespace from a string, by moving the rest -of the characters forward.

-

This function doesn't allocate or reallocate any memory; -it modifies string - in place. Therefore, it cannot be used on -statically allocated strings.

-

The pointer to string - is returned to allow the nesting of functions.

-

Also see g_strchomp() and g_strstrip().

-
-

Parameters

-
----- - - - - - -

string

a string to remove the leading whitespace from

 
-
-
-

Returns

-

string -

-
-
-
-
-

g_strchomp ()

-
gchar *
-g_strchomp (gchar *string);
-

Removes trailing whitespace from a string.

-

This function doesn't allocate or reallocate any memory; -it modifies string - in place. Therefore, it cannot be used -on statically allocated strings.

-

The pointer to string - is returned to allow the nesting of functions.

-

Also see g_strchug() and g_strstrip().

-
-

Parameters

-
----- - - - - - -

string

a string to remove the trailing whitespace from

 
-
-
-

Returns

-

string -

-
-
-
-
-

g_strstrip()

-
#define             g_strstrip( string )
-

Removes leading and trailing whitespace from a string. -See g_strchomp() and g_strchug().

-
-

Parameters

-
----- - - - - - -

string

a string to remove the leading and trailing whitespace from

 
-
-
-

Returns

-

string -

-
-
-
-
-

g_strdelimit ()

-
gchar *
-g_strdelimit (gchar *string,
-              const gchar *delimiters,
-              gchar new_delimiter);
-

Converts any delimiter characters in string - to new_delimiter -. -Any characters in string - which are found in delimiters - are -changed to the new_delimiter - character. Modifies string - in place, -and returns string - itself, not a copy. The return value is to -allow nesting such as

-
- - - - - - - -
1
g_ascii_strup (g_strdelimit (str, "abc", '?'))
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

the string to convert

 

delimiters

a string containing the current delimiters, -or NULL to use the standard delimiters defined in G_STR_DELIMITERS.

[nullable]

new_delimiter

the new delimiter character

 
-
-
-

Returns

-

string -

-
-
-
-
-

g_strescape ()

-
gchar *
-g_strescape (const gchar *source,
-             const gchar *exceptions);
-

Escapes the special characters '\b', '\f', '\n', '\r', '\t', '\v', '\' -and '"' in the string source - by inserting a '\' before -them. Additionally all characters in the range 0x01-0x1F (everything -below SPACE) and in the range 0x7F-0xFF (all non-ASCII chars) are -replaced with a '\' followed by their octal representation. -Characters supplied in exceptions - are not escaped.

-

g_strcompress() does the reverse conversion.

-
-

Parameters

-
----- - - - - - - - - - - - - -

source

a string to escape

 

exceptions

a string of characters not to escape in source -.

[nullable]
-
-
-

Returns

-

a newly-allocated copy of source -with certain -characters escaped. See above.

-
-
-
-
-

g_strcompress ()

-
gchar *
-g_strcompress (const gchar *source);
-

Replaces all escaped characters with their one byte equivalent.

-

This function does the reverse conversion of g_strescape().

-
-

Parameters

-
----- - - - - - -

source

a string to compress

 
-
-
-

Returns

-

a newly-allocated copy of source -with all escaped -character compressed

-
-
-
-
-

g_strcanon ()

-
gchar *
-g_strcanon (gchar *string,
-            const gchar *valid_chars,
-            gchar substitutor);
-

For each character in string -, if the character is not in valid_chars -, -replaces the character with substitutor -. Modifies string - in place, -and return string - itself, not a copy. The return value is to allow -nesting such as

-
- - - - - - - -
1
g_ascii_strup (g_strcanon (str, "abc", '?'))
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a nul-terminated array of bytes

 

valid_chars

bytes permitted in string -

 

substitutor

replacement character for disallowed bytes

 
-
-
-

Returns

-

string -

-
-
-
-
-

g_strsplit ()

-
gchar **
-g_strsplit (const gchar *string,
-            const gchar *delimiter,
-            gint max_tokens);
-

Splits a string into a maximum of max_tokens - pieces, using the given -delimiter -. If max_tokens - is reached, the remainder of string - is -appended to the last token.

-

As an example, the result of g_strsplit (":a:bc::d:", ":", -1) is a -NULL-terminated vector containing the six strings "", "a", "bc", "", "d" -and "".

-

As a special case, the result of splitting the empty string "" is an empty -vector, not a vector containing a single string. The reason for this -special case is that being able to represent a empty vector is typically -more useful than consistent handling of empty elements. If you do need -to represent empty elements, you'll need to check for the empty string -before calling g_strsplit().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a string to split

 

delimiter

a string which specifies the places at which to split -the string. The delimiter is not included in any of the resulting -strings, unless max_tokens -is reached.

 

max_tokens

the maximum number of pieces to split string -into. -If this is less than 1, the string is split completely.

 
-
-
-

Returns

-

a newly-allocated NULL-terminated array of strings. Use -g_strfreev() to free it.

-
-
-
-
-

g_strsplit_set ()

-
gchar **
-g_strsplit_set (const gchar *string,
-                const gchar *delimiters,
-                gint max_tokens);
-

Splits string - into a number of tokens not containing any of the characters -in delimiter -. A token is the (possibly empty) longest string that does not -contain any of the characters in delimiters -. If max_tokens - is reached, the -remainder is appended to the last token.

-

For example the result of g_strsplit_set ("abc:def/ghi", ":/", -1) is a -NULL-terminated vector containing the three strings "abc", "def", -and "ghi".

-

The result of g_strsplit_set (":def/ghi:", ":/", -1) is a NULL-terminated -vector containing the four strings "", "def", "ghi", and "".

-

As a special case, the result of splitting the empty string "" is an empty -vector, not a vector containing a single string. The reason for this -special case is that being able to represent a empty vector is typically -more useful than consistent handling of empty elements. If you do need -to represent empty elements, you'll need to check for the empty string -before calling g_strsplit_set().

-

Note that this function works on bytes not characters, so it can't be used -to delimit UTF-8 strings for anything but ASCII characters.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

The string to be tokenized

 

delimiters

A nul-terminated string containing bytes that are used -to split the string.

 

max_tokens

The maximum number of tokens to split string -into. -If this is less than 1, the string is split completely

 
-
-
-

Returns

-

a newly-allocated NULL-terminated array of strings. Use -g_strfreev() to free it.

-
-

Since: 2.4

-
-
-
-

g_strfreev ()

-
void
-g_strfreev (gchar **str_array);
-

Frees a NULL-terminated array of strings, as well as each -string it contains.

-

If str_array - is NULL, this function simply returns.

-
-

Parameters

-
----- - - - - - -

str_array

a NULL-terminated array of strings to free.

[nullable]
-
-
-
-
-

g_strconcat ()

-
gchar *
-g_strconcat (const gchar *string1,
-             ...);
-

Concatenates all of the given strings into one long string. The -returned string should be freed with g_free() when no longer needed.

-

The variable argument list must end with NULL. If you forget the NULL, -g_strconcat() will start appending random memory junk to your string.

-

Note that this function is usually not the right function to use to -assemble a translated message from pieces, since proper translation -often requires the pieces to be reordered.

-
-

Parameters

-
----- - - - - - - - - - - - - -

string1

the first string to add, which must not be NULL

 

...

a NULL-terminated list of strings to append to the string

 
-
-
-

Returns

-

a newly-allocated string containing all the string arguments

-
-
-
-
-

g_strjoin ()

-
gchar *
-g_strjoin (const gchar *separator,
-           ...);
-

Joins a number of strings together to form one long string, with the -optional separator - inserted between each of them. The returned string -should be freed with g_free().

-
-

Parameters

-
----- - - - - - - - - - - - - -

separator

a string to insert between each of the -strings, or NULL.

[nullable]

...

a NULL-terminated list of strings to join

 
-
-
-

Returns

-

a newly-allocated string containing all of the strings joined -together, with separator -between them

-
-
-
-
-

g_strjoinv ()

-
gchar *
-g_strjoinv (const gchar *separator,
-            gchar **str_array);
-

Joins a number of strings together to form one long string, with the -optional separator - inserted between each of them. The returned string -should be freed with g_free().

-

If str_array - has no items, the return value will be an -empty string. If str_array - contains a single item, separator - will not -appear in the resulting string.

-
-

Parameters

-
----- - - - - - - - - - - - - -

separator

a string to insert between each of the -strings, or NULL.

[nullable]

str_array

a NULL-terminated array of strings to join

 
-
-
-

Returns

-

a newly-allocated string containing all of the strings joined -together, with separator -between them

-
-
-
-
-

g_strv_length ()

-
guint
-g_strv_length (gchar **str_array);
-

Returns the length of the given NULL-terminated -string array str_array -.

-
-

Parameters

-
----- - - - - - -

str_array

a NULL-terminated array of strings

 
-
-
-

Returns

-

length of str_array -.

-
-

Since: 2.6

-
-
-
-

g_strv_contains ()

-
gboolean
-g_strv_contains (const gchar * const *strv,
-                 const gchar *str);
-

Checks if strv - contains str -. strv - must not be NULL.

-
-

Parameters

-
----- - - - - - - - - - - - - -

strv

a NULL-terminated array of strings

 

str

a string

 
-
-
-

Returns

-

TRUE if str -is an element of strv -, according to g_str_equal().

-
-

Since: 2.44

-
-
-
-

g_strerror ()

-
const gchar *
-g_strerror (gint errnum);
-

Returns a string corresponding to the given error code, e.g. "no -such process". Unlike strerror(), this always returns a string in -UTF-8 encoding, and the pointer is guaranteed to remain valid for -the lifetime of the process.

-

Note that the string may be translated according to the current locale.

-

The value of errno will not be changed by this function.

-
-

Parameters

-
----- - - - - - -

errnum

the system error number. See the standard C errno -documentation

 
-
-
-

Returns

-

a UTF-8 string describing the error code. If the error code -is unknown, it returns a string like "unknown error (<code>)".

-
-
-
-
-

g_strsignal ()

-
const gchar *
-g_strsignal (gint signum);
-

Returns a string describing the given signal, e.g. "Segmentation fault". -You should use this function in preference to strsignal(), because it -returns a string in UTF-8 encoding, and since not all platforms support -the strsignal() function.

-
-

Parameters

-
----- - - - - - -

signum

the signal number. See the signal documentation

 
-
-
-

Returns

-

a UTF-8 string describing the signal. If the signal is unknown, -it returns "unknown signal (<signum>)".

-
-
-
-
-

Types and Values

-
-

G_ASCII_DTOSTR_BUF_SIZE

-
#define G_ASCII_DTOSTR_BUF_SIZE (29 + 10)
-
-

A good size for a buffer to be passed into g_ascii_dtostr(). -It is guaranteed to be enough for all output of that function -on systems with 64bit IEEE-compatible doubles.

-

The typical usage would be something like:

-
- - - - - - - -
1
-2
-3
char buf[G_ASCII_DTOSTR_BUF_SIZE];
-
-fprintf (out, "value=%s\n", g_ascii_dtostr (buf, sizeof (buf), value));
-
- -

-
-
-
-

G_STR_DELIMITERS

-
#define	 G_STR_DELIMITERS "_-|> <."
-
-

The standard delimiters, used in g_strdelimit().

-
-
-
-

GStrv

-
typedef gchar** GStrv;
-
-

A typedef alias for gchar**. This is mostly useful when used together with -g_auto().

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Strings.html b/docs/reference/glib/html/glib-Strings.html deleted file mode 100644 index 6d4bc19b5..000000000 --- a/docs/reference/glib/html/glib-Strings.html +++ /dev/null @@ -1,1791 +0,0 @@ - - - - -Strings: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Strings

-

Strings — text buffers which grow automatically - as text is added

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GString * - -g_string_new () -
-GString * - -g_string_new_len () -
-GString * - -g_string_sized_new () -
-GString * - -g_string_assign () -
-void - -g_string_vprintf () -
-void - -g_string_append_vprintf () -
-void - -g_string_printf () -
-void - -g_string_append_printf () -
-GString * - -g_string_append () -
-GString * - -g_string_append_c () -
-GString * - -g_string_append_unichar () -
-GString * - -g_string_append_len () -
-GString * - -g_string_append_uri_escaped () -
-GString * - -g_string_prepend () -
-GString * - -g_string_prepend_c () -
-GString * - -g_string_prepend_unichar () -
-GString * - -g_string_prepend_len () -
-GString * - -g_string_insert () -
-GString * - -g_string_insert_c () -
-GString * - -g_string_insert_unichar () -
-GString * - -g_string_insert_len () -
-GString * - -g_string_overwrite () -
-GString * - -g_string_overwrite_len () -
-GString * - -g_string_erase () -
-GString * - -g_string_truncate () -
-GString * - -g_string_set_size () -
-gchar * - -g_string_free () -
-GBytes * - -g_string_free_to_bytes () -
-GString * - -g_string_up () -
-GString * - -g_string_down () -
-guint - -g_string_hash () -
-gboolean - -g_string_equal () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - -
structGString
#defineg_string_sprintf
#defineg_string_sprintfa
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

A GString is an object that handles the memory management of a C -string for you. The emphasis of GString is on text, typically -UTF-8. Crucially, the "str" member of a GString is guaranteed to -have a trailing nul character, and it is therefore always safe to -call functions such as strchr() or g_strdup() on it.

-

However, a GString can also hold arbitrary binary data, because it -has a "len" member, which includes any possible embedded nul -characters in the data. Conceptually then, GString is like a -GByteArray with the addition of many convenience methods for text, -and a guaranteed nul terminator.

-
-
-

Functions

-
-

g_string_new ()

-
GString *
-g_string_new (const gchar *init);
-

Creates a new GString, initialized with the given string.

-
-

Parameters

-
----- - - - - - -

init

the initial text to copy into the string, or NULL to -start with an empty string.

[nullable]
-
-
-

Returns

-

the new GString

-
-
-
-
-

g_string_new_len ()

-
GString *
-g_string_new_len (const gchar *init,
-                  gssize len);
-

Creates a new GString with len - bytes of the init - buffer. -Because a length is provided, init - need not be nul-terminated, -and can contain embedded nul bytes.

-

Since this function does not stop at nul bytes, it is the caller's -responsibility to ensure that init - has at least len - addressable -bytes.

-
-

Parameters

-
----- - - - - - - - - - - - - -

init

initial contents of the string

 

len

length of init -to use

 
-
-
-

Returns

-

a new GString

-
-
-
-
-

g_string_sized_new ()

-
GString *
-g_string_sized_new (gsize dfl_size);
-

Creates a new GString, with enough space for dfl_size - -bytes. This is useful if you are going to add a lot of -text to the string and don't want it to be reallocated -too often.

-
-

Parameters

-
----- - - - - - -

dfl_size

the default size of the space allocated to -hold the string

 
-
-
-

Returns

-

the new GString

-
-
-
-
-

g_string_assign ()

-
GString *
-g_string_assign (GString *string,
-                 const gchar *rval);
-

Copies the bytes from a string into a GString, -destroying any previous contents. It is rather like -the standard strcpy() function, except that you do not -have to worry about having enough space to copy the string.

-
-

Parameters

-
----- - - - - - - - - - - - - -

string

the destination GString. Its current contents -are destroyed.

 

rval

the string to copy into string -

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_vprintf ()

-
void
-g_string_vprintf (GString *string,
-                  const gchar *format,
-                  va_list args);
-

Writes a formatted string into a GString. -This function is similar to g_string_printf() except that -the arguments to the format string are passed as a va_list.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a GString

 

format

the string format. See the printf() documentation

 

args

the parameters to insert into the format string

 
-
-

Since: 2.14

-
-
-
-

g_string_append_vprintf ()

-
void
-g_string_append_vprintf (GString *string,
-                         const gchar *format,
-                         va_list args);
-

Appends a formatted string onto the end of a GString. -This function is similar to g_string_append_printf() -except that the arguments to the format string are passed -as a va_list.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a GString

 

format

the string format. See the printf() documentation

 

args

the list of arguments to insert in the output

 
-
-

Since: 2.14

-
-
-
-

g_string_printf ()

-
void
-g_string_printf (GString *string,
-                 const gchar *format,
-                 ...);
-

Writes a formatted string into a GString. -This is similar to the standard sprintf() function, -except that the GString buffer automatically expands -to contain the results. The previous contents of the -GString are destroyed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a GString

 

format

the string format. See the printf() documentation

 

...

the parameters to insert into the format string

 
-
-
-
-
-

g_string_append_printf ()

-
void
-g_string_append_printf (GString *string,
-                        const gchar *format,
-                        ...);
-

Appends a formatted string onto the end of a GString. -This function is similar to g_string_printf() except -that the text is appended to the GString.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a GString

 

format

the string format. See the printf() documentation

 

...

the parameters to insert into the format string

 
-
-
-
-
-

g_string_append ()

-
GString *
-g_string_append (GString *string,
-                 const gchar *val);
-

Adds a string onto the end of a GString, expanding -it if necessary.

-
-

Parameters

-
----- - - - - - - - - - - - - -

string

a GString

 

val

the string to append onto the end of string -

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_append_c ()

-
GString *
-g_string_append_c (GString *string,
-                   gchar c);
-

Adds a byte onto the end of a GString, expanding -it if necessary.

-
-

Parameters

-
----- - - - - - - - - - - - - -

string

a GString

 

c

the byte to append onto the end of string -

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_append_unichar ()

-
GString *
-g_string_append_unichar (GString *string,
-                         gunichar wc);
-

Converts a Unicode character into UTF-8, and appends it -to the string.

-
-

Parameters

-
----- - - - - - - - - - - - - -

string

a GString

 

wc

a Unicode character

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_append_len ()

-
GString *
-g_string_append_len (GString *string,
-                     const gchar *val,
-                     gssize len);
-

Appends len - bytes of val - to string -. Because len - is -provided, val - may contain embedded nuls and need not -be nul-terminated.

-

Since this function does not stop at nul bytes, it is -the caller's responsibility to ensure that val - has at -least len - addressable bytes.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a GString

 

val

bytes to append

 

len

number of bytes of val -to use

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_append_uri_escaped ()

-
GString *
-g_string_append_uri_escaped (GString *string,
-                             const gchar *unescaped,
-                             const gchar *reserved_chars_allowed,
-                             gboolean allow_utf8);
-

Appends unescaped - to string -, escaped any characters that -are reserved in URIs using URI-style escape sequences.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

string

a GString

 

unescaped

a string

 

reserved_chars_allowed

a string of reserved characters allowed -to be used, or NULL

 

allow_utf8

set TRUE if the escaped string may include UTF8 characters

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-

Since: 2.16

-
-
-
-

g_string_prepend ()

-
GString *
-g_string_prepend (GString *string,
-                  const gchar *val);
-

Adds a string on to the start of a GString, -expanding it if necessary.

-
-

Parameters

-
----- - - - - - - - - - - - - -

string

a GString

 

val

the string to prepend on the start of string -

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_prepend_c ()

-
GString *
-g_string_prepend_c (GString *string,
-                    gchar c);
-

Adds a byte onto the start of a GString, -expanding it if necessary.

-
-

Parameters

-
----- - - - - - - - - - - - - -

string

a GString

 

c

the byte to prepend on the start of the GString

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_prepend_unichar ()

-
GString *
-g_string_prepend_unichar (GString *string,
-                          gunichar wc);
-

Converts a Unicode character into UTF-8, and prepends it -to the string.

-
-

Parameters

-
----- - - - - - - - - - - - - -

string

a GString

 

wc

a Unicode character

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_prepend_len ()

-
GString *
-g_string_prepend_len (GString *string,
-                      const gchar *val,
-                      gssize len);
-

Prepends len - bytes of val - to string -. -Because len - is provided, val - may contain -embedded nuls and need not be nul-terminated.

-

Since this function does not stop at nul bytes, -it is the caller's responsibility to ensure that -val - has at least len - addressable bytes.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a GString

 

val

bytes to prepend

 

len

number of bytes in val -to prepend

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_insert ()

-
GString *
-g_string_insert (GString *string,
-                 gssize pos,
-                 const gchar *val);
-

Inserts a copy of a string into a GString, -expanding it if necessary.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a GString

 

pos

the position to insert the copy of the string

 

val

the string to insert

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_insert_c ()

-
GString *
-g_string_insert_c (GString *string,
-                   gssize pos,
-                   gchar c);
-

Inserts a byte into a GString, expanding it if necessary.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a GString

 

pos

the position to insert the byte

 

c

the byte to insert

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_insert_unichar ()

-
GString *
-g_string_insert_unichar (GString *string,
-                         gssize pos,
-                         gunichar wc);
-

Converts a Unicode character into UTF-8, and insert it -into the string at the given position.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a GString

 

pos

the position at which to insert character, or -1 -to append at the end of the string

 

wc

a Unicode character

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_insert_len ()

-
GString *
-g_string_insert_len (GString *string,
-                     gssize pos,
-                     const gchar *val,
-                     gssize len);
-

Inserts len - bytes of val - into string - at pos -. -Because len - is provided, val - may contain embedded -nuls and need not be nul-terminated. If pos - is -1, -bytes are inserted at the end of the string.

-

Since this function does not stop at nul bytes, it is -the caller's responsibility to ensure that val - has at -least len - addressable bytes.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

string

a GString

 

pos

position in string -where insertion should -happen, or -1 for at the end

 

val

bytes to insert

 

len

number of bytes of val -to insert

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_overwrite ()

-
GString *
-g_string_overwrite (GString *string,
-                    gsize pos,
-                    const gchar *val);
-

Overwrites part of a string, lengthening it if necessary.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a GString

 

pos

the position at which to start overwriting

 

val

the string that will overwrite the string -starting at pos -

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-

Since: 2.14

-
-
-
-

g_string_overwrite_len ()

-
GString *
-g_string_overwrite_len (GString *string,
-                        gsize pos,
-                        const gchar *val,
-                        gssize len);
-

Overwrites part of a string, lengthening it if necessary. -This function will work with embedded nuls.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

string

a GString

 

pos

the position at which to start overwriting

 

val

the string that will overwrite the string -starting at pos -

 

len

the number of bytes to write from val -

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-

Since: 2.14

-
-
-
-

g_string_erase ()

-
GString *
-g_string_erase (GString *string,
-                gssize pos,
-                gssize len);
-

Removes len - bytes from a GString, starting at position pos -. -The rest of the GString is shifted down to fill the gap.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a GString

 

pos

the position of the content to remove

 

len

the number of bytes to remove, or -1 to remove all -following bytes

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_truncate ()

-
GString *
-g_string_truncate (GString *string,
-                   gsize len);
-

Cuts off the end of the GString, leaving the first len - bytes.

-
-

Parameters

-
----- - - - - - - - - - - - - -

string

a GString

 

len

the new size of string -

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_set_size ()

-
GString *
-g_string_set_size (GString *string,
-                   gsize len);
-

Sets the length of a GString. If the length is less than -the current length, the string will be truncated. If the -length is greater than the current length, the contents -of the newly added area are undefined. (However, as -always, string->str[string->len] will be a nul byte.)

-
-

Parameters

-
----- - - - - - - - - - - - - -

string

a GString

 

len

the new length

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_free ()

-
gchar *
-g_string_free (GString *string,
-               gboolean free_segment);
-

Frees the memory allocated for the GString. -If free_segment - is TRUE it also frees the character data. If -it's FALSE, the caller gains ownership of the buffer and must -free it after use with g_free().

-
-

Parameters

-
----- - - - - - - - - - - - - -

string

a GString.

[transfer full]

free_segment

if TRUE, the actual character data is freed as well

 
-
-
-

Returns

-

the character data of string -(i.e. NULL if free_segment -is TRUE).

-

[nullable]

-
-
-
-
-

g_string_free_to_bytes ()

-
GBytes *
-g_string_free_to_bytes (GString *string);
-

Transfers ownership of the contents of string - to a newly allocated -GBytes. The GString structure itself is deallocated, and it is -therefore invalid to use string - after invoking this function.

-

Note that while GString ensures that its buffer always has a -trailing nul character (not reflected in its "len"), the returned -GBytes does not include this extra nul; i.e. it has length exactly -equal to the "len" member.

-
-

Parameters

-
----- - - - - - -

string

a GString.

[transfer full]
-
-
-

Returns

-

A newly allocated GBytes containing contents of string -; string -itself is freed.

-

[transfer full]

-
-

Since: 2.34

-
-
-
-

g_string_up ()

-
GString *
-g_string_up (GString *string);
-
-

g_string_up has been deprecated since version 2.2 and should not be used in newly-written code.

-

This function uses the locale-specific - toupper() function, which is almost never the right thing. - Use g_string_ascii_up() or g_utf8_strup() instead.

-
-

Converts a GString to uppercase.

-
-

Parameters

-
----- - - - - - -

string

a GString

 
-
-
-

Returns

-

string -.

-

[transfer none]

-
-
-
-
-

g_string_down ()

-
GString *
-g_string_down (GString *string);
-
-

g_string_down has been deprecated since version 2.2 and should not be used in newly-written code.

-

This function uses the locale-specific - tolower() function, which is almost never the right thing. - Use g_string_ascii_down() or g_utf8_strdown() instead.

-
-

Converts a GString to lowercase.

-
-

Parameters

-
----- - - - - - -

string

a GString

 
-
-
-

Returns

-

the GString.

-

[transfer none]

-
-
-
-
-

g_string_hash ()

-
guint
-g_string_hash (const GString *str);
-

Creates a hash code for str -; for use with GHashTable.

-
-

Parameters

-
----- - - - - - -

str

a string to hash

 
-
-
-

Returns

-

hash code for str -

-
-
-
-
-

g_string_equal ()

-
gboolean
-g_string_equal (const GString *v,
-                const GString *v2);
-

Compares two strings for equality, returning TRUE if they are equal. -For use with GHashTable.

-
-

Parameters

-
----- - - - - - - - - - - - - -

v

a GString

 

v2

another GString

 
-
-
-

Returns

-

TRUE if the strings are the same length and contain the -same bytes

-
-
-
-
-

Types and Values

-
-

struct GString

-
struct GString {
-  gchar  *str;
-  gsize len;
-  gsize allocated_len;
-};
-
-

The GString struct contains the public fields of a GString.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

gchar *str;

points to the character data. It may move as text is added. -The str -field is null-terminated and so -can be used as an ordinary C string.

 

gsize len;

contains the length of the string, not including the -terminating nul byte.

 

gsize allocated_len;

the number of bytes that can be stored in the -string before it needs to be reallocated. May be larger than len -.

 
-
-
-
-
-

g_string_sprintf

-
#define             g_string_sprintf
-
-

g_string_sprintf is deprecated and should not be used in newly-written code.

-

This function has been renamed to g_string_printf().

-
-

Writes a formatted string into a GString. -This is similar to the standard sprintf() function, -except that the GString buffer automatically expands -to contain the results. The previous contents of the -GString are destroyed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a GString

 

format

the string format. See the sprintf() documentation

 

...

the parameters to insert into the format string

 
-
-
-
-
-

g_string_sprintfa

-
#define             g_string_sprintfa
-
-

g_string_sprintfa is deprecated and should not be used in newly-written code.

-

This function has been renamed to g_string_append_printf()

-
-

Appends a formatted string onto the end of a GString. -This function is similar to g_string_sprintf() except that -the text is appended to the GString.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

string

a GString

 

format

the string format. See the sprintf() documentation

 

...

the parameters to insert into the format string

 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Testing.html b/docs/reference/glib/html/glib-Testing.html deleted file mode 100644 index 138dd04a2..000000000 --- a/docs/reference/glib/html/glib-Testing.html +++ /dev/null @@ -1,3335 +0,0 @@ - - - - -Testing: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Testing

-

Testing — a test framework

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -g_test_minimized_result () -
-void - -g_test_maximized_result () -
-void - -g_test_init () -
#defineg_test_initialized
#defineg_test_quick
#defineg_test_slow
#defineg_test_thorough
#defineg_test_perf
#defineg_test_verbose
#defineg_test_undefined
#defineg_test_quiet
-gboolean - -g_test_subprocess () -
-int - -g_test_run () -
-void - -(*GTestFunc) () -
-void - -g_test_add_func () -
-void - -(*GTestDataFunc) () -
-void - -g_test_add_data_func () -
-void - -g_test_add_data_func_full () -
#define -g_test_add() -
-gchar * - -g_test_build_filename () -
const gchar * - -g_test_get_filename () -
const gchar * - -g_test_get_dir () -
-void - -g_test_fail () -
-void - -g_test_skip () -
-void - -g_test_incomplete () -
-gboolean - -g_test_failed () -
-void - -g_test_message () -
-void - -g_test_bug_base () -
-void - -g_test_bug () -
-gboolean - -(*GTestLogFatalFunc) () -
-void - -g_test_log_set_fatal_handler () -
-void - -g_test_timer_start () -
-double - -g_test_timer_elapsed () -
-double - -g_test_timer_last () -
-void - -g_test_queue_free () -
-void - -g_test_queue_destroy () -
#define -g_test_queue_unref() -
-void - -g_test_expect_message () -
#defineg_test_assert_expected_messages
-void - -g_test_trap_subprocess () -
-gboolean - -g_test_trap_has_passed () -
-gboolean - -g_test_trap_reached_timeout () -
#defineg_test_trap_assert_passed
#defineg_test_trap_assert_failed
#define -g_test_trap_assert_stdout() -
#define -g_test_trap_assert_stdout_unmatched() -
#define -g_test_trap_assert_stderr() -
#define -g_test_trap_assert_stderr_unmatched() -
-gboolean - -g_test_trap_fork () -
#defineg_test_rand_bit
-gint32 - -g_test_rand_int () -
-gint32 - -g_test_rand_int_range () -
-double - -g_test_rand_double () -
-double - -g_test_rand_double_range () -
#define -g_assert() -
#defineg_assert_not_reached
#define -g_assert_cmpstr() -
#define -g_assert_cmpint() -
#define -g_assert_cmpuint() -
#define -g_assert_cmphex() -
#define -g_assert_cmpfloat() -
#define -g_assert_cmpmem() -
#define -g_assert_no_error() -
#define -g_assert_error() -
#define -g_assert_true() -
#define -g_assert_false() -
#define -g_assert_null() -
#define -g_assert_nonnull() -
-void - -g_test_set_nonfatal_assertions () -
-void - -(*GTestFixtureFunc) () -
-GTestCase * - -g_test_create_case () -
-GTestSuite * - -g_test_create_suite () -
-GTestSuite * - -g_test_get_root () -
-void - -g_test_suite_add () -
-void - -g_test_suite_add_suite () -
-int - -g_test_run_suite () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - -
enumGTestFileType
enumGTestTrapFlags
enumGTestSubprocessFlags
typedefGTestCase
typedefGTestSuite
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GLib provides a framework for writing and maintaining unit tests -in parallel to the code they are testing. The API is designed according -to established concepts found in the other test frameworks (JUnit, NUnit, -RUnit), which in turn is based on smalltalk unit testing concepts.

-
    -
  • Test case: Tests (test methods) are grouped together with their -fixture into test cases.

  • -
  • Fixture: A test fixture consists of fixture data and setup and -teardown methods to establish the environment for the test -functions. We use fresh fixtures, i.e. fixtures are newly set -up and torn down around each test invocation to avoid dependencies -between tests.

  • -
  • Test suite: Test cases can be grouped into test suites, to allow -subsets of the available tests to be run. Test suites can be -grouped into other test suites as well.

  • -
-

The API is designed to handle creation and registration of test suites -and test cases implicitly. A simple call like

-
- - - - - - - -
1
g_test_add_func ("/misc/assertions", test_assertions);
-
- -

-creates a test suite called "misc" with a single test case named -"assertions", which consists of running the test_assertions function.

-

In addition to the traditional g_assert(), the test framework provides -an extended set of assertions for comparisons: g_assert_cmpfloat(), -g_assert_cmpint(), g_assert_cmpuint(), g_assert_cmphex(), -g_assert_cmpstr(), and g_assert_cmpmem(). The advantage of these -variants over plain g_assert() is that the assertion messages can be -more elaborate, and include the values of the compared entities.

-

GLib ships with two utilities called gtester and -gtester-report to facilitate running tests and producing -nicely formatted test reports.

-

A full example of creating a test suite with two tests using fixtures:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
#include <glib.h>
-#include <locale.h>
-
-typedef struct {
-  MyObject *obj;
-  OtherObject *helper;
-} MyObjectFixture;
-
-static void
-my_object_fixture_set_up (MyObjectFixture *fixture,
-                          gconstpointer user_data)
-{
-  fixture->obj = my_object_new ();
-  my_object_set_prop1 (fixture->obj, "some-value");
-  my_object_do_some_complex_setup (fixture->obj, user_data);
-
-  fixture->helper = other_object_new ();
-}
-
-static void
-my_object_fixture_tear_down (MyObjectFixture *fixture,
-                             gconstpointer user_data)
-{
-  g_clear_object (&fixture->helper);
-  g_clear_object (&fixture->obj);
-}
-
-static void
-test_my_object_test1 (MyObjectFixture *fixture,
-                      gconstpointer user_data)
-{
-  g_assert_cmpstr (my_object_get_property (fixture->obj), ==, "initial-value");
-}
-
-static void
-test_my_object_test2 (MyObjectFixture *fixture,
-                      gconstpointer user_data)
-{
-  my_object_do_some_work_using_helper (fixture->obj, fixture->helper);
-  g_assert_cmpstr (my_object_get_property (fixture->obj), ==, "updated-value");
-}
-
-int
-main (int argc, char *argv[])
-{
-  setlocale (LC_ALL, "");
-
-  g_test_init (&argc, &argv, NULL);
-  g_test_bug_base ("http://bugzilla.gnome.org/show_bug.cgi?id=");
-
-  // Define the tests.
-  g_test_add ("/my-object/test1", MyObjectFixture, "some-user-data",
-              my_object_fixture_set_up, test_my_object_test1,
-              my_object_fixture_tear_down);
-  g_test_add ("/my-object/test2", MyObjectFixture, "some-user-data",
-              my_object_fixture_set_up, test_my_object_test2,
-              my_object_fixture_tear_down);
-
-  return g_test_run ();
-}
-
- -

-
-
-

Functions

-
-

g_test_minimized_result ()

-
void
-g_test_minimized_result (double minimized_quantity,
-                         const char *format,
-                         ...);
-

Report the result of a performance or measurement test. -The test should generally strive to minimize the reported -quantities (smaller values are better than larger ones), -this and minimized_quantity - can determine sorting -order for test result reports.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

minimized_quantity

the reported value

 

format

the format string of the report message

 

...

arguments to pass to the printf() function

 
-
-

Since: 2.16

-
-
-
-

g_test_maximized_result ()

-
void
-g_test_maximized_result (double maximized_quantity,
-                         const char *format,
-                         ...);
-

Report the result of a performance or measurement test. -The test should generally strive to maximize the reported -quantities (larger values are better than smaller ones), -this and maximized_quantity - can determine sorting -order for test result reports.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

maximized_quantity

the reported value

 

format

the format string of the report message

 

...

arguments to pass to the printf() function

 
-
-

Since: 2.16

-
-
-
-

g_test_init ()

-
void
-g_test_init (int *argc,
-             char ***argv,
-             ...);
-

Initialize the GLib testing framework, e.g. by seeding the -test random number generator, the name for g_get_prgname() -and parsing test related command line args.

-

So far, the following arguments are understood:

-
    -
  • -l: List test cases available in a test executable.

  • -
  • --seed=SEED: Provide a random seed to reproduce test -runs using random numbers.

  • -
  • --verbose: Run tests verbosely.

  • -
  • -q, --quiet: Run tests quietly.

  • -
  • -p PATH: Execute all tests matching the given path.

  • -
  • -s PATH: Skip all tests matching the given path. -This can also be used to force a test to run that would otherwise -be skipped (ie, a test whose name contains "/subprocess").

  • -
  • -

    -m {perf|slow|thorough|quick|undefined|no-undefined}: Execute tests according to these test modes:

    -

    perf: Performance tests, may take long and report results.

    -

    slow, thorough: Slow and thorough tests, may take quite long and maximize coverage.

    -

    quick: Quick tests, should run really quickly and give good coverage.

    -

    undefined: Tests for undefined behaviour, may provoke programming errors -under g_test_trap_subprocess() or g_test_expect_message() to check -that appropriate assertions or warnings are given

    -

    no-undefined: Avoid tests for undefined behaviour

    -
  • -
  • --debug-log: Debug test logging output.

  • -
-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

argc

Address of the argc -parameter of the main() function. -Changed if any arguments were handled.

 

argv

Address of the argv -parameter of main(). -Any parameters understood by g_test_init() stripped before return.

 

...

NULL-terminated list of special options. Currently the only -defined option is "no_g_set_prgname", which -will cause g_test_init() to not call g_set_prgname().

 
-
-

Since: 2.16

-
-
-
-

g_test_initialized

-
#define             g_test_initialized()
-

Returns TRUE if g_test_init() has been called.

-
-

Returns

-

TRUE if g_test_init() has been called.

-
-

Since: 2.36

-
-
-
-

g_test_quick

-
#define             g_test_quick()
-

Returns TRUE if tests are run in quick mode. -Exactly one of g_test_quick() and g_test_slow() is active in any run; -there is no "medium speed".

-
-

Returns

-

TRUE if in quick mode

-
-
-
-
-

g_test_slow

-
#define             g_test_slow()
-

Returns TRUE if tests are run in slow mode. -Exactly one of g_test_quick() and g_test_slow() is active in any run; -there is no "medium speed".

-
-

Returns

-

the opposite of g_test_quick()

-
-
-
-
-

g_test_thorough

-
#define             g_test_thorough()
-

Returns TRUE if tests are run in thorough mode, equivalent to -g_test_slow().

-
-

Returns

-

the same thing as g_test_slow()

-
-
-
-
-

g_test_perf

-
#define             g_test_perf()
-

Returns TRUE if tests are run in performance mode.

-
-

Returns

-

TRUE if in performance mode

-
-
-
-
-

g_test_verbose

-
#define             g_test_verbose()
-

Returns TRUE if tests are run in verbose mode. -The default is neither g_test_verbose() nor g_test_quiet().

-
-

Returns

-

TRUE if in verbose mode

-
-
-
-
-

g_test_undefined

-
#define             g_test_undefined()
-

Returns TRUE if tests may provoke assertions and other formally-undefined -behaviour, to verify that appropriate warnings are given. It might, in some -cases, be useful to turn this off if running tests under valgrind.

-
-

Returns

-

TRUE if tests may provoke programming errors

-
-
-
-
-

g_test_quiet

-
#define             g_test_quiet()
-

Returns TRUE if tests are run in quiet mode. -The default is neither g_test_verbose() nor g_test_quiet().

-
-

Returns

-

TRUE if in quiet mode

-
-
-
-
-

g_test_subprocess ()

-
gboolean
-g_test_subprocess (void);
-

Returns TRUE (after g_test_init() has been called) if the test -program is running under g_test_trap_subprocess().

-
-

Returns

-

TRUE if the test program is running under -g_test_trap_subprocess().

-
-

Since: 2.38

-
-
-
-

g_test_run ()

-
int
-g_test_run (void);
-

Runs all tests under the toplevel suite which can be retrieved -with g_test_get_root(). Similar to g_test_run_suite(), the test -cases to be run are filtered according to test path arguments -(-p testpath and -s testpath) as parsed by g_test_init(). -g_test_run_suite() or g_test_run() may only be called once in a -program.

-

In general, the tests and sub-suites within each suite are run in -the order in which they are defined. However, note that prior to -GLib 2.36, there was a bug in the g_test_add_* -functions which caused them to create multiple suites with the same -name, meaning that if you created tests "/foo/simple", -"/bar/simple", and "/foo/using-bar" in that order, they would get -run in that order (since g_test_run() would run the first "/foo" -suite, then the "/bar" suite, then the second "/foo" suite). As of -2.36, this bug is fixed, and adding the tests in that order would -result in a running order of "/foo/simple", "/foo/using-bar", -"/bar/simple". If this new ordering is sub-optimal (because it puts -more-complicated tests before simpler ones, making it harder to -figure out exactly what has failed), you can fix it by changing the -test paths to group tests by suite in a way that will result in the -desired running order. Eg, "/simple/foo", "/simple/bar", -"/complex/foo-using-bar".

-

However, you should never make the actual result of a test depend -on the order that tests are run in. If you need to ensure that some -particular code runs before or after a given test case, use -g_test_add(), which lets you specify setup and teardown functions.

-

If all tests are skipped, this function will return 0 if -producing TAP output, or 77 (treated as "skip test" by Automake) otherwise.

-
-

Returns

-

0 on success, 1 on failure (assuming it returns at all), -0 or 77 if all tests were skipped with g_test_skip()

-
-

Since: 2.16

-
-
-
-

GTestFunc ()

-
void
-(*GTestFunc) (void);
-

The type used for test case functions.

-

Since: 2.28

-
-
-
-

g_test_add_func ()

-
void
-g_test_add_func (const char *testpath,
-                 GTestFunc test_func);
-

Create a new test case, similar to g_test_create_case(). However -the test is assumed to use no fixture, and test suites are automatically -created on the fly and added to the root fixture, based on the -slash-separated portions of testpath -.

-

If testpath - includes the component "subprocess" anywhere in it, -the test will be skipped by default, and only run if explicitly -required via the -p command-line option or g_test_trap_subprocess().

-
-

Parameters

-
----- - - - - - - - - - - - - -

testpath

/-separated test case path name for the test.

 

test_func

The test function to invoke for this test.

[scope async]
-
-

Since: 2.16

-
-
-
-

GTestDataFunc ()

-
void
-(*GTestDataFunc) (gconstpointer user_data);
-

The type used for test case functions that take an extra pointer -argument.

-
-

Parameters

-
----- - - - - - -

user_data

the data provided when registering the test

 
-
-

Since: 2.28

-
-
-
-

g_test_add_data_func ()

-
void
-g_test_add_data_func (const char *testpath,
-                      gconstpointer test_data,
-                      GTestDataFunc test_func);
-

Create a new test case, similar to g_test_create_case(). However -the test is assumed to use no fixture, and test suites are automatically -created on the fly and added to the root fixture, based on the -slash-separated portions of testpath -. The test_data - argument -will be passed as first argument to test_func -.

-

If testpath - includes the component "subprocess" anywhere in it, -the test will be skipped by default, and only run if explicitly -required via the -p command-line option or g_test_trap_subprocess().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

testpath

/-separated test case path name for the test.

 

test_data

Test data argument for the test function.

 

test_func

The test function to invoke for this test.

[scope async]
-
-

Since: 2.16

-
-
-
-

g_test_add_data_func_full ()

-
void
-g_test_add_data_func_full (const char *testpath,
-                           gpointer test_data,
-                           GTestDataFunc test_func,
-                           GDestroyNotify data_free_func);
-

Create a new test case, as with g_test_add_data_func(), but freeing -test_data - after the test run is complete.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

testpath

/-separated test case path name for the test.

 

test_data

Test data argument for the test function.

 

test_func

The test function to invoke for this test.

 

data_free_func

GDestroyNotify for test_data -.

 
-
-

Since: 2.34

-
-
-
-

g_test_add()

-
#define             g_test_add(testpath, Fixture, tdata, fsetup, ftest, fteardown)
-

Hook up a new test case at testpath -, similar to g_test_add_func(). -A fixture data structure with setup and teardown functions may be provided, -similar to g_test_create_case().

-

g_test_add() is implemented as a macro, so that the fsetup(), ftest() and -fteardown() callbacks can expect a Fixture - pointer as their first argument -in a type safe manner. They otherwise have type GTestFixtureFunc.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

testpath

The test path for a new test case.

 

Fixture

The type of a fixture data structure.

 

tdata

Data argument for the test functions.

 

fsetup

The function to set up the fixture data.

 

ftest

The actual test function.

 

fteardown

The function to tear down the fixture data.

 
-
-

Since: 2.16

-
-
-
-

g_test_build_filename ()

-
gchar *
-g_test_build_filename (GTestFileType file_type,
-                       const gchar *first_path,
-                       ...);
-

Creates the pathname to a data file that is required for a test.

-

This function is conceptually similar to g_build_filename() except -that the first argument has been replaced with a GTestFileType -argument.

-

The data file should either have been distributed with the module -containing the test (G_TEST_DIST) or built as part of the build -system of that module (G_TEST_BUILT).

-

In order for this function to work in srcdir != builddir situations, -the G_TEST_SRCDIR and G_TEST_BUILDDIR environment variables need to -have been defined. As of 2.38, this is done by the glib.mk -included in GLib. Please ensure that your copy is up to date before -using this function.

-

In case neither variable is set, this function will fall back to -using the dirname portion of argv[0], possibly removing ".libs". -This allows for casual running of tests directly from the commandline -in the srcdir == builddir case and should also support running of -installed tests, assuming the data files have been installed in the -same relative path as the test binary.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file_type

the type of file (built vs. distributed)

 

first_path

the first segment of the pathname

 

...

NULL-terminated additional path segments

 
-
-
-

Returns

-

the path of the file, to be freed using g_free()

-
-

Since: 2.38

-
-
-
-

g_test_get_filename ()

-
const gchar *
-g_test_get_filename (GTestFileType file_type,
-                     const gchar *first_path,
-                     ...);
-

Gets the pathname to a data file that is required for a test.

-

This is the same as g_test_build_filename() with two differences. -The first difference is that must only use this function from within -a testcase function. The second difference is that you need not free -the return value -- it will be automatically freed when the testcase -finishes running.

-

It is safe to use this function from a thread inside of a testcase -but you must ensure that all such uses occur before the main testcase -function returns (ie: it is best to ensure that all threads have been -joined).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

file_type

the type of file (built vs. distributed)

 

first_path

the first segment of the pathname

 

...

NULL-terminated additional path segments

 
-
-
-

Returns

-

the path, automatically freed at the end of the testcase

-
-

Since: 2.38

-
-
-
-

g_test_get_dir ()

-
const gchar *
-g_test_get_dir (GTestFileType file_type);
-

Gets the pathname of the directory containing test files of the type -specified by file_type -.

-

This is approximately the same as calling g_test_build_filename("."), -but you don't need to free the return value.

-
-

Parameters

-
----- - - - - - -

file_type

the type of file (built vs. distributed)

 
-
-
-

Returns

-

the path of the directory, owned by GLib.

-

[type filename]

-
-

Since: 2.38

-
-
-
-

g_test_fail ()

-
void
-g_test_fail (void);
-

Indicates that a test failed. This function can be called -multiple times from the same test. You can use this function -if your test failed in a recoverable way.

-

Do not use this function if the failure of a test could cause -other tests to malfunction.

-

Calling this function will not stop the test from running, you -need to return from the test function yourself. So you can -produce additional diagnostic messages or even continue running -the test.

-

If not called from inside a test, this function does nothing.

-

Since: 2.30

-
-
-
-

g_test_skip ()

-
void
-g_test_skip (const gchar *msg);
-

Indicates that a test was skipped.

-

Calling this function will not stop the test from running, you -need to return from the test function yourself. So you can -produce additional diagnostic messages or even continue running -the test.

-

If not called from inside a test, this function does nothing.

-
-

Parameters

-
----- - - - - - -

msg

explanation.

[nullable]
-
-

Since: 2.38

-
-
-
-

g_test_incomplete ()

-
void
-g_test_incomplete (const gchar *msg);
-

Indicates that a test failed because of some incomplete -functionality. This function can be called multiple times -from the same test.

-

Calling this function will not stop the test from running, you -need to return from the test function yourself. So you can -produce additional diagnostic messages or even continue running -the test.

-

If not called from inside a test, this function does nothing.

-
-

Parameters

-
----- - - - - - -

msg

explanation.

[nullable]
-
-

Since: 2.38

-
-
-
-

g_test_failed ()

-
gboolean
-g_test_failed (void);
-

Returns whether a test has already failed. This will -be the case when g_test_fail(), g_test_incomplete() -or g_test_skip() have been called, but also if an -assertion has failed.

-

This can be useful to return early from a test if -continuing after a failed assertion might be harmful.

-

The return value of this function is only meaningful -if it is called from inside a test function.

-
-

Returns

-

TRUE if the test has failed

-
-

Since: 2.38

-
-
-
-

g_test_message ()

-
void
-g_test_message (const char *format,
-                ...);
-

Add a message to the test report.

-
-

Parameters

-
----- - - - - - - - - - - - - -

format

the format string

 

...

printf-like arguments to format -

 
-
-

Since: 2.16

-
-
-
-

g_test_bug_base ()

-
void
-g_test_bug_base (const char *uri_pattern);
-

Specify the base URI for bug reports.

-

The base URI is used to construct bug report messages for -g_test_message() when g_test_bug() is called. -Calling this function outside of a test case sets the -default base URI for all test cases. Calling it from within -a test case changes the base URI for the scope of the test -case only. -Bug URIs are constructed by appending a bug specific URI -portion to uri_pattern -, or by replacing the special string -'%s' within uri_pattern - if that is present.

-
-

Parameters

-
----- - - - - - -

uri_pattern

the base pattern for bug URIs

 
-
-

Since: 2.16

-
-
-
-

g_test_bug ()

-
void
-g_test_bug (const char *bug_uri_snippet);
-

This function adds a message to test reports that -associates a bug URI with a test case. -Bug URIs are constructed from a base URI set with g_test_bug_base() -and bug_uri_snippet -.

-
-

Parameters

-
----- - - - - - -

bug_uri_snippet

Bug specific bug tracker URI portion.

 
-
-

Since: 2.16

-
-
-
-

GTestLogFatalFunc ()

-
gboolean
-(*GTestLogFatalFunc) (const gchar *log_domain,
-                      GLogLevelFlags log_level,
-                      const gchar *message,
-                      gpointer user_data);
-

Specifies the prototype of fatal log handler functions.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

log_domain

the log domain of the message

 

log_level

the log level of the message (including the fatal and recursion flags)

 

message

the message to process

 

user_data

user data, set in g_test_log_set_fatal_handler()

 
-
-
-

Returns

-

TRUE if the program should abort, FALSE otherwise

-
-

Since: 2.22

-
-
-
-

g_test_log_set_fatal_handler ()

-
void
-g_test_log_set_fatal_handler (GTestLogFatalFunc log_func,
-                              gpointer user_data);
-

Installs a non-error fatal log handler which can be -used to decide whether log messages which are counted -as fatal abort the program.

-

The use case here is that you are running a test case -that depends on particular libraries or circumstances -and cannot prevent certain known critical or warning -messages. So you install a handler that compares the -domain and message to precisely not abort in such a case.

-

Note that the handler is reset at the beginning of -any test case, so you have to set it inside each test -function which needs the special behavior.

-

This handler has no effect on g_error messages.

-

This handler also has no effect on structured log messages (using -g_log_structured() or g_log_structured_array()). To change the fatal -behaviour for specific log messages, programs must install a custom log -writer function using g_log_set_writer_func().See -Using Structured Logging.

-
-

Parameters

-
----- - - - - - - - - - - - - -

log_func

the log handler function.

 

user_data

data passed to the log handler.

 
-
-

Since: 2.22

-
-
-
-

g_test_timer_start ()

-
void
-g_test_timer_start (void);
-

Start a timing test. Call g_test_timer_elapsed() when the task is supposed -to be done. Call this function again to restart the timer.

-

Since: 2.16

-
-
-
-

g_test_timer_elapsed ()

-
double
-g_test_timer_elapsed (void);
-

Get the time since the last start of the timer with g_test_timer_start().

-
-

Returns

-

the time since the last start of the timer, as a double

-
-

Since: 2.16

-
-
-
-

g_test_timer_last ()

-
double
-g_test_timer_last (void);
-

Report the last result of g_test_timer_elapsed().

-
-

Returns

-

the last result of g_test_timer_elapsed(), as a double

-
-

Since: 2.16

-
-
-
-

g_test_queue_free ()

-
void
-g_test_queue_free (gpointer gfree_pointer);
-

Enqueue a pointer to be released with g_free() during the next -teardown phase. This is equivalent to calling g_test_queue_destroy() -with a destroy callback of g_free().

-
-

Parameters

-
----- - - - - - -

gfree_pointer

the pointer to be stored.

 
-
-

Since: 2.16

-
-
-
-

g_test_queue_destroy ()

-
void
-g_test_queue_destroy (GDestroyNotify destroy_func,
-                      gpointer destroy_data);
-

This function enqueus a callback destroy_func - to be executed -during the next test case teardown phase. This is most useful -to auto destruct allocated test resources at the end of a test run. -Resources are released in reverse queue order, that means enqueueing -callback A before callback B will cause B() to be called before -A() during teardown.

-
-

Parameters

-
----- - - - - - - - - - - - - -

destroy_func

Destroy callback for teardown phase.

 

destroy_data

Destroy callback data.

 
-
-

Since: 2.16

-
-
-
-

g_test_queue_unref()

-
#define             g_test_queue_unref(gobject)
-

Enqueue an object to be released with g_object_unref() during -the next teardown phase. This is equivalent to calling -g_test_queue_destroy() with a destroy callback of g_object_unref().

-
-

Parameters

-
----- - - - - - -

gobject

the object to unref

 
-
-

Since: 2.16

-
-
-
-

g_test_expect_message ()

-
void
-g_test_expect_message (const gchar *log_domain,
-                       GLogLevelFlags log_level,
-                       const gchar *pattern);
-

Indicates that a message with the given log_domain - and log_level -, -with text matching pattern -, is expected to be logged. When this -message is logged, it will not be printed, and the test case will -not abort.

-

This API may only be used with the old logging API (g_log() without -G_LOG_USE_STRUCTURED defined). It will not work with the structured logging -API. See Testing for Messages.

-

Use g_test_assert_expected_messages() to assert that all -previously-expected messages have been seen and suppressed.

-

You can call this multiple times in a row, if multiple messages are -expected as a result of a single call. (The messages must appear in -the same order as the calls to g_test_expect_message().)

-

For example:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
// g_main_context_push_thread_default() should fail if the
-// context is already owned by another thread.
-g_test_expect_message (G_LOG_DOMAIN,
-                       G_LOG_LEVEL_CRITICAL,
-                       "assertion*acquired_context*failed");
-g_main_context_push_thread_default (bad_context);
-g_test_assert_expected_messages ();
-
- -

-

Note that you cannot use this to test g_error() messages, since -g_error() intentionally never returns even if the program doesn't -abort; use g_test_trap_subprocess() in this case.

-

If messages at G_LOG_LEVEL_DEBUG are emitted, but not explicitly -expected via g_test_expect_message() then they will be ignored.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

log_domain

the log domain of the message.

[nullable]

log_level

the log level of the message

 

pattern

a glob-style pattern

 
-
-

Since: 2.34

-
-
-
-

g_test_assert_expected_messages

-
#define             g_test_assert_expected_messages()
-

Asserts that all messages previously indicated via -g_test_expect_message() have been seen and suppressed.

-

This API may only be used with the old logging API (g_log() without -G_LOG_USE_STRUCTURED defined). It will not work with the structured logging -API. See Testing for Messages.

-

If messages at G_LOG_LEVEL_DEBUG are emitted, but not explicitly -expected via g_test_expect_message() then they will be ignored.

-

Since: 2.34

-
-
-
-

g_test_trap_subprocess ()

-
void
-g_test_trap_subprocess (const char *test_path,
-                        guint64 usec_timeout,
-                        GTestSubprocessFlags test_flags);
-

Respawns the test program to run only test_path - in a subprocess. -This can be used for a test case that might not return, or that -might abort.

-

If test_path - is NULL then the same test is re-run in a subprocess. -You can use g_test_subprocess() to determine whether the test is in -a subprocess or not.

-

test_path - can also be the name of the parent test, followed by -"/subprocess/" and then a name for the specific subtest (or just -ending with "/subprocess" if the test only has one child test); -tests with names of this form will automatically be skipped in the -parent process.

-

If usec_timeout - is non-0, the test subprocess is aborted and -considered failing if its run time exceeds it.

-

The subprocess behavior can be configured with the -GTestSubprocessFlags flags.

-

You can use methods such as g_test_trap_assert_passed(), -g_test_trap_assert_failed(), and g_test_trap_assert_stderr() to -check the results of the subprocess. (But note that -g_test_trap_assert_stdout() and g_test_trap_assert_stderr() -cannot be used if test_flags - specifies that the child should -inherit the parent stdout/stderr.)

-

If your main() needs to behave differently in -the subprocess, you can call g_test_subprocess() (after calling -g_test_init()) to see whether you are in a subprocess.

-

The following example tests that calling -my_object_new(1000000) will abort with an error -message.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
static void
-test_create_large_object (void)
-{
-  if (g_test_subprocess ())
-    {
-      my_object_new (1000000);
-      return;
-    }
-
-  // Reruns this same test in a subprocess
-  g_test_trap_subprocess (NULL, 0, 0);
-  g_test_trap_assert_failed ();
-  g_test_trap_assert_stderr ("*ERROR*too large*");
-}
-
-int
-main (int argc, char **argv)
-{
-  g_test_init (&argc, &argv, NULL);
-
-  g_test_add_func ("/myobject/create_large_object",
-                   test_create_large_object);
-  return g_test_run ();
-}
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

test_path

Test to run in a subprocess.

[nullable]

usec_timeout

Timeout for the subprocess test in micro seconds.

 

test_flags

Flags to modify subprocess behaviour.

 
-
-

Since: 2.38

-
-
-
-

g_test_trap_has_passed ()

-
gboolean
-g_test_trap_has_passed (void);
-

Check the result of the last g_test_trap_subprocess() call.

-
-

Returns

-

TRUE if the last test subprocess terminated successfully.

-
-

Since: 2.16

-
-
-
-

g_test_trap_reached_timeout ()

-
gboolean
-g_test_trap_reached_timeout (void);
-

Check the result of the last g_test_trap_subprocess() call.

-
-

Returns

-

TRUE if the last test subprocess got killed due to a timeout.

-
-

Since: 2.16

-
-
-
-

g_test_trap_assert_passed

-
#define             g_test_trap_assert_passed()
-

Assert that the last test subprocess passed. -See g_test_trap_subprocess().

-

Since: 2.16

-
-
-
-

g_test_trap_assert_failed

-
#define             g_test_trap_assert_failed()
-

Assert that the last test subprocess failed. -See g_test_trap_subprocess().

-

This is sometimes used to test situations that are formally considered to -be undefined behaviour, like inputs that fail a g_return_if_fail() -check. In these situations you should skip the entire test, including the -call to g_test_trap_subprocess(), unless g_test_undefined() returns TRUE -to indicate that undefined behaviour may be tested.

-

Since: 2.16

-
-
-
-

g_test_trap_assert_stdout()

-
#define             g_test_trap_assert_stdout(soutpattern)
-

Assert that the stdout output of the last test subprocess matches -soutpattern -. See g_test_trap_subprocess().

-
-

Parameters

-
----- - - - - - -

soutpattern

a glob-style pattern

 
-
-

Since: 2.16

-
-
-
-

g_test_trap_assert_stdout_unmatched()

-
#define             g_test_trap_assert_stdout_unmatched(soutpattern)
-

Assert that the stdout output of the last test subprocess -does not match soutpattern -. See g_test_trap_subprocess().

-
-

Parameters

-
----- - - - - - -

soutpattern

a glob-style pattern

 
-
-

Since: 2.16

-
-
-
-

g_test_trap_assert_stderr()

-
#define             g_test_trap_assert_stderr(serrpattern)
-

Assert that the stderr output of the last test subprocess -matches serrpattern -. See g_test_trap_subprocess().

-

This is sometimes used to test situations that are formally -considered to be undefined behaviour, like code that hits a -g_assert() or g_error(). In these situations you should skip the -entire test, including the call to g_test_trap_subprocess(), unless -g_test_undefined() returns TRUE to indicate that undefined -behaviour may be tested.

-
-

Parameters

-
----- - - - - - -

serrpattern

a glob-style pattern

 
-
-

Since: 2.16

-
-
-
-

g_test_trap_assert_stderr_unmatched()

-
#define             g_test_trap_assert_stderr_unmatched(serrpattern)
-

Assert that the stderr output of the last test subprocess -does not match serrpattern -. See g_test_trap_subprocess().

-
-

Parameters

-
----- - - - - - -

serrpattern

a glob-style pattern

 
-
-

Since: 2.16

-
-
-
-

g_test_trap_fork ()

-
gboolean
-g_test_trap_fork (guint64 usec_timeout,
-                  GTestTrapFlags test_trap_flags);
-
-

g_test_trap_fork is deprecated and should not be used in newly-written code.

-

This function is implemented only on Unix platforms, -and is not always reliable due to problems inherent in -fork-without-exec. Use g_test_trap_subprocess() instead.

-
-

Fork the current test program to execute a test case that might -not return or that might abort.

-

If usec_timeout - is non-0, the forked test case is aborted and -considered failing if its run time exceeds it.

-

The forking behavior can be configured with the GTestTrapFlags flags.

-

In the following example, the test code forks, the forked child -process produces some sample output and exits successfully. -The forking parent process then asserts successful child program -termination and validates child program outputs.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
static void
-test_fork_patterns (void)
-{
-  if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDOUT | G_TEST_TRAP_SILENCE_STDERR))
-    {
-      g_print ("some stdout text: somagic17\n");
-      g_printerr ("some stderr text: semagic43\n");
-      exit (0); // successful test run
-    }
-  g_test_trap_assert_passed ();
-  g_test_trap_assert_stdout ("*somagic17*");
-  g_test_trap_assert_stderr ("*semagic43*");
-}
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

usec_timeout

Timeout for the forked test in micro seconds.

 

test_trap_flags

Flags to modify forking behaviour.

 
-
-
-

Returns

-

TRUE for the forked child and FALSE for the executing parent process.

-
-

Since: 2.16

-
-
-
-

g_test_rand_bit

-
#define             g_test_rand_bit()
-

Get a reproducible random bit (0 or 1), see g_test_rand_int() -for details on test case random numbers.

-

Since: 2.16

-
-
-
-

g_test_rand_int ()

-
gint32
-g_test_rand_int (void);
-

Get a reproducible random integer number.

-

The random numbers generated by the g_test_rand_*() family of functions -change with every new test program start, unless the --seed option is -given when starting test programs.

-

For individual test cases however, the random number generator is -reseeded, to avoid dependencies between tests and to make --seed -effective for all test cases.

-
-

Returns

-

a random number from the seeded random number generator.

-
-

Since: 2.16

-
-
-
-

g_test_rand_int_range ()

-
gint32
-g_test_rand_int_range (gint32 begin,
-                       gint32 end);
-

Get a reproducible random integer number out of a specified range, -see g_test_rand_int() for details on test case random numbers.

-
-

Parameters

-
----- - - - - - - - - - - - - -

begin

the minimum value returned by this function

 

end

the smallest value not to be returned by this function

 
-
-
-

Returns

-

a number with begin -<= number < end -.

-
-

Since: 2.16

-
-
-
-

g_test_rand_double ()

-
double
-g_test_rand_double (void);
-

Get a reproducible random floating point number, -see g_test_rand_int() for details on test case random numbers.

-
-

Returns

-

a random number from the seeded random number generator.

-
-

Since: 2.16

-
-
-
-

g_test_rand_double_range ()

-
double
-g_test_rand_double_range (double range_start,
-                          double range_end);
-

Get a reproducible random floating pointer number out of a specified range, -see g_test_rand_int() for details on test case random numbers.

-
-

Parameters

-
----- - - - - - - - - - - - - -

range_start

the minimum value returned by this function

 

range_end

the minimum value not returned by this function

 
-
-
-

Returns

-

a number with range_start -<= number < range_end -.

-
-

Since: 2.16

-
-
-
-

g_assert()

-
#define             g_assert(expr)
-

Debugging macro to terminate the application if the assertion -fails. If the assertion fails (i.e. the expression is not true), -an error message is logged and the application is terminated.

-

The macro can be turned off in final releases of code by defining -G_DISABLE_ASSERT when compiling the application, so code must -not depend on any side effects from expr -.

-
-

Parameters

-
----- - - - - - -

expr

the expression to check

 
-
-
-
-
-

g_assert_not_reached

-
#define             g_assert_not_reached()
-

Debugging macro to terminate the application if it is ever -reached. If it is reached, an error message is logged and the -application is terminated.

-

The macro can be turned off in final releases of code by defining -G_DISABLE_ASSERT when compiling the application.

-
-
-
-

g_assert_cmpstr()

-
#define             g_assert_cmpstr(s1, cmp, s2)
-

Debugging macro to compare two strings. If the comparison fails, -an error message is logged and the application is either terminated -or the testcase marked as failed. -The strings are compared using g_strcmp0().

-

The effect of g_assert_cmpstr (s1, op, s2) is -the same as g_assert_true (g_strcmp0 (s1, s2) op 0). -The advantage of this macro is that it can produce a message that -includes the actual values of s1 - and s2 -.

-
- - - - - - - -
1
g_assert_cmpstr (mystring, ==, "fubar");
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

s1

a string (may be NULL)

 

cmp

The comparison operator to use. -One of ==, !=, <, >, <=, >=.

 

s2

another string (may be NULL)

 
-
-

Since: 2.16

-
-
-
-

g_assert_cmpint()

-
#define             g_assert_cmpint(n1, cmp, n2)
-

Debugging macro to compare two integers.

-

The effect of g_assert_cmpint (n1, op, n2) is -the same as g_assert_true (n1 op n2). The advantage -of this macro is that it can produce a message that includes the -actual values of n1 - and n2 -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

n1

an integer

 

cmp

The comparison operator to use. -One of ==, !=, <, >, <=, >=.

 

n2

another integer

 
-
-

Since: 2.16

-
-
-
-

g_assert_cmpuint()

-
#define             g_assert_cmpuint(n1, cmp, n2)
-

Debugging macro to compare two unsigned integers.

-

The effect of g_assert_cmpuint (n1, op, n2) is -the same as g_assert_true (n1 op n2). The advantage -of this macro is that it can produce a message that includes the -actual values of n1 - and n2 -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

n1

an unsigned integer

 

cmp

The comparison operator to use. -One of ==, !=, <, >, <=, >=.

 

n2

another unsigned integer

 
-
-

Since: 2.16

-
-
-
-

g_assert_cmphex()

-
#define             g_assert_cmphex(n1, cmp, n2)
-

Debugging macro to compare to unsigned integers.

-

This is a variant of g_assert_cmpuint() that displays the numbers -in hexadecimal notation in the message.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

n1

an unsigned integer

 

cmp

The comparison operator to use. -One of ==, !=, <, >, <=, >=.

 

n2

another unsigned integer

 
-
-

Since: 2.16

-
-
-
-

g_assert_cmpfloat()

-
#define             g_assert_cmpfloat(n1,cmp,n2)
-

Debugging macro to compare two floating point numbers.

-

The effect of g_assert_cmpfloat (n1, op, n2) is -the same as g_assert_true (n1 op n2). The advantage -of this macro is that it can produce a message that includes the -actual values of n1 - and n2 -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

n1

an floating point number

 

cmp

The comparison operator to use. -One of ==, !=, <, >, <=, >=.

 

n2

another floating point number

 
-
-

Since: 2.16

-
-
-
-

g_assert_cmpmem()

-
#define             g_assert_cmpmem(m1, l1, m2, l2)
-

Debugging macro to compare memory regions. If the comparison fails, -an error message is logged and the application is either terminated -or the testcase marked as failed.

-

The effect of g_assert_cmpmem (m1, l1, m2, l2) is -the same as g_assert_true (l1 == l2 && memcmp (m1, m2, l1) == 0). -The advantage of this macro is that it can produce a message that -includes the actual values of l1 - and l2 -.

-
- - - - - - - -
1
g_assert_cmpmem (buf->data, buf->len, expected, sizeof (expected));
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

m1

pointer to a buffer

 

l1

length of m1 -

 

m2

pointer to another buffer

 

l2

length of m2 -

 
-
-

Since: 2.46

-
-
-
-

g_assert_no_error()

-
#define             g_assert_no_error(err)
-

Debugging macro to check that a GError is not set.

-

The effect of g_assert_no_error (err) is -the same as g_assert_true (err == NULL). The advantage -of this macro is that it can produce a message that includes -the error message and code.

-
-

Parameters

-
----- - - - - - -

err

a GError, possibly NULL

 
-
-

Since: 2.20

-
-
-
-

g_assert_error()

-
#define             g_assert_error(err, dom, c)
-

Debugging macro to check that a method has returned -the correct GError.

-

The effect of g_assert_error (err, dom, c) is -the same as g_assert_true (err != NULL && err->domain -== dom && err->code == c). The advantage of this -macro is that it can produce a message that includes the incorrect -error message and code.

-

This can only be used to test for a specific error. If you want to -test that err - is set, but don't care what it's set to, just use -g_assert (err != NULL)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

err

a GError, possibly NULL

 

dom

the expected error domain (a GQuark)

 

c

the expected error code

 
-
-

Since: 2.20

-
-
-
-

g_assert_true()

-
#define             g_assert_true(expr)
-

Debugging macro to check that an expression is true.

-

If the assertion fails (i.e. the expression is not true), -an error message is logged and the application is either -terminated or the testcase marked as failed.

-

See g_test_set_nonfatal_assertions().

-
-

Parameters

-
----- - - - - - -

expr

the expression to check

 
-
-

Since: 2.38

-
-
-
-

g_assert_false()

-
#define             g_assert_false(expr)
-

Debugging macro to check an expression is false.

-

If the assertion fails (i.e. the expression is not false), -an error message is logged and the application is either -terminated or the testcase marked as failed.

-

See g_test_set_nonfatal_assertions().

-
-

Parameters

-
----- - - - - - -

expr

the expression to check

 
-
-

Since: 2.38

-
-
-
-

g_assert_null()

-
#define             g_assert_null(expr)
-

Debugging macro to check an expression is NULL.

-

If the assertion fails (i.e. the expression is not NULL), -an error message is logged and the application is either -terminated or the testcase marked as failed.

-

See g_test_set_nonfatal_assertions().

-
-

Parameters

-
----- - - - - - -

expr

the expression to check

 
-
-

Since: 2.38

-
-
-
-

g_assert_nonnull()

-
#define             g_assert_nonnull(expr)
-

Debugging macro to check an expression is not NULL.

-

If the assertion fails (i.e. the expression is NULL), -an error message is logged and the application is either -terminated or the testcase marked as failed.

-

See g_test_set_nonfatal_assertions().

-
-

Parameters

-
----- - - - - - -

expr

the expression to check

 
-
-

Since: 2.40

-
-
-
-

g_test_set_nonfatal_assertions ()

-
void
-g_test_set_nonfatal_assertions (void);
-

Changes the behaviour of g_assert_cmpstr(), g_assert_cmpint(), -g_assert_cmpuint(), g_assert_cmphex(), g_assert_cmpfloat(), -g_assert_true(), g_assert_false(), g_assert_null(), g_assert_no_error(), -g_assert_error(), g_test_assert_expected_messages() and the various -g_test_trap_assert_*() macros to not abort to program, but instead -call g_test_fail() and continue. (This also changes the behavior of -g_test_fail() so that it will not cause the test program to abort -after completing the failed test.)

-

Note that the g_assert_not_reached() and g_assert() are not -affected by this.

-

This function can only be called after g_test_init().

-

Since: 2.38

-
-
-
-

GTestFixtureFunc ()

-
void
-(*GTestFixtureFunc) (gpointer fixture,
-                     gconstpointer user_data);
-

The type used for functions that operate on test fixtures. This is -used for the fixture setup and teardown functions as well as for the -testcases themselves.

-

user_data - is a pointer to the data that was given when registering -the test case.

-

fixture - will be a pointer to the area of memory allocated by the -test framework, of the size requested. If the requested size was -zero then fixture - will be equal to user_data -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

fixture

the test fixture.

[not nullable]

user_data

the data provided when registering the test

 
-
-

Since: 2.28

-
-
-
-

g_test_create_case ()

-
GTestCase *
-g_test_create_case (const char *test_name,
-                    gsize data_size,
-                    gconstpointer test_data,
-                    GTestFixtureFunc data_setup,
-                    GTestFixtureFunc data_test,
-                    GTestFixtureFunc data_teardown);
-

Create a new GTestCase, named test_name -, this API is fairly -low level, calling g_test_add() or g_test_add_func() is preferable. -When this test is executed, a fixture structure of size data_size - -will be automatically allocated and filled with zeros. Then data_setup - is -called to initialize the fixture. After fixture setup, the actual test -function data_test - is called. Once the test run completes, the -fixture structure is torn down by calling data_teardown - and -after that the memory is automatically released by the test framework.

-

Splitting up a test run into fixture setup, test function and -fixture teardown is most useful if the same fixture is used for -multiple tests. In this cases, g_test_create_case() will be -called with the same fixture, but varying test_name - and -data_test - arguments.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

test_name

the name for the test case

 

data_size

the size of the fixture data structure

 

test_data

test data argument for the test functions

 

data_setup

the function to set up the fixture data.

[scope async]

data_test

the actual test function.

[scope async]

data_teardown

the function to teardown the fixture data.

[scope async]
-
-
-

Returns

-

a newly allocated GTestCase.

-
-

Since: 2.16

-
-
-
-

g_test_create_suite ()

-
GTestSuite *
-g_test_create_suite (const char *suite_name);
-

Create a new test suite with the name suite_name -.

-
-

Parameters

-
----- - - - - - -

suite_name

a name for the suite

 
-
-
-

Returns

-

A newly allocated GTestSuite instance.

-
-

Since: 2.16

-
-
-
-

g_test_get_root ()

-
GTestSuite *
-g_test_get_root (void);
-

Get the toplevel test suite for the test path API.

-
-

Returns

-

the toplevel GTestSuite

-
-

Since: 2.16

-
-
-
-

g_test_suite_add ()

-
void
-g_test_suite_add (GTestSuite *suite,
-                  GTestCase *test_case);
-

Adds test_case - to suite -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

suite

a GTestSuite

 

test_case

a GTestCase

 
-
-

Since: 2.16

-
-
-
-

g_test_suite_add_suite ()

-
void
-g_test_suite_add_suite (GTestSuite *suite,
-                        GTestSuite *nestedsuite);
-

Adds nestedsuite - to suite -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

suite

a GTestSuite

 

nestedsuite

another GTestSuite

 
-
-

Since: 2.16

-
-
-
-

g_test_run_suite ()

-
int
-g_test_run_suite (GTestSuite *suite);
-

Execute the tests within suite - and all nested GTestSuites. -The test suites to be executed are filtered according to -test path arguments (-p testpath and -s testpath) as parsed by -g_test_init(). See the g_test_run() documentation for more -information on the order that tests are run in.

-

g_test_run_suite() or g_test_run() may only be called once -in a program.

-
-

Parameters

-
----- - - - - - -

suite

a GTestSuite

 
-
-
-

Returns

-

0 on success

-
-

Since: 2.16

-
-
-
-

Types and Values

-
-

enum GTestFileType

-

The type of file to return the filename for, when used with -g_test_build_filename().

-

These two options correspond rather directly to the 'dist' and -'built' terminology that automake uses and are explicitly used to -distinguish between the 'srcdir' and 'builddir' being separate. All -files in your project should either be dist (in the -EXTRA_DIST or dist_schema_DATA -sense, in which case they will always be in the srcdir) or built (in -the BUILT_SOURCES sense, in which case they will -always be in the builddir).

-

Note: as a general rule of automake, files that are generated only as -part of the build-from-git process (but then are distributed with the -tarball) always go in srcdir (even if doing a srcdir != builddir -build from git) and are considered as distributed files.

-
-

Members

-
----- - - - - - - - - - - - - -

G_TEST_DIST

-

a file that was included in the distribution tarball

-
 

G_TEST_BUILT

-

a file that was built on the compiling machine

-
 
-
-

Since: 2.38

-
-
-
-

enum GTestTrapFlags

-
-

GTestTrapFlags is deprecated and should not be used in newly-written code.

-

GTestTrapFlags is used only with g_test_trap_fork(), -which is deprecated. g_test_trap_subprocess() uses -GTestTrapSubprocessFlags.

-
-

Test traps are guards around forked tests. -These flags determine what traps to set.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_TEST_TRAP_SILENCE_STDOUT

-

Redirect stdout of the test child to - /dev/null so it cannot be observed on the console during test - runs. The actual output is still captured though to allow later - tests with g_test_trap_assert_stdout().

-
 

G_TEST_TRAP_SILENCE_STDERR

-

Redirect stderr of the test child to - /dev/null so it cannot be observed on the console during test - runs. The actual output is still captured though to allow later - tests with g_test_trap_assert_stderr().

-
 

G_TEST_TRAP_INHERIT_STDIN

-

If this flag is given, stdin of the - child process is shared with stdin of its parent process. - It is redirected to /dev/null otherwise.

-
 
-
-
-
-
-

enum GTestSubprocessFlags

-

Flags to pass to g_test_trap_subprocess() to control input and output.

-

Note that in contrast with g_test_trap_fork(), the default is to -not show stdout and stderr.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_TEST_SUBPROCESS_INHERIT_STDIN

-

If this flag is given, the child - process will inherit the parent's stdin. Otherwise, the child's - stdin is redirected to /dev/null.

-
 

G_TEST_SUBPROCESS_INHERIT_STDOUT

-

If this flag is given, the child - process will inherit the parent's stdout. Otherwise, the child's - stdout will not be visible, but it will be captured to allow - later tests with g_test_trap_assert_stdout().

-
 

G_TEST_SUBPROCESS_INHERIT_STDERR

-

If this flag is given, the child - process will inherit the parent's stderr. Otherwise, the child's - stderr will not be visible, but it will be captured to allow - later tests with g_test_trap_assert_stderr().

-
 
-
-
-
-
-

GTestCase

-
typedef struct GTestCase  GTestCase;
-
-

An opaque structure representing a test case.

-
-
-
-

GTestSuite

-
typedef struct GTestSuite GTestSuite;
-
-

An opaque structure representing a test suite.

-
-
-
-

See Also

-

gtester, gtester-report

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-The-Main-Event-Loop.html b/docs/reference/glib/html/glib-The-Main-Event-Loop.html deleted file mode 100644 index 05149ecf3..000000000 --- a/docs/reference/glib/html/glib-The-Main-Event-Loop.html +++ /dev/null @@ -1,5122 +0,0 @@ - - - - -The Main Event Loop: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

The Main Event Loop

-

The Main Event Loop — manages all available sources of events

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GMainLoop * - -g_main_loop_new () -
-GMainLoop * - -g_main_loop_ref () -
-void - -g_main_loop_unref () -
-void - -g_main_loop_run () -
-void - -g_main_loop_quit () -
-gboolean - -g_main_loop_is_running () -
-GMainContext * - -g_main_loop_get_context () -
#define -g_main_new() -
#define -g_main_destroy() -
#define -g_main_run() -
#define -g_main_quit() -
#define -g_main_is_running() -
-GMainContext * - -g_main_context_new () -
-GMainContext * - -g_main_context_ref () -
-void - -g_main_context_unref () -
-GMainContext * - -g_main_context_default () -
-gboolean - -g_main_context_iteration () -
#define -g_main_iteration() -
-gboolean - -g_main_context_pending () -
#defineg_main_pending
-GSource * - -g_main_context_find_source_by_id () -
-GSource * - -g_main_context_find_source_by_user_data () -
-GSource * - -g_main_context_find_source_by_funcs_user_data () -
-void - -g_main_context_wakeup () -
-gboolean - -g_main_context_acquire () -
-void - -g_main_context_release () -
-gboolean - -g_main_context_is_owner () -
-gboolean - -g_main_context_wait () -
-gboolean - -g_main_context_prepare () -
-gint - -g_main_context_query () -
-gboolean - -g_main_context_check () -
-void - -g_main_context_dispatch () -
-void - -g_main_context_set_poll_func () -
-GPollFunc - -g_main_context_get_poll_func () -
-gint - -(*GPollFunc) () -
-void - -g_main_context_add_poll () -
-void - -g_main_context_remove_poll () -
-gint - -g_main_depth () -
-GSource * - -g_main_current_source () -
#define -g_main_set_poll_func() -
-void - -g_main_context_invoke () -
-void - -g_main_context_invoke_full () -
-GMainContext * - -g_main_context_get_thread_default () -
-GMainContext * - -g_main_context_ref_thread_default () -
-void - -g_main_context_push_thread_default () -
-void - -g_main_context_pop_thread_default () -
-GSource * - -g_timeout_source_new () -
-GSource * - -g_timeout_source_new_seconds () -
-guint - -g_timeout_add () -
-guint - -g_timeout_add_full () -
-guint - -g_timeout_add_seconds () -
-guint - -g_timeout_add_seconds_full () -
-GSource * - -g_idle_source_new () -
-guint - -g_idle_add () -
-guint - -g_idle_add_full () -
-gboolean - -g_idle_remove_by_data () -
-void - -(*GChildWatchFunc) () -
-GSource * - -g_child_watch_source_new () -
-guint - -g_child_watch_add () -
-guint - -g_child_watch_add_full () -
-gint - -g_poll () -
-void - -(*GSourceDummyMarshal) () -
-GSource * - -g_source_new () -
-GSource * - -g_source_ref () -
-void - -g_source_unref () -
-void - -g_source_set_funcs () -
-guint - -g_source_attach () -
-void - -g_source_destroy () -
-gboolean - -g_source_is_destroyed () -
-void - -g_source_set_priority () -
-gint - -g_source_get_priority () -
-void - -g_source_set_can_recurse () -
-gboolean - -g_source_get_can_recurse () -
-guint - -g_source_get_id () -
const char * - -g_source_get_name () -
-void - -g_source_set_name () -
-void - -g_source_set_name_by_id () -
-GMainContext * - -g_source_get_context () -
-void - -g_source_set_callback () -
-gboolean - -(*GSourceFunc) () -
-void - -g_source_set_callback_indirect () -
-void - -g_source_set_ready_time () -
-gint64 - -g_source_get_ready_time () -
-gpointer - -g_source_add_unix_fd () -
-void - -g_source_remove_unix_fd () -
-void - -g_source_modify_unix_fd () -
-GIOCondition - -g_source_query_unix_fd () -
-void - -g_source_add_poll () -
-void - -g_source_remove_poll () -
-void - -g_source_add_child_source () -
-void - -g_source_remove_child_source () -
-gint64 - -g_source_get_time () -
-void - -g_source_get_current_time () -
-gboolean - -g_source_remove () -
-gboolean - -g_source_remove_by_funcs_user_data () -
-gboolean - -g_source_remove_by_user_data () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 GMainLoop
#defineG_PRIORITY_HIGH
#defineG_PRIORITY_DEFAULT
#defineG_PRIORITY_HIGH_IDLE
#defineG_PRIORITY_DEFAULT_IDLE
#defineG_PRIORITY_LOW
#defineG_SOURCE_CONTINUE
#defineG_SOURCE_REMOVE
 GMainContext
typedefGPid
#defineG_PID_FORMAT
structGPollFD
#defineG_POLLFD_FORMAT
structGSource
structGSourceFuncs
structGSourceCallbackFuncs
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

The main event loop manages all the available sources of events for -GLib and GTK+ applications. These events can come from any number of -different types of sources such as file descriptors (plain files, -pipes or sockets) and timeouts. New types of event sources can also -be added using g_source_attach().

-

To allow multiple independent sets of sources to be handled in -different threads, each source is associated with a GMainContext. -A GMainContext can only be running in a single thread, but -sources can be added to it and removed from it from other threads.

-

Each event source is assigned a priority. The default priority, -G_PRIORITY_DEFAULT, is 0. Values less than 0 denote higher priorities. -Values greater than 0 denote lower priorities. Events from high priority -sources are always processed before events from lower priority sources.

-

Idle functions can also be added, and assigned a priority. These will -be run whenever no events with a higher priority are ready to be processed.

-

The GMainLoop data type represents a main event loop. A GMainLoop is -created with g_main_loop_new(). After adding the initial event sources, -g_main_loop_run() is called. This continuously checks for new events from -each of the event sources and dispatches them. Finally, the processing of -an event from one of the sources leads to a call to g_main_loop_quit() to -exit the main loop, and g_main_loop_run() returns.

-

It is possible to create new instances of GMainLoop recursively. -This is often used in GTK+ applications when showing modal dialog -boxes. Note that event sources are associated with a particular -GMainContext, and will be checked and dispatched for all main -loops associated with that GMainContext.

-

GTK+ contains wrappers of some of these functions, e.g. gtk_main(), -gtk_main_quit() and gtk_events_pending().

-
-

Creating new source types

-

One of the unusual features of the GMainLoop functionality -is that new types of event source can be created and used in -addition to the builtin type of event source. A new event source -type is used for handling GDK events. A new source type is created -by "deriving" from the GSource structure. The derived type of -source is represented by a structure that has the GSource structure -as a first element, and other elements specific to the new source -type. To create an instance of the new source type, call -g_source_new() passing in the size of the derived structure and -a table of functions. These GSourceFuncs determine the behavior of -the new source type.

-

New source types basically interact with the main context -in two ways. Their prepare function in GSourceFuncs can set a timeout -to determine the maximum amount of time that the main loop will sleep -before checking the source again. In addition, or as well, the source -can add file descriptors to the set that the main context checks using -g_source_add_poll().

-
-
-

Customizing the main loop iteration

-

Single iterations of a GMainContext can be run with -g_main_context_iteration(). In some cases, more detailed control -of exactly how the details of the main loop work is desired, for -instance, when integrating the GMainLoop with an external main loop. -In such cases, you can call the component functions of -g_main_context_iteration() directly. These functions are -g_main_context_prepare(), g_main_context_query(), -g_main_context_check() and g_main_context_dispatch().

-
-
-

State of a Main Context

-

The operation of these functions can best be seen in terms -of a state diagram, as shown in this image.

-

-

On UNIX, the GLib mainloop is incompatible with fork(). Any program -using the mainloop must either exec() or exit() from the child -without returning to the mainloop.

-
-
-

Memory management of sources

-

There are two options for memory management of the user data passed to a -GSource to be passed to its callback on invocation. This data is provided -in calls to g_timeout_add(), g_timeout_add_full(), g_idle_add(), etc. and -more generally, using g_source_set_callback(). This data is typically an -object which ‘owns’ the timeout or idle callback, such as a widget or a -network protocol implementation. In many cases, it is an error for the -callback to be invoked after this owning object has been destroyed, as that -results in use of freed memory.

-

The first, and preferred, option is to store the source ID returned by -functions such as g_timeout_add() or g_source_attach(), and explicitly -remove that source from the main context using g_source_remove() when the -owning object is finalized. This ensures that the callback can only be -invoked while the object is still alive.

-

The second option is to hold a strong reference to the object in the -callback, and to release it in the callback’s GDestroyNotify. This ensures -that the object is kept alive until after the source is finalized, which is -guaranteed to be after it is invoked for the final time. The GDestroyNotify -is another callback passed to the ‘full’ variants of GSource functions (for -example, g_timeout_add_full()). It is called when the source is finalized, -and is designed for releasing references like this.

-

One important caveat of this second approach is that it will keep the object -alive indefinitely if the main loop is stopped before the GSource is -invoked, which may be undesirable.

-
-
-
-

Functions

-
-

g_main_loop_new ()

-
GMainLoop *
-g_main_loop_new (GMainContext *context,
-                 gboolean is_running);
-

Creates a new GMainLoop structure.

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GMainContext (if NULL, the default context will be used).

[nullable]

is_running

set to TRUE to indicate that the loop is running. This -is not very important since calling g_main_loop_run() will set this to -TRUE anyway.

 
-
-
-

Returns

-

a new GMainLoop.

-
-
-
-
-

g_main_loop_ref ()

-
GMainLoop *
-g_main_loop_ref (GMainLoop *loop);
-

Increases the reference count on a GMainLoop object by one.

-
-

Parameters

-
----- - - - - - -

loop

a GMainLoop

 
-
-
-

Returns

-

loop -

-
-
-
-
-

g_main_loop_unref ()

-
void
-g_main_loop_unref (GMainLoop *loop);
-

Decreases the reference count on a GMainLoop object by one. If -the result is zero, free the loop and free all associated memory.

-
-

Parameters

-
----- - - - - - -

loop

a GMainLoop

 
-
-
-
-
-

g_main_loop_run ()

-
void
-g_main_loop_run (GMainLoop *loop);
-

Runs a main loop until g_main_loop_quit() is called on the loop. -If this is called for the thread of the loop's GMainContext, -it will process events from the loop, otherwise it will -simply wait.

-
-

Parameters

-
----- - - - - - -

loop

a GMainLoop

 
-
-
-
-
-

g_main_loop_quit ()

-
void
-g_main_loop_quit (GMainLoop *loop);
-

Stops a GMainLoop from running. Any calls to g_main_loop_run() -for the loop will return.

-

Note that sources that have already been dispatched when -g_main_loop_quit() is called will still be executed.

-
-

Parameters

-
----- - - - - - -

loop

a GMainLoop

 
-
-
-
-
-

g_main_loop_is_running ()

-
gboolean
-g_main_loop_is_running (GMainLoop *loop);
-

Checks to see if the main loop is currently being run via g_main_loop_run().

-
-

Parameters

-
----- - - - - - -

loop

a GMainLoop.

 
-
-
-

Returns

-

TRUE if the mainloop is currently being run.

-
-
-
-
-

g_main_loop_get_context ()

-
GMainContext *
-g_main_loop_get_context (GMainLoop *loop);
-

Returns the GMainContext of loop -.

-
-

Parameters

-
----- - - - - - -

loop

a GMainLoop.

 
-
-
-

Returns

-

the GMainContext of loop -.

-

[transfer none]

-
-
-
-
-

g_main_new()

-
#define             g_main_new(is_running)
-
-

g_main_new has been deprecated since version 2.2 and should not be used in newly-written code.

-

Use g_main_loop_new() instead

-
-

Creates a new GMainLoop for th default main context.

-
-

Parameters

-
----- - - - - - -

is_running

set to TRUE to indicate that the loop is running. This -is not very important since calling g_main_run() will set this -to TRUE anyway.

 
-
-
-

Returns

-

a new GMainLoop

-
-
-
-
-

g_main_destroy()

-
#define             g_main_destroy(loop)
-
-

g_main_destroy has been deprecated since version 2.2 and should not be used in newly-written code.

-

Use g_main_loop_unref() instead

-
-

Frees the memory allocated for the GMainLoop.

-
-

Parameters

-
----- - - - - - -

loop

a GMainLoop

 
-
-
-
-
-

g_main_run()

-
#define             g_main_run(loop)
-
-

g_main_run has been deprecated since version 2.2 and should not be used in newly-written code.

-

Use g_main_loop_run() instead

-
-

Runs a main loop until it stops running.

-
-

Parameters

-
----- - - - - - -

loop

a GMainLoop

 
-
-
-
-
-

g_main_quit()

-
#define             g_main_quit(loop)
-
-

g_main_quit has been deprecated since version 2.2 and should not be used in newly-written code.

-

Use g_main_loop_quit() instead

-
-

Stops the GMainLoop. -If g_main_run() was called to run the GMainLoop, it will now return.

-
-

Parameters

-
----- - - - - - -

loop

a GMainLoop

 
-
-
-
-
-

g_main_is_running()

-
#define             g_main_is_running(loop)
-
-

g_main_is_running has been deprecated since version 2.2 and should not be used in newly-written code.

-

Use g_main_loop_is_running() instead

-
-

Checks if the main loop is running.

-
-

Parameters

-
----- - - - - - -

loop

a GMainLoop

 
-
-
-

Returns

-

TRUE if the main loop is running

-
-
-
-
-

g_main_context_new ()

-
GMainContext *
-g_main_context_new (void);
-

Creates a new GMainContext structure.

-
-

Returns

-

the new GMainContext

-
-
-
-
-

g_main_context_ref ()

-
GMainContext *
-g_main_context_ref (GMainContext *context);
-

Increases the reference count on a GMainContext object by one.

-
-

Parameters

-
----- - - - - - -

context

a GMainContext

 
-
-
-

Returns

-

the context -that was passed in (since 2.6)

-
-
-
-
-

g_main_context_unref ()

-
void
-g_main_context_unref (GMainContext *context);
-

Decreases the reference count on a GMainContext object by one. If -the result is zero, free the context and free all associated memory.

-
-

Parameters

-
----- - - - - - -

context

a GMainContext

 
-
-
-
-
-

g_main_context_default ()

-
GMainContext *
-g_main_context_default (void);
-

Returns the global default main context. This is the main context -used for main loop functions when a main loop is not explicitly -specified, and corresponds to the "main" main loop. See also -g_main_context_get_thread_default().

-
-

Returns

-

the global default main context.

-

[transfer none]

-
-
-
-
-

g_main_context_iteration ()

-
gboolean
-g_main_context_iteration (GMainContext *context,
-                          gboolean may_block);
-

Runs a single iteration for the given main loop. This involves -checking to see if any event sources are ready to be processed, -then if no events sources are ready and may_block - is TRUE, waiting -for a source to become ready, then dispatching the highest priority -events sources that are ready. Otherwise, if may_block - is FALSE -sources are not waited to become ready, only those highest priority -events sources will be dispatched (if any), that are ready at this -given moment without further waiting.

-

Note that even when may_block - is TRUE, it is still possible for -g_main_context_iteration() to return FALSE, since the wait may -be interrupted for other reasons than an event source becoming ready.

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GMainContext (if NULL, the default context will be used).

[nullable]

may_block

whether the call may block.

 
-
-
-

Returns

-

TRUE if events were dispatched.

-
-
-
-
-

g_main_iteration()

-
#define             g_main_iteration(may_block)
-
-

g_main_iteration has been deprecated since version 2.2 and should not be used in newly-written code.

-

Use g_main_context_iteration() instead.

-
-

Runs a single iteration for the default GMainContext.

-
-

Parameters

-
----- - - - - - -

may_block

set to TRUE if it should block (i.e. wait) until an event -source becomes ready. It will return after an event source has been -processed. If set to FALSE it will return immediately if no event -source is ready to be processed.

 
-
-
-

Returns

-

TRUE if more events are pending.

-
-
-
-
-

g_main_context_pending ()

-
gboolean
-g_main_context_pending (GMainContext *context);
-

Checks if any sources have pending events for the given context.

-
-

Parameters

-
----- - - - - - -

context

a GMainContext (if NULL, the default context will be used).

[nullable]
-
-
-

Returns

-

TRUE if events are pending.

-
-
-
-
-

g_main_pending

-
#define             g_main_pending()
-

g_main_pending is deprecated and should not be used in newly-written code.

-

Checks if any events are pending for the default GMainContext -(i.e. ready to be processed).

-
-

Returns

-

TRUE if any events are pending.

-

Deprected: 2.2: Use g_main_context_pending() instead.

-
-
-
-
-

g_main_context_find_source_by_id ()

-
GSource *
-g_main_context_find_source_by_id (GMainContext *context,
-                                  guint source_id);
-

Finds a GSource given a pair of context and ID.

-

It is a programmer error to attempt to lookup a non-existent source.

-

More specifically: source IDs can be reissued after a source has been -destroyed and therefore it is never valid to use this function with a -source ID which may have already been removed. An example is when -scheduling an idle to run in another thread with g_idle_add(): the -idle may already have run and been removed by the time this function -is called on its (now invalid) source ID. This source ID may have -been reissued, leading to the operation being performed against the -wrong source.

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GMainContext (if NULL, the default context will be used).

[nullable]

source_id

the source ID, as returned by g_source_get_id().

 
-
-
-

Returns

-

the GSource.

-

[transfer none]

-
-
-
-
-

g_main_context_find_source_by_user_data ()

-
GSource *
-g_main_context_find_source_by_user_data
-                               (GMainContext *context,
-                                gpointer user_data);
-

Finds a source with the given user data for the callback. If -multiple sources exist with the same user data, the first -one found will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GMainContext

 

user_data

the user_data for the callback.

 
-
-
-

Returns

-

the source, if one was found, otherwise NULL.

-

[transfer none]

-
-
-
-
-

g_main_context_find_source_by_funcs_user_data ()

-
GSource *
-g_main_context_find_source_by_funcs_user_data
-                               (GMainContext *context,
-                                GSourceFuncs *funcs,
-                                gpointer user_data);
-

Finds a source with the given source functions and user data. If -multiple sources exist with the same source function and user data, -the first one found will be returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

context

a GMainContext (if NULL, the default context will be used).

[nullable]

funcs

the source_funcs -passed to g_source_new().

 

user_data

the user data from the callback.

 
-
-
-

Returns

-

the source, if one was found, otherwise NULL.

-

[transfer none]

-
-
-
-
-

g_main_context_wakeup ()

-
void
-g_main_context_wakeup (GMainContext *context);
-

If context - is currently blocking in g_main_context_iteration() -waiting for a source to become ready, cause it to stop blocking -and return. Otherwise, cause the next invocation of -g_main_context_iteration() to return without blocking.

-

This API is useful for low-level control over GMainContext; for -example, integrating it with main loop implementations such as -GMainLoop.

-

Another related use for this function is when implementing a main -loop with a termination condition, computed from multiple threads:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
#define NUM_TASKS 10
-static volatile gint tasks_remaining = NUM_TASKS;
-...
- 
-while (g_atomic_int_get (&tasks_remaining) != 0)
-  g_main_context_iteration (NULL, TRUE);
-
- -

-

Then in a thread:

-
- - - - - - - -
1
-2
-3
-4
perform_work();
-
-if (g_atomic_int_dec_and_test (&tasks_remaining))
-  g_main_context_wakeup (NULL);
-
- -

-
-

Parameters

-
----- - - - - - -

context

a GMainContext

 
-
-
-
-
-

g_main_context_acquire ()

-
gboolean
-g_main_context_acquire (GMainContext *context);
-

Tries to become the owner of the specified context. -If some other thread is the owner of the context, -returns FALSE immediately. Ownership is properly -recursive: the owner can require ownership again -and will release ownership when g_main_context_release() -is called as many times as g_main_context_acquire().

-

You must be the owner of a context before you -can call g_main_context_prepare(), g_main_context_query(), -g_main_context_check(), g_main_context_dispatch().

-
-

Parameters

-
----- - - - - - -

context

a GMainContext

 
-
-
-

Returns

-

TRUE if the operation succeeded, and -this thread is now the owner of context -.

-
-
-
-
-

g_main_context_release ()

-
void
-g_main_context_release (GMainContext *context);
-

Releases ownership of a context previously acquired by this thread -with g_main_context_acquire(). If the context was acquired multiple -times, the ownership will be released only when g_main_context_release() -is called as many times as it was acquired.

-
-

Parameters

-
----- - - - - - -

context

a GMainContext

 
-
-
-
-
-

g_main_context_is_owner ()

-
gboolean
-g_main_context_is_owner (GMainContext *context);
-

Determines whether this thread holds the (recursive) -ownership of this GMainContext. This is useful to -know before waiting on another thread that may be -blocking to get ownership of context -.

-
-

Parameters

-
----- - - - - - -

context

a GMainContext

 
-
-
-

Returns

-

TRUE if current thread is owner of context -.

-
-

Since: 2.10

-
-
-
-

g_main_context_wait ()

-
gboolean
-g_main_context_wait (GMainContext *context,
-                     GCond *cond,
-                     GMutex *mutex);
-

Tries to become the owner of the specified context, -as with g_main_context_acquire(). But if another thread -is the owner, atomically drop mutex - and wait on cond - until -that owner releases ownership or until cond - is signaled, then -try again (once) to become the owner.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

context

a GMainContext

 

cond

a condition variable

 

mutex

a mutex, currently held

 
-
-
-

Returns

-

TRUE if the operation succeeded, and -this thread is now the owner of context -.

-
-
-
-
-

g_main_context_prepare ()

-
gboolean
-g_main_context_prepare (GMainContext *context,
-                        gint *priority);
-

Prepares to poll sources within a main loop. The resulting information -for polling is determined by calling g_main_context_query().

-

You must have successfully acquired the context with -g_main_context_acquire() before you may call this function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GMainContext

 

priority

location to store priority of highest priority -source already ready.

 
-
-
-

Returns

-

TRUE if some source is ready to be dispatched -prior to polling.

-
-
-
-
-

g_main_context_query ()

-
gint
-g_main_context_query (GMainContext *context,
-                      gint max_priority,
-                      gint *timeout_,
-                      GPollFD *fds,
-                      gint n_fds);
-

Determines information necessary to poll this main loop.

-

You must have successfully acquired the context with -g_main_context_acquire() before you may call this function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

context

a GMainContext

 

max_priority

maximum priority source to check

 

timeout_

location to store timeout to be used in polling.

[out]

fds

location to -store GPollFD records that need to be polled.

[out caller-allocates][array length=n_fds]

n_fds

length of fds -.

[in]
-
-
-

Returns

-

the number of records actually stored in fds -, -or, if more than n_fds -records need to be stored, the number -of records that need to be stored.

-
-
-
-
-

g_main_context_check ()

-
gboolean
-g_main_context_check (GMainContext *context,
-                      gint max_priority,
-                      GPollFD *fds,
-                      gint n_fds);
-

Passes the results of polling back to the main loop.

-

You must have successfully acquired the context with -g_main_context_acquire() before you may call this function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

context

a GMainContext

 

max_priority

the maximum numerical priority of sources to check

 

fds

array of GPollFD's that was passed to -the last call to g_main_context_query().

[array length=n_fds]

n_fds

return value of g_main_context_query()

 
-
-
-

Returns

-

TRUE if some sources are ready to be dispatched.

-
-
-
-
-

g_main_context_dispatch ()

-
void
-g_main_context_dispatch (GMainContext *context);
-

Dispatches all pending sources.

-

You must have successfully acquired the context with -g_main_context_acquire() before you may call this function.

-
-

Parameters

-
----- - - - - - -

context

a GMainContext

 
-
-
-
-
-

g_main_context_set_poll_func ()

-
void
-g_main_context_set_poll_func (GMainContext *context,
-                              GPollFunc func);
-

Sets the function to use to handle polling of file descriptors. It -will be used instead of the poll() system call -(or GLib's replacement function, which is used where -poll() isn't available).

-

This function could possibly be used to integrate the GLib event -loop with an external event loop.

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GMainContext

 

func

the function to call to poll all file descriptors

 
-
-
-
-
-

g_main_context_get_poll_func ()

-
GPollFunc
-g_main_context_get_poll_func (GMainContext *context);
-

Gets the poll function set by g_main_context_set_poll_func().

-
-

Parameters

-
----- - - - - - -

context

a GMainContext

 
-
-
-

Returns

-

the poll function

-
-
-
-
-

GPollFunc ()

-
gint
-(*GPollFunc) (GPollFD *ufds,
-              guint nfsd,
-              gint timeout_);
-

Specifies the type of function passed to g_main_context_set_poll_func(). -The semantics of the function should match those of the poll() system call.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

ufds

an array of GPollFD elements

 

nfsd

the number of elements in ufds -

 

timeout_

the maximum time to wait for an event of the file descriptors. -A negative value indicates an infinite timeout.

 
-
-
-

Returns

-

the number of GPollFD elements which have events or errors -reported, or -1 if an error occurred.

-
-
-
-
-

g_main_context_add_poll ()

-
void
-g_main_context_add_poll (GMainContext *context,
-                         GPollFD *fd,
-                         gint priority);
-

Adds a file descriptor to the set of file descriptors polled for -this context. This will very seldom be used directly. Instead -a typical event source will use g_source_add_unix_fd() instead.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

context

a GMainContext (or NULL for the default context).

[nullable]

fd

a GPollFD structure holding information about a file -descriptor to watch.

 

priority

the priority for this file descriptor which should be -the same as the priority used for g_source_attach() to ensure that the -file descriptor is polled whenever the results may be needed.

 
-
-
-
-
-

g_main_context_remove_poll ()

-
void
-g_main_context_remove_poll (GMainContext *context,
-                            GPollFD *fd);
-

Removes file descriptor from the set of file descriptors to be -polled for a particular context.

-
-

Parameters

-
----- - - - - - - - - - - - - -

context

a GMainContext

 

fd

a GPollFD descriptor previously added with g_main_context_add_poll()

 
-
-
-
-
-

g_main_depth ()

-
gint
-g_main_depth (void);
-

Returns the depth of the stack of calls to -g_main_context_dispatch() on any GMainContext in the current thread. - That is, when called from the toplevel, it gives 0. When -called from within a callback from g_main_context_iteration() -(or g_main_loop_run(), etc.) it returns 1. When called from within -a callback to a recursive call to g_main_context_iteration(), -it returns 2. And so forth.

-

This function is useful in a situation like the following: -Imagine an extremely simple "garbage collected" system.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
static GList *free_list;
-
-gpointer
-allocate_memory (gsize size)
-{ 
-  gpointer result = g_malloc (size);
-  free_list = g_list_prepend (free_list, result);
-  return result;
-}
-
-void
-free_allocated_memory (void)
-{
-  GList *l;
-  for (l = free_list; l; l = l->next);
-    g_free (l->data);
-  g_list_free (free_list);
-  free_list = NULL;
- }
-
-[...]
-
-while (TRUE); 
- {
-   g_main_context_iteration (NULL, TRUE);
-   free_allocated_memory();
-  }
-
- -

-

This works from an application, however, if you want to do the same -thing from a library, it gets more difficult, since you no longer -control the main loop. You might think you can simply use an idle -function to make the call to free_allocated_memory(), but that -doesn't work, since the idle function could be called from a -recursive callback. This can be fixed by using g_main_depth()

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
gpointer
-allocate_memory (gsize size)
-{ 
-  FreeListBlock *block = g_new (FreeListBlock, 1);
-  block->mem = g_malloc (size);
-  block->depth = g_main_depth ();   
-  free_list = g_list_prepend (free_list, block);
-  return block->mem;
-}
-
-void
-free_allocated_memory (void)
-{
-  GList *l;
-  
-  int depth = g_main_depth ();
-  for (l = free_list; l; );
-    {
-      GList *next = l->next;
-      FreeListBlock *block = l->data;
-      if (block->depth > depth)
-        {
-          g_free (block->mem);
-          g_free (block);
-          free_list = g_list_delete_link (free_list, l);
-        }
-              
-      l = next;
-    }
-  }
-
- -

-

There is a temptation to use g_main_depth() to solve -problems with reentrancy. For instance, while waiting for data -to be received from the network in response to a menu item, -the menu item might be selected again. It might seem that -one could make the menu item's callback return immediately -and do nothing if g_main_depth() returns a value greater than 1. -However, this should be avoided since the user then sees selecting -the menu item do nothing. Furthermore, you'll find yourself adding -these checks all over your code, since there are doubtless many, -many things that the user could do. Instead, you can use the -following techniques:

-
    -
  1. Use gtk_widget_set_sensitive() or modal dialogs to prevent -the user from interacting with elements while the main -loop is recursing.

  2. -
  3. Avoid main loop recursion in situations where you can't handle -arbitrary callbacks. Instead, structure your code so that you -simply return to the main loop and then get called again when -there is more work to do.

  4. -
-
-

Returns

-

The main loop recursion level in the current thread

-
-
-
-
-

g_main_current_source ()

-
GSource *
-g_main_current_source (void);
-

Returns the currently firing source for this thread.

-
-

Returns

-

The currently firing source or NULL.

-

[transfer none]

-
-

Since: 2.12

-
-
-
-

g_main_set_poll_func()

-
#define             g_main_set_poll_func(func)
-
-

g_main_set_poll_func has been deprecated since version 2.2 and should not be used in newly-written code.

-

Use g_main_context_set_poll_func() again

-
-

Sets the function to use for the handle polling of file descriptors -for the default main context.

-
-

Parameters

-
----- - - - - - -

func

the function to call to poll all file descriptors

 
-
-
-
-
-

g_main_context_invoke ()

-
void
-g_main_context_invoke (GMainContext *context,
-                       GSourceFunc function,
-                       gpointer data);
-

Invokes a function in such a way that context - is owned during the -invocation of function -.

-

If context - is NULL then the global default main context — as -returned by g_main_context_default() — is used.

-

If context - is owned by the current thread, function - is called -directly. Otherwise, if context - is the thread-default main context -of the current thread and g_main_context_acquire() succeeds, then -function - is called and g_main_context_release() is called -afterwards.

-

In any other case, an idle source is created to call function - and -that source is attached to context - (presumably to be run in another -thread). The idle source is attached with G_PRIORITY_DEFAULT -priority. If you want a different priority, use -g_main_context_invoke_full().

-

Note that, as with normal idle functions, function - should probably -return FALSE. If it returns TRUE, it will be continuously run in a -loop (and may prevent this call from returning).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

context

a GMainContext, or NULL.

[nullable]

function

function to call

 

data

data to pass to function -

 
-
-

Since: 2.28

-
-
-
-

g_main_context_invoke_full ()

-
void
-g_main_context_invoke_full (GMainContext *context,
-                            gint priority,
-                            GSourceFunc function,
-                            gpointer data,
-                            GDestroyNotify notify);
-

Invokes a function in such a way that context - is owned during the -invocation of function -.

-

This function is the same as g_main_context_invoke() except that it -lets you specify the priority incase function - ends up being -scheduled as an idle and also lets you give a GDestroyNotify for data -.

-

notify - should not assume that it is called from any particular -thread or with any particular context acquired.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

context

a GMainContext, or NULL.

[nullable]

priority

the priority at which to run function -

 

function

function to call

 

data

data to pass to function -

 

notify

a function to call when data -is no longer in use, or NULL.

[nullable]
-
-

Since: 2.28

-
-
-
-

g_main_context_get_thread_default ()

-
GMainContext *
-g_main_context_get_thread_default (void);
-

Gets the thread-default GMainContext for this thread. Asynchronous -operations that want to be able to be run in contexts other than -the default one should call this method or -g_main_context_ref_thread_default() to get a GMainContext to add -their GSources to. (Note that even in single-threaded -programs applications may sometimes want to temporarily push a -non-default context, so it is not safe to assume that this will -always return NULL if you are running in the default thread.)

-

If you need to hold a reference on the context, use -g_main_context_ref_thread_default() instead.

-
-

Returns

-

the thread-default GMainContext, or -NULL if the thread-default context is the global default context.

-

[transfer none]

-
-

Since: 2.22

-
-
-
-

g_main_context_ref_thread_default ()

-
GMainContext *
-g_main_context_ref_thread_default (void);
-

Gets the thread-default GMainContext for this thread, as with -g_main_context_get_thread_default(), but also adds a reference to -it with g_main_context_ref(). In addition, unlike -g_main_context_get_thread_default(), if the thread-default context -is the global default context, this will return that GMainContext -(with a ref added to it) rather than returning NULL.

-
-

Returns

-

the thread-default GMainContext. Unref -with g_main_context_unref() when you are done with it.

-

[transfer full]

-
-

Since: 2.32

-
-
-
-

g_main_context_push_thread_default ()

-
void
-g_main_context_push_thread_default (GMainContext *context);
-

Acquires context - and sets it as the thread-default context for the -current thread. This will cause certain asynchronous operations -(such as most gio-based I/O) which are -started in this thread to run under context - and deliver their -results to its main loop, rather than running under the global -default context in the main thread. Note that calling this function -changes the context returned by g_main_context_get_thread_default(), -not the one returned by g_main_context_default(), so it does not affect -the context used by functions like g_idle_add().

-

Normally you would call this function shortly after creating a new -thread, passing it a GMainContext which will be run by a -GMainLoop in that thread, to set a new default context for all -async operations in that thread. In this case you may not need to -ever call g_main_context_pop_thread_default(), assuming you want the -new GMainContext to be the default for the whole lifecycle of the -thread.

-

If you don't have control over how the new thread was created (e.g. -in the new thread isn't newly created, or if the thread life -cycle is managed by a GThreadPool), it is always suggested to wrap -the logic that needs to use the new GMainContext inside a -g_main_context_push_thread_default() / g_main_context_pop_thread_default() -pair, otherwise threads that are re-used will end up never explicitly -releasing the GMainContext reference they hold.

-

In some cases you may want to schedule a single operation in a -non-default context, or temporarily use a non-default context in -the main thread. In that case, you can wrap the call to the -asynchronous operation inside a -g_main_context_push_thread_default() / -g_main_context_pop_thread_default() pair, but it is up to you to -ensure that no other asynchronous operations accidentally get -started while the non-default context is active.

-

Beware that libraries that predate this function may not correctly -handle being used from a thread with a thread-default context. Eg, -see g_file_supports_thread_contexts().

-
-

Parameters

-
----- - - - - - -

context

a GMainContext, or NULL for the global default context.

[nullable]
-
-

Since: 2.22

-
-
-
-

g_main_context_pop_thread_default ()

-
void
-g_main_context_pop_thread_default (GMainContext *context);
-

Pops context - off the thread-default context stack (verifying that -it was on the top of the stack).

-
-

Parameters

-
----- - - - - - -

context

a GMainContext object, or NULL.

[nullable]
-
-

Since: 2.22

-
-
-
-

g_timeout_source_new ()

-
GSource *
-g_timeout_source_new (guint interval);
-

Creates a new timeout source.

-

The source will not initially be associated with any GMainContext -and must be added to one with g_source_attach() before it will be -executed.

-

The interval given is in terms of monotonic time, not wall clock -time. See g_get_monotonic_time().

-
-

Parameters

-
----- - - - - - -

interval

the timeout interval in milliseconds.

 
-
-
-

Returns

-

the newly-created timeout source

-
-
-
-
-

g_timeout_source_new_seconds ()

-
GSource *
-g_timeout_source_new_seconds (guint interval);
-

Creates a new timeout source.

-

The source will not initially be associated with any GMainContext -and must be added to one with g_source_attach() before it will be -executed.

-

The scheduling granularity/accuracy of this timeout source will be -in seconds.

-

The interval given in terms of monotonic time, not wall clock time. -See g_get_monotonic_time().

-
-

Parameters

-
----- - - - - - -

interval

the timeout interval in seconds

 
-
-
-

Returns

-

the newly-created timeout source

-
-

Since: 2.14

-
-
-
-

g_timeout_add ()

-
guint
-g_timeout_add (guint interval,
-               GSourceFunc function,
-               gpointer data);
-

Sets a function to be called at regular intervals, with the default -priority, G_PRIORITY_DEFAULT. The function is called repeatedly -until it returns FALSE, at which point the timeout is automatically -destroyed and the function will not be called again. The first call -to the function will be at the end of the first interval -.

-

Note that timeout functions may be delayed, due to the processing of other -event sources. Thus they should not be relied on for precise timing. -After each call to the timeout function, the time of the next -timeout is recalculated based on the current time and the given interval -(it does not try to 'catch up' time lost in delays).

-

See memory management of sources for details -on how to handle the return value and memory management of data -.

-

If you want to have a timer in the "seconds" range and do not care -about the exact time of the first call of the timer, use the -g_timeout_add_seconds() function; this function allows for more -optimizations and more efficient system power usage.

-

This internally creates a main loop source using g_timeout_source_new() -and attaches it to the global GMainContext using g_source_attach(), so -the callback will be invoked in whichever thread is running that main -context. You can do these steps manually if you need greater control or to -use a custom main context.

-

The interval given is in terms of monotonic time, not wall clock -time. See g_get_monotonic_time().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

interval

the time between calls to the function, in milliseconds -(1/1000ths of a second)

 

function

function to call

 

data

data to pass to function -

 
-
-
-

Returns

-

the ID (greater than 0) of the event source.

-
-
-
-
-

g_timeout_add_full ()

-
guint
-g_timeout_add_full (gint priority,
-                    guint interval,
-                    GSourceFunc function,
-                    gpointer data,
-                    GDestroyNotify notify);
-

Sets a function to be called at regular intervals, with the given -priority. The function is called repeatedly until it returns -FALSE, at which point the timeout is automatically destroyed and -the function will not be called again. The notify - function is -called when the timeout is destroyed. The first call to the -function will be at the end of the first interval -.

-

Note that timeout functions may be delayed, due to the processing of other -event sources. Thus they should not be relied on for precise timing. -After each call to the timeout function, the time of the next -timeout is recalculated based on the current time and the given interval -(it does not try to 'catch up' time lost in delays).

-

See memory management of sources for details -on how to handle the return value and memory management of data -.

-

This internally creates a main loop source using g_timeout_source_new() -and attaches it to the global GMainContext using g_source_attach(), so -the callback will be invoked in whichever thread is running that main -context. You can do these steps manually if you need greater control or to -use a custom main context.

-

The interval given in terms of monotonic time, not wall clock time. -See g_get_monotonic_time().

-

[rename-to g_timeout_add]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

priority

the priority of the timeout source. Typically this will be in -the range between G_PRIORITY_DEFAULT and G_PRIORITY_HIGH.

 

interval

the time between calls to the function, in milliseconds -(1/1000ths of a second)

 

function

function to call

 

data

data to pass to function -

 

notify

function to call when the timeout is removed, or NULL.

[nullable]
-
-
-

Returns

-

the ID (greater than 0) of the event source.

-
-
-
-
-

g_timeout_add_seconds ()

-
guint
-g_timeout_add_seconds (guint interval,
-                       GSourceFunc function,
-                       gpointer data);
-

Sets a function to be called at regular intervals with the default -priority, G_PRIORITY_DEFAULT. The function is called repeatedly until -it returns FALSE, at which point the timeout is automatically destroyed -and the function will not be called again.

-

This internally creates a main loop source using -g_timeout_source_new_seconds() and attaches it to the main loop context -using g_source_attach(). You can do these steps manually if you need -greater control. Also see g_timeout_add_seconds_full().

-

Note that the first call of the timer may not be precise for timeouts -of one second. If you need finer precision and have such a timeout, -you may want to use g_timeout_add() instead.

-

See memory management of sources for details -on how to handle the return value and memory management of data -.

-

The interval given is in terms of monotonic time, not wall clock -time. See g_get_monotonic_time().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

interval

the time between calls to the function, in seconds

 

function

function to call

 

data

data to pass to function -

 
-
-
-

Returns

-

the ID (greater than 0) of the event source.

-
-

Since: 2.14

-
-
-
-

g_timeout_add_seconds_full ()

-
guint
-g_timeout_add_seconds_full (gint priority,
-                            guint interval,
-                            GSourceFunc function,
-                            gpointer data,
-                            GDestroyNotify notify);
-

Sets a function to be called at regular intervals, with priority -. -The function is called repeatedly until it returns FALSE, at which -point the timeout is automatically destroyed and the function will -not be called again.

-

Unlike g_timeout_add(), this function operates at whole second granularity. -The initial starting point of the timer is determined by the implementation -and the implementation is expected to group multiple timers together so that -they fire all at the same time. -To allow this grouping, the interval - to the first timer is rounded -and can deviate up to one second from the specified interval. -Subsequent timer iterations will generally run at the specified interval.

-

Note that timeout functions may be delayed, due to the processing of other -event sources. Thus they should not be relied on for precise timing. -After each call to the timeout function, the time of the next -timeout is recalculated based on the current time and the given interval -

-

See memory management of sources for details -on how to handle the return value and memory management of data -.

-

If you want timing more precise than whole seconds, use g_timeout_add() -instead.

-

The grouping of timers to fire at the same time results in a more power -and CPU efficient behavior so if your timer is in multiples of seconds -and you don't require the first timer exactly one second from now, the -use of g_timeout_add_seconds() is preferred over g_timeout_add().

-

This internally creates a main loop source using -g_timeout_source_new_seconds() and attaches it to the main loop context -using g_source_attach(). You can do these steps manually if you need -greater control.

-

The interval given is in terms of monotonic time, not wall clock -time. See g_get_monotonic_time().

-

[rename-to g_timeout_add_seconds]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

priority

the priority of the timeout source. Typically this will be in -the range between G_PRIORITY_DEFAULT and G_PRIORITY_HIGH.

 

interval

the time between calls to the function, in seconds

 

function

function to call

 

data

data to pass to function -

 

notify

function to call when the timeout is removed, or NULL.

[nullable]
-
-
-

Returns

-

the ID (greater than 0) of the event source.

-
-

Since: 2.14

-
-
-
-

g_idle_source_new ()

-
GSource *
-g_idle_source_new (void);
-

Creates a new idle source.

-

The source will not initially be associated with any GMainContext -and must be added to one with g_source_attach() before it will be -executed. Note that the default priority for idle sources is -G_PRIORITY_DEFAULT_IDLE, as compared to other sources which -have a default priority of G_PRIORITY_DEFAULT.

-
-

Returns

-

the newly-created idle source

-
-
-
-
-

g_idle_add ()

-
guint
-g_idle_add (GSourceFunc function,
-            gpointer data);
-

Adds a function to be called whenever there are no higher priority -events pending to the default main loop. The function is given the -default idle priority, G_PRIORITY_DEFAULT_IDLE. If the function -returns FALSE it is automatically removed from the list of event -sources and will not be called again.

-

See memory management of sources for details -on how to handle the return value and memory management of data -.

-

This internally creates a main loop source using g_idle_source_new() -and attaches it to the global GMainContext using g_source_attach(), so -the callback will be invoked in whichever thread is running that main -context. You can do these steps manually if you need greater control or to -use a custom main context.

-
-

Parameters

-
----- - - - - - - - - - - - - -

function

function to call

 

data

data to pass to function -.

 
-
-
-

Returns

-

the ID (greater than 0) of the event source.

-
-
-
-
-

g_idle_add_full ()

-
guint
-g_idle_add_full (gint priority,
-                 GSourceFunc function,
-                 gpointer data,
-                 GDestroyNotify notify);
-

Adds a function to be called whenever there are no higher priority -events pending. If the function returns FALSE it is automatically -removed from the list of event sources and will not be called again.

-

See memory management of sources for details -on how to handle the return value and memory management of data -.

-

This internally creates a main loop source using g_idle_source_new() -and attaches it to the global GMainContext using g_source_attach(), so -the callback will be invoked in whichever thread is running that main -context. You can do these steps manually if you need greater control or to -use a custom main context.

-

[rename-to g_idle_add]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

priority

the priority of the idle source. Typically this will be in the -range between G_PRIORITY_DEFAULT_IDLE and G_PRIORITY_HIGH_IDLE.

 

function

function to call

 

data

data to pass to function -

 

notify

function to call when the idle is removed, or NULL.

[nullable]
-
-
-

Returns

-

the ID (greater than 0) of the event source.

-
-
-
-
-

g_idle_remove_by_data ()

-
gboolean
-g_idle_remove_by_data (gpointer data);
-

Removes the idle function with the given data.

-
-

Parameters

-
----- - - - - - -

data

the data for the idle source's callback.

 
-
-
-

Returns

-

TRUE if an idle source was found and removed.

-
-
-
-
-

GChildWatchFunc ()

-
void
-(*GChildWatchFunc) (GPid pid,
-                    gint status,
-                    gpointer user_data);
-

Prototype of a GChildWatchSource callback, called when a child -process has exited. To interpret status -, see the documentation -for g_spawn_check_exit_status().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

pid

the process id of the child process

 

status

Status information about the child process, encoded -in a platform-specific manner

 

user_data

user data passed to g_child_watch_add()

 
-
-
-
-
-

g_child_watch_source_new ()

-
GSource *
-g_child_watch_source_new (GPid pid);
-

Creates a new child_watch source.

-

The source will not initially be associated with any GMainContext -and must be added to one with g_source_attach() before it will be -executed.

-

Note that child watch sources can only be used in conjunction with -g_spawn... when the G_SPAWN_DO_NOT_REAP_CHILD flag is used.

-

Note that on platforms where GPid must be explicitly closed -(see g_spawn_close_pid()) pid - must not be closed while the -source is still active. Typically, you will want to call -g_spawn_close_pid() in the callback function for the source.

-

Note further that using g_child_watch_source_new() is not -compatible with calling waitpid with a nonpositive first -argument in the application. Calling waitpid() for individual -pids will still work fine.

-

Similarly, on POSIX platforms, the pid - passed to this function must -be greater than 0 (i.e. this function must wait for a specific child, -and cannot wait for one of many children by using a nonpositive argument).

-
-

Parameters

-
----- - - - - - -

pid

process to watch. On POSIX the positive pid of a child process. On -Windows a handle for a process (which doesn't have to be a child).

 
-
-
-

Returns

-

the newly-created child watch source

-
-

Since: 2.4

-
-
-
-

g_child_watch_add ()

-
guint
-g_child_watch_add (GPid pid,
-                   GChildWatchFunc function,
-                   gpointer data);
-

Sets a function to be called when the child indicated by pid - -exits, at a default priority, G_PRIORITY_DEFAULT.

-

If you obtain pid - from g_spawn_async() or g_spawn_async_with_pipes() -you will need to pass G_SPAWN_DO_NOT_REAP_CHILD as flag to -the spawn function for the child watching to work.

-

Note that on platforms where GPid must be explicitly closed -(see g_spawn_close_pid()) pid - must not be closed while the -source is still active. Typically, you will want to call -g_spawn_close_pid() in the callback function for the source.

-

GLib supports only a single callback per process id.

-

This internally creates a main loop source using -g_child_watch_source_new() and attaches it to the main loop context -using g_source_attach(). You can do these steps manually if you -need greater control.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

pid

process id to watch. On POSIX the positive pid of a child -process. On Windows a handle for a process (which doesn't have to be -a child).

 

function

function to call

 

data

data to pass to function -

 
-
-
-

Returns

-

the ID (greater than 0) of the event source.

-
-

Since: 2.4

-
-
-
-

g_child_watch_add_full ()

-
guint
-g_child_watch_add_full (gint priority,
-                        GPid pid,
-                        GChildWatchFunc function,
-                        gpointer data,
-                        GDestroyNotify notify);
-

Sets a function to be called when the child indicated by pid - -exits, at the priority priority -.

-

If you obtain pid - from g_spawn_async() or g_spawn_async_with_pipes() -you will need to pass G_SPAWN_DO_NOT_REAP_CHILD as flag to -the spawn function for the child watching to work.

-

In many programs, you will want to call g_spawn_check_exit_status() -in the callback to determine whether or not the child exited -successfully.

-

Also, note that on platforms where GPid must be explicitly closed -(see g_spawn_close_pid()) pid - must not be closed while the source -is still active. Typically, you should invoke g_spawn_close_pid() -in the callback function for the source.

-

GLib supports only a single callback per process id.

-

This internally creates a main loop source using -g_child_watch_source_new() and attaches it to the main loop context -using g_source_attach(). You can do these steps manually if you -need greater control.

-

[rename-to g_child_watch_add]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

priority

the priority of the idle source. Typically this will be in the -range between G_PRIORITY_DEFAULT_IDLE and G_PRIORITY_HIGH_IDLE.

 

pid

process to watch. On POSIX the positive pid of a child process. On -Windows a handle for a process (which doesn't have to be a child).

 

function

function to call

 

data

data to pass to function -

 

notify

function to call when the idle is removed, or NULL.

[nullable]
-
-
-

Returns

-

the ID (greater than 0) of the event source.

-
-

Since: 2.4

-
-
-
-

g_poll ()

-
gint
-g_poll (GPollFD *fds,
-        guint nfds,
-        gint timeout);
-

Polls fds -, as with the poll() system call, but portably. (On -systems that don't have poll(), it is emulated using select().) -This is used internally by GMainContext, but it can be called -directly if you need to block until a file descriptor is ready, but -don't want to run the full main loop.

-

Each element of fds - is a GPollFD describing a single file -descriptor to poll. The fd field indicates the file descriptor, -and the events field indicates the events to poll for. On return, -the revents fields will be filled with the events that actually -occurred.

-

On POSIX systems, the file descriptors in fds - can be any sort of -file descriptor, but the situation is much more complicated on -Windows. If you need to use g_poll() in code that has to run on -Windows, the easiest solution is to construct all of your -GPollFDs with g_io_channel_win32_make_pollfd().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

fds

file descriptors to poll

 

nfds

the number of file descriptors in fds -

 

timeout

amount of time to wait, in milliseconds, or -1 to wait forever

 
-
-
-

Returns

-

the number of entries in fds -whose revents fields -were filled in, or 0 if the operation timed out, or -1 on error or -if the call was interrupted.

-
-

Since: 2.20

-
-
-
-

GSourceDummyMarshal ()

-
void
-(*GSourceDummyMarshal) (void);
-

This is just a placeholder for GClosureMarshal, -which cannot be used here for dependency reasons.

-
-
-
-

g_source_new ()

-
GSource *
-g_source_new (GSourceFuncs *source_funcs,
-              guint struct_size);
-

Creates a new GSource structure. The size is specified to -allow creating structures derived from GSource that contain -additional data. The size passed in must be at least -sizeof (GSource).

-

The source will not initially be associated with any GMainContext -and must be added to one with g_source_attach() before it will be -executed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

source_funcs

structure containing functions that implement -the sources behavior.

 

struct_size

size of the GSource structure to create.

 
-
-
-

Returns

-

the newly-created GSource.

-
-
-
-
-

g_source_ref ()

-
GSource *
-g_source_ref (GSource *source);
-

Increases the reference count on a source by one.

-
-

Parameters

-
----- - - - - - -

source

a GSource

 
-
-
-

Returns

-

source -

-
-
-
-
-

g_source_unref ()

-
void
-g_source_unref (GSource *source);
-

Decreases the reference count of a source by one. If the -resulting reference count is zero the source and associated -memory will be destroyed.

-
-

Parameters

-
----- - - - - - -

source

a GSource

 
-
-
-
-
-

g_source_set_funcs ()

-
void
-g_source_set_funcs (GSource *source,
-                    GSourceFuncs *funcs);
-

Sets the source functions (can be used to override -default implementations) of an unattached source.

-
-

Parameters

-
----- - - - - - - - - - - - - -

source

a GSource

 

funcs

the new GSourceFuncs

 
-
-

Since: 2.12

-
-
-
-

g_source_attach ()

-
guint
-g_source_attach (GSource *source,
-                 GMainContext *context);
-

Adds a GSource to a context - so that it will be executed within -that context. Remove it by calling g_source_destroy().

-
-

Parameters

-
----- - - - - - - - - - - - - -

source

a GSource

 

context

a GMainContext (if NULL, the default context will be used).

[nullable]
-
-
-

Returns

-

the ID (greater than 0) for the source within the -GMainContext.

-
-
-
-
-

g_source_destroy ()

-
void
-g_source_destroy (GSource *source);
-

Removes a source from its GMainContext, if any, and mark it as -destroyed. The source cannot be subsequently added to another -context. It is safe to call this on sources which have already been -removed from their context.

-
-

Parameters

-
----- - - - - - -

source

a GSource

 
-
-
-
-
-

g_source_is_destroyed ()

-
gboolean
-g_source_is_destroyed (GSource *source);
-

Returns whether source - has been destroyed.

-

This is important when you operate upon your objects -from within idle handlers, but may have freed the object -before the dispatch of your idle handler.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
static gboolean 
-idle_callback (gpointer data)
-{
-  SomeWidget *self = data;
-   
-  GDK_THREADS_ENTER ();
-  // do stuff with self
-  self->idle_id = 0;
-  GDK_THREADS_LEAVE ();
-   
-  return G_SOURCE_REMOVE;
-}
- 
-static void 
-some_widget_do_stuff_later (SomeWidget *self)
-{
-  self->idle_id = g_idle_add (idle_callback, self);
-}
- 
-static void 
-some_widget_finalize (GObject *object)
-{
-  SomeWidget *self = SOME_WIDGET (object);
-   
-  if (self->idle_id)
-    g_source_remove (self->idle_id);
-   
-  G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
- -

-

This will fail in a multi-threaded application if the -widget is destroyed before the idle handler fires due -to the use after free in the callback. A solution, to -this particular problem, is to check to if the source -has already been destroy within the callback.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
static gboolean 
-idle_callback (gpointer data)
-{
-  SomeWidget *self = data;
-  
-  GDK_THREADS_ENTER ();
-  if (!g_source_is_destroyed (g_main_current_source ()))
-    {
-      // do stuff with self
-    }
-  GDK_THREADS_LEAVE ();
-  
-  return FALSE;
-}
-
- -

-

Calls to this function from a thread other than the one acquired by the -GMainContext the GSource is attached to are typically redundant, as the -source could be destroyed immediately after this function returns. However, -once a source is destroyed it cannot be un-destroyed, so this function can be -used for opportunistic checks from any thread.

-
-

Parameters

-
----- - - - - - -

source

a GSource

 
-
-
-

Returns

-

TRUE if the source has been destroyed

-
-

Since: 2.12

-
-
-
-

g_source_set_priority ()

-
void
-g_source_set_priority (GSource *source,
-                       gint priority);
-

Sets the priority of a source. While the main loop is being run, a -source will be dispatched if it is ready to be dispatched and no -sources at a higher (numerically smaller) priority are ready to be -dispatched.

-

A child source always has the same priority as its parent. It is not -permitted to change the priority of a source once it has been added -as a child of another source.

-
-

Parameters

-
----- - - - - - - - - - - - - -

source

a GSource

 

priority

the new priority.

 
-
-
-
-
-

g_source_get_priority ()

-
gint
-g_source_get_priority (GSource *source);
-

Gets the priority of a source.

-
-

Parameters

-
----- - - - - - -

source

a GSource

 
-
-
-

Returns

-

the priority of the source

-
-
-
-
-

g_source_set_can_recurse ()

-
void
-g_source_set_can_recurse (GSource *source,
-                          gboolean can_recurse);
-

Sets whether a source can be called recursively. If can_recurse - is -TRUE, then while the source is being dispatched then this source -will be processed normally. Otherwise, all processing of this -source is blocked until the dispatch function returns.

-
-

Parameters

-
----- - - - - - - - - - - - - -

source

a GSource

 

can_recurse

whether recursion is allowed for this source

 
-
-
-
-
-

g_source_get_can_recurse ()

-
gboolean
-g_source_get_can_recurse (GSource *source);
-

Checks whether a source is allowed to be called recursively. -see g_source_set_can_recurse().

-
-

Parameters

-
----- - - - - - -

source

a GSource

 
-
-
-

Returns

-

whether recursion is allowed.

-
-
-
-
-

g_source_get_id ()

-
guint
-g_source_get_id (GSource *source);
-

Returns the numeric ID for a particular source. The ID of a source -is a positive integer which is unique within a particular main loop -context. The reverse -mapping from ID to source is done by g_main_context_find_source_by_id().

-
-

Parameters

-
----- - - - - - -

source

a GSource

 
-
-
-

Returns

-

the ID (greater than 0) for the source

-
-
-
-
-

g_source_get_name ()

-
const char *
-g_source_get_name (GSource *source);
-

Gets a name for the source, used in debugging and profiling. The -name may be NULL if it has never been set with g_source_set_name().

-
-

Parameters

-
----- - - - - - -

source

a GSource

 
-
-
-

Returns

-

the name of the source

-
-

Since: 2.26

-
-
-
-

g_source_set_name ()

-
void
-g_source_set_name (GSource *source,
-                   const char *name);
-

Sets a name for the source, used in debugging and profiling. -The name defaults to NULL.

-

The source name should describe in a human-readable way -what the source does. For example, "X11 event queue" -or "GTK+ repaint idle handler" or whatever it is.

-

It is permitted to call this function multiple times, but is not -recommended due to the potential performance impact. For example, -one could change the name in the "check" function of a GSourceFuncs -to include details like the event type in the source name.

-

Use caution if changing the name while another thread may be -accessing it with g_source_get_name(); that function does not copy -the value, and changing the value will free it while the other thread -may be attempting to use it.

-
-

Parameters

-
----- - - - - - - - - - - - - -

source

a GSource

 

name

debug name for the source

 
-
-

Since: 2.26

-
-
-
-

g_source_set_name_by_id ()

-
void
-g_source_set_name_by_id (guint tag,
-                         const char *name);
-

Sets the name of a source using its ID.

-

This is a convenience utility to set source names from the return -value of g_idle_add(), g_timeout_add(), etc.

-

It is a programmer error to attempt to set the name of a non-existent -source.

-

More specifically: source IDs can be reissued after a source has been -destroyed and therefore it is never valid to use this function with a -source ID which may have already been removed. An example is when -scheduling an idle to run in another thread with g_idle_add(): the -idle may already have run and been removed by the time this function -is called on its (now invalid) source ID. This source ID may have -been reissued, leading to the operation being performed against the -wrong source.

-
-

Parameters

-
----- - - - - - - - - - - - - -

tag

a GSource ID

 

name

debug name for the source

 
-
-

Since: 2.26

-
-
-
-

g_source_get_context ()

-
GMainContext *
-g_source_get_context (GSource *source);
-

Gets the GMainContext with which the source is associated.

-

You can call this on a source that has been destroyed, provided -that the GMainContext it was attached to still exists (in which -case it will return that GMainContext). In particular, you can -always call this function on the source returned from -g_main_current_source(). But calling this function on a source -whose GMainContext has been destroyed is an error.

-
-

Parameters

-
----- - - - - - -

source

a GSource

 
-
-
-

Returns

-

the GMainContext with which the -source is associated, or NULL if the context has not -yet been added to a source.

-

[transfer none][nullable]

-
-
-
-
-

g_source_set_callback ()

-
void
-g_source_set_callback (GSource *source,
-                       GSourceFunc func,
-                       gpointer data,
-                       GDestroyNotify notify);
-

Sets the callback function for a source. The callback for a source is -called from the source's dispatch function.

-

The exact type of func - depends on the type of source; ie. you -should not count on func - being called with data - as its first -parameter.

-

See memory management of sources for details -on how to handle memory management of data -.

-

Typically, you won't use this function. Instead use functions specific -to the type of source you are using.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

source

the source

 

func

a callback function

 

data

the data to pass to callback function

 

notify

a function to call when data -is no longer in use, or NULL.

[nullable]
-
-
-
-
-

GSourceFunc ()

-
gboolean
-(*GSourceFunc) (gpointer user_data);
-

Specifies the type of function passed to g_timeout_add(), -g_timeout_add_full(), g_idle_add(), and g_idle_add_full().

-
-

Parameters

-
----- - - - - - -

user_data

data passed to the function, set when the source was -created with one of the above functions

 
-
-
-

Returns

-

FALSE if the source should be removed. G_SOURCE_CONTINUE and -G_SOURCE_REMOVE are more memorable names for the return value.

-
-
-
-
-

g_source_set_callback_indirect ()

-
void
-g_source_set_callback_indirect (GSource *source,
-                                gpointer callback_data,
-                                GSourceCallbackFuncs *callback_funcs);
-

Sets the callback function storing the data as a refcounted callback -"object". This is used internally. Note that calling -g_source_set_callback_indirect() assumes -an initial reference count on callback_data -, and thus -callback_funcs->unref - will eventually be called once more -than callback_funcs->ref -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

source

the source

 

callback_data

pointer to callback data "object"

 

callback_funcs

functions for reference counting callback_data -and getting the callback and data

 
-
-
-
-
-

g_source_set_ready_time ()

-
void
-g_source_set_ready_time (GSource *source,
-                         gint64 ready_time);
-

Sets a GSource to be dispatched when the given monotonic time is -reached (or passed). If the monotonic time is in the past (as it -always will be if ready_time - is 0) then the source will be -dispatched immediately.

-

If ready_time - is -1 then the source is never woken up on the basis -of the passage of time.

-

Dispatching the source does not reset the ready time. You should do -so yourself, from the source dispatch function.

-

Note that if you have a pair of sources where the ready time of one -suggests that it will be delivered first but the priority for the -other suggests that it would be delivered first, and the ready time -for both sources is reached during the same main context iteration -then the order of dispatch is undefined.

-

It is a no-op to call this function on a GSource which has already been -destroyed with g_source_destroy().

-

This API is only intended to be used by implementations of GSource. -Do not call this API on a GSource that you did not create.

-
-

Parameters

-
----- - - - - - - - - - - - - -

source

a GSource

 

ready_time

the monotonic time at which the source will be ready, -0 for "immediately", -1 for "never"

 
-
-

Since: 2.36

-
-
-
-

g_source_get_ready_time ()

-
gint64
-g_source_get_ready_time (GSource *source);
-

Gets the "ready time" of source -, as set by -g_source_set_ready_time().

-

Any time before the current monotonic time (including 0) is an -indication that the source will fire immediately.

-
-

Parameters

-
----- - - - - - -

source

a GSource

 
-
-
-

Returns

-

the monotonic ready time, -1 for "never"

-
-
-
-
-

g_source_add_unix_fd ()

-
gpointer
-g_source_add_unix_fd (GSource *source,
-                      gint fd,
-                      GIOCondition events);
-

Monitors fd - for the IO events in events -.

-

The tag returned by this function can be used to remove or modify the -monitoring of the fd using g_source_remove_unix_fd() or -g_source_modify_unix_fd().

-

It is not necessary to remove the fd before destroying the source; it -will be cleaned up automatically.

-

This API is only intended to be used by implementations of GSource. -Do not call this API on a GSource that you did not create.

-

As the name suggests, this function is not available on Windows.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

source

a GSource

 

fd

the fd to monitor

 

events

an event mask

 
-
-
-

Returns

-

an opaque tag.

-

[not nullable]

-
-

Since: 2.36

-
-
-
-

g_source_remove_unix_fd ()

-
void
-g_source_remove_unix_fd (GSource *source,
-                         gpointer tag);
-

Reverses the effect of a previous call to g_source_add_unix_fd().

-

You only need to call this if you want to remove an fd from being -watched while keeping the same source around. In the normal case you -will just want to destroy the source.

-

This API is only intended to be used by implementations of GSource. -Do not call this API on a GSource that you did not create.

-

As the name suggests, this function is not available on Windows.

-
-

Parameters

-
----- - - - - - - - - - - - - -

source

a GSource

 

tag

the tag from g_source_add_unix_fd().

[not nullable]
-
-

Since: 2.36

-
-
-
-

g_source_modify_unix_fd ()

-
void
-g_source_modify_unix_fd (GSource *source,
-                         gpointer tag,
-                         GIOCondition new_events);
-

Updates the event mask to watch for the fd identified by tag -.

-

tag - is the tag returned from g_source_add_unix_fd().

-

If you want to remove a fd, don't set its event mask to zero. -Instead, call g_source_remove_unix_fd().

-

This API is only intended to be used by implementations of GSource. -Do not call this API on a GSource that you did not create.

-

As the name suggests, this function is not available on Windows.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

source

a GSource

 

tag

the tag from g_source_add_unix_fd().

[not nullable]

new_events

the new event mask to watch

 
-
-

Since: 2.36

-
-
-
-

g_source_query_unix_fd ()

-
GIOCondition
-g_source_query_unix_fd (GSource *source,
-                        gpointer tag);
-

Queries the events reported for the fd corresponding to tag - on -source - during the last poll.

-

The return value of this function is only defined when the function -is called from the check or dispatch functions for source -.

-

This API is only intended to be used by implementations of GSource. -Do not call this API on a GSource that you did not create.

-

As the name suggests, this function is not available on Windows.

-
-

Parameters

-
----- - - - - - - - - - - - - -

source

a GSource

 

tag

the tag from g_source_add_unix_fd().

[not nullable]
-
-
-

Returns

-

the conditions reported on the fd

-
-

Since: 2.36

-
-
-
-

g_source_add_poll ()

-
void
-g_source_add_poll (GSource *source,
-                   GPollFD *fd);
-

Adds a file descriptor to the set of file descriptors polled for -this source. This is usually combined with g_source_new() to add an -event source. The event source's check function will typically test -the revents - field in the GPollFD struct and return TRUE if events need -to be processed.

-

This API is only intended to be used by implementations of GSource. -Do not call this API on a GSource that you did not create.

-

Using this API forces the linear scanning of event sources on each -main loop iteration. Newly-written event sources should try to use -g_source_add_unix_fd() instead of this API.

-
-

Parameters

-
----- - - - - - - - - - - - - -

source

a GSource

 

fd

a GPollFD structure holding information about a file -descriptor to watch.

 
-
-
-
-
-

g_source_remove_poll ()

-
void
-g_source_remove_poll (GSource *source,
-                      GPollFD *fd);
-

Removes a file descriptor from the set of file descriptors polled for -this source.

-

This API is only intended to be used by implementations of GSource. -Do not call this API on a GSource that you did not create.

-
-

Parameters

-
----- - - - - - - - - - - - - -

source

a GSource

 

fd

a GPollFD structure previously passed to g_source_add_poll().

 
-
-
-
-
-

g_source_add_child_source ()

-
void
-g_source_add_child_source (GSource *source,
-                           GSource *child_source);
-

Adds child_source - to source - as a "polled" source; when source - is -added to a GMainContext, child_source - will be automatically added -with the same priority, when child_source - is triggered, it will -cause source - to dispatch (in addition to calling its own -callback), and when source - is destroyed, it will destroy -child_source - as well. (source - will also still be dispatched if -its own prepare/check functions indicate that it is ready.)

-

If you don't need child_source - to do anything on its own when it -triggers, you can call g_source_set_dummy_callback() on it to set a -callback that does nothing (except return TRUE if appropriate).

-

source - will hold a reference on child_source - while child_source - -is attached to it.

-

This API is only intended to be used by implementations of GSource. -Do not call this API on a GSource that you did not create.

-
-

Parameters

-
----- - - - - - - - - - - - - -

source

a GSource

 

child_source

a second GSource that source -should "poll"

 
-
-

Since: 2.28

-
-
-
-

g_source_remove_child_source ()

-
void
-g_source_remove_child_source (GSource *source,
-                              GSource *child_source);
-

Detaches child_source - from source - and destroys it.

-

This API is only intended to be used by implementations of GSource. -Do not call this API on a GSource that you did not create.

-
-

Parameters

-
----- - - - - - - - - - - - - -

source

a GSource

 

child_source

a GSource previously passed to -g_source_add_child_source().

 
-
-

Since: 2.28

-
-
-
-

g_source_get_time ()

-
gint64
-g_source_get_time (GSource *source);
-

Gets the time to be used when checking this source. The advantage of -calling this function over calling g_get_monotonic_time() directly is -that when checking multiple sources, GLib can cache a single value -instead of having to repeatedly get the system monotonic time.

-

The time here is the system monotonic time, if available, or some -other reasonable alternative otherwise. See g_get_monotonic_time().

-
-

Parameters

-
----- - - - - - -

source

a GSource

 
-
-
-

Returns

-

the monotonic time in microseconds

-
-

Since: 2.28

-
-
-
-

g_source_get_current_time ()

-
void
-g_source_get_current_time (GSource *source,
-                           GTimeVal *timeval);
-
-

g_source_get_current_time has been deprecated since version 2.28 and should not be used in newly-written code.

-

use g_source_get_time() instead

-
-

This function ignores source - and is otherwise the same as -g_get_current_time().

-
-

Parameters

-
----- - - - - - - - - - - - - -

source

a GSource

 

timeval

GTimeVal structure in which to store current time.

 
-
-
-
-
-

g_source_remove ()

-
gboolean
-g_source_remove (guint tag);
-

Removes the source with the given id from the default main context.

-

The id of a GSource is given by g_source_get_id(), or will be -returned by the functions g_source_attach(), g_idle_add(), -g_idle_add_full(), g_timeout_add(), g_timeout_add_full(), -g_child_watch_add(), g_child_watch_add_full(), g_io_add_watch(), and -g_io_add_watch_full().

-

See also g_source_destroy(). You must use g_source_destroy() for sources -added to a non-default main context.

-

It is a programmer error to attempt to remove a non-existent source.

-

More specifically: source IDs can be reissued after a source has been -destroyed and therefore it is never valid to use this function with a -source ID which may have already been removed. An example is when -scheduling an idle to run in another thread with g_idle_add(): the -idle may already have run and been removed by the time this function -is called on its (now invalid) source ID. This source ID may have -been reissued, leading to the operation being performed against the -wrong source.

-
-

Parameters

-
----- - - - - - -

tag

the ID of the source to remove.

 
-
-
-

Returns

-

For historical reasons, this function always returns TRUE

-
-
-
-
-

g_source_remove_by_funcs_user_data ()

-
gboolean
-g_source_remove_by_funcs_user_data (GSourceFuncs *funcs,
-                                    gpointer user_data);
-

Removes a source from the default main loop context given the -source functions and user data. If multiple sources exist with the -same source functions and user data, only one will be destroyed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

funcs

The source_funcs -passed to g_source_new()

 

user_data

the user data for the callback

 
-
-
-

Returns

-

TRUE if a source was found and removed.

-
-
-
-
-

g_source_remove_by_user_data ()

-
gboolean
-g_source_remove_by_user_data (gpointer user_data);
-

Removes a source from the default main loop context given the user -data for the callback. If multiple sources exist with the same user -data, only one will be destroyed.

-
-

Parameters

-
----- - - - - - -

user_data

the user_data for the callback.

 
-
-
-

Returns

-

TRUE if a source was found and removed.

-
-
-
-
-

Types and Values

-
-

GMainLoop

-
typedef struct _GMainLoop GMainLoop;
-

The GMainLoop struct is an opaque data type -representing the main event loop of a GLib or GTK+ application.

-
-
-
-

G_PRIORITY_HIGH

-
#define G_PRIORITY_HIGH            -100
-
-

Use this for high priority event sources.

-

It is not used within GLib or GTK+.

-
-
-
-

G_PRIORITY_DEFAULT

-
#define G_PRIORITY_DEFAULT          0
-
-

Use this for default priority event sources.

-

In GLib this priority is used when adding timeout functions -with g_timeout_add(). In GDK this priority is used for events -from the X server.

-
-
-
-

G_PRIORITY_HIGH_IDLE

-
#define G_PRIORITY_HIGH_IDLE        100
-
-

Use this for high priority idle functions.

-

GTK+ uses G_PRIORITY_HIGH_IDLE + 10 for resizing operations, -and G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is -done to ensure that any pending resizes are processed before any -pending redraws, so that widgets are not redrawn twice unnecessarily.)

-
-
-
-

G_PRIORITY_DEFAULT_IDLE

-
#define G_PRIORITY_DEFAULT_IDLE     200
-
-

Use this for default priority idle functions.

-

In GLib this priority is used when adding idle functions with -g_idle_add().

-
-
-
-

G_PRIORITY_LOW

-
#define G_PRIORITY_LOW              300
-
-

Use this for very low priority background tasks.

-

It is not used within GLib or GTK+.

-
-
-
-

G_SOURCE_CONTINUE

-
#define G_SOURCE_CONTINUE       TRUE
-
-

Use this macro as the return value of a GSourceFunc to leave -the GSource in the main loop.

-

Since: 2.32

-
-
-
-

G_SOURCE_REMOVE

-
#define G_SOURCE_REMOVE         FALSE
-
-

Use this macro as the return value of a GSourceFunc to remove -the GSource from the main loop.

-

Since: 2.32

-
-
-
-

GMainContext

-
typedef struct _GMainContext GMainContext;
-

The GMainContext struct is an opaque data -type representing a set of sources to be handled in a main loop.

-
-
-
-

GPid

-
typedef int GPid;
-
-

A type which is used to hold a process identification.

-

On UNIX, processes are identified by a process id (an integer), -while Windows uses process handles (which are pointers).

-

GPid is used in GLib only for descendant processes spawned with -the g_spawn functions.

-
-
-
-

G_PID_FORMAT

-
#define G_PID_FORMAT "i"
-
-

A format specifier that can be used in printf()-style format strings -when printing a GPid.

-

Since: 2.50

-
-
-
-

struct GPollFD

-
struct GPollFD {
-#if defined (G_OS_WIN32) && GLIB_SIZEOF_VOID_P == 8
-#endif
-#else
-  gint		fd;
-#endif
-  gushort 	events;
-  gushort 	revents;
-};
-
-

Represents a file descriptor, which events to poll for, and which events -occurred.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

gint fd;

the file descriptor to poll (or a HANDLE on Win32)

 

gushort events;

a bitwise combination from GIOCondition, specifying which -events should be polled for. Typically for reading from a file -descriptor you would use G_IO_IN | G_IO_HUP | G_IO_ERR, and -for writing you would use G_IO_OUT | G_IO_ERR.

 

gushort revents;

a bitwise combination of flags from GIOCondition, returned -from the poll() function to indicate which events occurred.

 
-
-
-
-
-

G_POLLFD_FORMAT

-
#define G_POLLFD_FORMAT "%d"
-
-

A format specifier that can be used in printf()-style format strings -when printing the fd - member of a GPollFD.

-
-
-
-

struct GSource

-
struct GSource {
-};
-
-

The GSource struct is an opaque data type -representing an event source.

-
-
-
-

struct GSourceFuncs

-
struct GSourceFuncs {
-  gboolean (*prepare)  (GSource    *source,
-                        gint       *timeout_);
-  gboolean (*check)    (GSource    *source);
-  gboolean (*dispatch) (GSource    *source,
-                        GSourceFunc callback,
-                        gpointer    user_data);
-  void     (*finalize) (GSource    *source); /* Can be NULL */
-};
-
-

The GSourceFuncs struct contains a table of -functions used to handle event sources in a generic manner.

-

For idle sources, the prepare and check functions always return TRUE -to indicate that the source is always ready to be processed. The prepare -function also returns a timeout value of 0 to ensure that the poll() call -doesn't block (since that would be time wasted which could have been spent -running the idle function).

-

For timeout sources, the prepare and check functions both return TRUE -if the timeout interval has expired. The prepare function also returns -a timeout value to ensure that the poll() call doesn't block too long -and miss the next timeout.

-

For file descriptor sources, the prepare function typically returns FALSE, -since it must wait until poll() has been called before it knows whether -any events need to be processed. It sets the returned timeout to -1 to -indicate that it doesn't mind how long the poll() call blocks. In the -check function, it tests the results of the poll() call to see if the -required condition has been met, and returns TRUE if so.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

prepare ()

Called before all the file descriptors are polled. If the -source can determine that it is ready here (without waiting for the -results of the poll() call) it should return TRUE. It can also return -a timeout_ -value which should be the maximum timeout (in milliseconds) -which should be passed to the poll() call. The actual timeout used will -be -1 if all sources returned -1, or it will be the minimum of all -the timeout_ -values returned which were >= 0. Since 2.36 this may -be NULL, in which case the effect is as if the function always returns -FALSE with a timeout of -1. If prepare -returns a -timeout and the source also has a 'ready time' set then the -nearer of the two will be used.

 

check ()

Called after all the file descriptors are polled. The source -should return TRUE if it is ready to be dispatched. Note that some -time may have passed since the previous prepare function was called, -so the source should be checked again here. Since 2.36 this may -be NULL, in which case the effect is as if the function always returns -FALSE.

 

dispatch ()

Called to dispatch the event source, after it has returned -TRUE in either its prepare -or its check -function. The dispatch -function is passed in a callback function and data. The callback -function may be NULL if the source was never connected to a callback -using g_source_set_callback(). The dispatch -function should call the -callback function with user_data -and whatever additional parameters -are needed for this type of event source. The return value of the -dispatch -function should be G_SOURCE_REMOVE if the source should be -removed or G_SOURCE_CONTINUE to keep it.

 

finalize ()

Called when the source is finalized. At this point, the source -will have been destroyed, had its callback cleared, and have been removed -from its GMainContext, but it will still have its final reference count; -so methods can be called on it from within this function.

 
-
-
-
-
-

struct GSourceCallbackFuncs

-
struct GSourceCallbackFuncs {
-  void (*ref)   (gpointer     cb_data);
-  void (*unref) (gpointer     cb_data);
-  void (*get)   (gpointer     cb_data,
-                 GSource     *source, 
-                 GSourceFunc *func,
-                 gpointer    *data);
-};
-
-

The GSourceCallbackFuncs struct contains -functions for managing callback objects.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

ref ()

Called when a reference is added to the callback object

 

unref ()

Called when a reference to the callback object is dropped

 

get ()

Called to extract the callback function and data from the -callback object.

 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Thread-Pools.html b/docs/reference/glib/html/glib-Thread-Pools.html deleted file mode 100644 index a31e7e5ea..000000000 --- a/docs/reference/glib/html/glib-Thread-Pools.html +++ /dev/null @@ -1,808 +0,0 @@ - - - - -Thread Pools: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Thread Pools

-

Thread Pools — pools of threads to execute work concurrently

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GThreadPool * - -g_thread_pool_new () -
-gboolean - -g_thread_pool_push () -
-gboolean - -g_thread_pool_set_max_threads () -
-gint - -g_thread_pool_get_max_threads () -
-guint - -g_thread_pool_get_num_threads () -
-guint - -g_thread_pool_unprocessed () -
-void - -g_thread_pool_free () -
-void - -g_thread_pool_set_max_unused_threads () -
-gint - -g_thread_pool_get_max_unused_threads () -
-guint - -g_thread_pool_get_num_unused_threads () -
-void - -g_thread_pool_stop_unused_threads () -
-void - -g_thread_pool_set_sort_function () -
-void - -g_thread_pool_set_max_idle_time () -
-guint - -g_thread_pool_get_max_idle_time () -
-gboolean - -g_thread_pool_move_to_front () -
-
-
-

Types and Values

-
---- - - - - -
structGThreadPool
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

Sometimes you wish to asynchronously fork out the execution of work -and continue working in your own thread. If that will happen often, -the overhead of starting and destroying a thread each time might be -too high. In such cases reusing already started threads seems like a -good idea. And it indeed is, but implementing this can be tedious -and error-prone.

-

Therefore GLib provides thread pools for your convenience. An added -advantage is, that the threads can be shared between the different -subsystems of your program, when they are using GLib.

-

To create a new thread pool, you use g_thread_pool_new(). -It is destroyed by g_thread_pool_free().

-

If you want to execute a certain task within a thread pool, -you call g_thread_pool_push().

-

To get the current number of running threads you call -g_thread_pool_get_num_threads(). To get the number of still -unprocessed tasks you call g_thread_pool_unprocessed(). To control -the maximal number of threads for a thread pool, you use -g_thread_pool_get_max_threads() and g_thread_pool_set_max_threads().

-

Finally you can control the number of unused threads, that are kept -alive by GLib for future use. The current number can be fetched with -g_thread_pool_get_num_unused_threads(). The maximal number can be -controlled by g_thread_pool_get_max_unused_threads() and -g_thread_pool_set_max_unused_threads(). All currently unused threads -can be stopped by calling g_thread_pool_stop_unused_threads().

-
-
-

Functions

-
-

g_thread_pool_new ()

-
GThreadPool *
-g_thread_pool_new (GFunc func,
-                   gpointer user_data,
-                   gint max_threads,
-                   gboolean exclusive,
-                   GError **error);
-

This function creates a new thread pool.

-

Whenever you call g_thread_pool_push(), either a new thread is -created or an unused one is reused. At most max_threads - threads -are running concurrently for this thread pool. max_threads - = -1 -allows unlimited threads to be created for this thread pool. The -newly created or reused thread now executes the function func - -with the two arguments. The first one is the parameter to -g_thread_pool_push() and the second one is user_data -.

-

The parameter exclusive - determines whether the thread pool owns -all threads exclusive or shares them with other thread pools. -If exclusive - is TRUE, max_threads - threads are started -immediately and they will run exclusively for this thread pool -until it is destroyed by g_thread_pool_free(). If exclusive - is -FALSE, threads are created when needed and shared between all -non-exclusive thread pools. This implies that max_threads - may -not be -1 for exclusive thread pools. Besides, exclusive thread -pools are not affected by g_thread_pool_set_max_idle_time() -since their threads are never considered idle and returned to the -global pool.

-

error - can be NULL to ignore errors, or non-NULL to report -errors. An error can only occur when exclusive - is set to TRUE -and not all max_threads - threads could be created. -See GThreadError for possible errors that may occur. -Note, even in case of error a valid GThreadPool is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

func

a function to execute in the threads of the new thread pool

 

user_data

user data that is handed over to func -every time it -is called

 

max_threads

the maximal number of threads to execute concurrently -in the new thread pool, -1 means no limit

 

exclusive

should this thread pool be exclusive?

 

error

return location for error, or NULL

 
-
-
-

Returns

-

the new GThreadPool

-
-
-
-
-

g_thread_pool_push ()

-
gboolean
-g_thread_pool_push (GThreadPool *pool,
-                    gpointer data,
-                    GError **error);
-

Inserts data - into the list of tasks to be executed by pool -.

-

When the number of currently running threads is lower than the -maximal allowed number of threads, a new thread is started (or -reused) with the properties given to g_thread_pool_new(). -Otherwise, data - stays in the queue until a thread in this pool -finishes its previous task and processes data -.

-

error - can be NULL to ignore errors, or non-NULL to report -errors. An error can only occur when a new thread couldn't be -created. In that case data - is simply appended to the queue of -work to do.

-

Before version 2.32, this function did not return a success status.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

pool

a GThreadPool

 

data

a new task for pool -

 

error

return location for error, or NULL

 
-
-
-

Returns

-

TRUE on success, FALSE if an error occurred

-
-
-
-
-

g_thread_pool_set_max_threads ()

-
gboolean
-g_thread_pool_set_max_threads (GThreadPool *pool,
-                               gint max_threads,
-                               GError **error);
-

Sets the maximal allowed number of threads for pool -. -A value of -1 means that the maximal number of threads -is unlimited. If pool - is an exclusive thread pool, setting -the maximal number of threads to -1 is not allowed.

-

Setting max_threads - to 0 means stopping all work for pool -. -It is effectively frozen until max_threads - is set to a non-zero -value again.

-

A thread is never terminated while calling func -, as supplied by -g_thread_pool_new(). Instead the maximal number of threads only -has effect for the allocation of new threads in g_thread_pool_push(). -A new thread is allocated, whenever the number of currently -running threads in pool - is smaller than the maximal number.

-

error - can be NULL to ignore errors, or non-NULL to report -errors. An error can only occur when a new thread couldn't be -created.

-

Before version 2.32, this function did not return a success status.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

pool

a GThreadPool

 

max_threads

a new maximal number of threads for pool -, -or -1 for unlimited

 

error

return location for error, or NULL

 
-
-
-

Returns

-

TRUE on success, FALSE if an error occurred

-
-
-
-
-

g_thread_pool_get_max_threads ()

-
gint
-g_thread_pool_get_max_threads (GThreadPool *pool);
-

Returns the maximal number of threads for pool -.

-
-

Parameters

-
----- - - - - - -

pool

a GThreadPool

 
-
-
-

Returns

-

the maximal number of threads

-
-
-
-
-

g_thread_pool_get_num_threads ()

-
guint
-g_thread_pool_get_num_threads (GThreadPool *pool);
-

Returns the number of threads currently running in pool -.

-
-

Parameters

-
----- - - - - - -

pool

a GThreadPool

 
-
-
-

Returns

-

the number of threads currently running

-
-
-
-
-

g_thread_pool_unprocessed ()

-
guint
-g_thread_pool_unprocessed (GThreadPool *pool);
-

Returns the number of tasks still unprocessed in pool -.

-
-

Parameters

-
----- - - - - - -

pool

a GThreadPool

 
-
-
-

Returns

-

the number of unprocessed tasks

-
-
-
-
-

g_thread_pool_free ()

-
void
-g_thread_pool_free (GThreadPool *pool,
-                    gboolean immediate,
-                    gboolean wait_);
-

Frees all resources allocated for pool -.

-

If immediate - is TRUE, no new task is processed for pool -. -Otherwise pool - is not freed before the last task is processed. -Note however, that no thread of this pool is interrupted while -processing a task. Instead at least all still running threads -can finish their tasks before the pool - is freed.

-

If wait_ - is TRUE, the functions does not return before all -tasks to be processed (dependent on immediate -, whether all -or only the currently running) are ready. -Otherwise the function returns immediately.

-

After calling this function pool - must not be used anymore.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

pool

a GThreadPool

 

immediate

should pool -shut down immediately?

 

wait_

should the function wait for all tasks to be finished?

 
-
-
-
-
-

g_thread_pool_set_max_unused_threads ()

-
void
-g_thread_pool_set_max_unused_threads (gint max_threads);
-

Sets the maximal number of unused threads to max_threads -. -If max_threads - is -1, no limit is imposed on the number -of unused threads.

-

The default value is 2.

-
-

Parameters

-
----- - - - - - -

max_threads

maximal number of unused threads

 
-
-
-
-
-

g_thread_pool_get_max_unused_threads ()

-
gint
-g_thread_pool_get_max_unused_threads (void);
-

Returns the maximal allowed number of unused threads.

-
-

Returns

-

the maximal number of unused threads

-
-
-
-
-

g_thread_pool_get_num_unused_threads ()

-
guint
-g_thread_pool_get_num_unused_threads (void);
-

Returns the number of currently unused threads.

-
-

Returns

-

the number of currently unused threads

-
-
-
-
-

g_thread_pool_stop_unused_threads ()

-
void
-g_thread_pool_stop_unused_threads (void);
-

Stops all currently unused threads. This does not change the -maximal number of unused threads. This function can be used to -regularly stop all unused threads e.g. from g_timeout_add().

-
-
-
-

g_thread_pool_set_sort_function ()

-
void
-g_thread_pool_set_sort_function (GThreadPool *pool,
-                                 GCompareDataFunc func,
-                                 gpointer user_data);
-

Sets the function used to sort the list of tasks. This allows the -tasks to be processed by a priority determined by func -, and not -just in the order in which they were added to the pool.

-

Note, if the maximum number of threads is more than 1, the order -that threads are executed cannot be guaranteed 100%. Threads are -scheduled by the operating system and are executed at random. It -cannot be assumed that threads are executed in the order they are -created.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

pool

a GThreadPool

 

func

the GCompareDataFunc used to sort the list of tasks. -This function is passed two tasks. It should return -0 if the order in which they are handled does not matter, -a negative value if the first task should be processed before -the second or a positive value if the second task should be -processed first.

 

user_data

user data passed to func -

 
-
-

Since: 2.10

-
-
-
-

g_thread_pool_set_max_idle_time ()

-
void
-g_thread_pool_set_max_idle_time (guint interval);
-

This function will set the maximum interval - that a thread -waiting in the pool for new tasks can be idle for before -being stopped. This function is similar to calling -g_thread_pool_stop_unused_threads() on a regular timeout, -except this is done on a per thread basis.

-

By setting interval - to 0, idle threads will not be stopped.

-

The default value is 15000 (15 seconds).

-
-

Parameters

-
----- - - - - - -

interval

the maximum interval -(in milliseconds) -a thread can be idle

 
-
-

Since: 2.10

-
-
-
-

g_thread_pool_get_max_idle_time ()

-
guint
-g_thread_pool_get_max_idle_time (void);
-

This function will return the maximum interval - that a -thread will wait in the thread pool for new tasks before -being stopped.

-

If this function returns 0, threads waiting in the thread -pool for new work are not stopped.

-
-

Returns

-

the maximum interval -(milliseconds) to wait -for new tasks in the thread pool before stopping the -thread

-
-

Since: 2.10

-
-
-
-

g_thread_pool_move_to_front ()

-
gboolean
-g_thread_pool_move_to_front (GThreadPool *pool,
-                             gpointer data);
-

Moves the item to the front of the queue of unprocessed -items, so that it will be processed next.

-
-

Parameters

-
----- - - - - - - - - - - - - -

pool

a GThreadPool

 

data

an unprocessed item in the pool

 
-
-
-

Returns

-

TRUE if the item was found and moved

-
-

Since: 2.46

-
-
-
-

Types and Values

-
-

struct GThreadPool

-
struct GThreadPool {
-  GFunc func;
-  gpointer user_data;
-  gboolean exclusive;
-};
-
-

The GThreadPool struct represents a thread pool. It has three -public read-only members, but the underlying struct is bigger, -so you must not copy this struct.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

GFunc func;

the function to execute in the threads of this pool

 

gpointer user_data;

the user data for the threads of this pool

 

gboolean exclusive;

are all threads exclusive to this pool

 
-
-
-
-
-

See Also

-

GThread

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Threads.html b/docs/reference/glib/html/glib-Threads.html deleted file mode 100644 index f3cc774e8..000000000 --- a/docs/reference/glib/html/glib-Threads.html +++ /dev/null @@ -1,3323 +0,0 @@ - - - - -Threads: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Threads

-

Threads — portable support for threads, mutexes, locks, - conditions and thread private data

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gpointer - -(*GThreadFunc) () -
-GThread * - -g_thread_new () -
-GThread * - -g_thread_try_new () -
-GThread * - -g_thread_ref () -
-void - -g_thread_unref () -
-gpointer - -g_thread_join () -
-void - -g_thread_yield () -
-void - -g_thread_exit () -
-GThread * - -g_thread_self () -
-void - -g_mutex_init () -
-void - -g_mutex_clear () -
-void - -g_mutex_lock () -
-gboolean - -g_mutex_trylock () -
-void - -g_mutex_unlock () -
-GMutexLocker * - -g_mutex_locker_new () -
-void - -g_mutex_locker_free () -
#define -G_LOCK_DEFINE() -
#define -G_LOCK_DEFINE_STATIC() -
#define -G_LOCK_EXTERN() -
#define -G_LOCK() -
#define -G_TRYLOCK() -
#define -G_UNLOCK() -
-void - -g_rec_mutex_init () -
-void - -g_rec_mutex_clear () -
-void - -g_rec_mutex_lock () -
-gboolean - -g_rec_mutex_trylock () -
-void - -g_rec_mutex_unlock () -
-void - -g_rw_lock_init () -
-void - -g_rw_lock_clear () -
-void - -g_rw_lock_writer_lock () -
-gboolean - -g_rw_lock_writer_trylock () -
-void - -g_rw_lock_writer_unlock () -
-void - -g_rw_lock_reader_lock () -
-gboolean - -g_rw_lock_reader_trylock () -
-void - -g_rw_lock_reader_unlock () -
-void - -g_cond_init () -
-void - -g_cond_clear () -
-void - -g_cond_wait () -
-gboolean - -g_cond_timed_wait () -
-gboolean - -g_cond_wait_until () -
-void - -g_cond_signal () -
-void - -g_cond_broadcast () -
#define -G_PRIVATE_INIT() -
-gpointer - -g_private_get () -
-void - -g_private_set () -
-void - -g_private_replace () -
#define -g_once() -
-gboolean - -g_once_init_enter () -
-void - -g_once_init_leave () -
-void - -g_bit_lock () -
-gboolean - -g_bit_trylock () -
-void - -g_bit_unlock () -
-void - -g_pointer_bit_lock () -
-gboolean - -g_pointer_bit_trylock () -
-void - -g_pointer_bit_unlock () -
-guint - -g_get_num_processors () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#defineG_THREAD_ERROR
enumGThreadError
 GThread
unionGMutex
typedefGMutexLocker
structGRecMutex
structGRWLock
structGCond
structGPrivate
structGOnce
enumGOnceStatus
#defineG_ONCE_INIT
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

Threads act almost like processes, but unlike processes all threads -of one process share the same memory. This is good, as it provides -easy communication between the involved threads via this shared -memory, and it is bad, because strange things (so called -"Heisenbugs") might happen if the program is not carefully designed. -In particular, due to the concurrent nature of threads, no -assumptions on the order of execution of code running in different -threads can be made, unless order is explicitly forced by the -programmer through synchronization primitives.

-

The aim of the thread-related functions in GLib is to provide a -portable means for writing multi-threaded software. There are -primitives for mutexes to protect the access to portions of memory -(GMutex, GRecMutex and GRWLock). There is a facility to use -individual bits for locks (g_bit_lock()). There are primitives -for condition variables to allow synchronization of threads (GCond). -There are primitives for thread-private data - data that every -thread has a private instance of (GPrivate). There are facilities -for one-time initialization (GOnce, g_once_init_enter()). Finally, -there are primitives to create and manage threads (GThread).

-

The GLib threading system used to be initialized with g_thread_init(). -This is no longer necessary. Since version 2.32, the GLib threading -system is automatically initialized at the start of your program, -and all thread-creation functions and synchronization primitives -are available right away.

-

Note that it is not safe to assume that your program has no threads -even if you don't call g_thread_new() yourself. GLib and GIO can -and will create threads for their own purposes in some cases, such -as when using g_unix_signal_source_new() or when using GDBus.

-

Originally, UNIX did not have threads, and therefore some traditional -UNIX APIs are problematic in threaded programs. Some notable examples -are

-
    -
  • C library functions that return data in statically allocated -buffers, such as strtok() or strerror(). For many of these, -there are thread-safe variants with a _r suffix, or you can -look at corresponding GLib APIs (like g_strsplit() or g_strerror()).

  • -
  • The functions setenv() and unsetenv() manipulate the process -environment in a not thread-safe way, and may interfere with getenv() -calls in other threads. Note that getenv() calls may be hidden behind -other APIs. For example, GNU gettext() calls getenv() under the -covers. In general, it is best to treat the environment as readonly. -If you absolutely have to modify the environment, do it early in -main(), when no other threads are around yet.

  • -
  • The setlocale() function changes the locale for the entire process, -affecting all threads. Temporary changes to the locale are often made -to change the behavior of string scanning or formatting functions -like scanf() or printf(). GLib offers a number of string APIs -(like g_ascii_formatd() or g_ascii_strtod()) that can often be -used as an alternative. Or you can use the uselocale() function -to change the locale only for the current thread.

  • -
  • The fork() function only takes the calling thread into the child's -copy of the process image. If other threads were executing in critical -sections they could have left mutexes locked which could easily -cause deadlocks in the new child. For this reason, you should -call exit() or exec() as soon as possible in the child and only -make signal-safe library calls before that.

  • -
  • The daemon() function uses fork() in a way contrary to what is -described above. It should not be used with GLib programs.

  • -
-

GLib itself is internally completely thread-safe (all global data is -automatically locked), but individual data structure instances are -not automatically locked for performance reasons. For example, -you must coordinate accesses to the same GHashTable from multiple -threads. The two notable exceptions from this rule are GMainLoop -and GAsyncQueue, which are thread-safe and need no further -application-level locking to be accessed from multiple threads. -Most refcounting functions such as g_object_ref() are also thread-safe.

-

A common use for GThreads is to move a long-running blocking operation out -of the main thread and into a worker thread. For GLib functions, such as -single GIO operations, this is not necessary, and complicates the code. -Instead, the _async() version of the function should be used from the main -thread, eliminating the need for locking and synchronisation between multiple -threads. If an operation does need to be moved to a worker thread, consider -using g_task_run_in_thread(), or a GThreadPool. GThreadPool is often a -better choice than GThread, as it handles thread reuse and task queueing; -GTask uses this internally.

-

However, if multiple blocking operations need to be performed in sequence, -and it is not possible to use GTask for them, moving them to a worker thread -can clarify the code.

-
-
-

Functions

-
-

GThreadFunc ()

-
gpointer
-(*GThreadFunc) (gpointer data);
-

Specifies the type of the func - functions passed to g_thread_new() -or g_thread_try_new().

-
-

Parameters

-
----- - - - - - -

data

data passed to the thread

 
-
-
-

Returns

-

the return value of the thread

-
-
-
-
-

g_thread_new ()

-
GThread *
-g_thread_new (const gchar *name,
-              GThreadFunc func,
-              gpointer data);
-

This function creates a new thread. The new thread starts by invoking -func - with the argument data. The thread will run until func - returns -or until g_thread_exit() is called from the new thread. The return value -of func - becomes the return value of the thread, which can be obtained -with g_thread_join().

-

The name - can be useful for discriminating threads in a debugger. -It is not used for other purposes and does not have to be unique. -Some systems restrict the length of name - to 16 bytes.

-

If the thread can not be created the program aborts. See -g_thread_try_new() if you want to attempt to deal with failures.

-

If you are using threads to offload (potentially many) short-lived tasks, -GThreadPool may be more appropriate than manually spawning and tracking -multiple GThreads.

-

To free the struct returned by this function, use g_thread_unref(). -Note that g_thread_join() implicitly unrefs the GThread as well.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

name

an (optional) name for the new thread.

[nullable]

func

a function to execute in the new thread

 

data

an argument to supply to the new thread

 
-
-
-

Returns

-

the new GThread

-
-

Since: 2.32

-
-
-
-

g_thread_try_new ()

-
GThread *
-g_thread_try_new (const gchar *name,
-                  GThreadFunc func,
-                  gpointer data,
-                  GError **error);
-

This function is the same as g_thread_new() except that -it allows for the possibility of failure.

-

If a thread can not be created (due to resource limits), -error - is set and NULL is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

name

an (optional) name for the new thread.

[nullable]

func

a function to execute in the new thread

 

data

an argument to supply to the new thread

 

error

return location for error, or NULL

 
-
-
-

Returns

-

the new GThread, or NULL if an error occurred

-
-

Since: 2.32

-
-
-
-

g_thread_ref ()

-
GThread *
-g_thread_ref (GThread *thread);
-

Increase the reference count on thread -.

-
-

Parameters

-
----- - - - - - -

thread

a GThread

 
-
-
-

Returns

-

a new reference to thread -

-
-

Since: 2.32

-
-
-
-

g_thread_unref ()

-
void
-g_thread_unref (GThread *thread);
-

Decrease the reference count on thread -, possibly freeing all -resources associated with it.

-

Note that each thread holds a reference to its GThread while -it is running, so it is safe to drop your own reference to it -if you don't need it anymore.

-
-

Parameters

-
----- - - - - - -

thread

a GThread

 
-
-

Since: 2.32

-
-
-
-

g_thread_join ()

-
gpointer
-g_thread_join (GThread *thread);
-

Waits until thread - finishes, i.e. the function func -, as -given to g_thread_new(), returns or g_thread_exit() is called. -If thread - has already terminated, then g_thread_join() -returns immediately.

-

Any thread can wait for any other thread by calling g_thread_join(), -not just its 'creator'. Calling g_thread_join() from multiple threads -for the same thread - leads to undefined behaviour.

-

The value returned by func - or given to g_thread_exit() is -returned by this function.

-

g_thread_join() consumes the reference to the passed-in thread -. -This will usually cause the GThread struct and associated resources -to be freed. Use g_thread_ref() to obtain an extra reference if you -want to keep the GThread alive beyond the g_thread_join() call.

-
-

Parameters

-
----- - - - - - -

thread

a GThread

 
-
-
-

Returns

-

the return value of the thread

-
-
-
-
-

g_thread_yield ()

-
void
-g_thread_yield ();
-

Causes the calling thread to voluntarily relinquish the CPU, so -that other threads can run.

-

This function is often used as a method to make busy wait less evil.

-
-
-
-

g_thread_exit ()

-
void
-g_thread_exit (gpointer retval);
-

Terminates the current thread.

-

If another thread is waiting for us using g_thread_join() then the -waiting thread will be woken up and get retval - as the return value -of g_thread_join().

-

Calling g_thread_exit() with a parameter retval - is equivalent to -returning retval - from the function func -, as given to g_thread_new().

-

You must only call g_thread_exit() from a thread that you created -yourself with g_thread_new() or related APIs. You must not call -this function from a thread created with another threading library -or or from within a GThreadPool.

-
-

Parameters

-
----- - - - - - -

retval

the return value of this thread

 
-
-
-
-
-

g_thread_self ()

-
GThread *
-g_thread_self (void);
-

This function returns the GThread corresponding to the -current thread. Note that this function does not increase -the reference count of the returned struct.

-

This function will return a GThread even for threads that -were not created by GLib (i.e. those created by other threading -APIs). This may be useful for thread identification purposes -(i.e. comparisons) but you must not use GLib functions (such -as g_thread_join()) on these threads.

-
-

Returns

-

the GThread representing the current thread

-
-
-
-
-

g_mutex_init ()

-
void
-g_mutex_init (GMutex *mutex);
-

Initializes a GMutex so that it can be used.

-

This function is useful to initialize a mutex that has been -allocated on the stack, or as part of a larger structure. -It is not necessary to initialize a mutex that has been -statically allocated.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
typedef struct {
-  GMutex m;
-  ...
-} Blob;
-
-Blob *b;
-
-b = g_new (Blob, 1);
-g_mutex_init (&b->m);
-
- -

-

To undo the effect of g_mutex_init() when a mutex is no longer -needed, use g_mutex_clear().

-

Calling g_mutex_init() on an already initialized GMutex leads -to undefined behaviour.

-
-

Parameters

-
----- - - - - - -

mutex

an uninitialized GMutex

 
-
-

Since: 2.32

-
-
-
-

g_mutex_clear ()

-
void
-g_mutex_clear (GMutex *mutex);
-

Frees the resources allocated to a mutex with g_mutex_init().

-

This function should not be used with a GMutex that has been -statically allocated.

-

Calling g_mutex_clear() on a locked mutex leads to undefined -behaviour.

-

Sine: 2.32

-
-

Parameters

-
----- - - - - - -

mutex

an initialized GMutex

 
-
-
-
-
-

g_mutex_lock ()

-
void
-g_mutex_lock (GMutex *mutex);
-

Locks mutex -. If mutex - is already locked by another thread, the -current thread will block until mutex - is unlocked by the other -thread.

-

GMutex is neither guaranteed to be recursive nor to be -non-recursive. As such, calling g_mutex_lock() on a GMutex that has -already been locked by the same thread results in undefined behaviour -(including but not limited to deadlocks).

-
-

Parameters

-
----- - - - - - -

mutex

a GMutex

 
-
-
-
-
-

g_mutex_trylock ()

-
gboolean
-g_mutex_trylock (GMutex *mutex);
-

Tries to lock mutex -. If mutex - is already locked by another thread, -it immediately returns FALSE. Otherwise it locks mutex - and returns -TRUE.

-

GMutex is neither guaranteed to be recursive nor to be -non-recursive. As such, calling g_mutex_lock() on a GMutex that has -already been locked by the same thread results in undefined behaviour -(including but not limited to deadlocks or arbitrary return values).

-
-

Parameters

-
----- - - - - - -

mutex

a GMutex

 
-
-
-

Returns

-

TRUE if mutex -could be locked

-
-
-
-
-

g_mutex_unlock ()

-
void
-g_mutex_unlock (GMutex *mutex);
-

Unlocks mutex -. If another thread is blocked in a g_mutex_lock() -call for mutex -, it will become unblocked and can lock mutex - itself.

-

Calling g_mutex_unlock() on a mutex that is not locked by the -current thread leads to undefined behaviour.

-
-

Parameters

-
----- - - - - - -

mutex

a GMutex

 
-
-
-
-
-

g_mutex_locker_new ()

-
GMutexLocker *
-g_mutex_locker_new (GMutex *mutex);
-

Lock mutex - and return a new GMutexLocker. Unlock with -g_mutex_locker_free(). Using g_mutex_unlock() on mutex - -while a GMutexLocker exists can lead to undefined behaviour.

-

This is intended to be used with g_autoptr(). Note that g_autoptr() -is only available when using GCC or clang, so the following example -will only work with those compilers:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
typedef struct
-{
-  ...
-  GMutex mutex;
-  ...
-} MyObject;
-
-static void
-my_object_do_stuff (MyObject *self)
-{
-  g_autoptr(GMutexLocker) locker = g_mutex_locker_new (&self->mutex);
-
-  // Code with mutex locked here
-
-  if (cond)
-    // No need to unlock
-    return;
-
-  // Optionally early unlock
-  g_clear_pointer (&locker, g_mutex_locker_free);
-
-  // Code with mutex unlocked here
-}
-
- -

-
-

Parameters

-
----- - - - - - -

mutex

a mutex to lock

 
-
-
-

Returns

-

a GMutexLocker

-
-

Since: 2.44

-
-
-
-

g_mutex_locker_free ()

-
void
-g_mutex_locker_free (GMutexLocker *locker);
-

Unlock locker -'s mutex. See g_mutex_locker_new() for details.

-
-

Parameters

-
----- - - - - - -

locker

a GMutexLocker

 
-
-

Since: 2.44

-
-
-
-

G_LOCK_DEFINE()

-
#define G_LOCK_DEFINE(name)    
-
-

The G_LOCK_ macros provide a convenient interface to GMutex. -G_LOCK_DEFINE defines a lock. It can appear in any place where -variable definitions may appear in programs, i.e. in the first block -of a function or outside of functions. The name - parameter will be -mangled to get the name of the GMutex. This means that you -can use names of existing variables as the parameter - e.g. the name -of the variable you intend to protect with the lock. Look at our -give_me_next_number() example using the G_LOCK macros:

-

Here is an example for using the G_LOCK convenience macros:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
G_LOCK_DEFINE (current_number);
-
-int
-give_me_next_number (void)
-{
-  static int current_number = 0;
-  int ret_val;
-
-  G_LOCK (current_number);
-  ret_val = current_number = calc_next_number (current_number);
-  G_UNLOCK (current_number);
-
-  return ret_val;
-}
-
- -

-
-

Parameters

-
----- - - - - - -

name

the name of the lock

 
-
-
-
-
-

G_LOCK_DEFINE_STATIC()

-
#define G_LOCK_DEFINE_STATIC(name)
-
-

This works like G_LOCK_DEFINE, but it creates a static object.

-
-

Parameters

-
----- - - - - - -

name

the name of the lock

 
-
-
-
-
-

G_LOCK_EXTERN()

-
#define G_LOCK_EXTERN(name)    
-
-

This declares a lock, that is defined with G_LOCK_DEFINE in another -module.

-
-

Parameters

-
----- - - - - - -

name

the name of the lock

 
-
-
-
-
-

G_LOCK()

-
#define G_LOCK(name)
-
-

Works like g_mutex_lock(), but for a lock defined with -G_LOCK_DEFINE.

-
-

Parameters

-
----- - - - - - -

name

the name of the lock

 
-
-
-
-
-

G_TRYLOCK()

-
#define G_TRYLOCK(name)
-
-

Works like g_mutex_trylock(), but for a lock defined with -G_LOCK_DEFINE.

-
-

Parameters

-
----- - - - - - -

name

the name of the lock

 
-
-
-

Returns

-

TRUE, if the lock could be locked.

-
-
-
-
-

G_UNLOCK()

-
#define G_UNLOCK(name)
-
-

Works like g_mutex_unlock(), but for a lock defined with -G_LOCK_DEFINE.

-
-

Parameters

-
----- - - - - - -

name

the name of the lock

 
-
-
-
-
-

g_rec_mutex_init ()

-
void
-g_rec_mutex_init (GRecMutex *rec_mutex);
-

Initializes a GRecMutex so that it can be used.

-

This function is useful to initialize a recursive mutex -that has been allocated on the stack, or as part of a larger -structure.

-

It is not necessary to initialise a recursive mutex that has been -statically allocated.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
typedef struct {
-  GRecMutex m;
-  ...
-} Blob;
-
-Blob *b;
-
-b = g_new (Blob, 1);
-g_rec_mutex_init (&b->m);
-
- -

-

Calling g_rec_mutex_init() on an already initialized GRecMutex -leads to undefined behaviour.

-

To undo the effect of g_rec_mutex_init() when a recursive mutex -is no longer needed, use g_rec_mutex_clear().

-
-

Parameters

-
----- - - - - - -

rec_mutex

an uninitialized GRecMutex

 
-
-

Since: 2.32

-
-
-
-

g_rec_mutex_clear ()

-
void
-g_rec_mutex_clear (GRecMutex *rec_mutex);
-

Frees the resources allocated to a recursive mutex with -g_rec_mutex_init().

-

This function should not be used with a GRecMutex that has been -statically allocated.

-

Calling g_rec_mutex_clear() on a locked recursive mutex leads -to undefined behaviour.

-

Sine: 2.32

-
-

Parameters

-
----- - - - - - -

rec_mutex

an initialized GRecMutex

 
-
-
-
-
-

g_rec_mutex_lock ()

-
void
-g_rec_mutex_lock (GRecMutex *rec_mutex);
-

Locks rec_mutex -. If rec_mutex - is already locked by another -thread, the current thread will block until rec_mutex - is -unlocked by the other thread. If rec_mutex - is already locked -by the current thread, the 'lock count' of rec_mutex - is increased. -The mutex will only become available again when it is unlocked -as many times as it has been locked.

-
-

Parameters

-
----- - - - - - -

rec_mutex

a GRecMutex

 
-
-

Since: 2.32

-
-
-
-

g_rec_mutex_trylock ()

-
gboolean
-g_rec_mutex_trylock (GRecMutex *rec_mutex);
-

Tries to lock rec_mutex -. If rec_mutex - is already locked -by another thread, it immediately returns FALSE. Otherwise -it locks rec_mutex - and returns TRUE.

-
-

Parameters

-
----- - - - - - -

rec_mutex

a GRecMutex

 
-
-
-

Returns

-

TRUE if rec_mutex -could be locked

-
-

Since: 2.32

-
-
-
-

g_rec_mutex_unlock ()

-
void
-g_rec_mutex_unlock (GRecMutex *rec_mutex);
-

Unlocks rec_mutex -. If another thread is blocked in a -g_rec_mutex_lock() call for rec_mutex -, it will become unblocked -and can lock rec_mutex - itself.

-

Calling g_rec_mutex_unlock() on a recursive mutex that is not -locked by the current thread leads to undefined behaviour.

-
-

Parameters

-
----- - - - - - -

rec_mutex

a GRecMutex

 
-
-

Since: 2.32

-
-
-
-

g_rw_lock_init ()

-
void
-g_rw_lock_init (GRWLock *rw_lock);
-

Initializes a GRWLock so that it can be used.

-

This function is useful to initialize a lock that has been -allocated on the stack, or as part of a larger structure. It is not -necessary to initialise a reader-writer lock that has been statically -allocated.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
typedef struct {
-  GRWLock l;
-  ...
-} Blob;
-
-Blob *b;
-
-b = g_new (Blob, 1);
-g_rw_lock_init (&b->l);
-
- -

-

To undo the effect of g_rw_lock_init() when a lock is no longer -needed, use g_rw_lock_clear().

-

Calling g_rw_lock_init() on an already initialized GRWLock leads -to undefined behaviour.

-
-

Parameters

-
----- - - - - - -

rw_lock

an uninitialized GRWLock

 
-
-

Since: 2.32

-
-
-
-

g_rw_lock_clear ()

-
void
-g_rw_lock_clear (GRWLock *rw_lock);
-

Frees the resources allocated to a lock with g_rw_lock_init().

-

This function should not be used with a GRWLock that has been -statically allocated.

-

Calling g_rw_lock_clear() when any thread holds the lock -leads to undefined behaviour.

-

Sine: 2.32

-
-

Parameters

-
----- - - - - - -

rw_lock

an initialized GRWLock

 
-
-
-
-
-

g_rw_lock_writer_lock ()

-
void
-g_rw_lock_writer_lock (GRWLock *rw_lock);
-

Obtain a write lock on rw_lock -. If any thread already holds -a read or write lock on rw_lock -, the current thread will block -until all other threads have dropped their locks on rw_lock -.

-
-

Parameters

-
----- - - - - - -

rw_lock

a GRWLock

 
-
-

Since: 2.32

-
-
-
-

g_rw_lock_writer_trylock ()

-
gboolean
-g_rw_lock_writer_trylock (GRWLock *rw_lock);
-

Tries to obtain a write lock on rw_lock -. If any other thread holds -a read or write lock on rw_lock -, it immediately returns FALSE. -Otherwise it locks rw_lock - and returns TRUE.

-
-

Parameters

-
----- - - - - - -

rw_lock

a GRWLock

 
-
-
-

Returns

-

TRUE if rw_lock -could be locked

-
-

Since: 2.32

-
-
-
-

g_rw_lock_writer_unlock ()

-
void
-g_rw_lock_writer_unlock (GRWLock *rw_lock);
-

Release a write lock on rw_lock -.

-

Calling g_rw_lock_writer_unlock() on a lock that is not held -by the current thread leads to undefined behaviour.

-
-

Parameters

-
----- - - - - - -

rw_lock

a GRWLock

 
-
-

Since: 2.32

-
-
-
-

g_rw_lock_reader_lock ()

-
void
-g_rw_lock_reader_lock (GRWLock *rw_lock);
-

Obtain a read lock on rw_lock -. If another thread currently holds -the write lock on rw_lock - or blocks waiting for it, the current -thread will block. Read locks can be taken recursively.

-

It is implementation-defined how many threads are allowed to -hold read locks on the same lock simultaneously.

-
-

Parameters

-
----- - - - - - -

rw_lock

a GRWLock

 
-
-

Since: 2.32

-
-
-
-

g_rw_lock_reader_trylock ()

-
gboolean
-g_rw_lock_reader_trylock (GRWLock *rw_lock);
-

Tries to obtain a read lock on rw_lock - and returns TRUE if -the read lock was successfully obtained. Otherwise it -returns FALSE.

-
-

Parameters

-
----- - - - - - -

rw_lock

a GRWLock

 
-
-
-

Returns

-

TRUE if rw_lock -could be locked

-
-

Since: 2.32

-
-
-
-

g_rw_lock_reader_unlock ()

-
void
-g_rw_lock_reader_unlock (GRWLock *rw_lock);
-

Release a read lock on rw_lock -.

-

Calling g_rw_lock_reader_unlock() on a lock that is not held -by the current thread leads to undefined behaviour.

-
-

Parameters

-
----- - - - - - -

rw_lock

a GRWLock

 
-
-

Since: 2.32

-
-
-
-

g_cond_init ()

-
void
-g_cond_init (GCond *cond);
-

Initialises a GCond so that it can be used.

-

This function is useful to initialise a GCond that has been -allocated as part of a larger structure. It is not necessary to -initialise a GCond that has been statically allocated.

-

To undo the effect of g_cond_init() when a GCond is no longer -needed, use g_cond_clear().

-

Calling g_cond_init() on an already-initialised GCond leads -to undefined behaviour.

-
-

Parameters

-
----- - - - - - -

cond

an uninitialized GCond

 
-
-

Since: 2.32

-
-
-
-

g_cond_clear ()

-
void
-g_cond_clear (GCond *cond);
-

Frees the resources allocated to a GCond with g_cond_init().

-

This function should not be used with a GCond that has been -statically allocated.

-

Calling g_cond_clear() for a GCond on which threads are -blocking leads to undefined behaviour.

-
-

Parameters

-
----- - - - - - -

cond

an initialised GCond

 
-
-

Since: 2.32

-
-
-
-

g_cond_wait ()

-
void
-g_cond_wait (GCond *cond,
-             GMutex *mutex);
-

Atomically releases mutex - and waits until cond - is signalled. -When this function returns, mutex - is locked again and owned by the -calling thread.

-

When using condition variables, it is possible that a spurious wakeup -may occur (ie: g_cond_wait() returns even though g_cond_signal() was -not called). It's also possible that a stolen wakeup may occur. -This is when g_cond_signal() is called, but another thread acquires -mutex - before this thread and modifies the state of the program in -such a way that when g_cond_wait() is able to return, the expected -condition is no longer met.

-

For this reason, g_cond_wait() must always be used in a loop. See -the documentation for GCond for a complete example.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cond

a GCond

 

mutex

a GMutex that is currently locked

 
-
-
-
-
-

g_cond_timed_wait ()

-
gboolean
-g_cond_timed_wait (GCond *cond,
-                   GMutex *mutex,
-                   GTimeVal *abs_time);
-
-

g_cond_timed_wait has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_cond_wait_until() instead.

-
-

Waits until this thread is woken up on cond -, but not longer than -until the time specified by abs_time -. The mutex - is unlocked before -falling asleep and locked again before resuming.

-

If abs_time - is NULL, g_cond_timed_wait() acts like g_cond_wait().

-

This function can be used even if g_thread_init() has not yet been -called, and, in that case, will immediately return TRUE.

-

To easily calculate abs_time - a combination of g_get_current_time() -and g_time_val_add() can be used.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cond

a GCond

 

mutex

a GMutex that is currently locked

 

abs_time

a GTimeVal, determining the final time

 
-
-
-

Returns

-

TRUE if cond -was signalled, or FALSE on timeout

-
-
-
-
-

g_cond_wait_until ()

-
gboolean
-g_cond_wait_until (GCond *cond,
-                   GMutex *mutex,
-                   gint64 end_time);
-

Waits until either cond - is signalled or end_time - has passed.

-

As with g_cond_wait() it is possible that a spurious or stolen wakeup -could occur. For that reason, waiting on a condition variable should -always be in a loop, based on an explicitly-checked predicate.

-

TRUE is returned if the condition variable was signalled (or in the -case of a spurious wakeup). FALSE is returned if end_time - has -passed.

-

The following code shows how to correctly perform a timed wait on a -condition variable (extending the example presented in the -documentation for GCond):

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
gpointer
-pop_data_timed (void)
-{
-  gint64 end_time;
-  gpointer data;
-
-  g_mutex_lock (&data_mutex);
-
-  end_time = g_get_monotonic_time () + 5 * G_TIME_SPAN_SECOND;
-  while (!current_data)
-    if (!g_cond_wait_until (&data_cond, &data_mutex, end_time))
-      {
-        // timeout has passed.
-        g_mutex_unlock (&data_mutex);
-        return NULL;
-      }
-
-  // there is data for us
-  data = current_data;
-  current_data = NULL;
-
-  g_mutex_unlock (&data_mutex);
-
-  return data;
-}
-
- -

-

Notice that the end time is calculated once, before entering the -loop and reused. This is the motivation behind the use of absolute -time on this API -- if a relative time of 5 seconds were passed -directly to the call and a spurious wakeup occurred, the program would -have to start over waiting again (which would lead to a total wait -time of more than 5 seconds).

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

cond

a GCond

 

mutex

a GMutex that is currently locked

 

end_time

the monotonic time to wait until

 
-
-
-

Returns

-

TRUE on a signal, FALSE on a timeout

-
-

Since: 2.32

-
-
-
-

g_cond_signal ()

-
void
-g_cond_signal (GCond *cond);
-

If threads are waiting for cond -, at least one of them is unblocked. -If no threads are waiting for cond -, this function has no effect. -It is good practice to hold the same lock as the waiting thread -while calling this function, though not required.

-
-

Parameters

-
----- - - - - - -

cond

a GCond

 
-
-
-
-
-

g_cond_broadcast ()

-
void
-g_cond_broadcast (GCond *cond);
-

If threads are waiting for cond -, all of them are unblocked. -If no threads are waiting for cond -, this function has no effect. -It is good practice to lock the same mutex as the waiting threads -while calling this function, though not required.

-
-

Parameters

-
----- - - - - - -

cond

a GCond

 
-
-
-
-
-

G_PRIVATE_INIT()

-
#define G_PRIVATE_INIT(notify)
-
-

A macro to assist with the static initialisation of a GPrivate.

-

This macro is useful for the case that a GDestroyNotify function -should be associated the key. This is needed when the key will be -used to point at memory that should be deallocated when the thread -exits.

-

Additionally, the GDestroyNotify will also be called on the previous -value stored in the key when g_private_replace() is used.

-

If no GDestroyNotify is needed, then use of this macro is not -required -- if the GPrivate is declared in static scope then it will -be properly initialised by default (ie: to all zeros). See the -examples below.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
static GPrivate name_key = G_PRIVATE_INIT (g_free);
-
-// return value should not be freed
-const gchar *
-get_local_name (void)
-{
-  return g_private_get (&name_key);
-}
-
-void
-set_local_name (const gchar *name)
-{
-  g_private_replace (&name_key, g_strdup (name));
-}
-
-
-static GPrivate count_key;   // no free function
-
-gint
-get_local_count (void)
-{
-  return GPOINTER_TO_INT (g_private_get (&count_key));
-}
-
-void
-set_local_count (gint count)
-{
-  g_private_set (&count_key, GINT_TO_POINTER (count));
-}
-
- -

-
-

Parameters

-
----- - - - - - -

notify

a GDestroyNotify

 
-
-

Since: 2.32

-
-
-
-

g_private_get ()

-
gpointer
-g_private_get (GPrivate *key);
-

Returns the current value of the thread local variable key -.

-

If the value has not yet been set in this thread, NULL is returned. -Values are never copied between threads (when a new thread is -created, for example).

-
-

Parameters

-
----- - - - - - -

key

a GPrivate

 
-
-
-

Returns

-

the thread-local value

-
-
-
-
-

g_private_set ()

-
void
-g_private_set (GPrivate *key,
-               gpointer value);
-

Sets the thread local variable key - to have the value value - in the -current thread.

-

This function differs from g_private_replace() in the following way: -the GDestroyNotify for key - is not called on the old value.

-
-

Parameters

-
----- - - - - - - - - - - - - -

key

a GPrivate

 

value

the new value

 
-
-
-
-
-

g_private_replace ()

-
void
-g_private_replace (GPrivate *key,
-                   gpointer value);
-

Sets the thread local variable key - to have the value value - in the -current thread.

-

This function differs from g_private_set() in the following way: if -the previous value was non-NULL then the GDestroyNotify handler for -key - is run on it.

-
-

Parameters

-
----- - - - - - - - - - - - - -

key

a GPrivate

 

value

the new value

 
-
-

Since: 2.32

-
-
-
-

g_once()

-
#define             g_once(once, func, arg)
-

The first call to this routine by a process with a given GOnce -struct calls func - with the given argument. Thereafter, subsequent -calls to g_once() with the same GOnce struct do not call func - -again, but return the stored result of the first call. On return -from g_once(), the status of once - will be G_ONCE_STATUS_READY.

-

For example, a mutex or a thread-specific data key must be created -exactly once. In a threaded environment, calling g_once() ensures -that the initialization is serialized across multiple threads.

-

Calling g_once() recursively on the same GOnce struct in -func - will lead to a deadlock.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
gpointer
-get_debug_flags (void)
-{
-  static GOnce my_once = G_ONCE_INIT;
-
-  g_once (&my_once, parse_debug_flags, NULL);
-
-  return my_once.retval;
-}
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

once

a GOnce structure

 

func

the GThreadFunc function associated to once -. This function -is called only once, regardless of the number of times it and -its associated GOnce struct are passed to g_once().

 

arg

data to be passed to func -

 
-
-

Since: 2.4

-
-
-
-

g_once_init_enter ()

-
gboolean
-g_once_init_enter (volatile void *location);
-

Function to be called when starting a critical initialization -section. The argument location - must point to a static -0-initialized variable that will be set to a value other than 0 at -the end of the initialization section. In combination with -g_once_init_leave() and the unique address value_location -, it can -be ensured that an initialization section will be executed only once -during a program's life time, and that concurrent threads are -blocked until initialization completed. To be used in constructs -like this:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
static gsize initialization_value = 0;
-
-if (g_once_init_enter (&initialization_value))
-  {
-    gsize setup_value = 42; // initialization code here
-
-    g_once_init_leave (&initialization_value, setup_value);
-  }
-
-// use initialization_value here
-
- -

-
-

Parameters

-
----- - - - - - -

location

location of a static initializable variable -containing 0.

[not nullable]
-
-
-

Returns

-

TRUE if the initialization section should be entered, -FALSE and blocks otherwise

-
-

Since: 2.14

-
-
-
-

g_once_init_leave ()

-
void
-g_once_init_leave (volatile void *location,
-                   gsize result);
-

Counterpart to g_once_init_enter(). Expects a location of a static -0-initialized initialization variable, and an initialization value -other than 0. Sets the variable to the initialization value, and -releases concurrent threads blocking in g_once_init_enter() on this -initialization variable.

-
-

Parameters

-
----- - - - - - - - - - - - - -

location

location of a static initializable variable -containing 0.

[not nullable]

result

new non-0 value for *value_location -

 
-
-

Since: 2.14

-
-
-
-

g_bit_lock ()

-
void
-g_bit_lock (volatile gint *address,
-            gint lock_bit);
-

Sets the indicated lock_bit - in address -. If the bit is already -set, this call will block until g_bit_unlock() unsets the -corresponding bit.

-

Attempting to lock on two different bits within the same integer is -not supported and will very probably cause deadlocks.

-

The value of the bit that is set is (1u << bit -). If bit - is not -between 0 and 31 then the result is undefined.

-

This function accesses address - atomically. All other accesses to -address - must be atomic in order for this function to work -reliably.

-
-

Parameters

-
----- - - - - - - - - - - - - -

address

a pointer to an integer

 

lock_bit

a bit value between 0 and 31

 
-
-

Since: 2.24

-
-
-
-

g_bit_trylock ()

-
gboolean
-g_bit_trylock (volatile gint *address,
-               gint lock_bit);
-

Sets the indicated lock_bit - in address -, returning TRUE if -successful. If the bit is already set, returns FALSE immediately.

-

Attempting to lock on two different bits within the same integer is -not supported.

-

The value of the bit that is set is (1u << bit -). If bit - is not -between 0 and 31 then the result is undefined.

-

This function accesses address - atomically. All other accesses to -address - must be atomic in order for this function to work -reliably.

-
-

Parameters

-
----- - - - - - - - - - - - - -

address

a pointer to an integer

 

lock_bit

a bit value between 0 and 31

 
-
-
-

Returns

-

TRUE if the lock was acquired

-
-

Since: 2.24

-
-
-
-

g_bit_unlock ()

-
void
-g_bit_unlock (volatile gint *address,
-              gint lock_bit);
-

Clears the indicated lock_bit - in address -. If another thread is -currently blocked in g_bit_lock() on this same bit then it will be -woken up.

-

This function accesses address - atomically. All other accesses to -address - must be atomic in order for this function to work -reliably.

-
-

Parameters

-
----- - - - - - - - - - - - - -

address

a pointer to an integer

 

lock_bit

a bit value between 0 and 31

 
-
-

Since: 2.24

-
-
-
-

g_pointer_bit_lock ()

-
void
-g_pointer_bit_lock (volatile void *address,
-                    gint lock_bit);
-

This is equivalent to g_bit_lock, but working on pointers (or other -pointer-sized values).

-

For portability reasons, you may only lock on the bottom 32 bits of -the pointer.

-
-

Parameters

-
----- - - - - - - - - - - - - -

address

a pointer to a gpointer-sized value.

[not nullable]

lock_bit

a bit value between 0 and 31

 
-
-

Since: 2.30

-
-
-
-

g_pointer_bit_trylock ()

-
gboolean
-g_pointer_bit_trylock (volatile void *address,
-                       gint lock_bit);
-

This is equivalent to g_bit_trylock, but working on pointers (or -other pointer-sized values).

-

For portability reasons, you may only lock on the bottom 32 bits of -the pointer.

-
-

Parameters

-
----- - - - - - - - - - - - - -

address

a pointer to a gpointer-sized value.

[not nullable]

lock_bit

a bit value between 0 and 31

 
-
-
-

Returns

-

TRUE if the lock was acquired

-
-

Since: 2.30

-
-
-
-

g_pointer_bit_unlock ()

-
void
-g_pointer_bit_unlock (volatile void *address,
-                      gint lock_bit);
-

This is equivalent to g_bit_unlock, but working on pointers (or other -pointer-sized values).

-

For portability reasons, you may only lock on the bottom 32 bits of -the pointer.

-
-

Parameters

-
----- - - - - - - - - - - - - -

address

a pointer to a gpointer-sized value.

[not nullable]

lock_bit

a bit value between 0 and 31

 
-
-

Since: 2.30

-
-
-
-

g_get_num_processors ()

-
guint
-g_get_num_processors (void);
-

Determine the approximate number of threads that the system will -schedule simultaneously for this process. This is intended to be -used as a parameter to g_thread_pool_new() for CPU bound tasks and -similar cases.

-
-

Returns

-

Number of schedulable threads, always greater than 0

-
-

Since: 2.36

-
-
-
-

Types and Values

-
-

G_THREAD_ERROR

-
#define G_THREAD_ERROR g_thread_error_quark ()
-
-

The error domain of the GLib thread subsystem.

-
-
-
-

enum GThreadError

-

Possible errors of thread related functions.

-
-

Members

-
----- - - - - - -

G_THREAD_ERROR_AGAIN

-

a thread couldn't be created due to resource - shortage. Try again later.

-
 
-
-
-
-
-

GThread

-
typedef struct {
-} GThread;
-
-

The GThread struct represents a running thread. This struct -is returned by g_thread_new() or g_thread_try_new(). You can -obtain the GThread struct representing the current thread by -calling g_thread_self().

-

GThread is refcounted, see g_thread_ref() and g_thread_unref(). -The thread represented by it holds a reference while it is running, -and g_thread_join() consumes the reference that it is given, so -it is normally not necessary to manage GThread references -explicitly.

-

The structure is opaque -- none of its fields may be directly -accessed.

-
-
-
-

union GMutex

-

The GMutex struct is an opaque data structure to represent a mutex -(mutual exclusion). It can be used to protect data against shared -access.

-

Take for example the following function:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
int
-give_me_next_number (void)
-{
-  static int current_number = 0;
-
-  // now do a very complicated calculation to calculate the new
-  // number, this might for example be a random number generator
-  current_number = calc_next_number (current_number);
-
-  return current_number;
-}
-
- -

-It is easy to see that this won't work in a multi-threaded -application. There current_number must be protected against shared -access. A GMutex can be used as a solution to this problem:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
int
-give_me_next_number (void)
-{
-  static GMutex mutex;
-  static int current_number = 0;
-  int ret_val;
-
-  g_mutex_lock (&mutex);
-  ret_val = current_number = calc_next_number (current_number);
-  g_mutex_unlock (&mutex);
-
-  return ret_val;
-}
-
- -

-Notice that the GMutex is not initialised to any particular value. -Its placement in static storage ensures that it will be initialised -to all-zeros, which is appropriate.

-

If a GMutex is placed in other contexts (eg: embedded in a struct) -then it must be explicitly initialised using g_mutex_init().

-

A GMutex should only be accessed via g_mutex_ functions.

-
-
-
-

GMutexLocker

-
typedef void GMutexLocker;
-
-

Opaque type. See g_mutex_locker_new() for details.

-

Since: 2.44

-
-
-
-

struct GRecMutex

-
struct GRecMutex {
-};
-
-

The GRecMutex struct is an opaque data structure to represent a -recursive mutex. It is similar to a GMutex with the difference -that it is possible to lock a GRecMutex multiple times in the same -thread without deadlock. When doing so, care has to be taken to -unlock the recursive mutex as often as it has been locked.

-

If a GRecMutex is allocated in static storage then it can be used -without initialisation. Otherwise, you should call -g_rec_mutex_init() on it and g_rec_mutex_clear() when done.

-

A GRecMutex should only be accessed with the -g_rec_mutex_ functions.

-

Since: 2.32

-
-
-
-

struct GRWLock

-
struct GRWLock {
-};
-
-

The GRWLock struct is an opaque data structure to represent a -reader-writer lock. It is similar to a GMutex in that it allows -multiple threads to coordinate access to a shared resource.

-

The difference to a mutex is that a reader-writer lock discriminates -between read-only ('reader') and full ('writer') access. While only -one thread at a time is allowed write access (by holding the 'writer' -lock via g_rw_lock_writer_lock()), multiple threads can gain -simultaneous read-only access (by holding the 'reader' lock via -g_rw_lock_reader_lock()).

-

Here is an example for an array with access functions:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
GRWLock lock;
-GPtrArray *array;
-
-gpointer
-my_array_get (guint index)
-{
-  gpointer retval = NULL;
-
-  if (!array)
-    return NULL;
-
-  g_rw_lock_reader_lock (&lock);
-  if (index < array->len)
-    retval = g_ptr_array_index (array, index);
-  g_rw_lock_reader_unlock (&lock);
-
-  return retval;
-}
-
-void
-my_array_set (guint index, gpointer data)
-{
-  g_rw_lock_writer_lock (&lock);
-
-  if (!array)
-    array = g_ptr_array_new ();
-
-  if (index >= array->len)
-    g_ptr_array_set_size (array, index+1);
-  g_ptr_array_index (array, index) = data;
-
-  g_rw_lock_writer_unlock (&lock);
-}
-
- -

-This example shows an array which can be accessed by many readers -(the my_array_get() function) simultaneously, whereas the writers -(the my_array_set() function) will only be allowed one at a time -and only if no readers currently access the array. This is because -of the potentially dangerous resizing of the array. Using these -functions is fully multi-thread safe now.

-

If a GRWLock is allocated in static storage then it can be used -without initialisation. Otherwise, you should call -g_rw_lock_init() on it and g_rw_lock_clear() when done.

-

A GRWLock should only be accessed with the g_rw_lock_ functions.

-

Since: 2.32

-
-
-
-

struct GCond

-
struct GCond {
-};
-
-

The GCond struct is an opaque data structure that represents a -condition. Threads can block on a GCond if they find a certain -condition to be false. If other threads change the state of this -condition they signal the GCond, and that causes the waiting -threads to be woken up.

-

Consider the following example of a shared variable. One or more -threads can wait for data to be published to the variable and when -another thread publishes the data, it can signal one of the waiting -threads to wake up to collect the data.

-

Here is an example for using GCond to block a thread until a condition -is satisfied:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
gpointer current_data = NULL;
-GMutex data_mutex;
-GCond data_cond;
-
-void
-push_data (gpointer data)
-{
-  g_mutex_lock (&data_mutex);
-  current_data = data;
-  g_cond_signal (&data_cond);
-  g_mutex_unlock (&data_mutex);
-}
-
-gpointer
-pop_data (void)
-{
-  gpointer data;
-
-  g_mutex_lock (&data_mutex);
-  while (!current_data)
-    g_cond_wait (&data_cond, &data_mutex);
-  data = current_data;
-  current_data = NULL;
-  g_mutex_unlock (&data_mutex);
-
-  return data;
-}
-
- -

-Whenever a thread calls pop_data() now, it will wait until -current_data is non-NULL, i.e. until some other thread -has called push_data().

-

The example shows that use of a condition variable must always be -paired with a mutex. Without the use of a mutex, there would be a -race between the check of current_data - by the while loop in -pop_data() and waiting. Specifically, another thread could set -current_data - after the check, and signal the cond (with nobody -waiting on it) before the first thread goes to sleep. GCond is -specifically useful for its ability to release the mutex and go -to sleep atomically.

-

It is also important to use the g_cond_wait() and g_cond_wait_until() -functions only inside a loop which checks for the condition to be -true. See g_cond_wait() for an explanation of why the condition may -not be true even after it returns.

-

If a GCond is allocated in static storage then it can be used -without initialisation. Otherwise, you should call g_cond_init() -on it and g_cond_clear() when done.

-

A GCond should only be accessed via the g_cond_ functions.

-
-
-
-

struct GPrivate

-
struct GPrivate {
-};
-
-

The GPrivate struct is an opaque data structure to represent a -thread-local data key. It is approximately equivalent to the -pthread_setspecific()/pthread_getspecific() APIs on POSIX and to -TlsSetValue()/TlsGetValue() on Windows.

-

If you don't already know why you might want this functionality, -then you probably don't need it.

-

GPrivate is a very limited resource (as far as 128 per program, -shared between all libraries). It is also not possible to destroy a -GPrivate after it has been used. As such, it is only ever acceptable -to use GPrivate in static scope, and even then sparingly so.

-

See G_PRIVATE_INIT() for a couple of examples.

-

The GPrivate structure should be considered opaque. It should only -be accessed via the g_private_ functions.

-
-
-
-

struct GOnce

-
struct GOnce {
-  volatile GOnceStatus status;
-  volatile gpointer retval;
-};
-
-

A GOnce struct controls a one-time initialization function. Any -one-time initialization function must have its own unique GOnce -struct.

-
-

Members

-
----- - - - - - - - - - - - - -

volatile GOnceStatus status;

the status of the GOnce

 

volatile gpointer retval;

the value returned by the call to the function, if status -is G_ONCE_STATUS_READY

 
-
-

Since: 2.4

-
-
-
-

enum GOnceStatus

-

The possible statuses of a one-time initialization function -controlled by a GOnce struct.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_ONCE_STATUS_NOTCALLED

-

the function has not been called yet.

-
 

G_ONCE_STATUS_PROGRESS

-

the function call is currently in progress.

-
 

G_ONCE_STATUS_READY

-

the function has been called.

-
 
-
-

Since: 2.4

-
-
-
-

G_ONCE_INIT

-
#define G_ONCE_INIT { G_ONCE_STATUS_NOTCALLED, NULL }
-
-

A GOnce must be initialized with this macro before it can be used.

-
- - - - - - - -
1
GOnce my_once = G_ONCE_INIT;
-
- -

-

Since: 2.4

-
-
-
-

See Also

-

GThreadPool, GAsyncQueue

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Timers.html b/docs/reference/glib/html/glib-Timers.html deleted file mode 100644 index 9705ef7cc..000000000 --- a/docs/reference/glib/html/glib-Timers.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - -Timers: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Timers

-

Timers — keep track of elapsed time

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GTimer * - -g_timer_new () -
-void - -g_timer_start () -
-void - -g_timer_stop () -
-void - -g_timer_continue () -
-gdouble - -g_timer_elapsed () -
-void - -g_timer_reset () -
-void - -g_timer_destroy () -
-
-
-

Types and Values

-
---- - - - - -
 GTimer
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GTimer records a start time, and counts microseconds elapsed since -that time. This is done somewhat differently on different platforms, -and can be tricky to get exactly right, so GTimer provides a -portable/convenient interface.

-
-
-

Functions

-
-

g_timer_new ()

-
GTimer *
-g_timer_new (void);
-

Creates a new timer, and starts timing (i.e. g_timer_start() is -implicitly called for you).

-
-

Returns

-

a new GTimer.

-
-
-
-
-

g_timer_start ()

-
void
-g_timer_start (GTimer *timer);
-

Marks a start time, so that future calls to g_timer_elapsed() will -report the time since g_timer_start() was called. g_timer_new() -automatically marks the start time, so no need to call -g_timer_start() immediately after creating the timer.

-
-

Parameters

-
----- - - - - - -

timer

a GTimer.

 
-
-
-
-
-

g_timer_stop ()

-
void
-g_timer_stop (GTimer *timer);
-

Marks an end time, so calls to g_timer_elapsed() will return the -difference between this end time and the start time.

-
-

Parameters

-
----- - - - - - -

timer

a GTimer.

 
-
-
-
-
-

g_timer_continue ()

-
void
-g_timer_continue (GTimer *timer);
-

Resumes a timer that has previously been stopped with -g_timer_stop(). g_timer_stop() must be called before using this -function.

-
-

Parameters

-
----- - - - - - -

timer

a GTimer.

 
-
-

Since: 2.4

-
-
-
-

g_timer_elapsed ()

-
gdouble
-g_timer_elapsed (GTimer *timer,
-                 gulong *microseconds);
-

If timer - has been started but not stopped, obtains the time since -the timer was started. If timer - has been stopped, obtains the -elapsed time between the time it was started and the time it was -stopped. The return value is the number of seconds elapsed, -including any fractional part. The microseconds - out parameter is -essentially useless.

-
-

Parameters

-
----- - - - - - - - - - - - - -

timer

a GTimer.

 

microseconds

return location for the fractional part of seconds -elapsed, in microseconds (that is, the total number -of microseconds elapsed, modulo 1000000), or NULL

 
-
-
-

Returns

-

seconds elapsed as a floating point value, including any -fractional part.

-
-
-
-
-

g_timer_reset ()

-
void
-g_timer_reset (GTimer *timer);
-

This function is useless; it's fine to call g_timer_start() on an -already-started timer to reset the start time, so g_timer_reset() -serves no purpose.

-
-

Parameters

-
----- - - - - - -

timer

a GTimer.

 
-
-
-
-
-

g_timer_destroy ()

-
void
-g_timer_destroy (GTimer *timer);
-

Destroys a timer, freeing associated resources.

-
-

Parameters

-
----- - - - - - -

timer

a GTimer to destroy.

 
-
-
-
-
-

Types and Values

-
-

GTimer

-
typedef struct _GTimer GTimer;
-

Opaque datatype that records a start time.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Trash-Stacks.html b/docs/reference/glib/html/glib-Trash-Stacks.html deleted file mode 100644 index 501241181..000000000 --- a/docs/reference/glib/html/glib-Trash-Stacks.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - -Trash Stacks: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Trash Stacks

-

Trash Stacks — maintain a stack of unused allocated memory chunks

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
-void - -g_trash_stack_push () -
-gpointer - -g_trash_stack_pop () -
-gpointer - -g_trash_stack_peek () -
-guint - -g_trash_stack_height () -
-
-
-

Types and Values

-
---- - - - - -
structGTrashStack
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

A GTrashStack is an efficient way to keep a stack of unused allocated -memory chunks. Each memory chunk is required to be large enough to hold -a gpointer. This allows the stack to be maintained without any space -overhead, since the stack pointers can be stored inside the memory chunks.

-

There is no function to create a GTrashStack. A NULL GTrashStack* -is a perfectly valid empty stack.

-

There is no longer any good reason to use GTrashStack. If you have -extra pieces of memory, free() them and allocate them again later.

-
-
-

Functions

-
-

g_trash_stack_push ()

-
void
-g_trash_stack_push (GTrashStack **stack_p,
-                    gpointer data_p);
-
-

g_trash_stack_push has been deprecated since version 2.48 and should not be used in newly-written code.

-

GTrashStack is deprecated without replacement

-
-

Pushes a piece of memory onto a GTrashStack.

-
-

Parameters

-
----- - - - - - - - - - - - - -

stack_p

a GTrashStack

 

data_p

the piece of memory to push on the stack.

[not nullable]
-
-
-
-
-

g_trash_stack_pop ()

-
gpointer
-g_trash_stack_pop (GTrashStack **stack_p);
-
-

g_trash_stack_pop has been deprecated since version 2.48 and should not be used in newly-written code.

-

GTrashStack is deprecated without replacement

-
-

Pops a piece of memory off a GTrashStack.

-
-

Parameters

-
----- - - - - - -

stack_p

a GTrashStack

 
-
-
-

Returns

-

the element at the top of the stack

-
-
-
-
-

g_trash_stack_peek ()

-
gpointer
-g_trash_stack_peek (GTrashStack **stack_p);
-
-

g_trash_stack_peek has been deprecated since version 2.48 and should not be used in newly-written code.

-

GTrashStack is deprecated without replacement

-
-

Returns the element at the top of a GTrashStack -which may be NULL.

-
-

Parameters

-
----- - - - - - -

stack_p

a GTrashStack

 
-
-
-

Returns

-

the element at the top of the stack

-
-
-
-
-

g_trash_stack_height ()

-
guint
-g_trash_stack_height (GTrashStack **stack_p);
-
-

g_trash_stack_height has been deprecated since version 2.48 and should not be used in newly-written code.

-

GTrashStack is deprecated without replacement

-
-

Returns the height of a GTrashStack.

-

Note that execution of this function is of O(N) complexity -where N denotes the number of items on the stack.

-
-

Parameters

-
----- - - - - - -

stack_p

a GTrashStack

 
-
-
-

Returns

-

the height of the stack

-
-
-
-
-

Types and Values

-
-

struct GTrashStack

-
struct GTrashStack {
-  GTrashStack *next;
-};
-
-
-

GTrashStack has been deprecated since version 2.48 and should not be used in newly-written code.

-

GTrashStack is deprecated without replacement

-
-

Each piece of memory that is pushed onto the stack -is cast to a GTrashStack*.

-
-

Members

-
----- - - - - - -

GTrashStack *next;

pointer to the previous element of the stack, -gets stored in the first sizeof (gpointer) -bytes of the element

 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Type-Conversion-Macros.html b/docs/reference/glib/html/glib-Type-Conversion-Macros.html deleted file mode 100644 index 0bc2ffac0..000000000 --- a/docs/reference/glib/html/glib-Type-Conversion-Macros.html +++ /dev/null @@ -1,308 +0,0 @@ - - - - -Type Conversion Macros: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Type Conversion Macros

-

Type Conversion Macros — portably storing integers in pointer variables

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -GINT_TO_POINTER() -
#define -GPOINTER_TO_INT() -
#define -GUINT_TO_POINTER() -
#define -GPOINTER_TO_UINT() -
#define -GSIZE_TO_POINTER() -
#define -GPOINTER_TO_SIZE() -
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

Many times GLib, GTK+, and other libraries allow you to pass "user -data" to a callback, in the form of a void pointer. From time to time -you want to pass an integer instead of a pointer. You could allocate -an integer, with something like:

-
- - - - - - - -
1
-2
int *ip = g_new (int, 1);
-*ip = 42;
-
- -

-But this is inconvenient, and it's annoying to have to free the -memory at some later time.

-

Pointers are always at least 32 bits in size (on all platforms GLib -intends to support). Thus you can store at least 32-bit integer values -in a pointer value. Naively, you might try this, but it's incorrect:

-
- - - - - - - -
1
-2
-3
-4
gpointer p;
-int i;
-p = (void*) 42;
-i = (int) p;
-
- -

-Again, that example was not correct, don't copy it. -The problem is that on some systems you need to do this:

-
- - - - - - - -
1
-2
-3
-4
gpointer p;
-int i;
-p = (void*) (long) 42;
-i = (int) (long) p;
-
- -

-The GLib macros GPOINTER_TO_INT(), GINT_TO_POINTER(), etc. take care -to do the right thing on the every platform.

-

Warning: You may not store pointers in integers. This is not -portable in any way, shape or form. These macros only allow storing -integers in pointers, and only preserve 32 bits of the integer; values -outside the range of a 32-bit integer will be mangled.

-
-
-

Functions

-
-

GINT_TO_POINTER()

-
#define GINT_TO_POINTER(i) ((gpointer) (glong) (i))
-
-

Stuffs an integer into a pointer type.

-

Remember, you may not store pointers in integers. This is not portable -in any way, shape or form. These macros only allow storing integers in -pointers, and only preserve 32 bits of the integer; values outside the -range of a 32-bit integer will be mangled.

-
-

Parameters

-
----- - - - - - -

i

integer to stuff into a pointer

 
-
-
-
-
-

GPOINTER_TO_INT()

-
#define GPOINTER_TO_INT(p) ((gint)  (glong) (p))
-
-

Extracts an integer from a pointer. The integer must have -been stored in the pointer with GINT_TO_POINTER().

-

Remember, you may not store pointers in integers. This is not portable -in any way, shape or form. These macros only allow storing integers in -pointers, and only preserve 32 bits of the integer; values outside the -range of a 32-bit integer will be mangled.

-
-

Parameters

-
----- - - - - - -

p

pointer containing an integer

 
-
-
-
-
-

GUINT_TO_POINTER()

-
#define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u))
-
-

Stuffs an unsigned integer into a pointer type.

-
-

Parameters

-
----- - - - - - -

u

unsigned integer to stuff into the pointer

 
-
-
-
-
-

GPOINTER_TO_UINT()

-
#define GPOINTER_TO_UINT(p) ((guint) (gulong) (p))
-
-

Extracts an unsigned integer from a pointer. The integer must have -been stored in the pointer with GUINT_TO_POINTER().

-
-

Parameters

-
----- - - - - - -

p

pointer to extract an unsigned integer from

 
-
-
-
-
-

GSIZE_TO_POINTER()

-
#define GSIZE_TO_POINTER(s) ((gpointer) (gsize) (s))
-
-

Stuffs a gsize into a pointer type.

-
-

Parameters

-
----- - - - - - -

s

gsize to stuff into the pointer

 
-
-
-
-
-

GPOINTER_TO_SIZE()

-
#define GPOINTER_TO_SIZE(p) ((gsize) (p))
-
-

Extracts a gsize from a pointer. The gsize must have -been stored in the pointer with GSIZE_TO_POINTER().

-
-

Parameters

-
----- - - - - - -

p

pointer to extract a gsize from

 
-
-
-
-
-

Types and Values

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-UNIX-specific-utilities-and-integration.html b/docs/reference/glib/html/glib-UNIX-specific-utilities-and-integration.html deleted file mode 100644 index 7c2b03a8d..000000000 --- a/docs/reference/glib/html/glib-UNIX-specific-utilities-and-integration.html +++ /dev/null @@ -1,616 +0,0 @@ - - - - -UNIX-specific utilities and integration: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

UNIX-specific utilities and integration

-

UNIX-specific utilities and integration — pipes, signal handling

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -g_unix_open_pipe () -
-gboolean - -g_unix_set_fd_nonblocking () -
-guint - -g_unix_signal_add () -
-guint - -g_unix_signal_add_full () -
-GSource * - -g_unix_signal_source_new () -
-gboolean - -(*GUnixFDSourceFunc) () -
-guint - -g_unix_fd_add () -
-guint - -g_unix_fd_add_full () -
-GSource * - -g_unix_fd_source_new () -
-
-
-

Types and Values

-
---- - - - - -
#defineG_UNIX_ERROR
-
-
-

Includes

-
#include <glib-unix.h>
-
-
-
-

Description

-

Most of GLib is intended to be portable; in contrast, this set of -functions is designed for programs which explicitly target UNIX, -or are using it to build higher level abstractions which would be -conditionally compiled if the platform matches G_OS_UNIX.

-

To use these functions, you must explicitly include the -"glib-unix.h" header.

-
-
-

Functions

-
-

g_unix_open_pipe ()

-
gboolean
-g_unix_open_pipe (gint *fds,
-                  gint flags,
-                  GError **error);
-

Similar to the UNIX pipe() call, but on modern systems like Linux -uses the pipe2() system call, which atomically creates a pipe with -the configured flags. The only supported flag currently is -FD_CLOEXEC. If for example you want to configure O_NONBLOCK, that -must still be done separately with fcntl().

-

This function does not take O_CLOEXEC, it takes FD_CLOEXEC as if -for fcntl(); these are different on Linux/glibc.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

fds

Array of two integers

 

flags

Bitfield of file descriptor flags, as for fcntl()

 

error

a GError

 
-
-
-

Returns

-

TRUE on success, FALSE if not (and errno will be set).

-
-

Since: 2.30

-
-
-
-

g_unix_set_fd_nonblocking ()

-
gboolean
-g_unix_set_fd_nonblocking (gint fd,
-                           gboolean nonblock,
-                           GError **error);
-

Control the non-blocking state of the given file descriptor, -according to nonblock -. On most systems this uses O_NONBLOCK, but -on some older ones may use O_NDELAY.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

fd

A file descriptor

 

nonblock

If TRUE, set the descriptor to be non-blocking

 

error

a GError

 
-
-
-

Returns

-

TRUE if successful

-
-

Since: 2.30

-
-
-
-

g_unix_signal_add ()

-
guint
-g_unix_signal_add (gint signum,
-                   GSourceFunc handler,
-                   gpointer user_data);
-

A convenience function for g_unix_signal_source_new(), which -attaches to the default GMainContext. You can remove the watch -using g_source_remove().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

signum

Signal number

 

handler

Callback

 

user_data

Data for handler -

 
-
-
-

Returns

-

An ID (greater than 0) for the event source

-
-

Since: 2.30

-
-
-
-

g_unix_signal_add_full ()

-
guint
-g_unix_signal_add_full (gint priority,
-                        gint signum,
-                        GSourceFunc handler,
-                        gpointer user_data,
-                        GDestroyNotify notify);
-

A convenience function for g_unix_signal_source_new(), which -attaches to the default GMainContext. You can remove the watch -using g_source_remove().

-

[rename-to g_unix_signal_add]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

priority

the priority of the signal source. Typically this will be in -the range between G_PRIORITY_DEFAULT and G_PRIORITY_HIGH.

 

signum

Signal number

 

handler

Callback

 

user_data

Data for handler -

 

notify

GDestroyNotify for handler -

 
-
-
-

Returns

-

An ID (greater than 0) for the event source

-
-

Since: 2.30

-
-
-
-

g_unix_signal_source_new ()

-
GSource *
-g_unix_signal_source_new (gint signum);
-

Create a GSource that will be dispatched upon delivery of the UNIX -signal signum -. In GLib versions before 2.36, only SIGHUP, SIGINT, -SIGTERM can be monitored. In GLib 2.36, SIGUSR1 and SIGUSR2 -were added.

-

Note that unlike the UNIX default, all sources which have created a -watch will be dispatched, regardless of which underlying thread -invoked g_unix_signal_source_new().

-

For example, an effective use of this function is to handle SIGTERM -cleanly; flushing any outstanding files, and then calling -g_main_loop_quit(). It is not safe to do any of this a regular -UNIX signal handler; your handler may be invoked while malloc() or -another library function is running, causing reentrancy if you -attempt to use it from the handler. None of the GLib/GObject API -is safe against this kind of reentrancy.

-

The interaction of this source when combined with native UNIX -functions like sigprocmask() is not defined.

-

The source will not initially be associated with any GMainContext -and must be added to one with g_source_attach() before it will be -executed.

-
-

Parameters

-
----- - - - - - -

signum

A signal number

 
-
-
-

Returns

-

A newly created GSource

-
-

Since: 2.30

-
-
-
-

GUnixFDSourceFunc ()

-
gboolean
-(*GUnixFDSourceFunc) (gint fd,
-                      GIOCondition condition,
-                      gpointer user_data);
-

The type of functions to be called when a UNIX fd watch source -triggers.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

fd

the fd that triggered the event

 

condition

the IO conditions reported on fd -

 

user_data

user data passed to g_unix_fd_add()

 
-
-
-

Returns

-

FALSE if the source should be removed

-
-
-
-
-

g_unix_fd_add ()

-
guint
-g_unix_fd_add (gint fd,
-               GIOCondition condition,
-               GUnixFDSourceFunc function,
-               gpointer user_data);
-

Sets a function to be called when the IO condition, as specified by -condition - becomes true for fd -.

-

function - will be called when the specified IO condition becomes -TRUE. The function is expected to clear whatever event caused the -IO condition to become true and return TRUE in order to be notified -when it happens again. If function - returns FALSE then the watch -will be cancelled.

-

The return value of this function can be passed to g_source_remove() -to cancel the watch at any time that it exists.

-

The source will never close the fd -- you must do it yourself.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

fd

a file descriptor

 

condition

IO conditions to watch for on fd -

 

function

a GPollFDFunc

 

user_data

data to pass to function -

 
-
-
-

Returns

-

the ID (greater than 0) of the event source

-
-

Since: 2.36

-
-
-
-

g_unix_fd_add_full ()

-
guint
-g_unix_fd_add_full (gint priority,
-                    gint fd,
-                    GIOCondition condition,
-                    GUnixFDSourceFunc function,
-                    gpointer user_data,
-                    GDestroyNotify notify);
-

Sets a function to be called when the IO condition, as specified by -condition - becomes true for fd -.

-

This is the same as g_unix_fd_add(), except that it allows you to -specify a non-default priority and a provide a GDestroyNotify for -user_data -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

priority

the priority of the source

 

fd

a file descriptor

 

condition

IO conditions to watch for on fd -

 

function

a GUnixFDSourceFunc

 

user_data

data to pass to function -

 

notify

function to call when the idle is removed, or NULL

 
-
-
-

Returns

-

the ID (greater than 0) of the event source

-
-

Since: 2.36

-
-
-
-

g_unix_fd_source_new ()

-
GSource *
-g_unix_fd_source_new (gint fd,
-                      GIOCondition condition);
-

Creates a GSource to watch for a particular IO condition on a file -descriptor.

-

The source will never close the fd -- you must do it yourself.

-
-

Parameters

-
----- - - - - - - - - - - - - -

fd

a file descriptor

 

condition

IO conditions to watch for on fd -

 
-
-
-

Returns

-

the newly created GSource

-
-

Since: 2.36

-
-
-
-

Types and Values

-
-

G_UNIX_ERROR

-
#define G_UNIX_ERROR (g_unix_error_quark())
-
-

Error domain for API in the g_unix_ namespace. Note that there is no -exported enumeration mapping errno. Instead, all functions ensure that -errno is relevant. The code for all G_UNIX_ERROR is always 0, and the -error message is always generated via g_strerror().

-

It is expected that most code will not look at errno from these APIs. -Important cases where one would want to differentiate between errors are -already covered by existing cross-platform GLib API, such as e.g. GFile -wrapping ENOENT. However, it is provided for completeness, at least.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-URI-Functions.html b/docs/reference/glib/html/glib-URI-Functions.html deleted file mode 100644 index b2f6b869b..000000000 --- a/docs/reference/glib/html/glib-URI-Functions.html +++ /dev/null @@ -1,502 +0,0 @@ - - - - -URI Functions: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

URI Functions

-

URI Functions — manipulating URIs

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-char * - -g_uri_parse_scheme () -
-char * - -g_uri_escape_string () -
-char * - -g_uri_unescape_string () -
-char * - -g_uri_unescape_segment () -
-gchar ** - -g_uri_list_extract_uris () -
-gchar * - -g_filename_from_uri () -
-gchar * - -g_filename_to_uri () -
-
- -
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

Functions for manipulating Universal Resource Identifiers (URIs) as -defined by -RFC 3986. -It is highly recommended that you have read and -understand RFC 3986 for understanding this API.

-
-
-

Functions

-
-

g_uri_parse_scheme ()

-
char *
-g_uri_parse_scheme (const char *uri);
-

Gets the scheme portion of a URI string. RFC 3986 decodes the scheme as:

-
- - - - - - - -
1
URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]
-
- -

-Common schemes include "file", "http", "svn+ssh", etc.

-
-

Parameters

-
----- - - - - - -

uri

a valid URI.

 
-
-
-

Returns

-

The "Scheme" component of the URI, or NULL on error. -The returned string should be freed when no longer needed.

-
-

Since: 2.16

-
-
-
-

g_uri_escape_string ()

-
char *
-g_uri_escape_string (const char *unescaped,
-                     const char *reserved_chars_allowed,
-                     gboolean allow_utf8);
-

Escapes a string for use in a URI.

-

Normally all characters that are not "unreserved" (i.e. ASCII alphanumerical -characters plus dash, dot, underscore and tilde) are escaped. -But if you specify characters in reserved_chars_allowed - they are not -escaped. This is useful for the "reserved" characters in the URI -specification, since those are allowed unescaped in some portions of -a URI.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

unescaped

the unescaped input string.

 

reserved_chars_allowed

a string of reserved characters that -are allowed to be used, or NULL.

[nullable]

allow_utf8

TRUE if the result can include UTF-8 characters.

 
-
-
-

Returns

-

an escaped version of unescaped -. The returned string should be -freed when no longer needed.

-
-

Since: 2.16

-
-
-
-

g_uri_unescape_string ()

-
char *
-g_uri_unescape_string (const char *escaped_string,
-                       const char *illegal_characters);
-

Unescapes a whole escaped string.

-

If any of the characters in illegal_characters - or the character zero appears -as an escaped character in escaped_string - then that is an error and NULL -will be returned. This is useful it you want to avoid for instance having a -slash being expanded in an escaped path element, which might confuse pathname -handling.

-
-

Parameters

-
----- - - - - - - - - - - - - -

escaped_string

an escaped string to be unescaped.

 

illegal_characters

a string of illegal characters not to be -allowed, or NULL.

[nullable]
-
-
-

Returns

-

an unescaped version of escaped_string -. The returned string -should be freed when no longer needed.

-
-

Since: 2.16

-
-
-
-

g_uri_unescape_segment ()

-
char *
-g_uri_unescape_segment (const char *escaped_string,
-                        const char *escaped_string_end,
-                        const char *illegal_characters);
-

Unescapes a segment of an escaped string.

-

If any of the characters in illegal_characters - or the character zero appears -as an escaped character in escaped_string - then that is an error and NULL -will be returned. This is useful it you want to avoid for instance having a -slash being expanded in an escaped path element, which might confuse pathname -handling.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

escaped_string

A string, may be NULL.

[nullable]

escaped_string_end

Pointer to end of escaped_string -, may be NULL.

[nullable]

illegal_characters

An optional string of illegal characters not to be allowed, may be NULL.

[nullable]
-
-
-

Returns

-

an unescaped version of escaped_string -or NULL on error. -The returned string should be freed when no longer needed. As a -special case if NULL is given for escaped_string -, this function -will return NULL.

-
-

Since: 2.16

-
-
-
-

g_uri_list_extract_uris ()

-
gchar **
-g_uri_list_extract_uris (const gchar *uri_list);
-

Splits an URI list conforming to the text/uri-list -mime type defined in RFC 2483 into individual URIs, -discarding any comments. The URIs are not validated.

-
-

Parameters

-
----- - - - - - -

uri_list

an URI list

 
-
-
-

Returns

-

a newly allocated NULL-terminated list -of strings holding the individual URIs. The array should be freed -with g_strfreev().

-

[transfer full]

-
-

Since: 2.6

-
-
-
-

g_filename_from_uri ()

-
gchar *
-g_filename_from_uri (const gchar *uri,
-                     gchar **hostname,
-                     GError **error);
-

Converts an escaped ASCII-encoded URI to a local filename in the -encoding used for filenames.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

uri

a uri describing a filename (escaped, encoded in ASCII).

 

hostname

Location to store hostname for the URI. -If there is no hostname in the URI, NULL will be -stored in this location.

[out][optional]

error

location to store the error occurring, or NULL to ignore -errors. Any of the errors in GConvertError may occur.

 
-
-
-

Returns

-

a newly-allocated string holding -the resulting filename, or NULL on an error.

-

[type filename]

-
-
-
-
-

g_filename_to_uri ()

-
gchar *
-g_filename_to_uri (const gchar *filename,
-                   const gchar *hostname,
-                   GError **error);
-

Converts an absolute filename to an escaped ASCII-encoded URI, with the path -component following Section 3.3. of RFC 2396.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

filename

an absolute filename specified in the GLib file -name encoding, which is the on-disk file name bytes on Unix, and UTF-8 -on Windows.

[type filename]

hostname

A UTF-8 encoded hostname, or NULL for none.

[nullable]

error

location to store the error occurring, or NULL to ignore -errors. Any of the errors in GConvertError may occur.

 
-
-
-

Returns

-

a newly-allocated string holding the resulting -URI, or NULL on an error.

-
-
-
-
-

Types and Values

-
-

G_URI_RESERVED_CHARS_ALLOWED_IN_PATH

-
#define G_URI_RESERVED_CHARS_ALLOWED_IN_PATH G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT "/"
-
-

Allowed characters in a path. Includes "!$&'()*+,;=:@/".

-
-
-
-

G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT

-
#define G_URI_RESERVED_CHARS_ALLOWED_IN_PATH_ELEMENT G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS ":@"
-
-

Allowed characters in path elements. Includes "!$&'()*+,;=:@".

-
-
-
-

G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO

-
#define G_URI_RESERVED_CHARS_ALLOWED_IN_USERINFO G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS ":"
-
-

Allowed characters in userinfo as defined in RFC 3986. Includes "!$&'()*+,;=:".

-
-
-
-

G_URI_RESERVED_CHARS_GENERIC_DELIMITERS

-
#define G_URI_RESERVED_CHARS_GENERIC_DELIMITERS ":/?#[]@"
-
-

Generic delimiters characters as defined in RFC 3986. Includes ":/?#[]@".

-
-
-
-

G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS

-
#define G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS "!$&'()*+,;="
-
-

Subcomponent delimiter characters as defined in RFC 3986. Includes "!$&'()*+,;=".

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Unicode-Manipulation.html b/docs/reference/glib/html/glib-Unicode-Manipulation.html deleted file mode 100644 index 873ee225c..000000000 --- a/docs/reference/glib/html/glib-Unicode-Manipulation.html +++ /dev/null @@ -1,5090 +0,0 @@ - - - - -Unicode Manipulation: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Unicode Manipulation

-

Unicode Manipulation — functions operating on Unicode characters and - UTF-8 strings

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -g_unichar_validate () -
-gboolean - -g_unichar_isalnum () -
-gboolean - -g_unichar_isalpha () -
-gboolean - -g_unichar_iscntrl () -
-gboolean - -g_unichar_isdefined () -
-gboolean - -g_unichar_isdigit () -
-gboolean - -g_unichar_isgraph () -
-gboolean - -g_unichar_islower () -
-gboolean - -g_unichar_ismark () -
-gboolean - -g_unichar_isprint () -
-gboolean - -g_unichar_ispunct () -
-gboolean - -g_unichar_isspace () -
-gboolean - -g_unichar_istitle () -
-gboolean - -g_unichar_isupper () -
-gboolean - -g_unichar_isxdigit () -
-gboolean - -g_unichar_iswide () -
-gboolean - -g_unichar_iswide_cjk () -
-gboolean - -g_unichar_iszerowidth () -
-gunichar - -g_unichar_toupper () -
-gunichar - -g_unichar_tolower () -
-gunichar - -g_unichar_totitle () -
-gint - -g_unichar_digit_value () -
-gint - -g_unichar_xdigit_value () -
-gboolean - -g_unichar_compose () -
-gboolean - -g_unichar_decompose () -
-gsize - -g_unichar_fully_decompose () -
-GUnicodeType - -g_unichar_type () -
-GUnicodeBreakType - -g_unichar_break_type () -
-gint - -g_unichar_combining_class () -
-void - -g_unicode_canonical_ordering () -
-gunichar * - -g_unicode_canonical_decomposition () -
-gboolean - -g_unichar_get_mirror_char () -
-GUnicodeScript - -g_unichar_get_script () -
-GUnicodeScript - -g_unicode_script_from_iso15924 () -
-guint32 - -g_unicode_script_to_iso15924 () -
#define -g_utf8_next_char() -
-gunichar - -g_utf8_get_char () -
-gunichar - -g_utf8_get_char_validated () -
-gchar * - -g_utf8_offset_to_pointer () -
-glong - -g_utf8_pointer_to_offset () -
-gchar * - -g_utf8_prev_char () -
-gchar * - -g_utf8_find_next_char () -
-gchar * - -g_utf8_find_prev_char () -
-glong - -g_utf8_strlen () -
-gchar * - -g_utf8_strncpy () -
-gchar * - -g_utf8_strchr () -
-gchar * - -g_utf8_strrchr () -
-gchar * - -g_utf8_strreverse () -
-gchar * - -g_utf8_substring () -
-gboolean - -g_utf8_validate () -
-gchar * - -g_utf8_make_valid () -
-gchar * - -g_utf8_strup () -
-gchar * - -g_utf8_strdown () -
-gchar * - -g_utf8_casefold () -
-gchar * - -g_utf8_normalize () -
-gint - -g_utf8_collate () -
-gchar * - -g_utf8_collate_key () -
-gchar * - -g_utf8_collate_key_for_filename () -
-gunichar2 * - -g_utf8_to_utf16 () -
-gunichar * - -g_utf8_to_ucs4 () -
-gunichar * - -g_utf8_to_ucs4_fast () -
-gunichar * - -g_utf16_to_ucs4 () -
-gchar * - -g_utf16_to_utf8 () -
-gunichar2 * - -g_ucs4_to_utf16 () -
-gchar * - -g_ucs4_to_utf8 () -
-gint - -g_unichar_to_utf8 () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
typedefgunichar
typedefgunichar2
#defineG_UNICHAR_MAX_DECOMPOSITION_LENGTH
enumGUnicodeType
#defineG_UNICODE_COMBINING_MARK
enumGUnicodeBreakType
enumGUnicodeScript
enumGNormalizeMode
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

This section describes a number of functions for dealing with -Unicode characters and strings. There are analogues of the -traditional ctype.h character classification and case conversion -functions, UTF-8 analogues of some string utility functions, -functions to perform normalization, case conversion and collation -on UTF-8 strings and finally functions to convert between the UTF-8, -UTF-16 and UCS-4 encodings of Unicode.

-

The implementations of the Unicode functions in GLib are based -on the Unicode Character Data tables, which are available from -www.unicode.org. -GLib 2.8 supports Unicode 4.0, GLib 2.10 supports Unicode 4.1, -GLib 2.12 supports Unicode 5.0, GLib 2.16.3 supports Unicode 5.1, -GLib 2.30 supports Unicode 6.0.

-
-
-

Functions

-
-

g_unichar_validate ()

-
gboolean
-g_unichar_validate (gunichar ch);
-

Checks whether ch - is a valid Unicode character. Some possible -integer values of ch - will not be valid. 0 is considered a valid -character, though it's normally a string terminator.

-
-

Parameters

-
----- - - - - - -

ch

a Unicode character

 
-
-
-

Returns

-

TRUE if ch -is a valid Unicode character

-
-
-
-
-

g_unichar_isalnum ()

-
gboolean
-g_unichar_isalnum (gunichar c);
-

Determines whether a character is alphanumeric. -Given some UTF-8 text, obtain a character value -with g_utf8_get_char().

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

TRUE if c -is an alphanumeric character

-
-
-
-
-

g_unichar_isalpha ()

-
gboolean
-g_unichar_isalpha (gunichar c);
-

Determines whether a character is alphabetic (i.e. a letter). -Given some UTF-8 text, obtain a character value with -g_utf8_get_char().

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

TRUE if c -is an alphabetic character

-
-
-
-
-

g_unichar_iscntrl ()

-
gboolean
-g_unichar_iscntrl (gunichar c);
-

Determines whether a character is a control character. -Given some UTF-8 text, obtain a character value with -g_utf8_get_char().

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

TRUE if c -is a control character

-
-
-
-
-

g_unichar_isdefined ()

-
gboolean
-g_unichar_isdefined (gunichar c);
-

Determines if a given character is assigned in the Unicode -standard.

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

TRUE if the character has an assigned value

-
-
-
-
-

g_unichar_isdigit ()

-
gboolean
-g_unichar_isdigit (gunichar c);
-

Determines whether a character is numeric (i.e. a digit). This -covers ASCII 0-9 and also digits in other languages/scripts. Given -some UTF-8 text, obtain a character value with g_utf8_get_char().

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

TRUE if c -is a digit

-
-
-
-
-

g_unichar_isgraph ()

-
gboolean
-g_unichar_isgraph (gunichar c);
-

Determines whether a character is printable and not a space -(returns FALSE for control characters, format characters, and -spaces). g_unichar_isprint() is similar, but returns TRUE for -spaces. Given some UTF-8 text, obtain a character value with -g_utf8_get_char().

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

TRUE if c -is printable unless it's a space

-
-
-
-
-

g_unichar_islower ()

-
gboolean
-g_unichar_islower (gunichar c);
-

Determines whether a character is a lowercase letter. -Given some UTF-8 text, obtain a character value with -g_utf8_get_char().

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

TRUE if c -is a lowercase letter

-
-
-
-
-

g_unichar_ismark ()

-
gboolean
-g_unichar_ismark (gunichar c);
-

Determines whether a character is a mark (non-spacing mark, -combining mark, or enclosing mark in Unicode speak). -Given some UTF-8 text, obtain a character value -with g_utf8_get_char().

-

Note: in most cases where isalpha characters are allowed, -ismark characters should be allowed to as they are essential -for writing most European languages as well as many non-Latin -scripts.

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

TRUE if c -is a mark character

-
-

Since: 2.14

-
-
-
-

g_unichar_isprint ()

-
gboolean
-g_unichar_isprint (gunichar c);
-

Determines whether a character is printable. -Unlike g_unichar_isgraph(), returns TRUE for spaces. -Given some UTF-8 text, obtain a character value with -g_utf8_get_char().

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

TRUE if c -is printable

-
-
-
-
-

g_unichar_ispunct ()

-
gboolean
-g_unichar_ispunct (gunichar c);
-

Determines whether a character is punctuation or a symbol. -Given some UTF-8 text, obtain a character value with -g_utf8_get_char().

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

TRUE if c -is a punctuation or symbol character

-
-
-
-
-

g_unichar_isspace ()

-
gboolean
-g_unichar_isspace (gunichar c);
-

Determines whether a character is a space, tab, or line separator -(newline, carriage return, etc.). Given some UTF-8 text, obtain a -character value with g_utf8_get_char().

-

(Note: don't use this to do word breaking; you have to use -Pango or equivalent to get word breaking right, the algorithm -is fairly complex.)

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

TRUE if c -is a space character

-
-
-
-
-

g_unichar_istitle ()

-
gboolean
-g_unichar_istitle (gunichar c);
-

Determines if a character is titlecase. Some characters in -Unicode which are composites, such as the DZ digraph -have three case variants instead of just two. The titlecase -form is used at the beginning of a word where only the -first letter is capitalized. The titlecase form of the DZ -digraph is U+01F2 LATIN CAPITAL LETTTER D WITH SMALL LETTER Z.

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

TRUE if the character is titlecase

-
-
-
-
-

g_unichar_isupper ()

-
gboolean
-g_unichar_isupper (gunichar c);
-

Determines if a character is uppercase.

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

TRUE if c -is an uppercase character

-
-
-
-
-

g_unichar_isxdigit ()

-
gboolean
-g_unichar_isxdigit (gunichar c);
-

Determines if a character is a hexidecimal digit.

-
-

Parameters

-
----- - - - - - -

c

a Unicode character.

 
-
-
-

Returns

-

TRUE if the character is a hexadecimal digit

-
-
-
-
-

g_unichar_iswide ()

-
gboolean
-g_unichar_iswide (gunichar c);
-

Determines if a character is typically rendered in a double-width -cell.

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

TRUE if the character is wide

-
-
-
-
-

g_unichar_iswide_cjk ()

-
gboolean
-g_unichar_iswide_cjk (gunichar c);
-

Determines if a character is typically rendered in a double-width -cell under legacy East Asian locales. If a character is wide according to -g_unichar_iswide(), then it is also reported wide with this function, but -the converse is not necessarily true. See the -Unicode Standard Annex 11 -for details.

-

If a character passes the g_unichar_iswide() test then it will also pass -this test, but not the other way around. Note that some characters may -pass both this test and g_unichar_iszerowidth().

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

TRUE if the character is wide in legacy East Asian locales

-
-

Since: 2.12

-
-
-
-

g_unichar_iszerowidth ()

-
gboolean
-g_unichar_iszerowidth (gunichar c);
-

Determines if a given character typically takes zero width when rendered. -The return value is TRUE for all non-spacing and enclosing marks -(e.g., combining accents), format characters, zero-width -space, but not U+00AD SOFT HYPHEN.

-

A typical use of this function is with one of g_unichar_iswide() or -g_unichar_iswide_cjk() to determine the number of cells a string occupies -when displayed on a grid display (terminals). However, note that not all -terminals support zero-width rendering of zero-width marks.

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

TRUE if the character has zero width

-
-

Since: 2.14

-
-
-
-

g_unichar_toupper ()

-
gunichar
-g_unichar_toupper (gunichar c);
-

Converts a character to uppercase.

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

the result of converting c -to uppercase. -If c -is not an lowercase or titlecase character, -or has no upper case equivalent c -is returned unchanged.

-
-
-
-
-

g_unichar_tolower ()

-
gunichar
-g_unichar_tolower (gunichar c);
-

Converts a character to lower case.

-
-

Parameters

-
----- - - - - - -

c

a Unicode character.

 
-
-
-

Returns

-

the result of converting c -to lower case. -If c -is not an upperlower or titlecase character, -or has no lowercase equivalent c -is returned unchanged.

-
-
-
-
-

g_unichar_totitle ()

-
gunichar
-g_unichar_totitle (gunichar c);
-

Converts a character to the titlecase.

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

the result of converting c -to titlecase. -If c -is not an uppercase or lowercase character, -c -is returned unchanged.

-
-
-
-
-

g_unichar_digit_value ()

-
gint
-g_unichar_digit_value (gunichar c);
-

Determines the numeric value of a character as a decimal -digit.

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

If c -is a decimal digit (according to -g_unichar_isdigit()), its numeric value. Otherwise, -1.

-
-
-
-
-

g_unichar_xdigit_value ()

-
gint
-g_unichar_xdigit_value (gunichar c);
-

Determines the numeric value of a character as a hexidecimal -digit.

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

If c -is a hex digit (according to -g_unichar_isxdigit()), its numeric value. Otherwise, -1.

-
-
-
-
-

g_unichar_compose ()

-
gboolean
-g_unichar_compose (gunichar a,
-                   gunichar b,
-                   gunichar *ch);
-

Performs a single composition step of the -Unicode canonical composition algorithm.

-

This function includes algorithmic Hangul Jamo composition, -but it is not exactly the inverse of g_unichar_decompose(). -No composition can have either of a - or b - equal to zero. -To be precise, this function composes if and only if -there exists a Primary Composite P which is canonically -equivalent to the sequence <a -,b ->. See the Unicode -Standard for the definition of Primary Composite.

-

If a - and b - do not compose a new character, ch - is set to zero.

-

See -UAX15 -for details.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

a

a Unicode character

 

b

a Unicode character

 

ch

return location for the composed character

 
-
-
-

Returns

-

TRUE if the characters could be composed

-
-

Since: 2.30

-
-
-
-

g_unichar_decompose ()

-
gboolean
-g_unichar_decompose (gunichar ch,
-                     gunichar *a,
-                     gunichar *b);
-

Performs a single decomposition step of the -Unicode canonical decomposition algorithm.

-

This function does not include compatibility -decompositions. It does, however, include algorithmic -Hangul Jamo decomposition, as well as 'singleton' -decompositions which replace a character by a single -other character. In the case of singletons *b - will -be set to zero.

-

If ch - is not decomposable, *a - is set to ch - and *b - -is set to zero.

-

Note that the way Unicode decomposition pairs are -defined, it is guaranteed that b - would not decompose -further, but a - may itself decompose. To get the full -canonical decomposition for ch -, one would need to -recursively call this function on a -. Or use -g_unichar_fully_decompose().

-

See -UAX15 -for details.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

ch

a Unicode character

 

a

return location for the first component of ch -

 

b

return location for the second component of ch -

 
-
-
-

Returns

-

TRUE if the character could be decomposed

-
-

Since: 2.30

-
-
-
-

g_unichar_fully_decompose ()

-
gsize
-g_unichar_fully_decompose (gunichar ch,
-                           gboolean compat,
-                           gunichar *result,
-                           gsize result_len);
-

Computes the canonical or compatibility decomposition of a -Unicode character. For compatibility decomposition, -pass TRUE for compat -; for canonical decomposition -pass FALSE for compat -.

-

The decomposed sequence is placed in result -. Only up to -result_len - characters are written into result -. The length -of the full decomposition (irrespective of result_len -) is -returned by the function. For canonical decomposition, -currently all decompositions are of length at most 4, but -this may change in the future (very unlikely though). -At any rate, Unicode does guarantee that a buffer of length -18 is always enough for both compatibility and canonical -decompositions, so that is the size recommended. This is provided -as G_UNICHAR_MAX_DECOMPOSITION_LENGTH.

-

See -UAX15 -for details.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

ch

a Unicode character.

 

compat

whether perform canonical or compatibility decomposition

 

result

location to store decomposed result, or NULL.

[nullable]

result_len

length of result -

 
-
-
-

Returns

-

the length of the full decomposition.

-
-

Since: 2.30

-
-
-
-

g_unichar_type ()

-
GUnicodeType
-g_unichar_type (gunichar c);
-

Classifies a Unicode character by type.

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

the type of the character.

-
-
-
-
-

g_unichar_break_type ()

-
GUnicodeBreakType
-g_unichar_break_type (gunichar c);
-

Determines the break type of c -. c - should be a Unicode character -(to derive a character from UTF-8 encoded text, use -g_utf8_get_char()). The break type is used to find word and line -breaks ("text boundaries"), Pango implements the Unicode boundary -resolution algorithms and normally you would use a function such -as pango_break() instead of caring about break types yourself.

-
-

Parameters

-
----- - - - - - -

c

a Unicode character

 
-
-
-

Returns

-

the break type of c -

-
-
-
-
-

g_unichar_combining_class ()

-
gint
-g_unichar_combining_class (gunichar uc);
-

Determines the canonical combining class of a Unicode character.

-
-

Parameters

-
----- - - - - - -

uc

a Unicode character

 
-
-
-

Returns

-

the combining class of the character

-
-

Since: 2.14

-
-
-
-

g_unicode_canonical_ordering ()

-
void
-g_unicode_canonical_ordering (gunichar *string,
-                              gsize len);
-

Computes the canonical ordering of a string in-place. -This rearranges decomposed characters in the string -according to their combining classes. See the Unicode -manual for more information.

-
-

Parameters

-
----- - - - - - - - - - - - - -

string

a UCS-4 encoded string.

 

len

the maximum length of string -to use.

 
-
-
-
-
-

g_unicode_canonical_decomposition ()

-
gunichar *
-g_unicode_canonical_decomposition (gunichar ch,
-                                   gsize *result_len);
-
-

g_unicode_canonical_decomposition has been deprecated since version 2.30 and should not be used in newly-written code.

-

Use the more flexible g_unichar_fully_decompose() - instead.

-
-

Computes the canonical decomposition of a Unicode character.

-
-

Parameters

-
----- - - - - - - - - - - - - -

ch

a Unicode character.

 

result_len

location to store the length of the return value.

 
-
-
-

Returns

-

a newly allocated string of Unicode characters. -result_len -is set to the resulting length of the string.

-
-
-
-
-

g_unichar_get_mirror_char ()

-
gboolean
-g_unichar_get_mirror_char (gunichar ch,
-                           gunichar *mirrored_ch);
-

In Unicode, some characters are "mirrored". This means that their -images are mirrored horizontally in text that is laid out from right -to left. For instance, "(" would become its mirror image, ")", in -right-to-left text.

-

If ch - has the Unicode mirrored property and there is another unicode -character that typically has a glyph that is the mirror image of ch -'s -glyph and mirrored_ch - is set, it puts that character in the address -pointed to by mirrored_ch -. Otherwise the original character is put.

-
-

Parameters

-
----- - - - - - - - - - - - - -

ch

a Unicode character

 

mirrored_ch

location to store the mirrored character

 
-
-
-

Returns

-

TRUE if ch -has a mirrored character, FALSE otherwise

-
-

Since: 2.4

-
-
-
-

g_unichar_get_script ()

-
GUnicodeScript
-g_unichar_get_script (gunichar ch);
-

Looks up the GUnicodeScript for a particular character (as defined -by Unicode Standard Annex #24). No check is made for ch - being a -valid Unicode character; if you pass in invalid character, the -result is undefined.

-

This function is equivalent to pango_script_for_unichar() and the -two are interchangeable.

-
-

Parameters

-
----- - - - - - -

ch

a Unicode character

 
-
-
-

Returns

-

the GUnicodeScript for the character.

-
-

Since: 2.14

-
-
-
-

g_unicode_script_from_iso15924 ()

-
GUnicodeScript
-g_unicode_script_from_iso15924 (guint32 iso15924);
-

Looks up the Unicode script for iso15924 -. ISO 15924 assigns four-letter -codes to scripts. For example, the code for Arabic is 'Arab'. -This function accepts four letter codes encoded as a guint32 - in a -big-endian fashion. That is, the code expected for Arabic is -0x41726162 (0x41 is ASCII code for 'A', 0x72 is ASCII code for 'r', etc).

-

See -Codes for the representation of names of scripts -for details.

-
-

Parameters

-
----- - - - - - -

iso15924

a Unicode script

 
-
-
-

Returns

-

the Unicode script for iso15924 -, or -of G_UNICODE_SCRIPT_INVALID_CODE if iso15924 -is zero and -G_UNICODE_SCRIPT_UNKNOWN if iso15924 -is unknown.

-
-

Since: 2.30

-
-
-
-

g_unicode_script_to_iso15924 ()

-
guint32
-g_unicode_script_to_iso15924 (GUnicodeScript script);
-

Looks up the ISO 15924 code for script -. ISO 15924 assigns four-letter -codes to scripts. For example, the code for Arabic is 'Arab'. The -four letter codes are encoded as a guint32 - by this function in a -big-endian fashion. That is, the code returned for Arabic is -0x41726162 (0x41 is ASCII code for 'A', 0x72 is ASCII code for 'r', etc).

-

See -Codes for the representation of names of scripts -for details.

-
-

Parameters

-
----- - - - - - -

script

a Unicode script

 
-
-
-

Returns

-

the ISO 15924 code for script -, encoded as an integer, -of zero if script -is G_UNICODE_SCRIPT_INVALID_CODE or -ISO 15924 code 'Zzzz' (script code for UNKNOWN) if script -is not understood.

-
-

Since: 2.30

-
-
-
-

g_utf8_next_char()

-
#define             g_utf8_next_char(p)
-

Skips to the next character in a UTF-8 string. The string must be -valid; this macro is as fast as possible, and has no error-checking. -You would use this macro to iterate over a string character by -character. The macro returns the start of the next UTF-8 character. -Before using this macro, use g_utf8_validate() to validate strings -that may contain invalid UTF-8.

-
-

Parameters

-
----- - - - - - -

p

Pointer to the start of a valid UTF-8 character

 
-
-
-
-
-

g_utf8_get_char ()

-
gunichar
-g_utf8_get_char (const gchar *p);
-

Converts a sequence of bytes encoded as UTF-8 to a Unicode character.

-

If p - does not point to a valid UTF-8 encoded character, results -are undefined. If you are not sure that the bytes are complete -valid Unicode characters, you should use g_utf8_get_char_validated() -instead.

-
-

Parameters

-
----- - - - - - -

p

a pointer to Unicode character encoded as UTF-8

 
-
-
-

Returns

-

the resulting character

-
-
-
-
-

g_utf8_get_char_validated ()

-
gunichar
-g_utf8_get_char_validated (const gchar *p,
-                           gssize max_len);
-

Convert a sequence of bytes encoded as UTF-8 to a Unicode character. -This function checks for incomplete characters, for invalid characters -such as characters that are out of the range of Unicode, and for -overlong encodings of valid characters.

-
-

Parameters

-
----- - - - - - - - - - - - - -

p

a pointer to Unicode character encoded as UTF-8

 

max_len

the maximum number of bytes to read, or -1 if p -is nul-terminated

 
-
-
-

Returns

-

the resulting character. If p -points to a partial -sequence at the end of a string that could begin a valid -character (or if max_len -is zero), returns (gunichar)-2; -otherwise, if p -does not point to a valid UTF-8 encoded -Unicode character, returns (gunichar)-1.

-
-
-
-
-

g_utf8_offset_to_pointer ()

-
gchar *
-g_utf8_offset_to_pointer (const gchar *str,
-                          glong offset);
-

Converts from an integer character offset to a pointer to a position -within the string.

-

Since 2.10, this function allows to pass a negative offset - to -step backwards. It is usually worth stepping backwards from the end -instead of forwards if offset - is in the last fourth of the string, -since moving forward is about 3 times faster than moving backward.

-

Note that this function doesn't abort when reaching the end of str -. -Therefore you should be sure that offset - is within string boundaries -before calling that function. Call g_utf8_strlen() when unsure. -This limitation exists as this function is called frequently during -text rendering and therefore has to be as fast as possible.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

a UTF-8 encoded string

 

offset

a character offset within str -

 
-
-
-

Returns

-

the resulting pointer

-
-
-
-
-

g_utf8_pointer_to_offset ()

-
glong
-g_utf8_pointer_to_offset (const gchar *str,
-                          const gchar *pos);
-

Converts from a pointer to position within a string to a integer -character offset.

-

Since 2.10, this function allows pos - to be before str -, and returns -a negative offset in this case.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

a UTF-8 encoded string

 

pos

a pointer to a position within str -

 
-
-
-

Returns

-

the resulting character offset

-
-
-
-
-

g_utf8_prev_char ()

-
gchar *
-g_utf8_prev_char (const gchar *p);
-

Finds the previous UTF-8 character in the string before p -.

-

p - does not have to be at the beginning of a UTF-8 character. No check -is made to see if the character found is actually valid other than -it starts with an appropriate byte. If p - might be the first -character of the string, you must use g_utf8_find_prev_char() instead.

-
-

Parameters

-
----- - - - - - -

p

a pointer to a position within a UTF-8 encoded string

 
-
-
-

Returns

-

a pointer to the found character

-
-
-
-
-

g_utf8_find_next_char ()

-
gchar *
-g_utf8_find_next_char (const gchar *p,
-                       const gchar *end);
-

Finds the start of the next UTF-8 character in the string after p -.

-

p - does not have to be at the beginning of a UTF-8 character. No check -is made to see if the character found is actually valid other than -it starts with an appropriate byte.

-
-

Parameters

-
----- - - - - - - - - - - - - -

p

a pointer to a position within a UTF-8 encoded string

 

end

a pointer to the byte following the end of the string, -or NULL to indicate that the string is nul-terminated.

[nullable]
-
-
-

Returns

-

a pointer to the found character or NULL

-
-
-
-
-

g_utf8_find_prev_char ()

-
gchar *
-g_utf8_find_prev_char (const gchar *str,
-                       const gchar *p);
-

Given a position p - with a UTF-8 encoded string str -, find the start -of the previous UTF-8 character starting before p -. Returns NULL if no -UTF-8 characters are present in str - before p -.

-

p - does not have to be at the beginning of a UTF-8 character. No check -is made to see if the character found is actually valid other than -it starts with an appropriate byte.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

pointer to the beginning of a UTF-8 encoded string

 

p

pointer to some position within str -

 
-
-
-

Returns

-

a pointer to the found character or NULL.

-
-
-
-
-

g_utf8_strlen ()

-
glong
-g_utf8_strlen (const gchar *p,
-               gssize max);
-

Computes the length of the string in characters, not including -the terminating nul character. If the max -'th byte falls in the -middle of a character, the last (partial) character is not counted.

-
-

Parameters

-
----- - - - - - - - - - - - - -

p

pointer to the start of a UTF-8 encoded string

 

max

the maximum number of bytes to examine. If max -is less than 0, then the string is assumed to be -nul-terminated. If max -is 0, p -will not be examined and -may be NULL. If max -is greater than 0, up to max -bytes are examined

 
-
-
-

Returns

-

the length of the string in characters

-
-
-
-
-

g_utf8_strncpy ()

-
gchar *
-g_utf8_strncpy (gchar *dest,
-                const gchar *src,
-                gsize n);
-

Like the standard C strncpy() function, but copies a given number -of characters instead of a given number of bytes. The src - string -must be valid UTF-8 encoded text. (Use g_utf8_validate() on all -text before trying to use UTF-8 utility functions with it.)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

dest

buffer to fill with characters from src -

 

src

UTF-8 encoded string

 

n

character count

 
-
-
-

Returns

-

dest -

-
-
-
-
-

g_utf8_strchr ()

-
gchar *
-g_utf8_strchr (const gchar *p,
-               gssize len,
-               gunichar c);
-

Finds the leftmost occurrence of the given Unicode character -in a UTF-8 encoded string, while limiting the search to len - bytes. -If len - is -1, allow unbounded search.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

p

a nul-terminated UTF-8 encoded string

 

len

the maximum length of p -

 

c

a Unicode character

 
-
-
-

Returns

-

NULL if the string does not contain the character, -otherwise, a pointer to the start of the leftmost occurrence -of the character in the string.

-
-
-
-
-

g_utf8_strrchr ()

-
gchar *
-g_utf8_strrchr (const gchar *p,
-                gssize len,
-                gunichar c);
-

Find the rightmost occurrence of the given Unicode character -in a UTF-8 encoded string, while limiting the search to len - bytes. -If len - is -1, allow unbounded search.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

p

a nul-terminated UTF-8 encoded string

 

len

the maximum length of p -

 

c

a Unicode character

 
-
-
-

Returns

-

NULL if the string does not contain the character, -otherwise, a pointer to the start of the rightmost occurrence -of the character in the string.

-
-
-
-
-

g_utf8_strreverse ()

-
gchar *
-g_utf8_strreverse (const gchar *str,
-                   gssize len);
-

Reverses a UTF-8 string. str - must be valid UTF-8 encoded text. -(Use g_utf8_validate() on all text before trying to use UTF-8 -utility functions with it.)

-

This function is intended for programmatic uses of reversed strings. -It pays no attention to decomposed characters, combining marks, byte -order marks, directional indicators (LRM, LRO, etc) and similar -characters which might need special handling when reversing a string -for display purposes.

-

Note that unlike g_strreverse(), this function returns -newly-allocated memory, which should be freed with g_free() when -no longer needed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

a UTF-8 encoded string

 

len

the maximum length of str -to use, in bytes. If len -< 0, -then the string is nul-terminated.

 
-
-
-

Returns

-

a newly-allocated string which is the reverse of str -

-
-

Since: 2.2

-
-
-
-

g_utf8_substring ()

-
gchar *
-g_utf8_substring (const gchar *str,
-                  glong start_pos,
-                  glong end_pos);
-

Copies a substring out of a UTF-8 encoded string. -The substring will contain end_pos - - start_pos - characters.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

str

a UTF-8 encoded string

 

start_pos

a character offset within str -

 

end_pos

another character offset within str -

 
-
-
-

Returns

-

a newly allocated copy of the requested -substring. Free with g_free() when no longer needed.

-
-

Since: 2.30

-
-
-
-

g_utf8_validate ()

-
gboolean
-g_utf8_validate (const gchar *str,
-                 gssize max_len,
-                 const gchar **end);
-

Validates UTF-8 encoded text. str - is the text to validate; -if str - is nul-terminated, then max_len - can be -1, otherwise -max_len - should be the number of bytes to validate. -If end - is non-NULL, then the end of the valid range -will be stored there (i.e. the start of the first invalid -character if some bytes were invalid, or the end of the text -being validated otherwise).

-

Note that g_utf8_validate() returns FALSE if max_len - is -positive and any of the max_len - bytes are nul.

-

Returns TRUE if all of str - was valid. Many GLib and GTK+ -routines require valid UTF-8 as input; so data read from a file -or the network should be checked with g_utf8_validate() before -doing anything else with it.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

str

a pointer to character data.

[array length=max_len][element-type guint8]

max_len

max bytes to validate, or -1 to go until NUL

 

end

return location for end of valid data.

[out][optional][transfer none]
-
-
-

Returns

-

TRUE if the text was valid UTF-8

-
-
-
-
-

g_utf8_make_valid ()

-
gchar *
-g_utf8_make_valid (const gchar *str,
-                   gssize len);
-

If the provided string is valid UTF-8, return a copy of it. If not, -return a copy in which bytes that could not be interpreted as valid Unicode -are replaced with the Unicode replacement character (U+FFFD).

-

For example, this is an appropriate function to use if you have received -a string that was incorrectly declared to be UTF-8, and you need a valid -UTF-8 version of it that can be logged or displayed to the user, with the -assumption that it is close enough to ASCII or UTF-8 to be mostly -readable as-is.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

string to coerce into UTF-8

 

len

the maximum length of str -to use, in bytes. If len -< 0, -then the string is nul-terminated.

 
-
-
-

Returns

-

a valid UTF-8 string whose content resembles str -.

-

[transfer full]

-
-

Since: 2.52

-
-
-
-

g_utf8_strup ()

-
gchar *
-g_utf8_strup (const gchar *str,
-              gssize len);
-

Converts all Unicode characters in the string that have a case -to uppercase. The exact manner that this is done depends -on the current locale, and may result in the number of -characters in the string increasing. (For instance, the -German ess-zet will be changed to SS.)

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

a UTF-8 encoded string

 

len

length of str -, in bytes, or -1 if str -is nul-terminated.

 
-
-
-

Returns

-

a newly allocated string, with all characters -converted to uppercase.

-
-
-
-
-

g_utf8_strdown ()

-
gchar *
-g_utf8_strdown (const gchar *str,
-                gssize len);
-

Converts all Unicode characters in the string that have a case -to lowercase. The exact manner that this is done depends -on the current locale, and may result in the number of -characters in the string changing.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

a UTF-8 encoded string

 

len

length of str -, in bytes, or -1 if str -is nul-terminated.

 
-
-
-

Returns

-

a newly allocated string, with all characters -converted to lowercase.

-
-
-
-
-

g_utf8_casefold ()

-
gchar *
-g_utf8_casefold (const gchar *str,
-                 gssize len);
-

Converts a string into a form that is independent of case. The -result will not correspond to any particular case, but can be -compared for equality or ordered with the results of calling -g_utf8_casefold() on other strings.

-

Note that calling g_utf8_casefold() followed by g_utf8_collate() is -only an approximation to the correct linguistic case insensitive -ordering, though it is a fairly good one. Getting this exactly -right would require a more sophisticated collation function that -takes case sensitivity into account. GLib does not currently -provide such a function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

a UTF-8 encoded string

 

len

length of str -, in bytes, or -1 if str -is nul-terminated.

 
-
-
-

Returns

-

a newly allocated string, that is a -case independent form of str -.

-
-
-
-
-

g_utf8_normalize ()

-
gchar *
-g_utf8_normalize (const gchar *str,
-                  gssize len,
-                  GNormalizeMode mode);
-

Converts a string into canonical form, standardizing -such issues as whether a character with an accent -is represented as a base character and combining -accent or as a single precomposed character. The -string has to be valid UTF-8, otherwise NULL is -returned. You should generally call g_utf8_normalize() -before comparing two Unicode strings.

-

The normalization mode G_NORMALIZE_DEFAULT only -standardizes differences that do not affect the -text content, such as the above-mentioned accent -representation. G_NORMALIZE_ALL also standardizes -the "compatibility" characters in Unicode, such -as SUPERSCRIPT THREE to the standard forms -(in this case DIGIT THREE). Formatting information -may be lost but for most text operations such -characters should be considered the same.

-

G_NORMALIZE_DEFAULT_COMPOSE and G_NORMALIZE_ALL_COMPOSE -are like G_NORMALIZE_DEFAULT and G_NORMALIZE_ALL, -but returned a result with composed forms rather -than a maximally decomposed form. This is often -useful if you intend to convert the string to -a legacy encoding or pass it to a system with -less capable Unicode handling.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

str

a UTF-8 encoded string.

 

len

length of str -, in bytes, or -1 if str -is nul-terminated.

 

mode

the type of normalization to perform.

 
-
-
-

Returns

-

a newly allocated string, that is the -normalized form of str -, or NULL if str -is not -valid UTF-8.

-
-
-
-
-

g_utf8_collate ()

-
gint
-g_utf8_collate (const gchar *str1,
-                const gchar *str2);
-

Compares two strings for ordering using the linguistically -correct rules for the current locale. -When sorting a large number of strings, it will be significantly -faster to obtain collation keys with g_utf8_collate_key() and -compare the keys with strcmp() when sorting instead of sorting -the original strings.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str1

a UTF-8 encoded string

 

str2

a UTF-8 encoded string

 
-
-
-

Returns

-

< 0 if str1 -compares before str2 -, -0 if they compare equal, > 0 if str1 -compares after str2 -.

-
-
-
-
-

g_utf8_collate_key ()

-
gchar *
-g_utf8_collate_key (const gchar *str,
-                    gssize len);
-

Converts a string into a collation key that can be compared -with other collation keys produced by the same function using -strcmp().

-

The results of comparing the collation keys of two strings -with strcmp() will always be the same as comparing the two -original keys with g_utf8_collate().

-

Note that this function depends on the current locale.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

a UTF-8 encoded string.

 

len

length of str -, in bytes, or -1 if str -is nul-terminated.

 
-
-
-

Returns

-

a newly allocated string. This string should -be freed with g_free() when you are done with it.

-
-
-
-
-

g_utf8_collate_key_for_filename ()

-
gchar *
-g_utf8_collate_key_for_filename (const gchar *str,
-                                 gssize len);
-

Converts a string into a collation key that can be compared -with other collation keys produced by the same function using strcmp().

-

In order to sort filenames correctly, this function treats the dot '.' -as a special case. Most dictionary orderings seem to consider it -insignificant, thus producing the ordering "event.c" "eventgenerator.c" -"event.h" instead of "event.c" "event.h" "eventgenerator.c". Also, we -would like to treat numbers intelligently so that "file1" "file10" "file5" -is sorted as "file1" "file5" "file10".

-

Note that this function depends on the current locale.

-
-

Parameters

-
----- - - - - - - - - - - - - -

str

a UTF-8 encoded string.

 

len

length of str -, in bytes, or -1 if str -is nul-terminated.

 
-
-
-

Returns

-

a newly allocated string. This string should -be freed with g_free() when you are done with it.

-
-

Since: 2.8

-
-
-
-

g_utf8_to_utf16 ()

-
gunichar2 *
-g_utf8_to_utf16 (const gchar *str,
-                 glong len,
-                 glong *items_read,
-                 glong *items_written,
-                 GError **error);
-

Convert a string from UTF-8 to UTF-16. A 0 character will be -added to the result after the converted text.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

str

a UTF-8 encoded string

 

len

the maximum length (number of bytes) of str -to use. -If len -< 0, then the string is nul-terminated.

 

items_read

location to store number of -bytes read, or NULL. If NULL, then G_CONVERT_ERROR_PARTIAL_INPUT will -be returned in case str -contains a trailing partial character. If -an error occurs then the index of the invalid input is stored here.

[out caller-allocates][optional]

items_written

location to store number -of gunichar2 written, or NULL. The value stored here does not include -the trailing 0.

[out caller-allocates][optional]

error

location to store the error occurring, or NULL to ignore -errors. Any of the errors in GConvertError other than -G_CONVERT_ERROR_NO_CONVERSION may occur.

 
-
-
-

Returns

-

a pointer to a newly allocated UTF-16 string. -This value must be freed with g_free(). If an error occurs, -NULL will be returned and error -set.

-
-
-
-
-

g_utf8_to_ucs4 ()

-
gunichar *
-g_utf8_to_ucs4 (const gchar *str,
-                glong len,
-                glong *items_read,
-                glong *items_written,
-                GError **error);
-

Convert a string from UTF-8 to a 32-bit fixed width -representation as UCS-4. A trailing 0 character will be added to the -string after the converted text.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

str

a UTF-8 encoded string

 

len

the maximum length of str -to use, in bytes. If len -< 0, -then the string is nul-terminated.

 

items_read

location to store number of -bytes read, or NULL. -If NULL, then G_CONVERT_ERROR_PARTIAL_INPUT will be -returned in case str -contains a trailing partial -character. If an error occurs then the index of the -invalid input is stored here.

[out caller-allocates][optional]

items_written

location to store number -of characters written or NULL. The value here stored does not include -the trailing 0 character.

[out caller-allocates][optional]

error

location to store the error occurring, or NULL to ignore -errors. Any of the errors in GConvertError other than -G_CONVERT_ERROR_NO_CONVERSION may occur.

 
-
-
-

Returns

-

a pointer to a newly allocated UCS-4 string. -This value must be freed with g_free(). If an error occurs, -NULL will be returned and error -set.

-
-
-
-
-

g_utf8_to_ucs4_fast ()

-
gunichar *
-g_utf8_to_ucs4_fast (const gchar *str,
-                     glong len,
-                     glong *items_written);
-

Convert a string from UTF-8 to a 32-bit fixed width -representation as UCS-4, assuming valid UTF-8 input. -This function is roughly twice as fast as g_utf8_to_ucs4() -but does no error checking on the input. A trailing 0 character -will be added to the string after the converted text.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

str

a UTF-8 encoded string

 

len

the maximum length of str -to use, in bytes. If len -< 0, -then the string is nul-terminated.

 

items_written

location to store the -number of characters in the result, or NULL.

[out caller-allocates][optional]
-
-
-

Returns

-

a pointer to a newly allocated UCS-4 string. -This value must be freed with g_free().

-
-
-
-
-

g_utf16_to_ucs4 ()

-
gunichar *
-g_utf16_to_ucs4 (const gunichar2 *str,
-                 glong len,
-                 glong *items_read,
-                 glong *items_written,
-                 GError **error);
-

Convert a string from UTF-16 to UCS-4. The result will be -nul-terminated.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

str

a UTF-16 encoded string

 

len

the maximum length (number of gunichar2) of str -to use. -If len -< 0, then the string is nul-terminated.

 

items_read

location to store number of -words read, or NULL. If NULL, then G_CONVERT_ERROR_PARTIAL_INPUT will -be returned in case str -contains a trailing partial character. If -an error occurs then the index of the invalid input is stored here.

[out caller-allocates][optional]

items_written

location to store number -of characters written, or NULL. The value stored here does not include -the trailing 0 character.

[out caller-allocates][optional]

error

location to store the error occurring, or NULL to ignore -errors. Any of the errors in GConvertError other than -G_CONVERT_ERROR_NO_CONVERSION may occur.

 
-
-
-

Returns

-

a pointer to a newly allocated UCS-4 string. -This value must be freed with g_free(). If an error occurs, -NULL will be returned and error -set.

-
-
-
-
-

g_utf16_to_utf8 ()

-
gchar *
-g_utf16_to_utf8 (const gunichar2 *str,
-                 glong len,
-                 glong *items_read,
-                 glong *items_written,
-                 GError **error);
-

Convert a string from UTF-16 to UTF-8. The result will be -terminated with a 0 byte.

-

Note that the input is expected to be already in native endianness, -an initial byte-order-mark character is not handled specially. -g_convert() can be used to convert a byte buffer of UTF-16 data of -ambiguous endianess.

-

Further note that this function does not validate the result -string; it may e.g. include embedded NUL characters. The only -validation done by this function is to ensure that the input can -be correctly interpreted as UTF-16, i.e. it doesn't contain -things unpaired surrogates.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

str

a UTF-16 encoded string

 

len

the maximum length (number of gunichar2) of str -to use. -If len -< 0, then the string is nul-terminated.

 

items_read

location to store number of -words read, or NULL. If NULL, then G_CONVERT_ERROR_PARTIAL_INPUT will -be returned in case str -contains a trailing partial character. If -an error occurs then the index of the invalid input is stored here.

[out caller-allocates][optional]

items_written

location to store number -of bytes written, or NULL. The value stored here does not include the -trailing 0 byte.

[out caller-allocates][optional]

error

location to store the error occurring, or NULL to ignore -errors. Any of the errors in GConvertError other than -G_CONVERT_ERROR_NO_CONVERSION may occur.

 
-
-
-

Returns

-

a pointer to a newly allocated UTF-8 string. -This value must be freed with g_free(). If an error occurs, -NULL will be returned and error -set.

-
-
-
-
-

g_ucs4_to_utf16 ()

-
gunichar2 *
-g_ucs4_to_utf16 (const gunichar *str,
-                 glong len,
-                 glong *items_read,
-                 glong *items_written,
-                 GError **error);
-

Convert a string from UCS-4 to UTF-16. A 0 character will be -added to the result after the converted text.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

str

a UCS-4 encoded string

 

len

the maximum length (number of characters) of str -to use. -If len -< 0, then the string is nul-terminated.

 

items_read

location to store number of -bytes read, or NULL. If an error occurs then the index of the invalid -input is stored here.

[out caller-allocates][optional]

items_written

location to store number -of gunichar2 written, or NULL. The value stored here does not include -the trailing 0.

[out caller-allocates][optional]

error

location to store the error occurring, or NULL to ignore -errors. Any of the errors in GConvertError other than -G_CONVERT_ERROR_NO_CONVERSION may occur.

 
-
-
-

Returns

-

a pointer to a newly allocated UTF-16 string. -This value must be freed with g_free(). If an error occurs, -NULL will be returned and error -set.

-
-
-
-
-

g_ucs4_to_utf8 ()

-
gchar *
-g_ucs4_to_utf8 (const gunichar *str,
-                glong len,
-                glong *items_read,
-                glong *items_written,
-                GError **error);
-

Convert a string from a 32-bit fixed width representation as UCS-4. -to UTF-8. The result will be terminated with a 0 byte.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

str

a UCS-4 encoded string

 

len

the maximum length (number of characters) of str -to use. -If len -< 0, then the string is nul-terminated.

 

items_read

location to store number of -characters read, or NULL.

[out caller-allocates][optional]

items_written

location to store number -of bytes written or NULL. The value here stored does not include the -trailing 0 byte.

[out caller-allocates][optional]

error

location to store the error occurring, or NULL to ignore -errors. Any of the errors in GConvertError other than -G_CONVERT_ERROR_NO_CONVERSION may occur.

 
-
-
-

Returns

-

a pointer to a newly allocated UTF-8 string. -This value must be freed with g_free(). If an error occurs, -NULL will be returned and error -set. In that case, items_read -will be set to the position of the first invalid input character.

-
-
-
-
-

g_unichar_to_utf8 ()

-
gint
-g_unichar_to_utf8 (gunichar c,
-                   gchar *outbuf);
-

Converts a single character to UTF-8.

-
-

Parameters

-
----- - - - - - - - - - - - - -

c

a Unicode character code

 

outbuf

output buffer, must have at -least 6 bytes of space. If NULL, the length will be computed and -returned and nothing will be written to outbuf -.

[out caller-allocates][optional]
-
-
-

Returns

-

number of bytes written

-
-
-
-
-

Types and Values

-
-

gunichar

-
typedef guint32 gunichar;
-
-

A type which can hold any UTF-32 or UCS-4 character code, -also known as a Unicode code point.

-

If you want to produce the UTF-8 representation of a gunichar, -use g_ucs4_to_utf8(). See also g_utf8_to_ucs4() for the reverse -process.

-

To print/scan values of this type as integer, use -G_GINT32_MODIFIER and/or G_GUINT32_FORMAT.

-

The notation to express a Unicode code point in running text is -as a hexadecimal number with four to six digits and uppercase -letters, prefixed by the string "U+". Leading zeros are omitted, -unless the code point would have fewer than four hexadecimal digits. -For example, "U+0041 LATIN CAPITAL LETTER A". To print a code point -in the U+-notation, use the format string "U+%04"G_GINT32_FORMAT"X". -To scan, use the format string "U+%06"G_GINT32_FORMAT"X".

-
- - - - - - - -
1
-2
-3
gunichar c;
-sscanf ("U+0041", "U+%06"G_GINT32_FORMAT"X", &amp;c)
-g_print ("Read U+%04"G_GINT32_FORMAT"X", c);
-
- -

-
-
-
-

gunichar2

-
typedef guint16 gunichar2;
-
-

A type which can hold any UTF-16 code -point<footnote id="utf16_surrogate_pairs">UTF-16 also has so called -<firstterm>surrogate pairs</firstterm> to encode characters beyond -the BMP as pairs of 16bit numbers. Surrogate pairs cannot be stored -in a single gunichar2 field, but all GLib functions accepting gunichar2 -arrays will correctly interpret surrogate pairs.</footnote>.

-

To print/scan values of this type to/from text you need to convert -to/from UTF-8, using g_utf16_to_utf8()/g_utf8_to_utf16().

-

To print/scan values of this type as integer, use -G_GINT16_MODIFIER and/or G_GUINT16_FORMAT.

-
-
-
-

G_UNICHAR_MAX_DECOMPOSITION_LENGTH

-
#define G_UNICHAR_MAX_DECOMPOSITION_LENGTH 18 /* codepoints */
-
-

The maximum length (in codepoints) of a compatibility or canonical -decomposition of a single Unicode character.

-

This is as defined by Unicode 6.1.

-

Since: 2.32

-
-
-
-

enum GUnicodeType

-

These are the possible character classifications from the -Unicode specification. -See Unicode Character Database.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_UNICODE_CONTROL

-

General category "Other, Control" (Cc)

-
 

G_UNICODE_FORMAT

-

General category "Other, Format" (Cf)

-
 

G_UNICODE_UNASSIGNED

-

General category "Other, Not Assigned" (Cn)

-
 

G_UNICODE_PRIVATE_USE

-

General category "Other, Private Use" (Co)

-
 

G_UNICODE_SURROGATE

-

General category "Other, Surrogate" (Cs)

-
 

G_UNICODE_LOWERCASE_LETTER

-

General category "Letter, Lowercase" (Ll)

-
 

G_UNICODE_MODIFIER_LETTER

-

General category "Letter, Modifier" (Lm)

-
 

G_UNICODE_OTHER_LETTER

-

General category "Letter, Other" (Lo)

-
 

G_UNICODE_TITLECASE_LETTER

-

General category "Letter, Titlecase" (Lt)

-
 

G_UNICODE_UPPERCASE_LETTER

-

General category "Letter, Uppercase" (Lu)

-
 

G_UNICODE_SPACING_MARK

-

General category "Mark, Spacing" (Mc)

-
 

G_UNICODE_ENCLOSING_MARK

-

General category "Mark, Enclosing" (Me)

-
 

G_UNICODE_NON_SPACING_MARK

-

General category "Mark, Nonspacing" (Mn)

-
 

G_UNICODE_DECIMAL_NUMBER

-

General category "Number, Decimal Digit" (Nd)

-
 

G_UNICODE_LETTER_NUMBER

-

General category "Number, Letter" (Nl)

-
 

G_UNICODE_OTHER_NUMBER

-

General category "Number, Other" (No)

-
 

G_UNICODE_CONNECT_PUNCTUATION

-

General category "Punctuation, Connector" (Pc)

-
 

G_UNICODE_DASH_PUNCTUATION

-

General category "Punctuation, Dash" (Pd)

-
 

G_UNICODE_CLOSE_PUNCTUATION

-

General category "Punctuation, Close" (Pe)

-
 

G_UNICODE_FINAL_PUNCTUATION

-

General category "Punctuation, Final quote" (Pf)

-
 

G_UNICODE_INITIAL_PUNCTUATION

-

General category "Punctuation, Initial quote" (Pi)

-
 

G_UNICODE_OTHER_PUNCTUATION

-

General category "Punctuation, Other" (Po)

-
 

G_UNICODE_OPEN_PUNCTUATION

-

General category "Punctuation, Open" (Ps)

-
 

G_UNICODE_CURRENCY_SYMBOL

-

General category "Symbol, Currency" (Sc)

-
 

G_UNICODE_MODIFIER_SYMBOL

-

General category "Symbol, Modifier" (Sk)

-
 

G_UNICODE_MATH_SYMBOL

-

General category "Symbol, Math" (Sm)

-
 

G_UNICODE_OTHER_SYMBOL

-

General category "Symbol, Other" (So)

-
 

G_UNICODE_LINE_SEPARATOR

-

General category "Separator, Line" (Zl)

-
 

G_UNICODE_PARAGRAPH_SEPARATOR

-

General category "Separator, Paragraph" (Zp)

-
 

G_UNICODE_SPACE_SEPARATOR

-

General category "Separator, Space" (Zs)

-
 
-
-
-
-
-

G_UNICODE_COMBINING_MARK

-
#define G_UNICODE_COMBINING_MARK G_UNICODE_SPACING_MARK
-
-
-

G_UNICODE_COMBINING_MARK has been deprecated since version 2.30 and should not be used in newly-written code.

-

Use G_UNICODE_SPACING_MARK.

-
-

Older name for G_UNICODE_SPACING_MARK.

-
-
-
-

enum GUnicodeBreakType

-

These are the possible line break classifications.

-

Since new unicode versions may add new types here, applications should be ready -to handle unknown values. They may be regarded as G_UNICODE_BREAK_UNKNOWN.

-

See Unicode Line Breaking Algorithm.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_UNICODE_BREAK_MANDATORY

-

Mandatory Break (BK)

-
 

G_UNICODE_BREAK_CARRIAGE_RETURN

-

Carriage Return (CR)

-
 

G_UNICODE_BREAK_LINE_FEED

-

Line Feed (LF)

-
 

G_UNICODE_BREAK_COMBINING_MARK

-

Attached Characters and Combining Marks (CM)

-
 

G_UNICODE_BREAK_SURROGATE

-

Surrogates (SG)

-
 

G_UNICODE_BREAK_ZERO_WIDTH_SPACE

-

Zero Width Space (ZW)

-
 

G_UNICODE_BREAK_INSEPARABLE

-

Inseparable (IN)

-
 

G_UNICODE_BREAK_NON_BREAKING_GLUE

-

Non-breaking ("Glue") (GL)

-
 

G_UNICODE_BREAK_CONTINGENT

-

Contingent Break Opportunity (CB)

-
 

G_UNICODE_BREAK_SPACE

-

Space (SP)

-
 

G_UNICODE_BREAK_AFTER

-

Break Opportunity After (BA)

-
 

G_UNICODE_BREAK_BEFORE

-

Break Opportunity Before (BB)

-
 

G_UNICODE_BREAK_BEFORE_AND_AFTER

-

Break Opportunity Before and After (B2)

-
 

G_UNICODE_BREAK_HYPHEN

-

Hyphen (HY)

-
 

G_UNICODE_BREAK_NON_STARTER

-

Nonstarter (NS)

-
 

G_UNICODE_BREAK_OPEN_PUNCTUATION

-

Opening Punctuation (OP)

-
 

G_UNICODE_BREAK_CLOSE_PUNCTUATION

-

Closing Punctuation (CL)

-
 

G_UNICODE_BREAK_QUOTATION

-

Ambiguous Quotation (QU)

-
 

G_UNICODE_BREAK_EXCLAMATION

-

Exclamation/Interrogation (EX)

-
 

G_UNICODE_BREAK_IDEOGRAPHIC

-

Ideographic (ID)

-
 

G_UNICODE_BREAK_NUMERIC

-

Numeric (NU)

-
 

G_UNICODE_BREAK_INFIX_SEPARATOR

-

Infix Separator (Numeric) (IS)

-
 

G_UNICODE_BREAK_SYMBOL

-

Symbols Allowing Break After (SY)

-
 

G_UNICODE_BREAK_ALPHABETIC

-

Ordinary Alphabetic and Symbol Characters (AL)

-
 

G_UNICODE_BREAK_PREFIX

-

Prefix (Numeric) (PR)

-
 

G_UNICODE_BREAK_POSTFIX

-

Postfix (Numeric) (PO)

-
 

G_UNICODE_BREAK_COMPLEX_CONTEXT

-

Complex Content Dependent (South East Asian) (SA)

-
 

G_UNICODE_BREAK_AMBIGUOUS

-

Ambiguous (Alphabetic or Ideographic) (AI)

-
 

G_UNICODE_BREAK_UNKNOWN

-

Unknown (XX)

-
 

G_UNICODE_BREAK_NEXT_LINE

-

Next Line (NL)

-
 

G_UNICODE_BREAK_WORD_JOINER

-

Word Joiner (WJ)

-
 

G_UNICODE_BREAK_HANGUL_L_JAMO

-

Hangul L Jamo (JL)

-
 

G_UNICODE_BREAK_HANGUL_V_JAMO

-

Hangul V Jamo (JV)

-
 

G_UNICODE_BREAK_HANGUL_T_JAMO

-

Hangul T Jamo (JT)

-
 

G_UNICODE_BREAK_HANGUL_LV_SYLLABLE

-

Hangul LV Syllable (H2)

-
 

G_UNICODE_BREAK_HANGUL_LVT_SYLLABLE

-

Hangul LVT Syllable (H3)

-
 

G_UNICODE_BREAK_CLOSE_PARANTHESIS

-

Closing Parenthesis (CP). Since 2.28

-
 

G_UNICODE_BREAK_CONDITIONAL_JAPANESE_STARTER

-

Conditional Japanese Starter (CJ). Since: 2.32

-
 

G_UNICODE_BREAK_HEBREW_LETTER

-

Hebrew Letter (HL). Since: 2.32

-
 

G_UNICODE_BREAK_REGIONAL_INDICATOR

-

Regional Indicator (RI). Since: 2.36

-
 

G_UNICODE_BREAK_EMOJI_BASE

-

Emoji Base (EB). Since: 2.50

-
 

G_UNICODE_BREAK_EMOJI_MODIFIER

-

Emoji Modifier (EM). Since: 2.50

-
 

G_UNICODE_BREAK_ZERO_WIDTH_JOINER

-

Zero Width Joiner (ZWJ). Since: 2.50

-
 
-
-
-
-
-

enum GUnicodeScript

-

The GUnicodeScript enumeration identifies different writing -systems. The values correspond to the names as defined in the -Unicode standard. The enumeration has been added in GLib 2.14, -and is interchangeable with PangoScript.

-

Note that new types may be added in the future. Applications -should be ready to handle unknown values. -See Unicode Standard Annex 24: Script names.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_UNICODE_SCRIPT_INVALID_CODE

-

a value never returned from g_unichar_get_script()

-
 

G_UNICODE_SCRIPT_COMMON

-

a character used by multiple different scripts

-
 

G_UNICODE_SCRIPT_INHERITED

-

a mark glyph that takes its script from the - base glyph to which it is attached

-
 

G_UNICODE_SCRIPT_ARABIC

-

Arabic

-
 

G_UNICODE_SCRIPT_ARMENIAN

-

Armenian

-
 

G_UNICODE_SCRIPT_BENGALI

-

Bengali

-
 

G_UNICODE_SCRIPT_BOPOMOFO

-

Bopomofo

-
 

G_UNICODE_SCRIPT_CHEROKEE

-

Cherokee

-
 

G_UNICODE_SCRIPT_COPTIC

-

Coptic

-
 

G_UNICODE_SCRIPT_CYRILLIC

-

Cyrillic

-
 

G_UNICODE_SCRIPT_DESERET

-

Deseret

-
 

G_UNICODE_SCRIPT_DEVANAGARI

-

Devanagari

-
 

G_UNICODE_SCRIPT_ETHIOPIC

-

Ethiopic

-
 

G_UNICODE_SCRIPT_GEORGIAN

-

Georgian

-
 

G_UNICODE_SCRIPT_GOTHIC

-

Gothic

-
 

G_UNICODE_SCRIPT_GREEK

-

Greek

-
 

G_UNICODE_SCRIPT_GUJARATI

-

Gujarati

-
 

G_UNICODE_SCRIPT_GURMUKHI

-

Gurmukhi

-
 

G_UNICODE_SCRIPT_HAN

-

Han

-
 

G_UNICODE_SCRIPT_HANGUL

-

Hangul

-
 

G_UNICODE_SCRIPT_HEBREW

-

Hebrew

-
 

G_UNICODE_SCRIPT_HIRAGANA

-

Hiragana

-
 

G_UNICODE_SCRIPT_KANNADA

-

Kannada

-
 

G_UNICODE_SCRIPT_KATAKANA

-

Katakana

-
 

G_UNICODE_SCRIPT_KHMER

-

Khmer

-
 

G_UNICODE_SCRIPT_LAO

-

Lao

-
 

G_UNICODE_SCRIPT_LATIN

-

Latin

-
 

G_UNICODE_SCRIPT_MALAYALAM

-

Malayalam

-
 

G_UNICODE_SCRIPT_MONGOLIAN

-

Mongolian

-
 

G_UNICODE_SCRIPT_MYANMAR

-

Myanmar

-
 

G_UNICODE_SCRIPT_OGHAM

-

Ogham

-
 

G_UNICODE_SCRIPT_OLD_ITALIC

-

Old Italic

-
 

G_UNICODE_SCRIPT_ORIYA

-

Oriya

-
 

G_UNICODE_SCRIPT_RUNIC

-

Runic

-
 

G_UNICODE_SCRIPT_SINHALA

-

Sinhala

-
 

G_UNICODE_SCRIPT_SYRIAC

-

Syriac

-
 

G_UNICODE_SCRIPT_TAMIL

-

Tamil

-
 

G_UNICODE_SCRIPT_TELUGU

-

Telugu

-
 

G_UNICODE_SCRIPT_THAANA

-

Thaana

-
 

G_UNICODE_SCRIPT_THAI

-

Thai

-
 

G_UNICODE_SCRIPT_TIBETAN

-

Tibetan

-
 

G_UNICODE_SCRIPT_CANADIAN_ABORIGINAL

-

Canadian Aboriginal

-
 

G_UNICODE_SCRIPT_YI

-

Yi

-
 

G_UNICODE_SCRIPT_TAGALOG

-

Tagalog

-
 

G_UNICODE_SCRIPT_HANUNOO

-

Hanunoo

-
 

G_UNICODE_SCRIPT_BUHID

-

Buhid

-
 

G_UNICODE_SCRIPT_TAGBANWA

-

Tagbanwa

-
 

G_UNICODE_SCRIPT_BRAILLE

-

Braille

-
 

G_UNICODE_SCRIPT_CYPRIOT

-

Cypriot

-
 

G_UNICODE_SCRIPT_LIMBU

-

Limbu

-
 

G_UNICODE_SCRIPT_OSMANYA

-

Osmanya

-
 

G_UNICODE_SCRIPT_SHAVIAN

-

Shavian

-
 

G_UNICODE_SCRIPT_LINEAR_B

-

Linear B

-
 

G_UNICODE_SCRIPT_TAI_LE

-

Tai Le

-
 

G_UNICODE_SCRIPT_UGARITIC

-

Ugaritic

-
 

G_UNICODE_SCRIPT_NEW_TAI_LUE

-

New Tai Lue

-
 

G_UNICODE_SCRIPT_BUGINESE

-

Buginese

-
 

G_UNICODE_SCRIPT_GLAGOLITIC

-

Glagolitic

-
 

G_UNICODE_SCRIPT_TIFINAGH

-

Tifinagh

-
 

G_UNICODE_SCRIPT_SYLOTI_NAGRI

-

Syloti Nagri

-
 

G_UNICODE_SCRIPT_OLD_PERSIAN

-

Old Persian

-
 

G_UNICODE_SCRIPT_KHAROSHTHI

-

Kharoshthi

-
 

G_UNICODE_SCRIPT_UNKNOWN

-

an unassigned code point

-
 

G_UNICODE_SCRIPT_BALINESE

-

Balinese

-
 

G_UNICODE_SCRIPT_CUNEIFORM

-

Cuneiform

-
 

G_UNICODE_SCRIPT_PHOENICIAN

-

Phoenician

-
 

G_UNICODE_SCRIPT_PHAGS_PA

-

Phags-pa

-
 

G_UNICODE_SCRIPT_NKO

-

N'Ko

-
 

G_UNICODE_SCRIPT_KAYAH_LI

-

Kayah Li. Since 2.16.3

-
 

G_UNICODE_SCRIPT_LEPCHA

-

Lepcha. Since 2.16.3

-
 

G_UNICODE_SCRIPT_REJANG

-

Rejang. Since 2.16.3

-
 

G_UNICODE_SCRIPT_SUNDANESE

-

Sundanese. Since 2.16.3

-
 

G_UNICODE_SCRIPT_SAURASHTRA

-

Saurashtra. Since 2.16.3

-
 

G_UNICODE_SCRIPT_CHAM

-

Cham. Since 2.16.3

-
 

G_UNICODE_SCRIPT_OL_CHIKI

-

Ol Chiki. Since 2.16.3

-
 

G_UNICODE_SCRIPT_VAI

-

Vai. Since 2.16.3

-
 

G_UNICODE_SCRIPT_CARIAN

-

Carian. Since 2.16.3

-
 

G_UNICODE_SCRIPT_LYCIAN

-

Lycian. Since 2.16.3

-
 

G_UNICODE_SCRIPT_LYDIAN

-

Lydian. Since 2.16.3

-
 

G_UNICODE_SCRIPT_AVESTAN

-

Avestan. Since 2.26

-
 

G_UNICODE_SCRIPT_BAMUM

-

Bamum. Since 2.26

-
 

G_UNICODE_SCRIPT_EGYPTIAN_HIEROGLYPHS

-

Egyptian Hieroglpyhs. Since 2.26

-
 

G_UNICODE_SCRIPT_IMPERIAL_ARAMAIC

-

Imperial Aramaic. Since 2.26

-
 

G_UNICODE_SCRIPT_INSCRIPTIONAL_PAHLAVI

-

Inscriptional Pahlavi. Since 2.26

-
 

G_UNICODE_SCRIPT_INSCRIPTIONAL_PARTHIAN

-

Inscriptional Parthian. Since 2.26

-
 

G_UNICODE_SCRIPT_JAVANESE

-

Javanese. Since 2.26

-
 

G_UNICODE_SCRIPT_KAITHI

-

Kaithi. Since 2.26

-
 

G_UNICODE_SCRIPT_LISU

-

Lisu. Since 2.26

-
 

G_UNICODE_SCRIPT_MEETEI_MAYEK

-

Meetei Mayek. Since 2.26

-
 

G_UNICODE_SCRIPT_OLD_SOUTH_ARABIAN

-

Old South Arabian. Since 2.26

-
 

G_UNICODE_SCRIPT_OLD_TURKIC

-

Old Turkic. Since 2.28

-
 

G_UNICODE_SCRIPT_SAMARITAN

-

Samaritan. Since 2.26

-
 

G_UNICODE_SCRIPT_TAI_THAM

-

Tai Tham. Since 2.26

-
 

G_UNICODE_SCRIPT_TAI_VIET

-

Tai Viet. Since 2.26

-
 

G_UNICODE_SCRIPT_BATAK

-

Batak. Since 2.28

-
 

G_UNICODE_SCRIPT_BRAHMI

-

Brahmi. Since 2.28

-
 

G_UNICODE_SCRIPT_MANDAIC

-

Mandaic. Since 2.28

-
 

G_UNICODE_SCRIPT_CHAKMA

-

Chakma. Since: 2.32

-
 

G_UNICODE_SCRIPT_MEROITIC_CURSIVE

-

Meroitic Cursive. Since: 2.32

-
 

G_UNICODE_SCRIPT_MEROITIC_HIEROGLYPHS

-

Meroitic Hieroglyphs. Since: 2.32

-
 

G_UNICODE_SCRIPT_MIAO

-

Miao. Since: 2.32

-
 

G_UNICODE_SCRIPT_SHARADA

-

Sharada. Since: 2.32

-
 

G_UNICODE_SCRIPT_SORA_SOMPENG

-

Sora Sompeng. Since: 2.32

-
 

G_UNICODE_SCRIPT_TAKRI

-

Takri. Since: 2.32

-
 

G_UNICODE_SCRIPT_BASSA_VAH

-

Bassa. Since: 2.42

-
 

G_UNICODE_SCRIPT_CAUCASIAN_ALBANIAN

-

Caucasian Albanian. Since: 2.42

-
 

G_UNICODE_SCRIPT_DUPLOYAN

-

Duployan. Since: 2.42

-
 

G_UNICODE_SCRIPT_ELBASAN

-

Elbasan. Since: 2.42

-
 

G_UNICODE_SCRIPT_GRANTHA

-

Grantha. Since: 2.42

-
 

G_UNICODE_SCRIPT_KHOJKI

-

Kjohki. Since: 2.42

-
 

G_UNICODE_SCRIPT_KHUDAWADI

-

Khudawadi, Sindhi. Since: 2.42

-
 

G_UNICODE_SCRIPT_LINEAR_A

-

Linear A. Since: 2.42

-
 

G_UNICODE_SCRIPT_MAHAJANI

-

Mahajani. Since: 2.42

-
 

G_UNICODE_SCRIPT_MANICHAEAN

-

Manichaean. Since: 2.42

-
 

G_UNICODE_SCRIPT_MENDE_KIKAKUI

-

Mende Kikakui. Since: 2.42

-
 

G_UNICODE_SCRIPT_MODI

-

Modi. Since: 2.42

-
 

G_UNICODE_SCRIPT_MRO

-

Mro. Since: 2.42

-
 

G_UNICODE_SCRIPT_NABATAEAN

-

Nabataean. Since: 2.42

-
 

G_UNICODE_SCRIPT_OLD_NORTH_ARABIAN

-

Old North Arabian. Since: 2.42

-
 

G_UNICODE_SCRIPT_OLD_PERMIC

-

Old Permic. Since: 2.42

-
 

G_UNICODE_SCRIPT_PAHAWH_HMONG

-

Pahawh Hmong. Since: 2.42

-
 

G_UNICODE_SCRIPT_PALMYRENE

-

Palmyrene. Since: 2.42

-
 

G_UNICODE_SCRIPT_PAU_CIN_HAU

-

Pau Cin Hau. Since: 2.42

-
 

G_UNICODE_SCRIPT_PSALTER_PAHLAVI

-

Psalter Pahlavi. Since: 2.42

-
 

G_UNICODE_SCRIPT_SIDDHAM

-

Siddham. Since: 2.42

-
 

G_UNICODE_SCRIPT_TIRHUTA

-

Tirhuta. Since: 2.42

-
 

G_UNICODE_SCRIPT_WARANG_CITI

-

Warang Citi. Since: 2.42

-
 

G_UNICODE_SCRIPT_AHOM

-

Ahom. Since: 2.48

-
 

G_UNICODE_SCRIPT_ANATOLIAN_HIEROGLYPHS

-

Anatolian Hieroglyphs. Since: 2.48

-
 

G_UNICODE_SCRIPT_HATRAN

-

Hatran. Since: 2.48

-
 

G_UNICODE_SCRIPT_MULTANI

-

Multani. Since: 2.48

-
 

G_UNICODE_SCRIPT_OLD_HUNGARIAN

-

Old Hungarian. Since: 2.48

-
 

G_UNICODE_SCRIPT_SIGNWRITING

-

Signwriting. Since: 2.48

-
 

G_UNICODE_SCRIPT_ADLAM

-

Adlam. Since: 2.50

-
 

G_UNICODE_SCRIPT_BHAIKSUKI

-

Bhaiksuki. Since: 2.50

-
 

G_UNICODE_SCRIPT_MARCHEN

-

Marchen. Since: 2.50

-
 

G_UNICODE_SCRIPT_NEWA

-

Newa. Since: 2.50

-
 

G_UNICODE_SCRIPT_OSAGE

-

Osage. Since: 2.50

-
 

G_UNICODE_SCRIPT_TANGUT

-

Tangut. Since: 2.50

-
 
-
-
-
-
-

enum GNormalizeMode

-

Defines how a Unicode string is transformed in a canonical -form, standardizing such issues as whether a character with -an accent is represented as a base character and combining -accent or as a single precomposed character. Unicode strings -should generally be normalized before comparing them.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_NORMALIZE_DEFAULT

-

standardize differences that do not affect the - text content, such as the above-mentioned accent representation

-
 

G_NORMALIZE_NFD

-

another name for G_NORMALIZE_DEFAULT

-
 

G_NORMALIZE_DEFAULT_COMPOSE

-

like G_NORMALIZE_DEFAULT, but with - composed forms rather than a maximally decomposed form

-
 

G_NORMALIZE_NFC

-

another name for G_NORMALIZE_DEFAULT_COMPOSE

-
 

G_NORMALIZE_ALL

-

beyond G_NORMALIZE_DEFAULT also standardize the - "compatibility" characters in Unicode, such as SUPERSCRIPT THREE - to the standard forms (in this case DIGIT THREE). Formatting - information may be lost but for most text operations such - characters should be considered the same

-
 

G_NORMALIZE_NFKD

-

another name for G_NORMALIZE_ALL

-
 

G_NORMALIZE_ALL_COMPOSE

-

like G_NORMALIZE_ALL, but with composed - forms rather than a maximally decomposed form

-
 

G_NORMALIZE_NFKC

-

another name for G_NORMALIZE_ALL_COMPOSE

-
 
-
-
-
-
-

See Also

-

g_locale_to_utf8(), g_locale_from_utf8()

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Version-Information.html b/docs/reference/glib/html/glib-Version-Information.html deleted file mode 100644 index d7135f073..000000000 --- a/docs/reference/glib/html/glib-Version-Information.html +++ /dev/null @@ -1,532 +0,0 @@ - - - - -Version Information: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Version Information

-

Version Information — variables and functions to check the GLib version

-
-
-

Functions

-
---- - - - - - - - - - - -
const gchar * - -glib_check_version () -
#define -GLIB_CHECK_VERSION() -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
extern const guint glib_major_version
extern const guint glib_minor_version
extern const guint glib_micro_version
extern const guint glib_binary_age
extern const guint glib_interface_age
#defineGLIB_MAJOR_VERSION
#defineGLIB_MINOR_VERSION
#defineGLIB_MICRO_VERSION
#defineGLIB_VERSION_2_26
#defineGLIB_VERSION_2_28
#defineGLIB_VERSION_2_30
#defineGLIB_VERSION_2_32
#defineGLIB_VERSION_2_34
#defineGLIB_VERSION_2_36
#defineGLIB_VERSION_2_38
#defineGLIB_VERSION_2_40
#defineGLIB_VERSION_2_42
#defineGLIB_VERSION_2_44
#defineGLIB_VERSION_2_46
#defineGLIB_VERSION_2_48
#defineGLIB_VERSION_2_50
#defineGLIB_VERSION_MIN_REQUIRED
#defineGLIB_VERSION_MAX_ALLOWED
#defineGLIB_DISABLE_DEPRECATION_WARNINGS
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

GLib provides version information, primarily useful in configure -checks for builds that have a configure script. Applications will -not typically use the features described here.

-

The GLib headers annotate deprecated APIs in a way that produces -compiler warnings if these deprecated APIs are used. The warnings -can be turned off by defining the macro GLIB_DISABLE_DEPRECATION_WARNINGS -before including the glib.h header.

-

GLib also provides support for building applications against -defined subsets of deprecated or new GLib APIs. Define the macro -GLIB_VERSION_MIN_REQUIRED to specify up to what version of GLib -you want to receive warnings about deprecated APIs. Define the -macro GLIB_VERSION_MAX_ALLOWED to specify the newest version of -GLib whose API you want to use.

-
-
-

Functions

-
-

glib_check_version ()

-
const gchar *
-glib_check_version (guint required_major,
-                    guint required_minor,
-                    guint required_micro);
-

Checks that the GLib library in use is compatible with the -given version. Generally you would pass in the constants -GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION -as the three arguments to this function; that produces -a check that the library in use is compatible with -the version of GLib the application or module was compiled -against.

-

Compatibility is defined by two things: first the version -of the running library is newer than the version -required_major.required_minor -.required_micro -. Second -the running library must be binary compatible with the -version required_major.required_minor -.required_micro - -(same major version.)

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

required_major

the required major version

 

required_minor

the required minor version

 

required_micro

the required micro version

 
-
-
-

Returns

-

NULL if the GLib library is compatible with the -given version, or a string describing the version mismatch. -The returned string is owned by GLib and must not be modified -or freed.

-
-

Since: 2.6

-
-
-
-

GLIB_CHECK_VERSION()

-
#define             GLIB_CHECK_VERSION(major,minor,micro)
-

Checks the version of the GLib library that is being compiled -against. See glib_check_version() for a runtime check.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

major

the major version to check for

 

minor

the minor version to check for

 

micro

the micro version to check for

 
-
-
-

Returns

-

TRUE if the version of the GLib header files -is the same as or newer than the passed-in version.

-
-
-
-
-

Types and Values

-
-

glib_major_version

-
extern const guint glib_major_version;
-
-

The major version of the GLib library.

-

An integer variable exported from the library linked -against at application run time.

-
-
-
-

glib_minor_version

-
extern const guint glib_minor_version;
-
-

The minor version number of the GLib library.

-

An integer variable exported from the library linked -against at application run time.

-
-
-
-

glib_micro_version

-
extern const guint glib_micro_version;
-
-

The micro version number of the GLib library.

-

An integer variable exported from the library linked -against at application run time.

-
-
-
-

glib_binary_age

-
extern const guint glib_binary_age;
-
-

The binary age of the GLib library. -Defines how far back backwards compatibility reaches.

-

An integer variable exported from the library linked -against at application run time.

-
-
-
-

glib_interface_age

-
extern const guint glib_interface_age;
-
-

The interface age of the GLib library. -Defines how far back the API has last been extended.

-

An integer variable exported from the library linked -against at application run time.

-
-
-
-

GLIB_MAJOR_VERSION

-
#define GLIB_MAJOR_VERSION 2
-
-

The major version number of the GLib library.

-

Like glib_major_version, but from the headers used at -application compile time, rather than from the library -linked against at application run time.

-
-
-
-

GLIB_MINOR_VERSION

-
#define GLIB_MINOR_VERSION 52
-
-

The minor version number of the GLib library.

-

Like gtk_minor_version, but from the headers used at -application compile time, rather than from the library -linked against at application run time.

-
-
-
-

GLIB_MICRO_VERSION

-
#define GLIB_MICRO_VERSION 3
-
-

The micro version number of the GLib library.

-

Like gtk_micro_version, but from the headers used at -application compile time, rather than from the library -linked against at application run time.

-
-
-
-

GLIB_VERSION_2_26

-
#define GLIB_VERSION_2_26       (G_ENCODE_VERSION (2, 26))
-
-

A macro that evaluates to the 2.26 version of GLib, in a format -that can be used by the C pre-processor.

-

Since: 2.32

-
-
-
-

GLIB_VERSION_2_28

-
#define GLIB_VERSION_2_28       (G_ENCODE_VERSION (2, 28))
-
-

A macro that evaluates to the 2.28 version of GLib, in a format -that can be used by the C pre-processor.

-

Since: 2.32

-
-
-
-

GLIB_VERSION_2_30

-
#define GLIB_VERSION_2_30       (G_ENCODE_VERSION (2, 30))
-
-

A macro that evaluates to the 2.30 version of GLib, in a format -that can be used by the C pre-processor.

-

Since: 2.32

-
-
-
-

GLIB_VERSION_2_32

-
#define GLIB_VERSION_2_32       (G_ENCODE_VERSION (2, 32))
-
-

A macro that evaluates to the 2.32 version of GLib, in a format -that can be used by the C pre-processor.

-

Since: 2.32

-
-
-
-

GLIB_VERSION_2_34

-
#define GLIB_VERSION_2_34       (G_ENCODE_VERSION (2, 34))
-
-

A macro that evaluates to the 2.34 version of GLib, in a format -that can be used by the C pre-processor.

-

Since: 2.34

-
-
-
-

GLIB_VERSION_2_36

-
#define GLIB_VERSION_2_36       (G_ENCODE_VERSION (2, 36))
-
-

A macro that evaluates to the 2.36 version of GLib, in a format -that can be used by the C pre-processor.

-

Since: 2.36

-
-
-
-

GLIB_VERSION_2_38

-
#define GLIB_VERSION_2_38       (G_ENCODE_VERSION (2, 38))
-
-

A macro that evaluates to the 2.38 version of GLib, in a format -that can be used by the C pre-processor.

-

Since: 2.38

-
-
-
-

GLIB_VERSION_2_40

-
#define GLIB_VERSION_2_40       (G_ENCODE_VERSION (2, 40))
-
-

A macro that evaluates to the 2.40 version of GLib, in a format -that can be used by the C pre-processor.

-

Since: 2.40

-
-
-
-

GLIB_VERSION_2_42

-
#define GLIB_VERSION_2_42       (G_ENCODE_VERSION (2, 42))
-
-

A macro that evaluates to the 2.42 version of GLib, in a format -that can be used by the C pre-processor.

-

Since: 2.42

-
-
-
-

GLIB_VERSION_2_44

-
#define GLIB_VERSION_2_44       (G_ENCODE_VERSION (2, 44))
-
-

A macro that evaluates to the 2.44 version of GLib, in a format -that can be used by the C pre-processor.

-

Since: 2.44

-
-
-
-

GLIB_VERSION_2_46

-
#define GLIB_VERSION_2_46       (G_ENCODE_VERSION (2, 46))
-
-

A macro that evaluates to the 2.46 version of GLib, in a format -that can be used by the C pre-processor.

-

Since: 2.46

-
-
-
-

GLIB_VERSION_2_48

-
#define GLIB_VERSION_2_48       (G_ENCODE_VERSION (2, 48))
-
-

A macro that evaluates to the 2.48 version of GLib, in a format -that can be used by the C pre-processor.

-

Since: 2.48

-
-
-
-

GLIB_VERSION_2_50

-
#define GLIB_VERSION_2_50       (G_ENCODE_VERSION (2, 50))
-
-

A macro that evaluates to the 2.50 version of GLib, in a format -that can be used by the C pre-processor.

-

Since: 2.50

-
-
-
-

GLIB_VERSION_MIN_REQUIRED

-
# define GLIB_VERSION_MIN_REQUIRED      (GLIB_VERSION_CUR_STABLE)
-
-

A macro that should be defined by the user prior to including -the glib.h header. -The definition should be one of the predefined GLib version -macros: GLIB_VERSION_2_26, GLIB_VERSION_2_28,...

-

This macro defines the earliest version of GLib that the package is -required to be able to compile against.

-

If the compiler is configured to warn about the use of deprecated -functions, then using functions that were deprecated in version -GLIB_VERSION_MIN_REQUIRED or earlier will cause warnings (but -using functions deprecated in later releases will not).

-

Since: 2.32

-
-
-
-

GLIB_VERSION_MAX_ALLOWED

-
# define GLIB_VERSION_MAX_ALLOWED      (GLIB_VERSION_CUR_STABLE)
-
-

A macro that should be defined by the user prior to including -the glib.h header. -The definition should be one of the predefined GLib version -macros: GLIB_VERSION_2_26, GLIB_VERSION_2_28,...

-

This macro defines the latest version of the GLib API that the -package is allowed to make use of.

-

If the compiler is configured to warn about the use of deprecated -functions, then using functions added after version -GLIB_VERSION_MAX_ALLOWED will cause warnings.

-

Unless you are using GLIB_CHECK_VERSION() or the like to compile -different code depending on the GLib version, then this should be -set to the same value as GLIB_VERSION_MIN_REQUIRED.

-

Since: 2.32

-
-
-
-

GLIB_DISABLE_DEPRECATION_WARNINGS

-
#ifdef GLIB_DISABLE_DEPRECATION_WARNINGS
-
-

A macro that should be defined before including the glib.h header. -If it is defined, no compiler warnings will be produced for uses -of deprecated GLib APIs.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Warnings-and-Assertions.html b/docs/reference/glib/html/glib-Warnings-and-Assertions.html deleted file mode 100644 index 68618e56d..000000000 --- a/docs/reference/glib/html/glib-Warnings-and-Assertions.html +++ /dev/null @@ -1,584 +0,0 @@ - - - - -Warnings and Assertions: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Warnings and Assertions

-

Warnings and Assertions

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -g_print () -
-GPrintFunc - -g_set_print_handler () -
-void - -(*GPrintFunc) () -
-void - -g_printerr () -
-GPrintFunc - -g_set_printerr_handler () -
#define -g_return_if_fail() -
#define -g_return_val_if_fail() -
#defineg_return_if_reached
#define -g_return_val_if_reached() -
#define -g_warn_if_fail() -
#defineg_warn_if_reached
-void - -g_on_error_query () -
-void - -g_on_error_stack_trace () -
#defineG_BREAKPOINT
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-
-
-

Functions

-
-

g_print ()

-
void
-g_print (const gchar *format,
-         ...);
-

Outputs a formatted message via the print handler. -The default print handler simply outputs the message to stdout, without -appending a trailing new-line character. Typically, format - should end with -its own new-line character.

-

g_print() should not be used from within libraries for debugging -messages, since it may be redirected by applications to special -purpose message windows or even files. Instead, libraries should -use g_log(), g_log_structured(), or the convenience macros g_message(), -g_warning() and g_error().

-
-

Parameters

-
----- - - - - - - - - - - - - -

format

the message format. See the printf() documentation

 

...

the parameters to insert into the format string

 
-
-
-
-
-

g_set_print_handler ()

-
GPrintFunc
-g_set_print_handler (GPrintFunc func);
-

Sets the print handler.

-

Any messages passed to g_print() will be output via -the new handler. The default handler simply outputs -the message to stdout. By providing your own handler -you can redirect the output, to a GTK+ widget or a -log file for example.

-
-

Parameters

-
----- - - - - - -

func

the new print handler

 
-
-
-

Returns

-

the old print handler

-
-
-
-
-

GPrintFunc ()

-
void
-(*GPrintFunc) (const gchar *string);
-

Specifies the type of the print handler functions. -These are called with the complete formatted string to output.

-
-

Parameters

-
----- - - - - - -

string

the message to output

 
-
-
-
-
-

g_printerr ()

-
void
-g_printerr (const gchar *format,
-            ...);
-

Outputs a formatted message via the error message handler. -The default handler simply outputs the message to stderr, without appending -a trailing new-line character. Typically, format - should end with its own -new-line character.

-

g_printerr() should not be used from within libraries. -Instead g_log() or g_log_structured() should be used, or the convenience -macros g_message(), g_warning() and g_error().

-
-

Parameters

-
----- - - - - - - - - - - - - -

format

the message format. See the printf() documentation

 

...

the parameters to insert into the format string

 
-
-
-
-
-

g_set_printerr_handler ()

-
GPrintFunc
-g_set_printerr_handler (GPrintFunc func);
-

Sets the handler for printing error messages.

-

Any messages passed to g_printerr() will be output via -the new handler. The default handler simply outputs the -message to stderr. By providing your own handler you can -redirect the output, to a GTK+ widget or a log file for -example.

-
-

Parameters

-
----- - - - - - -

func

the new error message handler

 
-
-
-

Returns

-

the old error message handler

-
-
-
-
-

g_return_if_fail()

-
#define             g_return_if_fail(expr)
-

Verifies that the expression expr -, usually representing a precondition, -evaluates to TRUE. If the function returns a value, use -g_return_val_if_fail() instead.

-

If expr - evaluates to FALSE, the current function should be considered to -have undefined behaviour (a programmer error). The only correct solution -to such an error is to change the module that is calling the current -function, so that it avoids this incorrect call.

-

To make this undefined behaviour visible, if expr - evaluates to FALSE, -the result is usually that a critical message is logged and the current -function returns.

-

If G_DISABLE_CHECKS is defined then the check is not performed. You -should therefore not depend on any side effects of expr -.

-
-

Parameters

-
----- - - - - - -

expr

the expression to check

 
-
-
-
-
-

g_return_val_if_fail()

-
#define             g_return_val_if_fail(expr,val)
-

Verifies that the expression expr -, usually representing a precondition, -evaluates to TRUE. If the function does not return a value, use -g_return_if_fail() instead.

-

If expr - evaluates to FALSE, the current function should be considered to -have undefined behaviour (a programmer error). The only correct solution -to such an error is to change the module that is calling the current -function, so that it avoids this incorrect call.

-

To make this undefined behaviour visible, if expr - evaluates to FALSE, -the result is usually that a critical message is logged and val - is -returned from the current function.

-

If G_DISABLE_CHECKS is defined then the check is not performed. You -should therefore not depend on any side effects of expr -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

expr

the expression to check

 

val

the value to return from the current function -if the expression is not true

 
-
-
-
-
-

g_return_if_reached

-
#define             g_return_if_reached()
-

Logs a critical message and returns from the current function. -This can only be used in functions which do not return a value.

-
-
-
-

g_return_val_if_reached()

-
#define             g_return_val_if_reached(val)
-

Logs a critical message and returns val -.

-
-

Parameters

-
----- - - - - - -

val

the value to return from the current function

 
-
-
-
-
-

g_warn_if_fail()

-
#define             g_warn_if_fail(expr)
-

Logs a warning if the expression is not true.

-
-

Parameters

-
----- - - - - - -

expr

the expression to check

 
-
-

Since: 2.16

-
-
-
-

g_warn_if_reached

-
#define             g_warn_if_reached()
-

Logs a warning.

-

Since: 2.16

-
-
-
-

g_on_error_query ()

-
void
-g_on_error_query (const gchar *prg_name);
-

Prompts the user with -[E]xit, [H]alt, show [S]tack trace or [P]roceed. -This function is intended to be used for debugging use only. -The following example shows how it can be used together with -the g_log() functions.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
#include <glib.h>
-
-static void
-log_handler (const gchar   *log_domain,
-             GLogLevelFlags log_level,
-             const gchar   *message,
-             gpointer       user_data)
-{
-  g_log_default_handler (log_domain, log_level, message, user_data);
-
-  g_on_error_query (MY_PROGRAM_NAME);
-}
-
-int
-main (int argc, char *argv[])
-{
-  g_log_set_handler (MY_LOG_DOMAIN,
-                     G_LOG_LEVEL_WARNING |
-                     G_LOG_LEVEL_ERROR |
-                     G_LOG_LEVEL_CRITICAL,
-                     log_handler,
-                     NULL);
-  ...
-
- -

-

If "[E]xit" is selected, the application terminates with a call -to _exit(0).

-

If "[S]tack" trace is selected, g_on_error_stack_trace() is called. -This invokes gdb, which attaches to the current process and shows -a stack trace. The prompt is then shown again.

-

If "[P]roceed" is selected, the function returns.

-

This function may cause different actions on non-UNIX platforms.

-
-

Parameters

-
----- - - - - - -

prg_name

the program name, needed by gdb for the "[S]tack trace" -option. If prg_name -is NULL, g_get_prgname() is called to get -the program name (which will work correctly if gdk_init() or -gtk_init() has been called)

 
-
-
-
-
-

g_on_error_stack_trace ()

-
void
-g_on_error_stack_trace (const gchar *prg_name);
-

Invokes gdb, which attaches to the current process and shows a -stack trace. Called by g_on_error_query() when the "[S]tack trace" -option is selected. You can get the current process's program name -with g_get_prgname(), assuming that you have called gtk_init() or -gdk_init().

-

This function may cause different actions on non-UNIX platforms.

-
-

Parameters

-
----- - - - - - -

prg_name

the program name, needed by gdb for the "[S]tack trace" -option

 
-
-
-
-
-

G_BREAKPOINT

-
#  define G_BREAKPOINT()        G_STMT_START{ __asm__ __volatile__ ("int $03"); }G_STMT_END
-
-

Inserts a breakpoint instruction into the code.

-

On x86 and alpha systems this is implemented as a soft interrupt -and on other architectures it raises a SIGTRAP signal.

-
-
-
-

Types and Values

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-Windows-Compatibility-Functions.html b/docs/reference/glib/html/glib-Windows-Compatibility-Functions.html deleted file mode 100644 index c9009e549..000000000 --- a/docs/reference/glib/html/glib-Windows-Compatibility-Functions.html +++ /dev/null @@ -1,699 +0,0 @@ - - - - -Windows Compatibility Functions: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Windows Compatibility Functions

-

Windows Compatibility Functions — UNIX emulation on Windows

-
-
-

Functions

- -
-
-

Types and Values

-
---- - - - - - - - - - - -
#defineMAXPATHLEN
enumGWin32OSType
-
-
-

Includes

-
#include <glib.h>
-
-
-
-

Description

-

These functions provide some level of UNIX emulation on the -Windows platform. If your application really needs the POSIX -APIs, we suggest you try the Cygwin project.

-
-
-

Functions

-
-

g_win32_check_windows_version ()

-
gboolean
-g_win32_check_windows_version (const gint major,
-                               const gint minor,
-                               const gint spver,
-                               const GWin32OSType os_type);
-

Returns whether the version of the Windows operating system the -code is running on is at least the specified major, minor and -service pack versions. See MSDN documentation for the Operating -System Version. Software that needs even more detailed version and -feature information should use the Win32 API VerifyVersionInfo() -directly.

-

Successive calls of this function can be used for enabling or -disabling features at run-time for a range of Windows versions, -as per the VerifyVersionInfo() API documentation.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

major

major version of Windows

 

minor

minor version of Windows

 

spver

Windows Service Pack Level, 0 if none

 

os_type

Type of Windows OS

 
-
-
-

Returns

-

TRUE if the Windows Version is the same or greater than -the specified major, minor and service pack versions, and -whether the running Windows is a workstation or server edition -of Windows, if specifically specified.

-
-

Since: 2.44

-
-
-
-

g_win32_get_command_line ()

-
gchar **
-g_win32_get_command_line (void);
-

Gets the command line arguments, on Windows, in the GLib filename -encoding (ie: UTF-8).

-

Normally, on Windows, the command line arguments are passed to main() -in the system codepage encoding. This prevents passing filenames as -arguments if the filenames contain characters that fall outside of -this codepage. If such filenames are passed, then substitutions -will occur (such as replacing some characters with '?').

-

GLib's policy of using UTF-8 as a filename encoding on Windows was -designed to localise the pain of dealing with filenames outside of -the system codepage to one area: dealing with commandline arguments -in main().

-

As such, most GLib programs should ignore the value of argv passed to -their main() function and call g_win32_get_command_line() instead. -This will get the "full Unicode" commandline arguments using -GetCommandLineW() and convert it to the GLib filename encoding (which -is UTF-8 on Windows).

-

The strings returned by this function are suitable for use with -functions such as g_open() and g_file_new_for_commandline_arg() but -are not suitable for use with g_option_context_parse(), which assumes -that its input will be in the system codepage. The return value is -suitable for use with g_option_context_parse_strv(), however, which -is a better match anyway because it won't leak memory.

-

Unlike argv, the returned value is a normal strv and can (and should) -be freed with g_strfreev() when no longer needed.

-
-

Returns

-

the commandline arguments in the GLib -filename encoding (ie: UTF-8).

-

[transfer full]

-
-

Since: 2.40

-
-
-
-

g_win32_error_message ()

-
gchar *
-g_win32_error_message (gint error);
-

Translate a Win32 error code (as returned by GetLastError() or -WSAGetLastError()) into the corresponding message. The message is -either language neutral, or in the thread's language, or the user's -language, the system's language, or US English (see docs for -FormatMessage()). The returned string is in UTF-8. It should be -deallocated with g_free().

-
-

Parameters

-
----- - - - - - -

error

error code.

 
-
-
-

Returns

-

newly-allocated error message

-
-
-
-
-

g_win32_getlocale ()

-
gchar *
-g_win32_getlocale (void);
-

The setlocale() function in the Microsoft C library uses locale -names of the form "English_United States.1252" etc. We want the -UNIXish standard form "en_US", "zh_TW" etc. This function gets the -current thread locale from Windows - without any encoding info - -and returns it as a string of the above form for use in forming -file names etc. The returned string should be deallocated with -g_free().

-
-

Returns

-

newly-allocated locale name.

-
-
-
-
-

g_win32_get_package_installation_directory ()

-
gchar *
-g_win32_get_package_installation_directory
-                               (const gchar *package,
-                                const gchar *dll_name);
-
-

g_win32_get_package_installation_directory has been deprecated since version 2.18 and should not be used in newly-written code.

-

Pass the HMODULE of a DLL or EXE to -g_win32_get_package_installation_directory_of_module() instead.

-
-

Try to determine the installation directory for a software package.

-

This function is deprecated. Use -g_win32_get_package_installation_directory_of_module() instead.

-

The use of package - is deprecated. You should always pass NULL. A -warning is printed if non-NULL is passed as package -.

-

The original intended use of package - was for a short identifier of -the package, typically the same identifier as used for -GETTEXT_PACKAGE in software configured using GNU -autotools. The function first looks in the Windows Registry for the -value #InstallationDirectory in the key -#HKLM\Software\@package, and if that value -exists and is a string, returns that.

-

It is strongly recommended that packagers of GLib-using libraries -for Windows do not store installation paths in the Registry to be -used by this function as that interfers with having several -parallel installations of the library. Enabling multiple -installations of different versions of some GLib-using library, or -GLib itself, is desirable for various reasons.

-

For this reason it is recommeded to always pass NULL as -package - to this function, to avoid the temptation to use the -Registry. In version 2.20 of GLib the package - parameter -will be ignored and this function won't look in the Registry at all.

-

If package - is NULL, or the above value isn't found in the -Registry, but dll_name - is non-NULL, it should name a DLL loaded -into the current process. Typically that would be the name of the -DLL calling this function, looking for its installation -directory. The function then asks Windows what directory that DLL -was loaded from. If that directory's last component is "bin" or -"lib", the parent directory is returned, otherwise the directory -itself. If that DLL isn't loaded, the function proceeds as if -dll_name - was NULL.

-

If both package - and dll_name - are NULL, the directory from where -the main executable of the process was loaded is used instead in -the same way as above.

-
-

Parameters

-
----- - - - - - - - - - - - - -

package

You should pass NULL for this.

[nullable]

dll_name

The name of a DLL that a package provides in UTF-8, or NULL.

[nullable]
-
-
-

Returns

-

a string containing the installation directory for -package -. The string is in the GLib file name encoding, -i.e. UTF-8. The return value should be freed with g_free() when not -needed any longer. If the function fails NULL is returned.

-
-
-
-
-

g_win32_get_package_installation_directory_of_module ()

-
gchar *
-g_win32_get_package_installation_directory_of_module
-                               (gpointer hmodule);
-

This function tries to determine the installation directory of a -software package based on the location of a DLL of the software -package.

-

hmodule - should be the handle of a loaded DLL or NULL. The -function looks up the directory that DLL was loaded from. If -hmodule - is NULL, the directory the main executable of the current -process is looked up. If that directory's last component is "bin" -or "lib", its parent directory is returned, otherwise the directory -itself.

-

It thus makes sense to pass only the handle to a "public" DLL of a -software package to this function, as such DLLs typically are known -to be installed in a "bin" or occasionally "lib" subfolder of the -installation folder. DLLs that are of the dynamically loaded module -or plugin variety are often located in more private locations -deeper down in the tree, from which it is impossible for GLib to -deduce the root of the package installation.

-

The typical use case for this function is to have a DllMain() that -saves the handle for the DLL. Then when code in the DLL needs to -construct names of files in the installation tree it calls this -function passing the DLL handle.

-
-

Parameters

-
----- - - - - - -

hmodule

The Win32 handle for a DLL loaded into the current process, or NULL.

[nullable]
-
-
-

Returns

-

a string containing the guessed installation directory for -the software package hmodule -is from. The string is in the GLib -file name encoding, i.e. UTF-8. The return value should be freed -with g_free() when not needed any longer. If the function fails -NULL is returned.

-
-

Since: 2.16

-
-
-
-

g_win32_get_package_installation_subdirectory ()

-
gchar *
-g_win32_get_package_installation_subdirectory
-                               (const gchar *package,
-                                const gchar *dll_name,
-                                const gchar *subdir);
-
-

g_win32_get_package_installation_subdirectory has been deprecated since version 2.18 and should not be used in newly-written code.

-

Pass the HMODULE of a DLL or EXE to -g_win32_get_package_installation_directory_of_module() instead, and -then construct a subdirectory pathname with g_build_filename().

-
-

This function is deprecated. Use -g_win32_get_package_installation_directory_of_module() and -g_build_filename() instead.

-

Returns a newly-allocated string containing the path of the -subdirectory subdir - in the return value from calling -g_win32_get_package_installation_directory() with the package - and -dll_name - parameters. See the documentation for -g_win32_get_package_installation_directory() for more details. In -particular, note that it is deprecated to pass anything except NULL -as package -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

package

You should pass NULL for this.

[nullable]

dll_name

The name of a DLL that a package provides, in UTF-8, or NULL.

[nullable]

subdir

A subdirectory of the package installation directory, also in UTF-8

 
-
-
-

Returns

-

a string containing the complete path to subdir -inside -the installation directory of package -. The returned string is in -the GLib file name encoding, i.e. UTF-8. The return value should be -freed with g_free() when no longer needed. If something goes wrong, -NULL is returned.

-
-
-
-
-

g_win32_get_windows_version ()

-
guint
-g_win32_get_windows_version (void);
-
-

g_win32_get_windows_version has been deprecated since version 2.44 and should not be used in newly-written code.

-

Be aware that for Windows 8.1 and Windows Server -2012 R2 and later, this will return 62 unless the application is -manifested for Windows 8.1/Windows Server 2012 R2, for example. -MSDN stated that GetVersion(), which is used here, is subject to -further change or removal after Windows 8.1.

-
-

This function is deprecated. Use -g_win32_check_windows_version() instead.

-

Returns version information for the Windows operating system the -code is running on. See MSDN documentation for the GetVersion() -function. To summarize, the most significant bit is one on Win9x, -and zero on NT-based systems. Since version 2.14, GLib works only -on NT-based systems, so checking whether your are running on Win9x -in your own software is moot. The least significant byte is 4 on -Windows NT 4, and 5 on Windows XP. Software that needs really -detailed version and feature information should use Win32 API like -GetVersionEx() and VerifyVersionInfo().

-
-

Returns

-

The version information.

-
-
-
-
-

g_win32_locale_filename_from_utf8 ()

-
gchar *
-g_win32_locale_filename_from_utf8 (const gchar *utf8filename);
-

Converts a filename from UTF-8 to the system codepage.

-

On NT-based Windows, on NTFS file systems, file names are in -Unicode. It is quite possible that Unicode file names contain -characters not representable in the system codepage. (For instance, -Greek or Cyrillic characters on Western European or US Windows -installations, or various less common CJK characters on CJK Windows -installations.)

-

In such a case, and if the filename refers to an existing file, and -the file system stores alternate short (8.3) names for directory -entries, the short form of the filename is returned. Note that the -"short" name might in fact be longer than the Unicode name if the -Unicode name has very short pathname components containing -non-ASCII characters. If no system codepage name for the file is -possible, NULL is returned.

-

The return value is dynamically allocated and should be freed with -g_free() when no longer needed.

-
-

Parameters

-
----- - - - - - -

utf8filename

a UTF-8 encoded filename.

 
-
-
-

Returns

-

The converted filename, or NULL on conversion -failure and lack of short names.

-
-

Since: 2.8

-
-
-
-

G_WIN32_DLLMAIN_FOR_DLL_NAME()

-
# define G_WIN32_DLLMAIN_FOR_DLL_NAME(static, dll_name)
-
-

G_WIN32_DLLMAIN_FOR_DLL_NAME is deprecated and should not be used in newly-written code.

-

On Windows, this macro defines a DllMain() function that stores -the actual DLL name that the code being compiled will be included in.

-

On non-Windows platforms, expands to nothing.

-
-

Parameters

-
----- - - - - - - - - - - - - -

static

empty or "static"

 

dll_name

the name of the (pointer to the) char array where -the DLL name will be stored. If this is used, you must also -include windows.h. If you need a more complex DLL entry -point function, you cannot use this

 
-
-
-
-
-

G_WIN32_HAVE_WIDECHAR_API

-
#define G_WIN32_HAVE_WIDECHAR_API() TRUE
-
-

On Windows, this macro defines an expression which evaluates to -TRUE if the code is running on a version of Windows where the wide -character versions of the Win32 API functions, and the wide character -versions of the C library functions work. (They are always present in -the DLLs, but don't work on Windows 9x and Me.)

-

On non-Windows platforms, it is not defined.

-

Since: 2.6

-
-
-
-

G_WIN32_IS_NT_BASED

-
#define G_WIN32_IS_NT_BASED() TRUE
-
-

On Windows, this macro defines an expression which evaluates to -TRUE if the code is running on an NT-based Windows operating system.

-

On non-Windows platforms, it is not defined.

-

Since: 2.6

-
-
-
-

Types and Values

-
-

MAXPATHLEN

-
#define MAXPATHLEN 1024
-
-

Provided for UNIX emulation on Windows; equivalent to UNIX -macro MAXPATHLEN, which is the maximum length of a filename -(including full path).

-
-
-
-

enum GWin32OSType

-

Type of Windows edition to check for at run-time.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

G_WIN32_OS_ANY

-

The running system can be a workstation or a server edition of - Windows. The type of the running system is therefore not checked.

-
 

G_WIN32_OS_WORKSTATION

-

The running system is a workstation edition of Windows, - such as Windows 7 Professional.

-
 

G_WIN32_OS_SERVER

-

The running system is a server edition of Windows, such as - Windows Server 2008 R2.

-
 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-building.html b/docs/reference/glib/html/glib-building.html deleted file mode 100644 index ea993cd1a..000000000 --- a/docs/reference/glib/html/glib-building.html +++ /dev/null @@ -1,437 +0,0 @@ - - - - -Compiling the GLib package: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Compiling the GLib package

-

Compiling the GLib Package — How to compile GLib itself

-
-
-

Building the Library on UNIX

-

- On UNIX, GLib uses the standard GNU build system, - using autoconf for package - configuration and resolving portability issues, - automake for building makefiles - that comply with the GNU Coding Standards, and - libtool for building shared - libraries on multiple platforms. The normal sequence for - compiling and installing the GLib library is thus: - -

-


-        ./configure
-        make
-        make install
-      

-

-

-

- The standard options provided by GNU - autoconf may be passed to the - configure script. Please see the - autoconf documentation or run - ./configure --help for information about - the standard options. -

-

- The GTK+ documentation contains - further details - about the build process and ways to influence it. -

-
-
-

Dependencies

-

- Before you can compile the GLib library, you need to have - various other tools and libraries installed on your system. - Beyond a C compiler (which must implement C90, but does not need - to implement C99), the two tools needed during the build process - (as differentiated from the tools used in when creating GLib - mentioned above such as autoconf) are - pkg-config and GNU make. -

-
    -
  • - pkg-config - is a tool for tracking the compilation flags needed for - libraries that are used by the GLib library. (For each - library, a small .pc text file is - installed in a standard location that contains the compilation - flags needed for that library along with version number - information.) The version of pkg-config - needed to build GLib is mirrored in the - dependencies directory - on the GTK+ FTP - site. -

  • -
  • - The GLib Makefiles make use of several features specific to - GNU - make, and will not build correctly with other - versions of make. You will need to - install it if you don't already have it on your system. (It - may be called gmake rather than - make.) -

  • -
-

- A UNIX build of GLib requires that the system implements at - least the original 1990 version of POSIX. Beyond this, it - depends on a number of other libraries. -

-
    -
  • -

    - The GNU - libiconv library is needed to build GLib if your - system doesn't have the iconv() - function for doing conversion between character - encodings. Most modern systems should have - iconv(), however many older systems lack - an iconv() implementation. On such systems, - you must install the libiconv library. This can be found at: - http://www.gnu.org/software/libiconv. -

    -

    - If your system has an iconv() implementation but - you want to use libiconv instead, you can pass the - --with-libiconv option to configure. This forces - libiconv to be used. -

    -

    - Note that if you have libiconv installed in your default include - search path (for instance, in /usr/local/), but - don't enable it, you will get an error while compiling GLib because - the iconv.h that libiconv installs hides the - system iconv. -

    -

    - If you are using the native iconv implementation on Solaris - instead of libiconv, you'll need to make sure that you have - the converters between locale encodings and UTF-8 installed. - At a minimum you'll need the SUNWuiu8 package. You probably - should also install the SUNWciu8, SUNWhiu8, SUNWjiu8, and - SUNWkiu8 packages. -

    -

    - The native iconv on Compaq Tru64 doesn't contain support for - UTF-8, so you'll need to use GNU libiconv instead. (When - using GNU libiconv for GLib, you'll need to use GNU libiconv - for GNU gettext as well.) This probably applies to related - operating systems as well. -

    -
  • -
  • - The libintl library from the GNU gettext - package is needed if your system doesn't have the - gettext() functionality for handling - message translation databases. -

  • -
  • - A thread implementation is needed. The thread support in GLib - can be based upon POSIX threads or win32 threads. -

  • -
  • - GRegex uses the PCRE library - for regular expression matching. The default is to use the internal - version of PCRE that is patched to use GLib for memory management - and Unicode handling. If you prefer to use the system-supplied PCRE - library you can pass the --with-pcre=system option - to, but it is not recommended. -

  • -
  • - The optional extended attribute support in GIO requires the - getxattr() family of functions that may be provided by glibc or - by the standalone libattr library. To build GLib without extended - attribute support, use the --disable-xattr - option. -

  • -
  • - The optional SELinux support in GIO requires libselinux. - To build GLib without SELinux support, use the - --disable-selinux option. -

  • -
  • - The optional support for DTrace requires the - sys/sdt.h header, which is provided - by SystemTap on Linux. To build GLib without DTrace, use - the --disable-dtrace configure option. -

  • -
  • - The optional support for - SystemTap - can be disabled with the --disable-systemtap - configure option. -

  • -
-
-
-

Extra Configuration Options

-

- In addition to the normal options, the - configure script in the GLib - library supports these additional arguments: -

-

--enable-debug - Turns on various amounts of debugging support. Setting this to 'no' - disables g_assert(), g_return_if_fail(), g_return_val_if_fail() and - all cast checks between different object types. Setting it to 'minimum' disables only cast checks. Setting it to 'yes' enables - runtime debugging. - The default is 'minimum'. - Note that 'no' is fast, but dangerous as it tends to destabilize - even mostly bug-free software by changing the effect of many bugs - from simple warnings into fatal crashes. Thus - --enable-debug=no should not - be used for stable releases of GLib. -

-

--disable-gc-friendly and - --enable-gc-friendly - By default, and with --disable-gc-friendly - as well, Glib does not clear the memory for certain objects before - they are freed. For example, Glib may decide to recycle GList nodes - by putting them in a free list. However, memory profiling and debugging - tools like Valgrind work - better if an application does not keep dangling pointers to freed - memory (even though these pointers are no longer dereferenced), or - invalid pointers inside uninitialized memory. - The --enable-gc-friendly option makes Glib - clear memory in these situations: -

-
    -
  • - When shrinking a GArray, Glib will clear the memory no longer - available in the array: shrink an array from 10 bytes to 7, and - the last 3 bytes will be cleared. This includes removals of single - and multiple elements. -

  • -
  • - When growing a GArray, Glib will clear the new chunk of memory. - Grow an array from 7 bytes to 10 bytes, and the last 3 bytes will - be cleared. -

  • -
  • - The above applies to GPtrArray as well. -

  • -
  • - When freeing a node from a GHashTable, Glib will first clear - the node, which used to have pointers to the key and the value - stored at that node. -

  • -
  • - When destroying or removing a GTree node, Glib will clear the node, - which used to have pointers to the node's value, and the left and - right subnodes. -

  • -
-

- Since clearing the memory has a cost, - --disable-gc-friendly is the default. -

-

--disable-mem-pools and - --enable-mem-pools - Many small chunks of memory are often allocated via collective pools - in GLib and are cached after release to speed up reallocations. - For sparse memory systems this behaviour is often inferior, so - memory pools can be disabled to avoid excessive caching and force - atomic maintenance of chunks through the g_malloc() - and g_free() functions. Code currently affected by - this: -

-
    -
  • - GMemChunks become basically non-effective -

  • -
  • - GSignal disables all caching - (potentially very slow) -

  • -
  • - GType doesn't honour the - GTypeInfo - n_preallocs field anymore -

  • -
  • - the GBSearchArray flag - G_BSEARCH_ALIGN_POWER2 becomes non-functional -

  • -
-

-

-

--with-threads - Specify a thread implementation to use. Available options are - 'posix' or 'win32'. Normally, configure - should be able to work out the system threads API on its own. -

-

--disable-regex and - --enable-regex - Do not compile GLib with regular expression support. - GLib will be smaller because it will not need the - PCRE library. This is however not recommended, as - programs may need GRegex. -

-

--with-pcre - Specify whether to use the internal or the system-supplied - PCRE library. -

-
    -
  • - 'internal' means that GRegex will be compiled to use - the internal PCRE library. -

  • -
  • - 'system' means that GRegex will be compiled to use - the system-supplied PCRE library. -

  • -
-

- Using the internal PCRE is the preferred solution: -

-
    -
  • - System-supplied PCRE has a separated copy of the big tables - used for Unicode handling. -

  • -
  • - Some systems have PCRE libraries compiled without some needed - features, such as UTF-8 and Unicode support. -

  • -
  • - PCRE uses some global variables for memory management and - other features. In the rare case of a program using both - GRegex and PCRE (maybe indirectly through a library), - this variables could lead to problems when they are modified. -

  • -
-

-

-

--disable-included-printf and - --enable-included-printf - By default the configure script will try - to auto-detect whether the C library provides a suitable set - of printf() functions. In detail, configure - checks that the semantics of snprintf() are as specified by C99 - and that positional parameters as specified in the Single Unix - Specification are supported. If this not the case, GLib will - include an implementation of the printf() family. - - These options can be used to explicitly control whether - an implementation of the printf() family should be included or not. -

-

--disable-Bsymbolic and - --enable-Bsymbolic - By default, GLib uses the -Bsymbolic-functions linker - flag to avoid intra-library PLT jumps. A side-effect - of this is that it is no longer possible to override - internal uses of GLib functions with - LD_PRELOAD. Therefore, it may make - sense to turn this feature off in some situations. - The --disable-Bsymbolic option allows - to do that. -

-

--disable-gtk-doc and - --enable-gtk-doc - By default the configure script will try - to auto-detect whether the - gtk-doc package is installed. - If it is, then it will use it to extract and build the - documentation for the GLib library. These options - can be used to explicitly control whether - gtk-doc should be - used or not. If it is not used, the distributed, - pre-generated HTML files will be installed instead of - building them on your machine. -

-

--disable-man and - --enable-man - By default the configure script will try - to auto-detect whether xsltproc - and the necessary Docbook stylesheets are installed. - If they are, then it will use them to rebuild the included - man pages from the XML sources. These options can be used - to explicitly control whether man pages should be rebuilt - used or not. The distribution includes pre-generated man - pages. -

-

--disable-xattr and - --enable-xattr - By default the configure script will try - to auto-detect whether the getxattr() family of functions - is available. If it is, then extended attribute support - will be included in GIO. These options can be used to - explicitly control whether extended attribute support - should be included or not. getxattr() and friends can - be provided by glibc or by the standalone libattr library. -

-

--disable-selinux and - --enable-selinux - By default the configure script will - auto-detect if libselinux is available and include - SELinux support in GIO if it is. These options can be - used to explicitly control whether SELinux support should - be included. -

-

--disable-dtrace and - --enable-dtrace - By default the configure script will - detect if DTrace support is available, and use it. -

-

--disable-systemtap and - --enable-systemtap - This option requires DTrace support. If it is available, then - the configure script will also check for - the presence of SystemTap. -

-

--enable-coverage and - --disable-coverage - Enable the generation of coverage reports for the GLib tests. - This requires the lcov frontend to gcov from the - Linux Test Project. - To generate a coverage report, use the lcov make target. The - report is placed in the glib-lcov directory. -

-

--with-runtime-libdir=RELPATH - Allows specifying a relative path to where to install the runtime - libraries (meaning library files used for running, not developing, - GLib applications). This can be used in operating system setups where - programs using GLib needs to run before e.g. /usr - is mounted. - For example, if LIBDIR is /usr/lib and - ../../lib is passed to - --with-runtime-libdir then the - runtime libraries are installed into /lib rather - than /usr/lib. -

-

--with-python - Allows specifying the Python interpreter to use, either as an absolute path, - or as a program name. GLib can be built with Python 2 (at least version 2.5) - or Python 3. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-changes.html b/docs/reference/glib/html/glib-changes.html deleted file mode 100644 index e3c56990b..000000000 --- a/docs/reference/glib/html/glib-changes.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - -Changes to GLib: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Changes to GLib

-

Changes to GLib — -Incompatible changes made between successing versions of GLib -

-
-
-

Incompatible changes from 2.0 to 2.2

-
  • -

    -GLib changed the seeding algorithm for the pseudo-random number -generator Mersenne Twister, as used by GRand -and GRandom. This was necessary, because some -seeds would yield very bad pseudo-random streams. Also the -pseudo-random integers generated by -g_rand*_int_range() will have a -slightly better equal distribution with the new version of GLib. -

    -

    -Further information can be found at the website of the Mersenne -Twister random number generator at http://www.math.keio.ac.jp/~matumoto/emt.html. -

    -

    -The original seeding and generation algorithms, as found in GLib -2.0.x, can be used instead of the new ones by setting the environment -variable G_RANDOM_VERSION to the value of '2.0'. Use -the GLib-2.0 algorithms only if you have sequences of numbers generated -with Glib-2.0 that you need to reproduce exactly. -

    -
-
-
-

Incompatible changes from 1.2 to 2.0

-
    -
  • -

    -The event loop functionality GMain has extensively -been revised to support multiple separate main loops in separate threads. -All sources (timeouts, idle functions, etc.) are associated with a -GMainContext. -

    -

    -Compatibility functions exist so that most application code dealing with -the main loop will continue to work. However, code that creates new custom -types of sources will require modification. -

    -

    -The main changes here are: - -

    -
      -
    • - Sources are now exposed as GSource *, rather than simply as - numeric ids. -

    • -
    • - New types of sources are created by structure "derivation" from - GSource, so the source_data - parameter to the GSource virtual functions has been - replaced with a GSource *. -

    • -
    • - Sources are first created, then later added to a specific - GMainContext. -

    • -
    • - Dispatching has been modified so both the callback and data are passed - in to the dispatch() virtual function. -

    • -
    -

    - To go along with this change, the vtable for - GIOChannel has changed and - add_watch() has been replaced by - create_watch(). -

    -
  • -
  • -

    -g_list_foreach() and -g_slist_foreach() have been changed so they -are now safe against removal of the current item, not the next item. -

    -

    -It's not recommended to mutate the list in the callback to these -functions in any case. -

    -
  • -
  • -GDate now works in UTF-8, not in the current locale. -If you want to use it with the encoding of the locale, you need to convert -strings using g_locale_to_utf8() first. -

  • -
  • -

    -g_strsplit() has been fixed to: - -

    -
      -
    • - include trailing empty tokens, rather than stripping them -

    • -
    • - split into a maximum of max_tokens tokens, rather - than max_tokens + 1 -

    • -
    -

    - - Code depending on either of these bugs will need to be fixed. -

    -
  • -
  • -Deprecated functions that got removed: -g_set_error_handler(), -g_set_warning_handler(), -g_set_message_handler(), use -g_log_set_handler() instead. -

  • -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-compiling.html b/docs/reference/glib/html/glib-compiling.html deleted file mode 100644 index ee08c24ff..000000000 --- a/docs/reference/glib/html/glib-compiling.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - -Compiling GLib Applications: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Compiling GLib Applications

-

Compiling GLib Applications — -How to compile your GLib application -

-
-
-

Compiling GLib Applications on UNIX

-

-To compile a GLib application, you need to tell the compiler where to -find the GLib header files and libraries. This is done with the -pkg-config utility. -

-

-The following interactive shell session demonstrates how -pkg-config is used (the actual output on -your system may be different): -

-
-$ pkg-config --cflags glib-2.0
- -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-$ pkg-config --libs glib-2.0
- -L/usr/lib -lm -lglib-2.0
-
-

-

-

-See the pkg-config website -for more information about pkg-config. -

-

-If your application uses or GObject -features, it must be compiled and linked with the options returned -by the following pkg-config invocation: -

-
-$ pkg-config --cflags --libs gobject-2.0
-
-

-

-

-If your application uses modules, it must be compiled and linked -with the options returned by one of the following -pkg-config invocations: -

-
-$ pkg-config --cflags --libs gmodule-no-export-2.0
-$ pkg-config --cflags --libs gmodule-2.0
-
-

-The difference between the two is that gmodule-2.0 adds ---export-dynamic to the linker flags, -which is often not needed. -

-

-The simplest way to compile a program is to use the "backticks" -feature of the shell. If you enclose a command in backticks -(not single quotes), then its output will -be substituted into the command line before execution. So to -compile a GLib Hello, World, you would type the following: -

-
-$ cc hello.c `pkg-config --cflags --libs glib-2.0` -o hello
-
-

-

-

-Note that the name of the file must come before the other options -(such as pkg-config), or else you may get an -error from the linker. -

-

-Deprecated GLib functions are annotated to make the compiler -emit warnings when they are used (e.g. with gcc, you need to use -the -Wdeprecated-declarations option). If these warnings are -problematic, they can be turned off by defining the preprocessor -symbol GLIB_DISABLE_DEPRECATION_WARNINGS by using the commandline -option -DGLIB_DISABLE_DEPRECATION_WARNINGS -

-

-GLib deprecation annotations are versioned; by defining the -macros GLIB_VERSION_MIN_REQUIRED and GLIB_VERSION_MAX_ALLOWED, -you can specify the range of GLib versions whose API you want -to use. APIs that were deprecated before or introduced after -this range will trigger compiler warnings. -

-

-The older deprecation mechanism of hiding deprecated interfaces -entirely from the compiler by using the preprocessor symbol -G_DISABLE_DEPRECATED is still used for deprecated macros, -enumeration values, etc. To detect uses of these in your code, -use the commandline option -DG_DISABLE_DEPRECATED. -

-

-The recommended way of using GLib has always been to only include the -toplevel headers glib.h, -glib-object.h, gio.h. -Starting with 2.32, GLib enforces this by generating an error -when individual headers are directly included. -

-

-Still, there are some exceptions; these headers have to be included -separately: -gmodule.h, -glib-unix.h, -glib/gi18n-lib.h or -glib/gi18n.h (see -the Internationalization section), -glib/gprintf.h and -glib/gstdio.h -(we don't want to pull in all of stdio). -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-core.html b/docs/reference/glib/html/glib-core.html deleted file mode 100644 index c9bb34498..000000000 --- a/docs/reference/glib/html/glib-core.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - -GLib Core Application Support: GLib Reference Manual - - - - - - - - - - - - - - - - -
-

-GLib Core Application Support

-
-
-The Main Event Loop — manages all available sources of events -
-
-Threads — portable support for threads, mutexes, locks, - conditions and thread private data -
-
-Thread Pools — pools of threads to execute work concurrently -
-
-Asynchronous Queues — asynchronous communication between threads -
-
-Dynamic Loading of Modules — portable method for dynamically loading 'plug-ins' -
-
-Memory Allocation — general memory-handling -
-
-Memory Slices — efficient way to allocate groups of equal-sized - chunks of memory -
-
-IO Channels — portable support for using files, pipes and sockets -
-
-Error Reporting — a system for reporting errors -
-
-Warnings and Assertions -
-
-Message Output and Debugging Functions — functions to output messages and help debug applications -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-cross-compiling.html b/docs/reference/glib/html/glib-cross-compiling.html deleted file mode 100644 index 06fd21d42..000000000 --- a/docs/reference/glib/html/glib-cross-compiling.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - -Cross-compiling the GLib package: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Cross-compiling the GLib package

-

Cross-compiling the GLib Package — -How to cross-compile GLib -

-
-
-

Building the Library for a different architecture

-

- Cross-compilation is the process of compiling a program or - library on a different architecture or operating system then - it will be run upon. GLib is slightly more difficult to - cross-compile than many packages because much of GLib is - about hiding differences between different systems. -

-

- These notes cover things specific to cross-compiling GLib; - for general information about cross-compilation, see the - autoconf info pages. -

-

- GLib tries to detect as much information as possible about - the target system by compiling and linking programs without - actually running anything; however, some information GLib - needs is not available this way. This information needs - to be provided to the configure script via a "cache file" - or by setting the cache variables in your environment. -

-

- As an example of using a cache file, to cross compile for - the "MingW32" Win32 runtime environment on a Linux system, - create a file 'win32.cache' with the following contents: -

-
 
-glib_cv_long_long_format=I64
-glib_cv_stack_grows=no
-      
-

- Then execute the following commands: -

-
-PATH=/path/to/mingw32-compiler/bin:$PATH
-chmod a-w win32.cache   # prevent configure from changing it
-./configure --cache-file=win32.cache --host=mingw32
-      
-

- The complete list of cache file variables follows. Most - of these won't need to be set in most cases. -

-
-
-

Cache file variables

-

glib_cv_long_long_format=[ll/q/I64].  - Format used by printf() and - scanf() for 64 bit integers. "ll" is - the C99 standard, and what is used by the 'trio' library - that GLib builds if your printf() is - insufficiently capable. - Doesn't need to be set if you are compiling using trio. -

-

glib_cv_stack_grows=[yes/no].  - Whether the stack grows up or down. Most places will want "no", - A few architectures, such as PA-RISC need "yes". -

-

glib_cv_working_bcopy=[yes/no].  - Whether your bcopy() can handle overlapping - copies. Only needs to be set if you don't have - memmove(). (Very unlikely) -

-

glib_cv_sane_realloc=[yes/no].  - Whether your realloc() conforms to ANSI C - and can handle NULL as the first argument. - Defaults to "yes" and probably doesn't need to be set. -

-

glib_cv_have_strlcpy=[yes/no].  - Whether you have strlcpy() that matches - OpenBSD. Defaults to "no", which is safe, since GLib uses a - built-in version in that case. -

-

glib_cv_have_qsort_r=[yes/no].  - Whether you have qsort_r() that matches - BSD. Defaults to "no", which is safe, since GLib uses a - built-in version in that case. -

-

glib_cv_va_val_copy=[yes/no].  - Whether va_list can be copied as a pointer. If set - to "no", then memcopy() will be used. Only - matters if you don't have va_copy() or - __va_copy(). (So, doesn't matter for GCC.) - Defaults to "yes" which is slightly more common than "no". -

-

glib_cv_rtldglobal_broken=[yes/no].  - Whether you have a bug found in OSF/1 v5.0. Defaults to "no". -

-

glib_cv_uscore=[yes/no].  - Whether an underscore needs to be prepended to symbols when - looking them up via dlsym(). Only needs to - be set if your system uses - dlopen()/dlsym(). -

-

ac_cv_func_posix_getpwuid_r=[yes/no].  - Whether you have a getpwuid_r function (in your C library, - not your thread library) that conforms to the POSIX spec. - (Takes a 'struct passwd **' as the final argument) -

-

ac_cv_func_nonposix_getpwuid_r=[yes/no].  - Whether you have some variant of getpwuid_r() - that doesn't conform to to the POSIX spec, but GLib might be able - to use (or might segfault.) Only needs to be set if - ac_cv_func_posix_getpwuid_r is not set. It's - safest to set this to "no". -

-

ac_cv_func_posix_getgrgid_r=[yes/no].  - Whether you have a getgrgid_r function that conforms to - the POSIX spec. -

-

glib_cv_use_pid_surrogate=[yes/no].  - Whether to use a setpriority() on the PID of - the thread as a method for setting the priority of threads. This - only needs to be set when using POSIX threads. -

-

ac_cv_func_printf_unix98=[yes/no].  - Whether your printf() family supports Unix98 - style %N$ positional parameters. Defaults to - "no". -

-

ac_cv_func_vsnprintf_c99=[yes/no].  - Whether you have a vsnprintf() with C99 - semantics. (C99 semantics means returning the number of bytes - that would have been written had the output buffer had enough - space.) Defaults to "no". -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-data-types.html b/docs/reference/glib/html/glib-data-types.html deleted file mode 100644 index c237a5212..000000000 --- a/docs/reference/glib/html/glib-data-types.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - -GLib Data Types: GLib Reference Manual - - - - - - - - - - - - - - - - -
-

-GLib Data Types

-
-
-Doubly-Linked Lists — linked lists that can be iterated over in both directions -
-
-Singly-Linked Lists — linked lists that can be iterated in one direction -
-
-Double-ended Queues — double-ended queue data structure -
-
-Sequences — scalable lists -
-
-Trash Stacks — maintain a stack of unused allocated memory chunks -
-
-Hash Tables — associations between keys and values so that - given a key the value can be found quickly -
-
-Strings — text buffers which grow automatically - as text is added -
-
-String Chunks — efficient storage of groups of strings -
-
-Arrays — arrays of arbitrary elements which grow - automatically as elements are added -
-
-Pointer Arrays — arrays of pointers to any type of data, which - grow automatically as new elements are added -
-
-Byte Arrays — arrays of bytes -
-
-Balanced Binary Trees — a sorted collection of key/value pairs optimized - for searching and traversing in order -
-
-N-ary Trees — trees of data with any number of branches -
-
-Quarks — a 2-way association between a string and a - unique integer identifier -
-
-Keyed Data Lists — lists of data elements which are accessible by a - string or GQuark identifier -
-
-Datasets — associate groups of data elements with - particular memory locations -
-
-GVariantType — introduction to the GVariant type system -
-
-GVariant — strongly typed value datatype -
-
-GVariant Format Strings — varargs conversion of GVariants -
-
-GVariant Text Format — textual representation of GVariants -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-fundamentals.html b/docs/reference/glib/html/glib-fundamentals.html deleted file mode 100644 index e5c8519be..000000000 --- a/docs/reference/glib/html/glib-fundamentals.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -GLib Fundamentals: GLib Reference Manual - - - - - - - - - - - - - - - - -
-

-GLib Fundamentals

-
-
-Version Information — variables and functions to check the GLib version -
-
-Basic Types — standard GLib types, defined for ease-of-use - and portability -
-
-Standard Macros — commonly-used macros -
-
-Type Conversion Macros — portably storing integers in pointer variables -
-
-Byte Order Macros — a portable way to convert between different byte orders -
-
-Bounds-checking integer arithmetic — a set of helpers for performing checked integer arithmetic -
-
-Numerical Definitions — mathematical constants, and floating point decomposition -
-
-Miscellaneous Macros — specialized macros which are not used often -
-
-Atomic Operations — basic atomic integer and pointer operations -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-gettextize.html b/docs/reference/glib/html/glib-gettextize.html deleted file mode 100644 index 6b9fa4160..000000000 --- a/docs/reference/glib/html/glib-gettextize.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - -glib-gettextize: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

glib-gettextize

-

glib-gettextize — gettext internationalization utility

-
-
-

Synopsis

-

glib-gettextize [OPTION...] [DIRECTORY]

-
-
-

Description

-

glib-gettextize helps to prepare a source package for being -internationalized through gettext. -It is a variant of the gettextize that ships with -gettext. -

-

glib-gettextize differs -from gettextize in that it doesn't create an -intl/ subdirectory and doesn't modify -po/ChangeLog (note that newer versions of -gettextize behave like this when called with the ---no-changelog option). -

-
-
-

Options

-
---- - - - - - - - - - - - - - - - - - - -

--help

-print help and exit -

--version

-print version information and exit -

-c, --copy

-copy files instead of making symlinks -

-f, --force

-force writing of new files even if old ones exist -

-
-
-

See also

-

-gettextize(1) -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-programming.html b/docs/reference/glib/html/glib-programming.html deleted file mode 100644 index 30c883971..000000000 --- a/docs/reference/glib/html/glib-programming.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - -Writing GLib Applications: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Writing GLib Applications

-

Writing GLib Applications — -General considerations when programming with GLib -

-
-
-

Writing GLib Applications

-
-

Threads

-

-The general policy of GLib is that all functions are invisibly threadsafe -with the exception of data structure manipulation functions, where, if -you have two threads manipulating the same data -structure, they must use a lock to synchronize their operation. -

-

-GLib creates a worker thread for its own purposes so GLib applications -will always have at least 2 threads. -

-

-See the sections on threads and -threadpools for GLib APIs that -support multithreaded applications. -

-
-
-
-

Security

-

-When writing code that runs with elevated privileges, it is important -to follow some basic rules of secure programming. David Wheeler has an -excellent book on this topic, -Secure Programming for Linux and Unix HOWTO. -

-

-When it comes to GLib and its associated libraries, GLib and -GObject are generally fine to use in code that runs with elevated -privileges; they don't load modules (executable code in shared objects) -or run other programs 'behind your back'. GIO has to be used -carefully in privileged programs, see the GIO documentation for details. -

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-regex-syntax.html b/docs/reference/glib/html/glib-regex-syntax.html deleted file mode 100644 index 15f595ae1..000000000 --- a/docs/reference/glib/html/glib-regex-syntax.html +++ /dev/null @@ -1,2216 +0,0 @@ - - - - -Regular expression syntax: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Regular expression syntax

-

Regular expression syntax — -syntax and semantics of regular expressions supported by GRegex -

-
-
-

GRegex regular expression details

-

-A regular expression is a pattern that is matched against a -string from left to right. Most characters stand for themselves in a -pattern, and match the corresponding characters in the string. As a -trivial example, the pattern -

-
-The quick brown fox
-
-

-matches a portion of a string that is identical to itself. When -caseless matching is specified (the G_REGEX_CASELESS flag), letters are -matched independently of case. -

-

-The power of regular expressions comes from the ability to include -alternatives and repetitions in the pattern. These are encoded in the -pattern by the use of metacharacters, which do not stand for themselves -but instead are interpreted in some special way. -

-

-There are two different sets of metacharacters: those that are recognized -anywhere in the pattern except within square brackets, and those -that are recognized in square brackets. Outside square brackets, the -metacharacters are as follows: -

-
-

Table 1. Metacharacters outside square brackets

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CharacterMeaning
\general escape character with several uses
^assert start of string (or line, in multiline mode)
$assert end of string (or line, in multiline mode)
.match any character except newline (by default)
[start character class definition
|start of alternative branch
(start subpattern
)end subpattern
?extends the meaning of (, or 0/1 quantifier, or quantifier minimizer
*0 or more quantifier
+1 or more quantifier, also "possessive quantifier"
{start min/max quantifier
-
-

-Part of a pattern that is in square brackets is called a "character -class". In a character class the only metacharacters are: -

-
-

Table 2. Metacharacters inside square brackets

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
CharacterMeaning
\general escape character
^negate the class, but only if the first character
-indicates character range
[POSIX character class (only if followed by POSIX syntax)
]terminates the character class
-
-
-
-
-

Backslash

-

-The backslash character has several uses. Firstly, if it is followed by -a non-alphanumeric character, it takes away any special meaning that -character may have. This use of backslash as an escape character -applies both inside and outside character classes. -

-

-For example, if you want to match a * character, you write \* in the -pattern. This escaping action applies whether or not the following -character would otherwise be interpreted as a metacharacter, so it is -always safe to precede a non-alphanumeric with backslash to specify -that it stands for itself. In particular, if you want to match a -backslash, you write \\. -

-

-If a pattern is compiled with the G_REGEX_EXTENDED -option, whitespace in the pattern (other than in a character class) and -characters between a # outside a character class and the next newline -are ignored. -An escaping backslash can be used to include a whitespace or # character -as part of the pattern. -

-

-Note that the C compiler interprets backslash in strings itself, therefore -you need to duplicate all \ characters when you put a regular expression -in a C string, like "\\d{3}". -

-

-If you want to remove the special meaning from a sequence of characters, -you can do so by putting them between \Q and \E. -The \Q...\E sequence is recognized both inside and outside character -classes. -

-
-

Non-printing characters

-

-A second use of backslash provides a way of encoding non-printing -characters in patterns in a visible manner. There is no restriction on the -appearance of non-printing characters, apart from the binary zero that -terminates a pattern, but when a pattern is being prepared by text -editing, it is usually easier to use one of the following escape -sequences than the binary character it represents: -

-
-

Table 3. Non-printing characters

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EscapeMeaning
\aalarm, that is, the BEL character (hex 07)
\cx"control-x", where x is any character
\eescape (hex 1B)
\fformfeed (hex 0C)
\nnewline (hex 0A)
\rcarriage return (hex 0D)
\ttab (hex 09)
\dddcharacter with octal code ddd, or backreference
\xhhcharacter with hex code hh
\x{hhh..}character with hex code hhh..
-
-

-The precise effect of \cx is as follows: if x is a lower case letter, -it is converted to upper case. Then bit 6 of the character (hex 40) is -inverted. Thus \cz becomes hex 1A, but \c{ becomes hex 3B, while \c; -becomes hex 7B. -

-

-After \x, from zero to two hexadecimal digits are read (letters can be -in upper or lower case). Any number of hexadecimal digits may appear -between \x{ and }, but the value of the character code -must be less than 2**31 (that is, the maximum hexadecimal value is -7FFFFFFF). If characters other than hexadecimal digits appear between -\x{ and }, or if there is no terminating }, this form of escape is not -recognized. Instead, the initial \x will be interpreted as a basic hexadecimal -escape, with no following digits, giving a character whose -value is zero. -

-

-Characters whose value is less than 256 can be defined by either of the -two syntaxes for \x. There is no difference -in the way they are handled. For example, \xdc is exactly the same as -\x{dc}. -

-

-After \0 up to two further octal digits are read. If there are fewer -than two digits, just those that are present are used. -Thus the sequence \0\x\07 specifies two binary zeros followed by a BEL -character (code value 7). Make sure you supply two digits after the -initial zero if the pattern character that follows is itself an octal -digit. -

-

-The handling of a backslash followed by a digit other than 0 is complicated. -Outside a character class, GRegex reads it and any following digits as a -decimal number. If the number is less than 10, or if there -have been at least that many previous capturing left parentheses in the -expression, the entire sequence is taken as a back reference. A -description of how this works is given later, following the discussion -of parenthesized subpatterns. -

-

-Inside a character class, or if the decimal number is greater than 9 -and there have not been that many capturing subpatterns, GRegex re-reads -up to three octal digits following the backslash, and uses them to generate -a data character. Any subsequent digits stand for themselves. For example: -

-
-

Table 4. Non-printing characters

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EscapeMeaning
\040is another way of writing a space
\40is the same, provided there are fewer than 40 previous capturing subpatterns
\7is always a back reference
\11might be a back reference, or another way of writing a tab
\011is always a tab
\0113is a tab followed by the character "3"
\113might be a back reference, otherwise the character with octal code 113
\377might be a back reference, otherwise the byte consisting entirely of 1 bits
\81is either a back reference, or a binary zero followed by the two characters "8" and "1"
-
-

-Note that octal values of 100 or greater must not be introduced by a -leading zero, because no more than three octal digits are ever read. -

-

-All the sequences that define a single character can be used both inside -and outside character classes. In addition, inside a character class, the -sequence \b is interpreted as the backspace character (hex 08), and the -sequences \R and \X are interpreted as the characters "R" and "X", respectively. -Outside a character class, these sequences have different meanings (see below). -

-
-
-
-

Absolute and relative back references

-

-The sequence \g followed by a positive or negative number, optionally enclosed -in braces, is an absolute or relative back reference. Back references are -discussed later, following the discussion of parenthesized subpatterns. -

-
-
-
-

Generic character types

-

-Another use of backslash is for specifying generic character types. -The following are always recognized: -

-
-

Table 5. Generic characters

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EscapeMeaning
\dany decimal digit
\Dany character that is not a decimal digit
\sany whitespace character
\Sany character that is not a whitespace character
\wany "word" character
\Wany "non-word" character
-
-

-Each pair of escape sequences partitions the complete set of characters -into two disjoint sets. Any given character matches one, and only one, -of each pair. -

-

-These character type sequences can appear both inside and outside character -classes. They each match one character of the appropriate type. -If the current matching point is at the end of the passed string, all -of them fail, since there is no character to match. -

-

-For compatibility with Perl, \s does not match the VT character (code -11). This makes it different from the POSIX "space" class. The \s -characters are HT (9), LF (10), FF (12), CR (13), and space (32). -

-

-A "word" character is an underscore or any character less than 256 that -is a letter or digit.

-

-Characters with values greater than 128 never match \d, -\s, or \w, and always match \D, \S, and \W. -

-
-
-
-

Newline sequences

-

Outside a character class, the escape sequence \R matches any Unicode -newline sequence. -This particular group matches either the two-character sequence CR followed by -LF, or one of the single characters LF (linefeed, U+000A), VT (vertical tab, -U+000B), FF (formfeed, U+000C), CR (carriage return, U+000D), NEL (next -line, U+0085), LS (line separator, U+2028), or PS (paragraph separator, U+2029). -The two-character sequence is treated as a single unit that -cannot be split. Inside a character class, \R matches the letter "R".

-
-
-
-

Unicode character properties

-

-To support generic character types there are three additional escape -sequences, they are: -

-
-

Table 6. Generic character types

-
---- - - - - - - - - - - - - - - - - - - -
EscapeMeaning
\p{xx}a character with the xx property
\P{xx}a character without the xx property
\Xan extended Unicode sequence
-
-

-The property names represented by xx above are limited to the Unicode -script names, the general category properties, and "Any", which matches -any character (including newline). Other properties such as "InMusicalSymbols" -are not currently supported. Note that \P{Any} does not match any characters, -so always causes a match failure. -

-

-Sets of Unicode characters are defined as belonging to certain scripts. A -character from one of these sets can be matched using a script name. For -example, \p{Greek} or \P{Han}. -

-

-Those that are not part of an identified script are lumped together as -"Common". The current list of scripts can be found in the documentation for -the #GUnicodeScript enumeration. Script names for use with \p{} can be -found by replacing all spaces with underscores, e.g. for Linear B use -\p{Linear_B}. -

-

-Each character has exactly one general category property, specified by a -two-letter abbreviation. For compatibility with Perl, negation can be specified -by including a circumflex between the opening brace and the property name. For -example, \p{^Lu} is the same as \P{Lu}. -

-

-If only one letter is specified with \p or \P, it includes all the general -category properties that start with that letter. In this case, in the absence -of negation, the curly brackets in the escape sequence are optional; these two -examples have the same effect: -

-
-\p{L}
-\pL
-
-

-In addition to the two-letter category codes listed in the -documentation for the #GUnicodeType enumeration, the following -general category property codes are supported: -

-
-

Table 7. Property codes

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CodeMeaning
COther
LLetter
MMark
NNumber
PPunctuation
SSymbol
ZSeparator
-
-

-The special property L& is also supported: it matches a character that has -the Lu, Ll, or Lt property, in other words, a letter that is not classified as -a modifier or "other". -

-

-The long synonyms for these properties that Perl supports (such as \ep{Letter}) -are not supported by GRegex, nor is it permitted to prefix any of these -properties with "Is". -

-

-No character that is in the Unicode table has the Cn (unassigned) property. -Instead, this property is assumed for any code point that is not in the -Unicode table. -

-

-Specifying caseless matching does not affect these escape sequences. -For example, \p{Lu} always matches only upper case letters. -

-

-The \X escape matches any number of Unicode characters that form an -extended Unicode sequence. \X is equivalent to -

-
-(?>\PM\pM*)
-
-

-That is, it matches a character without the "mark" property, followed -by zero or more characters with the "mark" property, and treats the -sequence as an atomic group (see below). Characters with the "mark" -property are typically accents that affect the preceding character. -

-

-Matching characters by Unicode property is not fast, because GRegex has -to search a structure that contains data for over fifteen thousand -characters. That is why the traditional escape sequences such as \d and -\w do not use Unicode properties. -

-
-
-
-

Simple assertions

-

-The final use of backslash is for certain simple assertions. An -assertion specifies a condition that has to be met at a particular point in -a match, without consuming any characters from the string. The -use of subpatterns for more complicated assertions is described below. -The backslashed assertions are: -

-
-

Table 8. Simple assertions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
EscapeMeaning
\bmatches at a word boundary
\Bmatches when not at a word boundary
\Amatches at the start of the string
\Zmatches at the end of the string or before a newline at the end of the string
\zmatches only at the end of the string
\Gmatches at first matching position in the string
-
-

-These assertions may not appear in character classes (but note that \b -has a different meaning, namely the backspace character, inside a -character class). -

-

-A word boundary is a position in the string where the current -character and the previous character do not both match \w or \W (i.e. -one matches \w and the other matches \W), or the start or end of the -string if the first or last character matches \w, respectively. -

-

-The \A, \Z, and \z assertions differ from the traditional circumflex -and dollar (described in the next section) in that they only ever match -at the very start and end of the string, whatever options are -set. Thus, they are independent of multiline mode. These three assertions -are not affected by the G_REGEX_MATCH_NOTBOL or G_REGEX_MATCH_NOTEOL options, -which affect only the behaviour of the circumflex and dollar metacharacters. -However, if the start_position argument of a matching function is non-zero, -indicating that matching is to start at a point other than the beginning of -the string, \A can never match. The difference between \Z and \z is -that \Z matches before a newline at the end of the string as well at the -very end, whereas \z matches only at the end. -

-

-The \G assertion is true only when the current matching position is at -the start point of the match, as specified by the start_position argument -to the matching functions. It differs from \A when the value of startoffset is -non-zero. -

-

-Note, however, that the interpretation of \G, as the start of the -current match, is subtly different from Perl’s, which defines it as the -end of the previous match. In Perl, these can be different when the -previously matched string was empty. -

-

-If all the alternatives of a pattern begin with \G, the expression is -anchored to the starting match position, and the "anchored" flag is set -in the compiled regular expression. -

-
-
-
-

Circumflex and dollar

-

-Outside a character class, in the default matching mode, the circumflex -character is an assertion that is true only if the current matching -point is at the start of the string. If the start_position argument to -the matching functions is non-zero, circumflex can never match if the -G_REGEX_MULTILINE option is unset. Inside a character class, circumflex -has an entirely different meaning (see below). -

-

-Circumflex need not be the first character of the pattern if a number -of alternatives are involved, but it should be the first thing in each -alternative in which it appears if the pattern is ever to match that -branch. If all possible alternatives start with a circumflex, that is, -if the pattern is constrained to match only at the start of the string, -it is said to be an "anchored" pattern. (There are also other -constructs that can cause a pattern to be anchored.) -

-

-A dollar character is an assertion that is true only if the current -matching point is at the end of the string, or immediately -before a newline at the end of the string (by default). Dollar need not -be the last character of the pattern if a number of alternatives are -involved, but it should be the last item in any branch in which it -appears. Dollar has no special meaning in a character class. -

-

-The meaning of dollar can be changed so that it matches only at the -very end of the string, by setting the G_REGEX_DOLLAR_ENDONLY option at -compile time. This does not affect the \Z assertion. -

-

-The meanings of the circumflex and dollar characters are changed if the -G_REGEX_MULTILINE option is set. When this is the case, -a circumflex matches immediately after internal newlines as well as at the -start of the string. It does not match after a newline that ends the string. -A dollar matches before any newlines in the string, as well as at the very -end, when G_REGEX_MULTILINE is set. When newline is -specified as the two-character sequence CRLF, isolated CR and LF characters -do not indicate newlines. -

-

-For example, the pattern /^abc$/ matches the string "def\nabc" (where -\n represents a newline) in multiline mode, but not otherwise. Consequently, -patterns that are anchored in single line mode because all branches start with -^ are not anchored in multiline mode, and a match for circumflex is possible -when the start_position argument of a matching function -is non-zero. The G_REGEX_DOLLAR_ENDONLY option is ignored -if G_REGEX_MULTILINE is set. -

-

-Note that the sequences \A, \Z, and \z can be used to match the start and -end of the string in both modes, and if all branches of a pattern start with -\A it is always anchored, whether or not G_REGEX_MULTILINE -is set. -

-
-
-

Full stop (period, dot)

-

-Outside a character class, a dot in the pattern matches any one character -in the string, including a non-printing character, but not (by -default) newline. In UTF-8 a character might be more than one byte long. -

-

-When a line ending is defined as a single character, dot never matches that -character; when the two-character sequence CRLF is used, dot does not match CR -if it is immediately followed by LF, but otherwise it matches all characters -(including isolated CRs and LFs). When any Unicode line endings are being -recognized, dot does not match CR or LF or any of the other line ending -characters. -

-

-If the G_REGEX_DOTALL flag is set, dots match newlines -as well. The handling of dot is entirely independent of the handling of circumflex -and dollar, the only relationship being that they both involve newline -characters. Dot has no special meaning in a character class. -

-

-The behaviour of dot with regard to newlines can be changed. If the -G_REGEX_DOTALL option is set, a dot matches any one -character, without exception. If newline is defined as the two-character -sequence CRLF, it takes two dots to match it. -

-

-The handling of dot is entirely independent of the handling of circumflex and -dollar, the only relationship being that they both involve newlines. Dot has no -special meaning in a character class. -

-
-
-

Matching a single byte

-

-Outside a character class, the escape sequence \C matches any one byte, -both in and out of UTF-8 mode. Unlike a dot, it always matches any line -ending characters. -The feature is provided in Perl in order to match individual bytes in -UTF-8 mode. Because it breaks up UTF-8 characters into individual -bytes, what remains in the string may be a malformed UTF-8 string. For -this reason, the \C escape sequence is best avoided. -

-

-GRegex does not allow \C to appear in lookbehind assertions (described -below), because in UTF-8 mode this would make it impossible to calculate -the length of the lookbehind. -

-
-
-

Square brackets and character classes

-

-An opening square bracket introduces a character class, terminated by a -closing square bracket. A closing square bracket on its own is not special. If a closing square bracket is required as a member of the class, -it should be the first data character in the class (after an initial -circumflex, if present) or escaped with a backslash. -

-

-A character class matches a single character in the string. A matched character -must be in the set of characters defined by the class, unless the first -character in the class definition is a circumflex, in which case the -string character must not be in the set defined by the class. If a -circumflex is actually required as a member of the class, ensure it is -not the first character, or escape it with a backslash. -

-

-For example, the character class [aeiou] matches any lower case vowel, -while [^aeiou] matches any character that is not a lower case vowel. -Note that a circumflex is just a convenient notation for specifying the -characters that are in the class by enumerating those that are not. A -class that starts with a circumflex is not an assertion: it still consumes -a character from the string, and therefore it fails if the current pointer -is at the end of the string. -

-

-In UTF-8 mode, characters with values greater than 255 can be included -in a class as a literal string of bytes, or by using the \x{ escaping -mechanism. -

-

-When caseless matching is set, any letters in a class represent both -their upper case and lower case versions, so for example, a caseless -[aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not -match "A", whereas a caseful version would. -

-

-Characters that might indicate line breaks are never treated -in any special way when matching character classes, whatever line-ending -sequence is in use, and whatever setting of the G_REGEX_DOTALL -and G_REGEX_MULTILINE options is used. A class such as [^a] -always matches one of these characters. -

-

-The minus (hyphen) character can be used to specify a range of characters in -a character class. For example, [d-m] matches any letter -between d and m, inclusive. If a minus character is required in a -class, it must be escaped with a backslash or appear in a position -where it cannot be interpreted as indicating a range, typically as the -first or last character in the class. -

-

-It is not possible to have the literal character "]" as the end character -of a range. A pattern such as [W-]46] is interpreted as a class of -two characters ("W" and "-") followed by a literal string "46]", so it -would match "W46]" or "-46]". However, if the "]" is escaped with a -backslash it is interpreted as the end of range, so [W-\]46] is interpreted -as a class containing a range followed by two other characters. -The octal or hexadecimal representation of "]" can also be used to end -a range. -

-

-Ranges operate in the collating sequence of character values. They can -also be used for characters specified numerically, for example -[\000-\037]. In UTF-8 mode, ranges can include characters whose values -are greater than 255, for example [\x{100}-\x{2ff}]. -

-

-The character types \d, \D, \p, \P, \s, \S, \w, and \W may also appear -in a character class, and add the characters that they match to the -class. For example, [\dABCDEF] matches any hexadecimal digit. A -circumflex can conveniently be used with the upper case character types to -specify a more restricted set of characters than the matching lower -case type. For example, the class [^\W_] matches any letter or digit, -but not underscore. -

-

-The only metacharacters that are recognized in character classes are -backslash, hyphen (only where it can be interpreted as specifying a -range), circumflex (only at the start), opening square bracket (only -when it can be interpreted as introducing a POSIX class name - see the -next section), and the terminating closing square bracket. However, -escaping other non-alphanumeric characters does no harm. -

-
-
-

Posix character classes

-

-GRegex supports the POSIX notation for character classes. This uses names -enclosed by [: and :] within the enclosing square brackets. For example, -

-
-[01[:alpha:]%]
-
-

-matches "0", "1", any alphabetic character, or "%". The supported class -names are -

-
-

Table 9. Posix classes

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NameMeaning
alnumletters and digits
alphaletters
asciicharacter codes 0 - 127
blankspace or tab only
cntrlcontrol characters
digitdecimal digits (same as \d)
graphprinting characters, excluding space
lowerlower case letters
printprinting characters, including space
punctprinting characters, excluding letters and digits
spacewhite space (not quite the same as \s)
upperupper case letters
word"word" characters (same as \w)
xdigithexadecimal digits
-
-

-The "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13), -and space (32). Notice that this list includes the VT character (code -11). This makes "space" different to \s, which does not include VT (for -Perl compatibility). -

-

-The name "word" is a Perl extension, and "blank" is a GNU extension. -Another Perl extension is negation, which is indicated by a ^ character -after the colon. For example, -

-
-[12[:^digit:]]
-
-

-matches "1", "2", or any non-digit. GRegex also recognize the -POSIX syntax [.ch.] and [=ch=] where "ch" is a "collating element", but -these are not supported, and an error is given if they are encountered. -

-

-In UTF-8 mode, characters with values greater than 128 do not match any -of the POSIX character classes. -

-
-
-

Vertical bar

-

-Vertical bar characters are used to separate alternative patterns. For -example, the pattern -

-
- gilbert|sullivan
-
-

-matches either "gilbert" or "sullivan". Any number of alternatives may -appear, and an empty alternative is permitted (matching the empty -string). The matching process tries each alternative in turn, from -left to right, and the first one that succeeds is used. If the alternatives are within a subpattern (defined below), "succeeds" means matching the rest of the main pattern as well as the alternative in the subpattern. -

-
-
-

Internal option setting

-

-The settings of the G_REGEX_CASELESS, G_REGEX_MULTILINE, G_REGEX_MULTILINE, -and G_REGEX_EXTENDED options can be changed from within the pattern by a -sequence of Perl-style option letters enclosed between "(?" and ")". The -option letters are -

-
-

Table 10. Option settings

-
---- - - - - - - - - - - - - - - - - - - - - - - -
OptionFlag
iG_REGEX_CASELESS
mG_REGEX_MULTILINE
sG_REGEX_DOTALL
xG_REGEX_EXTENDED
-
-

-For example, (?im) sets caseless, multiline matching. It is also -possible to unset these options by preceding the letter with a hyphen, and a -combined setting and unsetting such as (?im-sx), which sets G_REGEX_CASELESS -and G_REGEX_MULTILINE while unsetting G_REGEX_DOTALL and G_REGEX_EXTENDED, -is also permitted. If a letter appears both before and after the -hyphen, the option is unset. -

-

-When an option change occurs at top level (that is, not inside subpattern -parentheses), the change applies to the remainder of the pattern -that follows. -

-

-An option change within a subpattern (see below for a description of subpatterns) -affects only that part of the current pattern that follows it, so -

-
-(a(?i)b)c
-
-

-matches abc and aBc and no other strings (assuming G_REGEX_CASELESS is not -used). By this means, options can be made to have different settings -in different parts of the pattern. Any changes made in one alternative -do carry on into subsequent branches within the same subpattern. For -example, -

-
-(a(?i)b|c)
-
-

-matches "ab", "aB", "c", and "C", even though when matching "C" the -first branch is abandoned before the option setting. This is because -the effects of option settings happen at compile time. There would be -some very weird behaviour otherwise. -

-

-The options G_REGEX_UNGREEDY and -G_REGEX_EXTRA and G_REGEX_DUPNAMES -can be changed in the same way as the Perl-compatible options by using -the characters U, X and J respectively. -

-
-
-

Subpatterns

-

-Subpatterns are delimited by parentheses (round brackets), which can be -nested. Turning part of a pattern into a subpattern does two things: -

-
    -
  • -It localizes a set of alternatives. For example, the pattern -cat(aract|erpillar|) matches one of the words "cat", "cataract", or -"caterpillar". Without the parentheses, it would match "cataract", -"erpillar" or an empty string. -

  • -
  • -It sets up the subpattern as a capturing subpattern. This means -that, when the whole pattern matches, that portion of the -string that matched the subpattern can be obtained using g_match_info_fetch(). -Opening parentheses are counted from left to right (starting from 1, as -subpattern 0 is the whole matched string) to obtain numbers for the -capturing subpatterns. -

  • -
-

-For example, if the string "the red king" is matched against the pattern -

-
-the ((red|white) (king|queen))
-
-

-the captured substrings are "red king", "red", and "king", and are numbered 1, 2, and 3, respectively. -

-

-The fact that plain parentheses fulfil two functions is not always -helpful. There are often times when a grouping subpattern is required -without a capturing requirement. If an opening parenthesis is followed -by a question mark and a colon, the subpattern does not do any capturing, -and is not counted when computing the number of any subsequent -capturing subpatterns. For example, if the string "the white queen" is -matched against the pattern -

-
-the ((?:red|white) (king|queen))
-
-

-the captured substrings are "white queen" and "queen", and are numbered -1 and 2. The maximum number of capturing subpatterns is 65535. -

-

-As a convenient shorthand, if any option settings are required at the -start of a non-capturing subpattern, the option letters may appear -between the "?" and the ":". Thus the two patterns -

-
-(?i:saturday|sunday)
-(?:(?i)saturday|sunday)
-
-

-match exactly the same set of strings. Because alternative branches are -tried from left to right, and options are not reset until the end of -the subpattern is reached, an option setting in one branch does affect -subsequent branches, so the above patterns match "SUNDAY" as well as -"Saturday". -

-
-
-

Named subpatterns

-

-Identifying capturing parentheses by number is simple, but it can be -very hard to keep track of the numbers in complicated regular expressions. -Furthermore, if an expression is modified, the numbers may -change. To help with this difficulty, GRegex supports the naming of -subpatterns. A subpattern can be named in one of three ways: (?<name>...) or -(?'name'...) as in Perl, or (?P<name>...) as in Python. -References to capturing parentheses from other -parts of the pattern, such as backreferences, recursion, and conditions, -can be made by name as well as by number. -

-

-Names consist of up to 32 alphanumeric characters and underscores. Named -capturing parentheses are still allocated numbers as well as names, exactly as -if the names were not present. -By default, a name must be unique within a pattern, but it is possible to relax -this constraint by setting the G_REGEX_DUPNAMES option at -compile time. This can be useful for patterns where only one instance of the -named parentheses can match. Suppose you want to match the name of a weekday, -either as a 3-letter abbreviation or as the full name, and in both cases you -want to extract the abbreviation. This pattern (ignoring the line breaks) does -the job: -

-
-(?<DN>Mon|Fri|Sun)(?:day)?|
-(?<DN>Tue)(?:sday)?|
-(?<DN>Wed)(?:nesday)?|
-(?<DN>Thu)(?:rsday)?|
-(?<DN>Sat)(?:urday)?
-
-

-There are five capturing substrings, but only one is ever set after a match. -The function for extracting the data by name returns the substring -for the first (and in this example, the only) subpattern of that name that -matched. This saves searching to find which numbered subpattern it was. If you -make a reference to a non-unique named subpattern from elsewhere in the -pattern, the one that corresponds to the lowest number is used. -

-
-
-

Repetition

-

-Repetition is specified by quantifiers, which can follow any of the -following items: -

-
    -
  • a literal data character

  • -
  • the dot metacharacter

  • -
  • the \C escape sequence

  • -
  • the \X escape sequence (in UTF-8 mode)

  • -
  • the \R escape sequence

  • -
  • an escape such as \d that matches a single character

  • -
  • a character class

  • -
  • a back reference (see next section)

  • -
  • a parenthesized subpattern (unless it is an assertion)

  • -
-

-The general repetition quantifier specifies a minimum and maximum number -of permitted matches, by giving the two numbers in curly brackets -(braces), separated by a comma. The numbers must be less than 65536, -and the first must be less than or equal to the second. For example: -

-
-z{2,4}
-
-

-matches "zz", "zzz", or "zzzz". A closing brace on its own is not a -special character. If the second number is omitted, but the comma is -present, there is no upper limit; if the second number and the comma -are both omitted, the quantifier specifies an exact number of required -matches. Thus -

-
-[aeiou]{3,}
-
-

-matches at least 3 successive vowels, but may match many more, while -

-
-\d{8}
-
-

-matches exactly 8 digits. An opening curly bracket that appears in a -position where a quantifier is not allowed, or one that does not match -the syntax of a quantifier, is taken as a literal character. For example, -{,6} is not a quantifier, but a literal string of four characters. -

-

-In UTF-8 mode, quantifiers apply to UTF-8 characters rather than to -individual bytes. Thus, for example, \x{100}{2} matches two UTF-8 -characters, each of which is represented by a two-byte sequence. Similarly, -\X{3} matches three Unicode extended sequences, each of which may be -several bytes long (and they may be of different lengths). -

-

-The quantifier {0} is permitted, causing the expression to behave as if -the previous item and the quantifier were not present. -

-

-For convenience, the three most common quantifiers have single-character -abbreviations: -

-
-

Table 11. Abbreviations for quantifiers

-
---- - - - - - - - - - - - - - - - - - - -
AbbreviationMeaning
*is equivalent to {0,}
+is equivalent to {1,}
?is equivalent to {0,1}
-
-

-It is possible to construct infinite loops by following a subpattern -that can match no characters with a quantifier that has no upper limit, -for example: -

-
-(a?)*
-
-

-Because there are cases where this can be useful, such patterns are -accepted, but if any repetition of the subpattern does in fact match -no characters, the loop is forcibly broken. -

-

-By default, the quantifiers are "greedy", that is, they match as much -as possible (up to the maximum number of permitted times), without -causing the rest of the pattern to fail. The classic example of where -this gives problems is in trying to match comments in C programs. These -appear between /* and */ and within the comment, individual * and / -characters may appear. An attempt to match C comments by applying the -pattern -

-
-/\*.*\*/
-
-

-to the string -

-
-/* first comment */  not comment  /* second comment */
-
-

-fails, because it matches the entire string owing to the greediness of -the .* item. -

-

-However, if a quantifier is followed by a question mark, it ceases to -be greedy, and instead matches the minimum number of times possible, so -the pattern -

-
-/\*.*?\*/
-
-

-does the right thing with the C comments. The meaning of the various -quantifiers is not otherwise changed, just the preferred number of -matches. Do not confuse this use of question mark with its use as a -quantifier in its own right. Because it has two uses, it can sometimes -appear doubled, as in -

-
-\d??\d
-
-

-which matches one digit by preference, but can match two if that is the -only way the rest of the pattern matches. -

-

-If the G_REGEX_UNGREEDY flag is set, the quantifiers are not greedy -by default, but individual ones can be made greedy by following them with -a question mark. In other words, it inverts the default behaviour. -

-

-When a parenthesized subpattern is quantified with a minimum repeat -count that is greater than 1 or with a limited maximum, more memory is -required for the compiled pattern, in proportion to the size of the -minimum or maximum. -

-

-If a pattern starts with .* or .{0,} and the G_REGEX_DOTALL flag -is set, thus allowing the dot to match newlines, the -pattern is implicitly anchored, because whatever follows will be tried -against every character position in the string, so there is no -point in retrying the overall match at any position after the first. -GRegex normally treats such a pattern as though it were preceded by \A. -

-

-In cases where it is known that the string contains no newlines, it -is worth setting G_REGEX_DOTALL in order to obtain this optimization, -or alternatively using ^ to indicate anchoring explicitly. -

-

-However, there is one situation where the optimization cannot be used. -When .* is inside capturing parentheses that are the subject of a -backreference elsewhere in the pattern, a match at the start may fail -where a later one succeeds. Consider, for example: -

-
-(.*)abc\1
-
-

-If the string is "xyz123abc123" the match point is the fourth character. -For this reason, such a pattern is not implicitly anchored. -

-

-When a capturing subpattern is repeated, the value captured is the -substring that matched the final iteration. For example, after -

-
-(tweedle[dume]{3}\s*)+
-
-

-has matched "tweedledum tweedledee" the value of the captured substring -is "tweedledee". However, if there are nested capturing subpatterns, -the corresponding captured values may have been set in previous iterations. -For example, after -

-
-/(a|(b))+/
-
-

-matches "aba" the value of the second captured substring is "b". -

-
-
-

Atomic grouping and possessive quantifiers

-

-With both maximizing ("greedy") and minimizing ("ungreedy" or "lazy") -repetition, failure of what follows normally causes the repeated -item to be re-evaluated to see if a different number -of repeats allows the rest of the pattern to match. Sometimes it -is useful to prevent this, either to change the nature of the -match, or to cause it fail earlier than it otherwise might, when the -author of the pattern knows there is no point in carrying on. -

-

-Consider, for example, the pattern \d+foo when applied to the string -

-
-123456bar
-
-

-After matching all 6 digits and then failing to match "foo", the normal -action of the matcher is to try again with only 5 digits matching the -\d+ item, and then with 4, and so on, before ultimately failing. -"Atomic grouping" (a term taken from Jeffrey Friedl’s book) provides -the means for specifying that once a subpattern has matched, it is not -to be re-evaluated in this way. -

-

-If we use atomic grouping for the previous example, the matcher -give up immediately on failing to match "foo" the first time. The notation -is a kind of special parenthesis, starting with (?> as in this -example: -

-
-(?>\d+)foo
-
-

-This kind of parenthesis "locks up" the part of the pattern it contains -once it has matched, and a failure further into the pattern is -prevented from backtracking into it. Backtracking past it to previous -items, however, works as normal. -

-

-An alternative description is that a subpattern of this type matches -the string of characters that an identical standalone pattern would -match, if anchored at the current point in the string. -

-

-Atomic grouping subpatterns are not capturing subpatterns. Simple cases -such as the above example can be thought of as a maximizing repeat that -must swallow everything it can. So, while both \d+ and \d+? are prepared -to adjust the number of digits they match in order to make the -rest of the pattern match, (?>\d+) can only match an entire sequence of -digits. -

-

-Atomic groups in general can of course contain arbitrarily complicated -subpatterns, and can be nested. However, when the subpattern for an -atomic group is just a single repeated item, as in the example above, a -simpler notation, called a "possessive quantifier" can be used. This -consists of an additional + character following a quantifier. Using -this notation, the previous example can be rewritten as -

-
-\d++foo
-
-

-Possessive quantifiers are always greedy; the setting of the -G_REGEX_UNGREEDY option is ignored. They are a convenient notation for the -simpler forms of atomic group. However, there is no difference in the -meaning of a possessive quantifier and the equivalent -atomic group, though there may be a performance difference; -possessive quantifiers should be slightly faster. -

-

-The possessive quantifier syntax is an extension to the Perl syntax. -It was invented by Jeffrey Friedl in the first edition of his book and -then implemented by Mike McCloskey in Sun's Java package. -It ultimately found its way into Perl at release 5.10. -

-

-GRegex has an optimization that automatically "possessifies" certain simple -pattern constructs. For example, the sequence A+B is treated as A++B because -there is no point in backtracking into a sequence of A's when B must follow. -

-

-When a pattern contains an unlimited repeat inside a subpattern that -can itself be repeated an unlimited number of times, the use of an -atomic group is the only way to avoid some failing matches taking a -very long time indeed. The pattern -

-
-(\D+|<\d+>)*[!?]
-
-

-matches an unlimited number of substrings that either consist of non- -digits, or digits enclosed in <>, followed by either ! or ?. When it -matches, it runs quickly. However, if it is applied to -

-
-aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-
-

-it takes a long time before reporting failure. This is because the -string can be divided between the internal \D+ repeat and the external -* repeat in a large number of ways, and all have to be tried. (The -example uses [!?] rather than a single character at the end, because -GRegex has an optimization that allows for fast failure -when a single character is used. It remember the last single character -that is required for a match, and fail early if it is not present -in the string.) If the pattern is changed so that it uses an atomic -group, like this: -

-
-((?>\D+)|<\d+>)*[!?]
-
-

-sequences of non-digits cannot be broken, and failure happens quickly. -

-
-
-

Back references

-

-Outside a character class, a backslash followed by a digit greater than -0 (and possibly further digits) is a back reference to a capturing subpattern -earlier (that is, to its left) in the pattern, provided there have been that -many previous capturing left parentheses. -

-

-However, if the decimal number following the backslash is less than 10, -it is always taken as a back reference, and causes an error only if -there are not that many capturing left parentheses in the entire pattern. -In other words, the parentheses that are referenced need not be -to the left of the reference for numbers less than 10. A "forward back -reference" of this type can make sense when a repetition is involved and -the subpattern to the right has participated in an earlier iteration. -

-

-It is not possible to have a numerical "forward back reference" to subpattern -whose number is 10 or more using this syntax because a sequence such as \e50 is -interpreted as a character defined in octal. See the subsection entitled -"Non-printing characters" above for further details of the handling of digits -following a backslash. There is no such problem when named parentheses are used. -A back reference to any subpattern is possible using named parentheses (see below). -

-

-Another way of avoiding the ambiguity inherent in the use of digits following a -backslash is to use the \g escape sequence (introduced in Perl 5.10.) -This escape must be followed by a positive or a negative number, -optionally enclosed in braces. -

-

-A positive number specifies an absolute reference without the ambiguity that is -present in the older syntax. It is also useful when literal digits follow the -reference. A negative number is a relative reference. Consider "(abc(def)ghi)\g{-1}", -the sequence \g{-1} is a reference to the most recently started capturing -subpattern before \g, that is, is it equivalent to \2. Similarly, \g{-2} -would be equivalent to \1. The use of relative references can be helpful in -long patterns, and also in patterns that are created by joining together -fragments that contain references within themselves. -

-

-A back reference matches whatever actually matched the capturing subpattern -in the current string, rather than anything matching -the subpattern itself (see "Subpatterns as subroutines" below for a way -of doing that). So the pattern -

-
-(sens|respons)e and \1ibility
-
-

-matches "sense and sensibility" and "response and responsibility", but -not "sense and responsibility". If caseful matching is in force at the -time of the back reference, the case of letters is relevant. For example, -

-
-((?i)rah)\s+\1
-
-

-matches "rah rah" and "RAH RAH", but not "RAH rah", even though the -original capturing subpattern is matched caselessly. -

-

-Back references to named subpatterns use the Perl syntax \k<name> or \k'name' -or the Python syntax (?P=name). We could rewrite the above example in either of -the following ways: -

-
-(?<p1>(?i)rah)\s+\k<p1>
-(?P<p1>(?i)rah)\s+(?P=p1)
-
-

-A subpattern that is referenced by name may appear in the pattern before or -after the reference. -

-

-There may be more than one back reference to the same subpattern. If a -subpattern has not actually been used in a particular match, any back -references to it always fail. For example, the pattern -

-
-(a|(bc))\2
-
-

-always fails if it starts to match "a" rather than "bc". Because there -may be many capturing parentheses in a pattern, all digits following -the backslash are taken as part of a potential back reference number. -If the pattern continues with a digit character, some delimiter must be -used to terminate the back reference. If the G_REGEX_EXTENDED flag is -set, this can be whitespace. Otherwise an empty comment (see "Comments" below) can be used. -

-

-A back reference that occurs inside the parentheses to which it refers -fails when the subpattern is first used, so, for example, (a\1) never -matches. However, such references can be useful inside repeated subpatterns. -For example, the pattern -

-
-(a|b\1)+
-
-

-matches any number of "a"s and also "aba", "ababbaa" etc. At each iteration -of the subpattern, the back reference matches the character -string corresponding to the previous iteration. In order for this to -work, the pattern must be such that the first iteration does not need -to match the back reference. This can be done using alternation, as in -the example above, or by a quantifier with a minimum of zero. -

-
-
-

Assertions

-

-An assertion is a test on the characters following or preceding the -current matching point that does not actually consume any characters. -The simple assertions coded as \b, \B, \A, \G, \Z, \z, ^ and $ are -described above. -

-

-More complicated assertions are coded as subpatterns. There are two -kinds: those that look ahead of the current position in the -string, and those that look behind it. An assertion subpattern is -matched in the normal way, except that it does not cause the current -matching position to be changed. -

-

-Assertion subpatterns are not capturing subpatterns, and may not be -repeated, because it makes no sense to assert the same thing several -times. If any kind of assertion contains capturing subpatterns within -it, these are counted for the purposes of numbering the capturing -subpatterns in the whole pattern. However, substring capturing is carried -out only for positive assertions, because it does not make sense for -negative assertions. -

-
-

Lookahead assertions

-

-Lookahead assertions start with (?= for positive assertions and (?! for -negative assertions. For example, -

-
-\w+(?=;)
-
-

-matches a word followed by a semicolon, but does not include the semicolon -in the match, and -

-
-foo(?!bar)
-
-

-matches any occurrence of "foo" that is not followed by "bar". Note -that the apparently similar pattern -

-
-(?!foo)bar
-
-

-does not find an occurrence of "bar" that is preceded by something -other than "foo"; it finds any occurrence of "bar" whatsoever, because -the assertion (?!foo) is always true when the next three characters are -"bar". A lookbehind assertion is needed to achieve the other effect. -

-

-If you want to force a matching failure at some point in a pattern, the -most convenient way to do it is with (?!) because an empty string -always matches, so an assertion that requires there not to be an empty -string must always fail. -

-
-
-
-

Lookbehind assertions

-

-Lookbehind assertions start with (?<= for positive assertions and (?<! -for negative assertions. For example, -

-
-(?<!foo)bar
-
-

-does find an occurrence of "bar" that is not preceded by "foo". The -contents of a lookbehind assertion are restricted such that all the -strings it matches must have a fixed length. However, if there are -several top-level alternatives, they do not all have to have the same -fixed length. Thus -

-
-(?<=bullock|donkey)
-
-

-is permitted, but -

-
-(?<!dogs?|cats?)
-
-

-causes an error at compile time. Branches that match different length -strings are permitted only at the top level of a lookbehind assertion. -An assertion such as -

-
-(?<=ab(c|de))
-
-

-is not permitted, because its single top-level branch can match two -different lengths, but it is acceptable if rewritten to use two top- -level branches: -

-
-(?<=abc|abde)
-
-

-The implementation of lookbehind assertions is, for each alternative, -to temporarily move the current position back by the fixed length and -then try to match. If there are insufficient characters before the -current position, the assertion fails. -

-

-GRegex does not allow the \C escape (which matches a single byte in UTF-8 -mode) to appear in lookbehind assertions, because it makes it impossible -to calculate the length of the lookbehind. The \X and \R escapes, which can -match different numbers of bytes, are also not permitted. -

-

-Possessive quantifiers can be used in conjunction with lookbehind assertions to -specify efficient matching at the end of the subject string. Consider a simple -pattern such as -

-
-abcd$
-
-

-when applied to a long string that does not match. Because matching -proceeds from left to right, GRegex will look for each "a" in the string -and then see if what follows matches the rest of the pattern. If the -pattern is specified as -

-
-^.*abcd$
-
-

-the initial .* matches the entire string at first, but when this fails -(because there is no following "a"), it backtracks to match all but the -last character, then all but the last two characters, and so on. Once -again the search for "a" covers the entire string, from right to left, -so we are no better off. However, if the pattern is written as -

-
-^.*+(?<=abcd)
-
-

-there can be no backtracking for the .*+ item; it can match only the -entire string. The subsequent lookbehind assertion does a single test -on the last four characters. If it fails, the match fails immediately. -For long strings, this approach makes a significant difference to the -processing time. -

-
-
-
-

Using multiple assertions

-

-Several assertions (of any sort) may occur in succession. For example, -

-
-(?<=\d{3})(?<!999)foo
-
-

-matches "foo" preceded by three digits that are not "999". Notice that -each of the assertions is applied independently at the same point in -the string. First there is a check that the previous three -characters are all digits, and then there is a check that the same -three characters are not "999". This pattern does not match "foo" preceded -by six characters, the first of which are digits and the last -three of which are not "999". For example, it doesn’t match "123abcfoo". -A pattern to do that is -

-
-(?<=\d{3}...)(?<!999)foo
-
-

-This time the first assertion looks at the preceding six characters, -checking that the first three are digits, and then the second assertion -checks that the preceding three characters are not "999". -

-

-Assertions can be nested in any combination. For example, -

-
-(?<=(?<!foo)bar)baz
-
-

-matches an occurrence of "baz" that is preceded by "bar" which in turn -is not preceded by "foo", while -

-
-(?<=\d{3}(?!999)...)foo
-
-

-is another pattern that matches "foo" preceded by three digits and any -three characters that are not "999". -

-
-
-
-

Conditional subpatterns

-

-It is possible to cause the matching process to obey a subpattern -conditionally or to choose between two alternative subpatterns, depending -on the result of an assertion, or whether a previous capturing subpattern -matched or not. The two possible forms of conditional subpattern are -

-
-(?(condition)yes-pattern)
-(?(condition)yes-pattern|no-pattern)
-
-

-If the condition is satisfied, the yes-pattern is used; otherwise the -no-pattern (if present) is used. If there are more than two alternatives -in the subpattern, a compile-time error occurs. -

-

-There are four kinds of condition: references to subpatterns, references to -recursion, a pseudo-condition called DEFINE, and assertions. -

-
-

Checking for a used subpattern by number

-

-If the text between the parentheses consists of a sequence of digits, the -condition is true if the capturing subpattern of that number has previously -matched. -

-

-Consider the following pattern, which contains non-significant white space -to make it more readable (assume the G_REGEX_EXTENDED) -and to divide it into three parts for ease of discussion: -

-
-( \( )?    [^()]+    (?(1) \) )
-
-

-The first part matches an optional opening parenthesis, and if that -character is present, sets it as the first captured substring. The second -part matches one or more characters that are not parentheses. The -third part is a conditional subpattern that tests whether the first set -of parentheses matched or not. If they did, that is, if string started -with an opening parenthesis, the condition is true, and so the yes-pattern -is executed and a closing parenthesis is required. Otherwise, -since no-pattern is not present, the subpattern matches nothing. In -other words, this pattern matches a sequence of non-parentheses, -optionally enclosed in parentheses. -

-
-
-
-

Checking for a used subpattern by name

-

-Perl uses the syntax (?(<name>)...) or (?('name')...) to test for a used -subpattern by name, the Python syntax (?(name)...) is also recognized. However, -there is a possible ambiguity with this syntax, because subpattern names may -consist entirely of digits. GRegex looks first for a named subpattern; if it -cannot find one and the name consists entirely of digits, GRegex looks for a -subpattern of that number, which must be greater than zero. Using subpattern -names that consist entirely of digits is not recommended. -

-

-Rewriting the above example to use a named subpattern gives this: -

-
-(?<OPEN> \( )?    [^()]+    (?(<OPEN>) \) )
-
-
-
-
-

Checking for pattern recursion

-

-If the condition is the string (R), and there is no subpattern with the name R, -the condition is true if a recursive call to the whole pattern or any -subpattern has been made. If digits or a name preceded by ampersand follow the -letter R, for example: -

-
-(?(R3)...)
-(?(R&name)...)
-
-

-the condition is true if the most recent recursion is into the subpattern whose -number or name is given. This condition does not check the entire recursion -stack. -

-

-At "top level", all these recursion test conditions are false. Recursive -patterns are described below. -

-
-
-
-

Defining subpatterns for use by reference only

-

-If the condition is the string (DEFINE), and there is no subpattern with the -name DEFINE, the condition is always false. In this case, there may be only one -alternative in the subpattern. It is always skipped if control reaches this -point in the pattern; the idea of DEFINE is that it can be used to define -"subroutines" that can be referenced from elsewhere. (The use of "subroutines" -is described below.) For example, a pattern to match an IPv4 address could be -written like this (ignore whitespace and line breaks): -

-
-(?(DEFINE) (?<byte> 2[0-4]\d | 25[0-5] | 1\d\d | [1-9]?\d) )
-\b (?&byte) (\.(?&byte)){3} \b
-
-

-The first part of the pattern is a DEFINE group inside which a another group -named "byte" is defined. This matches an individual component of an IPv4 -address (a number less than 256). When matching takes place, this part of the -pattern is skipped because DEFINE acts like a false condition. -

-

-The rest of the pattern uses references to the named group to match the four -dot-separated components of an IPv4 address, insisting on a word boundary at -each end. -

-
-
-
-

Assertion conditions

-

-If the condition is not in any of the above formats, it must be an -assertion. This may be a positive or negative lookahead or lookbehind -assertion. Consider this pattern, again containing non-significant -white space, and with the two alternatives on the second line: -

-
-(?(?=[^a-z]*[a-z])
-\d{2}-[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} )
-
-

-The condition is a positive lookahead assertion that matches an -optional sequence of non-letters followed by a letter. In other words, -it tests for the presence of at least one letter in the string. If a -letter is found, the string is matched against the first alternative; -otherwise it is matched against the second. This pattern matches -strings in one of the two forms dd-aaa-dd or dd-dd-dd, where aaa are -letters and dd are digits. -

-
-
-
-

Comments

-

-The sequence (?# marks the start of a comment that continues up to the -next closing parenthesis. Nested parentheses are not permitted. The -characters that make up a comment play no part in the pattern matching -at all. -

-

-If the G_REGEX_EXTENDED option is set, an unescaped # -character outside a character class introduces a comment that continues to -immediately after the next newline in the pattern. -

-
-
-

Recursive patterns

-

-Consider the problem of matching a string in parentheses, allowing for -unlimited nested parentheses. Without the use of recursion, the best -that can be done is to use a pattern that matches up to some fixed -depth of nesting. It is not possible to handle an arbitrary nesting -depth. -

-

-For some time, Perl has provided a facility that allows regular expressions to -recurse (amongst other things). It does this by interpolating Perl code in the -expression at run time, and the code can refer to the expression itself. A Perl -pattern using code interpolation to solve the parentheses problem can be -created like this: -

-
-$re = qr{\( (?: (?>[^()]+) | (?p{$re}) )* \)}x;
-
-

-The (?p{...}) item interpolates Perl code at run time, and in this case refers -recursively to the pattern in which it appears. -

-

-Obviously, GRegex cannot support the interpolation of Perl code. Instead, it -supports special syntax for recursion of the entire pattern, and also for -individual subpattern recursion. This kind of recursion was introduced into -Perl at release 5.10. -

-

-A special item that consists of (? followed by a number greater than zero and a -closing parenthesis is a recursive call of the subpattern of the given number, -provided that it occurs inside that subpattern. (If not, it is a "subroutine" -call, which is described in the next section.) The special item (?R) or (?0) is -a recursive call of the entire regular expression. -

-

-In GRegex (like Python, but unlike Perl), a recursive subpattern call is always -treated as an atomic group. That is, once it has matched some of the subject -string, it is never re-entered, even if it contains untried alternatives and -there is a subsequent matching failure. -

-

-This pattern solves the nested parentheses problem (assume the -G_REGEX_EXTENDED option is set so that white space is -ignored): -

-
-\( ( (?>[^()]+) | (?R) )* \)
-
-

-First it matches an opening parenthesis. Then it matches any number of -substrings which can either be a sequence of non-parentheses, or a -recursive match of the pattern itself (that is, a correctly parenthesized -substring). Finally there is a closing parenthesis. -

-

-If this were part of a larger pattern, you would not want to recurse -the entire pattern, so instead you could use this: -

-
-( \( ( (?>[^()]+) | (?1) )* \) )
-
-

-We have put the pattern into parentheses, and caused the recursion to -refer to them instead of the whole pattern. In a larger pattern, keeping -track of parenthesis numbers can be tricky. It may be more convenient to -use named parentheses instead. -The Perl syntax for this is (?&name); GRegex also supports the(?P>name) -syntac. We could rewrite the above example as follows: -

-
-(?<pn> \( ( (?>[^()]+) | (?&pn) )* \) )
-
-

-If there is more than one subpattern with the same name, the earliest one is -used. This particular example pattern contains nested unlimited repeats, and so -the use of atomic grouping for matching strings of non-parentheses is important -when applying the pattern to strings that do not match. -For example, when this pattern is applied to -

-
-(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
-
-

-it yields "no match" quickly. However, if atomic grouping is not used, -the match runs for a very long time indeed because there are so many -different ways the + and * repeats can carve up the string, and all -have to be tested before failure can be reported. -

-

-At the end of a match, the values set for any capturing subpatterns are -those from the outermost level of the recursion at which the subpattern -value is set. - - - -If the pattern above is matched against -

-
-(ab(cd)ef)
-
-

-the value for the capturing parentheses is "ef", which is the last -value taken on at the top level. If additional parentheses are added, -giving -

-
-\( ( ( (?>[^()]+) | (?R) )* ) \)
-   ^                        ^
-   ^                        ^
-
-

-the string they capture is "ab(cd)ef", the contents of the top level -parentheses. -

-

-Do not confuse the (?R) item with the condition (R), which tests for -recursion. Consider this pattern, which matches text in angle brackets, -allowing for arbitrary nesting. Only digits are allowed in nested -brackets (that is, when recursing), whereas any characters are permitted -at the outer level. -

-
-< (?: (?(R) \d++ | [^<>]*+) | (?R)) * >
-
-

-In this pattern, (?(R) is the start of a conditional subpattern, with -two different alternatives for the recursive and non-recursive cases. -The (?R) item is the actual recursive call. -

-
-
-

Subpatterns as subroutines

-

-If the syntax for a recursive subpattern reference (either by number or -by name) is used outside the parentheses to which it refers, it operates -like a subroutine in a programming language. The "called" subpattern may -be defined before or after the reference. An earlier example pointed out -that the pattern -

-
-(sens|respons)e and \1ibility
-
-

-matches "sense and sensibility" and "response and responsibility", but -not "sense and responsibility". If instead the pattern -

-
-(sens|respons)e and (?1)ibility
-
-

-is used, it does match "sense and responsibility" as well as the other -two strings. Another example is given in the discussion of DEFINE above. -

-

-Like recursive subpatterns, a "subroutine" call is always treated as an atomic -group. That is, once it has matched some of the string, it is never -re-entered, even if it contains untried alternatives and there is a subsequent -matching failure. -

-

-When a subpattern is used as a subroutine, processing options such as -case-independence are fixed when the subpattern is defined. They cannot be -changed for different calls. For example, consider this pattern: -

-
-(abc)(?i:(?1))
-
-

-It matches "abcabc". It does not match "abcABC" because the change of -processing option does not affect the called subpattern. -

-
-
-

Copyright

-

-This document was copied and adapted from the PCRE documentation, -specifically from the man page for pcrepattern. -The original copyright note is: -

-
-Copyright (c) 1997-2006 University of Cambridge.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in the
-      documentation and/or other materials provided with the distribution.
-
-    * Neither the name of the University of Cambridge nor the name of Google
-      Inc. nor the names of their contributors may be used to endorse or
-      promote products derived from this software without specific prior
-      written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-resources.html b/docs/reference/glib/html/glib-resources.html deleted file mode 100644 index 1e678110f..000000000 --- a/docs/reference/glib/html/glib-resources.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - -Mailing lists and bug reports: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Mailing lists and bug reports

-

Mailing lists and bug reports — -Getting help with GLib -

-
-
-

Filing a bug report or feature request

-

-If you encounter a bug, misfeature, or missing feature in GLib, please -file a bug report on -http://bugzilla.gnome.org. -We'd also appreciate reports of incomplete or misleading information in -the GLib documentation; file those against the "docs" component of the "glib" -product in Bugzilla. -

-

-Don't hesitate to file a bug report, even if you think we may know -about it already, or aren't sure of the details. Just give us as much -information as you have, and if it's already fixed or has already been -discussed, we'll add a note to that effect in the report. -

-

-The bug tracker should definitely be used for feature requests, it's -not only for bugs. We track all GLib development in Bugzilla, so it's -the way to be sure the GLib developers won't forget about an issue. -

-
-
-

Submitting Patches

-

-If you develop a bugfix or enhancement for GLib, please file that in -Bugzilla as well. Bugzilla allows you to attach files; please attach a -patch generated by the diff utility, using the --u option to make the patch more readable. All patches -must be offered under the terms of the GNU LGPL license, so be sure you -are authorized to give us the patch under those terms. -

-

-If you want to discuss your patch before or after developing it, mail -gtk-devel-list@gnome.org. -But be sure to file the Bugzilla report as well; if the patch is only on the -list and not in Bugzilla, it's likely to slip through the cracks. -

-
-
-

Mailing lists

-

-There are several mailing lists dedicated to GTK+ and related -libraries. Discussion of GLib generally takes place on these lists. -You can subscribe or view the archives of these lists on -http://mail.gnome.org. -

-

-

-
---- - - - - - - - - - - - - - - -

gtk-list@gnome.org

-gtk-list covers general GTK+ (and GLib) topics; questions about using GLib -in programs, GLib from a user standpoint, announcements of GLib-related projects -would all be on-topic. The bulk of the traffic consists of GTK+ programming -questions. -

gtk-devel-list@gnome.org

-gtk-devel-list is for discussion of work on GTK+ (and GLib) itself, it is -not for asking questions about how to use GTK+ (or GLib) -in applications. gtk-devel-list is appropriate for discussion of patches, -bugs, proposed features, and so on. -

gtk-doc-list@gnome.org

-gtk-doc-list is for discussion of the gtk-doc -documentation system (used to document GTK+ and Glib), and for work on the GTK+ -(and GLib) documentation. -

-

-

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-running.html b/docs/reference/glib/html/glib-running.html deleted file mode 100644 index 9c300484e..000000000 --- a/docs/reference/glib/html/glib-running.html +++ /dev/null @@ -1,295 +0,0 @@ - - - - -Running GLib Applications: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Running GLib Applications

-

Running GLib Applications — -How to run and debug your GLib application -

-
-
-

Running and debugging GLib Applications

-
-

Environment variables

-

- The runtime behaviour of GLib applications can be influenced by a - number of environment variables. -

-

Standard variables.  - GLib reads standard environment variables like LANG, - PATH, HOME, TMPDIR, - TZ and LOGNAME. -

-

XDG directories.  - GLib consults the environment variables XDG_DATA_HOME, - XDG_DATA_DIRS, XDG_CONFIG_HOME, - XDG_CONFIG_DIRS, XDG_CACHE_HOME and - XDG_RUNTIME_DIR for the various XDG directories. - For more information, see the XDG basedir spec. -

-

G_FILENAME_ENCODING - This environment variable can be set to a comma-separated list of character - set names. GLib assumes that filenames are encoded in the first character - set from that list rather than in UTF-8. The special token "@locale" can be - used to specify the character set for the current locale. -

-

G_BROKEN_FILENAMES - If this environment variable is set, GLib assumes that filenames are in - the locale encoding rather than in UTF-8. G_FILENAME_ENCODING takes - priority over G_BROKEN_FILENAMES. -

-

G_MESSAGES_PREFIXED - A list of log levels for which messages should be prefixed by the - program name and PID of the application. The default is to prefix - everything except G_LOG_LEVEL_MESSAGE and - G_LOG_LEVEL_INFO. - The possible values are - error, - warning, - critical, - message, - info and - debug. - You can also use the special values - all and - help. - - This environment variable only affects the default log handler, - g_log_default_handler(). -

-

G_MESSAGES_DEBUG - A space-separated list of log domains for which informational - and debug messages should be printed. By default, these - messages are not printed. - - You can also use the special value all. - - This environment variable only affects the default log handler, - g_log_default_handler(). -

-

G_DEBUG - This environment variable can be set to a list of debug options, - which cause GLib to print out different types of debugging information. -

-
---- - - - - - - - - - - - - - - - - - - - - - - -

fatal-warnings

Causes GLib to abort the program at the first call - to g_warning() or g_critical().

fatal-criticals

Causes GLib to abort the program at the first call - to g_critical().

gc-friendly

Newly allocated memory that isn't directly initialized, - as well as memory being freed will be reset to 0. The point here is - to allow memory checkers and similar programs that use Boehm GC alike - algorithms to produce more accurate results.

resident-modules

All modules loaded by GModule will be made resident. - This can be useful for tracking memory leaks in modules which are - later unloaded; but it can also hide bugs where code is accessed - after the module would have normally been unloaded.

bind-now-modules

All modules loaded by GModule will bind their symbols - at load time, even when the code uses %G_MODULE_BIND_LAZY.

-

- The special value all can be used to turn on all debug options. - The special value help can be used to print all available options. -

-

G_SLICE - This environment variable allows reconfiguration of the GSlice - memory allocator. -

-
---- - - - - - - - - - - -

always-malloc

This will cause all slices allocated through - g_slice_alloc() and released by g_slice_free1() to be actually - allocated via direct calls to g_malloc() and g_free(). - This is most useful for memory checkers and similar programs that - use Boehm GC alike algorithms to produce more accurate results. - It can also be in conjunction with debugging features of the system's - malloc() implementation such as glibc's MALLOC_CHECK_=2 to debug - erroneous slice allocation code, although - debug-blocks is usually a better suited debugging - tool.

debug-blocks

-

Using this option (present since GLib 2.13) engages - extra code which performs sanity checks on the released memory - slices. Invalid slice addresses or slice sizes will be reported and - lead to a program halt. This option is for debugging scenarios. - In particular, client packages sporting their own test suite should - always enable this option when running tests. - Global slice validation is ensured by storing size and address - information for each allocated chunk, and maintaining a global - hash table of that data. That way, multi-thread scalability is - given up, and memory consumption is increased. However, the - resulting code usually performs acceptably well, possibly better - than with comparable memory checking carried out using external - tools.

-

An example of a memory corruption scenario that cannot be - reproduced with G_SLICE=always-malloc, but will - be caught by G_SLICE=debug-blocks is as follows: -

-
-            void *slist = g_slist_alloc (); /* void* gives up type-safety */
-            g_list_free (slist);            /* corruption: sizeof (GSList) != sizeof (GList) */
-          
-
-

- The special value all can be used to turn on all options. - The special value help can be used to print all available options. -

-

G_RANDOM_VERSION - If this environment variable is set to '2.0', the outdated - pseudo-random number seeding and generation algorithms from - GLib 2.0 are used instead of the newer, better ones. You should - only set this variable if you have sequences of numbers that were - generated with Glib 2.0 that you need to reproduce exactly. -

-

LIBCHARSET_ALIAS_DIR - Allows to specify a nonstandard location for the - charset.aliases file that is used by the - character set conversion routines. The default location is the - libdir specified at compilation time. -

-

TZDIR - Allows to specify a nonstandard location for the timezone data files - that are used by the #GDateTime API. The default location is under - /usr/share/zoneinfo. For more information, - also look at the tzset manual page. -

-
-
-
-

Locale

-

-A number of interfaces in GLib depend on the current locale in which -an application is running. Therefore, most GLib-using applications should -call setlocale (LC_ALL, "") to set up the current -locale. -

-

-On Windows, in a C program there are several locale concepts -that not necessarily are synchronized. On one hand, there is the -system default ANSI code-page, which determines what encoding is used -for file names handled by the C library's functions and the Win32 -API. (We are talking about the "narrow" functions here that take -character pointers, not the "wide" ones.) -

-

-On the other hand, there is the C library's current locale. The -character set (code-page) used by that is not necessarily the same as -the system default ANSI code-page. Strings in this character set are -returned by functions like strftime(). -

-
-

-glib ships with a set of python macros for the gdb debugger. These includes pretty -printers for lists, hashtables and gobject types. It also has a backtrace filter -that makes backtraces with signal emissions easier to read. -

-

-To use this you need a recent enough gdb that supports python scripting. Gdb 7.0 -should be recent enough, but branches of the "archer" gdb tree as used in Fedora 11 -and Fedora 12 should work too. You then need to install glib in the same prefix as -gdb so that the python gdb autoloaded files get installed in the right place for -gdb to pick up. -

-

-General pretty printing should just happen without having to do anything special. -To get the signal emission filtered backtrace you must use the "new-backtrace" command -instead of the standard one. -

-

-There is also a new command called gforeach that can be used to apply a command -on each item in a list. E.g. you can do -

-
-gforeach i in some_list_variable: print *(GtkWidget *)l
-
-

-Which would print the contents of each widget in a list of widgets. -

-
-
-

SystemTap

-

-SystemTap is a dynamic whole-system -analysis toolkit. GLib ships with a file libglib-2.0.so.*.stp which defines a -set of probe points, which you can hook into with custom SystemTap scripts. -See the files libglib-2.0.so.*.stp, libgobject-2.0.so.*.stp -and libgio-2.0.so.*.stp which -are in your shared SystemTap scripts directory. -

-
-
-
-

Memory statistics

-

-g_mem_profile() will output a summary g_malloc() memory usage, if memory -profiling has been enabled by calling -g_mem_set_vtable (glib_mem_profiler_table) upon startup. -

-

-If GLib has been configured with --enable-debug=yes, -then g_slice_debug_tree_statistics() can be called in a debugger to -output details about the memory usage of the slice allocator. -

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib-utilities.html b/docs/reference/glib/html/glib-utilities.html deleted file mode 100644 index 584a64b13..000000000 --- a/docs/reference/glib/html/glib-utilities.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - -GLib Utilities: GLib Reference Manual - - - - - - - - - - - - - - - - -
-

-GLib Utilities

-
-
-String Utility Functions — various string-related functions -
-
-Character Set Conversion — convert strings between different character sets -
-
-Unicode Manipulation — functions operating on Unicode characters and - UTF-8 strings -
-
-Base64 Encoding — encodes and decodes data in Base64 format -
-
-Data Checksums — computes the checksum for data -
-
-Secure HMAC Digests — computes the HMAC for data -
-
-Internationalization — gettext support macros -
-
-Date and Time Functions — calendrical calculations and miscellaneous time stuff -
-
-GTimeZone — a structure representing a time zone -
-
-GDateTime — a structure representing Date and Time -
-
-Random Numbers — pseudo-random number generator -
-
-Hook Functions — support for manipulating lists of hook functions -
-
-Miscellaneous Utility Functions — a selection of portable utility functions -
-
-Lexical Scanner — a general purpose lexical scanner -
-
-Timers — keep track of elapsed time -
-
-Spawning Processes — process launching -
-
-File Utilities — various file-related functions -
-
-URI Functions — manipulating URIs -
-
-Hostname Utilities — Internet hostname utilities -
-
-Shell-related Utilities — shell-like commandline handling -
-
-Commandline option parser — parses commandline options -
-
-Glob-style pattern matching — matches strings against patterns containing '*' - (wildcard) and '?' (joker) -
-
-Perl-compatible regular expressions — matches strings against regular expressions -
-
-Regular expression syntax — -syntax and semantics of regular expressions supported by GRegex - -
-
-Simple XML Subset Parser — parses a subset of XML -
-
-Key-value file parser — parses .ini-like config files -
-
-Bookmark file parser — parses files containing bookmarks -
-
-Testing — a test framework -
-
-UNIX-specific utilities and integration — pipes, signal handling -
-
-Windows Compatibility Functions — UNIX emulation on Windows -
-
-GUuid — a universally unique identifier -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/glib.devhelp2 b/docs/reference/glib/html/glib.devhelp2 deleted file mode 100644 index 412d65bb9..000000000 --- a/docs/reference/glib/html/glib.devhelp2 +++ /dev/null @@ -1,3193 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/glib/html/glib.html b/docs/reference/glib/html/glib.html deleted file mode 100644 index cd563afa4..000000000 --- a/docs/reference/glib/html/glib.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - -GLib Overview: GLib Reference Manual - - - - - - - - - - - - - - - - -
-

-GLib Overview

-
-
-Compiling the GLib package — How to compile GLib itself -
-
-Cross-compiling the GLib package — -How to cross-compile GLib - -
-
-Writing GLib Applications — -General considerations when programming with GLib - -
-
-Compiling GLib Applications — -How to compile your GLib application - -
-
-Running GLib Applications — -How to run and debug your GLib application - -
-
-Changes to GLib — -Incompatible changes made between successing versions of GLib - -
-
-Mailing lists and bug reports — -Getting help with GLib - -
-
-

- GLib is a general-purpose utility library, which provides many useful - data types, macros, type conversions, string utilities, file utilities, - a mainloop abstraction, and so on. It works on many UNIX-like platforms, - as well as Windows and OS X. GLib is released under the GNU Library - General Public License (GNU LGPL). -

-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/gtester-report.html b/docs/reference/glib/html/gtester-report.html deleted file mode 100644 index d67de1864..000000000 --- a/docs/reference/glib/html/gtester-report.html +++ /dev/null @@ -1,80 +0,0 @@ - - - - -gtester-report: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

gtester-report

-

gtester-report — test report formatting utility

-
-
-

Synopsis

-

gtester-report [option...] [gtester-log]

-
-
-

Description

-

gtester-report is a script which converts -the XML output generated by gtester into HTML. -

-
-
-

Options

-
---- - - - - - - - - - - - - - - -

-h, --help

-print help and exit -

-v, --version

-print version information and exit -

-s, --subunit

-Output subunit. Needs python-subunit. -

-
-
-

See also

-

-gtester(1) -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/gtester.html b/docs/reference/glib/html/gtester.html deleted file mode 100644 index f9e7a174f..000000000 --- a/docs/reference/glib/html/gtester.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - -gtester: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

gtester

-

gtester — test running utility

-
-
-

Synopsis

-

gtester [OPTION...] [testprogram]

-
-
-

Description

-

gtester is a utility to run unit tests that have -been written using the GLib test framework. -

-

-When called with the -o option, gtester -writes an XML report of the test results, which can be converted -into HTML using the gtester-report utility. -

-
-
-

Options

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-h, --help

-print help and exit -

-v, --version

-print version information and exit -

--g-fatal-warnings

-make warnings fatal -

-k, --keep-going

-continue running after tests failed -

-l

-list paths of available test cases -

-m=MODE

-

- run test cases in MODE, which can be one of: - -

-
---- - - - - - - - - - - - - - - - - - - - - - - -

perf

- run performance tests -

slow, thorough

- run slow tests, or repeat non-deterministic tests more often -

quick

- do not run slow or performance tests, or do extra repeats - of non-deterministic tests (default) -

undefined

- run test cases that deliberately provoke checks or assertion - failures, if implemented (default) -

no-undefined

- do not run test cases that deliberately provoke checks or - assertion failures -

-

- -

-

-p=TESTPATH

-only run test cases matching TESTPATH -

-s=TESTPATH

-skip test cases matching TESTPATH -

--seed=SEEDSTRING

-run all test cases with random number seed SEEDSTRING -

-o=LOGFILE

-write the test log to LOGFILE -

-q, --quiet

-suppress per test binary output -

--verbose

-report success per testcase -

-
-
-

See also

-

-gtester-report(1) -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/gvariant-format-strings.html b/docs/reference/glib/html/gvariant-format-strings.html deleted file mode 100644 index e72c8a168..000000000 --- a/docs/reference/glib/html/gvariant-format-strings.html +++ /dev/null @@ -1,1338 +0,0 @@ - - - - -GVariant Format Strings: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GVariant Format Strings

-

GVariant Format Strings — varargs conversion of GVariants

-
-
-

Variable Argument Conversions

-

- This page attempts to document how to perform variable argument - conversions with GVariant. -

-

- Conversions occur according to format strings. A format string is a two-way mapping between a single - GVariant value and one or more C values. -

-

- A conversion from C values into a GVariant value is made using the - g_variant_new() function. A conversion from a - GVariant into C values is made using the - g_variant_get() function. -

-
-
-

Syntax

-

- This section exhaustively describes all possibilities for GVariant format strings. There are no valid forms of - format strings other than those described here. Please note that the format string syntax is likely to expand in the - future. -

-

- Valid format strings have one of the following forms: -

-
    -
  • any type string

  • -
  • - a type string prefixed with a '@' -

  • -
  • - '&s' '&o', '&g', '^as', - '^a&s', '^ao', '^a&o','^ay', - '^&ay', '^aay' or '^a&ay'. -

  • -
  • - any format string, prefixed with an 'm' -

  • -
  • - a sequence of zero or more format strings, concatenated and enclosed in parentheses -

  • -
  • - an opening brace, followed by two format strings, followed by a closing brace (subject to the constraint that the - first format string correspond to a type valid for use as the key type of a dictionary) -

  • -
-
-
-

Symbols

-

- The following table describes the rough meaning of symbols that may appear inside a GVariant format string. Each - symbol is described in detail in its own section, including usage examples. -

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- Symbol -

-
-

- Meaning -

-
-

- - b, y, n, q, i, - u, x, t, h, d - -

-
-

- Used for building or deconstructing boolean, byte and numeric types. See - Numeric Types below. -

-
-

- - s, o, g - -

-
-

- Used for building or deconstructing string types. See - Strings below. -

-
-

- v -

-
-

- Used for building or deconstructing variant types. See - Variants below. -

-
-

- - a - -

-
-

- Used for building or deconstructing arrays. See - Arrays below. -

-
-

- - m - -

-
-

- Used for building or deconstructing maybe types. See - Maybe Types below. -

-
-

- - () - -

-
-

- Used for building or deconstructing tuples. See - Tuples below. -

-
-

- - {} - -

-
-

- Used for building or deconstructing dictionary entries. See - Dictionaries below. -

-
-

- - @ - -

-
-

- Used as a prefix for a GVariant type string (not a prefix for a format string, so @as is - a valid format string but @^as is not). Denotes that a pointer to a - GVariant should be used in place of the normal C type or types. For - g_variant_new() this means that you must pass a - non-NULL (GVariant - *); if it is a floating reference, ownership will be taken, as - if by using g_variant_ref_sink(). - For g_variant_get() this means that you - must pass a pointer to a (GVariant *) for the value to be returned - by reference or NULL to ignore the value. See - GVariant * below. -

-
-

- - *, ?, r - -

-
-

- Exactly equivalent to @*, @? and @r. Provided only for - completeness so that all GVariant type strings can be used also as format strings. See GVariant * below. -

-
-

- & -

-
-

- Used as a prefix for a GVariant type string (not a prefix for a format string, so &s is - a valid format string but &@s is not). - Denotes that a C pointer to serialised data - should be used in place of the normal C type. See - Pointers below. -

-
-

- ^ -

-
-

- Used as a prefix on some specific types of format strings. See - Convenience Conversions below. -

-
-
-

Numeric Types

-

- - Characters: b, y, n, q, - i, u, x, t, h, - d - -

-

- Variable argument conversions from numeric types work in the most obvious way possible. Upon encountering one of - these characters, g_variant_new() takes the equivalent C - type as an argument. g_variant_get() takes a pointer to - the equivalent C type (or NULL to ignore the value). -

-

- The equivalent C types are as follows: -

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- Character -

-
-

- Equivalent C type -

-
-

- - b - -

-
-

- gboolean -

-
-

- - y - -

-
-

- guchar -

-
-

- - n - -

-
-

- gint16 -

-
-

- - q - -

-
-

- guint16 -

-
-

- - i - -

-
-

- gint32 -

-
-

- - u - -

-
-

- guint32 -

-
-

- - x - -

-
-

- gint64 -

-
-

- - t - -

-
-

- guint64 -

-
-

- - h - -

-
-

- gint32 -

-
-

- - d - -

-
-

- gdouble -

-
-

- Note that in C, small integer types in variable argument lists are promoted up to int or unsigned int as appropriate, and - read back accordingly. int is 32 bits on every platform on which GLib is - currently supported. This means that you can use C expressions of type int - with g_variant_new() and format characters - 'b', 'y', 'n', 'q', - 'i', 'u' and 'h'. Specifically, you can use integer - literals with these characters. -

-

- When using the 'x' and 't' characters, you must ensure that the value that you - provide is 64 bit. This means that you should use a cast or make use of the - G_GINT64_CONSTANT or - G_GUINT64_CONSTANT macros. -

-

- No type promotion occurs when using g_variant_get() since - it operates with pointers. The pointers must always point to a memory region of exactly the correct size. -

-
-

Examples

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
GVariant *value1, *value2, *value3, *value4;
-
-value1 = g_variant_new ("y", 200);
-value2 = g_variant_new ("b", TRUE);
-value3 = g_variant_new ("d", 37.5):
-value4 = g_variant_new ("x", G_GINT64_CONSTANT (998877665544332211));
-
-{
-  gdouble floating;
-  gboolean truth;
-  gint64 bignum;
-
-
-  g_variant_get (value1, "y", NULL);      /* ignore the value. */
-  g_variant_get (value2, "b", &truth);
-  g_variant_get (value3, "d", &floating);
-  g_variant_get (value4, "x", &bignum);
-}
-
- -
-
-
-
-

Strings

-

- - Characters: s, o, g - -

-

- String conversions occur to and from standard nul-terminated C strings. Upon encountering an - 's', 'o' or 'g' in a format string, - g_variant_new() takes a (const - gchar *) and makes a copy of it. - NULL is not a valid string; use - maybe types to encode that. If the 'o' or - 'g' characters are used, care must be taken to ensure that the passed string is a valid DBus - object path or DBus type signature, respectively. -

-

- Upon encounting 's', 'o' or 'g', g_variant_get() takes a pointer to a - (gchar *) (ie: (gchar **)) and - sets it to a newly-allocated copy of the string. It is appropriate to free this copy using - g_free(). - NULL may also be passed to indicate that the value of the - string should be ignored (in which case no copy is made). -

-
-

Examples

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
GVariant *value1, *value2, *value3;
-
-value1 = g_variant_new ("s", "hello world!");
-value2 = g_variant_new ("o", "/must/be/a/valid/path");
-value3 = g_variant_new ("g", "iias");
-
-#if 0
-  g_variant_new ("s", NULL);      /* not valid: NULL is not a string. */
-#endif
-
-{
-  gchar *result;
-
-  g_variant_get (value1, "s", &result);
-  g_print ("It was '%s'\n", result);
-  g_free (result);
-}
-
- -
-
-
-
-

Variants

-

- - Characters: v - -

-

- Upon encountering a 'v', - g_variant_new() takes a (GVariant *). The value of the - GVariant is used as the contents of the variant value. -

-

- Upon encountering a 'v', g_variant_get() takes a pointer to a - (GVariant *) (ie: (GVariant **) - ). It is set to a new reference to a GVariant instance - containing the contents of the variant value. It is appropriate to free this reference using - g_variant_unref(). - NULL may also be passed to indicate that the value should be - ignored (in which case no new reference is created). -

-
-

Examples

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
GVariant *x, *y;
-
-/* the following two lines are equivalent: */
-x = g_variant_new ("v", y);
-x = g_variant_new_variant (y);
-
-/* as are these: */
-g_variant_get (x, "v", &y);
-y = g_variant_get_variant (x);
-
- -
-
-
-
-

Arrays

-

- - Characters: a - -

-

- Upon encountering an 'a' character followed by a type string, - g_variant_new() will take a - (GVariantBuilder *) that has been created as an array builder - for an array of the type given in the type string. The builder will have - g_variant_builder_end() called on it and the - result will be used as the value. As a special exception, if the given type string is a definite type, then - NULL may be given to mean an empty array of that type. -

-

- Upon encountering an 'a' character followed by a type string, - g_variant_get() will take a pointer to a - (GVariantIter *) (ie: - (GVariantIter **)). - A new heap-allocated iterator is created and returned, initialised for iterating over the elements of the array. - This iterator should be freed when you are done with it, using - g_variant_iter_free(). - NULL may also be given to indicate that the value of the array - should be ignored. -

-
-

Examples

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
GVariantBuilder *builder;
-GVariant *value;
-
-builder = g_variant_builder_new (G_VARIANT_TYPE ("as"));
-g_variant_builder_add (builder, "s", "when");
-g_variant_builder_add (builder, "s", "in");
-g_variant_builder_add (builder, "s", "the");
-g_variant_builder_add (builder, "s", "course");
-value = g_variant_new ("as", builder);
-g_variant_builder_unref (builder);
-
-{
-  GVariantIter *iter;
-  gchar *str;
-
-  g_variant_get (value, "as", &iter);
-  while (g_variant_iter_loop (iter, "s", &str))
-    g_print ("%s\n", str);
-  g_variant_iter_free (iter);
-}
-
-g_variant_unref (value);
-
- -
-
-
-
-

Maybe Types

-

- - Characters: m - -

-

- Maybe types are handled in two separate ways depending on the format string that follows the - 'm'. The method that is used currently depends entirely on the character immediately following the - 'm'. -

-

- The first way is used with format strings starting with 'a', 's', - 'o', 'g', 'v', '@', - '*', '?', 'r', '&', or - '^'. In all of these cases, for non-maybe types, - g_variant_new() takes a pointer to a - non-NULL value and - g_variant_get() returns (by reference) a - non-NULL pointer. When any of these format strings are - prefixed with an 'm', the type of arguments that are collected does not change in any way, but - NULL becomes a permissable value, to indicate the Nothing case. -

-

- Note that the "special exception" introduced in the array section for constructing empty arrays is ignored - here. Using a NULL pointer with the format string 'mas' constructs - the Nothing value -- not an empty array. -

-

- The second way is used with all other format strings. For - g_variant_new() an additional - gboolean argument is collected and for - g_variant_get() an additional - (gboolean *). Following this argument, the arguments that are normally - collected for the equivalent non-maybe type will be collected. -

-

- If FALSE is given to - g_variant_new() then the Nothing value is constructed and - the collected arguments are ignored. Otherwise (if TRUE was - given), the arguments are used in the normal way to create the Just value. -

-

- If NULL is given to - g_variant_get() then the value is ignored. If a - non-NULL pointer is given then it is used to return by reference - whether the value was Just. In the case that the value was Just, the - gboolean will be set to - TRUE and the value will be stored in the arguments in the usual - way. In the case that the value was Nothing, the gboolean will be set to - FALSE and the arguments will be collected in the normal way - but have their values set to binary zero. -

-
-

Examples

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
GVariant *value1, *value2, *value3, *value4, *value5, *value6;
-value1 = g_variant_new ("ms", "Hello world");
-value2 = g_variant_new ("ms", NULL);
-value3 = g_variant_new ("(m(ii)s)", TRUE, 123, 456, "Done");
-value4 = g_variant_new ("(m(ii)s)", FALSE, -1, -1, "Done");          /* both '-1' are ignored. */
-value5 = g_variant_new ("(m@(ii)s)", NULL, "Done");
-
-{
-  GVariant *contents;
-  const gchar *cstr;
-  gboolean just;
-  gint32 x, y;
-  gchar *str;
-
-  g_variant_get (value1, "ms", &str);
-  if (str != NULL)
-    g_print ("str: %s\n", str);
-  else
-    g_print ("it was null\n");
-  g_free (str);
-
-
-  g_variant_get (value2, "m&s", &cstr);
-  if (cstr != NULL)
-    g_print ("str: %s\n", cstr);
-  else
-    g_print ("it was null\n");
-  /* don't free 'cstr' */
-
-
-  /* NULL passed for the gboolean *, but two 'gint32 *' still collected */
-  g_variant_get (value3, "(m(ii)s)", NULL, NULL, NULL, &str);
-  g_print ("string is %s\n", str);
-  g_free (str);
-
-  /* note: &s used, so g_free() not needed */
-  g_variant_get (value4, "(m(ii)&s)", &just, &x, &y, &cstr);
-  if (just)
-    g_print ("it was (%d, %d)\n", x, y);
-  else
-    g_print ("it was null\n");
-  g_print ("string is %s\n", cstr);
-  /* don't free 'cstr' */
-
-
-  g_variant_get (value5, "(m*s)", &contents, NULL); /* ignore the string. */
-  if (contents != NULL)
-    {
-      g_variant_get (contents, "(ii)", &x, &y);
-      g_print ("it was (%d, %d)\n", x, y);
-      g_variant_unref (contents);
-    }
-  else
-    g_print ("it was null\n");
-}
-
- -
-
-
-
-

Tuples

-

- - Characters: () - -

-

- Tuples are handled by handling each item in the tuple, in sequence. Each item is handled in the usual way. -

-
-

Examples

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
GVariant *value1, *value2;
-
-value1 = g_variant_new ("(s(ii))", "Hello", 55, 77);
-value2 = g_variant_new ("()");
-
-{
-  gchar *string;
-  gint x, y;
-
-  g_variant_get (value1, "(s(ii))", &string, &x, &y);
-  g_print ("%s, %d, %d\n", string, x, y);
-  g_free (string);
-
-  g_variant_get (value2, "()");   /* do nothing... */
-}
-
- -
-
-
-
-

Dictionaries

-

- - Characters: {} - -

-

- Dictionary entries are handled by handling first the key, then the value. Each is handled in the usual way. -

-
-

Examples

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
GVariantBuilder *b;
-GVariant *dict;
-
-b = g_variant_builder_new (G_VARIANT_TYPE ("a{sv}"));
-g_variant_builder_add (b, "{sv}", "name", g_variant_new_string ("foo"));
-g_variant_builder_add (b, "{sv}", "timeout", g_variant_new_int32 (10));
-dict = g_variant_builder_end (b);
-
- -
-
-
-
-

GVariant *

-

- - Characters: @, *, ?, r - - -

-

- Upon encountering a '@' in front of a type string, - g_variant_new() takes a - non-NULL pointer to a - GVariant and uses its value directly instead of collecting arguments to - create the value. The provided GVariant must have a type that matches the - type string following the '@'. '*' is - the same as '@*' (ie: take a GVariant of any type). - '?' is the same as '@?' (ie: take a - GVariant of any basic type). 'r' is the same as - '@r' (ie: take a GVariant of any tuple type). -

-

- Upon encountering a '@' in front of a type string, - g_variant_get() - takes a pointer to a (GVariant *) (ie: a - (GVariant **)) and sets it to a new reference to a - GVariant containing the value (instead of deconstructing the value into - C types in the usual way). NULL can be given to ignore the - value. '*', '?' and 'r' are handled in a way analogous to - what is stated above. -

-

- You can always use '*' as an alternative to '?', 'r' or any - use of '@'. Using the other characters where possible is recommended, however, due to the - improvements in type safety and code self-documentation. -

-
-

Examples

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
GVariant *value1, *value2;
-
-value1 = g_variant_new ("(i@ii)", 44, g_variant_new_int32 (55), 66);
-
-/* note: consumes floating reference count on 'value1' */
-value2 = g_variant_new ("(@(iii)*)", value1, g_variant_new_string ("foo"));
-
-{
-  const gchar *string;
-  GVariant *tmp;
-  gsize length;
-  gint x, y, z;
-
-  g_variant_get (value2, "((iii)*)", &x, &y, &z, &tmp);
-  string = g_variant_get_string (tmp, &length);
-  g_print ("it is %d %d %d %s (length=%d)\n", x, y, z, string, (int) length);
-  g_variant_unref (tmp);
-
-  /* quick way to skip all the values in a tuple */
-  g_variant_get (value2, "(rs)", NULL, &string); /* or "(@(iii)s)" */
-  g_print ("i only got the string: %s\n", string);
-  g_free (string);
-}
-
- -
-
-
-
-

Pointers

-

- - Characters: & - -

-

- The '&' character is used to indicate that serialised data should be directly exchanged via a - pointer. -

-

- Currently, the only use for this character is when it is applied to a string (ie: '&s', - '&o' or '&g'). For - g_variant_new() this has absolutely no effect. The string - is collected and duplicated normally. For g_variant_get() - it means that instead of creating a newly allocated copy of the string, a pointer to the serialised data is - returned. This pointer should not be freed. Validity checks are performed to ensure that the string data will - always be properly nul-terminated. -

-
-

Examples

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
{
-  const gchar *str;
-  GVariant *value;
-
-  value = g_variant_new ("&s", "hello world");
-  g_variant_get (value, "&s", &str);
-  g_print ("string is: %s\n", str);
-  /* no need to free str */
-}
-
- -
-
-
-
-

Convenience Conversions

-

- - Characters: ^ - -

-

- The '^' character currently supports conversion to and from bytestrings or to and from arrays - of strings or bytestrings. It has a number of forms. -

-

- In all forms, when used with g_variant_new() one - pointer value is collected from the variable arguments and passed to a function (as given in the table below). - The result of that function is used as the value for this position. When used with - g_variant_get() one pointer value is produced by using - the function (given in the table) and returned by reference. -

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- Conversion -

-
-

- - Used with g_variant_new() - -

-
-

- - Used with g_variant_get() - -

-
-

- - ^as - -

-
-

- equivalent to g_variant_new_strv() -

-
-

- equivalent to g_variant_dup_strv() -

-
-

- - ^a&s - -

-
-

- equivalent to g_variant_get_strv() -

-
-

- - ^ao - -

-
-

- equivalent to g_variant_new_objv() -

-
-

- equivalent to g_variant_dup_objv() -

-
-

- - ^a&o - -

-
-

- equivalent to g_variant_get_objv() -

-
-

- - ^ay - -

-
-

- equivalent to g_variant_new_bytestring() -

-
-

- equivalent to g_variant_dup_bytestring() -

-
-

- - ^&ay - -

-
-

- equivalent to g_variant_get_bytestring() -

-
-

- - ^aay - -

-
-

- equivalent to g_variant_new_bytestring_array() -

-
-

- equivalent to g_variant_dup_bytestring_array() -

-
-

- - ^a&ay - -

-
-

- equivalent to g_variant_get_bytestring_array() -

-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/gvariant-text.html b/docs/reference/glib/html/gvariant-text.html deleted file mode 100644 index 69f622d71..000000000 --- a/docs/reference/glib/html/gvariant-text.html +++ /dev/null @@ -1,666 +0,0 @@ - - - - -GVariant Text Format: GLib Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GVariant Text Format

-

GVariant Text Format — textual representation of GVariants

-
-
-

GVariant Text Format

-

- This page attempts to document the GVariant text format as produced by - g_variant_print() and parsed by the - g_variant_parse() family of functions. In most - cases the style closely resembles the formatting of literals in Python but there are some additions and - exceptions. -

-

- The functions that deal with GVariant text format absolutely always deal in utf-8. Conceptually, GVariant - text format is a string of Unicode characters -- not bytes. Non-ASCII but otherwise printable Unicode - characters are not treated any differently from normal ASCII characters. -

-

- The parser makes two passes. The purpose of the first pass is to determine the type of the value being - parsed. The second pass does the actual parsing. Based on the fact that all elements in an array have to - have the same type, GVariant is able to make some deductions that would not otherwise be possible. As an - example: - -

-
- - - - - - - -
1
[[1, 2, 3], [4, 5, 6]]
-
- -

- - is parsed as an array of arrays of integers (type 'aai'), but - -

-
- - - - - - - -
1
[[1, 2, 3], [4, 5, 6.0]]
-
- -

- - is parsed as a array of arrays of doubles (type 'aad'). -

-

- As another example, GVariant is able to determine that - -

-
- - - - - - - -
1
["hello", nothing]
-
- -

- - is an array of maybe strings (type 'ams'). -

-

- What the parser accepts as valid input is dependent on context. The API permits for out-of-band type - information to be supplied to the parser (which will change its behaviour). This can be seen in the - GSettings and GDBus command line utilities where the type information is available from the schema or the - remote introspection information. The additional information can cause parses to succeed when they would not - otherwise have been able to (by resolving ambiguous type information) or can cause them to fail (due to - conflicting type information). Unless stated otherwise, the examples given in this section assume that no - out-of-band type data has been given to the parser. -

-
-
-

Syntax Summary

-

- The following table describes the rough meaning of symbols that may appear inside GVariant text format. - Each symbol is described in detail in its own section, including usage examples. -

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- Symbol -

-
-

- Meaning -

-
-

- true, - false -

-
-

- Booleans. -

-
-

- "", - '' -

-
-

- String literal. See Strings below. -

-
-

- numbers -

-
-

- See Numbers below. -

-
-

- () -

-
-

- Tuples. -

-
-

- [] -

-
-

- Arrays. -

-
-

- {} -

-
-

- Dictionaries and Dictionary Entries. -

-
-

- <> -

-
-

- Variants. -

-
-

- just, - nothing -

-
-

- Maybe Types. -

-
-

- @ -

-
-

- Type Annotations. -

-
-

- type keywords -

-
-

- boolean, - byte, - int16, - uint16, - int32, - uint32, - handle, - int64, - uint64, - double, - string, - objectpath, - signature -

-

- See Type Annotations below. -

-
-

- b"", - b'' -

-
-

- Bytestrings. -

-
-

- % -

-
-

- Positional Parameters. -

-
-
-

Booleans

-

- The strings true and false are parsed as booleans. This is the only - way to specify a boolean value. -

-
-
-
-

Strings

-

- Strings literals must be quoted using "" or ''. The two are - completely equivalent (except for the fact that each one is unable to contain itself unescaped). -

-

- Strings are Unicode strings with no particular encoding. For example, to specify the character - é, you just write 'é'. You could also give the Unicode codepoint of - that character (U+E9) as the escape sequence '\u00e9'. Since the strings are pure - Unicode, you should not attempt to encode the utf-8 byte sequence corresponding to the string using escapes; - it won't work and you'll end up with the individual characters corresponding to each byte. -

-

- Unicode escapes of the form \uxxxx and \Uxxxxxxxx are supported, in - hexidecimal. The usual control sequence escapes \a, \b, - \f, \n, \r, \t and - \v are supported. Additionally, a \ before a newline character causes - the newline to be ignored. Finally, any other character following \ is copied literally - (for example, \" or \\) but for forwards compatibility with future - additions you should only use this feature when necessary for escaping backslashes or quotes. -

-

- The usual octal and hexidecimal escapes \0nnn and \xnn are not - supported here. Those escapes are used to encode byte values and GVariant strings are Unicode. -

-

- Single-character strings are not interpreted as bytes. Bytes must be specified by their numerical value. -

-
-
-
-

Numbers

-

- Numbers are given by default as decimal values. Octal and hex values can be given in the usual way (by - prefixing with 0 or 0x). Note that GVariant considers bytes to be - unsigned integers and will print them as a two digit hexidecimal number by default. -

-

- Floating point numbers can also be given in the usual ways, including scientific and hexidecimal notations. -

-

- For lack of additional information, integers will be parsed as int32 values by default. If the number has a - point or an 'e' in it, then it will be parsed as a double precision floating point number by default. If - type information is available (either explicitly or inferred) then that type will be used instead. -

-

- Some examples: -

-

- 5 parses as the int32 value five. -

-

- 37.5 parses as a floating point value. -

-

- 3.75e1 parses the same as the value above. -

-

- uint64 7 parses seven as a uint64. - See Type Annotations. -

-
-
-
-

Tuples

-

- Tuples are formed using the same syntax as Python. Here are some examples: -

-

- () parses as the empty tuple. -

-

- (5,) is a tuple containing a single value. -

-

- ("hello", 42) is a pair. Note that values of different types are permitted. -

-
-
-
-

Arrays

-

- Arrays are formed using the same syntax as Python uses for lists (which is arguably the term that GVariant - should have used). Note that, unlike Python lists, GVariant arrays are statically typed. This has two - implications. -

-

- First, all items in the array must have the same type. Second, the type of the array must be known, even in - the case that it is empty. This means that (unless there is some other way to infer it) type information - will need to be given explicitly for empty arrays. -

-

- The parser is able to infer some types based on the fact that all items in an array must have the same type. - See the examples below: -

-

- [1] parses (without additional type information) as a one-item array of signed integers. -

-

- [1, 2, 3] parses (similarly) as a three-item array. -

-

- [1, 2, 3.0] parses as an array of doubles. This is the most simple case of the type - inferencing in action. -

-

- [(1, 2), (3, 4.0)] causes the 2 to also be parsed as a double (but the 1 and 4 are still - integers). -

-

- ["", nothing] parses as an array of maybe strings. The presence of - "nothing" clearly implies that the array elements are nullable. -

-

- [[], [""]] will parse properly because the type of the first (empty) array can be - inferred to be equal to the type of the second array (both are arrays of strings). -

-

- [b'hello', []] looks odd but will parse properly. - See Bytestrings -

-

- And some examples of errors: -

-

- ["hello", 42] fails to parse due to conflicting types. -

-

- [] will fail to parse without additional type information. -

-
-
-
-

Dictionaries and Dictionary Entries

-

- Dictionaries and dictionary entries are both specified using the {} characters. -

-

- The dictionary syntax is more commonly used. This is what the printer elects to use in the normal case of - dictionary entries appearing in an array (aka "a dictionary"). The separate syntax for dictionary entries - is typically only used for when the entries appear on their own, outside of an array (which is valid but - unusual). Of course, you are free to use the dictionary entry syntax within arrays but there is no good - reason to do so (and the printer itself will never do so). Note that, as with arrays, the type of empty - dictionaries must be established (either explicitly or through inference). -

-

- The dictionary syntax is the same as Python's syntax for dictionaries. Some examples: -

-

- @a{sv} {} parses as the empty dictionary of everyone's favourite type. -

-

- @a{sv} [] is the same as above (owing to the fact that dictionaries are really arrays). -

-

- {1: "one", 2: "two", 3: "three"} parses as a dictionary mapping integers to strings. -

-

- The dictionary entry syntax looks just like a pair (2-tuple) that uses braces instead of parens. The - presence of a comma immediately following the key differentiates it from the dictionary syntax (which - features a colon after the first key). Some examples: -

-

- {1, "one"} is a free-standing dictionary entry that can be parsed on its own or as part - of another container value. -

-

- [{1, "one"}, {2, "two"}, {3, "three"}] is exactly equivalent to the dictionary example - given above. -

-
-
-
-

Variants

-

- Variants are denoted using angle brackets (aka "XML brackets"), <>. They may not - be omitted. -

-

- Using <> effectively disrupts the type inferencing that occurs between array - elements. This can have positive and negative effects. -

-

- [<"hello">, <42>] will parse whereas ["hello", 42] would - not. -

-

- [<['']>, <[]>] will fail to parse even though [[''], []] - parses successfully. You would need to specify [<['']>, <@as []>]. -

-

- {"title": <"frobit">, "enabled": <true>, width: <800>} is an example of - perhaps the most pervasive use of both dictionaries and variants. -

-
-
-
-

Maybe Types

-

- The syntax for specifying maybe types is inspired by Haskell. -

-

- The null case is specified using the keyword nothing and the non-null case is explicitly - specified using the keyword just. GVariant allows just to be omitted - in every case that it is able to unambiguously determine the intention of the writer. There are two cases - where it must be specified: -

-
    -
  • when using nested maybes, in order to specify the just nothing case

  • -
  • - to establish the nullability of the type of a value without explicitly specifying its full type -

  • -
-

- Some examples: -

-

- just 'hello' parses as a non-null nullable string. -

-

- @ms 'hello' is the same (demonstrating how just can be dropped if the type is already - known). -

-

- nothing will not parse wtihout extra type information. -

-

- @ms nothing parses as a null nullable string. -

-

- [just 3, nothing] is an array of nullable integers -

-

- [3, nothing] is the same as the above (demonstrating another place were - just can be dropped). -

-

- [3, just nothing] parses as an array of maybe maybe integers (type - 'ammi'). -

-
-
-
-

Type Annotations

-

- Type annotations allow additional type information to be given to the parser. Depending on the context, - this type information can change the output of the parser, cause an error when parsing would otherwise have - succeeded or resolve an error when parsing would have otherwise failed. -

-

- Type annotations come in two forms: type codes and type keywords. -

-

- Type keywords can be seen as more verbose (and more legible) versions of a common subset of the type codes. - The type keywords boolean, byte, int16, - uint16, int32, uint32, handle, - int64, uint64, double, string, - objectpath and literal signature are each exactly equivalent to their - corresponding type code. -

-

- Type codes are an @ ("at" sign) followed by a definite GVariant type string. Some - examples: -

-

- uint32 5 causes the number to be parsed unsigned instead of signed (the default). -

-

- @u 5 is the same -

-

- objectpath "/org/gnome/xyz" creates an object path instead of a normal string -

-

- @au [] specifies the type of the empty array (which would not parse otherwise) -

-

- @ms "" indicates that a string value is meant to have a maybe type -

-
-
-
-

Bytestrings

-

- The bytestring syntax is a piece of syntactic sugar meant to complement the bytestring APIs in GVariant. It - constructs arrays of non-nul bytes (type 'ay') with a nul terminator at the end. -

-

- Bytestrings are specified with either b"" or b''. As with strings, - there is no fundamental difference between the two different types of quotes. -

-

- Bytestrings support the full range of escapes that you would expect (ie: those supported by - g_strcompress(). This includes the normal control - sequence escapes (as mentioned in the section on strings) as well as octal and hexidecimal escapes of the - forms \0nnn and \xnn. -

-

- b'abc' is equivalent to [byte 0x97, 0x98, 0x99, 0]. -

-

- When formatting arrays of bytes, the printer will choose to display the array as a bytestring if it contains - a nul character at the end and no other nul bytes within. Otherwise, it is formatted as a normal array. -

-
-
-
-

Positional Parameters

-

- Positional parameters are not a part of the normal GVariant text format, but they are mentioned here because - they can be used with g_variant_new_parsed(). -

-

- A positional parameter is indicated with a % followed by any valid - GVariant Format String. Variable arguments are collected as - specified by the format string and the resulting value is inserted at the current position. -

-

- This feature is best explained by example: -

-
- - - - - - - -
1
-2
-3
-4
-5
char *t = "xyz";
-gboolean en = false;
-GVariant *value;
-
-value = g_variant_new_parsed ("{'title': <%s>, 'enabled': <%b>}", t, en);
-
- -

- This constructs a dictionary mapping strings to variants (type 'a{sv}') with two items in - it. The key names are parsed from the string and the values for those keys are taken as variable arguments - parameters. -

-

- The arguments are always collected in the order that they appear in the string to be parsed. Format strings - that collect multiple arguments are permitted, so you may require more varargs parameters than the number of - % signs that appear. You can also give format strings that collect no arguments, but - there's no good reason to do so. -

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/home.png b/docs/reference/glib/html/home.png deleted file mode 100644 index 9346b336a..000000000 Binary files a/docs/reference/glib/html/home.png and /dev/null differ diff --git a/docs/reference/glib/html/index.html b/docs/reference/glib/html/index.html deleted file mode 100644 index 9911c5fdc..000000000 --- a/docs/reference/glib/html/index.html +++ /dev/null @@ -1,340 +0,0 @@ - - - - -GLib Reference Manual: GLib Reference Manual - - - - - - - -
-
-
-
-

- for GLib 2.52.3 - - The latest version of this documentation can be found on-line at - https://developer.gnome.org/glib/unstable/. -

-
-
-
-
-
GLib Overview
-
-
-Compiling the GLib package — How to compile GLib itself -
-
-Cross-compiling the GLib package — -How to cross-compile GLib - -
-
-Writing GLib Applications — -General considerations when programming with GLib - -
-
-Compiling GLib Applications — -How to compile your GLib application - -
-
-Running GLib Applications — -How to run and debug your GLib application - -
-
-Changes to GLib — -Incompatible changes made between successing versions of GLib - -
-
-Mailing lists and bug reports — -Getting help with GLib - -
-
-
GLib Fundamentals
-
-
-Version Information — variables and functions to check the GLib version -
-
-Basic Types — standard GLib types, defined for ease-of-use - and portability -
-
-Standard Macros — commonly-used macros -
-
-Type Conversion Macros — portably storing integers in pointer variables -
-
-Byte Order Macros — a portable way to convert between different byte orders -
-
-Bounds-checking integer arithmetic — a set of helpers for performing checked integer arithmetic -
-
-Numerical Definitions — mathematical constants, and floating point decomposition -
-
-Miscellaneous Macros — specialized macros which are not used often -
-
-Atomic Operations — basic atomic integer and pointer operations -
-
-
GLib Core Application Support
-
-
-The Main Event Loop — manages all available sources of events -
-
-Threads — portable support for threads, mutexes, locks, - conditions and thread private data -
-
-Thread Pools — pools of threads to execute work concurrently -
-
-Asynchronous Queues — asynchronous communication between threads -
-
-Dynamic Loading of Modules — portable method for dynamically loading 'plug-ins' -
-
-Memory Allocation — general memory-handling -
-
-Memory Slices — efficient way to allocate groups of equal-sized - chunks of memory -
-
-IO Channels — portable support for using files, pipes and sockets -
-
-Error Reporting — a system for reporting errors -
-
-Warnings and Assertions -
-
-Message Output and Debugging Functions — functions to output messages and help debug applications -
-
-
GLib Utilities
-
-
-String Utility Functions — various string-related functions -
-
-Character Set Conversion — convert strings between different character sets -
-
-Unicode Manipulation — functions operating on Unicode characters and - UTF-8 strings -
-
-Base64 Encoding — encodes and decodes data in Base64 format -
-
-Data Checksums — computes the checksum for data -
-
-Secure HMAC Digests — computes the HMAC for data -
-
-Internationalization — gettext support macros -
-
-Date and Time Functions — calendrical calculations and miscellaneous time stuff -
-
-GTimeZone — a structure representing a time zone -
-
-GDateTime — a structure representing Date and Time -
-
-Random Numbers — pseudo-random number generator -
-
-Hook Functions — support for manipulating lists of hook functions -
-
-Miscellaneous Utility Functions — a selection of portable utility functions -
-
-Lexical Scanner — a general purpose lexical scanner -
-
-Timers — keep track of elapsed time -
-
-Spawning Processes — process launching -
-
-File Utilities — various file-related functions -
-
-URI Functions — manipulating URIs -
-
-Hostname Utilities — Internet hostname utilities -
-
-Shell-related Utilities — shell-like commandline handling -
-
-Commandline option parser — parses commandline options -
-
-Glob-style pattern matching — matches strings against patterns containing '*' - (wildcard) and '?' (joker) -
-
-Perl-compatible regular expressions — matches strings against regular expressions -
-
-Regular expression syntax — -syntax and semantics of regular expressions supported by GRegex - -
-
-Simple XML Subset Parser — parses a subset of XML -
-
-Key-value file parser — parses .ini-like config files -
-
-Bookmark file parser — parses files containing bookmarks -
-
-Testing — a test framework -
-
-UNIX-specific utilities and integration — pipes, signal handling -
-
-Windows Compatibility Functions — UNIX emulation on Windows -
-
-GUuid — a universally unique identifier -
-
-
GLib Data Types
-
-
-Doubly-Linked Lists — linked lists that can be iterated over in both directions -
-
-Singly-Linked Lists — linked lists that can be iterated in one direction -
-
-Double-ended Queues — double-ended queue data structure -
-
-Sequences — scalable lists -
-
-Trash Stacks — maintain a stack of unused allocated memory chunks -
-
-Hash Tables — associations between keys and values so that - given a key the value can be found quickly -
-
-Strings — text buffers which grow automatically - as text is added -
-
-String Chunks — efficient storage of groups of strings -
-
-Arrays — arrays of arbitrary elements which grow - automatically as elements are added -
-
-Pointer Arrays — arrays of pointers to any type of data, which - grow automatically as new elements are added -
-
-Byte Arrays — arrays of bytes -
-
-Balanced Binary Trees — a sorted collection of key/value pairs optimized - for searching and traversing in order -
-
-N-ary Trees — trees of data with any number of branches -
-
-Quarks — a 2-way association between a string and a - unique integer identifier -
-
-Keyed Data Lists — lists of data elements which are accessible by a - string or GQuark identifier -
-
-Datasets — associate groups of data elements with - particular memory locations -
-
-GVariantType — introduction to the GVariant type system -
-
-GVariant — strongly typed value datatype -
-
-GVariant Format Strings — varargs conversion of GVariants -
-
-GVariant Text Format — textual representation of GVariants -
-
-
Deprecated APIs
-
-
-Deprecated thread API — old thread APIs (for reference only) -
-
-Caches — caches allow sharing of complex data structures - to save resources -
-
-Relations and Tuples — tables of data which can be indexed on any - number of fields -
-
-Automatic String Completion — support for automatic completion using a group - of target strings -
-
-
GLib Tools
-
-
-glib-gettextize — gettext internationalization utility -
-
-gtester — test running utility -
-
-gtester-report — test report formatting utility -
-
-
Index
-
Annotation Glossary
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/left-insensitive.png b/docs/reference/glib/html/left-insensitive.png deleted file mode 100644 index 3269393a7..000000000 Binary files a/docs/reference/glib/html/left-insensitive.png and /dev/null differ diff --git a/docs/reference/glib/html/left.png b/docs/reference/glib/html/left.png deleted file mode 100644 index 2abde032b..000000000 Binary files a/docs/reference/glib/html/left.png and /dev/null differ diff --git a/docs/reference/glib/html/mainloop-states.gif b/docs/reference/glib/html/mainloop-states.gif deleted file mode 100644 index 0ba1a8999..000000000 Binary files a/docs/reference/glib/html/mainloop-states.gif and /dev/null differ diff --git a/docs/reference/glib/html/right-insensitive.png b/docs/reference/glib/html/right-insensitive.png deleted file mode 100644 index 4c95785b9..000000000 Binary files a/docs/reference/glib/html/right-insensitive.png and /dev/null differ diff --git a/docs/reference/glib/html/right.png b/docs/reference/glib/html/right.png deleted file mode 100644 index 76260ec88..000000000 Binary files a/docs/reference/glib/html/right.png and /dev/null differ diff --git a/docs/reference/glib/html/style.css b/docs/reference/glib/html/style.css deleted file mode 100644 index 367542097..000000000 --- a/docs/reference/glib/html/style.css +++ /dev/null @@ -1,479 +0,0 @@ -body -{ - font-family: cantarell, sans-serif; -} -.synopsis, .classsynopsis -{ - /* tango:aluminium 1/2 */ - background: #eeeeec; - background: rgba(238, 238, 236, 0.5); - border: solid 1px rgb(238, 238, 236); - padding: 0.5em; -} -.programlisting -{ - /* tango:sky blue 0/1 */ - /* fallback for no rgba support */ - background: #e6f3ff; - border: solid 1px #729fcf; - background: rgba(114, 159, 207, 0.1); - border: solid 1px rgba(114, 159, 207, 0.2); - padding: 0.5em; -} -.variablelist -{ - padding: 4px; - margin-left: 3em; -} -.variablelist td:first-child -{ - vertical-align: top; -} - -div.gallery-float -{ - float: left; - padding: 10px; -} -div.gallery-float img -{ - border-style: none; -} -div.gallery-spacer -{ - clear: both; -} - -a, a:visited -{ - text-decoration: none; - /* tango:sky blue 2 */ - color: #3465a4; -} -a:hover -{ - text-decoration: underline; - /* tango:sky blue 1 */ - color: #729fcf; -} - -div.informaltable table -{ - border-collapse: separate; - border-spacing: 1em 0.3em; - border: none; -} - -div.informaltable table td, div.informaltable table th -{ - vertical-align: top; -} - -.function_type, -.variable_type, -.property_type, -.signal_type, -.parameter_name, -.struct_member_name, -.union_member_name, -.define_keyword, -.datatype_keyword, -.typedef_keyword -{ - text-align: right; -} - -/* dim non-primary columns */ -.c_punctuation, -.function_type, -.variable_type, -.property_type, -.signal_type, -.define_keyword, -.datatype_keyword, -.typedef_keyword, -.property_flags, -.signal_flags, -.parameter_annotations, -.enum_member_annotations, -.struct_member_annotations, -.union_member_annotations -{ - color: #888a85; -} - -.function_type a, -.function_type a:visited, -.function_type a:hover, -.property_type a, -.property_type a:visited, -.property_type a:hover, -.signal_type a, -.signal_type a:visited, -.signal_type a:hover, -.signal_flags a, -.signal_flags a:visited, -.signal_flags a:hover -{ - color: #729fcf; -} - -td p -{ - margin: 0.25em; -} - -div.table table -{ - border-collapse: collapse; - border-spacing: 0px; - /* tango:aluminium 3 */ - border: solid 1px #babdb6; -} - -div.table table td, div.table table th -{ - /* tango:aluminium 3 */ - border: solid 1px #babdb6; - padding: 3px; - vertical-align: top; -} - -div.table table th -{ - /* tango:aluminium 2 */ - background-color: #d3d7cf; -} - -h4 -{ - color: #555753; - margin-top: 1em; - margin-bottom: 1em; -} - -hr -{ - /* tango:aluminium 1 */ - color: #d3d7cf; - background: #d3d7cf; - border: none 0px; - height: 1px; - clear: both; - margin: 2.0em 0em 2.0em 0em; -} - -dl.toc dt -{ - padding-bottom: 0.25em; -} - -dl.toc > dt -{ - padding-top: 0.25em; - padding-bottom: 0.25em; - font-weight: bold; -} - -dl.toc > dl -{ - padding-bottom: 0.5em; -} - -.parameter -{ - font-style: normal; -} - -.footer -{ - padding-top: 3.5em; - /* tango:aluminium 3 */ - color: #babdb6; - text-align: center; - font-size: 80%; -} - -.informalfigure, -.figure -{ - margin: 1em; -} - -.informalexample, -.example -{ - margin-top: 1em; - margin-bottom: 1em; -} - -.warning -{ - /* tango:orange 0/1 */ - background: #ffeed9; - background: rgba(252, 175, 62, 0.1); - border-color: #ffb04f; - border-color: rgba(252, 175, 62, 0.2); -} -.note -{ - /* tango:chameleon 0/0.5 */ - background: #d8ffb2; - background: rgba(138, 226, 52, 0.1); - border-color: #abf562; - border-color: rgba(138, 226, 52, 0.2); -} -div.blockquote -{ - border-color: #eeeeec; -} -.note, .warning, div.blockquote -{ - padding: 0.5em; - border-width: 1px; - border-style: solid; - margin: 2em; -} -.note p, .warning p -{ - margin: 0; -} - -div.warning h3.title, -div.note h3.title -{ - display: none; -} - -p + div.section -{ - margin-top: 1em; -} - -div.refnamediv, -div.refsynopsisdiv, -div.refsect1, -div.refsect2, -div.toc, -div.section -{ - margin-bottom: 1em; -} - -/* blob links */ -h2 .extralinks, h3 .extralinks -{ - float: right; - /* tango:aluminium 3 */ - color: #babdb6; - font-size: 80%; - font-weight: normal; -} - -.lineart -{ - color: #d3d7cf; - font-weight: normal; -} - -.annotation -{ - /* tango:aluminium 5 */ - color: #555753; - font-weight: normal; -} - -.structfield -{ - font-style: normal; - font-weight: normal; -} - -acronym,abbr -{ - border-bottom: 1px dotted gray; -} - -/* code listings */ - -.listing_code .programlisting .normal, -.listing_code .programlisting .normal a, -.listing_code .programlisting .number, -.listing_code .programlisting .cbracket, -.listing_code .programlisting .symbol { color: #555753; } -.listing_code .programlisting .comment, -.listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ -.listing_code .programlisting .function, -.listing_code .programlisting .function a, -.listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ -.listing_code .programlisting .string { color: #ad7fa8; } /* tango: plum */ -.listing_code .programlisting .keyword, -.listing_code .programlisting .usertype, -.listing_code .programlisting .type, -.listing_code .programlisting .type a { color: #4e9a06; } /* tango: chameleon 3 */ - -.listing_frame { - /* tango:sky blue 1 */ - border: solid 1px #729fcf; - border: solid 1px rgba(114, 159, 207, 0.2); - padding: 0px; -} - -.listing_lines, .listing_code { - margin-top: 0px; - margin-bottom: 0px; - padding: 0.5em; -} -.listing_lines { - /* tango:sky blue 0.5 */ - background: #a6c5e3; - background: rgba(114, 159, 207, 0.2); - /* tango:aluminium 6 */ - color: #2e3436; -} -.listing_code { - /* tango:sky blue 0 */ - background: #e6f3ff; - background: rgba(114, 159, 207, 0.1); -} -.listing_code .programlisting { - /* override from previous */ - border: none 0px; - padding: 0px; - background: none; -} -.listing_lines pre, .listing_code pre { - margin: 0px; -} - -@media screen { - /* these have a as a first child, but since there are no parent selectors - * we can't use that. */ - a.footnote - { - position: relative; - top: 0em ! important; - } - /* this is needed so that the local anchors are displayed below the naviagtion */ - div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] - { - display: inline-block; - position: relative; - top:-5em; - } - /* this seems to be a bug in the xsl style sheets when generating indexes */ - div.index div.index - { - top: 0em; - } - /* make space for the fixed navigation bar and add space at the bottom so that - * link targets appear somewhat close to top - */ - body - { - padding-top: 2.5em; - padding-bottom: 500px; - max-width: 60em; - } - p - { - max-width: 60em; - } - /* style and size the navigation bar */ - table.navigation#top - { - position: fixed; - background: #e2e2e2; - border-bottom: solid 1px #babdb6; - border-spacing: 5px; - margin-top: 0; - margin-bottom: 0; - top: 0; - left: 0; - z-index: 10; - } - table.navigation#top td - { - padding-left: 6px; - padding-right: 6px; - } - .navigation a, .navigation a:visited - { - /* tango:sky blue 3 */ - color: #204a87; - } - .navigation a:hover - { - /* tango:sky blue 2 */ - color: #3465a4; - } - td.shortcuts - { - /* tango:sky blue 2 */ - color: #3465a4; - font-size: 80%; - white-space: nowrap; - } - td.shortcuts .dim - { - color: #babdb6; - } - .navigation .title - { - font-size: 80%; - max-width: none; - margin: 0px; - font-weight: normal; - } -} -@media screen and (min-width: 60em) { - /* screen larger than 60em */ - body { margin: auto; } -} -@media screen and (max-width: 60em) { - /* screen less than 60em */ - #nav_hierarchy { display: none; } - #nav_interfaces { display: none; } - #nav_prerequisites { display: none; } - #nav_derived_interfaces { display: none; } - #nav_implementations { display: none; } - #nav_child_properties { display: none; } - #nav_style_properties { display: none; } - #nav_index { display: none; } - #nav_glossary { display: none; } - .gallery_image { display: none; } - .property_flags { display: none; } - .signal_flags { display: none; } - .parameter_annotations { display: none; } - .enum_member_annotations { display: none; } - .struct_member_annotations { display: none; } - .union_member_annotations { display: none; } - /* now that a column is hidden, optimize space */ - col.parameters_name { width: auto; } - col.parameters_description { width: auto; } - col.struct_members_name { width: auto; } - col.struct_members_description { width: auto; } - col.enum_members_name { width: auto; } - col.enum_members_description { width: auto; } - col.union_members_name { width: auto; } - col.union_members_description { width: auto; } - .listing_lines { display: none; } -} -@media print { - table.navigation { - visibility: collapse; - display: none; - } - div.titlepage table.navigation { - visibility: visible; - display: table; - background: #e2e2e2; - border: solid 1px #babdb6; - margin-top: 0; - margin-bottom: 0; - top: 0; - left: 0; - height: 3em; - } -} - diff --git a/docs/reference/glib/html/tools.html b/docs/reference/glib/html/tools.html deleted file mode 100644 index 20aa29f38..000000000 --- a/docs/reference/glib/html/tools.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - -GLib Tools: GLib Reference Manual - - - - - - - - - - - - - - - - -
-

-GLib Tools

-
-
-glib-gettextize — gettext internationalization utility -
-
-gtester — test running utility -
-
-gtester-report — test report formatting utility -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/glib/html/up-insensitive.png b/docs/reference/glib/html/up-insensitive.png deleted file mode 100644 index f40498606..000000000 Binary files a/docs/reference/glib/html/up-insensitive.png and /dev/null differ diff --git a/docs/reference/glib/html/up.png b/docs/reference/glib/html/up.png deleted file mode 100644 index 80b4b37e9..000000000 Binary files a/docs/reference/glib/html/up.png and /dev/null differ diff --git a/docs/reference/glib/version.xml b/docs/reference/glib/version.xml deleted file mode 100644 index 908eabe3d..000000000 --- a/docs/reference/glib/version.xml +++ /dev/null @@ -1 +0,0 @@ -2.52.3 diff --git a/docs/reference/gobject/Makefile.in b/docs/reference/gobject/Makefile.in deleted file mode 100644 index b399c224a..000000000 --- a/docs/reference/gobject/Makefile.in +++ /dev/null @@ -1,1030 +0,0 @@ -# Makefile.in generated by automake 1.15 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994-2014 Free Software Foundation, Inc. - -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -*- mode: makefile -*- - -#################################### -# Everything below here is generic # -#################################### -VPATH = @srcdir@ -am__is_gnu_make = { \ - if test -z '$(MAKELEVEL)'; then \ - false; \ - elif test -n '$(MAKE_HOST)'; then \ - true; \ - elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ - true; \ - else \ - false; \ - fi; \ -} -am__make_running_with_option = \ - case $${target_option-} in \ - ?) ;; \ - *) echo "am__make_running_with_option: internal error: invalid" \ - "target option '$${target_option-}' specified" >&2; \ - exit 1;; \ - esac; \ - has_opt=no; \ - sane_makeflags=$$MAKEFLAGS; \ - if $(am__is_gnu_make); then \ - sane_makeflags=$$MFLAGS; \ - else \ - case $$MAKEFLAGS in \ - *\\[\ \ ]*) \ - bs=\\; \ - sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ - | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ - esac; \ - fi; \ - skip_next=no; \ - strip_trailopt () \ - { \ - flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ - }; \ - for flg in $$sane_makeflags; do \ - test $$skip_next = yes && { skip_next=no; continue; }; \ - case $$flg in \ - *=*|--*) continue;; \ - -*I) strip_trailopt 'I'; skip_next=yes;; \ - -*I?*) strip_trailopt 'I';; \ - -*O) strip_trailopt 'O'; skip_next=yes;; \ - -*O?*) strip_trailopt 'O';; \ - -*l) strip_trailopt 'l'; skip_next=yes;; \ - -*l?*) strip_trailopt 'l';; \ - -[dEDm]) skip_next=yes;; \ - -[JT]) skip_next=yes;; \ - esac; \ - case $$flg in \ - *$$target_option*) has_opt=yes; break;; \ - esac; \ - done; \ - test $$has_opt = yes -am__make_dryrun = (target_option=n; $(am__make_running_with_option)) -am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -@ENABLE_MAN_TRUE@am__append_1 = \ -@ENABLE_MAN_TRUE@ glib-mkenums.1 \ -@ENABLE_MAN_TRUE@ glib-genmarshal.1 \ -@ENABLE_MAN_TRUE@ gobject-query.1 - -subdir = docs/reference/gobject -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4macros/attributes.m4 \ - $(top_srcdir)/m4macros/glibtests.m4 \ - $(top_srcdir)/m4macros/gtk-doc.m4 \ - $(top_srcdir)/m4macros/libtool.m4 \ - $(top_srcdir)/m4macros/ltoptions.m4 \ - $(top_srcdir)/m4macros/ltsugar.m4 \ - $(top_srcdir)/m4macros/ltversion.m4 \ - $(top_srcdir)/m4macros/lt~obsolete.m4 \ - $(top_srcdir)/acinclude.m4 $(top_srcdir)/acglib.m4 \ - $(top_srcdir)/glib/libcharset/codeset.m4 \ - $(top_srcdir)/glib/libcharset/glibc21.m4 \ - $(top_srcdir)/m4macros/glib-gettext.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = version.xml -CONFIG_CLEAN_VPATH_FILES = -AM_V_P = $(am__v_P_@AM_V@) -am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) -am__v_P_0 = false -am__v_P_1 = : -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; -am__v_GEN_1 = -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ -am__v_at_1 = -SOURCES = -DIST_SOURCES = -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -man1dir = $(mandir)/man1 -am__installdirs = "$(DESTDIR)$(man1dir)" -NROFF = nroff -MANS = $(man_MANS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/version.xml.in \ - $(top_srcdir)/gtk-doc.make -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ABS_TAPSET_DIR = @ABS_TAPSET_DIR@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMTAR = @AMTAR@ -AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AR = @AR@ -AS = @AS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CARBON_LIBS = @CARBON_LIBS@ -CATALOGS = @CATALOGS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -COCOA_LIBS = @COCOA_LIBS@ -CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ -DBUS1_CFLAGS = @DBUS1_CFLAGS@ -DBUS1_LIBS = @DBUS1_LIBS@ -DBUS_DAEMON = @DBUS_DAEMON@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DTRACE = @DTRACE@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FAM_LIBS = @FAM_LIBS@ -FGREP = @FGREP@ -GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ -GIO = @GIO@ -GIO_MODULE_DIR = @GIO_MODULE_DIR@ -GLIBC21 = @GLIBC21@ -GLIB_BINARY_AGE = @GLIB_BINARY_AGE@ -GLIB_DEBUG_FLAGS = @GLIB_DEBUG_FLAGS@ -GLIB_EXTRA_CFLAGS = @GLIB_EXTRA_CFLAGS@ -GLIB_HIDDEN_VISIBILITY_CFLAGS = @GLIB_HIDDEN_VISIBILITY_CFLAGS@ -GLIB_INTERFACE_AGE = @GLIB_INTERFACE_AGE@ -GLIB_LINK_FLAGS = @GLIB_LINK_FLAGS@ -GLIB_MAJOR_VERSION = @GLIB_MAJOR_VERSION@ -GLIB_MICRO_VERSION = @GLIB_MICRO_VERSION@ -GLIB_MINOR_VERSION = @GLIB_MINOR_VERSION@ -GLIB_RUNTIME_LIBDIR = @GLIB_RUNTIME_LIBDIR@ -GLIB_VERSION = @GLIB_VERSION@ -GLIB_WARN_CFLAGS = @GLIB_WARN_CFLAGS@ -GLIB_WIN32_STATIC_COMPILATION_DEFINE = @GLIB_WIN32_STATIC_COMPILATION_DEFINE@ -GMOFILES = @GMOFILES@ -GMSGFMT = @GMSGFMT@ -GREP = @GREP@ -GSPAWN = @GSPAWN@ -GTHREAD_COMPILE_IMPL_DEFINES = @GTHREAD_COMPILE_IMPL_DEFINES@ -GTKDOC_CHECK = @GTKDOC_CHECK@ -GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ -GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ -GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ -GTKDOC_MKPDF = @GTKDOC_MKPDF@ -GTKDOC_REBASE = @GTKDOC_REBASE@ -G_LIBS_EXTRA = @G_LIBS_EXTRA@ -G_MODULE_BROKEN_RTLD_GLOBAL = @G_MODULE_BROKEN_RTLD_GLOBAL@ -G_MODULE_HAVE_DLERROR = @G_MODULE_HAVE_DLERROR@ -G_MODULE_IMPL = @G_MODULE_IMPL@ -G_MODULE_LDFLAGS = @G_MODULE_LDFLAGS@ -G_MODULE_LIBS = @G_MODULE_LIBS@ -G_MODULE_LIBS_EXTRA = @G_MODULE_LIBS_EXTRA@ -G_MODULE_NEED_USCORE = @G_MODULE_NEED_USCORE@ -G_MODULE_PLUGIN_LIBS = @G_MODULE_PLUGIN_LIBS@ -G_MODULE_SUPPORTED = @G_MODULE_SUPPORTED@ -G_THREAD_CFLAGS = @G_THREAD_CFLAGS@ -G_THREAD_LIBS = @G_THREAD_LIBS@ -G_THREAD_LIBS_EXTRA = @G_THREAD_LIBS_EXTRA@ -G_THREAD_LIBS_FOR_GTHREAD = @G_THREAD_LIBS_FOR_GTHREAD@ -HTML_DIR = @HTML_DIR@ -ICONV_LIBS = @ICONV_LIBS@ -INDENT = @INDENT@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLLIBS = @INTLLIBS@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBELF_CFLAGS = @LIBELF_CFLAGS@ -LIBELF_LIBS = @LIBELF_LIBS@ -LIBFFI_CFLAGS = @LIBFFI_CFLAGS@ -LIBFFI_LIBS = @LIBFFI_LIBS@ -LIBMOUNT_CFLAGS = @LIBMOUNT_CFLAGS@ -LIBMOUNT_LIBS = @LIBMOUNT_LIBS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_EXE_MACHINE_FLAG = @LIB_EXE_MACHINE_FLAG@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -LTP = @LTP@ -LTP_GENHTML = @LTP_GENHTML@ -LT_AGE = @LT_AGE@ -LT_CURRENT = @LT_CURRENT@ -LT_CURRENT_MINUS_AGE = @LT_CURRENT_MINUS_AGE@ -LT_RELEASE = @LT_RELEASE@ -LT_REVISION = @LT_REVISION@ -LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MSGFMT = @MSGFMT@ -MSGFMT_OPTS = @MSGFMT_OPTS@ -NAMESER_COMPAT_INCLUDE = @NAMESER_COMPAT_INCLUDE@ -NETWORK_LIBS = @NETWORK_LIBS@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PCRE_CFLAGS = @PCRE_CFLAGS@ -PCRE_LIBS = @PCRE_LIBS@ -PCRE_REQUIRES = @PCRE_REQUIRES@ -PCRE_WARN_CFLAGS = @PCRE_WARN_CFLAGS@ -PERL = @PERL@ -PERL_PATH = @PERL_PATH@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PLATFORMDEP = @PLATFORMDEP@ -POFILES = @POFILES@ -POSUB = @POSUB@ -PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ -PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ -PYTHON = @PYTHON@ -PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ -PYTHON_PLATFORM = @PYTHON_PLATFORM@ -PYTHON_PREFIX = @PYTHON_PREFIX@ -PYTHON_VERSION = @PYTHON_VERSION@ -RANLIB = @RANLIB@ -REBUILD = @REBUILD@ -SED = @SED@ -SELINUX_LIBS = @SELINUX_LIBS@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SHTOOL = @SHTOOL@ -STRIP = @STRIP@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -WINDRES = @WINDRES@ -WSPIAPI_INCLUDE = @WSPIAPI_INCLUDE@ -XATTR_LIBS = @XATTR_LIBS@ -XGETTEXT = @XGETTEXT@ -XMLCATALOG = @XMLCATALOG@ -XML_CATALOG_FILE = @XML_CATALOG_FILE@ -XSLTPROC = @XSLTPROC@ -ZLIB_CFLAGS = @ZLIB_CFLAGS@ -ZLIB_LIBS = @ZLIB_LIBS@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -config_h_INCLUDES = @config_h_INCLUDES@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gio_INCLUDES = @gio_INCLUDES@ -glib_INCLUDES = @glib_INCLUDES@ -gmodule_INCLUDES = @gmodule_INCLUDES@ -gobject_INCLUDES = @gobject_INCLUDES@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -installed_test_metadir = @installed_test_metadir@ -installed_testdir = @installed_testdir@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -ms_librarian = @ms_librarian@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -pkgpyexecdir = @pkgpyexecdir@ -pkgpythondir = @pkgpythondir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -pyexecdir = @pyexecdir@ -pythondir = @pythondir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = 1.6 - -# The name of the module. -DOC_MODULE = gobject - -# The top-level SGML file. -DOC_MAIN_SGML_FILE = gobject-docs.xml - -# The directory containing the source code. Relative to $(srcdir) -DOC_SOURCE_DIR = $(top_srcdir)/gobject $(top_builddir)/gobject - -# Extra options to supply to gtkdoc-scan -SCAN_OPTIONS = --deprecated-guards="G_DISABLE_DEPRECATED" \ - --ignore-decorators="G_GNUC_INTERNAL|G_GNUC_WARN_UNUSED_RESULT" - - -# Extra options to supply to gtkdoc-mkdb -MKDB_OPTIONS = --output-format=xml --name-space=g - -# Used for dependencies -HFILE_GLOB = $(top_srcdir)/gobject/*.h -CFILE_GLOB = $(top_srcdir)/gobject/*.c - -# Headers to ignore -IGNORE_HFILES = \ - tests \ - gatomicarray.h \ - gobject_trace.h \ - gtype-private.h - - -# CFLAGS and LDFLAGS for compiling scan program. Only needed -# if $(DOC_MODULE).types is non-empty. -AM_CPPFLAGS = \ - -I$(srcdir) \ - $(gobject_INCLUDES) \ - $(GLIB_DEBUG_FLAGS) - -GTKDOC_LIBS = \ - $(top_builddir)/glib/libglib-2.0.la \ - $(top_builddir)/gobject/libgobject-2.0.la - - -# Images to copy into HTML directory -HTML_IMAGES = \ - images/glue.png - - -# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE) -content_files = version.xml \ - glib-mkenums.xml \ - glib-genmarshal.xml \ - gobject-query.xml \ - tut_gobject.xml \ - tut_gsignal.xml \ - tut_gtype.xml \ - tut_howto.xml \ - tut_intro.xml \ - tut_tools.xml - - -# Extra options to supply to gtkdoc-fixref -FIXXREF_OPTIONS = --extra-dir=$(srcdir)/../glib/html -@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -@GTK_DOC_USE_LIBTOOL_FALSE@GTKDOC_RUN = -@GTK_DOC_USE_LIBTOOL_TRUE@GTKDOC_RUN = $(LIBTOOL) --mode=execute - -# We set GPATH here; this gives us semantics for GNU make -# which are more like other make's VPATH, when it comes to -# whether a source that is a target of one rule is then -# searched for in VPATH/GPATH. -# -GPATH = $(srcdir) -TARGET_DIR = $(HTML_DIR)/$(DOC_MODULE) -SETUP_FILES = \ - $(content_files) \ - $(expand_content_files) \ - $(DOC_MAIN_SGML_FILE) \ - $(DOC_MODULE)-sections.txt \ - $(DOC_MODULE)-overrides.txt - - -# Other files to distribute -EXTRA_DIST = $(HTML_IMAGES) $(SETUP_FILES) gobject.cI version.xml.in \ - $(man_MANS) -DOC_STAMPS = setup-build.stamp scan-build.stamp sgml-build.stamp \ - html-build.stamp pdf-build.stamp \ - sgml.stamp html.stamp pdf.stamp - -SCANOBJ_FILES = \ - $(DOC_MODULE).args \ - $(DOC_MODULE).hierarchy \ - $(DOC_MODULE).interfaces \ - $(DOC_MODULE).prerequisites \ - $(DOC_MODULE).signals - -REPORT_FILES = \ - $(DOC_MODULE)-undocumented.txt \ - $(DOC_MODULE)-undeclared.txt \ - $(DOC_MODULE)-unused.txt - -CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) \ - gtkdoc-check.test $(man_MANS) -@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = -@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp -@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = -@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp - -#### setup #### -GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_$(V)) -GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_SETUP_0 = @echo " DOC Preparing build"; - -#### scan #### -GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_$(V)) -GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_SCAN_0 = @echo " DOC Scanning header files"; -GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_$(V)) -GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_INTROSPECT_0 = @echo " DOC Introspecting gobjects"; - -#### xml #### -GTK_DOC_V_XML = $(GTK_DOC_V_XML_$(V)) -GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_XML_0 = @echo " DOC Building XML"; - -#### html #### -GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_$(V)) -GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_HTML_0 = @echo " DOC Building HTML"; -GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_$(V)) -GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_XREF_0 = @echo " DOC Fixing cross-references"; - -#### pdf #### -GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_$(V)) -GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) -GTK_DOC_V_PDF_0 = @echo " DOC Building PDF"; - -######################################################################## -man_MANS = $(am__append_1) -@ENABLE_MAN_TRUE@XSLTPROC_FLAGS = \ -@ENABLE_MAN_TRUE@ --nonet \ -@ENABLE_MAN_TRUE@ --stringparam man.output.quietly 1 \ -@ENABLE_MAN_TRUE@ --stringparam funcsynopsis.style ansi \ -@ENABLE_MAN_TRUE@ --stringparam man.th.extra1.suppress 1 \ -@ENABLE_MAN_TRUE@ --stringparam man.authors.section.enabled 0 \ -@ENABLE_MAN_TRUE@ --stringparam man.copyright.section.enabled 0 - -all: all-am - -.SUFFIXES: -.SUFFIXES: .1 .xml -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtk-doc.make $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/reference/gobject/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/reference/gobject/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; -$(top_srcdir)/gtk-doc.make $(am__empty): - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -version.xml: $(top_builddir)/config.status $(srcdir)/version.xml.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man_MANS) - @$(NORMAL_INSTALL) - @list1=''; \ - list2='$(man_MANS)'; \ - test -n "$(man1dir)" \ - && test -n "`echo $$list1$$list2`" \ - || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ - { for i in $$list1; do echo "$$i"; done; \ - if test -n "$$list2"; then \ - for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.1[a-z]*$$/p'; \ - fi; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list=''; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ - dist-hook -check-am: all-am -check: check-am -@ENABLE_GTK_DOC_FALSE@all-local: -all-am: Makefile $(MANS) all-local -installdirs: - for dir in "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-local mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-local - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-data-local install-man - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic \ - maintainer-clean-local - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-local uninstall-man - -uninstall-man: uninstall-man1 - -.MAKE: install-am install-strip - -.PHONY: all all-am all-local check check-am clean clean-generic \ - clean-libtool clean-local cscopelist-am ctags-am dist-hook \ - distclean distclean-generic distclean-libtool distclean-local \ - distdir dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-data-local \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-man1 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - maintainer-clean-local mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ - uninstall-am uninstall-local uninstall-man uninstall-man1 - -.PRECIOUS: Makefile - - -gtkdoc-check.test: Makefile - $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ - echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ - chmod +x $@ - -all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) -.PHONY: all-gtk-doc - -@ENABLE_GTK_DOC_TRUE@all-local: all-gtk-doc - -docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) - -$(REPORT_FILES): sgml-build.stamp - -setup-build.stamp: - -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ - if test "x$$files" != "x" ; then \ - for file in $$files ; do \ - destdir=`dirname $(abs_builddir)/$$file`; \ - test -d "$$destdir" || mkdir -p "$$destdir"; \ - test -f $(abs_srcdir)/$$file && \ - cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ - done; \ - fi; \ - fi - $(AM_V_at)touch setup-build.stamp - -scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) - $(GTK_DOC_V_SCAN)_source_dir='' ; \ - for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) - $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ - scanobj_options=""; \ - gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$$?" = "0"; then \ - if test "x$(V)" = "x1"; then \ - scanobj_options="--verbose"; \ - fi; \ - fi; \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ - gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ - else \ - for i in $(SCANOBJ_FILES) ; do \ - test -f $$i || touch $$i ; \ - done \ - fi - $(AM_V_at)touch scan-build.stamp - -$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp - @true - -sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent - $(GTK_DOC_V_XML)_source_dir='' ; \ - for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ - done ; \ - gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) - $(AM_V_at)touch sgml-build.stamp - -sgml.stamp: sgml-build.stamp - @true - -xml/gtkdocentities.ent: Makefile - $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ - echo ""; \ - echo ""; \ - echo ""; \ - echo ""; \ - echo ""; \ - echo ""; \ - echo ""; \ - ) > $@ - -html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) - $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ - mkhtml_options=""; \ - gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$$?" = "0"; then \ - if test "x$(V)" = "x1"; then \ - mkhtml_options="$$mkhtml_options --verbose"; \ - fi; \ - fi; \ - gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \ - if test "$$?" = "0"; then \ - mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \ - fi; \ - cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) - -@test "x$(HTML_IMAGES)" = "x" || \ - for file in $(HTML_IMAGES) ; do \ - test -f $(abs_srcdir)/$$file && cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ - test -f $(abs_builddir)/$$file && cp $(abs_builddir)/$$file $(abs_builddir)/html; \ - done; - $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) - $(AM_V_at)touch html-build.stamp - -pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) - $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ - mkpdf_options=""; \ - gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$$?" = "0"; then \ - if test "x$(V)" = "x1"; then \ - mkpdf_options="$$mkpdf_options --verbose"; \ - fi; \ - fi; \ - if test "x$(HTML_IMAGES)" != "x"; then \ - for img in $(HTML_IMAGES); do \ - part=`dirname $$img`; \ - echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \ - if test $$? != 0; then \ - mkpdf_options="$$mkpdf_options --imgdir=$$part"; \ - fi; \ - done; \ - fi; \ - gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) - $(AM_V_at)touch pdf-build.stamp - -############## - -clean-local: - @rm -f *~ *.bak - @rm -rf .libs - @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ - rm -f $(DOC_MODULE).types; \ - fi - @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \ - rm -f $(DOC_MODULE)-sections.txt; \ - fi - -distclean-local: - @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ - $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt - @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - rm -f $(SETUP_FILES) $(DOC_MODULE).types; \ - fi - -maintainer-clean-local: - @rm -rf xml html - -install-data-local: - @installfiles=`echo $(builddir)/html/*`; \ - if test "$$installfiles" = '$(builddir)/html/*'; \ - then echo 1>&2 'Nothing to install' ; \ - else \ - if test -n "$(DOC_MODULE_VERSION)"; then \ - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ - else \ - installdir="$(DESTDIR)$(TARGET_DIR)"; \ - fi; \ - $(mkinstalldirs) $${installdir} ; \ - for i in $$installfiles; do \ - echo ' $(INSTALL_DATA) '$$i ; \ - $(INSTALL_DATA) $$i $${installdir}; \ - done; \ - if test -n "$(DOC_MODULE_VERSION)"; then \ - mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ - $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ - fi; \ - $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ - fi - -uninstall-local: - @if test -n "$(DOC_MODULE_VERSION)"; then \ - installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \ - else \ - installdir="$(DESTDIR)$(TARGET_DIR)"; \ - fi; \ - rm -rf $${installdir} - -# -# Require gtk-doc when making dist -# -@HAVE_GTK_DOC_TRUE@dist-check-gtkdoc: docs -@HAVE_GTK_DOC_FALSE@dist-check-gtkdoc: -@HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc is needed to run 'make dist'. ***" -@HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc was not found when 'configure' ran. ***" -@HAVE_GTK_DOC_FALSE@ @echo "*** please install gtk-doc and rerun 'configure'. ***" -@HAVE_GTK_DOC_FALSE@ @false - -dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local - @mkdir $(distdir)/html - @cp ./html/* $(distdir)/html - @-cp ./$(DOC_MODULE).pdf $(distdir)/ - @-cp ./$(DOC_MODULE).types $(distdir)/ - @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/ - @cd $(distdir) && rm -f $(DISTCLEANFILES) - @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html - -.PHONY : dist-hook-local docs - -@ENABLE_MAN_TRUE@.xml.1: -@ENABLE_MAN_TRUE@ $(AM_V_GEN) $(XSLTPROC) $(XSLTPROC_FLAGS) http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $< - -CLEANFILES ?= - -dist-hook-local: all-local - -gobject-docs-clean: clean - cd $(srcdir) && rm -rf xml html - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/docs/reference/gobject/glib-genmarshal.1 b/docs/reference/gobject/glib-genmarshal.1 deleted file mode 100644 index 10da70659..000000000 --- a/docs/reference/gobject/glib-genmarshal.1 +++ /dev/null @@ -1,340 +0,0 @@ -'\" t -.\" Title: glib-genmarshal -.\" Author: Tim Janik -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 06/22/2017 -.\" Manual: User Commands -.\" Source: GObject -.\" Language: English -.\" -.TH "GLIB\-GENMARSHAL" "1" "" "GObject" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -glib-genmarshal \- C code marshaller generation utility for GLib closures -.SH "SYNOPSIS" -.HP \w'\fBglib\-genmarshal\fR\ 'u -\fBglib\-genmarshal\fR [OPTION...] [FILE...] -.SH "DESCRIPTION" -.PP -\fBglib\-genmarshal\fR -is a small utility that generates C code marshallers for callback functions of the GClosure mechanism in the GObject sublibrary of GLib\&. The marshaller functions have a standard signature, they get passed in the invoking closure, an array of value structures holding the callback function parameters and a value structure for the return value of the callback\&. The marshaller is then responsible to call the respective C code function of the closure with all the parameters on the stack and to collect its return value\&. -.PP -\fBglib\-genmarshal\fR -takes a list of marshallers to generate as input\&. The marshaller list is either read from standard input or from files passed as additional arguments on the command line\&. -.SS "Marshaller list format" -.PP -The marshaller lists are processed line by line, a line can contain a comment in the form of -.sp .if n \{\ .RS 4 .\} .nf # this is a comment .fi .if n \{\ .RE .\} -or a marshaller specification of the form -.sp -.if n \{\ -.RS 4 -.\} -.nf -\fIRTYPE\fR:\fIPTYPE\fR -\fIRTYPE\fR:\fIPTYPE\fR,\fIPTYPE\fR -\fIRTYPE\fR:\fIPTYPE\fR,\fIPTYPE\fR,\fIPTYPE\fR -.fi -.if n \{\ -.RE -.\} -.sp -(up to 16 -\fIPTYPE\fRs may be present)\&. -.PP -The -\fIRTYPE\fR -part specifies the callback\*(Aqs return type and the -\fIPTYPE\fRs right to the colon specify the callback\*(Aqs parameter list, except for the first and the last arguments which are always pointers\&. -.SS "Parameter types" -.PP -Currently, the following types are supported: -.PP -\fIVOID\fR -.RS 4 -indicates no return type, or no extra parameters\&. If -\fIVOID\fR -is used as the parameter list, no additional parameters may be present\&. -.RE -.PP -\fIBOOLEAN\fR -.RS 4 -for boolean types (gboolean) -.RE -.PP -\fICHAR\fR -.RS 4 -for signed char types (gchar) -.RE -.PP -\fIUCHAR\fR -.RS 4 -for unsigned char types (guchar) -.RE -.PP -\fIINT\fR -.RS 4 -for signed integer types (gint) -.RE -.PP -\fIUINT\fR -.RS 4 -for unsigned integer types (guint) -.RE -.PP -\fILONG\fR -.RS 4 -for signed long integer types (glong) -.RE -.PP -\fIULONG\fR -.RS 4 -for unsigned long integer types (gulong) -.RE -.PP -\fIINT64\fR -.RS 4 -for signed 64bit integer types (gint64) -.RE -.PP -\fIUINT64\fR -.RS 4 -for unsigned 64bit integer types (guint64) -.RE -.PP -\fIENUM\fR -.RS 4 -for enumeration types (gint) -.RE -.PP -\fIFLAGS\fR -.RS 4 -for flag enumeration types (guint) -.RE -.PP -\fIFLOAT\fR -.RS 4 -for single\-precision float types (gfloat) -.RE -.PP -\fIDOUBLE\fR -.RS 4 -for double\-precision float types (gdouble) -.RE -.PP -\fISTRING\fR -.RS 4 -for string types (gchar*) -.RE -.PP -\fIBOXED\fR -.RS 4 -for boxed (anonymous but reference counted) types (GBoxed*) -.RE -.PP -\fIPARAM\fR -.RS 4 -for GParamSpec or derived types (GParamSpec*) -.RE -.PP -\fIPOINTER\fR -.RS 4 -for anonymous pointer types (gpointer) -.RE -.PP -\fIOBJECT\fR -.RS 4 -for GObject or derived types (GObject*) -.RE -.PP -\fIVARIANT\fR -.RS 4 -for GVariant types (GVariant*) -.RE -.PP -\fINONE\fR -.RS 4 -deprecated alias for -\fIVOID\fR -.RE -.PP -\fIBOOL\fR -.RS 4 -deprecated alias for -\fIBOOLEAN\fR -.RE -.SH "OPTIONS" -.PP -\fB\-\-header\fR -.RS 4 -Generate header file contents of the marshallers\&. -.RE -.PP -\fB\-\-body\fR -.RS 4 -Generate C code file contents of the marshallers\&. -.RE -.PP -\fB\-\-prefix=\fR\fB\fIPREFIX\fR\fR -.RS 4 -Specify marshaller prefix\&. The default prefix is -`g_cclosure_marshal\*(Aq\&. -.RE -.PP -\fB\-\-skip\-source\fR -.RS 4 -Skip source location remarks in generated comments\&. -.RE -.PP -\fB\-\-stdinc\fR -.RS 4 -Use the standard marshallers of the GObject library, and include -gmarshal\&.h -in generated header files\&. -.RE -.PP -\fB\-\-nostdinc\fR -.RS 4 -Do not use the standard marshallers of the GObject library, and skip -gmarshal\&.h -include directive in generated header files\&. -.RE -.PP -\fB\-\-internal\fR -.RS 4 -Mark generated functions as internal, using G_GNUC_INTERNAL\&. -.RE -.PP -\fB\-\-valist\-marshallers\fR -.RS 4 -Generate valist marshallers, for use with g_signal_set_va_marshaller()\&. -.RE -.PP -\fB\-v\fR, \fB\-\-version\fR -.RS 4 -Print version information\&. -.RE -.PP -\fB\-\-g\-fatal\-warnings\fR -.RS 4 -Make warnings fatal, that is, exit immediately once a warning occurs\&. -.RE -.PP -\fB\-h\fR, \fB\-\-help\fR -.RS 4 -Print brief help and exit\&. -.RE -.PP -\fB\-v\fR, \fB\-\-version\fR -.RS 4 -Print version and exit\&. -.RE -.PP -\fB\-\-output=FILE\fR -.RS 4 -Write output to FILE instead of stdout\&. -.RE -.SH "EXAMPLE" -.PP -To generate marshallers for the following callback functions: -.sp -.if n \{\ -.RS 4 -.\} -.nf -void foo (gpointer data1, - gpointer data2); -void bar (gpointer data1, - gint param1, - gpointer data2); -gfloat baz (gpointer data1, - gboolean param1, - guchar param2, - gpointer data2); -.fi -.if n \{\ -.RE -.\} -.PP -The -marshaller\&.list -file has to look like this: -.sp -.if n \{\ -.RS 4 -.\} -.nf -VOID:VOID -VOID:INT -FLOAT:BOOLEAN,UCHAR -.fi -.if n \{\ -.RE -.\} -.PP -and you call glib\-genmarshal like this: -.sp -.if n \{\ -.RS 4 -.\} -.nf -glib\-genmarshal \-\-header marshaller\&.list > marshaller\&.h -glib\-genmarshal \-\-body marshaller\&.list > marshaller\&.c -.fi -.if n \{\ -.RE -.\} -.PP -The generated marshallers have the arguments encoded in their function name\&. For this particular list, they are -.sp -.if n \{\ -.RS 4 -.\} -.nf -g_cclosure_user_marshal_VOID__VOID(), -g_cclosure_user_marshal_VOID__INT(), -g_cclosure_user_marshal_FLOAT__BOOLEAN_UCHAR()\&. -.fi -.if n \{\ -.RE -.\} -.PP -They can be used directly for GClosures or be passed in as the GSignalCMarshaller c_marshaller; argument upon creation of signals: -.sp -.if n \{\ -.RS 4 -.\} -.nf -GClosure *cc_foo, *cc_bar, *cc_baz; - -cc_foo = g_cclosure_new (NULL, foo, NULL); -g_closure_set_marshal (cc_foo, g_cclosure_user_marshal_VOID__VOID); -cc_bar = g_cclosure_new (NULL, bar, NULL); -g_closure_set_marshal (cc_bar, g_cclosure_user_marshal_VOID__INT); -cc_baz = g_cclosure_new (NULL, baz, NULL); -g_closure_set_marshal (cc_baz, g_cclosure_user_marshal_FLOAT__BOOLEAN_UCHAR); -.fi -.if n \{\ -.RE -.\} -.SH "SEE ALSO" -.PP -\fBglib-mkenums\fR(1) diff --git a/docs/reference/gobject/glib-mkenums.1 b/docs/reference/gobject/glib-mkenums.1 deleted file mode 100644 index 2dfb20994..000000000 --- a/docs/reference/gobject/glib-mkenums.1 +++ /dev/null @@ -1,229 +0,0 @@ -'\" t -.\" Title: glib-mkenums -.\" Author: Owen Taylor -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 06/22/2017 -.\" Manual: User Commands -.\" Source: GObject -.\" Language: English -.\" -.TH "GLIB\-MKENUMS" "1" "" "GObject" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -glib-mkenums \- C language enum description generation utility -.SH "SYNOPSIS" -.HP \w'\fBglib\-mkenums\fR\ 'u -\fBglib\-mkenums\fR [OPTION...] [FILE...] -.SH "DESCRIPTION" -.PP -\fBglib\-mkenums\fR -is a small perl\-script utility that parses C code to extract enum definitions and produces enum descriptions based on text templates specified by the user\&. Most frequently this script is used to produce C code that contains enum values as strings so programs can provide value name strings for introspection\&. -.PP -\fBglib\-mkenums\fR -takes a list of valid C code files as input\&. The options specified control the text that is output, certain substitutions are performed on the text templates for keywords enclosed in @ characters\&. -.SS "Production text substitutions" -.PP -Certain keywords enclosed in @ characters will be substituted in the emitted text\&. For the substitution examples of the keywords below, the following example enum definition is assumed: -.sp .if n \{\ .RS 4 .\} .nf typedef enum { PREFIX_THE_XVALUE = 1 << 3, PREFIX_ANOTHER_VALUE = 1 << 4 } PrefixTheXEnum; .fi .if n \{\ .RE .\} -.PP -@EnumName@ -.RS 4 -The name of the enum currently being processed, enum names are assumed to be properly namespaced and to use mixed capitalization to separate words (e\&.g\&. PrefixTheXEnum)\&. -.RE -.PP -@enum_name@ -.RS 4 -The enum name with words lowercase and word\-separated by underscores (e\&.g\&. prefix_the_xenum)\&. -.RE -.PP -@ENUMNAME@ -.RS 4 -The enum name with words uppercase and word\-separated by underscores (e\&.g\&. PREFIX_THE_XENUM)\&. -.RE -.PP -@ENUMSHORT@ -.RS 4 -The enum name with words uppercase and word\-separated by underscores, prefix stripped (e\&.g\&. THE_XENUM)\&. -.RE -.PP -@ENUMPREFIX@ -.RS 4 -The prefix of the enum name (e\&.g\&. PREFIX)\&. -.RE -.PP -@VALUENAME@ -.RS 4 -The enum value name currently being processed with words uppercase and word\-separated by underscores, this is the assumed literal notation of enum values in the C sources (e\&.g\&. PREFIX_THE_XVALUE)\&. -.RE -.PP -@valuenick@ -.RS 4 -A nick name for the enum value currently being processed, this is usually generated by stripping common prefix words of all the enum values of the current enum, the words are lowercase and underscores are substituted by a minus (e\&.g\&. the\-xvalue)\&. -.RE -.PP -@valuenum@ -.RS 4 -The integer value for the enum value currently being processed\&. This is calculated by using -\fBperl\fR -to attempt to evaluate the expression as it appears in the C source code\&. If evaluation fails then -\fBglib\-mkenums\fR -will exit with an error status, but this only happens if -@valuenum@ -appears in your value production template\&. (Since: 2\&.26) -.RE -.PP -@type@ -.RS 4 -This is substituted either by "enum" or "flags", depending on whether the enum value definitions contained bit\-shift operators or not (e\&.g\&. flags)\&. -.RE -.PP -@Type@ -.RS 4 -The same as -@type@ -with the first letter capitalized (e\&.g\&. Flags)\&. -.RE -.PP -@TYPE@ -.RS 4 -The same as -@type@ -with all letters uppercased (e\&.g\&. FLAGS)\&. -.RE -.PP -@filename@ -.RS 4 -The name of the input file currently being processed (e\&.g\&. foo\&.h)\&. -.RE -.PP -@basename@ -.RS 4 -The base name of the input file currently being processed (e\&.g\&. foo\&.h)\&. (Since: 2\&.22) -.RE -.SS "Trigraph extensions" -.PP -Some C comments are treated specially in the parsed enum definitions, such comments start out with the trigraph sequence -/*< -and end with the trigraph sequence ->*/\&. Per enum definition, the options "skip" and "flags" can be specified, to indicate this enum definition to be skipped, or for it to be treated as a flags definition, or to specify the common prefix to be stripped from all values to generate value nicknames, respectively\&. The "underscore_name" option can be used to specify the word separation used in the *_get_type() function\&. For instance, /*< underscore_name=gnome_vfs_uri_hide_options >*/\&. -.PP -Per value definition, the options "skip" and "nick" are supported\&. The former causes the value to be skipped, and the latter can be used to specify the otherwise auto\-generated nickname\&. Examples: -.sp .if n \{\ .RS 4 .\} .nf typedef enum /*< skip >*/ { PREFIX_FOO } PrefixThisEnumWillBeSkipped; typedef enum /*< flags,prefix=PREFIX >*/ { PREFIX_THE_ZEROTH_VALUE, /*< skip >*/ PREFIX_THE_FIRST_VALUE, PREFIX_THE_SECOND_VALUE, PREFIX_THE_THIRD_VALUE, /*< nick=the\-last\-value >*/ } PrefixTheFlagsEnum; .fi .if n \{\ .RE .\} -.SH "OPTIONS" -.PP -\fB\-\-fhead\fR \fITEXT\fR -.RS 4 -Put out -\fITEXT\fR -prior to processing input files\&. -.RE -.PP -\fB\-\-fprod\fR \fITEXT\fR -.RS 4 -Put out -\fITEXT\fR -everytime a new input file is being processed\&. -.RE -.PP -\fB\-\-ftail\fR \fITEXT\fR -.RS 4 -Put out -\fITEXT\fR -after all input files have been processed\&. -.RE -.PP -\fB\-\-eprod\fR \fITEXT\fR -.RS 4 -Put out -\fITEXT\fR -everytime an enum is encountered in the input files\&. -.RE -.PP -\fB\-\-vhead\fR \fITEXT\fR -.RS 4 -Put out -\fITEXT\fR -before iterating over the set of values of an enum\&. -.RE -.PP -\fB\-\-vprod\fR \fITEXT\fR -.RS 4 -Put out -\fITEXT\fR -for every value of an enum\&. -.RE -.PP -\fB\-\-vtail\fR \fITEXT\fR -.RS 4 -Put out -\fITEXT\fR -after iterating over all values of an enum\&. -.RE -.PP -\fB\-\-comments\fR \fITEXT\fR -.RS 4 -Template for auto\-generated comments, the default (for C code generations) is -"/* @comment@ */"\&. -.RE -.PP -\fB\-\-template\fR \fIFILE\fR -.RS 4 -Read templates from the given file\&. The templates are enclosed in specially\-formatted C comments -.sp .if n \{\ .RS 4 .\} .nf /*** BEGIN section ***/ /*** END section ***/ .fi .if n \{\ .RE .\} -where section may be -file\-header, -file\-production, -file\-tail, -enumeration\-production, -value\-header, -value\-production, -value\-tail -or -comment\&. -.RE -.PP -\fB\-\-identifier\-prefix\fR \fIPREFIX\fR -.RS 4 -Indicates what portion of the enum name should be intepreted as the prefix (eg, the "Gtk" in "GtkDirectionType")\&. Normally this will be figured out automatically, but you may need to override the default if your namespace is capitalized oddly\&. -.RE -.PP -\fB\-\-symbol\-prefix\fR \fIPREFIX\fR -.RS 4 -Indicates what prefix should be used to correspond to the identifier prefix in related C function names (eg, the "gtk" in "gtk_direction_type_get_type"\&. Equivalently, this is the lowercase version of the prefix component of the enum value names (eg, the "GTK" in "GTK_DIR_UP"\&. The default value is the identifier prefix, converted to lowercase\&. -.RE -.PP -\fB\-\-help\fR -.RS 4 -Print brief help and exit\&. -.RE -.PP -\fB\-\-version\fR -.RS 4 -Print version and exit\&. -.RE -.PP -\fB\-\-output=FILE\fR -.RS 4 -Write output to FILE instead of stdout\&. -.RE -.SH "SEE ALSO" -.PP -\fBglib-genmarshal\fR(1) diff --git a/docs/reference/gobject/gobject-query.1 b/docs/reference/gobject/gobject-query.1 deleted file mode 100644 index 7b00f9e2e..000000000 --- a/docs/reference/gobject/gobject-query.1 +++ /dev/null @@ -1,90 +0,0 @@ -'\" t -.\" Title: gobject-query -.\" Author: Tim Janik -.\" Generator: DocBook XSL Stylesheets vsnapshot -.\" Date: 06/22/2017 -.\" Manual: User Commands -.\" Source: GObject -.\" Language: English -.\" -.TH "GOBJECT\-QUERY" "1" "" "GObject" "User Commands" -.\" ----------------------------------------------------------------- -.\" * Define some portability stuff -.\" ----------------------------------------------------------------- -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.\" http://bugs.debian.org/507673 -.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" ----------------------------------------------------------------- -.\" * set default formatting -.\" ----------------------------------------------------------------- -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.\" ----------------------------------------------------------------- -.\" * MAIN CONTENT STARTS HERE * -.\" ----------------------------------------------------------------- -.SH "NAME" -gobject-query \- display a tree of types -.SH "SYNOPSIS" -.HP \w'\fBgobject\-query\fR\ 'u -\fBgobject\-query\fR froots [OPTION...] -.HP \w'\fBgobject\-query\fR\ 'u -\fBgobject\-query\fR tree [OPTION...] -.SH "DESCRIPTION" -.PP -\fBgobject\-query\fR -is a small utility that draws a tree of types\&. -.PP -\fBgobject\-query\fR -takes a mandatory argument that specifies whether it should iterate over the fundamental types or print a type tree\&. -.SH "COMMANDS" -.PP -\fBfroots\fR -.RS 4 -iterate over fundamental roots -.RE -.PP -\fBtree\fR -.RS 4 -print type tree -.RE -.SH "OPTIONS" -.PP -\fB\-r\fR \fITYPE\fR -.RS 4 -specify the root type -.RE -.PP -\fB\-n\fR -.RS 4 -don\*(Aqt descend type tree -.RE -.PP -\fB\-b\fR \fISTRING\fR -.RS 4 -specify indent string -.RE -.PP -\fB\-i\fR \fISTRING\fR -.RS 4 -specify incremental indent string -.RE -.PP -\fB\-s\fR \fINUMBER\fR -.RS 4 -specify line spacing -.RE -.PP -\fB\-h\fR, \fB\-\-help\fR -.RS 4 -Print brief help and exit\&. -.RE -.PP -\fB\-v\fR, \fB\-\-version\fR -.RS 4 -Print version and exit\&. -.RE diff --git a/docs/reference/gobject/gobject-sections.txt b/docs/reference/gobject/gobject-sections.txt index 0f14f93fe..2f4b30079 100644 --- a/docs/reference/gobject/gobject-sections.txt +++ b/docs/reference/gobject/gobject-sections.txt @@ -261,6 +261,7 @@ g_object_interface_install_property g_object_interface_find_property g_object_interface_list_properties g_object_new +g_object_new_with_properties g_object_newv GParameter g_object_ref @@ -284,7 +285,9 @@ g_object_remove_toggle_ref g_object_connect g_object_disconnect g_object_set +g_object_setv g_object_get +g_object_getv g_object_notify g_object_notify_by_pspec g_object_freeze_notify @@ -351,9 +354,11 @@ GFlagsValue g_enum_get_value g_enum_get_value_by_name g_enum_get_value_by_nick +g_enum_to_string g_flags_get_first_value g_flags_get_value_by_name g_flags_get_value_by_nick +g_flags_to_string g_enum_register_static g_flags_register_static g_enum_complete_type_info diff --git a/docs/reference/gobject/html/GBinding.html b/docs/reference/gobject/html/GBinding.html deleted file mode 100644 index f56f17a83..000000000 --- a/docs/reference/gobject/html/GBinding.html +++ /dev/null @@ -1,976 +0,0 @@ - - - - -GBinding: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GBinding

-

GBinding — Bind two object properties

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GObject * - -g_binding_get_source () -
const gchar * - -g_binding_get_source_property () -
-GObject * - -g_binding_get_target () -
const gchar * - -g_binding_get_target_property () -
-GBindingFlags - -g_binding_get_flags () -
-void - -g_binding_unbind () -
-GBinding * - -g_object_bind_property () -
-gboolean - -(*GBindingTransformFunc) () -
-GBinding * - -g_object_bind_property_full () -
-GBinding * - -g_object_bind_property_with_closures () -
-
-
-

Properties

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
GBindingFlagsflagsRead / Write / Construct Only
-GObject *sourceRead / Write / Construct Only
-gchar *source-propertyRead / Write / Construct Only
-GObject *targetRead / Write / Construct Only
-gchar *target-propertyRead / Write / Construct Only
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GBinding
enumGBindingFlags
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GBinding
-
-
-
-

Includes

-
#include <glib-object.h>
-
-
-
-

Description

-

GBinding is the representation of a binding between a property on a -GObject instance (or source) and another property on another GObject -instance (or target). Whenever the source property changes, the same -value is applied to the target property; for instance, the following -binding:

-
- - - - - - - -
1
-2
-3
g_object_bind_property (object1, "property-a",
-                        object2, "property-b",
-                        G_BINDING_DEFAULT);
-
- -

-

will cause the property named "property-b" of object2 - to be updated -every time g_object_set() or the specific accessor changes the value of -the property "property-a" of object1 -.

-

It is possible to create a bidirectional binding between two properties -of two GObject instances, so that if either property changes, the -other is updated as well, for instance:

-
- - - - - - - -
1
-2
-3
g_object_bind_property (object1, "property-a",
-                        object2, "property-b",
-                        G_BINDING_BIDIRECTIONAL);
-
- -

-

will keep the two properties in sync.

-

It is also possible to set a custom transformation function (in both -directions, in case of a bidirectional binding) to apply a custom -transformation from the source value to the target value before -applying it; for instance, the following binding:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
g_object_bind_property_full (adjustment1, "value",
-                             adjustment2, "value",
-                             G_BINDING_BIDIRECTIONAL,
-                             celsius_to_fahrenheit,
-                             fahrenheit_to_celsius,
-                             NULL, NULL);
-
- -

-

will keep the "value" property of the two adjustments in sync; the -celsius_to_fahrenheit - function will be called whenever the "value" -property of adjustment1 - changes and will transform the current value -of the property before applying it to the "value" property of adjustment2 -.

-

Vice versa, the fahrenheit_to_celsius - function will be called whenever -the "value" property of adjustment2 - changes, and will transform the -current value of the property before applying it to the "value" property -of adjustment1 -.

-

Note that GBinding does not resolve cycles by itself; a cycle like

-
- - - - - - - -
1
-2
-3
object1:propertyA -> object2:propertyB
-object2:propertyB -> object3:propertyC
-object3:propertyC -> object1:propertyA
-
- -

-

might lead to an infinite loop. The loop, in this particular case, -can be avoided if the objects emit the “notify” signal only -if the value has effectively been changed. A binding is implemented -using the “notify” signal, so it is susceptible to all the -various ways of blocking a signal emission, like g_signal_stop_emission() -or g_signal_handler_block().

-

A binding will be severed, and the resources it allocates freed, whenever -either one of the GObject instances it refers to are finalized, or when -the GBinding instance loses its last reference.

-

Bindings for languages with garbage collection can use -g_binding_unbind() to explicitly release a binding between the source -and target properties, instead of relying on the last reference on the -binding, source, and target instances to drop.

-

GBinding is available since GObject 2.26

-
-
-

Functions

-
-

g_binding_get_source ()

-
GObject *
-g_binding_get_source (GBinding *binding);
-

Retrieves the GObject instance used as the source of the binding.

-
-

Parameters

-
----- - - - - - -

binding

a GBinding

 
-
-
-

Returns

-

the source GObject.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_binding_get_source_property ()

-
const gchar *
-g_binding_get_source_property (GBinding *binding);
-

Retrieves the name of the property of “source” used as the source -of the binding.

-
-

Parameters

-
----- - - - - - -

binding

a GBinding

 
-
-
-

Returns

-

the name of the source property

-
-

Since: 2.26

-
-
-
-

g_binding_get_target ()

-
GObject *
-g_binding_get_target (GBinding *binding);
-

Retrieves the GObject instance used as the target of the binding.

-
-

Parameters

-
----- - - - - - -

binding

a GBinding

 
-
-
-

Returns

-

the target GObject.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_binding_get_target_property ()

-
const gchar *
-g_binding_get_target_property (GBinding *binding);
-

Retrieves the name of the property of “target” used as the target -of the binding.

-
-

Parameters

-
----- - - - - - -

binding

a GBinding

 
-
-
-

Returns

-

the name of the target property

-
-

Since: 2.26

-
-
-
-

g_binding_get_flags ()

-
GBindingFlags
-g_binding_get_flags (GBinding *binding);
-

Retrieves the flags passed when constructing the GBinding.

-
-

Parameters

-
----- - - - - - -

binding

a GBinding

 
-
-
-

Returns

-

the GBindingFlags used by the GBinding

-
-

Since: 2.26

-
-
-
-

g_binding_unbind ()

-
void
-g_binding_unbind (GBinding *binding);
-

Explicitly releases the binding between the source and the target -property expressed by binding -.

-

This function will release the reference that is being held on -the binding - instance; if you want to hold on to the GBinding instance -after calling g_binding_unbind(), you will need to hold a reference -to it.

-
-

Parameters

-
----- - - - - - -

binding

a GBinding

 
-
-

Since: 2.38

-
-
-
-

g_object_bind_property ()

-
GBinding *
-g_object_bind_property (gpointer source,
-                        const gchar *source_property,
-                        gpointer target,
-                        const gchar *target_property,
-                        GBindingFlags flags);
-

Creates a binding between source_property - on source - and target_property - -on target -. Whenever the source_property - is changed the target_property - is -updated using the same value. For instance:

-
- - - - - - - -
1
g_object_bind_property (action, "active", widget, "sensitive", 0);
-
- -

-

Will result in the "sensitive" property of the widget GObject instance to be -updated with the same value of the "active" property of the action GObject -instance.

-

If flags - contains G_BINDING_BIDIRECTIONAL then the binding will be mutual: -if target_property - on target - changes then the source_property - on source - -will be updated as well.

-

The binding will automatically be removed when either the source - or the -target - instances are finalized. To remove the binding without affecting the -source - and the target - you can just call g_object_unref() on the returned -GBinding instance.

-

A GObject can have multiple bindings.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

source

the source GObject.

[type GObject.Object]

source_property

the property on source -to bind

 

target

the target GObject.

[type GObject.Object]

target_property

the property on target -to bind

 

flags

flags to pass to GBinding

 
-
-
-

Returns

-

the GBinding instance representing the -binding between the two GObject instances. The binding is released -whenever the GBinding reference count reaches zero.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

GBindingTransformFunc ()

-
gboolean
-(*GBindingTransformFunc) (GBinding *binding,
-                          const GValue *from_value,
-                          GValue *to_value,
-                          gpointer user_data);
-

A function to be called to transform from_value - to to_value -. If -this is the transform_to - function of a binding, then from_value - -is the source_property - on the source - object, and to_value - is the -target_property - on the target - object. If this is the -transform_from - function of a G_BINDING_BIDIRECTIONAL binding, -then those roles are reversed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

binding

a GBinding

 

from_value

the GValue containing the value to transform

 

to_value

the GValue in which to store the transformed value

 

user_data

data passed to the transform function

 
-
-
-

Returns

-

TRUE if the transformation was successful, and FALSE -otherwise

-
-

Since: 2.26

-
-
-
-

g_object_bind_property_full ()

-
GBinding *
-g_object_bind_property_full (gpointer source,
-                             const gchar *source_property,
-                             gpointer target,
-                             const gchar *target_property,
-                             GBindingFlags flags,
-                             GBindingTransformFunc transform_to,
-                             GBindingTransformFunc transform_from,
-                             gpointer user_data,
-                             GDestroyNotify notify);
-

Complete version of g_object_bind_property().

-

Creates a binding between source_property - on source - and target_property - -on target -, allowing you to set the transformation functions to be used by -the binding.

-

If flags - contains G_BINDING_BIDIRECTIONAL then the binding will be mutual: -if target_property - on target - changes then the source_property - on source - -will be updated as well. The transform_from - function is only used in case -of bidirectional bindings, otherwise it will be ignored

-

The binding will automatically be removed when either the source - or the -target - instances are finalized. To remove the binding without affecting the -source - and the target - you can just call g_object_unref() on the returned -GBinding instance.

-

A GObject can have multiple bindings.

-

The same user_data - parameter will be used for both transform_to - -and transform_from - transformation functions; the notify - function will -be called once, when the binding is removed. If you need different data -for each transformation function, please use -g_object_bind_property_with_closures() instead.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

source

the source GObject.

[type GObject.Object]

source_property

the property on source -to bind

 

target

the target GObject.

[type GObject.Object]

target_property

the property on target -to bind

 

flags

flags to pass to GBinding

 

transform_to

the transformation function -from the source -to the target -, or NULL to use the default.

[scope notified][nullable]

transform_from

the transformation function -from the target -to the source -, or NULL to use the default.

[scope notified][nullable]

user_data

custom data to be passed to the transformation functions, -or NULL

 

notify

function to be called when disposing the binding, to free the -resources used by the transformation functions

 
-
-
-

Returns

-

the GBinding instance representing the -binding between the two GObject instances. The binding is released -whenever the GBinding reference count reaches zero.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

g_object_bind_property_with_closures ()

-
GBinding *
-g_object_bind_property_with_closures (gpointer source,
-                                      const gchar *source_property,
-                                      gpointer target,
-                                      const gchar *target_property,
-                                      GBindingFlags flags,
-                                      GClosure *transform_to,
-                                      GClosure *transform_from);
-

Creates a binding between source_property - on source - and target_property - -on target -, allowing you to set the transformation functions to be used by -the binding.

-

This function is the language bindings friendly version of -g_object_bind_property_full(), using GClosures instead of -function pointers.

-

[rename-to g_object_bind_property_full]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

source

the source GObject.

[type GObject.Object]

source_property

the property on source -to bind

 

target

the target GObject.

[type GObject.Object]

target_property

the property on target -to bind

 

flags

flags to pass to GBinding

 

transform_to

a GClosure wrapping the transformation function -from the source -to the target -, or NULL to use the default

 

transform_from

a GClosure wrapping the transformation function -from the target -to the source -, or NULL to use the default

 
-
-
-

Returns

-

the GBinding instance representing the -binding between the two GObject instances. The binding is released -whenever the GBinding reference count reaches zero.

-

[transfer none]

-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GBinding

-
typedef struct _GBinding GBinding;
-

GBinding is an opaque structure whose members -cannot be accessed directly.

-

Since: 2.26

-
-
-
-

enum GBindingFlags

-

Flags to be passed to g_object_bind_property() or -g_object_bind_property_full().

-

This enumeration can be extended at later date.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_BINDING_DEFAULT

-

The default binding; if the source property - changes, the target property is updated with its value.

-
 

G_BINDING_BIDIRECTIONAL

-

Bidirectional binding; if either the - property of the source or the property of the target changes, - the other is updated.

-
 

G_BINDING_SYNC_CREATE

-

Synchronize the values of the source and - target properties when creating the binding; the direction of - the synchronization is always from the source to the target.

-
 

G_BINDING_INVERT_BOOLEAN

-

If the two properties being bound are - booleans, setting one to TRUE will result in the other being - set to FALSE and vice versa. This flag will only work for - boolean properties, and cannot be used when passing custom - transformation functions to g_object_bind_property_full().

-
 
-
-

Since: 2.26

-
-
-
-

Property Details

-
-

The “flags” property

-
  “flags”                    GBindingFlags
-

Flags to be used to control the GBinding

-

Flags: Read / Write / Construct Only

-

Since: 2.26

-
-
-
-

The “source” property

-
  “source”                   GObject *
-

The GObject that should be used as the source of the binding

-

Flags: Read / Write / Construct Only

-

Since: 2.26

-
-
-
-

The “source-property” property

-
  “source-property”          gchar *
-

The name of the property of “source” that should be used -as the source of the binding

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.26

-
-
-
-

The “target” property

-
  “target”                   GObject *
-

The GObject that should be used as the target of the binding

-

Flags: Read / Write / Construct Only

-

Since: 2.26

-
-
-
-

The “target-property” property

-
  “target-property”          gchar *
-

The name of the property of “target” that should be used -as the target of the binding

-

Flags: Read / Write / Construct Only

-

Default value: NULL

-

Since: 2.26

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/GTypeModule.html b/docs/reference/gobject/html/GTypeModule.html deleted file mode 100644 index fed5bc9ea..000000000 --- a/docs/reference/gobject/html/GTypeModule.html +++ /dev/null @@ -1,838 +0,0 @@ - - - - -GTypeModule: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GTypeModule

-

GTypeModule — Type loading modules

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -g_type_module_use () -
-void - -g_type_module_unuse () -
-void - -g_type_module_set_name () -
-GType - -g_type_module_register_type () -
-void - -g_type_module_add_interface () -
-GType - -g_type_module_register_enum () -
-GType - -g_type_module_register_flags () -
#define -G_DEFINE_DYNAMIC_TYPE() -
#define -G_DEFINE_DYNAMIC_TYPE_EXTENDED() -
#define -G_IMPLEMENT_INTERFACE_DYNAMIC() -
#define -G_ADD_PRIVATE_DYNAMIC() -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
structGTypeModule
structGTypeModuleClass
-
-
-

Object Hierarchy

-
    GObject
-    ╰── GTypeModule
-
-
-
-

Implemented Interfaces

-

-GTypeModule implements - GTypePlugin.

-
-
-

Includes

-
#include <glib-object.h>
-
-
-
-

Description

-

GTypeModule provides a simple implementation of the GTypePlugin -interface. The model of GTypeModule is a dynamically loaded module -which implements some number of types and interface implementations. -When the module is loaded, it registers its types and interfaces -using g_type_module_register_type() and g_type_module_add_interface(). -As long as any instances of these types and interface implementations -are in use, the module is kept loaded. When the types and interfaces -are gone, the module may be unloaded. If the types and interfaces -become used again, the module will be reloaded. Note that the last -unref cannot happen in module code, since that would lead to the -caller's code being unloaded before g_object_unref() returns to it.

-

Keeping track of whether the module should be loaded or not is done by -using a use count - it starts at zero, and whenever it is greater than -zero, the module is loaded. The use count is maintained internally by -the type system, but also can be explicitly controlled by -g_type_module_use() and g_type_module_unuse(). Typically, when loading -a module for the first type, g_type_module_use() will be used to load -it so that it can initialize its types. At some later point, when the -module no longer needs to be loaded except for the type -implementations it contains, g_type_module_unuse() is called.

-

GTypeModule does not actually provide any implementation of module -loading and unloading. To create a particular module type you must -derive from GTypeModule and implement the load and unload functions -in GTypeModuleClass.

-
-
-

Functions

-
-

g_type_module_use ()

-
gboolean
-g_type_module_use (GTypeModule *module);
-

Increases the use count of a GTypeModule by one. If the -use count was zero before, the plugin will be loaded. -If loading the plugin fails, the use count is reset to -its prior value.

-
-

Parameters

-
----- - - - - - -

module

a GTypeModule

 
-
-
-

Returns

-

FALSE if the plugin needed to be loaded and -loading the plugin failed.

-
-
-
-
-

g_type_module_unuse ()

-
void
-g_type_module_unuse (GTypeModule *module);
-

Decreases the use count of a GTypeModule by one. If the -result is zero, the module will be unloaded. (However, the -GTypeModule will not be freed, and types associated with the -GTypeModule are not unregistered. Once a GTypeModule is -initialized, it must exist forever.)

-
-

Parameters

-
----- - - - - - -

module

a GTypeModule

 
-
-
-
-
-

g_type_module_set_name ()

-
void
-g_type_module_set_name (GTypeModule *module,
-                        const gchar *name);
-

Sets the name for a GTypeModule

-
-

Parameters

-
----- - - - - - - - - - - - - -

module

a GTypeModule.

 

name

a human-readable name to use in error messages.

 
-
-
-
-
-

g_type_module_register_type ()

-
GType
-g_type_module_register_type (GTypeModule *module,
-                             GType parent_type,
-                             const gchar *type_name,
-                             const GTypeInfo *type_info,
-                             GTypeFlags flags);
-

Looks up or registers a type that is implemented with a particular -type plugin. If a type with name type_name - was previously registered, -the GType identifier for the type is returned, otherwise the type -is newly registered, and the resulting GType identifier returned.

-

When reregistering a type (typically because a module is unloaded -then reloaded, and reinitialized), module - and parent_type - must -be the same as they were previously.

-

As long as any instances of the type exist, the type plugin will -not be unloaded.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

module

a GTypeModule

 

parent_type

the type for the parent class

 

type_name

name for the type

 

type_info

type information structure

 

flags

flags field providing details about the type

 
-
-
-

Returns

-

the new or existing type ID

-
-
-
-
-

g_type_module_add_interface ()

-
void
-g_type_module_add_interface (GTypeModule *module,
-                             GType instance_type,
-                             GType interface_type,
-                             const GInterfaceInfo *interface_info);
-

Registers an additional interface for a type, whose interface lives -in the given type plugin. If the interface was already registered -for the type in this plugin, nothing will be done.

-

As long as any instances of the type exist, the type plugin will -not be unloaded.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

module

a GTypeModule

 

instance_type

type to which to add the interface.

 

interface_type

interface type to add

 

interface_info

type information structure

 
-
-
-
-
-

g_type_module_register_enum ()

-
GType
-g_type_module_register_enum (GTypeModule *module,
-                             const gchar *name,
-                             const GEnumValue *const_static_values);
-

Looks up or registers an enumeration that is implemented with a particular -type plugin. If a type with name type_name - was previously registered, -the GType identifier for the type is returned, otherwise the type -is newly registered, and the resulting GType identifier returned.

-

As long as any instances of the type exist, the type plugin will -not be unloaded.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

module

a GTypeModule

 

name

name for the type

 

const_static_values

an array of GEnumValue structs for the -possible enumeration values. The array is -terminated by a struct with all members being -0.

 
-
-
-

Returns

-

the new or existing type ID

-
-

Since: 2.6

-
-
-
-

g_type_module_register_flags ()

-
GType
-g_type_module_register_flags (GTypeModule *module,
-                              const gchar *name,
-                              const GFlagsValue *const_static_values);
-

Looks up or registers a flags type that is implemented with a particular -type plugin. If a type with name type_name - was previously registered, -the GType identifier for the type is returned, otherwise the type -is newly registered, and the resulting GType identifier returned.

-

As long as any instances of the type exist, the type plugin will -not be unloaded.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

module

a GTypeModule

 

name

name for the type

 

const_static_values

an array of GFlagsValue structs for the -possible flags values. The array is -terminated by a struct with all members being -0.

 
-
-
-

Returns

-

the new or existing type ID

-
-

Since: 2.6

-
-
-
-

G_DEFINE_DYNAMIC_TYPE()

-
#define G_DEFINE_DYNAMIC_TYPE(TN, t_n, T_P)          G_DEFINE_DYNAMIC_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
-
-

A convenience macro for dynamic type implementations, which declares a -class initialization function, an instance initialization function (see -GTypeInfo for information about these) and a static variable named -t_n -<!-- -->_parent_class pointing to the parent class. Furthermore, -it defines a *_get_type() and a static *_register_type() functions -for use in your module_init().

-

See G_DEFINE_DYNAMIC_TYPE_EXTENDED() for an example.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

TN

The name of the new type, in Camel case.

 

t_n

The name of the new type, in lowercase, with words -separated by '_'.

 

T_P

The GType of the parent type.

 
-
-

Since: 2.14

-
-
-
-

G_DEFINE_DYNAMIC_TYPE_EXTENDED()

-
#define             G_DEFINE_DYNAMIC_TYPE_EXTENDED(TypeName, type_name, TYPE_PARENT, flags, CODE)
-

A more general version of G_DEFINE_DYNAMIC_TYPE() which -allows to specify GTypeFlags and custom code.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
G_DEFINE_DYNAMIC_TYPE_EXTENDED (GtkGadget,
-                                gtk_gadget,
-                                GTK_TYPE_THING,
-                                0,
-                                G_IMPLEMENT_INTERFACE_DYNAMIC (TYPE_GIZMO,
-                                                               gtk_gadget_gizmo_init));
-
- -

-expands to

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
static void     gtk_gadget_init              (GtkGadget      *self);
-static void     gtk_gadget_class_init        (GtkGadgetClass *klass);
-static void     gtk_gadget_class_finalize    (GtkGadgetClass *klass);
-
-static gpointer gtk_gadget_parent_class = NULL;
-static GType    gtk_gadget_type_id = 0;
-
-static void     gtk_gadget_class_intern_init (gpointer klass)
-{
-  gtk_gadget_parent_class = g_type_class_peek_parent (klass); 
-  gtk_gadget_class_init ((GtkGadgetClass*) klass); 
-}
-
-GType
-gtk_gadget_get_type (void)
-{
-  return gtk_gadget_type_id;
-}
-
-static void
-gtk_gadget_register_type (GTypeModule *type_module)
-{
-  const GTypeInfo g_define_type_info = {
-    sizeof (GtkGadgetClass),
-    (GBaseInitFunc) NULL,
-    (GBaseFinalizeFunc) NULL,
-    (GClassInitFunc) gtk_gadget_class_intern_init,
-    (GClassFinalizeFunc) gtk_gadget_class_finalize,
-    NULL,   // class_data
-    sizeof (GtkGadget),
-    0,      // n_preallocs
-    (GInstanceInitFunc) gtk_gadget_init, 
-    NULL    // value_table
-  };
-  gtk_gadget_type_id = g_type_module_register_type (type_module,
-                                                    GTK_TYPE_THING,
-                                                    "GtkGadget",
-                                                    &g_define_type_info,
-                                                    (GTypeFlags) flags);
-  {
-    const GInterfaceInfo g_implement_interface_info = {
-      (GInterfaceInitFunc) gtk_gadget_gizmo_init
-    };
-    g_type_module_add_interface (type_module, g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
-  }
-}
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

TypeName

The name of the new type, in Camel case.

 

type_name

The name of the new type, in lowercase, with words -separated by '_'.

 

TYPE_PARENT

The GType of the parent type.

 

flags

GTypeFlags to pass to g_type_module_register_type()

 

CODE

Custom code that gets inserted in the *_get_type() function.

 
-
-

Since: 2.14

-
-
-
-

G_IMPLEMENT_INTERFACE_DYNAMIC()

-
#define             G_IMPLEMENT_INTERFACE_DYNAMIC(TYPE_IFACE, iface_init)
-

A convenience macro to ease interface addition in the _C_ - section -of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See G_DEFINE_DYNAMIC_TYPE_EXTENDED() -for an example.

-

Note that this macro can only be used together with the -G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable -names from that macro.

-
-

Parameters

-
----- - - - - - - - - - - - - -

TYPE_IFACE

The GType of the interface to add

 

iface_init

The interface init function

 
-
-

Since: 2.24

-
-
-
-

G_ADD_PRIVATE_DYNAMIC()

-
#define             G_ADD_PRIVATE_DYNAMIC(TypeName)
-

A convenience macro to ease adding private data to instances of a new dynamic -type in the _C_ - section of G_DEFINE_DYNAMIC_TYPE_EXTENDED(). See -G_ADD_PRIVATE() for details, it is similar but for static types.

-

Note that this macro can only be used together with the -G_DEFINE_DYNAMIC_TYPE_EXTENDED macros, since it depends on variable -names from that macro.

-
-

Parameters

-
----- - - - - - -

TypeName

the name of the type in CamelCase

 
-
-

Since: 2.38

-
-
-
-

Types and Values

-
-

struct GTypeModule

-
struct GTypeModule {
-  gchar *name;
-};
-
-

The members of the GTypeModule structure should not -be accessed directly, except for the name - field.

-
-

Members

-
----- - - - - - -

gchar *name;

the name of the module

 
-
-
-
-
-

struct GTypeModuleClass

-
struct GTypeModuleClass {
-  GObjectClass parent_class;
-
-  gboolean (* load)   (GTypeModule *module);
-  void     (* unload) (GTypeModule *module);
-};
-
-

In order to implement dynamic loading of types based on GTypeModule, -the load - and unload - functions in GTypeModuleClass must be implemented.

-
-

Members

-
----- - - - - - - - - - - - - -

load ()

loads the module and registers one or more types using -g_type_module_register_type().

 

unload ()

unloads the module

 
-
-
-
-
-

See Also

-

GTypePlugin, GModule

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/GTypePlugin.html b/docs/reference/gobject/html/GTypePlugin.html deleted file mode 100644 index d688f716b..000000000 --- a/docs/reference/gobject/html/GTypePlugin.html +++ /dev/null @@ -1,557 +0,0 @@ - - - - -GTypePlugin: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GTypePlugin

-

GTypePlugin — An interface for dynamically loadable types

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -(*GTypePluginUse) () -
-void - -(*GTypePluginUnuse) () -
-void - -(*GTypePluginCompleteTypeInfo) () -
-void - -(*GTypePluginCompleteInterfaceInfo) () -
-void - -g_type_plugin_use () -
-void - -g_type_plugin_unuse () -
-void - -g_type_plugin_complete_type_info () -
-void - -g_type_plugin_complete_interface_info () -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GTypePlugin
structGTypePluginClass
-
-
-

Object Hierarchy

-
    GInterface
-    ╰── GTypePlugin
-
-
-
-

Known Implementations

-

-GTypePlugin is implemented by - GTypeModule.

-
-
-

Includes

-
#include <glib-object.h>
-
-
-
-

Description

-

The GObject type system supports dynamic loading of types. -The GTypePlugin interface is used to handle the lifecycle -of dynamically loaded types. It goes as follows:

-
    -
  1. -

    The type is initially introduced (usually upon loading the module -the first time, or by your main application that knows what modules -introduces what types), like this:

    -
    - - - - - - - -
    1
    -2
    -3
    -4
    new_type_id = g_type_register_dynamic (parent_type_id,
    -                                      "TypeName",
    -                                      new_type_plugin,
    -                                      type_flags);
    -
    - -

    -where new_type_plugin - is an implementation of the -GTypePlugin interface.

    -
  2. -
  3. The type's implementation is referenced, e.g. through -g_type_class_ref() or through g_type_create_instance() (this is -being called by g_object_new()) or through one of the above done on -a type derived from new_type_id -.

  4. -
  5. This causes the type system to load the type's implementation by -calling g_type_plugin_use() and g_type_plugin_complete_type_info() -on new_type_plugin -.

  6. -
  7. At some point the type's implementation isn't required anymore, -e.g. after g_type_class_unref() or g_type_free_instance() (called -when the reference count of an instance drops to zero).

  8. -
  9. This causes the type system to throw away the information retrieved -from g_type_plugin_complete_type_info() and then it calls -g_type_plugin_unuse() on new_type_plugin -.

  10. -
  11. Things may repeat from the second step.

  12. -
-

So basically, you need to implement a GTypePlugin type that -carries a use_count, once use_count goes from zero to one, you need -to load the implementation to successfully handle the upcoming -g_type_plugin_complete_type_info() call. Later, maybe after -succeeding use/unuse calls, once use_count drops to zero, you can -unload the implementation again. The type system makes sure to call -g_type_plugin_use() and g_type_plugin_complete_type_info() again -when the type is needed again.

-

GTypeModule is an implementation of GTypePlugin that already -implements most of this except for the actual module loading and -unloading. It even handles multiple registered types per module.

-
-
-

Functions

-
-

GTypePluginUse ()

-
void
-(*GTypePluginUse) (GTypePlugin *plugin);
-

The type of the use_plugin - function of GTypePluginClass, which gets called -to increase the use count of plugin -.

-
-

Parameters

-
----- - - - - - -

plugin

the GTypePlugin whose use count should be increased

 
-
-
-
-
-

GTypePluginUnuse ()

-
void
-(*GTypePluginUnuse) (GTypePlugin *plugin);
-

The type of the unuse_plugin - function of GTypePluginClass.

-
-

Parameters

-
----- - - - - - -

plugin

the GTypePlugin whose use count should be decreased

 
-
-
-
-
-

GTypePluginCompleteTypeInfo ()

-
void
-(*GTypePluginCompleteTypeInfo) (GTypePlugin *plugin,
-                                GType g_type,
-                                GTypeInfo *info,
-                                GTypeValueTable *value_table);
-

The type of the complete_type_info - function of GTypePluginClass.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

plugin

the GTypePlugin

 

g_type

the GType whose info is completed

 

info

the GTypeInfo struct to fill in

 

value_table

the GTypeValueTable to fill in

 
-
-
-
-
-

GTypePluginCompleteInterfaceInfo ()

-
void
-(*GTypePluginCompleteInterfaceInfo) (GTypePlugin *plugin,
-                                     GType instance_type,
-                                     GType interface_type,
-                                     GInterfaceInfo *info);
-

The type of the complete_interface_info - function of GTypePluginClass.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

plugin

the GTypePlugin

 

instance_type

the GType of an instantiable type to which the interface -is added

 

interface_type

the GType of the interface whose info is completed

 

info

the GInterfaceInfo to fill in

 
-
-
-
-
-

g_type_plugin_use ()

-
void
-g_type_plugin_use (GTypePlugin *plugin);
-

Calls the use_plugin - function from the GTypePluginClass of -plugin -. There should be no need to use this function outside of -the GObject type system itself.

-
-

Parameters

-
----- - - - - - -

plugin

a GTypePlugin

 
-
-
-
-
-

g_type_plugin_unuse ()

-
void
-g_type_plugin_unuse (GTypePlugin *plugin);
-

Calls the unuse_plugin - function from the GTypePluginClass of -plugin -. There should be no need to use this function outside of -the GObject type system itself.

-
-

Parameters

-
----- - - - - - -

plugin

a GTypePlugin

 
-
-
-
-
-

g_type_plugin_complete_type_info ()

-
void
-g_type_plugin_complete_type_info (GTypePlugin *plugin,
-                                  GType g_type,
-                                  GTypeInfo *info,
-                                  GTypeValueTable *value_table);
-

Calls the complete_type_info - function from the GTypePluginClass of plugin -. -There should be no need to use this function outside of the GObject -type system itself.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

plugin

a GTypePlugin

 

g_type

the GType whose info is completed

 

info

the GTypeInfo struct to fill in

 

value_table

the GTypeValueTable to fill in

 
-
-
-
-
-

g_type_plugin_complete_interface_info ()

-
void
-g_type_plugin_complete_interface_info (GTypePlugin *plugin,
-                                       GType instance_type,
-                                       GType interface_type,
-                                       GInterfaceInfo *info);
-

Calls the complete_interface_info - function from the -GTypePluginClass of plugin -. There should be no need to use this -function outside of the GObject type system itself.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

plugin

the GTypePlugin

 

instance_type

the GType of an instantiable type to which the interface -is added

 

interface_type

the GType of the interface whose info is completed

 

info

the GInterfaceInfo to fill in

 
-
-
-
-
-

Types and Values

-
-

GTypePlugin

-
typedef struct _GTypePlugin GTypePlugin;
-

The GTypePlugin typedef is used as a placeholder -for objects that implement the GTypePlugin interface.

-
-
-
-

struct GTypePluginClass

-
struct GTypePluginClass {
-  GTypePluginUse		   use_plugin;
-  GTypePluginUnuse		   unuse_plugin;
-  GTypePluginCompleteTypeInfo	   complete_type_info;
-  GTypePluginCompleteInterfaceInfo complete_interface_info;
-};
-
-

The GTypePlugin interface is used by the type system in order to handle -the lifecycle of dynamically loaded types.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

GTypePluginUse use_plugin;

Increases the use count of the plugin.

 

GTypePluginUnuse unuse_plugin;

Decreases the use count of the plugin.

 

GTypePluginCompleteTypeInfo complete_type_info;

Fills in the GTypeInfo and -GTypeValueTable structs for the type. The structs are initialized -with memset(s, 0, sizeof (s)) before calling this function.

 

GTypePluginCompleteInterfaceInfo complete_interface_info;

Fills in missing parts of the GInterfaceInfo -for the interface. The structs is initialized with -memset(s, 0, sizeof (s)) before calling this function.

 
-
-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/annotation-glossary.html b/docs/reference/gobject/html/annotation-glossary.html deleted file mode 100644 index 8f85bb432..000000000 --- a/docs/reference/gobject/html/annotation-glossary.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - -Annotation Glossary: GObject Reference Manual - - - - - - - - - - - - - - - -
-

-Annotation Glossary

-

A

-
array
-

Parameter points to an array of items.

-

C

-
closure
-

This parameter is a 'user_data', for callbacks; many bindings can pass NULL here.

-

E

-
element-type
-

Generics and defining elements of containers and arrays.

-

I

-
inout
-

Parameter for input and for returning results. Default is transfer full.

-

N

-
not nullable
-

NULL must not be passed as the value in, out, in-out; or as a return value.

-
nullable
-

NULL may be passed as the value in, out, in-out; or as a return value.

-

O

-
optional
-

NULL may be passed instead of a pointer to a location.

-
out
-

Parameter for returning results. Default is transfer full.

-
out callee-allocates
-

Out parameter, where caller must allocate storage.

-
out caller-allocates
-

Out parameter, where caller must allocate storage.

-

R

-
rename-to
-

Rename the original symbol's name to SYMBOL.

-

S

-
scope call
-

The callback is valid only during the call to the method.

-
scope notified
-

The callback is valid until the GDestroyNotify argument is called.

-
skip
-

Exposed in C code, not necessarily available in other languages.

-

T

-
transfer container
-

Free data container after the code is done.

-
transfer full
-

Free data after the code is done.

-
transfer none
-

Don't free data after the code is done.

-
type
-

Override the parsed C type with given type.

-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/api-index-full.html b/docs/reference/gobject/html/api-index-full.html deleted file mode 100644 index 1a2f70f19..000000000 --- a/docs/reference/gobject/html/api-index-full.html +++ /dev/null @@ -1,3030 +0,0 @@ - - - - -Index: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Index

-

A

-
-G_ADD_PRIVATE, macro in Type Information -
-
-
-G_ADD_PRIVATE_DYNAMIC, macro in GTypeModule -
-
-

B

-
-GBaseFinalizeFunc, user_function in Type Information -
-
-
-GBaseInitFunc, user_function in Type Information -
-
-
-GBinding, struct in GBinding -
-
-
-GBinding:flags, object property in GBinding -
-
-
-GBinding:source, object property in GBinding -
-
-
-GBinding:source-property, object property in GBinding -
-
-
-GBinding:target, object property in GBinding -
-
-
-GBinding:target-property, object property in GBinding -
-
-
-GBindingFlags, enum in GBinding -
-
-
-GBindingTransformFunc, user_function in GBinding -
-
-
-g_binding_get_flags, function in GBinding -
-
-
-g_binding_get_source, function in GBinding -
-
-
-g_binding_get_source_property, function in GBinding -
-
-
-g_binding_get_target, function in GBinding -
-
-
-g_binding_get_target_property, function in GBinding -
-
-
-g_binding_unbind, function in GBinding -
-
-
-GBoxedCopyFunc, user_function in Boxed Types -
-
-
-GBoxedFreeFunc, user_function in Boxed Types -
-
-
-g_boxed_copy, function in Boxed Types -
-
-
-g_boxed_free, function in Boxed Types -
-
-
-g_boxed_type_register_static, function in Boxed Types -
-
-

C

-
-GCallback, user_function in Closures -
-
-
-G_CALLBACK, macro in Closures -
-
-
-GCClosure, struct in Closures -
-
-
-g_cclosure_marshal_BOOLEAN__BOXED_BOXED, function in Closures -
-
-
-g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv, function in Closures -
-
-
-g_cclosure_marshal_BOOLEAN__FLAGS, function in Closures -
-
-
-g_cclosure_marshal_BOOLEAN__FLAGSv, function in Closures -
-
-
-g_cclosure_marshal_BOOL__BOXED_BOXED, macro in Closures -
-
-
-g_cclosure_marshal_BOOL__FLAGS, macro in Closures -
-
-
-g_cclosure_marshal_generic, function in Closures -
-
-
-g_cclosure_marshal_generic_va, function in Closures -
-
-
-g_cclosure_marshal_STRING__OBJECT_POINTER, function in Closures -
-
-
-g_cclosure_marshal_STRING__OBJECT_POINTERv, function in Closures -
-
-
-g_cclosure_marshal_VOID__BOOLEAN, function in Closures -
-
-
-g_cclosure_marshal_VOID__BOOLEANv, function in Closures -
-
-
-g_cclosure_marshal_VOID__BOXED, function in Closures -
-
-
-g_cclosure_marshal_VOID__BOXEDv, function in Closures -
-
-
-g_cclosure_marshal_VOID__CHAR, function in Closures -
-
-
-g_cclosure_marshal_VOID__CHARv, function in Closures -
-
-
-g_cclosure_marshal_VOID__DOUBLE, function in Closures -
-
-
-g_cclosure_marshal_VOID__DOUBLEv, function in Closures -
-
-
-g_cclosure_marshal_VOID__ENUM, function in Closures -
-
-
-g_cclosure_marshal_VOID__ENUMv, function in Closures -
-
-
-g_cclosure_marshal_VOID__FLAGS, function in Closures -
-
-
-g_cclosure_marshal_VOID__FLAGSv, function in Closures -
-
-
-g_cclosure_marshal_VOID__FLOAT, function in Closures -
-
-
-g_cclosure_marshal_VOID__FLOATv, function in Closures -
-
-
-g_cclosure_marshal_VOID__INT, function in Closures -
-
-
-g_cclosure_marshal_VOID__INTv, function in Closures -
-
-
-g_cclosure_marshal_VOID__LONG, function in Closures -
-
-
-g_cclosure_marshal_VOID__LONGv, function in Closures -
-
-
-g_cclosure_marshal_VOID__OBJECT, function in Closures -
-
-
-g_cclosure_marshal_VOID__OBJECTv, function in Closures -
-
-
-g_cclosure_marshal_VOID__PARAM, function in Closures -
-
-
-g_cclosure_marshal_VOID__PARAMv, function in Closures -
-
-
-g_cclosure_marshal_VOID__POINTER, function in Closures -
-
-
-g_cclosure_marshal_VOID__POINTERv, function in Closures -
-
-
-g_cclosure_marshal_VOID__STRING, function in Closures -
-
-
-g_cclosure_marshal_VOID__STRINGv, function in Closures -
-
-
-g_cclosure_marshal_VOID__UCHAR, function in Closures -
-
-
-g_cclosure_marshal_VOID__UCHARv, function in Closures -
-
-
-g_cclosure_marshal_VOID__UINT, function in Closures -
-
-
-g_cclosure_marshal_VOID__UINTv, function in Closures -
-
-
-g_cclosure_marshal_VOID__UINT_POINTER, function in Closures -
-
-
-g_cclosure_marshal_VOID__UINT_POINTERv, function in Closures -
-
-
-g_cclosure_marshal_VOID__ULONG, function in Closures -
-
-
-g_cclosure_marshal_VOID__ULONGv, function in Closures -
-
-
-g_cclosure_marshal_VOID__VARIANT, function in Closures -
-
-
-g_cclosure_marshal_VOID__VARIANTv, function in Closures -
-
-
-g_cclosure_marshal_VOID__VOID, function in Closures -
-
-
-g_cclosure_marshal_VOID__VOIDv, function in Closures -
-
-
-g_cclosure_new, function in Closures -
-
-
-g_cclosure_new_object, function in Closures -
-
-
-g_cclosure_new_object_swap, function in Closures -
-
-
-g_cclosure_new_swap, function in Closures -
-
-
-G_CCLOSURE_SWAP_DATA, macro in Closures -
-
-
-gchararray, typedef in Standard Parameter and Value Types -
-
-
-GClassFinalizeFunc, user_function in Type Information -
-
-
-GClassInitFunc, user_function in Type Information -
-
-
-g_clear_object, function in The Base Object Type -
-
-
-GClosure, struct in Closures -
-
-
-GClosureMarshal, user_function in Closures -
-
-
-GClosureNotify, user_function in Closures -
-
-
-g_closure_add_finalize_notifier, function in Closures -
-
-
-g_closure_add_invalidate_notifier, function in Closures -
-
-
-g_closure_add_marshal_guards, function in Closures -
-
-
-g_closure_invalidate, function in Closures -
-
-
-g_closure_invoke, function in Closures -
-
-
-G_CLOSURE_NEEDS_MARSHAL, macro in Closures -
-
-
-g_closure_new_object, function in Closures -
-
-
-g_closure_new_simple, function in Closures -
-
-
-G_CLOSURE_N_NOTIFIERS, macro in Closures -
-
-
-g_closure_ref, function in Closures -
-
-
-g_closure_remove_finalize_notifier, function in Closures -
-
-
-g_closure_remove_invalidate_notifier, function in Closures -
-
-
-g_closure_set_marshal, function in Closures -
-
-
-g_closure_set_meta_marshal, function in Closures -
-
-
-g_closure_sink, function in Closures -
-
-
-g_closure_unref, function in Closures -
-
-
-GConnectFlags, enum in Signals -
-
-

D

-
-G_DECLARE_DERIVABLE_TYPE, macro in Type Information -
-
-
-G_DECLARE_FINAL_TYPE, macro in Type Information -
-
-
-G_DECLARE_INTERFACE, macro in Type Information -
-
-
-G_DEFINE_ABSTRACT_TYPE, macro in Type Information -
-
-
-G_DEFINE_ABSTRACT_TYPE_WITH_CODE, macro in Type Information -
-
-
-G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE, macro in Type Information -
-
-
-G_DEFINE_BOXED_TYPE, macro in Type Information -
-
-
-G_DEFINE_BOXED_TYPE_WITH_CODE, macro in Type Information -
-
-
-G_DEFINE_DYNAMIC_TYPE, macro in GTypeModule -
-
-
-G_DEFINE_DYNAMIC_TYPE_EXTENDED, macro in GTypeModule -
-
-
-G_DEFINE_INTERFACE, macro in Type Information -
-
-
-G_DEFINE_INTERFACE_WITH_CODE, macro in Type Information -
-
-
-G_DEFINE_POINTER_TYPE, macro in Type Information -
-
-
-G_DEFINE_POINTER_TYPE_WITH_CODE, macro in Type Information -
-
-
-G_DEFINE_TYPE, macro in Type Information -
-
-
-G_DEFINE_TYPE_EXTENDED, macro in Type Information -
-
-
-G_DEFINE_TYPE_WITH_CODE, macro in Type Information -
-
-
-G_DEFINE_TYPE_WITH_PRIVATE, macro in Type Information -
-
-

E

-
-GEnumClass, struct in Enumeration and Flag Types -
-
-
-GEnumValue, struct in Enumeration and Flag Types -
-
-
-G_ENUM_CLASS, macro in Enumeration and Flag Types -
-
-
-G_ENUM_CLASS_TYPE, macro in Enumeration and Flag Types -
-
-
-G_ENUM_CLASS_TYPE_NAME, macro in Enumeration and Flag Types -
-
-
-g_enum_complete_type_info, function in Enumeration and Flag Types -
-
-
-g_enum_get_value, function in Enumeration and Flag Types -
-
-
-g_enum_get_value_by_name, function in Enumeration and Flag Types -
-
-
-g_enum_get_value_by_nick, function in Enumeration and Flag Types -
-
-
-g_enum_register_static, function in Enumeration and Flag Types -
-
-

F

-
-GFlagsClass, struct in Enumeration and Flag Types -
-
-
-GFlagsValue, struct in Enumeration and Flag Types -
-
-
-G_FLAGS_CLASS, macro in Enumeration and Flag Types -
-
-
-G_FLAGS_CLASS_TYPE, macro in Enumeration and Flag Types -
-
-
-G_FLAGS_CLASS_TYPE_NAME, macro in Enumeration and Flag Types -
-
-
-g_flags_complete_type_info, function in Enumeration and Flag Types -
-
-
-g_flags_get_first_value, function in Enumeration and Flag Types -
-
-
-g_flags_get_value_by_name, function in Enumeration and Flag Types -
-
-
-g_flags_get_value_by_nick, function in Enumeration and Flag Types -
-
-
-g_flags_register_static, function in Enumeration and Flag Types -
-
-

I

-
-G_IMPLEMENT_INTERFACE, macro in Type Information -
-
-
-G_IMPLEMENT_INTERFACE_DYNAMIC, macro in GTypeModule -
-
-
-GInitiallyUnowned, typedef in The Base Object Type -
-
-
-GInitiallyUnownedClass, typedef in The Base Object Type -
-
-
-GInstanceInitFunc, user_function in Type Information -
-
-
-GInterfaceFinalizeFunc, user_function in Type Information -
-
-
-GInterfaceInfo, struct in Type Information -
-
-
-GInterfaceInitFunc, user_function in Type Information -
-
-
-G_IS_ENUM_CLASS, macro in Enumeration and Flag Types -
-
-
-G_IS_FLAGS_CLASS, macro in Enumeration and Flag Types -
-
-
-G_IS_OBJECT, macro in The Base Object Type -
-
-
-G_IS_OBJECT_CLASS, macro in The Base Object Type -
-
-
-G_IS_PARAM_SPEC, macro in GParamSpec -
-
-
-G_IS_PARAM_SPEC_BOOLEAN, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_BOXED, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_CHAR, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_CLASS, macro in GParamSpec -
-
-
-G_IS_PARAM_SPEC_DOUBLE, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_ENUM, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_FLAGS, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_FLOAT, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_GTYPE, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_INT, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_INT64, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_LONG, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_OBJECT, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_OVERRIDE, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_PARAM, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_POINTER, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_STRING, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_UCHAR, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_UINT, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_UINT64, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_ULONG, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_UNICHAR, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_VALUE_ARRAY, macro in Standard Parameter and Value Types -
-
-
-G_IS_PARAM_SPEC_VARIANT, macro in Standard Parameter and Value Types -
-
-
-G_IS_VALUE, macro in Generic values -
-
-

O

-
-GObject, struct in The Base Object Type -
-
-
-G_OBJECT, macro in The Base Object Type -
-
-
-GObject::notify, object signal in The Base Object Type -
-
-
-GObjectClass, struct in The Base Object Type -
-
-
-GObjectConstructParam, struct in The Base Object Type -
-
-
-GObjectFinalizeFunc, user_function in The Base Object Type -
-
-
-GObjectGetPropertyFunc, user_function in The Base Object Type -
-
-
-GObjectSetPropertyFunc, user_function in The Base Object Type -
-
-
-g_object_add_toggle_ref, function in The Base Object Type -
-
-
-g_object_add_weak_pointer, function in The Base Object Type -
-
-
-g_object_bind_property, function in GBinding -
-
-
-g_object_bind_property_full, function in GBinding -
-
-
-g_object_bind_property_with_closures, function in GBinding -
-
-
-G_OBJECT_CLASS, macro in The Base Object Type -
-
-
-g_object_class_find_property, function in The Base Object Type -
-
-
-g_object_class_install_properties, function in The Base Object Type -
-
-
-g_object_class_install_property, function in The Base Object Type -
-
-
-g_object_class_list_properties, function in The Base Object Type -
-
-
-G_OBJECT_CLASS_NAME, macro in The Base Object Type -
-
-
-g_object_class_override_property, function in The Base Object Type -
-
-
-G_OBJECT_CLASS_TYPE, macro in The Base Object Type -
-
-
-g_object_connect, function in The Base Object Type -
-
-
-g_object_disconnect, function in The Base Object Type -
-
-
-g_object_dup_data, function in The Base Object Type -
-
-
-g_object_dup_qdata, function in The Base Object Type -
-
-
-g_object_force_floating, function in The Base Object Type -
-
-
-g_object_freeze_notify, function in The Base Object Type -
-
-
-g_object_get, function in The Base Object Type -
-
-
-G_OBJECT_GET_CLASS, macro in The Base Object Type -
-
-
-g_object_get_data, function in The Base Object Type -
-
-
-g_object_get_property, function in The Base Object Type -
-
-
-g_object_get_qdata, function in The Base Object Type -
-
-
-g_object_get_valist, function in The Base Object Type -
-
-
-g_object_interface_find_property, function in The Base Object Type -
-
-
-g_object_interface_install_property, function in The Base Object Type -
-
-
-g_object_interface_list_properties, function in The Base Object Type -
-
-
-g_object_is_floating, function in The Base Object Type -
-
-
-g_object_new, function in The Base Object Type -
-
-
-g_object_newv, function in The Base Object Type -
-
-
-g_object_new_valist, function in The Base Object Type -
-
-
-g_object_notify, function in The Base Object Type -
-
-
-g_object_notify_by_pspec, function in The Base Object Type -
-
-
-g_object_ref, function in The Base Object Type -
-
-
-g_object_ref_sink, function in The Base Object Type -
-
-
-g_object_remove_toggle_ref, function in The Base Object Type -
-
-
-g_object_remove_weak_pointer, function in The Base Object Type -
-
-
-g_object_replace_data, function in The Base Object Type -
-
-
-g_object_replace_qdata, function in The Base Object Type -
-
-
-g_object_run_dispose, function in The Base Object Type -
-
-
-g_object_set, function in The Base Object Type -
-
-
-g_object_set_data, function in The Base Object Type -
-
-
-g_object_set_data_full, function in The Base Object Type -
-
-
-g_object_set_property, function in The Base Object Type -
-
-
-g_object_set_qdata, function in The Base Object Type -
-
-
-g_object_set_qdata_full, function in The Base Object Type -
-
-
-g_object_set_valist, function in The Base Object Type -
-
-
-g_object_steal_data, function in The Base Object Type -
-
-
-g_object_steal_qdata, function in The Base Object Type -
-
-
-g_object_thaw_notify, function in The Base Object Type -
-
-
-G_OBJECT_TYPE, macro in The Base Object Type -
-
-
-G_OBJECT_TYPE_NAME, macro in The Base Object Type -
-
-
-g_object_unref, function in The Base Object Type -
-
-
-G_OBJECT_WARN_INVALID_PROPERTY_ID, macro in The Base Object Type -
-
-
-g_object_watch_closure, function in The Base Object Type -
-
-
-g_object_weak_ref, function in The Base Object Type -
-
-
-g_object_weak_unref, function in The Base Object Type -
-
-

P

-
-GParameter, struct in The Base Object Type -
-
-
-GParamFlags, enum in GParamSpec -
-
-
-GParamSpec, struct in GParamSpec -
-
-
-GParamSpecBoolean, struct in Standard Parameter and Value Types -
-
-
-GParamSpecBoxed, struct in Standard Parameter and Value Types -
-
-
-GParamSpecChar, struct in Standard Parameter and Value Types -
-
-
-GParamSpecClass, struct in GParamSpec -
-
-
-GParamSpecDouble, struct in Standard Parameter and Value Types -
-
-
-GParamSpecEnum, struct in Standard Parameter and Value Types -
-
-
-GParamSpecFlags, struct in Standard Parameter and Value Types -
-
-
-GParamSpecFloat, struct in Standard Parameter and Value Types -
-
-
-GParamSpecGType, struct in Standard Parameter and Value Types -
-
-
-GParamSpecInt, struct in Standard Parameter and Value Types -
-
-
-GParamSpecInt64, struct in Standard Parameter and Value Types -
-
-
-GParamSpecLong, struct in Standard Parameter and Value Types -
-
-
-GParamSpecObject, struct in Standard Parameter and Value Types -
-
-
-GParamSpecOverride, struct in Standard Parameter and Value Types -
-
-
-GParamSpecParam, struct in Standard Parameter and Value Types -
-
-
-GParamSpecPointer, struct in Standard Parameter and Value Types -
-
-
-GParamSpecPool, struct in GParamSpec -
-
-
-GParamSpecString, struct in Standard Parameter and Value Types -
-
-
-GParamSpecTypeInfo, struct in GParamSpec -
-
-
-GParamSpecUChar, struct in Standard Parameter and Value Types -
-
-
-GParamSpecUInt, struct in Standard Parameter and Value Types -
-
-
-GParamSpecUInt64, struct in Standard Parameter and Value Types -
-
-
-GParamSpecULong, struct in Standard Parameter and Value Types -
-
-
-GParamSpecUnichar, struct in Standard Parameter and Value Types -
-
-
-GParamSpecValueArray, struct in Standard Parameter and Value Types -
-
-
-GParamSpecVariant, struct in Standard Parameter and Value Types -
-
-
-G_PARAM_MASK, macro in GParamSpec -
-
-
-G_PARAM_SPEC, macro in GParamSpec -
-
-
-G_PARAM_SPEC_BOOLEAN, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_boolean, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_BOXED, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_boxed, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_CHAR, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_char, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_CLASS, macro in GParamSpec -
-
-
-G_PARAM_SPEC_DOUBLE, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_double, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_ENUM, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_enum, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_FLAGS, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_flags, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_FLOAT, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_float, function in Standard Parameter and Value Types -
-
-
-g_param_spec_get_blurb, function in GParamSpec -
-
-
-G_PARAM_SPEC_GET_CLASS, macro in GParamSpec -
-
-
-g_param_spec_get_default_value, function in GParamSpec -
-
-
-g_param_spec_get_name, function in GParamSpec -
-
-
-g_param_spec_get_name_quark, function in GParamSpec -
-
-
-g_param_spec_get_nick, function in GParamSpec -
-
-
-g_param_spec_get_qdata, function in GParamSpec -
-
-
-g_param_spec_get_redirect_target, function in GParamSpec -
-
-
-G_PARAM_SPEC_GTYPE, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_gtype, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_INT, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_int, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_INT64, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_int64, function in Standard Parameter and Value Types -
-
-
-g_param_spec_internal, function in GParamSpec -
-
-
-G_PARAM_SPEC_LONG, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_long, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_OBJECT, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_object, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_OVERRIDE, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_override, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_PARAM, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_param, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_POINTER, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_pointer, function in Standard Parameter and Value Types -
-
-
-g_param_spec_pool_insert, function in GParamSpec -
-
-
-g_param_spec_pool_list, function in GParamSpec -
-
-
-g_param_spec_pool_list_owned, function in GParamSpec -
-
-
-g_param_spec_pool_lookup, function in GParamSpec -
-
-
-g_param_spec_pool_new, function in GParamSpec -
-
-
-g_param_spec_pool_remove, function in GParamSpec -
-
-
-g_param_spec_ref, function in GParamSpec -
-
-
-g_param_spec_ref_sink, function in GParamSpec -
-
-
-g_param_spec_set_qdata, function in GParamSpec -
-
-
-g_param_spec_set_qdata_full, function in GParamSpec -
-
-
-g_param_spec_sink, function in GParamSpec -
-
-
-g_param_spec_steal_qdata, function in GParamSpec -
-
-
-G_PARAM_SPEC_STRING, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_string, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_TYPE, macro in GParamSpec -
-
-
-G_PARAM_SPEC_TYPE_NAME, macro in GParamSpec -
-
-
-G_PARAM_SPEC_UCHAR, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_uchar, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_UINT, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_uint, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_UINT64, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_uint64, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_ULONG, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_ulong, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_UNICHAR, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_unichar, function in Standard Parameter and Value Types -
-
-
-g_param_spec_unref, function in GParamSpec -
-
-
-G_PARAM_SPEC_VALUE_ARRAY, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_value_array, function in Standard Parameter and Value Types -
-
-
-G_PARAM_SPEC_VALUE_TYPE, macro in GParamSpec -
-
-
-G_PARAM_SPEC_VARIANT, macro in Standard Parameter and Value Types -
-
-
-g_param_spec_variant, function in Standard Parameter and Value Types -
-
-
-G_PARAM_STATIC_STRINGS, macro in GParamSpec -
-
-
-g_param_type_register_static, function in GParamSpec -
-
-
-G_PARAM_USER_SHIFT, macro in GParamSpec -
-
-
-g_param_values_cmp, function in GParamSpec -
-
-
-g_param_value_convert, function in GParamSpec -
-
-
-g_param_value_defaults, function in GParamSpec -
-
-
-g_param_value_set_default, function in GParamSpec -
-
-
-g_param_value_validate, function in GParamSpec -
-
-
-g_pointer_type_register_static, function in Boxed Types -
-
-
-G_PRIVATE_FIELD, macro in Type Information -
-
-
-G_PRIVATE_FIELD_P, macro in Type Information -
-
-
-G_PRIVATE_OFFSET, macro in Type Information -
-
-

S

-
-g_set_object, macro in The Base Object Type -
-
-
-GSignalAccumulator, user_function in Signals -
-
-
-GSignalCMarshaller, typedef in Signals -
-
-
-GSignalCVaMarshaller, typedef in Signals -
-
-
-GSignalEmissionHook, user_function in Signals -
-
-
-GSignalFlags, enum in Signals -
-
-
-GSignalInvocationHint, struct in Signals -
-
-
-GSignalMatchType, enum in Signals -
-
-
-GSignalQuery, struct in Signals -
-
-
-g_signal_accumulator_first_wins, function in Signals -
-
-
-g_signal_accumulator_true_handled, function in Signals -
-
-
-g_signal_add_emission_hook, function in Signals -
-
-
-g_signal_chain_from_overridden, function in Signals -
-
-
-g_signal_chain_from_overridden_handler, function in Signals -
-
-
-g_signal_connect, macro in Signals -
-
-
-g_signal_connect_after, macro in Signals -
-
-
-g_signal_connect_closure, function in Signals -
-
-
-g_signal_connect_closure_by_id, function in Signals -
-
-
-g_signal_connect_data, function in Signals -
-
-
-g_signal_connect_object, function in Signals -
-
-
-g_signal_connect_swapped, macro in Signals -
-
-
-g_signal_emit, function in Signals -
-
-
-g_signal_emitv, function in Signals -
-
-
-g_signal_emit_by_name, function in Signals -
-
-
-g_signal_emit_valist, function in Signals -
-
-
-G_SIGNAL_FLAGS_MASK, macro in Signals -
-
-
-g_signal_get_invocation_hint, function in Signals -
-
-
-g_signal_handlers_block_by_func, macro in Signals -
-
-
-g_signal_handlers_block_matched, function in Signals -
-
-
-g_signal_handlers_disconnect_by_data, macro in Signals -
-
-
-g_signal_handlers_disconnect_by_func, macro in Signals -
-
-
-g_signal_handlers_disconnect_matched, function in Signals -
-
-
-g_signal_handlers_unblock_by_func, macro in Signals -
-
-
-g_signal_handlers_unblock_matched, function in Signals -
-
-
-g_signal_handler_block, function in Signals -
-
-
-g_signal_handler_disconnect, function in Signals -
-
-
-g_signal_handler_find, function in Signals -
-
-
-g_signal_handler_is_connected, function in Signals -
-
-
-g_signal_handler_unblock, function in Signals -
-
-
-g_signal_has_handler_pending, function in Signals -
-
-
-g_signal_list_ids, function in Signals -
-
-
-g_signal_lookup, function in Signals -
-
-
-G_SIGNAL_MATCH_MASK, macro in Signals -
-
-
-g_signal_name, function in Signals -
-
-
-g_signal_new, function in Signals -
-
-
-g_signal_newv, function in Signals -
-
-
-g_signal_new_class_handler, function in Signals -
-
-
-g_signal_new_valist, function in Signals -
-
-
-g_signal_override_class_closure, function in Signals -
-
-
-g_signal_override_class_handler, function in Signals -
-
-
-g_signal_parse_name, function in Signals -
-
-
-g_signal_query, function in Signals -
-
-
-g_signal_remove_emission_hook, function in Signals -
-
-
-g_signal_set_va_marshaller, function in Signals -
-
-
-g_signal_stop_emission, function in Signals -
-
-
-g_signal_stop_emission_by_name, function in Signals -
-
-
-g_signal_type_cclosure_new, function in Signals -
-
-
-G_SIGNAL_TYPE_STATIC_SCOPE, macro in Signals -
-
-
-g_source_set_closure, function in Closures -
-
-
-g_source_set_dummy_callback, function in Closures -
-
-
-g_strdup_value_contents, function in Generic values -
-
-

T

-
-GToggleNotify, user_function in The Base Object Type -
-
-
-GType, typedef in Type Information -
-
-
-GTypeClass, struct in Type Information -
-
-
-GTypeClassCacheFunc, user_function in Type Information -
-
-
-GTypeCValue, union in Varargs Value Collection -
-
-
-GTypeDebugFlags, enum in Type Information -
-
-
-GTypeFlags, enum in Type Information -
-
-
-GTypeFundamentalFlags, enum in Type Information -
-
-
-GTypeFundamentalInfo, struct in Type Information -
-
-
-GTypeInfo, struct in Type Information -
-
-
-GTypeInstance, struct in Type Information -
-
-
-GTypeInterface, struct in Type Information -
-
-
-GTypeInterfaceCheckFunc, user_function in Type Information -
-
-
-GTypeModule, struct in GTypeModule -
-
-
-GTypeModuleClass, struct in GTypeModule -
-
-
-GTypePlugin, struct in GTypePlugin -
-
-
-GTypePluginClass, struct in GTypePlugin -
-
-
-GTypePluginCompleteInterfaceInfo, user_function in GTypePlugin -
-
-
-GTypePluginCompleteTypeInfo, user_function in GTypePlugin -
-
-
-GTypePluginUnuse, user_function in GTypePlugin -
-
-
-GTypePluginUse, user_function in GTypePlugin -
-
-
-GTypeQuery, struct in Type Information -
-
-
-GTypeValueTable, struct in Type Information -
-
-
-g_type_add_class_cache_func, function in Type Information -
-
-
-g_type_add_class_private, function in Type Information -
-
-
-g_type_add_interface_check, function in Type Information -
-
-
-g_type_add_interface_dynamic, function in Type Information -
-
-
-g_type_add_interface_static, function in Type Information -
-
-
-G_TYPE_ARRAY, macro in Boxed Types -
-
-
-G_TYPE_BOOLEAN, macro in Type Information -
-
-
-G_TYPE_BOXED, macro in Type Information -
-
-
-G_TYPE_BYTES, macro in Boxed Types -
-
-
-G_TYPE_BYTE_ARRAY, macro in Boxed Types -
-
-
-G_TYPE_CHAR, macro in Type Information -
-
-
-G_TYPE_CHECKSUM, macro in Type Information -
-
-
-G_TYPE_CHECK_CLASS_CAST, macro in Type Information -
-
-
-G_TYPE_CHECK_CLASS_TYPE, macro in Type Information -
-
-
-G_TYPE_CHECK_INSTANCE, macro in Type Information -
-
-
-G_TYPE_CHECK_INSTANCE_CAST, macro in Type Information -
-
-
-G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE, macro in Type Information -
-
-
-G_TYPE_CHECK_INSTANCE_TYPE, macro in Type Information -
-
-
-G_TYPE_CHECK_VALUE, macro in Type Information -
-
-
-G_TYPE_CHECK_VALUE_TYPE, macro in Type Information -
-
-
-g_type_children, function in Type Information -
-
-
-g_type_class_add_private, function in Type Information -
-
-
-G_TYPE_CLASS_GET_PRIVATE, macro in Type Information -
-
-
-g_type_class_peek, function in Type Information -
-
-
-g_type_class_peek_parent, function in Type Information -
-
-
-g_type_class_peek_static, function in Type Information -
-
-
-g_type_class_ref, function in Type Information -
-
-
-g_type_class_unref, function in Type Information -
-
-
-g_type_class_unref_uncached, function in Type Information -
-
-
-G_TYPE_CLOSURE, macro in Closures -
-
-
-g_type_create_instance, function in Type Information -
-
-
-G_TYPE_DATE, macro in Boxed Types -
-
-
-G_TYPE_DATE_TIME, macro in Boxed Types -
-
-
-g_type_default_interface_peek, function in Type Information -
-
-
-g_type_default_interface_ref, function in Type Information -
-
-
-g_type_default_interface_unref, function in Type Information -
-
-
-g_type_depth, function in Type Information -
-
-
-G_TYPE_DOUBLE, macro in Type Information -
-
-
-g_type_ensure, function in Type Information -
-
-
-G_TYPE_ENUM, macro in Type Information -
-
-
-G_TYPE_ERROR, macro in Boxed Types -
-
-
-G_TYPE_FLAGS, macro in Type Information -
-
-
-G_TYPE_FLAG_RESERVED_ID_BIT, macro in Type Information -
-
-
-G_TYPE_FLOAT, macro in Type Information -
-
-
-g_type_free_instance, function in Type Information -
-
-
-G_TYPE_FROM_CLASS, macro in Type Information -
-
-
-G_TYPE_FROM_INSTANCE, macro in Type Information -
-
-
-G_TYPE_FROM_INTERFACE, macro in Type Information -
-
-
-g_type_from_name, function in Type Information -
-
-
-G_TYPE_FUNDAMENTAL, macro in Type Information -
-
-
-g_type_fundamental, function in Type Information -
-
-
-G_TYPE_FUNDAMENTAL_MAX, macro in Type Information -
-
-
-g_type_fundamental_next, function in Type Information -
-
-
-g_type_get_instance_count, function in Type Information -
-
-
-g_type_get_plugin, function in Type Information -
-
-
-g_type_get_qdata, function in Type Information -
-
-
-g_type_get_type_registration_serial, function in Type Information -
-
-
-G_TYPE_GSTRING, macro in Boxed Types -
-
-
-G_TYPE_GTYPE, macro in Type Information -
-
-
-G_TYPE_HASH_TABLE, macro in Boxed Types -
-
-
-G_TYPE_HAS_VALUE_TABLE, macro in Type Information -
-
-
-g_type_init, function in Type Information -
-
-
-G_TYPE_INITIALLY_UNOWNED, macro in The Base Object Type -
-
-
-g_type_init_with_debug_flags, function in Type Information -
-
-
-G_TYPE_INSTANCE_GET_CLASS, macro in Type Information -
-
-
-G_TYPE_INSTANCE_GET_INTERFACE, macro in Type Information -
-
-
-G_TYPE_INSTANCE_GET_PRIVATE, macro in Type Information -
-
-
-G_TYPE_INT, macro in Type Information -
-
-
-G_TYPE_INT64, macro in Type Information -
-
-
-G_TYPE_INTERFACE, macro in Type Information -
-
-
-g_type_interfaces, function in Type Information -
-
-
-g_type_interface_add_prerequisite, function in Type Information -
-
-
-g_type_interface_get_plugin, function in Type Information -
-
-
-g_type_interface_peek, function in Type Information -
-
-
-g_type_interface_peek_parent, function in Type Information -
-
-
-g_type_interface_prerequisites, function in Type Information -
-
-
-G_TYPE_INVALID, macro in Type Information -
-
-
-G_TYPE_IO_CHANNEL, macro in Boxed Types -
-
-
-G_TYPE_IO_CONDITION, macro in Boxed Types -
-
-
-g_type_is_a, function in Type Information -
-
-
-G_TYPE_IS_ABSTRACT, macro in Type Information -
-
-
-G_TYPE_IS_CLASSED, macro in Type Information -
-
-
-G_TYPE_IS_DEEP_DERIVABLE, macro in Type Information -
-
-
-G_TYPE_IS_DERIVABLE, macro in Type Information -
-
-
-G_TYPE_IS_DERIVED, macro in Type Information -
-
-
-G_TYPE_IS_ENUM, macro in Enumeration and Flag Types -
-
-
-G_TYPE_IS_FLAGS, macro in Enumeration and Flag Types -
-
-
-G_TYPE_IS_FUNDAMENTAL, macro in Type Information -
-
-
-G_TYPE_IS_INSTANTIATABLE, macro in Type Information -
-
-
-G_TYPE_IS_INTERFACE, macro in Type Information -
-
-
-G_TYPE_IS_OBJECT, macro in The Base Object Type -
-
-
-G_TYPE_IS_PARAM, macro in GParamSpec -
-
-
-G_TYPE_IS_VALUE, macro in Generic values -
-
-
-G_TYPE_IS_VALUE_ABSTRACT, macro in Generic values -
-
-
-G_TYPE_IS_VALUE_TYPE, macro in Type Information -
-
-
-G_TYPE_KEY_FILE, macro in Boxed Types -
-
-
-G_TYPE_LONG, macro in Type Information -
-
-
-G_TYPE_MAIN_CONTEXT, macro in Boxed Types -
-
-
-G_TYPE_MAIN_LOOP, macro in Boxed Types -
-
-
-G_TYPE_MAKE_FUNDAMENTAL, macro in Type Information -
-
-
-G_TYPE_MAPPED_FILE, macro in Boxed Types -
-
-
-G_TYPE_MARKUP_PARSE_CONTEXT, macro in Boxed Types -
-
-
-G_TYPE_MATCH_INFO, macro in Boxed Types -
-
-
-g_type_module_add_interface, function in GTypeModule -
-
-
-g_type_module_register_enum, function in GTypeModule -
-
-
-g_type_module_register_flags, function in GTypeModule -
-
-
-g_type_module_register_type, function in GTypeModule -
-
-
-g_type_module_set_name, function in GTypeModule -
-
-
-g_type_module_unuse, function in GTypeModule -
-
-
-g_type_module_use, function in GTypeModule -
-
-
-g_type_name, function in Type Information -
-
-
-g_type_next_base, function in Type Information -
-
-
-G_TYPE_NONE, macro in Type Information -
-
-
-G_TYPE_OBJECT, macro in Type Information -
-
-
-G_TYPE_OPTION_GROUP, macro in Boxed Types -
-
-
-G_TYPE_PARAM, macro in Type Information -
-
-
-G_TYPE_PARAM_BOOLEAN, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_BOXED, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_CHAR, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_DOUBLE, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_ENUM, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_FLAGS, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_FLOAT, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_GTYPE, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_INT, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_INT64, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_LONG, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_OBJECT, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_OVERRIDE, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_PARAM, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_POINTER, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_STRING, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_UCHAR, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_UINT, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_UINT64, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_ULONG, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_UNICHAR, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_VALUE_ARRAY, macro in Standard Parameter and Value Types -
-
-
-G_TYPE_PARAM_VARIANT, macro in Standard Parameter and Value Types -
-
-
-g_type_parent, function in Type Information -
-
-
-g_type_plugin_complete_interface_info, function in GTypePlugin -
-
-
-g_type_plugin_complete_type_info, function in GTypePlugin -
-
-
-g_type_plugin_unuse, function in GTypePlugin -
-
-
-g_type_plugin_use, function in GTypePlugin -
-
-
-G_TYPE_POINTER, macro in Type Information -
-
-
-G_TYPE_POLLFD, macro in Boxed Types -
-
-
-G_TYPE_PTR_ARRAY, macro in Boxed Types -
-
-
-g_type_qname, function in Type Information -
-
-
-g_type_query, function in Type Information -
-
-
-G_TYPE_REGEX, macro in Boxed Types -
-
-
-g_type_register_dynamic, function in Type Information -
-
-
-g_type_register_fundamental, function in Type Information -
-
-
-g_type_register_static, function in Type Information -
-
-
-g_type_register_static_simple, function in Type Information -
-
-
-g_type_remove_class_cache_func, function in Type Information -
-
-
-g_type_remove_interface_check, function in Type Information -
-
-
-G_TYPE_RESERVED_BSE_FIRST, macro in Type Information -
-
-
-G_TYPE_RESERVED_BSE_LAST, macro in Type Information -
-
-
-G_TYPE_RESERVED_GLIB_FIRST, macro in Type Information -
-
-
-G_TYPE_RESERVED_GLIB_LAST, macro in Type Information -
-
-
-G_TYPE_RESERVED_USER_FIRST, macro in Type Information -
-
-
-g_type_set_qdata, function in Type Information -
-
-
-G_TYPE_SOURCE, macro in Boxed Types -
-
-
-G_TYPE_STRING, macro in Type Information -
-
-
-G_TYPE_STRV, macro in Boxed Types -
-
-
-G_TYPE_THREAD, macro in Boxed Types -
-
-
-G_TYPE_TIME_ZONE, macro in Boxed Types -
-
-
-G_TYPE_UCHAR, macro in Type Information -
-
-
-G_TYPE_UINT, macro in Type Information -
-
-
-G_TYPE_UINT64, macro in Type Information -
-
-
-G_TYPE_ULONG, macro in Type Information -
-
-
-G_TYPE_VALUE, macro in Generic values -
-
-
-G_TYPE_VALUE_ARRAY, macro in Generic values -
-
-
-g_type_value_table_peek, function in Type Information -
-
-
-G_TYPE_VARIANT, macro in Type Information -
-
-
-G_TYPE_VARIANT_BUILDER, macro in Boxed Types -
-
-
-G_TYPE_VARIANT_DICT, macro in Boxed Types -
-
-
-G_TYPE_VARIANT_TYPE, macro in Boxed Types -
-
-

V

-
-GVaClosureMarshal, user_function in Closures -
-
-
-GValue, struct in Generic values -
-
-
-GValueArray, struct in Value arrays -
-
-
-GValueTransform, user_function in Generic values -
-
-
-g_value_array_append, function in Value arrays -
-
-
-g_value_array_copy, function in Value arrays -
-
-
-g_value_array_free, function in Value arrays -
-
-
-g_value_array_get_nth, function in Value arrays -
-
-
-g_value_array_insert, function in Value arrays -
-
-
-g_value_array_new, function in Value arrays -
-
-
-g_value_array_prepend, function in Value arrays -
-
-
-g_value_array_remove, function in Value arrays -
-
-
-g_value_array_sort, function in Value arrays -
-
-
-g_value_array_sort_with_data, function in Value arrays -
-
-
-G_VALUE_COLLECT, macro in Varargs Value Collection -
-
-
-G_VALUE_COLLECT_FORMAT_MAX_LENGTH, macro in Varargs Value Collection -
-
-
-G_VALUE_COLLECT_INIT, macro in Varargs Value Collection -
-
-
-G_VALUE_COLLECT_SKIP, macro in Varargs Value Collection -
-
-
-g_value_copy, function in Generic values -
-
-
-g_value_dup_boxed, function in Standard Parameter and Value Types -
-
-
-g_value_dup_object, function in Standard Parameter and Value Types -
-
-
-g_value_dup_param, function in Standard Parameter and Value Types -
-
-
-g_value_dup_string, function in Standard Parameter and Value Types -
-
-
-g_value_dup_variant, function in Standard Parameter and Value Types -
-
-
-g_value_fits_pointer, function in Generic values -
-
-
-g_value_get_boolean, function in Standard Parameter and Value Types -
-
-
-g_value_get_boxed, function in Standard Parameter and Value Types -
-
-
-g_value_get_char, function in Standard Parameter and Value Types -
-
-
-g_value_get_double, function in Standard Parameter and Value Types -
-
-
-g_value_get_enum, function in Standard Parameter and Value Types -
-
-
-g_value_get_flags, function in Standard Parameter and Value Types -
-
-
-g_value_get_float, function in Standard Parameter and Value Types -
-
-
-g_value_get_gtype, function in Standard Parameter and Value Types -
-
-
-g_value_get_int, function in Standard Parameter and Value Types -
-
-
-g_value_get_int64, function in Standard Parameter and Value Types -
-
-
-g_value_get_long, function in Standard Parameter and Value Types -
-
-
-g_value_get_object, function in Standard Parameter and Value Types -
-
-
-g_value_get_param, function in Standard Parameter and Value Types -
-
-
-g_value_get_pointer, function in Standard Parameter and Value Types -
-
-
-g_value_get_schar, function in Standard Parameter and Value Types -
-
-
-g_value_get_string, function in Standard Parameter and Value Types -
-
-
-g_value_get_uchar, function in Standard Parameter and Value Types -
-
-
-g_value_get_uint, function in Standard Parameter and Value Types -
-
-
-g_value_get_uint64, function in Standard Parameter and Value Types -
-
-
-g_value_get_ulong, function in Standard Parameter and Value Types -
-
-
-g_value_get_variant, function in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS, macro in Generic values -
-
-
-G_VALUE_HOLDS_BOOLEAN, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_BOXED, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_CHAR, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_DOUBLE, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_ENUM, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_FLAGS, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_FLOAT, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_GTYPE, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_INT, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_INT64, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_LONG, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_OBJECT, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_PARAM, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_POINTER, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_STRING, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_UCHAR, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_UINT, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_UINT64, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_ULONG, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_HOLDS_VARIANT, macro in Standard Parameter and Value Types -
-
-
-G_VALUE_INIT, macro in Generic values -
-
-
-g_value_init, function in Generic values -
-
-
-g_value_init_from_instance, function in Generic values -
-
-
-G_VALUE_LCOPY, macro in Varargs Value Collection -
-
-
-g_value_peek_pointer, function in Generic values -
-
-
-g_value_register_transform_func, function in Generic values -
-
-
-g_value_reset, function in Generic values -
-
-
-g_value_set_boolean, function in Standard Parameter and Value Types -
-
-
-g_value_set_boxed, function in Standard Parameter and Value Types -
-
-
-g_value_set_boxed_take_ownership, function in Standard Parameter and Value Types -
-
-
-g_value_set_char, function in Standard Parameter and Value Types -
-
-
-g_value_set_double, function in Standard Parameter and Value Types -
-
-
-g_value_set_enum, function in Standard Parameter and Value Types -
-
-
-g_value_set_flags, function in Standard Parameter and Value Types -
-
-
-g_value_set_float, function in Standard Parameter and Value Types -
-
-
-g_value_set_gtype, function in Standard Parameter and Value Types -
-
-
-g_value_set_instance, function in Standard Parameter and Value Types -
-
-
-g_value_set_int, function in Standard Parameter and Value Types -
-
-
-g_value_set_int64, function in Standard Parameter and Value Types -
-
-
-g_value_set_long, function in Standard Parameter and Value Types -
-
-
-g_value_set_object, function in Standard Parameter and Value Types -
-
-
-g_value_set_object_take_ownership, function in Standard Parameter and Value Types -
-
-
-g_value_set_param, function in Standard Parameter and Value Types -
-
-
-g_value_set_param_take_ownership, function in Standard Parameter and Value Types -
-
-
-g_value_set_pointer, function in Standard Parameter and Value Types -
-
-
-g_value_set_schar, function in Standard Parameter and Value Types -
-
-
-g_value_set_static_boxed, function in Standard Parameter and Value Types -
-
-
-g_value_set_static_string, function in Standard Parameter and Value Types -
-
-
-g_value_set_string, function in Standard Parameter and Value Types -
-
-
-g_value_set_string_take_ownership, function in Standard Parameter and Value Types -
-
-
-g_value_set_uchar, function in Standard Parameter and Value Types -
-
-
-g_value_set_uint, function in Standard Parameter and Value Types -
-
-
-g_value_set_uint64, function in Standard Parameter and Value Types -
-
-
-g_value_set_ulong, function in Standard Parameter and Value Types -
-
-
-g_value_set_variant, function in Standard Parameter and Value Types -
-
-
-g_value_take_boxed, function in Standard Parameter and Value Types -
-
-
-g_value_take_object, function in Standard Parameter and Value Types -
-
-
-g_value_take_param, function in Standard Parameter and Value Types -
-
-
-g_value_take_string, function in Standard Parameter and Value Types -
-
-
-g_value_take_variant, function in Standard Parameter and Value Types -
-
-
-g_value_transform, function in Generic values -
-
-
-G_VALUE_TYPE, macro in Generic values -
-
-
-g_value_type_compatible, function in Generic values -
-
-
-G_VALUE_TYPE_NAME, macro in Generic values -
-
-
-g_value_type_transformable, function in Generic values -
-
-
-g_value_unset, function in Generic values -
-
-

W

-
-GWeakNotify, user_function in The Base Object Type -
-
-
-GWeakRef, struct in The Base Object Type -
-
-
-g_weak_ref_clear, function in The Base Object Type -
-
-
-g_weak_ref_get, function in The Base Object Type -
-
-
-g_weak_ref_init, function in The Base Object Type -
-
-
-g_weak_ref_set, function in The Base Object Type -
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/ch01s02.html b/docs/reference/gobject/html/ch01s02.html deleted file mode 100644 index e24f7aad4..000000000 --- a/docs/reference/gobject/html/ch01s02.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - -Exporting a C API: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Exporting a C API

-

- C APIs are defined by a set of functions and global variables which are usually exported from a - binary. C functions have an arbitrary number of arguments and one return value. Each function is thus - uniquely identified by the function name and the set of C types which describe the function arguments - and return value. The global variables exported by the API are similarly identified by their name and - their type. -

-

- A C API is thus merely defined by a set of names to which a set of types are associated. If you know the - function calling convention and the mapping of the C types to the machine types used by the platform you - are on, you can resolve the name of each function to find where the code associated to this function - is located in memory, and then construct a valid argument list for the function. Finally, all you have to - do is trigger a call to the target C function with the argument list. -

-

- For the sake of discussion, here is a sample C function and the associated 32 bit x86 - assembly code generated by GCC on a Linux computer: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
static void
-function_foo (int foo)
-{
-}
-
-int
-main (int   argc,
-      char *argv[])
-{
-	function_foo (10);
-
-	return 0;
-}
-
-push   $0xa
-call   0x80482f4 <function_foo>
-
- -

- The assembly code shown above is pretty straightforward: the first instruction pushes - the hexadecimal value 0xa (decimal value 10) as a 32-bit integer on the stack and calls - function_foo. As you can see, C function calls are implemented by - GCC as native function calls (this is probably the fastest implementation possible). -

-

- Now, let's say we want to call the C function function_foo from - a Python program. To do this, the Python interpreter needs to: -

-
    -
  • Find where the function is located. This probably means finding the binary generated by the C compiler - which exports this function.

  • -
  • Load the code of the function in executable memory.

  • -
  • Convert the Python parameters to C-compatible parameters before calling - the function.

  • -
  • Call the function with the right calling convention.

  • -
  • Convert the return values of the C function to Python-compatible - variables to return them to the Python code.

  • -
-

-

-

- The process described above is pretty complex and there are a lot of ways to make it entirely automatic - and transparent to C and Python programmers: -

-
    -
  • The first solution is to write by hand a lot of glue code, once for each function exported or imported, - which does the Python-to-C parameter conversion and the C-to-Python return value conversion. This glue code is then - linked with the interpreter which allows Python programs to call Python functions which delegate work to - C functions.

  • -
  • Another, nicer solution is to automatically generate the glue code, once for each function exported or - imported, with a special compiler which - reads the original function signature.

  • -
  • The solution used by GLib is to use the GType library which holds at runtime a description of - all the objects manipulated by the programmer. This so-called dynamic type - [1] - library is then used by special generic glue code to automatically convert function parameters and - function calling conventions between different runtime domains.

  • -
-

- The greatest advantage of the solution implemented by GType is that the glue code sitting at the runtime domain - boundaries is written once: the figure below states this more clearly. -

-
-

Figure 1. 

-
-
-


- - Currently, there exist at least Python and Perl generic glue code which makes it possible to use - C objects written with GType directly in Python or Perl, with a minimum amount of work: there - is no need to generate huge amounts of glue code either automatically or by hand. -

-

- Although that goal was arguably laudable, its pursuit has had a major influence on - the whole GType/GObject library. C programmers are likely to be puzzled at the complexity - of the features exposed in the following chapters if they forget that the GType/GObject library - was not only designed to offer OO-like features to C programmers but also transparent - cross-language interoperability. -

-
-

-

[1] - There are numerous different implementations of dynamic type systems: all C++ - compilers have one, Java and .NET have one too. A dynamic type system allows you - to get information about every instantiated object at runtime. It can be implemented - by a process-specific database: every new object created registers the characteristics - of its associated type in the type system. It can also be implemented by introspection - interfaces. The common point between all these different type systems and implementations - is that they all allow you to query for object metadata at runtime. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/chapter-gobject.html b/docs/reference/gobject/html/chapter-gobject.html deleted file mode 100644 index 8666eea20..000000000 --- a/docs/reference/gobject/html/chapter-gobject.html +++ /dev/null @@ -1,321 +0,0 @@ - - - - -The GObject base class: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-The GObject base class

- -

- The previous chapter discussed the details of GLib's Dynamic Type System. - The GObject library also contains an implementation for a base fundamental - type named GObject. -

-

- GObject is a fundamental classed instantiable type. It implements: -

-
    -
  • Memory management with reference counting

  • -
  • Construction/Destruction of instances

  • -
  • Generic per-object properties with set/get function pairs

  • -
  • Easy use of signals

  • -
-

- All the GNOME libraries which use the GLib type system (like GTK+ and GStreamer) - inherit from GObject which is why it is important to understand - the details of how it works. -

-
-

-Object instantiation

-

- The g_object_new - family of functions can be used to instantiate any GType which inherits - from the GObject base type. All these functions make sure the class and - instance structures have been correctly initialized by GLib's type system - and then invoke at one point or another the constructor class method - which is used to: -

-
    -
  • - Allocate and clear memory through g_type_create_instance, -

  • -
  • - Initialize the object's instance with the construction properties. -

  • -
-

- Although one can expect all class and instance members (except the fields - pointing to the parents) to be set to zero, some consider it good practice - to explicitly set them. -

-

- Once all construction operations have been completed and constructor - properties set, the constructed class method is called. -

-

- Objects which inherit from GObject are allowed to override this - constructed class method. - The example below shows how ViewerFile overrides the parent's construction process: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
#define VIEWER_TYPE_FILE viewer_file_get_type ()
-G_DECLARE_FINAL_TYPE (ViewerFile, viewer_file, VIEWER, FILE, GObject)
-
-struct _ViewerFile
-{
-  GObject parent_instance;
-
-  /* instance members */
-};
-
-/* will create viewer_file_get_type and set viewer_file_parent_class */
-G_DEFINE_TYPE (ViewerFile, viewer_file, G_TYPE_OBJECT)
-
-static void
-viewer_file_constructed (GObject *obj)
-{
-  /* update the object state depending on constructor properties */
-
-  /* Always chain up to the parent constructed function to complete object
-   * initialisation. */
-  G_OBJECT_CLASS (viewer_file_parent_class)->constructed (obj);
-}
-
-static void
-viewer_file_class_init (ViewerFileClass *klass)
-{
-  GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
-  object_class->constructed = viewer_file_constructed;
-}
-
-static void
-viewer_file_init (ViewerFile *self)
-{
-  /* initialize the object */
-}
-
- -

- If the user instantiates an object ViewerFile with: -

-
- - - - - - - -
1
ViewerFile *file = g_object_new (VIEWER_TYPE_FILE, NULL);
-
- -

- If this is the first instantiation of such an object, the - viewer_file_class_init function will be invoked - after any viewer_file_base_class_init function. - This will make sure the class structure of this new object is - correctly initialized. Here, viewer_file_class_init - is expected to override the object's class methods and setup the - class' own methods. In the example above, the constructor method is - the only overridden method: it is set to - viewer_file_constructor. -

-

- Once g_object_new has obtained a reference to an initialized - class structure, it invokes its constructor method to create an instance of the new - object, if the constructor has been overridden in viewer_file_class_init. - Overridden constructors must chain up to their parent’s constructor. In - order to find the parent class and chain up to the parent class - constructor, we can use the viewer_file_parent_class - pointer that has been set up for us by the - G_DEFINE_TYPE - macro. -

-

- Finally, at one point or another, g_object_constructor is invoked - by the last constructor in the chain. This function allocates the object's instance buffer - through g_type_create_instance - which means that the instance_init function is invoked at this point if one - was registered. After instance_init returns, the object is fully initialized and should be - ready to have its methods called by the user. When - g_type_create_instance - returns, g_object_constructor sets the construction properties - (i.e. the properties which were given to g_object_new) and returns - to the user's constructor. -

-

- The process described above might seem a bit complicated, but it can be - summarized easily by the table below which lists the functions invoked - by g_object_new - and their order of invocation: -

-

-

-
-

Table 4. g_object_new

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Invocation timeFunction invokedFunction's parametersRemark
First call to g_object_new for target typetarget type's base_init functionOn the inheritance tree of classes from fundamental type to target type. - base_init is invoked once for each class structure.Never used in practice. Unlikely you will need it.
target type's class_init functionOn target type's class structure - Here, you should make sure to initialize or override class methods (that is, - assign to each class' method its function pointer) and create the signals and - the properties associated to your object. -
interface's base_init functionOn interface's vtable 
interface's interface_init functionOn interface's vtable 
Each call to g_object_new for target typetarget type's class constructor method: GObjectClass->constructor -On object's instance - If you need to handle construct properties in a custom way, or implement a singleton class, override the constructor - method and make sure to chain up to the object's - parent class before doing your own initialization. - In doubt, do not override the constructor method. -
type's instance_init functionOn the inheritance tree of classes from fundamental type to target type. - the instance_init provided for each type is invoked once for each instance - structure. - Provide an instance_init function to initialize your object before its construction - properties are set. This is the preferred way to initialize a GObject instance. - This function is equivalent to C++ constructors. -
target type's class constructed method: GObjectClass->constructed -On object's instance - If you need to perform object initialization steps after all construct properties have been set. - This is the final step in the object initialization process, and is only called if the constructor - method returned a new object instance (rather than, for example, an existing singleton). -
-
-


-

-

- Readers should feel concerned about one little twist in the order in - which functions are invoked: while, technically, the class' constructor - method is called before the GType's instance_init - function (since g_type_create_instance which calls instance_init is called by - g_object_constructor which is the top-level class - constructor method and to which users are expected to chain to), the - user's code which runs in a user-provided constructor will always - run after GType's instance_init function since the - user-provided constructor must (you've been warned) - chain up before doing anything useful. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/chapter-gtype.html b/docs/reference/gobject/html/chapter-gtype.html deleted file mode 100644 index b3e9ab892..000000000 --- a/docs/reference/gobject/html/chapter-gtype.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - -The GLib Dynamic Type System: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-The GLib Dynamic Type System

- -

- A type, as manipulated by the GLib type system, is much more generic than what - is usually understood as an Object type. It is best explained by looking at the - structure and the functions used to register new types in the type system. -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
typedef struct _GTypeInfo               GTypeInfo;
-struct _GTypeInfo
-{
-  /* interface types, classed types, instantiated types */
-  guint16                class_size;
-  
-  GBaseInitFunc          base_init;
-  GBaseFinalizeFunc      base_finalize;
-  
-  /* classed types, instantiated types */
-  GClassInitFunc         class_init;
-  GClassFinalizeFunc     class_finalize;
-  gconstpointer          class_data;
-  
-  /* instantiated types */
-  guint16                instance_size;
-  guint16                n_preallocs;
-  GInstanceInitFunc      instance_init;
-  
-  /* value handling */
-  const GTypeValueTable *value_table;
-};
-GType g_type_register_static (GType             parent_type,
-                              const gchar      *type_name,
-                              const GTypeInfo  *info,
-                              GTypeFlags        flags);
-GType g_type_register_fundamental (GType                       type_id,
-                                   const gchar                *type_name,
-                                   const GTypeInfo            *info,
-                                   const GTypeFundamentalInfo *finfo,
-                                   GTypeFlags                  flags);
-
- -

-

-

- g_type_register_static, - g_type_register_dynamic and - g_type_register_fundamental - are the C functions, defined in - gtype.h and implemented in gtype.c - which you should use to register a new GType in the program's type system. - It is not likely you will ever need to use - g_type_register_fundamental - but in case you want to, the last chapter explains how to create - new fundamental types. -

-

- Fundamental types are top-level types which do not derive from any other type - while other non-fundamental types derive from other types. - Upon initialization, the type system not only initializes its - internal data structures but it also registers a number of core - types: some of these are fundamental types. Others are types derived from these - fundamental types. -

-

- Fundamental and non-fundamental types are defined by: -

-
    -
  • - class size: the class_size field in GTypeInfo. -

  • -
  • - class initialization functions (C++ constructor): the base_init and - class_init fields in GTypeInfo. -

  • -
  • - class destruction functions (C++ destructor): the base_finalize and - class_finalize fields in GTypeInfo. -

  • -
  • - instance size (C++ parameter to new): the instance_size field in - GTypeInfo. -

  • -
  • - instantiation policy (C++ type of new operator): the n_preallocs - field in GTypeInfo. -

  • -
  • - copy functions (C++ copy operators): the value_table field in - GTypeInfo. -

  • -
  • - type characteristic flags: GTypeFlags. -

  • -
-

- Fundamental types are also defined by a set of GTypeFundamentalFlags - which are stored in a GTypeFundamentalInfo. - Non-fundamental types are furthermore defined by the type of their parent which is - passed as the parent_type parameter to g_type_register_static - and g_type_register_dynamic. -

-
-

-Copy functions

-

- The major common point between all GLib types (fundamental and - non-fundamental, classed and non-classed, instantiable and non-instantiable) is that - they can all be manipulated through a single API to copy/assign them. -

-

- The GValue structure is used as an abstract container for all of these - types. Its simplistic API (defined in gobject/gvalue.h) can be - used to invoke the value_table functions registered - during type registration: for example g_value_copy copies the - content of a GValue to another GValue. This is similar - to a C++ assignment which invokes the C++ copy operator to modify the default - bit-by-bit copy semantics of C++/C structures/classes. -

-

- The following code shows how you can copy around a 64 bit integer, as well as a GObject - instance pointer: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
static void test_int (void)
-{
-  GValue a_value = G_VALUE_INIT;
-  GValue b_value = G_VALUE_INIT;
-  guint64 a, b;
-
-  a = 0xdeadbeef;
-
-  g_value_init (&a_value, G_TYPE_UINT64);
-  g_value_set_uint64 (&a_value, a);
-
-  g_value_init (&b_value, G_TYPE_UINT64);
-  g_value_copy (&a_value, &b_value);
-
-  b = g_value_get_uint64 (&b_value);
-
-  if (a == b) {
-    g_print ("Yay !! 10 lines of code to copy around a uint64.\n");
-  } else {
-    g_print ("Are you sure this is not a Z80 ?\n");
-  }
-}
-
-static void test_object (void)
-{
-  GObject *obj;
-  GValue obj_vala = G_VALUE_INIT;
-  GValue obj_valb = G_VALUE_INIT;
-  obj = g_object_new (VIEWER_TYPE_FILE, NULL);
-
-  g_value_init (&obj_vala, VIEWER_TYPE_FILE);
-  g_value_set_object (&obj_vala, obj);
-
-  g_value_init (&obj_valb, G_TYPE_OBJECT);
-
-  /* g_value_copy's semantics for G_TYPE_OBJECT types is to copy the reference.
-   * This function thus calls g_object_ref.
-   * It is interesting to note that the assignment works here because
-   * VIEWER_TYPE_FILE is a G_TYPE_OBJECT.
-   */
-  g_value_copy (&obj_vala, &obj_valb);
-
-  g_object_unref (G_OBJECT (obj));
-  g_object_unref (G_OBJECT (obj));
-}
-
- -

- The important point about the above code is that the exact semantics of the copy calls - is undefined since they depend on the implementation of the copy function. Certain - copy functions might decide to allocate a new chunk of memory and then to copy the - data from the source to the destination. Others might want to simply increment - the reference count of the instance and copy the reference to the new GValue. -

-

- The value table used to specify these assignment functions is - documented in - GTypeValueTable. -

-

- Interestingly, it is also very unlikely - you will ever need to specify a value_table during type registration - because these value_tables are inherited from the parent types for - non-fundamental types. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/chapter-intro.html b/docs/reference/gobject/html/chapter-intro.html deleted file mode 100644 index e7dbcb189..000000000 --- a/docs/reference/gobject/html/chapter-intro.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - -Background: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Background

- -

- GObject, and its lower-level type system, GType, are used by GTK+ and most GNOME libraries to - provide: -

-
    -
  • object-oriented C-based APIs and

  • -
  • automatic transparent API bindings to other compiled - or interpreted languages.

  • -
-

-

-

- A lot of programmers are used to working with compiled-only or dynamically interpreted-only - languages and do not understand the challenges associated with cross-language interoperability. - This introduction tries to provide an insight into these challenges and briefly describes - the solution chosen by GLib. -

-

- The following chapters go into greater detail into how GType and GObject work and - how you can use them as a C programmer. It is useful to keep in mind that - allowing access to C objects from other interpreted languages was one of the major design - goals: this can often explain the sometimes rather convoluted APIs and features present - in this library. -

-
-

-Data types and programming

-

- One could say - that a programming language is merely a way to create data types and manipulate them. Most languages - provide a number of language-native types and a few primitives to create more complex types based - on these primitive types. -

-

- In C, the language provides types such as char, long, - pointer. During compilation of C code, the compiler maps these - language types to the compiler's target architecture machine types. If you are using a C interpreter - (assuming one exists), the interpreter (the program which interprets - the source code and executes it) maps the language types to the machine types of the target machine at - runtime, during the program execution (or just before execution if it uses a Just In Time compiler engine). -

-

- Perl and Python are interpreted languages which do not really provide type definitions similar - to those used by C. Perl and Python programmers manipulate variables and the type of the variables - is decided only upon the first assignment or upon the first use which forces a type on the variable. - The interpreter also often provides a lot of automatic conversions from one type to the other. For example, - in Perl, a variable which holds an integer can be automatically converted to a string given the - required context: -

-
- - - - - - - -
1
-2
my $tmp = 10;
-print "this is an integer converted to a string:" . $tmp . "\n";
-
- -

- Of course, it is also often possible to explicitly specify conversions when the default conversions provided - by the language are not intuitive. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/chapter-signal.html b/docs/reference/gobject/html/chapter-signal.html deleted file mode 100644 index 286de7366..000000000 --- a/docs/reference/gobject/html/chapter-signal.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - -The GObject messaging system: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-The GObject messaging system

- -
-

-Closures

-

- Closures are central to the concept of asynchronous signal delivery - which is widely used throughout GTK+ and GNOME applications. A closure is an - abstraction, a generic representation of a callback. It is a small structure - which contains three objects: -

-
    -
  • -

    a function pointer (the callback itself) whose prototype looks like: -

    -
    - - - - - - - -
    1
    return_type function_callback (, gpointer user_data);
    -
    - -

    -

    -
  • -
  • - the user_data pointer which is passed to the callback upon invocation of the closure -

  • -
  • - a function pointer which represents the destructor of the closure: whenever the - closure's refcount reaches zero, this function will be called before the closure - structure is freed. -

  • -
-

-

-

- The GClosure structure represents the common functionality of all - closure implementations: there exists a different closure implementation for - each separate runtime which wants to use the GObject type system. - [4] - The GObject library provides a simple GCClosure type which - is a specific implementation of closures to be used with C/C++ callbacks. -

-

- A GClosure provides simple services: -

-
-

-

-
-

-C Closures

-

- If you are using C or C++ - to connect a callback to a given event, you will either use simple GCClosures - which have a pretty minimal API or the even simpler g_signal_connect - functions (which will be presented a bit later). -

-

- g_cclosure_new will create a new closure which can invoke the - user-provided callback_func with the user-provided - user_data as its last parameter. When the closure - is finalized (second stage of the destruction process), it will invoke - the destroy_data function if the user has - supplied one. -

-

- g_cclosure_new_swap will create a new closure which can invoke the - user-provided callback_func with the - user-provided user_data as its first parameter - (instead of being the - last parameter as with g_cclosure_new). When the closure - is finalized (second stage of the destruction process), it will invoke - the destroy_data function if the user has - supplied one. -

-
-
-

-Non-C closures (for the fearless)

-

- As was explained above, closures hide the details of callback invocation. In C, - callback invocation is just like function invocation: it is a matter of creating - the correct stack frame for the called function and executing a call - assembly instruction. -

-

- C closure marshallers transform the array of GValues which represent - the parameters to the target function into a C-style function parameter list, invoke - the user-supplied C function with this new parameter list, get the return value of the - function, transform it into a GValue and return this GValue to the marshaller caller. -

-

- A generic C closure marshaller is available as - g_cclosure_marshal_generic - which implements marshalling for all function types using libffi. Custom - marshallers for different types are not needed apart from performance - critical code where the libffi-based marshaller may be too slow. -

-

- An example of a custom marshaller is given below, illustrating how - GValues can be converted to a C function call. The - marshaller is for a C function which takes an integer as its first - parameter and returns void. -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
g_cclosure_marshal_VOID__INT (GClosure     *closure,
-                              GValue       *return_value,
-                              guint         n_param_values,
-                              const GValue *param_values,
-                              gpointer      invocation_hint,
-                              gpointer      marshal_data)
-{
-  typedef void (*GMarshalFunc_VOID__INT) (gpointer     data1,
-                                          gint         arg_1,
-                                          gpointer     data2);
-  register GMarshalFunc_VOID__INT callback;
-  register GCClosure *cc = (GCClosure*) closure;
-  register gpointer data1, data2;
-
-  g_return_if_fail (n_param_values == 2);
-
-  data1 = g_value_peek_pointer (param_values + 0);
-  data2 = closure->data;
-
-  callback = (GMarshalFunc_VOID__INT) (marshal_data ? marshal_data : cc->callback);
-
-  callback (data1,
-            g_marshal_value_peek_int (param_values + 1),
-            data2);
-}
-
- -

-

-

- There exist other kinds of marshallers, for example there is a generic - Python marshaller which is used by all Python closures (a Python closure - is used to invoke a callback written in Python). This Python marshaller - transforms the input GValue list representing the function parameters - into a Python tuple which is the equivalent structure in Python. -

-
-
-
-

-

[4] - In practice, closures sit at the boundary of language runtimes: if you are - writing Python code and one of your Python callbacks receives a signal from - a GTK+ widget, the C code in GTK+ needs to execute your Python - code. The closure invoked by the GTK+ object invokes the Python callback: - it behaves as a normal C object for GTK+ and as a normal Python object for - Python code. -

-

[5] - Closures are reference counted and notify listeners of their destruction in a two-stage - process: the invalidation notifiers are invoked before the finalization notifiers. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/glib-genmarshal.html b/docs/reference/gobject/html/glib-genmarshal.html deleted file mode 100644 index 77245bb26..000000000 --- a/docs/reference/gobject/html/glib-genmarshal.html +++ /dev/null @@ -1,424 +0,0 @@ - - - - -glib-genmarshal: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

glib-genmarshal

-

glib-genmarshal — C code marshaller generation utility for GLib closures

-
-
-

Synopsis

-

glib-genmarshal [OPTION...] [FILE...]

-
-
-

Description

-

glib-genmarshal is a small utility that generates C code -marshallers for callback functions of the GClosure mechanism in the GObject -sublibrary of GLib. The marshaller functions have a standard signature, -they get passed in the invoking closure, an array of value structures holding -the callback function parameters and a value structure for the return value -of the callback. The marshaller is then responsible to call the respective C -code function of the closure with all the parameters on the stack and to -collect its return value. -

-

glib-genmarshal takes a list of marshallers to generate as -input. The marshaller list is either read from standard input or from files -passed as additional arguments on the command line. -

-
-

Marshaller list format

-

-The marshaller lists are processed line by line, a line can contain a -comment in the form of -

-
- - - - - - - -
1
# this is a comment
-
- -

-or a marshaller specification of the form -

-
-RTYPE:PTYPE
-RTYPE:PTYPE,PTYPE
-RTYPE:PTYPE,PTYPE,PTYPE
-
-

-(up to 16 PTYPEs may be present). -

-

-The RTYPE part specifies the callback's return -type and the PTYPEs right to the colon specify -the callback's parameter list, except for the first and the last arguments -which are always pointers. -

-
-
-
-

Parameter types

-

-Currently, the following types are supported: -

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

VOID

-indicates no return type, or no extra parameters. -If VOID is used as the parameter list, no -additional parameters may be present. -

BOOLEAN

-for boolean types (gboolean) -

CHAR

-for signed char types (gchar) -

UCHAR

-for unsigned char types (guchar) -

INT

-for signed integer types (gint) -

UINT

-for unsigned integer types (guint) -

LONG

-for signed long integer types (glong) -

ULONG

-for unsigned long integer types (gulong) -

INT64

-for signed 64bit integer types (gint64) -

UINT64

-for unsigned 64bit integer types (guint64) -

ENUM

-for enumeration types (gint) -

FLAGS

-for flag enumeration types (guint) -

FLOAT

-for single-precision float types (gfloat) -

DOUBLE

-for double-precision float types (gdouble) -

STRING

-for string types (gchar*) -

BOXED

-for boxed (anonymous but reference counted) types (GBoxed*) -

PARAM

-for GParamSpec or derived types (GParamSpec*) -

POINTER

-for anonymous pointer types (gpointer) -

OBJECT

-for GObject or derived types (GObject*) -

VARIANT

-for GVariant types (GVariant*) -

NONE

-deprecated alias for VOID -

BOOL

-deprecated alias for BOOLEAN -

-

-

-
-
-
-

Options

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

--header

-Generate header file contents of the marshallers. -

--body

-Generate C code file contents of the marshallers. -

--prefix=PREFIX

-Specify marshaller prefix. The default prefix is `g_cclosure_marshal'. -

--skip-source

-Skip source location remarks in generated comments. -

--stdinc

-Use the standard marshallers of the GObject library, and include -gmarshal.h in generated header files. -

--nostdinc

-Do not use the standard marshallers of the GObject library, and skip -gmarshal.h include directive in generated header files. -

--internal

-Mark generated functions as internal, using G_GNUC_INTERNAL. -

--valist-marshallers

-Generate valist marshallers, for use with g_signal_set_va_marshaller(). -

-v, --version

-Print version information. -

--g-fatal-warnings

-Make warnings fatal, that is, exit immediately once a warning occurs. -

-h, --help

-Print brief help and exit. -

-v, --version

-Print version and exit. -

--output=FILE

-Write output to FILE instead of stdout. -

-
-
-

Example

-

-To generate marshallers for the following callback functions: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
void   foo (gpointer data1,
-            gpointer data2);
-void   bar (gpointer data1,
-            gint     param1,
-            gpointer data2);
-gfloat baz (gpointer data1,
-            gboolean param1,
-            guchar   param2,
-            gpointer data2);
-
- -

-The marshaller.list file has to look like this: -

-
-VOID:VOID
-VOID:INT
-FLOAT:BOOLEAN,UCHAR
-
-

-and you call glib-genmarshal like this: -

-
-glib-genmarshal --header marshaller.list > marshaller.h
-glib-genmarshal --body marshaller.list > marshaller.c
-
-

-The generated marshallers have the arguments encoded in their function name. -For this particular list, they are -

-
-g_cclosure_user_marshal_VOID__VOID(),
-g_cclosure_user_marshal_VOID__INT(),
-g_cclosure_user_marshal_FLOAT__BOOLEAN_UCHAR().
-
-

-They can be used directly for GClosures or be passed in as the -GSignalCMarshaller c_marshaller; argument upon creation of signals: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
GClosure *cc_foo, *cc_bar, *cc_baz;
-
-cc_foo = g_cclosure_new (NULL, foo, NULL);
-g_closure_set_marshal (cc_foo, g_cclosure_user_marshal_VOID__VOID);
-cc_bar = g_cclosure_new (NULL, bar, NULL);
-g_closure_set_marshal (cc_bar, g_cclosure_user_marshal_VOID__INT);
-cc_baz = g_cclosure_new (NULL, baz, NULL);
-g_closure_set_marshal (cc_baz, g_cclosure_user_marshal_FLOAT__BOOLEAN_UCHAR);
-
- -
-
-

See also

-

-glib-mkenums(1) -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/glib-mkenums.html b/docs/reference/gobject/html/glib-mkenums.html deleted file mode 100644 index e5812e12a..000000000 --- a/docs/reference/gobject/html/glib-mkenums.html +++ /dev/null @@ -1,381 +0,0 @@ - - - - -glib-mkenums: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

glib-mkenums

-

glib-mkenums — C language enum description generation utility

-
-
-

Synopsis

-

glib-mkenums [OPTION...] [FILE...]

-
-
-

Description

-

glib-mkenums is a small perl-script utility that -parses C code to extract enum definitions and produces enum descriptions based -on text templates specified by the user. Most frequently this script is used to -produce C code that contains enum values as strings so programs can provide -value name strings for introspection. -

-

glib-mkenums takes a list of valid C code files as -input. The options specified control the text that is output, certain -substitutions are performed on the text templates for keywords enclosed -in @ characters. -

-
-

Production text substitutions

-

-Certain keywords enclosed in @ characters will be substituted in the -emitted text. For the substitution examples of the keywords below, -the following example enum definition is assumed: -

-
- - - - - - - -
1
-2
-3
-4
-5
typedef enum
-{
-  PREFIX_THE_XVALUE    = 1 << 3,
-  PREFIX_ANOTHER_VALUE = 1 << 4
-} PrefixTheXEnum;
-
- -

-

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

@EnumName@

-The name of the enum currently being processed, enum names are assumed to be -properly namespaced and to use mixed capitalization to separate -words (e.g. PrefixTheXEnum). -

@enum_name@

-The enum name with words lowercase and word-separated by underscores -(e.g. prefix_the_xenum). -

@ENUMNAME@

-The enum name with words uppercase and word-separated by underscores -(e.g. PREFIX_THE_XENUM). -

@ENUMSHORT@

-The enum name with words uppercase and word-separated by underscores, -prefix stripped (e.g. THE_XENUM). -

@ENUMPREFIX@

-The prefix of the enum name (e.g. PREFIX). -

@VALUENAME@

-The enum value name currently being processed with words uppercase and -word-separated by underscores, -this is the assumed literal notation of enum values in the C sources -(e.g. PREFIX_THE_XVALUE). -

@valuenick@

-A nick name for the enum value currently being processed, this is usually -generated by stripping common prefix words of all the enum values of the -current enum, the words are lowercase and underscores are substituted by a -minus (e.g. the-xvalue). -

@valuenum@

-The integer value for the enum value currently being processed. This is -calculated by using perl to attempt to evaluate the -expression as it appears in the C source code. If evaluation fails then -glib-mkenums will exit with an error status, but this -only happens if @valuenum@ appears in your value -production template. (Since: 2.26) -

@type@

-This is substituted either by "enum" or "flags", depending on whether the -enum value definitions contained bit-shift operators or not (e.g. flags). -

@Type@

-The same as @type@ with the first letter capitalized (e.g. Flags). -

@TYPE@

-The same as @type@ with all letters uppercased (e.g. FLAGS). -

@filename@

-The name of the input file currently being processed (e.g. foo.h). -

@basename@

-The base name of the input file currently being processed (e.g. foo.h). (Since: 2.22) -

-

-

-
-
-
-

Trigraph extensions

-

-Some C comments are treated specially in the parsed enum definitions, -such comments start out with the trigraph sequence /*< -and end with the trigraph sequence >*/. -Per enum definition, the options "skip" and "flags" can be specified, to -indicate this enum definition to be skipped, or for it to be treated as -a flags definition, or to specify the common prefix to be stripped from -all values to generate value nicknames, respectively. The "underscore_name" -option can be used to specify the word separation used in the *_get_type() -function. For instance, /*< underscore_name=gnome_vfs_uri_hide_options >*/. -

-

-Per value definition, the options "skip" and "nick" are supported. -The former causes the value to be skipped, and the latter can be used to -specify the otherwise auto-generated nickname. -Examples: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
typedef enum /*< skip >*/
-{
-  PREFIX_FOO
-} PrefixThisEnumWillBeSkipped;
-typedef enum /*< flags,prefix=PREFIX >*/
-{
-  PREFIX_THE_ZEROTH_VALUE,	/*< skip >*/
-  PREFIX_THE_FIRST_VALUE,
-  PREFIX_THE_SECOND_VALUE,
-  PREFIX_THE_THIRD_VALUE,	/*< nick=the-last-value >*/
-} PrefixTheFlagsEnum;
-
- -

-

-
-
-
-

Options

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

--fhead TEXT

-Put out TEXT prior to processing input files. -

--fprod TEXT

-Put out TEXT everytime a new input file -is being processed. -

--ftail TEXT

-Put out TEXT after all input files have been -processed. -

--eprod TEXT

-Put out TEXT everytime an enum is encountered -in the input files. -

--vhead TEXT

-Put out TEXT before iterating over the set of -values of an enum. -

--vprod TEXT

-Put out TEXT for every value of an enum. -

--vtail TEXT

-Put out TEXT after iterating over all values -of an enum. -

--comments TEXT

-Template for auto-generated comments, the default (for C code generations) is -"/* @comment@ */". -

--template FILE

-

-Read templates from the given file. The templates are enclosed in -specially-formatted C comments -

-
- - - - - - - -
1
-2
/*** BEGIN section ***/
-/*** END section ***/
-
- -

-where section may be file-header, -file-production, file-tail, -enumeration-production, value-header, -value-production, value-tail or -comment. -

-

--identifier-prefix PREFIX

-Indicates what portion of the enum name should be intepreted as the -prefix (eg, the "Gtk" in -"GtkDirectionType"). Normally this will be figured -out automatically, but you may need to override the default if your -namespace is capitalized oddly. -

--symbol-prefix PREFIX

-Indicates what prefix should be used to correspond to the identifier -prefix in related C function names (eg, the "gtk" -in "gtk_direction_type_get_type". Equivalently, -this is the lowercase version of the prefix component of the enum -value names (eg, the "GTK" in -"GTK_DIR_UP". The default value is the identifier -prefix, converted to lowercase. -

--help

-Print brief help and exit. -

--version

-Print version and exit. -

--output=FILE

-Write output to FILE instead of stdout. -

-
-
-

See also

-

-glib-genmarshal(1) -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/glue.png b/docs/reference/gobject/html/glue.png deleted file mode 100644 index f5f3aab2f..000000000 Binary files a/docs/reference/gobject/html/glue.png and /dev/null differ diff --git a/docs/reference/gobject/html/gobject-Boxed-Types.html b/docs/reference/gobject/html/gobject-Boxed-Types.html deleted file mode 100644 index 7c3696709..000000000 --- a/docs/reference/gobject/html/gobject-Boxed-Types.html +++ /dev/null @@ -1,690 +0,0 @@ - - - - -Boxed Types: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Boxed Types

-

Boxed Types — A mechanism to wrap opaque C structures registered - by the type system

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gpointer - -(*GBoxedCopyFunc) () -
-void - -(*GBoxedFreeFunc) () -
-gpointer - -g_boxed_copy () -
-void - -g_boxed_free () -
-GType - -g_boxed_type_register_static () -
-GType - -g_pointer_type_register_static () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#defineG_TYPE_HASH_TABLE
#defineG_TYPE_DATE
#defineG_TYPE_GSTRING
#defineG_TYPE_STRV
#defineG_TYPE_REGEX
#defineG_TYPE_MATCH_INFO
#defineG_TYPE_ARRAY
#defineG_TYPE_BYTE_ARRAY
#defineG_TYPE_PTR_ARRAY
#defineG_TYPE_BYTES
#defineG_TYPE_VARIANT_TYPE
#defineG_TYPE_ERROR
#defineG_TYPE_DATE_TIME
#defineG_TYPE_TIME_ZONE
#defineG_TYPE_IO_CHANNEL
#defineG_TYPE_IO_CONDITION
#defineG_TYPE_VARIANT_BUILDER
#defineG_TYPE_VARIANT_DICT
#defineG_TYPE_KEY_FILE
#defineG_TYPE_MAIN_CONTEXT
#defineG_TYPE_MAIN_LOOP
#defineG_TYPE_MAPPED_FILE
#defineG_TYPE_MARKUP_PARSE_CONTEXT
#defineG_TYPE_SOURCE
#defineG_TYPE_POLLFD
#defineG_TYPE_THREAD
#defineG_TYPE_OPTION_GROUP
-
-
-

Includes

-
#include <glib-object.h>
-
-
-
-

Description

-

GBoxed is a generic wrapper mechanism for arbitrary C structures. The only -thing the type system needs to know about the structures is how to copy and -free them, beyond that they are treated as opaque chunks of memory.

-

Boxed types are useful for simple value-holder structures like rectangles or -points. They can also be used for wrapping structures defined in non-GObject -based libraries.

-
-
-

Functions

-
-

GBoxedCopyFunc ()

-
gpointer
-(*GBoxedCopyFunc) (gpointer boxed);
-

This function is provided by the user and should produce a copy -of the passed in boxed structure.

-
-

Parameters

-
----- - - - - - -

boxed

The boxed structure to be copied.

[not nullable]
-
-
-

Returns

-

The newly created copy of the boxed structure.

-

[not nullable]

-
-
-
-
-

GBoxedFreeFunc ()

-
void
-(*GBoxedFreeFunc) (gpointer boxed);
-

This function is provided by the user and should free the boxed -structure passed.

-
-

Parameters

-
----- - - - - - -

boxed

The boxed structure to be freed.

[not nullable]
-
-
-
-
-

g_boxed_copy ()

-
gpointer
-g_boxed_copy (GType boxed_type,
-              gconstpointer src_boxed);
-

Provide a copy of a boxed structure src_boxed - which is of type boxed_type -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

boxed_type

The type of src_boxed -.

 

src_boxed

The boxed structure to be copied.

[not nullable]
-
-
-

Returns

-

The newly created copy of the boxed -structure.

-

[transfer full][not nullable]

-
-
-
-
-

g_boxed_free ()

-
void
-g_boxed_free (GType boxed_type,
-              gpointer boxed);
-

Free the boxed structure boxed - which is of type boxed_type -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

boxed_type

The type of boxed -.

 

boxed

The boxed structure to be freed.

[not nullable]
-
-
-
-
-

g_boxed_type_register_static ()

-
GType
-g_boxed_type_register_static (const gchar *name,
-                              GBoxedCopyFunc boxed_copy,
-                              GBoxedFreeFunc boxed_free);
-

This function creates a new G_TYPE_BOXED derived type id for a new -boxed type with name name -. Boxed type handling functions have to be -provided to copy and free opaque boxed structures of this type.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

name

Name of the new boxed type.

 

boxed_copy

Boxed structure copy function.

 

boxed_free

Boxed structure free function.

 
-
-
-

Returns

-

New G_TYPE_BOXED derived type id for name -.

-
-
-
-
-

g_pointer_type_register_static ()

-
GType
-g_pointer_type_register_static (const gchar *name);
-

Creates a new G_TYPE_POINTER derived type id for a new -pointer type with name name -.

-
-

Parameters

-
----- - - - - - -

name

the name of the new pointer type.

 
-
-
-

Returns

-

a new G_TYPE_POINTER derived type id for name -.

-
-
-
-
-

Types and Values

-
-

G_TYPE_HASH_TABLE

-
#define G_TYPE_HASH_TABLE (g_hash_table_get_type ())
-
-

The GType for a boxed type holding a GHashTable reference.

-

Since: 2.10

-
-
-
-

G_TYPE_DATE

-
#define G_TYPE_DATE (g_date_get_type ())
-
-

The GType for GDate.

-
-
-
-

G_TYPE_GSTRING

-
#define G_TYPE_GSTRING (g_gstring_get_type ())
-
-

The GType for GString.

-
-
-
-

G_TYPE_STRV

-
#define G_TYPE_STRV (g_strv_get_type ())
-
-

The GType for a boxed type holding a NULL-terminated array of strings.

-

The code fragments in the following example show the use of a property of -type G_TYPE_STRV with g_object_class_install_property(), g_object_set() -and g_object_get().

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
g_object_class_install_property (object_class,
-                                 PROP_AUTHORS,
-                                 g_param_spec_boxed ("authors",
-                                                     _("Authors"),
-                                                     _("List of authors"),
-                                                     G_TYPE_STRV,
-                                                     G_PARAM_READWRITE));
-
-gchar *authors[] = { "Owen", "Tim", NULL };
-g_object_set (obj, "authors", authors, NULL);
-
-gchar *writers[];
-g_object_get (obj, "authors", &writers, NULL);
-/&ast; do something with writers &ast;/
-g_strfreev (writers);
-
- -

-

Since: 2.4

-
-
-
-

G_TYPE_REGEX

-
#define G_TYPE_REGEX (g_regex_get_type ())
-
-

The GType for a boxed type holding a GRegex reference.

-

Since: 2.14

-
-
-
-

G_TYPE_MATCH_INFO

-
#define G_TYPE_MATCH_INFO (g_match_info_get_type ())
-
-

The GType for a boxed type holding a GMatchInfo reference.

-

Since: 2.30

-
-
-
-

G_TYPE_ARRAY

-
#define G_TYPE_ARRAY (g_array_get_type ())
-
-

The GType for a boxed type holding a GArray reference.

-

Since: 2.22

-
-
-
-

G_TYPE_BYTE_ARRAY

-
#define G_TYPE_BYTE_ARRAY (g_byte_array_get_type ())
-
-

The GType for a boxed type holding a GByteArray reference.

-

Since: 2.22

-
-
-
-

G_TYPE_PTR_ARRAY

-
#define G_TYPE_PTR_ARRAY (g_ptr_array_get_type ())
-
-

The GType for a boxed type holding a GPtrArray reference.

-

Since: 2.22

-
-
-
-

G_TYPE_BYTES

-
#define G_TYPE_BYTES (g_bytes_get_type ())
-
-

The GType for GBytes.

-

Since: 2.32

-
-
-
-

G_TYPE_VARIANT_TYPE

-
#define G_TYPE_VARIANT_TYPE (g_variant_type_get_gtype ())
-
-

The GType for a boxed type holding a GVariantType.

-

Since: 2.24

-
-
-
-

G_TYPE_ERROR

-
#define G_TYPE_ERROR (g_error_get_type ())
-
-

The GType for a boxed type holding a GError.

-

Since: 2.26

-
-
-
-

G_TYPE_DATE_TIME

-
#define G_TYPE_DATE_TIME (g_date_time_get_type ())
-
-

The GType for a boxed type holding a GDateTime.

-

Since: 2.26

-
-
-
-

G_TYPE_TIME_ZONE

-
#define G_TYPE_TIME_ZONE (g_time_zone_get_type ())
-
-

The GType for a boxed type holding a GTimeZone.

-

Since: 2.34

-
-
-
-

G_TYPE_IO_CHANNEL

-
#define G_TYPE_IO_CHANNEL (g_io_channel_get_type ())
-
-

The GType for GIOChannel.

-
-
-
-

G_TYPE_IO_CONDITION

-
#define G_TYPE_IO_CONDITION (g_io_condition_get_type ())
-
-

The GType for GIOCondition.

-
-
-
-

G_TYPE_VARIANT_BUILDER

-
#define G_TYPE_VARIANT_BUILDER (g_variant_builder_get_type ())
-
-

The GType for a boxed type holding a GVariantBuilder.

-

Since: 2.30

-
-
-
-

G_TYPE_VARIANT_DICT

-
#define G_TYPE_VARIANT_DICT (g_variant_dict_get_type ())
-
-

The GType for a boxed type holding a GVariantDict.

-

Since: 2.40

-
-
-
-

G_TYPE_KEY_FILE

-
#define G_TYPE_KEY_FILE (g_key_file_get_type ())
-
-

The GType for a boxed type holding a GKeyFile.

-

Since: 2.32

-
-
-
-

G_TYPE_MAIN_CONTEXT

-
#define G_TYPE_MAIN_CONTEXT (g_main_context_get_type ())
-
-

The GType for a boxed type holding a GMainContext.

-

Since: 2.30

-
-
-
-

G_TYPE_MAIN_LOOP

-
#define G_TYPE_MAIN_LOOP (g_main_loop_get_type ())
-
-

The GType for a boxed type holding a GMainLoop.

-

Since: 2.30

-
-
-
-

G_TYPE_MAPPED_FILE

-
#define G_TYPE_MAPPED_FILE (g_mapped_file_get_type ())
-
-

The GType for a boxed type holding a GMappedFile.

-

Since: 2.40

-
-
-
-

G_TYPE_MARKUP_PARSE_CONTEXT

-
#define G_TYPE_MARKUP_PARSE_CONTEXT (g_markup_parse_context_get_type ())
-
-

The GType for a boxed type holding a GMarkupParseContext.

-

Since: 2.36

-
-
-
-

G_TYPE_SOURCE

-
#define G_TYPE_SOURCE (g_source_get_type ())
-
-

The GType for a boxed type holding a GSource.

-

Since: 2.30

-
-
-
-

G_TYPE_POLLFD

-
#define G_TYPE_POLLFD (g_pollfd_get_type ())
-
-

The GType for a boxed type holding a GPollFD.

-

Since: 2.36

-
-
-
-

G_TYPE_THREAD

-
#define G_TYPE_THREAD (g_thread_get_type ())
-
-

The GType for a boxed type holding a GThread.

-

Since: 2.36

-
-
-
-

G_TYPE_OPTION_GROUP

-
#define G_TYPE_OPTION_GROUP (g_option_group_get_type ())
-
-

The GType for a boxed type holding a GOptionGroup.

-

Since: 2.44

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gobject-Closures.html b/docs/reference/gobject/html/gobject-Closures.html deleted file mode 100644 index 5cac70d56..000000000 --- a/docs/reference/gobject/html/gobject-Closures.html +++ /dev/null @@ -1,5125 +0,0 @@ - - - - -Closures: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Closures

-

Closures — Functions as first-class objects

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -G_CLOSURE_NEEDS_MARSHAL() -
#define -G_CLOSURE_N_NOTIFIERS() -
#define -G_CCLOSURE_SWAP_DATA() -
#define -G_CALLBACK() -
-void - -(*GCallback) () -
-void - -(*GClosureMarshal) () -
-void - -(*GVaClosureMarshal) () -
-void - -(*GClosureNotify) () -
-GClosure * - -g_cclosure_new () -
-GClosure * - -g_cclosure_new_swap () -
-GClosure * - -g_cclosure_new_object () -
-GClosure * - -g_cclosure_new_object_swap () -
-void - -g_cclosure_marshal_generic () -
-GClosure * - -g_closure_new_object () -
-GClosure * - -g_closure_ref () -
-void - -g_closure_sink () -
-void - -g_closure_unref () -
-void - -g_closure_invoke () -
-void - -g_closure_invalidate () -
-void - -g_closure_add_finalize_notifier () -
-void - -g_closure_add_invalidate_notifier () -
-void - -g_closure_remove_finalize_notifier () -
-void - -g_closure_remove_invalidate_notifier () -
-GClosure * - -g_closure_new_simple () -
-void - -g_closure_set_marshal () -
-void - -g_closure_add_marshal_guards () -
-void - -g_closure_set_meta_marshal () -
-void - -g_source_set_closure () -
-void - -g_source_set_dummy_callback () -
-void - -g_cclosure_marshal_VOID__VOID () -
-void - -g_cclosure_marshal_VOID__BOOLEAN () -
-void - -g_cclosure_marshal_VOID__CHAR () -
-void - -g_cclosure_marshal_VOID__UCHAR () -
-void - -g_cclosure_marshal_VOID__INT () -
-void - -g_cclosure_marshal_VOID__UINT () -
-void - -g_cclosure_marshal_VOID__LONG () -
-void - -g_cclosure_marshal_VOID__ULONG () -
-void - -g_cclosure_marshal_VOID__ENUM () -
-void - -g_cclosure_marshal_VOID__FLAGS () -
-void - -g_cclosure_marshal_VOID__FLOAT () -
-void - -g_cclosure_marshal_VOID__DOUBLE () -
-void - -g_cclosure_marshal_VOID__STRING () -
-void - -g_cclosure_marshal_VOID__PARAM () -
-void - -g_cclosure_marshal_VOID__BOXED () -
-void - -g_cclosure_marshal_VOID__POINTER () -
-void - -g_cclosure_marshal_VOID__OBJECT () -
-void - -g_cclosure_marshal_VOID__VARIANT () -
-void - -g_cclosure_marshal_STRING__OBJECT_POINTER () -
-void - -g_cclosure_marshal_VOID__UINT_POINTER () -
-void - -g_cclosure_marshal_BOOLEAN__FLAGS () -
-void - -g_cclosure_marshal_BOOLEAN__BOXED_BOXED () -
-void - -g_cclosure_marshal_generic_va () -
-void - -g_cclosure_marshal_VOID__VOIDv () -
-void - -g_cclosure_marshal_VOID__BOOLEANv () -
-void - -g_cclosure_marshal_VOID__CHARv () -
-void - -g_cclosure_marshal_VOID__UCHARv () -
-void - -g_cclosure_marshal_VOID__INTv () -
-void - -g_cclosure_marshal_VOID__UINTv () -
-void - -g_cclosure_marshal_VOID__LONGv () -
-void - -g_cclosure_marshal_VOID__ULONGv () -
-void - -g_cclosure_marshal_VOID__ENUMv () -
-void - -g_cclosure_marshal_VOID__FLAGSv () -
-void - -g_cclosure_marshal_VOID__FLOATv () -
-void - -g_cclosure_marshal_VOID__DOUBLEv () -
-void - -g_cclosure_marshal_VOID__STRINGv () -
-void - -g_cclosure_marshal_VOID__PARAMv () -
-void - -g_cclosure_marshal_VOID__BOXEDv () -
-void - -g_cclosure_marshal_VOID__POINTERv () -
-void - -g_cclosure_marshal_VOID__OBJECTv () -
-void - -g_cclosure_marshal_VOID__VARIANTv () -
-void - -g_cclosure_marshal_STRING__OBJECT_POINTERv () -
-void - -g_cclosure_marshal_VOID__UINT_POINTERv () -
-void - -g_cclosure_marshal_BOOLEAN__FLAGSv () -
-void - -g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - -
structGClosure
#defineG_TYPE_CLOSURE
structGCClosure
#defineg_cclosure_marshal_BOOL__FLAGS
#defineg_cclosure_marshal_BOOL__BOXED_BOXED
-
-
-

Includes

-
#include <glib-object.h>
-
-
-
-

Description

-

A GClosure represents a callback supplied by the programmer. It -will generally comprise a function of some kind and a marshaller -used to call it. It is the responsibility of the marshaller to -convert the arguments for the invocation from GValues into -a suitable form, perform the callback on the converted arguments, -and transform the return value back into a GValue.

-

In the case of C programs, a closure usually just holds a pointer -to a function and maybe a data argument, and the marshaller -converts between GValue and native C types. The GObject -library provides the GCClosure type for this purpose. Bindings for -other languages need marshallers which convert between GValue<!-- --->s and suitable representations in the runtime of the language in -order to use functions written in that languages as callbacks.

-

Within GObject, closures play an important role in the -implementation of signals. When a signal is registered, the -c_marshaller - argument to g_signal_new() specifies the default C -marshaller for any closure which is connected to this -signal. GObject provides a number of C marshallers for this -purpose, see the g_cclosure_marshal_*() functions. Additional C -marshallers can be generated with the glib-genmarshal -utility. Closures can be explicitly connected to signals with -g_signal_connect_closure(), but it usually more convenient to let -GObject create a closure automatically by using one of the -g_signal_connect_*() functions which take a callback function/user -data pair.

-

Using closures has a number of important advantages over a simple -callback function/data pointer combination:

-
    -
  • Closures allow the callee to get the types of the callback parameters, -which means that language bindings don't have to write individual glue -for each callback type.

  • -
  • The reference counting of GClosure makes it easy to handle reentrancy -right; if a callback is removed while it is being invoked, the closure -and its parameters won't be freed until the invocation finishes.

  • -
  • g_closure_invalidate() and invalidation notifiers allow callbacks to be -automatically removed when the objects they point to go away.

  • -
-
-
-

Functions

-
-

G_CLOSURE_NEEDS_MARSHAL()

-
#define G_CLOSURE_NEEDS_MARSHAL(closure) (((GClosure*) (closure))->marshal == NULL)
-
-

Check if the closure still needs a marshaller. See g_closure_set_marshal().

-
-

Parameters

-
----- - - - - - -

closure

a GClosure

 
-
-
-

Returns

-

TRUE if a GClosureMarshal marshaller has not yet been set on -closure -.

-
-
-
-
-

G_CLOSURE_N_NOTIFIERS()

-
#define             G_CLOSURE_N_NOTIFIERS(cl)
-

Get the total number of notifiers connected with the closure cl -. -The count includes the meta marshaller, the finalize and invalidate notifiers -and the marshal guards. Note that each guard counts as two notifiers. -See g_closure_set_meta_marshal(), g_closure_add_finalize_notifier(), -g_closure_add_invalidate_notifier() and g_closure_add_marshal_guards().

-
-

Parameters

-
----- - - - - - -

cl

a GClosure

 
-
-
-

Returns

-

number of notifiers

-
-
-
-
-

G_CCLOSURE_SWAP_DATA()

-
#define G_CCLOSURE_SWAP_DATA(cclosure)	 (((GClosure*) (cclosure))->derivative_flag)
-
-

Checks whether the user data of the GCClosure should be passed as the -first parameter to the callback. See g_cclosure_new_swap().

-
-

Parameters

-
----- - - - - - -

cclosure

a GCClosure

 
-
-
-

Returns

-

TRUE if data has to be swapped.

-
-
-
-
-

G_CALLBACK()

-
#define G_CALLBACK(f)			 ((GCallback) (f))
-
-

Cast a function pointer to a GCallback.

-
-

Parameters

-
----- - - - - - -

f

a function pointer.

 
-
-
-
-
-

GCallback ()

-
void
-(*GCallback) (void);
-

The type used for callback functions in structure definitions and function -signatures. This doesn't mean that all callback functions must take no -parameters and return void. The required signature of a callback function -is determined by the context in which is used (e.g. the signal to which it -is connected). Use G_CALLBACK() to cast the callback function to a GCallback.

-
-
-
-

GClosureMarshal ()

-
void
-(*GClosureMarshal) (GClosure *closure,
-                    GValue *return_value,
-                    guint n_param_values,
-                    const GValue *param_values,
-                    gpointer invocation_hint,
-                    gpointer marshal_data);
-

The type used for marshaller functions.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

n_param_values

the length of the param_values -array

 

param_values

an array of -GValues holding the arguments on which to invoke the -callback of closure -.

[array length=n_param_values]

invocation_hint

the invocation hint given as the -last argument to g_closure_invoke().

[nullable]

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]
-
-
-
-
-

GVaClosureMarshal ()

-
void
-(*GVaClosureMarshal) (GClosure *closure,
-                      GValue *return_value,
-                      gpointer instance,
-                      va_list args,
-                      gpointer marshal_data,
-                      int n_params,
-                      GType *param_types);
-

This is the signature of va_list marshaller functions, an optional -marshaller that can be used in some situations to avoid -marshalling the signal argument into GValues.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is -invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

GClosureNotify ()

-
void
-(*GClosureNotify) (gpointer data,
-                   GClosure *closure);
-

The type used for the various notification callbacks which can be registered -on closures.

-
-

Parameters

-
----- - - - - - - - - - - - - -

data

data specified when registering the notification callback

 

closure

the GClosure on which the notification is emitted

 
-
-
-
-
-

g_cclosure_new ()

-
GClosure *
-g_cclosure_new (GCallback callback_func,
-                gpointer user_data,
-                GClosureNotify destroy_data);
-

Creates a new closure which invokes callback_func - with user_data - as -the last parameter.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

callback_func

the function to invoke

 

user_data

user data to pass to callback_func -.

[closure callback_func]

destroy_data

destroy notify to be called when user_data -is no longer used

 
-
-
-

Returns

-

a new GCClosure

-
-
-
-
-

g_cclosure_new_swap ()

-
GClosure *
-g_cclosure_new_swap (GCallback callback_func,
-                     gpointer user_data,
-                     GClosureNotify destroy_data);
-

Creates a new closure which invokes callback_func - with user_data - as -the first parameter.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

callback_func

the function to invoke

 

user_data

user data to pass to callback_func -.

[closure callback_func]

destroy_data

destroy notify to be called when user_data -is no longer used

 
-
-
-

Returns

-

a new GCClosure.

-

[transfer full]

-
-
-
-
-

g_cclosure_new_object ()

-
GClosure *
-g_cclosure_new_object (GCallback callback_func,
-                       GObject *object);
-

A variant of g_cclosure_new() which uses object - as user_data - and -calls g_object_watch_closure() on object - and the created -closure. This function is useful when you have a callback closely -associated with a GObject, and want the callback to no longer run -after the object is is freed.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

callback_func

the function to invoke

 

object

a GObject pointer to pass to callback_func -

 
-
-
-

Returns

-

a new GCClosure

-
-
-
-
-

g_cclosure_new_object_swap ()

-
GClosure *
-g_cclosure_new_object_swap (GCallback callback_func,
-                            GObject *object);
-

A variant of g_cclosure_new_swap() which uses object - as user_data - -and calls g_object_watch_closure() on object - and the created -closure. This function is useful when you have a callback closely -associated with a GObject, and want the callback to no longer run -after the object is is freed.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

callback_func

the function to invoke

 

object

a GObject pointer to pass to callback_func -

 
-
-
-

Returns

-

a new GCClosure

-
-
-
-
-

g_cclosure_marshal_generic ()

-
void
-g_cclosure_marshal_generic (GClosure *closure,
-                            GValue *return_gvalue,
-                            guint n_param_values,
-                            const GValue *param_values,
-                            gpointer invocation_hint,
-                            gpointer marshal_data);
-

A generic marshaller function implemented via -libffi.

-

Normally this function is not passed explicitly to g_signal_new(), -but used automatically by GLib when specifying a NULL marshaller.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_gvalue

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-

Since: 2.30

-
-
-
-

g_closure_new_object ()

-
GClosure *
-g_closure_new_object (guint sizeof_closure,
-                      GObject *object);
-

A variant of g_closure_new_simple() which stores object - in the -data - field of the closure and calls g_object_watch_closure() on -object - and the created closure. This function is mainly useful -when implementing new types of closures.

-
-

Parameters

-
----- - - - - - - - - - - - - -

sizeof_closure

the size of the structure to allocate, must be at least -sizeof (GClosure)

 

object

a GObject pointer to store in the data -field of the newly -allocated GClosure

 
-
-
-

Returns

-

a newly allocated GClosure.

-

[transfer full]

-
-
-
-
-

g_closure_ref ()

-
GClosure *
-g_closure_ref (GClosure *closure);
-

Increments the reference count on a closure to force it staying -alive while the caller holds a pointer to it.

-
-

Parameters

-
----- - - - - - -

closure

GClosure to increment the reference count on

 
-
-
-

Returns

-

The closure -passed in, for convenience.

-

[transfer none]

-
-
-
-
-

g_closure_sink ()

-
void
-g_closure_sink (GClosure *closure);
-

Takes over the initial ownership of a closure. Each closure is -initially created in a "floating" state, which means that the initial -reference count is not owned by any caller. g_closure_sink() checks -to see if the object is still floating, and if so, unsets the -floating state and decreases the reference count. If the closure -is not floating, g_closure_sink() does nothing. The reason for the -existence of the floating state is to prevent cumbersome code -sequences like:

-
- - - - - - - -
1
-2
-3
closure = g_cclosure_new (cb_func, cb_data);
-g_source_set_closure (source, closure);
-g_closure_unref (closure); // GObject doesn't really need this
-
- -

-Because g_source_set_closure() (and similar functions) take ownership of the -initial reference count, if it is unowned, we instead can write:

-
- - - - - - - -
1
g_source_set_closure (source, g_cclosure_new (cb_func, cb_data));
-
- -

-

Generally, this function is used together with g_closure_ref(). Ane example -of storing a closure for later notification looks like:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
static GClosure *notify_closure = NULL;
-void
-foo_notify_set_closure (GClosure *closure)
-{
-  if (notify_closure)
-    g_closure_unref (notify_closure);
-  notify_closure = closure;
-  if (notify_closure)
-    {
-      g_closure_ref (notify_closure);
-      g_closure_sink (notify_closure);
-    }
-}
-
- -

-

Because g_closure_sink() may decrement the reference count of a closure -(if it hasn't been called on closure - yet) just like g_closure_unref(), -g_closure_ref() should be called prior to this function.

-
-

Parameters

-
----- - - - - - -

closure

GClosure to decrement the initial reference count on, if it's -still being held

 
-
-
-
-
-

g_closure_unref ()

-
void
-g_closure_unref (GClosure *closure);
-

Decrements the reference count of a closure after it was previously -incremented by the same caller. If no other callers are using the -closure, then the closure will be destroyed and freed.

-
-

Parameters

-
----- - - - - - -

closure

GClosure to decrement the reference count on

 
-
-
-
-
-

g_closure_invoke ()

-
void
-g_closure_invoke (GClosure *closure,
-                  GValue *return_value,
-                  guint n_param_values,
-                  const GValue *param_values,
-                  gpointer invocation_hint);
-

Invokes the closure, i.e. executes the callback represented by the closure -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

a GClosure

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a value.

[optional][out]

n_param_values

the length of the param_values -array

 

param_values

an array of -GValues holding the arguments on which to -invoke the callback of closure -.

[array length=n_param_values]

invocation_hint

a context-dependent invocation hint.

[nullable]
-
-
-
-
-

g_closure_invalidate ()

-
void
-g_closure_invalidate (GClosure *closure);
-

Sets a flag on the closure to indicate that its calling -environment has become invalid, and thus causes any future -invocations of g_closure_invoke() on this closure - to be -ignored. Also, invalidation notifiers installed on the closure will -be called at this point. Note that unless you are holding a -reference to the closure yourself, the invalidation notifiers may -unref the closure and cause it to be destroyed, so if you need to -access the closure after calling g_closure_invalidate(), make sure -that you've previously called g_closure_ref().

-

Note that g_closure_invalidate() will also be called when the -reference count of a closure drops to zero (unless it has already -been invalidated before).

-
-

Parameters

-
----- - - - - - -

closure

GClosure to invalidate

 
-
-
-
-
-

g_closure_add_finalize_notifier ()

-
void
-g_closure_add_finalize_notifier (GClosure *closure,
-                                 gpointer notify_data,
-                                 GClosureNotify notify_func);
-

Registers a finalization notifier which will be called when the -reference count of closure - goes down to 0. Multiple finalization -notifiers on a single closure are invoked in unspecified order. If -a single call to g_closure_unref() results in the closure being -both invalidated and finalized, then the invalidate notifiers will -be run before the finalize notifiers.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

closure

a GClosure

 

notify_data

data to pass to notify_func -.

[closure notify_func]

notify_func

the callback function to register

 
-
-
-
-
-

g_closure_add_invalidate_notifier ()

-
void
-g_closure_add_invalidate_notifier (GClosure *closure,
-                                   gpointer notify_data,
-                                   GClosureNotify notify_func);
-

Registers an invalidation notifier which will be called when the -closure - is invalidated with g_closure_invalidate(). Invalidation -notifiers are invoked before finalization notifiers, in an -unspecified order.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

closure

a GClosure

 

notify_data

data to pass to notify_func -.

[closure notify_func]

notify_func

the callback function to register

 
-
-
-
-
-

g_closure_remove_finalize_notifier ()

-
void
-g_closure_remove_finalize_notifier (GClosure *closure,
-                                    gpointer notify_data,
-                                    GClosureNotify notify_func);
-

Removes a finalization notifier.

-

Notice that notifiers are automatically removed after they are run.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

closure

a GClosure

 

notify_data

data which was passed to g_closure_add_finalize_notifier() -when registering notify_func -

 

notify_func

the callback function to remove

 
-
-
-
-
-

g_closure_remove_invalidate_notifier ()

-
void
-g_closure_remove_invalidate_notifier (GClosure *closure,
-                                      gpointer notify_data,
-                                      GClosureNotify notify_func);
-

Removes an invalidation notifier.

-

Notice that notifiers are automatically removed after they are run.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

closure

a GClosure

 

notify_data

data which was passed to g_closure_add_invalidate_notifier() -when registering notify_func -

 

notify_func

the callback function to remove

 
-
-
-
-
-

g_closure_new_simple ()

-
GClosure *
-g_closure_new_simple (guint sizeof_closure,
-                      gpointer data);
-

Allocates a struct of the given size and initializes the initial -part as a GClosure. This function is mainly useful when -implementing new types of closures.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
typedef struct _MyClosure MyClosure;
-struct _MyClosure
-{
-  GClosure closure;
-  // extra data goes here
-};
-
-static void
-my_closure_finalize (gpointer  notify_data,
-                     GClosure *closure)
-{
-  MyClosure *my_closure = (MyClosure *)closure;
-
-  // free extra data here
-}
-
-MyClosure *my_closure_new (gpointer data)
-{
-  GClosure *closure;
-  MyClosure *my_closure;
-
-  closure = g_closure_new_simple (sizeof (MyClosure), data);
-  my_closure = (MyClosure *) closure;
-
-  // initialize extra data here
-
-  g_closure_add_finalize_notifier (closure, notify_data,
-                                   my_closure_finalize);
-  return my_closure;
-}
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

sizeof_closure

the size of the structure to allocate, must be at least -sizeof (GClosure)

 

data

data to store in the data -field of the newly allocated GClosure

 
-
-
-

Returns

-

a newly allocated GClosure.

-

[transfer full]

-
-
-
-
-

g_closure_set_marshal ()

-
void
-g_closure_set_marshal (GClosure *closure,
-                       GClosureMarshal marshal);
-

Sets the marshaller of closure -. The marshal_data -of marshal - provides a way for a meta marshaller to provide additional -information to the marshaller. (See g_closure_set_meta_marshal().) For -GObject's C predefined marshallers (the g_cclosure_marshal_*() -functions), what it provides is a callback function to use instead of -closure->callback -.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

closure

a GClosure

 

marshal

a GClosureMarshal function

 
-
-
-
-
-

g_closure_add_marshal_guards ()

-
void
-g_closure_add_marshal_guards (GClosure *closure,
-                              gpointer pre_marshal_data,
-                              GClosureNotify pre_marshal_notify,
-                              gpointer post_marshal_data,
-                              GClosureNotify post_marshal_notify);
-

Adds a pair of notifiers which get invoked before and after the -closure callback, respectively. This is typically used to protect -the extra arguments for the duration of the callback. See -g_object_watch_closure() for an example of marshal guards.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

a GClosure

 

pre_marshal_data

data to pass -to pre_marshal_notify -.

[closure pre_marshal_notify]

pre_marshal_notify

a function to call before the closure callback

 

post_marshal_data

data to pass -to post_marshal_notify -.

[closure post_marshal_notify]

post_marshal_notify

a function to call after the closure callback

 
-
-
-
-
-

g_closure_set_meta_marshal ()

-
void
-g_closure_set_meta_marshal (GClosure *closure,
-                            gpointer marshal_data,
-                            GClosureMarshal meta_marshal);
-

Sets the meta marshaller of closure -. A meta marshaller wraps -closure->marshal - and modifies the way it is called in some -fashion. The most common use of this facility is for C callbacks. -The same marshallers (generated by glib-genmarshal), -are used everywhere, but the way that we get the callback function -differs. In most cases we want to use closure->callback -, but in -other cases we want to use some different technique to retrieve the -callback function.

-

For example, class closures for signals (see -g_signal_type_cclosure_new()) retrieve the callback function from a -fixed offset in the class structure. The meta marshaller retrieves -the right callback and passes it to the marshaller as the -marshal_data - argument.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

closure

a GClosure

 

marshal_data

context-dependent data to pass -to meta_marshal -.

[closure meta_marshal]

meta_marshal

a GClosureMarshal function

 
-
-
-
-
-

g_source_set_closure ()

-
void
-g_source_set_closure (GSource *source,
-                      GClosure *closure);
-

Set the callback for a source as a GClosure.

-

If the source is not one of the standard GLib types, the closure_callback - -and closure_marshal - fields of the GSourceFuncs structure must have been -filled in with pointers to appropriate functions.

-
-

Parameters

-
----- - - - - - - - - - - - - -

source

the source

 

closure

a GClosure

 
-
-
-
-
-

g_source_set_dummy_callback ()

-
void
-g_source_set_dummy_callback (GSource *source);
-

Sets a dummy callback for source -. The callback will do nothing, and -if the source expects a gboolean return value, it will return TRUE. -(If the source expects any other type of return value, it will return -a 0/NULL value; whatever g_value_init() initializes a GValue to for -that type.)

-

If the source is not one of the standard GLib types, the -closure_callback - and closure_marshal - fields of the GSourceFuncs -structure must have been filled in with pointers to appropriate -functions.

-
-

Parameters

-
----- - - - - - -

source

the source

 
-
-
-
-
-

g_cclosure_marshal_VOID__VOID ()

-
void
-g_cclosure_marshal_VOID__VOID (GClosure *closure,
-                               GValue *return_value,
-                               guint n_param_values,
-                               const GValue *param_values,
-                               gpointer invocation_hint,
-                               gpointer marshal_data);
-

A GClosureMarshal function for use with signals with no arguments.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__BOOLEAN ()

-
void
-g_cclosure_marshal_VOID__BOOLEAN (GClosure *closure,
-                                  GValue *return_value,
-                                  guint n_param_values,
-                                  const GValue *param_values,
-                                  gpointer invocation_hint,
-                                  gpointer marshal_data);
-

A GClosureMarshal function for use with signals with a single -boolean argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__CHAR ()

-
void
-g_cclosure_marshal_VOID__CHAR (GClosure *closure,
-                               GValue *return_value,
-                               guint n_param_values,
-                               const GValue *param_values,
-                               gpointer invocation_hint,
-                               gpointer marshal_data);
-

A GClosureMarshal function for use with signals with a single -character argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__UCHAR ()

-
void
-g_cclosure_marshal_VOID__UCHAR (GClosure *closure,
-                                GValue *return_value,
-                                guint n_param_values,
-                                const GValue *param_values,
-                                gpointer invocation_hint,
-                                gpointer marshal_data);
-

A GClosureMarshal function for use with signals with a single -unsigned character argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__INT ()

-
void
-g_cclosure_marshal_VOID__INT (GClosure *closure,
-                              GValue *return_value,
-                              guint n_param_values,
-                              const GValue *param_values,
-                              gpointer invocation_hint,
-                              gpointer marshal_data);
-

A GClosureMarshal function for use with signals with a single -integer argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__UINT ()

-
void
-g_cclosure_marshal_VOID__UINT (GClosure *closure,
-                               GValue *return_value,
-                               guint n_param_values,
-                               const GValue *param_values,
-                               gpointer invocation_hint,
-                               gpointer marshal_data);
-

A GClosureMarshal function for use with signals with with a single -unsigned integer argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__LONG ()

-
void
-g_cclosure_marshal_VOID__LONG (GClosure *closure,
-                               GValue *return_value,
-                               guint n_param_values,
-                               const GValue *param_values,
-                               gpointer invocation_hint,
-                               gpointer marshal_data);
-

A GClosureMarshal function for use with signals with with a single -long integer argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__ULONG ()

-
void
-g_cclosure_marshal_VOID__ULONG (GClosure *closure,
-                                GValue *return_value,
-                                guint n_param_values,
-                                const GValue *param_values,
-                                gpointer invocation_hint,
-                                gpointer marshal_data);
-

A GClosureMarshal function for use with signals with a single -unsigned long integer argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__ENUM ()

-
void
-g_cclosure_marshal_VOID__ENUM (GClosure *closure,
-                               GValue *return_value,
-                               guint n_param_values,
-                               const GValue *param_values,
-                               gpointer invocation_hint,
-                               gpointer marshal_data);
-

A GClosureMarshal function for use with signals with a single -argument with an enumerated type.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__FLAGS ()

-
void
-g_cclosure_marshal_VOID__FLAGS (GClosure *closure,
-                                GValue *return_value,
-                                guint n_param_values,
-                                const GValue *param_values,
-                                gpointer invocation_hint,
-                                gpointer marshal_data);
-

A GClosureMarshal function for use with signals with a single -argument with a flags types.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__FLOAT ()

-
void
-g_cclosure_marshal_VOID__FLOAT (GClosure *closure,
-                                GValue *return_value,
-                                guint n_param_values,
-                                const GValue *param_values,
-                                gpointer invocation_hint,
-                                gpointer marshal_data);
-

A GClosureMarshal function for use with signals with one -single-precision floating point argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__DOUBLE ()

-
void
-g_cclosure_marshal_VOID__DOUBLE (GClosure *closure,
-                                 GValue *return_value,
-                                 guint n_param_values,
-                                 const GValue *param_values,
-                                 gpointer invocation_hint,
-                                 gpointer marshal_data);
-

A GClosureMarshal function for use with signals with one -double-precision floating point argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__STRING ()

-
void
-g_cclosure_marshal_VOID__STRING (GClosure *closure,
-                                 GValue *return_value,
-                                 guint n_param_values,
-                                 const GValue *param_values,
-                                 gpointer invocation_hint,
-                                 gpointer marshal_data);
-

A GClosureMarshal function for use with signals with a single string -argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__PARAM ()

-
void
-g_cclosure_marshal_VOID__PARAM (GClosure *closure,
-                                GValue *return_value,
-                                guint n_param_values,
-                                const GValue *param_values,
-                                gpointer invocation_hint,
-                                gpointer marshal_data);
-

A GClosureMarshal function for use with signals with a single -argument of type GParamSpec.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__BOXED ()

-
void
-g_cclosure_marshal_VOID__BOXED (GClosure *closure,
-                                GValue *return_value,
-                                guint n_param_values,
-                                const GValue *param_values,
-                                gpointer invocation_hint,
-                                gpointer marshal_data);
-

A GClosureMarshal function for use with signals with a single -argument which is any boxed pointer type.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__POINTER ()

-
void
-g_cclosure_marshal_VOID__POINTER (GClosure *closure,
-                                  GValue *return_value,
-                                  guint n_param_values,
-                                  const GValue *param_values,
-                                  gpointer invocation_hint,
-                                  gpointer marshal_data);
-

A GClosureMarshal function for use with signals with a single raw -pointer argument type.

-

If it is possible, it is better to use one of the more specific -functions such as g_cclosure_marshal_VOID__OBJECT() or -g_cclosure_marshal_VOID__OBJECT().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__OBJECT ()

-
void
-g_cclosure_marshal_VOID__OBJECT (GClosure *closure,
-                                 GValue *return_value,
-                                 guint n_param_values,
-                                 const GValue *param_values,
-                                 gpointer invocation_hint,
-                                 gpointer marshal_data);
-

A GClosureMarshal function for use with signals with a single -GObject argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__VARIANT ()

-
void
-g_cclosure_marshal_VOID__VARIANT (GClosure *closure,
-                                  GValue *return_value,
-                                  guint n_param_values,
-                                  const GValue *param_values,
-                                  gpointer invocation_hint,
-                                  gpointer marshal_data);
-

A GClosureMarshal function for use with signals with a single -GVariant argument.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-

Since: 2.26

-
-
-
-

g_cclosure_marshal_STRING__OBJECT_POINTER ()

-
void
-g_cclosure_marshal_STRING__OBJECT_POINTER
-                               (GClosure *closure,
-                                GValue *return_value,
-                                guint n_param_values,
-                                const GValue *param_values,
-                                gpointer invocation_hint,
-                                gpointer marshal_data);
-

A GClosureMarshal function for use with signals with handlers that -take a GObject and a pointer and produce a string. It is highly -unlikely that your signal handler fits this description.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_VOID__UINT_POINTER ()

-
void
-g_cclosure_marshal_VOID__UINT_POINTER (GClosure *closure,
-                                       GValue *return_value,
-                                       guint n_param_values,
-                                       const GValue *param_values,
-                                       gpointer invocation_hint,
-                                       gpointer marshal_data);
-

A GClosureMarshal function for use with signals with a unsigned int -and a pointer as arguments.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_BOOLEAN__FLAGS ()

-
void
-g_cclosure_marshal_BOOLEAN__FLAGS (GClosure *closure,
-                                   GValue *return_value,
-                                   guint n_param_values,
-                                   const GValue *param_values,
-                                   gpointer invocation_hint,
-                                   gpointer marshal_data);
-

A GClosureMarshal function for use with signals with handlers that -take a flags type as an argument and return a boolean. If you have -such a signal, you will probably also need to use an accumulator, -such as g_signal_accumulator_true_handled().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_BOOLEAN__BOXED_BOXED ()

-
void
-g_cclosure_marshal_BOOLEAN__BOXED_BOXED
-                               (GClosure *closure,
-                                GValue *return_value,
-                                guint n_param_values,
-                                const GValue *param_values,
-                                gpointer invocation_hint,
-                                gpointer marshal_data);
-

A GClosureMarshal function for use with signals with handlers that -take two boxed pointers as arguments and return a boolean. If you -have such a signal, you will probably also need to use an -accumulator, such as g_signal_accumulator_true_handled().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_generic_va ()

-
void
-g_cclosure_marshal_generic_va (GClosure *closure,
-                               GValue *return_value,
-                               gpointer instance,
-                               va_list args_list,
-                               gpointer marshal_data,
-                               int n_params,
-                               GType *param_types);
-

A generic GVaClosureMarshal function implemented via -libffi.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is -invoked.

[type GObject.TypeInstance]

args_list

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args_list -.

[array length=n_params]
-
-

Since: 2.30

-
-
-
-

g_cclosure_marshal_VOID__VOIDv ()

-
void
-g_cclosure_marshal_VOID__VOIDv (GClosure *closure,
-                                GValue *return_value,
-                                gpointer instance,
-                                va_list args,
-                                gpointer marshal_data,
-                                int n_params,
-                                GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__VOID().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__BOOLEANv ()

-
void
-g_cclosure_marshal_VOID__BOOLEANv (GClosure *closure,
-                                   GValue *return_value,
-                                   gpointer instance,
-                                   va_list args,
-                                   gpointer marshal_data,
-                                   int n_params,
-                                   GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__BOOLEAN().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__CHARv ()

-
void
-g_cclosure_marshal_VOID__CHARv (GClosure *closure,
-                                GValue *return_value,
-                                gpointer instance,
-                                va_list args,
-                                gpointer marshal_data,
-                                int n_params,
-                                GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__CHAR().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__UCHARv ()

-
void
-g_cclosure_marshal_VOID__UCHARv (GClosure *closure,
-                                 GValue *return_value,
-                                 gpointer instance,
-                                 va_list args,
-                                 gpointer marshal_data,
-                                 int n_params,
-                                 GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__UCHAR().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__INTv ()

-
void
-g_cclosure_marshal_VOID__INTv (GClosure *closure,
-                               GValue *return_value,
-                               gpointer instance,
-                               va_list args,
-                               gpointer marshal_data,
-                               int n_params,
-                               GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__INT().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__UINTv ()

-
void
-g_cclosure_marshal_VOID__UINTv (GClosure *closure,
-                                GValue *return_value,
-                                gpointer instance,
-                                va_list args,
-                                gpointer marshal_data,
-                                int n_params,
-                                GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__UINT().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__LONGv ()

-
void
-g_cclosure_marshal_VOID__LONGv (GClosure *closure,
-                                GValue *return_value,
-                                gpointer instance,
-                                va_list args,
-                                gpointer marshal_data,
-                                int n_params,
-                                GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__LONG().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__ULONGv ()

-
void
-g_cclosure_marshal_VOID__ULONGv (GClosure *closure,
-                                 GValue *return_value,
-                                 gpointer instance,
-                                 va_list args,
-                                 gpointer marshal_data,
-                                 int n_params,
-                                 GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__ULONG().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__ENUMv ()

-
void
-g_cclosure_marshal_VOID__ENUMv (GClosure *closure,
-                                GValue *return_value,
-                                gpointer instance,
-                                va_list args,
-                                gpointer marshal_data,
-                                int n_params,
-                                GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__ENUM().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__FLAGSv ()

-
void
-g_cclosure_marshal_VOID__FLAGSv (GClosure *closure,
-                                 GValue *return_value,
-                                 gpointer instance,
-                                 va_list args,
-                                 gpointer marshal_data,
-                                 int n_params,
-                                 GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__FLAGS().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__FLOATv ()

-
void
-g_cclosure_marshal_VOID__FLOATv (GClosure *closure,
-                                 GValue *return_value,
-                                 gpointer instance,
-                                 va_list args,
-                                 gpointer marshal_data,
-                                 int n_params,
-                                 GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__FLOAT().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__DOUBLEv ()

-
void
-g_cclosure_marshal_VOID__DOUBLEv (GClosure *closure,
-                                  GValue *return_value,
-                                  gpointer instance,
-                                  va_list args,
-                                  gpointer marshal_data,
-                                  int n_params,
-                                  GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__DOUBLE().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__STRINGv ()

-
void
-g_cclosure_marshal_VOID__STRINGv (GClosure *closure,
-                                  GValue *return_value,
-                                  gpointer instance,
-                                  va_list args,
-                                  gpointer marshal_data,
-                                  int n_params,
-                                  GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__STRING().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__PARAMv ()

-
void
-g_cclosure_marshal_VOID__PARAMv (GClosure *closure,
-                                 GValue *return_value,
-                                 gpointer instance,
-                                 va_list args,
-                                 gpointer marshal_data,
-                                 int n_params,
-                                 GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__PARAM().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__BOXEDv ()

-
void
-g_cclosure_marshal_VOID__BOXEDv (GClosure *closure,
-                                 GValue *return_value,
-                                 gpointer instance,
-                                 va_list args,
-                                 gpointer marshal_data,
-                                 int n_params,
-                                 GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__BOXED().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__POINTERv ()

-
void
-g_cclosure_marshal_VOID__POINTERv (GClosure *closure,
-                                   GValue *return_value,
-                                   gpointer instance,
-                                   va_list args,
-                                   gpointer marshal_data,
-                                   int n_params,
-                                   GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__POINTER().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__OBJECTv ()

-
void
-g_cclosure_marshal_VOID__OBJECTv (GClosure *closure,
-                                  GValue *return_value,
-                                  gpointer instance,
-                                  va_list args,
-                                  gpointer marshal_data,
-                                  int n_params,
-                                  GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__OBJECT().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__VARIANTv ()

-
void
-g_cclosure_marshal_VOID__VARIANTv (GClosure *closure,
-                                   GValue *return_value,
-                                   gpointer instance,
-                                   va_list args,
-                                   gpointer marshal_data,
-                                   int n_params,
-                                   GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__VARIANT().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_STRING__OBJECT_POINTERv ()

-
void
-g_cclosure_marshal_STRING__OBJECT_POINTERv
-                               (GClosure *closure,
-                                GValue *return_value,
-                                gpointer instance,
-                                va_list args,
-                                gpointer marshal_data,
-                                int n_params,
-                                GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_STRING__OBJECT_POINTER().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_VOID__UINT_POINTERv ()

-
void
-g_cclosure_marshal_VOID__UINT_POINTERv
-                               (GClosure *closure,
-                                GValue *return_value,
-                                gpointer instance,
-                                va_list args,
-                                gpointer marshal_data,
-                                int n_params,
-                                GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__UINT_POINTER().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_BOOLEAN__FLAGSv ()

-
void
-g_cclosure_marshal_BOOLEAN__FLAGSv (GClosure *closure,
-                                    GValue *return_value,
-                                    gpointer instance,
-                                    va_list args,
-                                    gpointer marshal_data,
-                                    int n_params,
-                                    GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_BOOLEAN__FLAGS().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv ()

-
void
-g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv
-                               (GClosure *closure,
-                                GValue *return_value,
-                                gpointer instance,
-                                va_list args,
-                                gpointer marshal_data,
-                                int n_params,
-                                GType *param_types);
-

The GVaClosureMarshal equivalent to g_cclosure_marshal_BOOLEAN__BOXED_BOXED().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

the GClosure to which the marshaller belongs

 

return_value

a GValue to store the return -value. May be NULL if the callback of closure -doesn't return a -value.

[nullable]

instance

the instance on which the closure is invoked.

[type GObject.TypeInstance]

args

va_list of arguments to be passed to the closure.

 

marshal_data

additional data specified when -registering the marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal().

[nullable]

n_params

the length of the param_types -array

 

param_types

the GType of each argument from -args -.

[array length=n_params]
-
-
-
-
-

Types and Values

-
-

struct GClosure

-
struct GClosure {
-  volatile       	guint	 in_marshal : 1;
-  volatile       	guint	 is_invalid : 1;
-};
-
-

A GClosure represents a callback supplied by the programmer.

-
-

Members

-
----- - - - - - - - - - - - - -

volatile        guint in_marshal : 1;

Indicates whether the closure is currently being invoked with -g_closure_invoke()

 

volatile        guint is_invalid : 1;

Indicates whether the closure has been invalidated by -g_closure_invalidate()

 
-
-
-
-
-

G_TYPE_CLOSURE

-
#define G_TYPE_CLOSURE (g_closure_get_type ())
-
-

The GType for GClosure.

-
-
-
-

struct GCClosure

-
struct GCClosure {
-  GClosure closure;
-  gpointer callback;
-};
-
-

A GCClosure is a specialization of GClosure for C function callbacks.

-
-

Members

-
----- - - - - - - - - - - - - -

GClosure closure;

the GClosure

 

gpointer callback;

the callback function

 
-
-
-
-
-

g_cclosure_marshal_BOOL__FLAGS

-
#define             g_cclosure_marshal_BOOL__FLAGS
-

An old alias for g_cclosure_marshal_BOOLEAN__FLAGS().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
-

g_cclosure_marshal_BOOL__BOXED_BOXED

-
#define             g_cclosure_marshal_BOOL__BOXED_BOXED
-

An old alias for g_cclosure_marshal_BOOLEAN__BOXED_BOXED().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

closure

A GClosure.

 

return_value

A GValue to store the return value. May be NULL -if the callback of closure doesn't return a value.

 

n_param_values

The length of the param_values -array.

 

param_values

An array of GValues holding the arguments -on which to invoke the callback of closure.

 

invocation_hint

The invocation hint given as the last argument to -g_closure_invoke().

 

marshal_data

Additional data specified when registering the -marshaller, see g_closure_set_marshal() and -g_closure_set_meta_marshal()

 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gobject-Enumeration-and-Flag-Types.html b/docs/reference/gobject/html/gobject-Enumeration-and-Flag-Types.html deleted file mode 100644 index 69366010b..000000000 --- a/docs/reference/gobject/html/gobject-Enumeration-and-Flag-Types.html +++ /dev/null @@ -1,1130 +0,0 @@ - - - - -Enumeration and Flag Types: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Enumeration and Flag Types

-

Enumeration and Flag Types — Enumeration and flags types

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -G_ENUM_CLASS_TYPE() -
#define -G_ENUM_CLASS_TYPE_NAME() -
#define -G_TYPE_IS_ENUM() -
#define -G_ENUM_CLASS() -
#define -G_IS_ENUM_CLASS() -
#define -G_TYPE_IS_FLAGS() -
#define -G_FLAGS_CLASS() -
#define -G_IS_FLAGS_CLASS() -
#define -G_FLAGS_CLASS_TYPE() -
#define -G_FLAGS_CLASS_TYPE_NAME() -
-GEnumValue * - -g_enum_get_value () -
-GEnumValue * - -g_enum_get_value_by_name () -
-GEnumValue * - -g_enum_get_value_by_nick () -
-GFlagsValue * - -g_flags_get_first_value () -
-GFlagsValue * - -g_flags_get_value_by_name () -
-GFlagsValue * - -g_flags_get_value_by_nick () -
-GType - -g_enum_register_static () -
-GType - -g_flags_register_static () -
-void - -g_enum_complete_type_info () -
-void - -g_flags_complete_type_info () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
structGEnumClass
structGFlagsClass
structGEnumValue
structGFlagsValue
-
-
-

Includes

-
#include <glib-object.h>
-
-
-
-

Description

-

The GLib type system provides fundamental types for enumeration and -flags types. (Flags types are like enumerations, but allow their -values to be combined by bitwise or). A registered enumeration or -flags type associates a name and a nickname with each allowed -value, and the methods g_enum_get_value_by_name(), -g_enum_get_value_by_nick(), g_flags_get_value_by_name() and -g_flags_get_value_by_nick() can look up values by their name or -nickname. When an enumeration or flags type is registered with the -GLib type system, it can be used as value type for object -properties, using g_param_spec_enum() or g_param_spec_flags().

-

GObject ships with a utility called glib-mkenums, -that can construct suitable type registration functions from C enumeration -definitions.

-

Example of how to get a string representation of an enum value:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
GEnumClass *enum_class;
-GEnumValue *enum_value;
-
-enum_class = g_type_class_ref (MAMAN_TYPE_MY_ENUM);
-enum_value = g_enum_get_value (enum_class, MAMAN_MY_ENUM_FOO);
-
-g_print ("Name: %s\n", enum_value->value_name);
-
-g_type_class_unref (enum_class);
-
- -

-
-
-

Functions

-
-

G_ENUM_CLASS_TYPE()

-
#define G_ENUM_CLASS_TYPE(class)       (G_TYPE_FROM_CLASS (class))
-
-

Get the type identifier from a given GEnumClass structure.

-
-

Parameters

-
----- - - - - - -

class

a GEnumClass

 
-
-
-

Returns

-

the GType

-
-
-
-
-

G_ENUM_CLASS_TYPE_NAME()

-
#define G_ENUM_CLASS_TYPE_NAME(class)  (g_type_name (G_ENUM_CLASS_TYPE (class)))
-
-

Get the static type name from a given GEnumClass structure.

-
-

Parameters

-
----- - - - - - -

class

a GEnumClass

 
-
-
-

Returns

-

the type name.

-
-
-
-
-

G_TYPE_IS_ENUM()

-
#define G_TYPE_IS_ENUM(type)	       (G_TYPE_FUNDAMENTAL (type) == G_TYPE_ENUM)
-
-

Checks whether type - "is a" G_TYPE_ENUM.

-
-

Parameters

-
----- - - - - - -

type

a GType ID.

 
-
-
-

Returns

-

TRUE if type -"is a" G_TYPE_ENUM.

-
-
-
-
-

G_ENUM_CLASS()

-
#define G_ENUM_CLASS(class)	       (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_ENUM, GEnumClass))
-
-

Casts a derived GEnumClass structure into a GEnumClass structure.

-
-

Parameters

-
----- - - - - - -

class

a valid GEnumClass

 
-
-
-
-
-

G_IS_ENUM_CLASS()

-
#define G_IS_ENUM_CLASS(class)	       (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_ENUM))
-
-

Checks whether class - "is a" valid GEnumClass structure of type G_TYPE_ENUM -or derived.

-
-

Parameters

-
----- - - - - - -

class

a GEnumClass

 
-
-
-
-
-

G_TYPE_IS_FLAGS()

-
#define G_TYPE_IS_FLAGS(type)	       (G_TYPE_FUNDAMENTAL (type) == G_TYPE_FLAGS)
-
-

Checks whether type - "is a" G_TYPE_FLAGS.

-
-

Parameters

-
----- - - - - - -

type

a GType ID.

 
-
-
-

Returns

-

TRUE if type -"is a" G_TYPE_FLAGS.

-
-
-
-
-

G_FLAGS_CLASS()

-
#define G_FLAGS_CLASS(class)	       (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_FLAGS, GFlagsClass))
-
-

Casts a derived GFlagsClass structure into a GFlagsClass structure.

-
-

Parameters

-
----- - - - - - -

class

a valid GFlagsClass

 
-
-
-
-
-

G_IS_FLAGS_CLASS()

-
#define G_IS_FLAGS_CLASS(class)        (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_FLAGS))
-
-

Checks whether class - "is a" valid GFlagsClass structure of type G_TYPE_FLAGS -or derived.

-
-

Parameters

-
----- - - - - - -

class

a GFlagsClass

 
-
-
-
-
-

G_FLAGS_CLASS_TYPE()

-
#define G_FLAGS_CLASS_TYPE(class)      (G_TYPE_FROM_CLASS (class))
-
-

Get the type identifier from a given GFlagsClass structure.

-
-

Parameters

-
----- - - - - - -

class

a GFlagsClass

 
-
-
-

Returns

-

the GType

-
-
-
-
-

G_FLAGS_CLASS_TYPE_NAME()

-
#define G_FLAGS_CLASS_TYPE_NAME(class) (g_type_name (G_FLAGS_CLASS_TYPE (class)))
-
-

Get the static type name from a given GFlagsClass structure.

-
-

Parameters

-
----- - - - - - -

class

a GFlagsClass

 
-
-
-

Returns

-

the type name.

-
-
-
-
-

g_enum_get_value ()

-
GEnumValue *
-g_enum_get_value (GEnumClass *enum_class,
-                  gint value);
-

Returns the GEnumValue for a value.

-
-

Parameters

-
----- - - - - - - - - - - - - -

enum_class

a GEnumClass

 

value

the value to look up

 
-
-
-

Returns

-

the GEnumValue for value -, or NULL -if value -is not a member of the enumeration.

-

[transfer none]

-
-
-
-
-

g_enum_get_value_by_name ()

-
GEnumValue *
-g_enum_get_value_by_name (GEnumClass *enum_class,
-                          const gchar *name);
-

Looks up a GEnumValue by name.

-
-

Parameters

-
----- - - - - - - - - - - - - -

enum_class

a GEnumClass

 

name

the name to look up

 
-
-
-

Returns

-

the GEnumValue with name name -, -or NULL if the enumeration doesn't have a member -with that name.

-

[transfer none]

-
-
-
-
-

g_enum_get_value_by_nick ()

-
GEnumValue *
-g_enum_get_value_by_nick (GEnumClass *enum_class,
-                          const gchar *nick);
-

Looks up a GEnumValue by nickname.

-
-

Parameters

-
----- - - - - - - - - - - - - -

enum_class

a GEnumClass

 

nick

the nickname to look up

 
-
-
-

Returns

-

the GEnumValue with nickname nick -, -or NULL if the enumeration doesn't have a member -with that nickname.

-

[transfer none]

-
-
-
-
-

g_flags_get_first_value ()

-
GFlagsValue *
-g_flags_get_first_value (GFlagsClass *flags_class,
-                         guint value);
-

Returns the first GFlagsValue which is set in value -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

flags_class

a GFlagsClass

 

value

the value

 
-
-
-

Returns

-

the first GFlagsValue which is set in -value -, or NULL if none is set.

-

[transfer none]

-
-
-
-
-

g_flags_get_value_by_name ()

-
GFlagsValue *
-g_flags_get_value_by_name (GFlagsClass *flags_class,
-                           const gchar *name);
-

Looks up a GFlagsValue by name.

-
-

Parameters

-
----- - - - - - - - - - - - - -

flags_class

a GFlagsClass

 

name

the name to look up

 
-
-
-

Returns

-

the GFlagsValue with name name -, -or NULL if there is no flag with that name.

-

[transfer none]

-
-
-
-
-

g_flags_get_value_by_nick ()

-
GFlagsValue *
-g_flags_get_value_by_nick (GFlagsClass *flags_class,
-                           const gchar *nick);
-

Looks up a GFlagsValue by nickname.

-
-

Parameters

-
----- - - - - - - - - - - - - -

flags_class

a GFlagsClass

 

nick

the nickname to look up

 
-
-
-

Returns

-

the GFlagsValue with nickname nick -, -or NULL if there is no flag with that nickname.

-

[transfer none]

-
-
-
-
-

g_enum_register_static ()

-
GType
-g_enum_register_static (const gchar *name,
-                        const GEnumValue *const_static_values);
-

Registers a new static enumeration type with the name name -.

-

It is normally more convenient to let glib-mkenums, -generate a my_enum_get_type() function from a usual C enumeration -definition than to write one yourself using g_enum_register_static().

-
-

Parameters

-
----- - - - - - - - - - - - - -

name

A nul-terminated string used as the name of the new type.

 

const_static_values

An array of GEnumValue structs for the possible -enumeration values. The array is terminated by a struct with all -members being 0. GObject keeps a reference to the data, so it cannot -be stack-allocated.

 
-
-
-

Returns

-

The new type identifier.

-
-
-
-
-

g_flags_register_static ()

-
GType
-g_flags_register_static (const gchar *name,
-                         const GFlagsValue *const_static_values);
-

Registers a new static flags type with the name name -.

-

It is normally more convenient to let glib-mkenums -generate a my_flags_get_type() function from a usual C enumeration -definition than to write one yourself using g_flags_register_static().

-
-

Parameters

-
----- - - - - - - - - - - - - -

name

A nul-terminated string used as the name of the new type.

 

const_static_values

An array of GFlagsValue structs for the possible -flags values. The array is terminated by a struct with all members being 0. -GObject keeps a reference to the data, so it cannot be stack-allocated.

 
-
-
-

Returns

-

The new type identifier.

-
-
-
-
-

g_enum_complete_type_info ()

-
void
-g_enum_complete_type_info (GType g_enum_type,
-                           GTypeInfo *info,
-                           const GEnumValue *const_values);
-

This function is meant to be called from the complete_type_info -function of a GTypePlugin implementation, as in the following -example:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
static void
-my_enum_complete_type_info (GTypePlugin     *plugin,
-                            GType            g_type,
-                            GTypeInfo       *info,
-                            GTypeValueTable *value_table)
-{
-  static const GEnumValue values[] = {
-    { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" },
-    { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" },
-    { 0, NULL, NULL }
-  };
-
-  g_enum_complete_type_info (type, info, values);
-}
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

g_enum_type

the type identifier of the type being completed

 

info

the GTypeInfo struct to be filled in.

[out callee-allocates]

const_values

An array of GEnumValue structs for the possible -enumeration values. The array is terminated by a struct with all -members being 0.

 
-
-
-
-
-

g_flags_complete_type_info ()

-
void
-g_flags_complete_type_info (GType g_flags_type,
-                            GTypeInfo *info,
-                            const GFlagsValue *const_values);
-

This function is meant to be called from the complete_type_info() -function of a GTypePlugin implementation, see the example for -g_enum_complete_type_info() above.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

g_flags_type

the type identifier of the type being completed

 

info

the GTypeInfo struct to be filled in.

[out callee-allocates]

const_values

An array of GFlagsValue structs for the possible -enumeration values. The array is terminated by a struct with all -members being 0.

 
-
-
-
-
-

Types and Values

-
-

struct GEnumClass

-
struct GEnumClass {
-  GTypeClass  g_type_class;
-
-  gint	      minimum;
-  gint	      maximum;
-  guint	      n_values;
-  GEnumValue *values;
-};
-
-

The class of an enumeration type holds information about its -possible values.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

GTypeClass g_type_class;

the parent class

 

gint minimum;

the smallest possible value.

 

gint maximum;

the largest possible value.

 

guint n_values;

the number of possible values.

 

GEnumValue *values;

an array of GEnumValue structs describing the -individual values.

 
-
-
-
-
-

struct GFlagsClass

-
struct GFlagsClass {
-  GTypeClass   g_type_class;
-  
-  guint	       mask;
-  guint	       n_values;
-  GFlagsValue *values;
-};
-
-

The class of a flags type holds information about its -possible values.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

GTypeClass g_type_class;

the parent class

 

guint mask;

a mask covering all possible values.

 

guint n_values;

the number of possible values.

 

GFlagsValue *values;

an array of GFlagsValue structs describing the -individual values.

 
-
-
-
-
-

struct GEnumValue

-
struct GEnumValue {
-  gint	 value;
-  const gchar *value_name;
-  const gchar *value_nick;
-};
-
-

A structure which contains a single enum value, its name, and its -nickname.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

gint value;

the enum value

 

const gchar *value_name;

the name of the value

 

const gchar *value_nick;

the nickname of the value

 
-
-
-
-
-

struct GFlagsValue

-
struct GFlagsValue {
-  guint	 value;
-  const gchar *value_name;
-  const gchar *value_nick;
-};
-
-

A structure which contains a single flags value, its name, and its -nickname.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

guint value;

the flags value

 

const gchar *value_name;

the name of the value

 

const gchar *value_nick;

the nickname of the value

 
-
-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gobject-GParamSpec.html b/docs/reference/gobject/html/gobject-GParamSpec.html deleted file mode 100644 index 7f9a21d3a..000000000 --- a/docs/reference/gobject/html/gobject-GParamSpec.html +++ /dev/null @@ -1,1991 +0,0 @@ - - - - -GParamSpec: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GParamSpec

-

GParamSpec — Metadata for parameter specifications

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -G_TYPE_IS_PARAM() -
#define -G_PARAM_SPEC() -
#define -G_IS_PARAM_SPEC() -
#define -G_PARAM_SPEC_CLASS() -
#define -G_IS_PARAM_SPEC_CLASS() -
#define -G_PARAM_SPEC_GET_CLASS() -
#define -G_PARAM_SPEC_TYPE() -
#define -G_PARAM_SPEC_TYPE_NAME() -
#define -G_PARAM_SPEC_VALUE_TYPE() -
-GParamSpec * - -g_param_spec_ref () -
-void - -g_param_spec_unref () -
-void - -g_param_spec_sink () -
-GParamSpec * - -g_param_spec_ref_sink () -
const GValue * - -g_param_spec_get_default_value () -
-void - -g_param_value_set_default () -
-gboolean - -g_param_value_defaults () -
-gboolean - -g_param_value_validate () -
-gboolean - -g_param_value_convert () -
-gint - -g_param_values_cmp () -
const gchar * - -g_param_spec_get_name () -
-GQuark - -g_param_spec_get_name_quark () -
const gchar * - -g_param_spec_get_nick () -
const gchar * - -g_param_spec_get_blurb () -
-gpointer - -g_param_spec_get_qdata () -
-void - -g_param_spec_set_qdata () -
-void - -g_param_spec_set_qdata_full () -
-gpointer - -g_param_spec_steal_qdata () -
-GParamSpec * - -g_param_spec_get_redirect_target () -
-gpointer - -g_param_spec_internal () -
-GType - -g_param_type_register_static () -
-GParamSpecPool * - -g_param_spec_pool_new () -
-void - -g_param_spec_pool_insert () -
-void - -g_param_spec_pool_remove () -
-GParamSpec * - -g_param_spec_pool_lookup () -
-GParamSpec ** - -g_param_spec_pool_list () -
-GList * - -g_param_spec_pool_list_owned () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
structGParamSpec
structGParamSpecClass
enumGParamFlags
#defineG_PARAM_STATIC_STRINGS
#defineG_PARAM_MASK
#defineG_PARAM_USER_SHIFT
structGParamSpecTypeInfo
 GParamSpecPool
-
-
-

Includes

-
#include <glib-object.h>
-
-
-
-

Description

-

GParamSpec is an object structure that encapsulates the metadata -required to specify parameters, such as e.g. GObject properties.

-
-

Parameter names

-

Parameter names need to start with a letter (a-z or A-Z). -Subsequent characters can be letters, numbers or a '-'. -All other characters are replaced by a '-' during construction. -The result of this replacement is called the canonical name of -the parameter.

-
-
-
-

Functions

-
-

G_TYPE_IS_PARAM()

-
#define G_TYPE_IS_PARAM(type)		(G_TYPE_FUNDAMENTAL (type) == G_TYPE_PARAM)
-
-

Checks whether type - "is a" G_TYPE_PARAM.

-
-

Parameters

-
----- - - - - - -

type

a GType ID

 
-
-
-
-
-

G_PARAM_SPEC()

-
#define G_PARAM_SPEC(pspec)		(G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM, GParamSpec))
-
-

Casts a derived GParamSpec object (e.g. of type GParamSpecInt) into -a GParamSpec object.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec

 
-
-
-
-
-

G_IS_PARAM_SPEC()

-
#define G_IS_PARAM_SPEC(pspec)		(G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE ((pspec), G_TYPE_PARAM))
-
-

Checks whether pspec - "is a" valid GParamSpec structure of type G_TYPE_PARAM -or derived.

-
-

Parameters

-
----- - - - - - -

pspec

a GParamSpec

 
-
-
-
-
-

G_PARAM_SPEC_CLASS()

-
#define G_PARAM_SPEC_CLASS(pclass)      (G_TYPE_CHECK_CLASS_CAST ((pclass), G_TYPE_PARAM, GParamSpecClass))
-
-

Casts a derived GParamSpecClass structure into a GParamSpecClass structure.

-
-

Parameters

-
----- - - - - - -

pclass

a valid GParamSpecClass

 
-
-
-
-
-

G_IS_PARAM_SPEC_CLASS()

-
#define G_IS_PARAM_SPEC_CLASS(pclass)   (G_TYPE_CHECK_CLASS_TYPE ((pclass), G_TYPE_PARAM))
-
-

Checks whether pclass - "is a" valid GParamSpecClass structure of type -G_TYPE_PARAM or derived.

-
-

Parameters

-
----- - - - - - -

pclass

a GParamSpecClass

 
-
-
-
-
-

G_PARAM_SPEC_GET_CLASS()

-
#define G_PARAM_SPEC_GET_CLASS(pspec) (G_TYPE_INSTANCE_GET_CLASS ((pspec), G_TYPE_PARAM, GParamSpecClass))
-
-

Retrieves the GParamSpecClass of a GParamSpec.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec

 
-
-
-
-
-

G_PARAM_SPEC_TYPE()

-
#define G_PARAM_SPEC_TYPE(pspec) (G_TYPE_FROM_INSTANCE (pspec))
-
-

Retrieves the GType of this pspec -.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec

 
-
-
-
-
-

G_PARAM_SPEC_TYPE_NAME()

-
#define G_PARAM_SPEC_TYPE_NAME(pspec) (g_type_name (G_PARAM_SPEC_TYPE (pspec)))
-
-

Retrieves the GType name of this pspec -.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec

 
-
-
-
-
-

G_PARAM_SPEC_VALUE_TYPE()

-
#define G_PARAM_SPEC_VALUE_TYPE(pspec) (G_PARAM_SPEC (pspec)->value_type)
-
-

Retrieves the GType to initialize a GValue for this parameter.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec

 
-
-
-
-
-

g_param_spec_ref ()

-
GParamSpec *
-g_param_spec_ref (GParamSpec *pspec);
-

Increments the reference count of pspec -.

-

[skip]

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec

 
-
-
-

Returns

-

the GParamSpec that was passed into this function

-
-
-
-
-

g_param_spec_unref ()

-
void
-g_param_spec_unref (GParamSpec *pspec);
-

Decrements the reference count of a pspec -.

-

[skip]

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec

 
-
-
-
-
-

g_param_spec_sink ()

-
void
-g_param_spec_sink (GParamSpec *pspec);
-

The initial reference count of a newly created GParamSpec is 1, -even though no one has explicitly called g_param_spec_ref() on it -yet. So the initial reference count is flagged as "floating", until -someone calls g_param_spec_ref (pspec); g_param_spec_sink -(pspec); in sequence on it, taking over the initial -reference count (thus ending up with a pspec - that has a reference -count of 1 still, but is not flagged "floating" anymore).

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec

 
-
-
-
-
-

g_param_spec_ref_sink ()

-
GParamSpec *
-g_param_spec_ref_sink (GParamSpec *pspec);
-

Convenience function to ref and sink a GParamSpec.

-

[skip]

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec

 
-
-
-

Returns

-

the GParamSpec that was passed into this function

-
-

Since: 2.10

-
-
-
-

g_param_spec_get_default_value ()

-
const GValue *
-g_param_spec_get_default_value (GParamSpec *pspec);
-

Gets the default value of pspec - as a pointer to a GValue.

-

The GValue will remain value for the life of pspec -.

-
-

Parameters

-
----- - - - - - -

pspec

a GParamSpec

 
-
-
-

Returns

-

a pointer to a GValue which must not be modified

-
-

Since: 2.38

-
-
-
-

g_param_value_set_default ()

-
void
-g_param_value_set_default (GParamSpec *pspec,
-                           GValue *value);
-

Sets value - to its default value as specified in pspec -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

pspec

a valid GParamSpec

 

value

a GValue of correct type for pspec -

 
-
-
-
-
-

g_param_value_defaults ()

-
gboolean
-g_param_value_defaults (GParamSpec *pspec,
-                        GValue *value);
-

Checks whether value - contains the default value as specified in pspec -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

pspec

a valid GParamSpec

 

value

a GValue of correct type for pspec -

 
-
-
-

Returns

-

whether value -contains the canonical default for this pspec -

-
-
-
-
-

g_param_value_validate ()

-
gboolean
-g_param_value_validate (GParamSpec *pspec,
-                        GValue *value);
-

Ensures that the contents of value - comply with the specifications -set out by pspec -. For example, a GParamSpecInt might require -that integers stored in value - may not be smaller than -42 and not be -greater than +42. If value - contains an integer outside of this range, -it is modified accordingly, so the resulting value will fit into the -range -42 .. +42.

-
-

Parameters

-
----- - - - - - - - - - - - - -

pspec

a valid GParamSpec

 

value

a GValue of correct type for pspec -

 
-
-
-

Returns

-

whether modifying value -was necessary to ensure validity

-
-
-
-
-

g_param_value_convert ()

-
gboolean
-g_param_value_convert (GParamSpec *pspec,
-                       const GValue *src_value,
-                       GValue *dest_value,
-                       gboolean strict_validation);
-

Transforms src_value - into dest_value - if possible, and then -validates dest_value -, in order for it to conform to pspec -. If -strict_validation - is TRUE this function will only succeed if the -transformed dest_value - complied to pspec - without modifications.

-

See also g_value_type_transformable(), g_value_transform() and -g_param_value_validate().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

pspec

a valid GParamSpec

 

src_value

souce GValue

 

dest_value

destination GValue of correct type for pspec -

 

strict_validation

TRUE requires dest_value -to conform to pspec -without modifications

 
-
-
-

Returns

-

TRUE if transformation and validation were successful, -FALSE otherwise and dest_value -is left untouched.

-
-
-
-
-

g_param_values_cmp ()

-
gint
-g_param_values_cmp (GParamSpec *pspec,
-                    const GValue *value1,
-                    const GValue *value2);
-

Compares value1 - with value2 - according to pspec -, and return -1, 0 or +1, -if value1 - is found to be less than, equal to or greater than value2 -, -respectively.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

pspec

a valid GParamSpec

 

value1

a GValue of correct type for pspec -

 

value2

a GValue of correct type for pspec -

 
-
-
-

Returns

-

-1, 0 or +1, for a less than, equal to or greater than result

-
-
-
-
-

g_param_spec_get_name ()

-
const gchar *
-g_param_spec_get_name (GParamSpec *pspec);
-

Get the name of a GParamSpec.

-

The name is always an "interned" string (as per g_intern_string()). -This allows for pointer-value comparisons.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec

 
-
-
-

Returns

-

the name of pspec -.

-
-
-
-
-

g_param_spec_get_name_quark ()

-
GQuark
-g_param_spec_get_name_quark (GParamSpec *pspec);
-

Gets the GQuark for the name.

-
-

Parameters

-
----- - - - - - -

pspec

a GParamSpec

 
-
-
-

Returns

-

the GQuark for pspec->name -.

-
-

Since: 2.46

-
-
-
-

g_param_spec_get_nick ()

-
const gchar *
-g_param_spec_get_nick (GParamSpec *pspec);
-

Get the nickname of a GParamSpec.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec

 
-
-
-

Returns

-

the nickname of pspec -.

-
-
-
-
-

g_param_spec_get_blurb ()

-
const gchar *
-g_param_spec_get_blurb (GParamSpec *pspec);
-

Get the short description of a GParamSpec.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec

 
-
-
-

Returns

-

the short description of pspec -.

-
-
-
-
-

g_param_spec_get_qdata ()

-
gpointer
-g_param_spec_get_qdata (GParamSpec *pspec,
-                        GQuark quark);
-

Gets back user data pointers stored via g_param_spec_set_qdata().

-
-

Parameters

-
----- - - - - - - - - - - - - -

pspec

a valid GParamSpec

 

quark

a GQuark, naming the user data pointer

 
-
-
-

Returns

-

the user data pointer set, or NULL.

-

[transfer none]

-
-
-
-
-

g_param_spec_set_qdata ()

-
void
-g_param_spec_set_qdata (GParamSpec *pspec,
-                        GQuark quark,
-                        gpointer data);
-

Sets an opaque, named pointer on a GParamSpec. The name is -specified through a GQuark (retrieved e.g. via -g_quark_from_static_string()), and the pointer can be gotten back -from the pspec - with g_param_spec_get_qdata(). Setting a -previously set user data pointer, overrides (frees) the old pointer -set, using NULL as pointer essentially removes the data stored.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

pspec

the GParamSpec to set store a user data pointer

 

quark

a GQuark, naming the user data pointer

 

data

an opaque user data pointer

 
-
-
-
-
-

g_param_spec_set_qdata_full ()

-
void
-g_param_spec_set_qdata_full (GParamSpec *pspec,
-                             GQuark quark,
-                             gpointer data,
-                             GDestroyNotify destroy);
-

This function works like g_param_spec_set_qdata(), but in addition, -a void (*destroy) (gpointer) function may be -specified which is called with data - as argument when the pspec - is -finalized, or the data is being overwritten by a call to -g_param_spec_set_qdata() with the same quark -.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

pspec

the GParamSpec to set store a user data pointer

 

quark

a GQuark, naming the user data pointer

 

data

an opaque user data pointer

 

destroy

function to invoke with data -as argument, when data -needs to -be freed

 
-
-
-
-
-

g_param_spec_steal_qdata ()

-
gpointer
-g_param_spec_steal_qdata (GParamSpec *pspec,
-                          GQuark quark);
-

Gets back user data pointers stored via g_param_spec_set_qdata() -and removes the data - from pspec - without invoking its destroy() -function (if any was set). Usually, calling this function is only -required to update user data pointers with a destroy notifier.

-
-

Parameters

-
----- - - - - - - - - - - - - -

pspec

the GParamSpec to get a stored user data pointer from

 

quark

a GQuark, naming the user data pointer

 
-
-
-

Returns

-

the user data pointer set, or NULL.

-

[transfer none]

-
-
-
-
-

g_param_spec_get_redirect_target ()

-
GParamSpec *
-g_param_spec_get_redirect_target (GParamSpec *pspec);
-

If the paramspec redirects operations to another paramspec, -returns that paramspec. Redirect is used typically for -providing a new implementation of a property in a derived -type while preserving all the properties from the parent -type. Redirection is established by creating a property -of type GParamSpecOverride. See g_object_class_override_property() -for an example of the use of this capability.

-
-

Parameters

-
----- - - - - - -

pspec

a GParamSpec

 
-
-
-

Returns

-

paramspec to which requests on this -paramspec should be redirected, or NULL if none.

-

[transfer none]

-
-

Since: 2.4

-
-
-
-

g_param_spec_internal ()

-
gpointer
-g_param_spec_internal (GType param_type,
-                       const gchar *name,
-                       const gchar *nick,
-                       const gchar *blurb,
-                       GParamFlags flags);
-

Creates a new GParamSpec instance.

-

A property name consists of segments consisting of ASCII letters and -digits, separated by either the '-' or '_' character. The first -character of a property name must be a letter. Names which violate these -rules lead to undefined behaviour.

-

When creating and looking up a GParamSpec, either separator can be -used, but they cannot be mixed. Using '-' is considerably more -efficient and in fact required when using property names as detail -strings for signals.

-

Beyond the name, GParamSpecs have two more descriptive -strings associated with them, the nick -, which should be suitable -for use as a label for the property in a property editor, and the -blurb -, which should be a somewhat longer description, suitable for -e.g. a tooltip. The nick - and blurb - should ideally be localized.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

param_type

the GType for the property; must be derived from G_TYPE_PARAM

 

name

the canonical name of the property

 

nick

the nickname of the property

 

blurb

a short description of the property

 

flags

a combination of GParamFlags

 
-
-
-

Returns

-

a newly allocated GParamSpec instance.

-

[type GObject.ParamSpec]

-
-
-
-
-

g_param_type_register_static ()

-
GType
-g_param_type_register_static (const gchar *name,
-                              const GParamSpecTypeInfo *pspec_info);
-

Registers name - as the name of a new static type derived from -G_TYPE_PARAM. The type system uses the information contained in -the GParamSpecTypeInfo structure pointed to by info - to manage the -GParamSpec type and its instances.

-
-

Parameters

-
----- - - - - - - - - - - - - -

name

0-terminated string used as the name of the new GParamSpec type.

 

pspec_info

The GParamSpecTypeInfo for this GParamSpec type.

 
-
-
-

Returns

-

The new type identifier.

-
-
-
-
-

g_param_spec_pool_new ()

-
GParamSpecPool *
-g_param_spec_pool_new (gboolean type_prefixing);
-

Creates a new GParamSpecPool.

-

If type_prefixing - is TRUE, lookups in the newly created pool will -allow to specify the owner as a colon-separated prefix of the -property name, like "GtkContainer:border-width". This feature is -deprecated, so you should always set type_prefixing - to FALSE.

-
-

Parameters

-
----- - - - - - -

type_prefixing

Whether the pool will support type-prefixed property names.

 
-
-
-

Returns

-

a newly allocated GParamSpecPool.

-

[transfer none]

-
-
-
-
-

g_param_spec_pool_insert ()

-
void
-g_param_spec_pool_insert (GParamSpecPool *pool,
-                          GParamSpec *pspec,
-                          GType owner_type);
-

Inserts a GParamSpec in the pool.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

pool

a GParamSpecPool.

 

pspec

the GParamSpec to insert

 

owner_type

a GType identifying the owner of pspec -

 
-
-
-
-
-

g_param_spec_pool_remove ()

-
void
-g_param_spec_pool_remove (GParamSpecPool *pool,
-                          GParamSpec *pspec);
-

Removes a GParamSpec from the pool.

-
-

Parameters

-
----- - - - - - - - - - - - - -

pool

a GParamSpecPool

 

pspec

the GParamSpec to remove

 
-
-
-
-
-

g_param_spec_pool_lookup ()

-
GParamSpec *
-g_param_spec_pool_lookup (GParamSpecPool *pool,
-                          const gchar *param_name,
-                          GType owner_type,
-                          gboolean walk_ancestors);
-

Looks up a GParamSpec in the pool.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

pool

a GParamSpecPool

 

param_name

the name to look for

 

owner_type

the owner to look for

 

walk_ancestors

If TRUE, also try to find a GParamSpec with param_name -owned by an ancestor of owner_type -.

 
-
-
-

Returns

-

The found GParamSpec, or NULL if no -matching GParamSpec was found.

-

[transfer none]

-
-
-
-
-

g_param_spec_pool_list ()

-
GParamSpec **
-g_param_spec_pool_list (GParamSpecPool *pool,
-                        GType owner_type,
-                        guint *n_pspecs_p);
-

Gets an array of all GParamSpecs owned by owner_type - in -the pool.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

pool

a GParamSpecPool

 

owner_type

the owner to look for

 

n_pspecs_p

return location for the length of the returned array.

[out]
-
-
-

Returns

-

a newly -allocated array containing pointers to all GParamSpecs -owned by owner_type -in the pool.

-

[array length=n_pspecs_p][transfer container]

-
-
-
-
-

g_param_spec_pool_list_owned ()

-
GList *
-g_param_spec_pool_list_owned (GParamSpecPool *pool,
-                              GType owner_type);
-

Gets an GList of all GParamSpecs owned by owner_type - in -the pool.

-
-

Parameters

-
----- - - - - - - - - - - - - -

pool

a GParamSpecPool

 

owner_type

the owner to look for

 
-
-
-

Returns

-

a -GList of all GParamSpecs owned by owner_type -in -the poolGParamSpecs.

-

[transfer container][element-type GObject.ParamSpec]

-
-
-
-
-

Types and Values

-
-

struct GParamSpec

-
struct GParamSpec {
-  GTypeInstance  g_type_instance;
-
-  const gchar   *name;          /* interned string */
-  GParamFlags    flags;
-  GType		 value_type;
-  GType		 owner_type; /* class or interface using this property */
-};
-
-

All other fields of the GParamSpec struct are private and -should not be used directly.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

GTypeInstance g_type_instance;

private GTypeInstance portion

 

const gchar *name;

name of this parameter: always an interned string

 

GParamFlags flags;

GParamFlags flags for this parameter

 

GType value_type;

the GValue type for this parameter

 

GType owner_type;

GType type that uses (introduces) this parameter

 
-
-
-
-
-

struct GParamSpecClass

-
struct GParamSpecClass {
-  GTypeClass      g_type_class;
-
-  GType		  value_type;
-
-  void	        (*finalize)		(GParamSpec   *pspec);
-
-  /* GParam methods */
-  void          (*value_set_default)    (GParamSpec   *pspec,
-					 GValue       *value);
-  gboolean      (*value_validate)       (GParamSpec   *pspec,
-					 GValue       *value);
-  gint          (*values_cmp)           (GParamSpec   *pspec,
-					 const GValue *value1,
-					 const GValue *value2);
-};
-
-

The class structure for the GParamSpec type. -Normally, GParamSpec classes are filled by -g_param_type_register_static().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

GTypeClass g_type_class;

the parent class

 

GType value_type;

the GValue type for this parameter

 

finalize ()

The instance finalization function (optional), should chain -up to the finalize method of the parent class.

 

value_set_default ()

Resets a value -to the default value for this type -(recommended, the default is g_value_reset()), see -g_param_value_set_default().

 

value_validate ()

Ensures that the contents of value -comply with the -specifications set out by this type (optional), see -g_param_value_validate().

 

values_cmp ()

Compares value1 -with value2 -according to this type -(recommended, the default is memcmp()), see g_param_values_cmp().

 
-
-
-
-
-

enum GParamFlags

-

Through the GParamFlags flag values, certain aspects of parameters -can be configured. See also G_PARAM_STATIC_STRINGS.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_PARAM_READABLE

-

the parameter is readable

-
 

G_PARAM_WRITABLE

-

the parameter is writable

-
 

G_PARAM_READWRITE

-

alias for G_PARAM_READABLE | G_PARAM_WRITABLE

-
 

G_PARAM_CONSTRUCT

-

the parameter will be set upon object construction

-
 

G_PARAM_CONSTRUCT_ONLY

-

the parameter can only be set upon object construction

-
 

G_PARAM_LAX_VALIDATION

-

upon parameter conversion (see g_param_value_convert()) - strict validation is not required

-
 

G_PARAM_STATIC_NAME

-

the string used as name when constructing the - parameter is guaranteed to remain valid and - unmodified for the lifetime of the parameter. - Since 2.8

-
 

G_PARAM_PRIVATE

-

internal

-
 

G_PARAM_STATIC_NICK

-

the string used as nick when constructing the - parameter is guaranteed to remain valid and - unmmodified for the lifetime of the parameter. - Since 2.8

-
 

G_PARAM_STATIC_BLURB

-

the string used as blurb when constructing the - parameter is guaranteed to remain valid and - unmodified for the lifetime of the parameter. - Since 2.8

-
 

G_PARAM_EXPLICIT_NOTIFY

-

calls to g_object_set_property() for this - property will not automatically result in a "notify" signal being - emitted: the implementation must call g_object_notify() themselves - in case the property actually changes. Since: 2.42.

-
 

G_PARAM_DEPRECATED

-

the parameter is deprecated and will be removed - in a future version. A warning will be generated if it is used - while running with G_ENABLE_DIAGNOSTIC=1. - Since 2.26

-
 
-
-
-
-
-

G_PARAM_STATIC_STRINGS

-
#define G_PARAM_STATIC_STRINGS (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)
-
-

GParamFlags value alias for G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB.

-

Since 2.13.0

-
-
-
-

G_PARAM_MASK

-
#define G_PARAM_MASK		(0x000000ff)
-
-

Mask containing the bits of GParamSpec.flags which are reserved for GLib.

-
-
-
-

G_PARAM_USER_SHIFT

-
#define G_PARAM_USER_SHIFT (8)
-
-

Minimum shift count to be used for user defined flags, to be stored in -GParamSpec.flags. The maximum allowed is 10.

-
-
-
-

struct GParamSpecTypeInfo

-
struct GParamSpecTypeInfo {
-  /* type system portion */
-  guint16         instance_size;                               /* obligatory */
-  guint16         n_preallocs;                                 /* optional */
-  void		(*instance_init) (GParamSpec   *pspec); /* optional */
-
-  /* class portion */
-  GType           value_type;				       /* obligatory */
-  void          (*finalize)             (GParamSpec   *pspec); /* optional */
-  void          (*value_set_default)    (GParamSpec   *pspec,  /* recommended */
-					 GValue       *value);
-  gboolean      (*value_validate)       (GParamSpec   *pspec,  /* optional */
-					 GValue       *value);
-  gint          (*values_cmp)           (GParamSpec   *pspec,  /* recommended */
-					 const GValue *value1,
-					 const GValue *value2);
-};
-
-

This structure is used to provide the type system with the information -required to initialize and destruct (finalize) a parameter's class and -instances thereof. -The initialized structure is passed to the g_param_type_register_static() -The type system will perform a deep copy of this structure, so its memory -does not need to be persistent across invocation of -g_param_type_register_static().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint16 instance_size;

Size of the instance (object) structure.

 

guint16 n_preallocs;

Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the slice allocator now.

 

instance_init ()

Location of the instance initialization function (optional).

 

GType value_type;

The GType of values conforming to this GParamSpec

 

finalize ()

The instance finalization function (optional).

 

value_set_default ()

Resets a value -to the default value for pspec -(recommended, the default is g_value_reset()), see -g_param_value_set_default().

 

value_validate ()

Ensures that the contents of value -comply with the -specifications set out by pspec -(optional), see -g_param_value_validate().

 

values_cmp ()

Compares value1 -with value2 -according to pspec -(recommended, the default is memcmp()), see g_param_values_cmp().

 
-
-
-
-
-

GParamSpecPool

-
typedef struct _GParamSpecPool GParamSpecPool;
-

A GParamSpecPool maintains a collection of GParamSpecs which can be -quickly accessed by owner and name. The implementation of the GObject property -system uses such a pool to store the GParamSpecs of the properties all object -types.

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gobject-Generic-values.html b/docs/reference/gobject/html/gobject-Generic-values.html deleted file mode 100644 index 56b38e256..000000000 --- a/docs/reference/gobject/html/gobject-Generic-values.html +++ /dev/null @@ -1,1089 +0,0 @@ - - - - -Generic values: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Generic values

-

Generic values — A polymorphic type that can hold values of any - other type

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -G_VALUE_HOLDS() -
#define -G_VALUE_TYPE() -
#define -G_VALUE_TYPE_NAME() -
#define -G_TYPE_IS_VALUE() -
#define -G_TYPE_IS_VALUE_ABSTRACT() -
#define -G_IS_VALUE() -
-GValue * - -g_value_init () -
-void - -g_value_copy () -
-GValue * - -g_value_reset () -
-void - -g_value_unset () -
-void - -g_value_init_from_instance () -
-void - -g_value_set_instance () -
-gboolean - -g_value_fits_pointer () -
-gpointer - -g_value_peek_pointer () -
-gboolean - -g_value_type_compatible () -
-gboolean - -g_value_type_transformable () -
-gboolean - -g_value_transform () -
-void - -(*GValueTransform) () -
-void - -g_value_register_transform_func () -
-gchar * - -g_strdup_value_contents () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - -
#defineG_VALUE_INIT
 GValue
#defineG_TYPE_VALUE
#defineG_TYPE_VALUE_ARRAY
-
-
-

Includes

-
#include <glib-object.h>
-
-
-
-

Description

-

The GValue structure is basically a variable container that consists -of a type identifier and a specific value of that type. -The type identifier within a GValue structure always determines the -type of the associated value. -To create a undefined GValue structure, simply create a zero-filled -GValue structure. To initialize the GValue, use the g_value_init() -function. A GValue cannot be used until it is initialized. -The basic type operations (such as freeing and copying) are determined -by the GTypeValueTable associated with the type ID stored in the GValue. -Other GValue operations (such as converting values between types) are -provided by this interface.

-

The code in the example program below demonstrates GValue's -features.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
#include <glib-object.h>
-
-static void
-int2string (const GValue *src_value,
-            GValue       *dest_value)
-{
-  if (g_value_get_int (src_value) == 42)
-    g_value_set_static_string (dest_value, "An important number");
-  else
-    g_value_set_static_string (dest_value, "What's that?");
-}
-
-int
-main (int   argc,
-      char *argv[])
-{
-  // GValues must be initialized
-  GValue a = G_VALUE_INIT;
-  GValue b = G_VALUE_INIT;
-  const gchar *message;
-
-  // The GValue starts empty
-  g_assert (!G_VALUE_HOLDS_STRING (&a));
-
-  // Put a string in it
-  g_value_init (&a, G_TYPE_STRING);
-  g_assert (G_VALUE_HOLDS_STRING (&a));
-  g_value_set_static_string (&a, "Hello, world!");
-  g_printf ("%s\n", g_value_get_string (&a));
-
-  // Reset it to its pristine state
-  g_value_unset (&a);
-
-  // It can then be reused for another type
-  g_value_init (&a, G_TYPE_INT);
-  g_value_set_int (&a, 42);
-
-  // Attempt to transform it into a GValue of type STRING
-  g_value_init (&b, G_TYPE_STRING);
-
-  // An INT is transformable to a STRING
-  g_assert (g_value_type_transformable (G_TYPE_INT, G_TYPE_STRING));
-
-  g_value_transform (&a, &b);
-  g_printf ("%s\n", g_value_get_string (&b));
-
-  // Attempt to transform it again using a custom transform function
-  g_value_register_transform_func (G_TYPE_INT, G_TYPE_STRING, int2string);
-  g_value_transform (&a, &b);
-  g_printf ("%s\n", g_value_get_string (&b));
-  return 0;
-}
-
- -

-
-
-

Functions

-
-

G_VALUE_HOLDS()

-
#define G_VALUE_HOLDS(value,type) (G_TYPE_CHECK_VALUE_TYPE ((value), (type)))
-
-

Checks if value - holds (or contains) a value of type -. -This macro will also check for value - != NULL and issue a -warning if the check fails.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

A GValue structure.

 

type

A GType value.

 
-
-
-

Returns

-

TRUE if value -holds the type -.

-
-
-
-
-

G_VALUE_TYPE()

-
#define G_VALUE_TYPE(value)		(((GValue*) (value))->g_type)
-
-

Get the type identifier of value -.

-
-

Parameters

-
----- - - - - - -

value

A GValue structure.

 
-
-
-

Returns

-

the GType.

-
-
-
-
-

G_VALUE_TYPE_NAME()

-
#define G_VALUE_TYPE_NAME(value) (g_type_name (G_VALUE_TYPE (value)))
-
-

Gets the type name of value -.

-
-

Parameters

-
----- - - - - - -

value

A GValue structure.

 
-
-
-

Returns

-

the type name.

-
-
-
-
-

G_TYPE_IS_VALUE()

-
#define G_TYPE_IS_VALUE(type)		(g_type_check_is_value_type (type))
-
-

Checks whether the passed in type ID can be used for g_value_init(). -That is, this macro checks whether this type provides an implementation -of the GTypeValueTable functions required for a type to create a GValue of.

-
-

Parameters

-
----- - - - - - -

type

A GType value.

 
-
-
-

Returns

-

Whether type -is suitable as a GValue type.

-
-
-
-
-

G_TYPE_IS_VALUE_ABSTRACT()

-
#define G_TYPE_IS_VALUE_ABSTRACT(type)          (g_type_test_flags ((type), G_TYPE_FLAG_VALUE_ABSTRACT))
-
-

Checks if type - is an abstract value type. An abstract value type introduces -a value table, but can't be used for g_value_init() and is normally used as -an abstract base type for derived value types.

-
-

Parameters

-
----- - - - - - -

type

A GType value

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

G_IS_VALUE()

-
#define G_IS_VALUE(value)		(G_TYPE_CHECK_VALUE (value))
-
-

Checks if value - is a valid and initialized GValue structure.

-
-

Parameters

-
----- - - - - - -

value

A GValue structure.

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_value_init ()

-
GValue *
-g_value_init (GValue *value,
-              GType g_type);
-

Initializes value - with the default value of type -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

A zero-filled (uninitialized) GValue structure.

 

g_type

Type the GValue should hold values of.

 
-
-
-

Returns

-

the GValue structure that has been passed in.

-

[transfer none]

-
-
-
-
-

g_value_copy ()

-
void
-g_value_copy (const GValue *src_value,
-              GValue *dest_value);
-

Copies the value of src_value - into dest_value -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

src_value

An initialized GValue structure.

 

dest_value

An initialized GValue structure of the same type as src_value -.

 
-
-
-
-
-

g_value_reset ()

-
GValue *
-g_value_reset (GValue *value);
-

Clears the current value in value - and resets it to the default value -(as if the value had just been initialized).

-
-

Parameters

-
----- - - - - - -

value

An initialized GValue structure.

 
-
-
-

Returns

-

the GValue structure that has been passed in

-
-
-
-
-

g_value_unset ()

-
void
-g_value_unset (GValue *value);
-

Clears the current value in value - (if any) and "unsets" the type, -this releases all resources associated with this GValue. An unset -value is the same as an uninitialized (zero-filled) GValue -structure.

-
-

Parameters

-
----- - - - - - -

value

An initialized GValue structure.

 
-
-
-
-
-

g_value_init_from_instance ()

-
void
-g_value_init_from_instance (GValue *value,
-                            gpointer instance);
-

Initializes and sets value - from an instantiatable type via the -value_table's collect_value() function.

-

Note: The value - will be initialised with the exact type of -instance -. If you wish to set the value -'s type to a different GType -(such as a parent class GType), you need to manually call -g_value_init() and g_value_set_instance().

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

An uninitialized GValue structure.

 

instance

the instance.

[type GObject.TypeInstance]
-
-

Since: 2.42

-
-
-
-

g_value_set_instance ()

-
void
-g_value_set_instance (GValue *value,
-                      gpointer instance);
-

Sets value - from an instantiatable type via the -value_table's collect_value() function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

An initialized GValue structure.

 

instance

the instance.

[nullable]
-
-
-
-
-

g_value_fits_pointer ()

-
gboolean
-g_value_fits_pointer (const GValue *value);
-

Determines if value - will fit inside the size of a pointer value. -This is an internal function introduced mainly for C marshallers.

-
-

Parameters

-
----- - - - - - -

value

An initialized GValue structure.

 
-
-
-

Returns

-

TRUE if value -will fit inside a pointer value.

-
-
-
-
-

g_value_peek_pointer ()

-
gpointer
-g_value_peek_pointer (const GValue *value);
-

Returns the value contents as pointer. This function asserts that -g_value_fits_pointer() returned TRUE for the passed in value. -This is an internal function introduced mainly for C marshallers.

-
-

Parameters

-
----- - - - - - -

value

An initialized GValue structure

 
-
-
-

Returns

-

the value contents as pointer.

-

[transfer none]

-
-
-
-
-

g_value_type_compatible ()

-
gboolean
-g_value_type_compatible (GType src_type,
-                         GType dest_type);
-

Returns whether a GValue of type src_type - can be copied into -a GValue of type dest_type -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

src_type

source type to be copied.

 

dest_type

destination type for copying.

 
-
-
-

Returns

-

TRUE if g_value_copy() is possible with src_type -and dest_type -.

-
-
-
-
-

g_value_type_transformable ()

-
gboolean
-g_value_type_transformable (GType src_type,
-                            GType dest_type);
-

Check whether g_value_transform() is able to transform values -of type src_type - into values of type dest_type -. Note that for -the types to be transformable, they must be compatible or a -transformation function must be registered.

-
-

Parameters

-
----- - - - - - - - - - - - - -

src_type

Source type.

 

dest_type

Target type.

 
-
-
-

Returns

-

TRUE if the transformation is possible, FALSE otherwise.

-
-
-
-
-

g_value_transform ()

-
gboolean
-g_value_transform (const GValue *src_value,
-                   GValue *dest_value);
-

Tries to cast the contents of src_value - into a type appropriate -to store in dest_value -, e.g. to transform a G_TYPE_INT value -into a G_TYPE_FLOAT value. Performing transformations between -value types might incur precision lossage. Especially -transformations into strings might reveal seemingly arbitrary -results and shouldn't be relied upon for production code (such -as rcfile value or object property serialization).

-
-

Parameters

-
----- - - - - - - - - - - - - -

src_value

Source value.

 

dest_value

Target value.

 
-
-
-

Returns

-

Whether a transformation rule was found and could be applied. -Upon failing transformations, dest_value -is left untouched.

-
-
-
-
-

GValueTransform ()

-
void
-(*GValueTransform) (const GValue *src_value,
-                    GValue *dest_value);
-

The type of value transformation functions which can be registered with -g_value_register_transform_func().

-
-

Parameters

-
----- - - - - - - - - - - - - -

src_value

Source value.

 

dest_value

Target value.

 
-
-
-
-
-

g_value_register_transform_func ()

-
void
-g_value_register_transform_func (GType src_type,
-                                 GType dest_type,
-                                 GValueTransform transform_func);
-

Registers a value transformation function for use in g_value_transform(). -A previously registered transformation function for src_type - and dest_type - -will be replaced.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

src_type

Source type.

 

dest_type

Target type.

 

transform_func

a function which transforms values of type src_type -into value of type dest_type -

 
-
-
-
-
-

g_strdup_value_contents ()

-
gchar *
-g_strdup_value_contents (const GValue *value);
-

Return a newly allocated string, which describes the contents of a -GValue. The main purpose of this function is to describe GValue -contents for debugging output, the way in which the contents are -described may change between different GLib versions.

-
-

Parameters

-
----- - - - - - -

value

GValue which contents are to be described.

 
-
-
-

Returns

-

Newly allocated string.

-
-
-
-
-

Types and Values

-
-

G_VALUE_INIT

-
#define G_VALUE_INIT  { 0, { { 0 } } }
-
-

A GValue must be initialized before it can be used. This macro can -be used as initializer instead of an explicit { 0 } when declaring -a variable, but it cannot be assigned to a variable.

-
- - - - - - - -
1
GValue value = G_VALUE_INIT;
-
- -

-

Since: 2.30

-
-
-
-

GValue

-
typedef struct {
-} GValue;
-
-

An opaque structure used to hold different types of values. -The data within the structure has protected scope: it is accessible only -to functions within a GTypeValueTable structure, or implementations of -the g_value_*() API. That is, code portions which implement new fundamental -types. -GValue users cannot make any assumptions about how data is stored -within the 2 element data - union, and the g_type - member should -only be accessed through the G_VALUE_TYPE() macro.

-
-
-
-

G_TYPE_VALUE

-
#define G_TYPE_VALUE (g_value_get_type ())
-
-

The type ID of the "GValue" type which is a boxed type, -used to pass around pointers to GValues.

-
-
-
-

G_TYPE_VALUE_ARRAY

-
#define G_TYPE_VALUE_ARRAY (g_value_array_get_type ())
-
-
-

G_TYPE_VALUE_ARRAY has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use GArray instead of GValueArray

-
-

The type ID of the "GValueArray" type which is a boxed type, -used to pass around pointers to GValueArrays.

-
-
-
-

See Also

-

The fundamental types which all support GValue - operations and thus can be used as a type initializer for - g_value_init() are defined by a separate interface. See the - standard values API - for details

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gobject-Signals.html b/docs/reference/gobject/html/gobject-Signals.html deleted file mode 100644 index 2857a444e..000000000 --- a/docs/reference/gobject/html/gobject-Signals.html +++ /dev/null @@ -1,3440 +0,0 @@ - - - - -Signals: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Signals

-

Signals — A means for customization of object behaviour - and a general purpose notification mechanism

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-gboolean - -(*GSignalAccumulator) () -
-gboolean - -(*GSignalEmissionHook) () -
-guint - -g_signal_new () -
-guint - -g_signal_newv () -
-guint - -g_signal_new_valist () -
-void - -g_signal_set_va_marshaller () -
-void - -g_signal_query () -
-guint - -g_signal_lookup () -
const gchar * - -g_signal_name () -
-guint * - -g_signal_list_ids () -
-void - -g_signal_emit () -
-void - -g_signal_emit_by_name () -
-void - -g_signal_emitv () -
-void - -g_signal_emit_valist () -
#define -g_signal_connect() -
#define -g_signal_connect_after() -
#define -g_signal_connect_swapped() -
-gulong - -g_signal_connect_object () -
-gulong - -g_signal_connect_data () -
-gulong - -g_signal_connect_closure () -
-gulong - -g_signal_connect_closure_by_id () -
-void - -g_signal_handler_block () -
-void - -g_signal_handler_unblock () -
-void - -g_signal_handler_disconnect () -
-gulong - -g_signal_handler_find () -
-guint - -g_signal_handlers_block_matched () -
-guint - -g_signal_handlers_unblock_matched () -
-guint - -g_signal_handlers_disconnect_matched () -
-gboolean - -g_signal_handler_is_connected () -
#define -g_signal_handlers_block_by_func() -
#define -g_signal_handlers_unblock_by_func() -
#define -g_signal_handlers_disconnect_by_func() -
#define -g_signal_handlers_disconnect_by_data() -
-gboolean - -g_signal_has_handler_pending () -
-void - -g_signal_stop_emission () -
-void - -g_signal_stop_emission_by_name () -
-void - -g_signal_override_class_closure () -
-void - -g_signal_chain_from_overridden () -
-guint - -g_signal_new_class_handler () -
-void - -g_signal_override_class_handler () -
-void - -g_signal_chain_from_overridden_handler () -
-gulong - -g_signal_add_emission_hook () -
-void - -g_signal_remove_emission_hook () -
-gboolean - -g_signal_parse_name () -
-GSignalInvocationHint * - -g_signal_get_invocation_hint () -
-GClosure * - -g_signal_type_cclosure_new () -
-gboolean - -g_signal_accumulator_first_wins () -
-gboolean - -g_signal_accumulator_true_handled () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
structGSignalInvocationHint
typedefGSignalCMarshaller
typedefGSignalCVaMarshaller
enumGSignalFlags
enumGSignalMatchType
structGSignalQuery
#defineG_SIGNAL_TYPE_STATIC_SCOPE
#defineG_SIGNAL_MATCH_MASK
#defineG_SIGNAL_FLAGS_MASK
enumGConnectFlags
-
-
-

Includes

-
#include <glib-object.h>
-
-
-
-

Description

-

The basic concept of the signal system is that of the emission -of a signal. Signals are introduced per-type and are identified -through strings. Signals introduced for a parent type are available -in derived types as well, so basically they are a per-type facility -that is inherited.

-

A signal emission mainly involves invocation of a certain set of -callbacks in precisely defined manner. There are two main categories -of such callbacks, per-object ones and user provided ones. -(Although signals can deal with any kind of instantiatable type, I'm -referring to those types as "object types" in the following, simply -because that is the context most users will encounter signals in.) -The per-object callbacks are most often referred to as "object method -handler" or "default (signal) handler", while user provided callbacks are -usually just called "signal handler".

-

The object method handler is provided at signal creation time (this most -frequently happens at the end of an object class' creation), while user -provided handlers are frequently connected and disconnected to/from a -certain signal on certain object instances.

-

A signal emission consists of five stages, unless prematurely stopped:

-
    -
  1. Invocation of the object method handler for G_SIGNAL_RUN_FIRST signals

  2. -
  3. Invocation of normal user-provided signal handlers (where the after - -flag is not set)

  4. -
  5. Invocation of the object method handler for G_SIGNAL_RUN_LAST signals

  6. -
  7. Invocation of user provided signal handlers (where the after - flag is set)

  8. -
  9. Invocation of the object method handler for G_SIGNAL_RUN_CLEANUP signals

  10. -
-

The user-provided signal handlers are called in the order they were -connected in.

-

All handlers may prematurely stop a signal emission, and any number of -handlers may be connected, disconnected, blocked or unblocked during -a signal emission.

-

There are certain criteria for skipping user handlers in stages 2 and 4 -of a signal emission.

-

First, user handlers may be blocked. Blocked handlers are omitted during -callback invocation, to return from the blocked state, a handler has to -get unblocked exactly the same amount of times it has been blocked before.

-

Second, upon emission of a G_SIGNAL_DETAILED signal, an additional -detail - argument passed in to g_signal_emit() has to match the detail -argument of the signal handler currently subject to invocation. -Specification of no detail argument for signal handlers (omission of the -detail part of the signal specification upon connection) serves as a -wildcard and matches any detail argument passed in to emission.

-
-

Memory management of signal handlers

-

If you are connecting handlers to signals and using a GObject instance as -your signal handler user data, you should remember to pair calls to -g_signal_connect() with calls to g_signal_handler_disconnect() or -g_signal_handlers_disconnect_by_func(). While signal handlers are -automatically disconnected when the object emitting the signal is finalised, -they are not automatically disconnected when the signal handler user data is -destroyed. If this user data is a GObject instance, using it from a -signal handler after it has been finalised is an error.

-

There are two strategies for managing such user data. The first is to -disconnect the signal handler (using g_signal_handler_disconnect() or -g_signal_handlers_disconnect_by_func()) when the user data (object) is -finalised; this has to be implemented manually. For non-threaded programs, -g_signal_connect_object() can be used to implement this automatically. -Currently, however, it is unsafe to use in threaded programs.

-

The second is to hold a strong reference on the user data until after the -signal is disconnected for other reasons. This can be implemented -automatically using g_signal_connect_data().

-

The first approach is recommended, as the second approach can result in -effective memory leaks of the user data if the signal handler is never -disconnected for some reason.

-
-
-
-

Functions

-
-

GSignalAccumulator ()

-
gboolean
-(*GSignalAccumulator) (GSignalInvocationHint *ihint,
-                       GValue *return_accu,
-                       const GValue *handler_return,
-                       gpointer data);
-

The signal accumulator is a special callback function that can be used -to collect return values of the various callbacks that are called -during a signal emission. The signal accumulator is specified at signal -creation time, if it is left NULL, no accumulation of callback return -values is performed. The return value of signal emissions is then the -value returned by the last callback.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

ihint

Signal invocation hint, see GSignalInvocationHint.

 

return_accu

Accumulator to collect callback return values in, this -is the return value of the current signal emission.

 

handler_return

A GValue holding the return value of the signal handler.

 

data

Callback data that was specified when creating the signal.

 
-
-
-

Returns

-

The accumulator function returns whether the signal emission -should be aborted. Returning FALSE means to abort the -current emission and TRUE is returned for continuation.

-
-
-
-
-

GSignalEmissionHook ()

-
gboolean
-(*GSignalEmissionHook) (GSignalInvocationHint *ihint,
-                        guint n_param_values,
-                        const GValue *param_values,
-                        gpointer data);
-

A simple function pointer to get invoked when the signal is emitted. This -allows you to tie a hook to the signal type, so that it will trap all -emissions of that signal, from any object.

-

You may not attach these to signals created with the G_SIGNAL_NO_HOOKS flag.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

ihint

Signal invocation hint, see GSignalInvocationHint.

 

n_param_values

the number of parameters to the function, including -the instance on which the signal was emitted.

 

param_values

the instance on which -the signal was emitted, followed by the parameters of the emission.

[array length=n_param_values]

data

user data associated with the hook.

 
-
-
-

Returns

-

whether it wants to stay connected. If it returns FALSE, the signal -hook is disconnected (and destroyed).

-
-
-
-
-

g_signal_new ()

-
guint
-g_signal_new (const gchar *signal_name,
-              GType itype,
-              GSignalFlags signal_flags,
-              guint class_offset,
-              GSignalAccumulator accumulator,
-              gpointer accu_data,
-              GSignalCMarshaller c_marshaller,
-              GType return_type,
-              guint n_params,
-              ...);
-

Creates a new signal. (This is usually done in the class initializer.)

-

A signal name consists of segments consisting of ASCII letters and -digits, separated by either the '-' or '_' character. The first -character of a signal name must be a letter. Names which violate these -rules lead to undefined behaviour of the GSignal system.

-

When registering a signal and looking up a signal, either separator can -be used, but they cannot be mixed.

-

If 0 is used for class_offset - subclasses cannot override the class handler -in their class_init method by doing super_class->signal_handler = my_signal_handler. -Instead they will have to use g_signal_override_class_handler().

-

If c_marshaller is NULL, g_cclosure_marshal_generic() will be used as -the marshaller for this signal.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

signal_name

the name for the signal

 

itype

the type this signal pertains to. It will also pertain to -types which are derived from this type.

 

signal_flags

a combination of GSignalFlags specifying detail of when -the default handler is to be invoked. You should at least specify -G_SIGNAL_RUN_FIRST or G_SIGNAL_RUN_LAST.

 

class_offset

The offset of the function pointer in the class structure -for this type. Used to invoke a class method generically. Pass 0 to -not associate a class method slot with this signal.

 

accumulator

the accumulator for this signal; may be NULL.

 

accu_data

user data for the accumulator -.

 

c_marshaller

the function to translate arrays of parameter -values to signal emissions into C language callback invocations or NULL.

[nullable]

return_type

the type of return value, or G_TYPE_NONE for a signal -without a return value.

 

n_params

the number of parameter types to follow.

 

...

a list of types, one for each parameter.

 
-
-
-

Returns

-

the signal id

-
-
-
-
-

g_signal_newv ()

-
guint
-g_signal_newv (const gchar *signal_name,
-               GType itype,
-               GSignalFlags signal_flags,
-               GClosure *class_closure,
-               GSignalAccumulator accumulator,
-               gpointer accu_data,
-               GSignalCMarshaller c_marshaller,
-               GType return_type,
-               guint n_params,
-               GType *param_types);
-

Creates a new signal. (This is usually done in the class initializer.)

-

See g_signal_new() for details on allowed signal names.

-

If c_marshaller is NULL, g_cclosure_marshal_generic() will be used as -the marshaller for this signal.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

signal_name

the name for the signal

 

itype

the type this signal pertains to. It will also pertain to -types which are derived from this type

 

signal_flags

a combination of GSignalFlags specifying detail of when -the default handler is to be invoked. You should at least specify -G_SIGNAL_RUN_FIRST or G_SIGNAL_RUN_LAST

 

class_closure

The closure to invoke on signal emission; -may be NULL.

[nullable]

accumulator

the accumulator for this signal; may be NULL.

[nullable]

accu_data

user data for the accumulator -

 

c_marshaller

the function to translate arrays of -parameter values to signal emissions into C language callback -invocations or NULL.

[nullable]

return_type

the type of return value, or G_TYPE_NONE for a signal -without a return value

 

n_params

the length of param_types -

 

param_types

an array of types, one for -each parameter.

[array length=n_params]
-
-
-

Returns

-

the signal id

-
-
-
-
-

g_signal_new_valist ()

-
guint
-g_signal_new_valist (const gchar *signal_name,
-                     GType itype,
-                     GSignalFlags signal_flags,
-                     GClosure *class_closure,
-                     GSignalAccumulator accumulator,
-                     gpointer accu_data,
-                     GSignalCMarshaller c_marshaller,
-                     GType return_type,
-                     guint n_params,
-                     va_list args);
-

Creates a new signal. (This is usually done in the class initializer.)

-

See g_signal_new() for details on allowed signal names.

-

If c_marshaller is NULL, g_cclosure_marshal_generic() will be used as -the marshaller for this signal.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

signal_name

the name for the signal

 

itype

the type this signal pertains to. It will also pertain to -types which are derived from this type.

 

signal_flags

a combination of GSignalFlags specifying detail of when -the default handler is to be invoked. You should at least specify -G_SIGNAL_RUN_FIRST or G_SIGNAL_RUN_LAST.

 

class_closure

The closure to invoke on signal emission; may be NULL.

 

accumulator

the accumulator for this signal; may be NULL.

 

accu_data

user data for the accumulator -.

 

c_marshaller

the function to translate arrays of parameter -values to signal emissions into C language callback invocations or NULL.

[nullable]

return_type

the type of return value, or G_TYPE_NONE for a signal -without a return value.

 

n_params

the number of parameter types in args -.

 

args

va_list of GType, one for each parameter.

 
-
-
-

Returns

-

the signal id

-
-
-
-
-

g_signal_set_va_marshaller ()

-
void
-g_signal_set_va_marshaller (guint signal_id,
-                            GType instance_type,
-                            GSignalCVaMarshaller va_marshaller);
-

Change the GSignalCVaMarshaller used for a given signal. This is a -specialised form of the marshaller that can often be used for the -common case of a single connected signal handler and avoids the -overhead of GValue. Its use is optional.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

signal_id

the signal id

 

instance_type

the instance type on which to set the marshaller.

 

va_marshaller

the marshaller to set.

 
-
-

Since: 2.32

-
-
-
-

g_signal_query ()

-
void
-g_signal_query (guint signal_id,
-                GSignalQuery *query);
-

Queries the signal system for in-depth information about a -specific signal. This function will fill in a user-provided -structure to hold signal-specific information. If an invalid -signal id is passed in, the signal_id - member of the GSignalQuery -is 0. All members filled into the GSignalQuery structure should -be considered constant and have to be left untouched.

-
-

Parameters

-
----- - - - - - - - - - - - - -

signal_id

The signal id of the signal to query information for.

 

query

A user provided structure that is -filled in with constant values upon success.

[out caller-allocates]
-
-
-
-
-

g_signal_lookup ()

-
guint
-g_signal_lookup (const gchar *name,
-                 GType itype);
-

Given the name of the signal and the type of object it connects to, gets -the signal's identifying integer. Emitting the signal by number is -somewhat faster than using the name each time.

-

Also tries the ancestors of the given type.

-

See g_signal_new() for details on allowed signal names.

-
-

Parameters

-
----- - - - - - - - - - - - - -

name

the signal's name.

 

itype

the type that the signal operates on.

 
-
-
-

Returns

-

the signal's identifying number, or 0 if no signal was found.

-
-
-
-
-

g_signal_name ()

-
const gchar *
-g_signal_name (guint signal_id);
-

Given the signal's identifier, finds its name.

-

Two different signals may have the same name, if they have differing types.

-
-

Parameters

-
----- - - - - - -

signal_id

the signal's identifying number.

 
-
-
-

Returns

-

the signal name, or NULL if the signal number was invalid.

-
-
-
-
-

g_signal_list_ids ()

-
guint *
-g_signal_list_ids (GType itype,
-                   guint *n_ids);
-

Lists the signals by id that a certain instance or interface type -created. Further information about the signals can be acquired through -g_signal_query().

-
-

Parameters

-
----- - - - - - - - - - - - - -

itype

Instance or interface type.

 

n_ids

Location to store the number of signal ids for itype -.

 
-
-
-

Returns

-

Newly allocated array of signal IDs.

-

[array length=n_ids][transfer full]

-
-
-
-
-

g_signal_emit ()

-
void
-g_signal_emit (gpointer instance,
-               guint signal_id,
-               GQuark detail,
-               ...);
-

Emits a signal.

-

Note that g_signal_emit() resets the return value to the default -if no handlers are connected, in contrast to g_signal_emitv().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

instance

the instance the signal is being emitted on.

[type GObject.Object]

signal_id

the signal id

 

detail

the detail

 

...

parameters to be passed to the signal, followed by a -location for the return value. If the return type of the signal -is G_TYPE_NONE, the return value location can be omitted.

 
-
-
-
-
-

g_signal_emit_by_name ()

-
void
-g_signal_emit_by_name (gpointer instance,
-                       const gchar *detailed_signal,
-                       ...);
-

Emits a signal.

-

Note that g_signal_emit_by_name() resets the return value to the default -if no handlers are connected, in contrast to g_signal_emitv().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

instance

the instance the signal is being emitted on.

[type GObject.Object]

detailed_signal

a string of the form "signal-name::detail".

 

...

parameters to be passed to the signal, followed by a -location for the return value. If the return type of the signal -is G_TYPE_NONE, the return value location can be omitted.

 
-
-
-
-
-

g_signal_emitv ()

-
void
-g_signal_emitv (const GValue *instance_and_params,
-                guint signal_id,
-                GQuark detail,
-                GValue *return_value);
-

Emits a signal.

-

Note that g_signal_emitv() doesn't change return_value - if no handlers are -connected, in contrast to g_signal_emit() and g_signal_emit_valist().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

instance_and_params

argument list for the signal emission. -The first element in the array is a GValue for the instance the signal -is being emitted on. The rest are any arguments to be passed to the signal.

[array]

signal_id

the signal id

 

detail

the detail

 

return_value

Location to -store the return value of the signal emission. This must be provided if the -specified signal returns a value, but may be ignored otherwise.

[inout][optional]
-
-
-
-
-

g_signal_emit_valist ()

-
void
-g_signal_emit_valist (gpointer instance,
-                      guint signal_id,
-                      GQuark detail,
-                      va_list var_args);
-

Emits a signal.

-

Note that g_signal_emit_valist() resets the return value to the default -if no handlers are connected, in contrast to g_signal_emitv().

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

instance

the instance the signal is being -emitted on.

[type GObject.TypeInstance]

signal_id

the signal id

 

detail

the detail

 

var_args

a list of parameters to be passed to the signal, followed by a -location for the return value. If the return type of the signal -is G_TYPE_NONE, the return value location can be omitted.

 
-
-
-
-
-

g_signal_connect()

-
#define             g_signal_connect(instance, detailed_signal, c_handler, data)
-

Connects a GCallback function to a signal for a particular object.

-

The handler will be called before the default handler of the signal.

-

See memory management of signal handlers for -details on how to handle the return value and memory management of data -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

instance

the instance to connect to.

 

detailed_signal

a string of the form "signal-name::detail".

 

c_handler

the GCallback to connect.

 

data

data to pass to c_handler -calls.

 
-
-
-

Returns

-

the handler ID, of type gulong (always greater than 0 for successful connections)

-
-
-
-
-

g_signal_connect_after()

-
#define             g_signal_connect_after(instance, detailed_signal, c_handler, data)
-

Connects a GCallback function to a signal for a particular object.

-

The handler will be called after the default handler of the signal.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

instance

the instance to connect to.

 

detailed_signal

a string of the form "signal-name::detail".

 

c_handler

the GCallback to connect.

 

data

data to pass to c_handler -calls.

 
-
-
-

Returns

-

the handler ID, of type gulong (always greater than 0 for successful connections)

-
-
-
-
-

g_signal_connect_swapped()

-
#define             g_signal_connect_swapped(instance, detailed_signal, c_handler, data)
-

Connects a GCallback function to a signal for a particular object.

-

The instance on which the signal is emitted and data - will be swapped when -calling the handler. This is useful when calling pre-existing functions to -operate purely on the data -, rather than the instance -: swapping the -parameters avoids the need to write a wrapper function.

-

For example, this allows the shorter code:

-
- - - - - - - -
1
-2
g_signal_connect_swapped (button, "clicked",
-                          (GCallback) gtk_widget_hide, other_widget);
-
- -

-

Rather than the cumbersome:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
static void
-button_clicked_cb (GtkButton *button, GtkWidget *other_widget)
-{
-    gtk_widget_hide (other_widget);
-}
-
-...
-
-g_signal_connect (button, "clicked",
-                  (GCallback) button_clicked_cb, other_widget);
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

instance

the instance to connect to.

 

detailed_signal

a string of the form "signal-name::detail".

 

c_handler

the GCallback to connect.

 

data

data to pass to c_handler -calls.

 
-
-
-

Returns

-

the handler ID, of type gulong (always greater than 0 for successful connections)

-
-
-
-
-

g_signal_connect_object ()

-
gulong
-g_signal_connect_object (gpointer instance,
-                         const gchar *detailed_signal,
-                         GCallback c_handler,
-                         gpointer gobject,
-                         GConnectFlags connect_flags);
-

This is similar to g_signal_connect_data(), but uses a closure which -ensures that the gobject - stays alive during the call to c_handler - -by temporarily adding a reference count to gobject -.

-

When the gobject - is destroyed the signal handler will be automatically -disconnected. Note that this is not currently threadsafe (ie: -emitting a signal while gobject - is being destroyed in another thread -is not safe).

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

instance

the instance to connect to.

[type GObject.TypeInstance]

detailed_signal

a string of the form "signal-name::detail".

 

c_handler

the GCallback to connect.

 

gobject

the object to pass as data -to c_handler -.

[type GObject.Object][nullable]

connect_flags

a combination of GConnectFlags.

 
-
-
-

Returns

-

the handler id.

-
-
-
-
-

g_signal_connect_data ()

-
gulong
-g_signal_connect_data (gpointer instance,
-                       const gchar *detailed_signal,
-                       GCallback c_handler,
-                       gpointer data,
-                       GClosureNotify destroy_data,
-                       GConnectFlags connect_flags);
-

Connects a GCallback function to a signal for a particular object. Similar -to g_signal_connect(), but allows to provide a GClosureNotify for the data -which will be called when the signal handler is disconnected and no longer -used. Specify connect_flags - if you need ..._after() or -..._swapped() variants of this function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

instance

the instance to connect to.

[type GObject.Object]

detailed_signal

a string of the form "signal-name::detail".

 

c_handler

the GCallback to connect.

 

data

data to pass to c_handler -calls.

 

destroy_data

a GClosureNotify for data -.

 

connect_flags

a combination of GConnectFlags.

 
-
-
-

Returns

-

the handler ID (always greater than 0 for successful connections)

-
-
-
-
-

g_signal_connect_closure ()

-
gulong
-g_signal_connect_closure (gpointer instance,
-                          const gchar *detailed_signal,
-                          GClosure *closure,
-                          gboolean after);
-

Connects a closure to a signal for a particular object.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

instance

the instance to connect to.

[type GObject.Object]

detailed_signal

a string of the form "signal-name::detail".

 

closure

the closure to connect.

 

after

whether the handler should be called before or after the -default handler of the signal.

 
-
-
-

Returns

-

the handler ID (always greater than 0 for successful connections)

-
-
-
-
-

g_signal_connect_closure_by_id ()

-
gulong
-g_signal_connect_closure_by_id (gpointer instance,
-                                guint signal_id,
-                                GQuark detail,
-                                GClosure *closure,
-                                gboolean after);
-

Connects a closure to a signal for a particular object.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

instance

the instance to connect to.

[type GObject.Object]

signal_id

the id of the signal.

 

detail

the detail.

 

closure

the closure to connect.

 

after

whether the handler should be called before or after the -default handler of the signal.

 
-
-
-

Returns

-

the handler ID (always greater than 0 for successful connections)

-
-
-
-
-

g_signal_handler_block ()

-
void
-g_signal_handler_block (gpointer instance,
-                        gulong handler_id);
-

Blocks a handler of an instance so it will not be called during any -signal emissions unless it is unblocked again. Thus "blocking" a -signal handler means to temporarily deactive it, a signal handler -has to be unblocked exactly the same amount of times it has been -blocked before to become active again.

-

The handler_id - has to be a valid signal handler id, connected to a -signal of instance -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

instance

The instance to block the signal handler of.

[type GObject.Object]

handler_id

Handler id of the handler to be blocked.

 
-
-
-
-
-

g_signal_handler_unblock ()

-
void
-g_signal_handler_unblock (gpointer instance,
-                          gulong handler_id);
-

Undoes the effect of a previous g_signal_handler_block() call. A -blocked handler is skipped during signal emissions and will not be -invoked, unblocking it (for exactly the amount of times it has been -blocked before) reverts its "blocked" state, so the handler will be -recognized by the signal system and is called upon future or -currently ongoing signal emissions (since the order in which -handlers are called during signal emissions is deterministic, -whether the unblocked handler in question is called as part of a -currently ongoing emission depends on how far that emission has -proceeded yet).

-

The handler_id - has to be a valid id of a signal handler that is -connected to a signal of instance - and is currently blocked.

-
-

Parameters

-
----- - - - - - - - - - - - - -

instance

The instance to unblock the signal handler of.

[type GObject.Object]

handler_id

Handler id of the handler to be unblocked.

 
-
-
-
-
-

g_signal_handler_disconnect ()

-
void
-g_signal_handler_disconnect (gpointer instance,
-                             gulong handler_id);
-

Disconnects a handler from an instance so it will not be called during -any future or currently ongoing emissions of the signal it has been -connected to. The handler_id - becomes invalid and may be reused.

-

The handler_id - has to be a valid signal handler id, connected to a -signal of instance -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

instance

The instance to remove the signal handler from.

[type GObject.Object]

handler_id

Handler id of the handler to be disconnected.

 
-
-
-
-
-

g_signal_handler_find ()

-
gulong
-g_signal_handler_find (gpointer instance,
-                       GSignalMatchType mask,
-                       guint signal_id,
-                       GQuark detail,
-                       GClosure *closure,
-                       gpointer func,
-                       gpointer data);
-

Finds the first signal handler that matches certain selection criteria. -The criteria mask is passed as an OR-ed combination of GSignalMatchType -flags, and the criteria values are passed as arguments. -The match mask - has to be non-0 for successful matches. -If no handler was found, 0 is returned.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

instance

The instance owning the signal handler to be found.

[type GObject.Object]

mask

Mask indicating which of signal_id -, detail -, closure -, func -and/or data -the handler has to match.

 

signal_id

Signal the handler has to be connected to.

 

detail

Signal detail the handler has to be connected to.

 

closure

The closure the handler will invoke.

[nullable]

func

The C closure callback of the handler (useless for non-C closures).

 

data

The closure data of the handler's closure.

 
-
-
-

Returns

-

A valid non-0 signal handler id for a successful match.

-
-
-
-
-

g_signal_handlers_block_matched ()

-
guint
-g_signal_handlers_block_matched (gpointer instance,
-                                 GSignalMatchType mask,
-                                 guint signal_id,
-                                 GQuark detail,
-                                 GClosure *closure,
-                                 gpointer func,
-                                 gpointer data);
-

Blocks all handlers on an instance that match a certain selection criteria. -The criteria mask is passed as an OR-ed combination of GSignalMatchType -flags, and the criteria values are passed as arguments. -Passing at least one of the G_SIGNAL_MATCH_CLOSURE, G_SIGNAL_MATCH_FUNC -or G_SIGNAL_MATCH_DATA match flags is required for successful matches. -If no handlers were found, 0 is returned, the number of blocked handlers -otherwise.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

instance

The instance to block handlers from.

[type GObject.Object]

mask

Mask indicating which of signal_id -, detail -, closure -, func -and/or data -the handlers have to match.

 

signal_id

Signal the handlers have to be connected to.

 

detail

Signal detail the handlers have to be connected to.

 

closure

The closure the handlers will invoke.

[nullable]

func

The C closure callback of the handlers (useless for non-C closures).

 

data

The closure data of the handlers' closures.

 
-
-
-

Returns

-

The number of handlers that matched.

-
-
-
-
-

g_signal_handlers_unblock_matched ()

-
guint
-g_signal_handlers_unblock_matched (gpointer instance,
-                                   GSignalMatchType mask,
-                                   guint signal_id,
-                                   GQuark detail,
-                                   GClosure *closure,
-                                   gpointer func,
-                                   gpointer data);
-

Unblocks all handlers on an instance that match a certain selection -criteria. The criteria mask is passed as an OR-ed combination of -GSignalMatchType flags, and the criteria values are passed as arguments. -Passing at least one of the G_SIGNAL_MATCH_CLOSURE, G_SIGNAL_MATCH_FUNC -or G_SIGNAL_MATCH_DATA match flags is required for successful matches. -If no handlers were found, 0 is returned, the number of unblocked handlers -otherwise. The match criteria should not apply to any handlers that are -not currently blocked.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

instance

The instance to unblock handlers from.

[type GObject.Object]

mask

Mask indicating which of signal_id -, detail -, closure -, func -and/or data -the handlers have to match.

 

signal_id

Signal the handlers have to be connected to.

 

detail

Signal detail the handlers have to be connected to.

 

closure

The closure the handlers will invoke.

[nullable]

func

The C closure callback of the handlers (useless for non-C closures).

 

data

The closure data of the handlers' closures.

 
-
-
-

Returns

-

The number of handlers that matched.

-
-
-
-
-

g_signal_handlers_disconnect_matched ()

-
guint
-g_signal_handlers_disconnect_matched (gpointer instance,
-                                      GSignalMatchType mask,
-                                      guint signal_id,
-                                      GQuark detail,
-                                      GClosure *closure,
-                                      gpointer func,
-                                      gpointer data);
-

Disconnects all handlers on an instance that match a certain -selection criteria. The criteria mask is passed as an OR-ed -combination of GSignalMatchType flags, and the criteria values are -passed as arguments. Passing at least one of the -G_SIGNAL_MATCH_CLOSURE, G_SIGNAL_MATCH_FUNC or -G_SIGNAL_MATCH_DATA match flags is required for successful -matches. If no handlers were found, 0 is returned, the number of -disconnected handlers otherwise.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

instance

The instance to remove handlers from.

[type GObject.Object]

mask

Mask indicating which of signal_id -, detail -, closure -, func -and/or data -the handlers have to match.

 

signal_id

Signal the handlers have to be connected to.

 

detail

Signal detail the handlers have to be connected to.

 

closure

The closure the handlers will invoke.

[nullable]

func

The C closure callback of the handlers (useless for non-C closures).

 

data

The closure data of the handlers' closures.

 
-
-
-

Returns

-

The number of handlers that matched.

-
-
-
-
-

g_signal_handler_is_connected ()

-
gboolean
-g_signal_handler_is_connected (gpointer instance,
-                               gulong handler_id);
-

Returns whether handler_id - is the ID of a handler connected to instance -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

instance

The instance where a signal handler is sought.

[type GObject.Object]

handler_id

the handler ID.

 
-
-
-

Returns

-

whether handler_id -identifies a handler connected to instance -.

-
-
-
-
-

g_signal_handlers_block_by_func()

-
#define             g_signal_handlers_block_by_func(instance, func, data)
-

Blocks all handlers on an instance that match func - and data -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

instance

The instance to block handlers from.

 

func

The C closure callback of the handlers (useless for non-C closures).

 

data

The closure data of the handlers' closures.

 
-
-
-

Returns

-

The number of handlers that matched.

-
-
-
-
-

g_signal_handlers_unblock_by_func()

-
#define             g_signal_handlers_unblock_by_func(instance, func, data)
-

Unblocks all handlers on an instance that match func - and data -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

instance

The instance to unblock handlers from.

 

func

The C closure callback of the handlers (useless for non-C closures).

 

data

The closure data of the handlers' closures.

 
-
-
-

Returns

-

The number of handlers that matched.

-
-
-
-
-

g_signal_handlers_disconnect_by_func()

-
#define             g_signal_handlers_disconnect_by_func(instance, func, data)
-

Disconnects all handlers on an instance that match func - and data -.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

instance

The instance to remove handlers from.

 

func

The C closure callback of the handlers (useless for non-C closures).

 

data

The closure data of the handlers' closures.

 
-
-
-

Returns

-

The number of handlers that matched.

-
-
-
-
-

g_signal_handlers_disconnect_by_data()

-
#define             g_signal_handlers_disconnect_by_data(instance, data)
-

Disconnects all handlers on an instance that match data -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

instance

The instance to remove handlers from

 

data

the closure data of the handlers' closures

 
-
-
-

Returns

-

The number of handlers that matched.

-
-

Since: 2.32

-
-
-
-

g_signal_has_handler_pending ()

-
gboolean
-g_signal_has_handler_pending (gpointer instance,
-                              guint signal_id,
-                              GQuark detail,
-                              gboolean may_be_blocked);
-

Returns whether there are any handlers connected to instance - for the -given signal id and detail.

-

If detail - is 0 then it will only match handlers that were connected -without detail. If detail - is non-zero then it will match handlers -connected both without detail and with the given detail. This is -consistent with how a signal emitted with detail - would be delivered -to those handlers.

-

Since 2.46 this also checks for a non-default class closure being -installed, as this is basically always what you want.

-

One example of when you might use this is when the arguments to the -signal are difficult to compute. A class implementor may opt to not -emit the signal if no one is attached anyway, thus saving the cost -of building the arguments.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

instance

the object whose signal handlers are sought.

[type GObject.Object]

signal_id

the signal id.

 

detail

the detail.

 

may_be_blocked

whether blocked handlers should count as match.

 
-
-
-

Returns

-

TRUE if a handler is connected to the signal, FALSE -otherwise.

-
-
-
-
-

g_signal_stop_emission ()

-
void
-g_signal_stop_emission (gpointer instance,
-                        guint signal_id,
-                        GQuark detail);
-

Stops a signal's current emission.

-

This will prevent the default method from running, if the signal was -G_SIGNAL_RUN_LAST and you connected normally (i.e. without the "after" -flag).

-

Prints a warning if used on a signal which isn't being emitted.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

instance

the object whose signal handlers you wish to stop.

[type GObject.Object]

signal_id

the signal identifier, as returned by g_signal_lookup().

 

detail

the detail which the signal was emitted with.

 
-
-
-
-
-

g_signal_stop_emission_by_name ()

-
void
-g_signal_stop_emission_by_name (gpointer instance,
-                                const gchar *detailed_signal);
-

Stops a signal's current emission.

-

This is just like g_signal_stop_emission() except it will look up the -signal id for you.

-
-

Parameters

-
----- - - - - - - - - - - - - -

instance

the object whose signal handlers you wish to stop.

[type GObject.Object]

detailed_signal

a string of the form "signal-name::detail".

 
-
-
-
-
-

g_signal_override_class_closure ()

-
void
-g_signal_override_class_closure (guint signal_id,
-                                 GType instance_type,
-                                 GClosure *class_closure);
-

Overrides the class closure (i.e. the default handler) for the given signal -for emissions on instances of instance_type -. instance_type - must be derived -from the type to which the signal belongs.

-

See g_signal_chain_from_overridden() and -g_signal_chain_from_overridden_handler() for how to chain up to the -parent class closure from inside the overridden one.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

signal_id

the signal id

 

instance_type

the instance type on which to override the class closure -for the signal.

 

class_closure

the closure.

 
-
-
-
-
-

g_signal_chain_from_overridden ()

-
void
-g_signal_chain_from_overridden (const GValue *instance_and_params,
-                                GValue *return_value);
-

Calls the original class closure of a signal. This function should only -be called from an overridden class closure; see -g_signal_override_class_closure() and -g_signal_override_class_handler().

-
-

Parameters

-
----- - - - - - - - - - - - - -

instance_and_params

(array) the argument list of the signal emission. -The first element in the array is a GValue for the instance the signal -is being emitted on. The rest are any arguments to be passed to the signal.

 

return_value

Location for the return value.

 
-
-
-
-
-

g_signal_new_class_handler ()

-
guint
-g_signal_new_class_handler (const gchar *signal_name,
-                            GType itype,
-                            GSignalFlags signal_flags,
-                            GCallback class_handler,
-                            GSignalAccumulator accumulator,
-                            gpointer accu_data,
-                            GSignalCMarshaller c_marshaller,
-                            GType return_type,
-                            guint n_params,
-                            ...);
-

Creates a new signal. (This is usually done in the class initializer.)

-

This is a variant of g_signal_new() that takes a C callback instead -off a class offset for the signal's class handler. This function -doesn't need a function pointer exposed in the class structure of -an object definition, instead the function pointer is passed -directly and can be overriden by derived classes with -g_signal_override_class_closure() or -g_signal_override_class_handler()and chained to with -g_signal_chain_from_overridden() or -g_signal_chain_from_overridden_handler().

-

See g_signal_new() for information about signal names.

-

If c_marshaller is NULL, g_cclosure_marshal_generic() will be used as -the marshaller for this signal.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

signal_name

the name for the signal

 

itype

the type this signal pertains to. It will also pertain to -types which are derived from this type.

 

signal_flags

a combination of GSignalFlags specifying detail of when -the default handler is to be invoked. You should at least specify -G_SIGNAL_RUN_FIRST or G_SIGNAL_RUN_LAST.

 

class_handler

a GCallback which acts as class implementation of -this signal. Used to invoke a class method generically. Pass NULL to -not associate a class method with this signal.

 

accumulator

the accumulator for this signal; may be NULL.

 

accu_data

user data for the accumulator -.

 

c_marshaller

the function to translate arrays of parameter -values to signal emissions into C language callback invocations or NULL.

[nullable]

return_type

the type of return value, or G_TYPE_NONE for a signal -without a return value.

 

n_params

the number of parameter types to follow.

 

...

a list of types, one for each parameter.

 
-
-
-

Returns

-

the signal id

-
-

Since: 2.18

-
-
-
-

g_signal_override_class_handler ()

-
void
-g_signal_override_class_handler (const gchar *signal_name,
-                                 GType instance_type,
-                                 GCallback class_handler);
-

Overrides the class closure (i.e. the default handler) for the -given signal for emissions on instances of instance_type - with -callback class_handler -. instance_type - must be derived from the -type to which the signal belongs.

-

See g_signal_chain_from_overridden() and -g_signal_chain_from_overridden_handler() for how to chain up to the -parent class closure from inside the overridden one.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

signal_name

the name for the signal

 

instance_type

the instance type on which to override the class handler -for the signal.

 

class_handler

the handler.

 
-
-

Since: 2.18

-
-
-
-

g_signal_chain_from_overridden_handler ()

-
void
-g_signal_chain_from_overridden_handler
-                               (gpointer instance,
-                                ...);
-

Calls the original class closure of a signal. This function should -only be called from an overridden class closure; see -g_signal_override_class_closure() and -g_signal_override_class_handler().

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

instance

the instance the signal is being -emitted on.

[type GObject.TypeInstance]

...

parameters to be passed to the parent class closure, followed by a -location for the return value. If the return type of the signal -is G_TYPE_NONE, the return value location can be omitted.

 
-
-

Since: 2.18

-
-
-
-

g_signal_add_emission_hook ()

-
gulong
-g_signal_add_emission_hook (guint signal_id,
-                            GQuark detail,
-                            GSignalEmissionHook hook_func,
-                            gpointer hook_data,
-                            GDestroyNotify data_destroy);
-

Adds an emission hook for a signal, which will get called for any emission -of that signal, independent of the instance. This is possible only -for signals which don't have G_SIGNAL_NO_HOOKS flag set.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

signal_id

the signal identifier, as returned by g_signal_lookup().

 

detail

the detail on which to call the hook.

 

hook_func

a GSignalEmissionHook function.

 

hook_data

user data for hook_func -.

 

data_destroy

a GDestroyNotify for hook_data -.

 
-
-
-

Returns

-

the hook id, for later use with g_signal_remove_emission_hook().

-
-
-
-
-

g_signal_remove_emission_hook ()

-
void
-g_signal_remove_emission_hook (guint signal_id,
-                               gulong hook_id);
-

Deletes an emission hook.

-
-

Parameters

-
----- - - - - - - - - - - - - -

signal_id

the id of the signal

 

hook_id

the id of the emission hook, as returned by -g_signal_add_emission_hook()

 
-
-
-
-
-

g_signal_parse_name ()

-
gboolean
-g_signal_parse_name (const gchar *detailed_signal,
-                     GType itype,
-                     guint *signal_id_p,
-                     GQuark *detail_p,
-                     gboolean force_detail_quark);
-

Internal function to parse a signal name into its signal_id - -and detail - quark.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

detailed_signal

a string of the form "signal-name::detail".

 

itype

The interface/instance type that introduced "signal-name".

 

signal_id_p

Location to store the signal id.

[out]

detail_p

Location to store the detail quark.

[out]

force_detail_quark

TRUE forces creation of a GQuark for the detail.

 
-
-
-

Returns

-

Whether the signal name could successfully be parsed and signal_id_p -and detail_p -contain valid return values.

-
-
-
-
-

g_signal_get_invocation_hint ()

-
GSignalInvocationHint *
-g_signal_get_invocation_hint (gpointer instance);
-

Returns the invocation hint of the innermost signal emission of instance.

-
-

Parameters

-
----- - - - - - -

instance

the instance to query.

[type GObject.Object]
-
-
-

Returns

-

the invocation hint of the innermost signal emission.

-

[transfer none]

-
-
-
-
-

g_signal_type_cclosure_new ()

-
GClosure *
-g_signal_type_cclosure_new (GType itype,
-                            guint struct_offset);
-

Creates a new closure which invokes the function found at the offset -struct_offset - in the class structure of the interface or classed type -identified by itype -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

itype

the GType identifier of an interface or classed type

 

struct_offset

the offset of the member function of itype -'s class -structure which is to be invoked by the new closure

 
-
-
-

Returns

-

a new GCClosure

-
-
-
-
-

g_signal_accumulator_first_wins ()

-
gboolean
-g_signal_accumulator_first_wins (GSignalInvocationHint *ihint,
-                                 GValue *return_accu,
-                                 const GValue *handler_return,
-                                 gpointer dummy);
-

A predefined GSignalAccumulator for signals intended to be used as a -hook for application code to provide a particular value. Usually -only one such value is desired and multiple handlers for the same -signal don't make much sense (except for the case of the default -handler defined in the class structure, in which case you will -usually want the signal connection to override the class handler).

-

This accumulator will use the return value from the first signal -handler that is run as the return value for the signal and not run -any further handlers (ie: the first handler "wins").

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

ihint

standard GSignalAccumulator parameter

 

return_accu

standard GSignalAccumulator parameter

 

handler_return

standard GSignalAccumulator parameter

 

dummy

standard GSignalAccumulator parameter

 
-
-
-

Returns

-

standard GSignalAccumulator result

-
-

Since: 2.28

-
-
-
-

g_signal_accumulator_true_handled ()

-
gboolean
-g_signal_accumulator_true_handled (GSignalInvocationHint *ihint,
-                                   GValue *return_accu,
-                                   const GValue *handler_return,
-                                   gpointer dummy);
-

A predefined GSignalAccumulator for signals that return a -boolean values. The behavior that this accumulator gives is -that a return of TRUE stops the signal emission: no further -callbacks will be invoked, while a return of FALSE allows -the emission to continue. The idea here is that a TRUE return -indicates that the callback handled the signal, and no further -handling is needed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

ihint

standard GSignalAccumulator parameter

 

return_accu

standard GSignalAccumulator parameter

 

handler_return

standard GSignalAccumulator parameter

 

dummy

standard GSignalAccumulator parameter

 
-
-
-

Returns

-

standard GSignalAccumulator result

-
-

Since: 2.4

-
-
-
-

Types and Values

-
-

struct GSignalInvocationHint

-
struct GSignalInvocationHint {
-  guint		signal_id;
-  GQuark detail;
-  GSignalFlags run_type;
-};
-
-

The GSignalInvocationHint structure is used to pass on additional information -to callbacks during a signal emission.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

guint signal_id;

The signal id of the signal invoking the callback

 

GQuark detail;

The detail passed on for this emission

 

GSignalFlags run_type;

The stage the signal emission is currently in, this -field will contain one of G_SIGNAL_RUN_FIRST, -G_SIGNAL_RUN_LAST or G_SIGNAL_RUN_CLEANUP.

 
-
-
-
-
-

GSignalCMarshaller

-
typedef GClosureMarshal			 GSignalCMarshaller;
-
-

This is the signature of marshaller functions, required to marshall -arrays of parameter values to signal emissions into C language callback -invocations. It is merely an alias to GClosureMarshal since the GClosure -mechanism takes over responsibility of actual function invocation for the -signal system.

-
-
-
-

GSignalCVaMarshaller

-
typedef GVaClosureMarshal		 GSignalCVaMarshaller;
-
-

This is the signature of va_list marshaller functions, an optional -marshaller that can be used in some situations to avoid -marshalling the signal argument into GValues.

-
-
-
-

enum GSignalFlags

-

The signal flags are used to specify a signal's behaviour, the overall -signal description outlines how especially the RUN flags control the -stages of a signal emission.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_SIGNAL_RUN_FIRST

-

Invoke the object method handler in the first emission stage.

-
 

G_SIGNAL_RUN_LAST

-

Invoke the object method handler in the third emission stage.

-
 

G_SIGNAL_RUN_CLEANUP

-

Invoke the object method handler in the last emission stage.

-
 

G_SIGNAL_NO_RECURSE

-

Signals being emitted for an object while currently being in - emission for this very object will not be emitted recursively, - but instead cause the first emission to be restarted.

-
 

G_SIGNAL_DETAILED

-

This signal supports "::detail" appendices to the signal name - upon handler connections and emissions.

-
 

G_SIGNAL_ACTION

-

Action signals are signals that may freely be emitted on alive - objects from user code via g_signal_emit() and friends, without - the need of being embedded into extra code that performs pre or - post emission adjustments on the object. They can also be thought - of as object methods which can be called generically by - third-party code.

-
 

G_SIGNAL_NO_HOOKS

-

No emissions hooks are supported for this signal.

-
 

G_SIGNAL_MUST_COLLECT

-

Varargs signal emission will always collect the - arguments, even if there are no signal handlers connected. Since 2.30.

-
 

G_SIGNAL_DEPRECATED

-

The signal is deprecated and will be removed - in a future version. A warning will be generated if it is connected while - running with G_ENABLE_DIAGNOSTIC=1. Since 2.32.

-
 
-
-
-
-
-

enum GSignalMatchType

-

The match types specify what g_signal_handlers_block_matched(), -g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched() -match signals by.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_SIGNAL_MATCH_ID

-

The signal id must be equal.

-
 

G_SIGNAL_MATCH_DETAIL

-

The signal detail be equal.

-
 

G_SIGNAL_MATCH_CLOSURE

-

The closure must be the same.

-
 

G_SIGNAL_MATCH_FUNC

-

The C closure callback must be the same.

-
 

G_SIGNAL_MATCH_DATA

-

The closure data must be the same.

-
 

G_SIGNAL_MATCH_UNBLOCKED

-

Only unblocked signals may matched.

-
 
-
-
-
-
-

struct GSignalQuery

-
struct GSignalQuery {
-  guint		signal_id;
-  const gchar  *signal_name;
-  GType		itype;
-  GSignalFlags signal_flags;
-  GType		return_type; /* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag */
-  guint		n_params;
-  const GType  *param_types; /* mangled with G_SIGNAL_TYPE_STATIC_SCOPE flag */
-};
-
-

A structure holding in-depth information for a specific signal. It is -filled in by the g_signal_query() function.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint signal_id;

The signal id of the signal being queried, or 0 if the -signal to be queried was unknown.

 

const gchar *signal_name;

The signal name.

 

GType itype;

The interface/instance type that this signal can be emitted for.

 

GSignalFlags signal_flags;

The signal flags as passed in to g_signal_new().

 

GType return_type;

The return type for user callbacks.

 

guint n_params;

The number of parameters that user callbacks take.

 

const GType *param_types;

-

The individual parameter types for -user callbacks, note that the effective callback signature is:

-
- - - - - - - -
1
-2
-3
@return_type callback (#gpointer     data1,
-[param_types param_names,]
-gpointer     data2);
-
- -

.

-
[array length=n_params]
-
-
-
-
-

G_SIGNAL_TYPE_STATIC_SCOPE

-
#define G_SIGNAL_TYPE_STATIC_SCOPE (G_TYPE_FLAG_RESERVED_ID_BIT)
-
-

This macro flags signal argument types for which the signal system may -assume that instances thereof remain persistent across all signal emissions -they are used in. This is only useful for non ref-counted, value-copy types.

-

To flag a signal argument in this way, add | G_SIGNAL_TYPE_STATIC_SCOPE -to the corresponding argument of g_signal_new().

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
g_signal_new ("size_request",
-  G_TYPE_FROM_CLASS (gobject_class),
-	 G_SIGNAL_RUN_FIRST,
-	 G_STRUCT_OFFSET (GtkWidgetClass, size_request),
-	 NULL, NULL,
-	 _gtk_marshal_VOID__BOXED,
-	 G_TYPE_NONE, 1,
-	 GTK_TYPE_REQUISITION | G_SIGNAL_TYPE_STATIC_SCOPE);
-
- -

-
-
-
-

G_SIGNAL_MATCH_MASK

-
#define G_SIGNAL_MATCH_MASK  0x3f
-
-

A mask for all GSignalMatchType bits.

-
-
-
-

G_SIGNAL_FLAGS_MASK

-
#define G_SIGNAL_FLAGS_MASK  0x1ff
-
-

A mask for all GSignalFlags bits.

-
-
-
-

enum GConnectFlags

-

The connection flags are used to specify the behaviour of a signal's -connection.

-
-

Members

-
----- - - - - - - - - - - - - -

G_CONNECT_AFTER

-

whether the handler should be called before or after the - default handler of the signal.

-
 

G_CONNECT_SWAPPED

-

whether the instance and data should be swapped when - calling the handler; see g_signal_connect_swapped() for an example.

-
 
-
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gobject-Standard-Parameter-and-Value-Types.html b/docs/reference/gobject/html/gobject-Standard-Parameter-and-Value-Types.html deleted file mode 100644 index 3706beac1..000000000 --- a/docs/reference/gobject/html/gobject-Standard-Parameter-and-Value-Types.html +++ /dev/null @@ -1,7096 +0,0 @@ - - - - -Parameters and Values: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Parameters and Values

-

Parameters and Values — Standard Parameter and Value Types

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -G_IS_PARAM_SPEC_BOOLEAN() -
#define -G_PARAM_SPEC_BOOLEAN() -
#define -G_VALUE_HOLDS_BOOLEAN() -
-GParamSpec * - -g_param_spec_boolean () -
-void - -g_value_set_boolean () -
-gboolean - -g_value_get_boolean () -
#define -G_IS_PARAM_SPEC_CHAR() -
#define -G_PARAM_SPEC_CHAR() -
#define -G_VALUE_HOLDS_CHAR() -
-GParamSpec * - -g_param_spec_char () -
-void - -g_value_set_char () -
-gchar - -g_value_get_char () -
-gint8 - -g_value_get_schar () -
-void - -g_value_set_schar () -
#define -G_IS_PARAM_SPEC_UCHAR() -
#define -G_PARAM_SPEC_UCHAR() -
#define -G_VALUE_HOLDS_UCHAR() -
-GParamSpec * - -g_param_spec_uchar () -
-void - -g_value_set_uchar () -
-guchar - -g_value_get_uchar () -
#define -G_IS_PARAM_SPEC_INT() -
#define -G_PARAM_SPEC_INT() -
#define -G_VALUE_HOLDS_INT() -
-GParamSpec * - -g_param_spec_int () -
-void - -g_value_set_int () -
-gint - -g_value_get_int () -
#define -G_IS_PARAM_SPEC_UINT() -
#define -G_PARAM_SPEC_UINT() -
#define -G_VALUE_HOLDS_UINT() -
-GParamSpec * - -g_param_spec_uint () -
-void - -g_value_set_uint () -
-guint - -g_value_get_uint () -
#define -G_IS_PARAM_SPEC_LONG() -
#define -G_PARAM_SPEC_LONG() -
#define -G_VALUE_HOLDS_LONG() -
-GParamSpec * - -g_param_spec_long () -
-void - -g_value_set_long () -
-glong - -g_value_get_long () -
#define -G_IS_PARAM_SPEC_ULONG() -
#define -G_PARAM_SPEC_ULONG() -
#define -G_VALUE_HOLDS_ULONG() -
-GParamSpec * - -g_param_spec_ulong () -
-void - -g_value_set_ulong () -
-gulong - -g_value_get_ulong () -
#define -G_IS_PARAM_SPEC_INT64() -
#define -G_PARAM_SPEC_INT64() -
#define -G_VALUE_HOLDS_INT64() -
-GParamSpec * - -g_param_spec_int64 () -
-void - -g_value_set_int64 () -
-gint64 - -g_value_get_int64 () -
#define -G_IS_PARAM_SPEC_UINT64() -
#define -G_PARAM_SPEC_UINT64() -
#define -G_VALUE_HOLDS_UINT64() -
-GParamSpec * - -g_param_spec_uint64 () -
-void - -g_value_set_uint64 () -
-guint64 - -g_value_get_uint64 () -
#define -G_IS_PARAM_SPEC_FLOAT() -
#define -G_PARAM_SPEC_FLOAT() -
#define -G_VALUE_HOLDS_FLOAT() -
-GParamSpec * - -g_param_spec_float () -
-void - -g_value_set_float () -
-gfloat - -g_value_get_float () -
#define -G_IS_PARAM_SPEC_DOUBLE() -
#define -G_PARAM_SPEC_DOUBLE() -
#define -G_VALUE_HOLDS_DOUBLE() -
-GParamSpec * - -g_param_spec_double () -
-void - -g_value_set_double () -
-gdouble - -g_value_get_double () -
#define -G_IS_PARAM_SPEC_ENUM() -
#define -G_PARAM_SPEC_ENUM() -
#define -G_VALUE_HOLDS_ENUM() -
-GParamSpec * - -g_param_spec_enum () -
-void - -g_value_set_enum () -
-gint - -g_value_get_enum () -
#define -G_IS_PARAM_SPEC_FLAGS() -
#define -G_PARAM_SPEC_FLAGS() -
#define -G_VALUE_HOLDS_FLAGS() -
-GParamSpec * - -g_param_spec_flags () -
-void - -g_value_set_flags () -
-guint - -g_value_get_flags () -
#define -G_IS_PARAM_SPEC_STRING() -
#define -G_PARAM_SPEC_STRING() -
#define -G_VALUE_HOLDS_STRING() -
-GParamSpec * - -g_param_spec_string () -
-void - -g_value_set_string () -
-void - -g_value_set_static_string () -
-void - -g_value_take_string () -
-void - -g_value_set_string_take_ownership () -
const gchar * - -g_value_get_string () -
-gchar * - -g_value_dup_string () -
#define -G_IS_PARAM_SPEC_PARAM() -
#define -G_PARAM_SPEC_PARAM() -
#define -G_VALUE_HOLDS_PARAM() -
-GParamSpec * - -g_param_spec_param () -
-void - -g_value_set_param () -
-void - -g_value_take_param () -
-void - -g_value_set_param_take_ownership () -
-GParamSpec * - -g_value_get_param () -
-GParamSpec * - -g_value_dup_param () -
#define -G_IS_PARAM_SPEC_BOXED() -
#define -G_PARAM_SPEC_BOXED() -
#define -G_VALUE_HOLDS_BOXED() -
-GParamSpec * - -g_param_spec_boxed () -
-void - -g_value_set_boxed () -
-void - -g_value_set_static_boxed () -
-void - -g_value_take_boxed () -
-void - -g_value_set_boxed_take_ownership () -
-gpointer - -g_value_get_boxed () -
-gpointer - -g_value_dup_boxed () -
#define -G_IS_PARAM_SPEC_POINTER() -
#define -G_PARAM_SPEC_POINTER() -
#define -G_VALUE_HOLDS_POINTER() -
-GParamSpec * - -g_param_spec_pointer () -
-void - -g_value_set_pointer () -
-gpointer - -g_value_get_pointer () -
#define -G_IS_PARAM_SPEC_OBJECT() -
#define -G_PARAM_SPEC_OBJECT() -
#define -G_VALUE_HOLDS_OBJECT() -
-GParamSpec * - -g_param_spec_object () -
-void - -g_value_set_object () -
-void - -g_value_take_object () -
-void - -g_value_set_object_take_ownership () -
-gpointer - -g_value_get_object () -
-gpointer - -g_value_dup_object () -
#define -G_IS_PARAM_SPEC_UNICHAR() -
#define -G_PARAM_SPEC_UNICHAR() -
-GParamSpec * - -g_param_spec_unichar () -
#define -G_IS_PARAM_SPEC_VALUE_ARRAY() -
#define -G_PARAM_SPEC_VALUE_ARRAY() -
-GParamSpec * - -g_param_spec_value_array () -
#define -G_IS_PARAM_SPEC_OVERRIDE() -
#define -G_PARAM_SPEC_OVERRIDE() -
-GParamSpec * - -g_param_spec_override () -
#define -G_IS_PARAM_SPEC_GTYPE() -
#define -G_PARAM_SPEC_GTYPE() -
#define -G_VALUE_HOLDS_GTYPE() -
-GParamSpec * - -g_param_spec_gtype () -
-GType - -g_value_get_gtype () -
-void - -g_value_set_gtype () -
#define -G_IS_PARAM_SPEC_VARIANT() -
#define -G_PARAM_SPEC_VARIANT() -
#define -G_VALUE_HOLDS_VARIANT() -
-GParamSpec * - -g_param_spec_variant () -
-GVariant * - -g_value_get_variant () -
-GVariant * - -g_value_dup_variant () -
-void - -g_value_set_variant () -
-void - -g_value_take_variant () -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#defineG_TYPE_PARAM_BOOLEAN
structGParamSpecBoolean
#defineG_TYPE_PARAM_CHAR
structGParamSpecChar
#defineG_TYPE_PARAM_UCHAR
structGParamSpecUChar
#defineG_TYPE_PARAM_INT
structGParamSpecInt
#defineG_TYPE_PARAM_UINT
structGParamSpecUInt
#defineG_TYPE_PARAM_LONG
structGParamSpecLong
#defineG_TYPE_PARAM_ULONG
structGParamSpecULong
#defineG_TYPE_PARAM_INT64
structGParamSpecInt64
#defineG_TYPE_PARAM_UINT64
structGParamSpecUInt64
#defineG_TYPE_PARAM_FLOAT
structGParamSpecFloat
#defineG_TYPE_PARAM_DOUBLE
structGParamSpecDouble
#defineG_TYPE_PARAM_ENUM
structGParamSpecEnum
#defineG_TYPE_PARAM_FLAGS
structGParamSpecFlags
#defineG_TYPE_PARAM_STRING
structGParamSpecString
typedefgchararray
#defineG_TYPE_PARAM_PARAM
structGParamSpecParam
#defineG_TYPE_PARAM_BOXED
structGParamSpecBoxed
#defineG_TYPE_PARAM_POINTER
structGParamSpecPointer
#defineG_TYPE_PARAM_OBJECT
structGParamSpecObject
#defineG_TYPE_PARAM_UNICHAR
structGParamSpecUnichar
#defineG_TYPE_PARAM_VALUE_ARRAY
structGParamSpecValueArray
#defineG_TYPE_PARAM_OVERRIDE
structGParamSpecOverride
#defineG_TYPE_PARAM_GTYPE
structGParamSpecGType
#defineG_TYPE_PARAM_VARIANT
structGParamSpecVariant
-
-
-

Includes

-
#include <glib-object.h>
-
-
-
-

Description

-

GValue provides an abstract container structure which can be -copied, transformed and compared while holding a value of any -(derived) type, which is registered as a GType with a -GTypeValueTable in its GTypeInfo structure. Parameter -specifications for most value types can be created as GParamSpec -derived instances, to implement e.g. GObject properties which -operate on GValue containers.

-

Parameter names need to start with a letter (a-z or A-Z). Subsequent -characters can be letters, numbers or a '-'. -All other characters are replaced by a '-' during construction.

-
-
-

Functions

-
-

G_IS_PARAM_SPEC_BOOLEAN()

-
#define G_IS_PARAM_SPEC_BOOLEAN(pspec)     (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOOLEAN))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_BOOLEAN.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_BOOLEAN()

-
#define G_PARAM_SPEC_BOOLEAN(pspec)        (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOOLEAN, GParamSpecBoolean))
-
-

Cast a GParamSpec instance into a GParamSpecBoolean.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_BOOLEAN()

-
#define G_VALUE_HOLDS_BOOLEAN(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOOLEAN))
-
-

Checks whether the given GValue can hold values of type G_TYPE_BOOLEAN.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_boolean ()

-
GParamSpec *
-g_param_spec_boolean (const gchar *name,
-                      const gchar *nick,
-                      const gchar *blurb,
-                      gboolean default_value,
-                      GParamFlags flags);
-

Creates a new GParamSpecBoolean instance specifying a G_TYPE_BOOLEAN -property. In many cases, it may be more appropriate to use an enum with -g_param_spec_enum(), both to improve code clarity by using explicitly named -values, and to allow for more values to be added in future without breaking -API.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

default_value

default value for the property specified

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_boolean ()

-
void
-g_value_set_boolean (GValue *value,
-                     gboolean v_boolean);
-

Set the contents of a G_TYPE_BOOLEAN GValue to v_boolean -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_BOOLEAN

 

v_boolean

boolean value to be set

 
-
-
-
-
-

g_value_get_boolean ()

-
gboolean
-g_value_get_boolean (const GValue *value);
-

Get the contents of a G_TYPE_BOOLEAN GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_BOOLEAN

 
-
-
-

Returns

-

boolean contents of value -

-
-
-
-
-

G_IS_PARAM_SPEC_CHAR()

-
#define G_IS_PARAM_SPEC_CHAR(pspec)        (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_CHAR))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_CHAR.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_CHAR()

-
#define G_PARAM_SPEC_CHAR(pspec)           (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_CHAR, GParamSpecChar))
-
-

Cast a GParamSpec instance into a GParamSpecChar.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_CHAR()

-
#define G_VALUE_HOLDS_CHAR(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_CHAR))
-
-

Checks whether the given GValue can hold values of type G_TYPE_CHAR.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_char ()

-
GParamSpec *
-g_param_spec_char (const gchar *name,
-                   const gchar *nick,
-                   const gchar *blurb,
-                   gint8 minimum,
-                   gint8 maximum,
-                   gint8 default_value,
-                   GParamFlags flags);
-

Creates a new GParamSpecChar instance specifying a G_TYPE_CHAR property.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

minimum

minimum value for the property specified

 

maximum

maximum value for the property specified

 

default_value

default value for the property specified

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_char ()

-
void
-g_value_set_char (GValue *value,
-                  gchar v_char);
-
-

g_value_set_char has been deprecated since version 2.32 and should not be used in newly-written code.

-

This function's input type is broken, see g_value_set_schar()

-
-

Set the contents of a G_TYPE_CHAR GValue to v_char -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_CHAR

 

v_char

character value to be set

 
-
-
-
-
-

g_value_get_char ()

-
gchar
-g_value_get_char (const GValue *value);
-
-

g_value_get_char has been deprecated since version 2.32 and should not be used in newly-written code.

-

This function's return type is broken, see g_value_get_schar()

-
-

Do not use this function; it is broken on platforms where the char -type is unsigned, such as ARM and PowerPC. See g_value_get_schar().

-

Get the contents of a G_TYPE_CHAR GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_CHAR

 
-
-
-

Returns

-

character contents of value -

-
-
-
-
-

g_value_get_schar ()

-
gint8
-g_value_get_schar (const GValue *value);
-

Get the contents of a G_TYPE_CHAR GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_CHAR

 
-
-
-

Returns

-

signed 8 bit integer contents of value -

-
-

Since: 2.32

-
-
-
-

g_value_set_schar ()

-
void
-g_value_set_schar (GValue *value,
-                   gint8 v_char);
-

Set the contents of a G_TYPE_CHAR GValue to v_char -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_CHAR

 

v_char

signed 8 bit integer to be set

 
-
-

Since: 2.32

-
-
-
-

G_IS_PARAM_SPEC_UCHAR()

-
#define G_IS_PARAM_SPEC_UCHAR(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UCHAR))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_UCHAR.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_UCHAR()

-
#define G_PARAM_SPEC_UCHAR(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UCHAR, GParamSpecUChar))
-
-

Cast a GParamSpec instance into a GParamSpecUChar.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_UCHAR()

-
#define G_VALUE_HOLDS_UCHAR(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UCHAR))
-
-

Checks whether the given GValue can hold values of type G_TYPE_UCHAR.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_uchar ()

-
GParamSpec *
-g_param_spec_uchar (const gchar *name,
-                    const gchar *nick,
-                    const gchar *blurb,
-                    guint8 minimum,
-                    guint8 maximum,
-                    guint8 default_value,
-                    GParamFlags flags);
-

Creates a new GParamSpecUChar instance specifying a G_TYPE_UCHAR property.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

minimum

minimum value for the property specified

 

maximum

maximum value for the property specified

 

default_value

default value for the property specified

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_uchar ()

-
void
-g_value_set_uchar (GValue *value,
-                   guchar v_uchar);
-

Set the contents of a G_TYPE_UCHAR GValue to v_uchar -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_UCHAR

 

v_uchar

unsigned character value to be set

 
-
-
-
-
-

g_value_get_uchar ()

-
guchar
-g_value_get_uchar (const GValue *value);
-

Get the contents of a G_TYPE_UCHAR GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_UCHAR

 
-
-
-

Returns

-

unsigned character contents of value -

-
-
-
-
-

G_IS_PARAM_SPEC_INT()

-
#define G_IS_PARAM_SPEC_INT(pspec)         (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_INT.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_INT()

-
#define G_PARAM_SPEC_INT(pspec)            (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT, GParamSpecInt))
-
-

Cast a GParamSpec instance into a GParamSpecInt.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_INT()

-
#define G_VALUE_HOLDS_INT(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT))
-
-

Checks whether the given GValue can hold values of type G_TYPE_INT.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_int ()

-
GParamSpec *
-g_param_spec_int (const gchar *name,
-                  const gchar *nick,
-                  const gchar *blurb,
-                  gint minimum,
-                  gint maximum,
-                  gint default_value,
-                  GParamFlags flags);
-

Creates a new GParamSpecInt instance specifying a G_TYPE_INT property.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

minimum

minimum value for the property specified

 

maximum

maximum value for the property specified

 

default_value

default value for the property specified

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_int ()

-
void
-g_value_set_int (GValue *value,
-                 gint v_int);
-

Set the contents of a G_TYPE_INT GValue to v_int -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_INT

 

v_int

integer value to be set

 
-
-
-
-
-

g_value_get_int ()

-
gint
-g_value_get_int (const GValue *value);
-

Get the contents of a G_TYPE_INT GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_INT

 
-
-
-

Returns

-

integer contents of value -

-
-
-
-
-

G_IS_PARAM_SPEC_UINT()

-
#define G_IS_PARAM_SPEC_UINT(pspec)        (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_UINT.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_UINT()

-
#define G_PARAM_SPEC_UINT(pspec)           (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT, GParamSpecUInt))
-
-

Cast a GParamSpec instance into a GParamSpecUInt.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_UINT()

-
#define G_VALUE_HOLDS_UINT(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT))
-
-

Checks whether the given GValue can hold values of type G_TYPE_UINT.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_uint ()

-
GParamSpec *
-g_param_spec_uint (const gchar *name,
-                   const gchar *nick,
-                   const gchar *blurb,
-                   guint minimum,
-                   guint maximum,
-                   guint default_value,
-                   GParamFlags flags);
-

Creates a new GParamSpecUInt instance specifying a G_TYPE_UINT property.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

minimum

minimum value for the property specified

 

maximum

maximum value for the property specified

 

default_value

default value for the property specified

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_uint ()

-
void
-g_value_set_uint (GValue *value,
-                  guint v_uint);
-

Set the contents of a G_TYPE_UINT GValue to v_uint -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_UINT

 

v_uint

unsigned integer value to be set

 
-
-
-
-
-

g_value_get_uint ()

-
guint
-g_value_get_uint (const GValue *value);
-

Get the contents of a G_TYPE_UINT GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_UINT

 
-
-
-

Returns

-

unsigned integer contents of value -

-
-
-
-
-

G_IS_PARAM_SPEC_LONG()

-
#define G_IS_PARAM_SPEC_LONG(pspec)        (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_LONG))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_LONG.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_LONG()

-
#define G_PARAM_SPEC_LONG(pspec)           (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_LONG, GParamSpecLong))
-
-

Cast a GParamSpec instance into a GParamSpecLong.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_LONG()

-
#define G_VALUE_HOLDS_LONG(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_LONG))
-
-

Checks whether the given GValue can hold values of type G_TYPE_LONG.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_long ()

-
GParamSpec *
-g_param_spec_long (const gchar *name,
-                   const gchar *nick,
-                   const gchar *blurb,
-                   glong minimum,
-                   glong maximum,
-                   glong default_value,
-                   GParamFlags flags);
-

Creates a new GParamSpecLong instance specifying a G_TYPE_LONG property.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

minimum

minimum value for the property specified

 

maximum

maximum value for the property specified

 

default_value

default value for the property specified

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_long ()

-
void
-g_value_set_long (GValue *value,
-                  glong v_long);
-

Set the contents of a G_TYPE_LONG GValue to v_long -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_LONG

 

v_long

long integer value to be set

 
-
-
-
-
-

g_value_get_long ()

-
glong
-g_value_get_long (const GValue *value);
-

Get the contents of a G_TYPE_LONG GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_LONG

 
-
-
-

Returns

-

long integer contents of value -

-
-
-
-
-

G_IS_PARAM_SPEC_ULONG()

-
#define G_IS_PARAM_SPEC_ULONG(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ULONG))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_ULONG.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_ULONG()

-
#define G_PARAM_SPEC_ULONG(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ULONG, GParamSpecULong))
-
-

Cast a GParamSpec instance into a GParamSpecULong.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_ULONG()

-
#define G_VALUE_HOLDS_ULONG(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_ULONG))
-
-

Checks whether the given GValue can hold values of type G_TYPE_ULONG.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_ulong ()

-
GParamSpec *
-g_param_spec_ulong (const gchar *name,
-                    const gchar *nick,
-                    const gchar *blurb,
-                    gulong minimum,
-                    gulong maximum,
-                    gulong default_value,
-                    GParamFlags flags);
-

Creates a new GParamSpecULong instance specifying a G_TYPE_ULONG -property.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

minimum

minimum value for the property specified

 

maximum

maximum value for the property specified

 

default_value

default value for the property specified

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_ulong ()

-
void
-g_value_set_ulong (GValue *value,
-                   gulong v_ulong);
-

Set the contents of a G_TYPE_ULONG GValue to v_ulong -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_ULONG

 

v_ulong

unsigned long integer value to be set

 
-
-
-
-
-

g_value_get_ulong ()

-
gulong
-g_value_get_ulong (const GValue *value);
-

Get the contents of a G_TYPE_ULONG GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_ULONG

 
-
-
-

Returns

-

unsigned long integer contents of value -

-
-
-
-
-

G_IS_PARAM_SPEC_INT64()

-
#define G_IS_PARAM_SPEC_INT64(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_INT64))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_INT64.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_INT64()

-
#define G_PARAM_SPEC_INT64(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_INT64, GParamSpecInt64))
-
-

Cast a GParamSpec instance into a GParamSpecInt64.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_INT64()

-
#define G_VALUE_HOLDS_INT64(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_INT64))
-
-

Checks whether the given GValue can hold values of type G_TYPE_INT64.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_int64 ()

-
GParamSpec *
-g_param_spec_int64 (const gchar *name,
-                    const gchar *nick,
-                    const gchar *blurb,
-                    gint64 minimum,
-                    gint64 maximum,
-                    gint64 default_value,
-                    GParamFlags flags);
-

Creates a new GParamSpecInt64 instance specifying a G_TYPE_INT64 property.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

minimum

minimum value for the property specified

 

maximum

maximum value for the property specified

 

default_value

default value for the property specified

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_int64 ()

-
void
-g_value_set_int64 (GValue *value,
-                   gint64 v_int64);
-

Set the contents of a G_TYPE_INT64 GValue to v_int64 -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_INT64

 

v_int64

64bit integer value to be set

 
-
-
-
-
-

g_value_get_int64 ()

-
gint64
-g_value_get_int64 (const GValue *value);
-

Get the contents of a G_TYPE_INT64 GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_INT64

 
-
-
-

Returns

-

64bit integer contents of value -

-
-
-
-
-

G_IS_PARAM_SPEC_UINT64()

-
#define G_IS_PARAM_SPEC_UINT64(pspec)      (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UINT64))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_UINT64.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_UINT64()

-
#define G_PARAM_SPEC_UINT64(pspec)         (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UINT64, GParamSpecUInt64))
-
-

Cast a GParamSpec instance into a GParamSpecUInt64.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_UINT64()

-
#define G_VALUE_HOLDS_UINT64(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_UINT64))
-
-

Checks whether the given GValue can hold values of type G_TYPE_UINT64.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_uint64 ()

-
GParamSpec *
-g_param_spec_uint64 (const gchar *name,
-                     const gchar *nick,
-                     const gchar *blurb,
-                     guint64 minimum,
-                     guint64 maximum,
-                     guint64 default_value,
-                     GParamFlags flags);
-

Creates a new GParamSpecUInt64 instance specifying a G_TYPE_UINT64 -property.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

minimum

minimum value for the property specified

 

maximum

maximum value for the property specified

 

default_value

default value for the property specified

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_uint64 ()

-
void
-g_value_set_uint64 (GValue *value,
-                    guint64 v_uint64);
-

Set the contents of a G_TYPE_UINT64 GValue to v_uint64 -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_UINT64

 

v_uint64

unsigned 64bit integer value to be set

 
-
-
-
-
-

g_value_get_uint64 ()

-
guint64
-g_value_get_uint64 (const GValue *value);
-

Get the contents of a G_TYPE_UINT64 GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_UINT64

 
-
-
-

Returns

-

unsigned 64bit integer contents of value -

-
-
-
-
-

G_IS_PARAM_SPEC_FLOAT()

-
#define G_IS_PARAM_SPEC_FLOAT(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLOAT))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_FLOAT.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_FLOAT()

-
#define G_PARAM_SPEC_FLOAT(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLOAT, GParamSpecFloat))
-
-

Cast a GParamSpec instance into a GParamSpecFloat.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_FLOAT()

-
#define G_VALUE_HOLDS_FLOAT(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLOAT))
-
-

Checks whether the given GValue can hold values of type G_TYPE_FLOAT.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_float ()

-
GParamSpec *
-g_param_spec_float (const gchar *name,
-                    const gchar *nick,
-                    const gchar *blurb,
-                    gfloat minimum,
-                    gfloat maximum,
-                    gfloat default_value,
-                    GParamFlags flags);
-

Creates a new GParamSpecFloat instance specifying a G_TYPE_FLOAT property.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

minimum

minimum value for the property specified

 

maximum

maximum value for the property specified

 

default_value

default value for the property specified

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_float ()

-
void
-g_value_set_float (GValue *value,
-                   gfloat v_float);
-

Set the contents of a G_TYPE_FLOAT GValue to v_float -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_FLOAT

 

v_float

float value to be set

 
-
-
-
-
-

g_value_get_float ()

-
gfloat
-g_value_get_float (const GValue *value);
-

Get the contents of a G_TYPE_FLOAT GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_FLOAT

 
-
-
-

Returns

-

float contents of value -

-
-
-
-
-

G_IS_PARAM_SPEC_DOUBLE()

-
#define G_IS_PARAM_SPEC_DOUBLE(pspec)      (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_DOUBLE))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_DOUBLE.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_DOUBLE()

-
#define G_PARAM_SPEC_DOUBLE(pspec)         (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_DOUBLE, GParamSpecDouble))
-
-

Cast a GParamSpec instance into a GParamSpecDouble.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_DOUBLE()

-
#define G_VALUE_HOLDS_DOUBLE(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_DOUBLE))
-
-

Checks whether the given GValue can hold values of type G_TYPE_DOUBLE.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_double ()

-
GParamSpec *
-g_param_spec_double (const gchar *name,
-                     const gchar *nick,
-                     const gchar *blurb,
-                     gdouble minimum,
-                     gdouble maximum,
-                     gdouble default_value,
-                     GParamFlags flags);
-

Creates a new GParamSpecDouble instance specifying a G_TYPE_DOUBLE -property.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

minimum

minimum value for the property specified

 

maximum

maximum value for the property specified

 

default_value

default value for the property specified

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_double ()

-
void
-g_value_set_double (GValue *value,
-                    gdouble v_double);
-

Set the contents of a G_TYPE_DOUBLE GValue to v_double -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_DOUBLE

 

v_double

double value to be set

 
-
-
-
-
-

g_value_get_double ()

-
gdouble
-g_value_get_double (const GValue *value);
-

Get the contents of a G_TYPE_DOUBLE GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_DOUBLE

 
-
-
-

Returns

-

double contents of value -

-
-
-
-
-

G_IS_PARAM_SPEC_ENUM()

-
#define G_IS_PARAM_SPEC_ENUM(pspec)        (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_ENUM))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_ENUM.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_ENUM()

-
#define G_PARAM_SPEC_ENUM(pspec)           (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_ENUM, GParamSpecEnum))
-
-

Cast a GParamSpec instance into a GParamSpecEnum.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_ENUM()

-
#define G_VALUE_HOLDS_ENUM(value)      (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_ENUM))
-
-

Checks whether the given GValue can hold values derived from type G_TYPE_ENUM.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_enum ()

-
GParamSpec *
-g_param_spec_enum (const gchar *name,
-                   const gchar *nick,
-                   const gchar *blurb,
-                   GType enum_type,
-                   gint default_value,
-                   GParamFlags flags);
-

Creates a new GParamSpecEnum instance specifying a G_TYPE_ENUM -property.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

enum_type

a GType derived from G_TYPE_ENUM

 

default_value

default value for the property specified

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_enum ()

-
void
-g_value_set_enum (GValue *value,
-                  gint v_enum);
-

Set the contents of a G_TYPE_ENUM GValue to v_enum -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue whose type is derived from G_TYPE_ENUM

 

v_enum

enum value to be set

 
-
-
-
-
-

g_value_get_enum ()

-
gint
-g_value_get_enum (const GValue *value);
-

Get the contents of a G_TYPE_ENUM GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue whose type is derived from G_TYPE_ENUM

 
-
-
-

Returns

-

enum contents of value -

-
-
-
-
-

G_IS_PARAM_SPEC_FLAGS()

-
#define G_IS_PARAM_SPEC_FLAGS(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_FLAGS))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_FLAGS.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_FLAGS()

-
#define G_PARAM_SPEC_FLAGS(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_FLAGS, GParamSpecFlags))
-
-

Cast a GParamSpec instance into a GParamSpecFlags.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_FLAGS()

-
#define G_VALUE_HOLDS_FLAGS(value)     (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_FLAGS))
-
-

Checks whether the given GValue can hold values derived from type G_TYPE_FLAGS.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_flags ()

-
GParamSpec *
-g_param_spec_flags (const gchar *name,
-                    const gchar *nick,
-                    const gchar *blurb,
-                    GType flags_type,
-                    guint default_value,
-                    GParamFlags flags);
-

Creates a new GParamSpecFlags instance specifying a G_TYPE_FLAGS -property.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

flags_type

a GType derived from G_TYPE_FLAGS

 

default_value

default value for the property specified

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_flags ()

-
void
-g_value_set_flags (GValue *value,
-                   guint v_flags);
-

Set the contents of a G_TYPE_FLAGS GValue to v_flags -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue whose type is derived from G_TYPE_FLAGS

 

v_flags

flags value to be set

 
-
-
-
-
-

g_value_get_flags ()

-
guint
-g_value_get_flags (const GValue *value);
-

Get the contents of a G_TYPE_FLAGS GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue whose type is derived from G_TYPE_FLAGS

 
-
-
-

Returns

-

flags contents of value -

-
-
-
-
-

G_IS_PARAM_SPEC_STRING()

-
#define G_IS_PARAM_SPEC_STRING(pspec)      (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_STRING))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_STRING.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_STRING()

-
#define G_PARAM_SPEC_STRING(pspec)         (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_STRING, GParamSpecString))
-
-

Casts a GParamSpec instance into a GParamSpecString.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_STRING()

-
#define G_VALUE_HOLDS_STRING(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_STRING))
-
-

Checks whether the given GValue can hold values of type G_TYPE_STRING.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_string ()

-
GParamSpec *
-g_param_spec_string (const gchar *name,
-                     const gchar *nick,
-                     const gchar *blurb,
-                     const gchar *default_value,
-                     GParamFlags flags);
-

Creates a new GParamSpecString instance.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

default_value

default value for the property specified.

[nullable]

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_string ()

-
void
-g_value_set_string (GValue *value,
-                    const gchar *v_string);
-

Set the contents of a G_TYPE_STRING GValue to v_string -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_STRING

 

v_string

caller-owned string to be duplicated for the GValue.

[nullable]
-
-
-
-
-

g_value_set_static_string ()

-
void
-g_value_set_static_string (GValue *value,
-                           const gchar *v_string);
-

Set the contents of a G_TYPE_STRING GValue to v_string -. -The string is assumed to be static, and is thus not duplicated -when setting the GValue.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_STRING

 

v_string

static string to be set.

[nullable]
-
-
-
-
-

g_value_take_string ()

-
void
-g_value_take_string (GValue *value,
-                     gchar *v_string);
-

Sets the contents of a G_TYPE_STRING GValue to v_string -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_STRING

 

v_string

string to take ownership of.

[nullable]
-
-

Since: 2.4

-
-
-
-

g_value_set_string_take_ownership ()

-
void
-g_value_set_string_take_ownership (GValue *value,
-                                   gchar *v_string);
-
-

g_value_set_string_take_ownership has been deprecated since version 2.4 and should not be used in newly-written code.

-

Use g_value_take_string() instead.

-
-

This is an internal function introduced mainly for C marshallers.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_STRING

 

v_string

duplicated unowned string to be set.

[nullable]
-
-
-
-
-

g_value_get_string ()

-
const gchar *
-g_value_get_string (const GValue *value);
-

Get the contents of a G_TYPE_STRING GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_STRING

 
-
-
-

Returns

-

string content of value -

-
-
-
-
-

g_value_dup_string ()

-
gchar *
-g_value_dup_string (const GValue *value);
-

Get a copy the contents of a G_TYPE_STRING GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_STRING

 
-
-
-

Returns

-

a newly allocated copy of the string content of value -

-
-
-
-
-

G_IS_PARAM_SPEC_PARAM()

-
#define G_IS_PARAM_SPEC_PARAM(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_PARAM))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_PARAM.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_PARAM()

-
#define G_PARAM_SPEC_PARAM(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_PARAM, GParamSpecParam))
-
-

Casts a GParamSpec instance into a GParamSpecParam.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_PARAM()

-
#define G_VALUE_HOLDS_PARAM(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_PARAM))
-
-

Checks whether the given GValue can hold values derived from type G_TYPE_PARAM.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_param ()

-
GParamSpec *
-g_param_spec_param (const gchar *name,
-                    const gchar *nick,
-                    const gchar *blurb,
-                    GType param_type,
-                    GParamFlags flags);
-

Creates a new GParamSpecParam instance specifying a G_TYPE_PARAM -property.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

param_type

a GType derived from G_TYPE_PARAM

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_param ()

-
void
-g_value_set_param (GValue *value,
-                   GParamSpec *param);
-

Set the contents of a G_TYPE_PARAM GValue to param -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_PARAM

 

param

the GParamSpec to be set.

[nullable]
-
-
-
-
-

g_value_take_param ()

-
void
-g_value_take_param (GValue *value,
-                    GParamSpec *param);
-

Sets the contents of a G_TYPE_PARAM GValue to param - and takes -over the ownership of the callers reference to param -; the caller -doesn't have to unref it any more.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_PARAM

 

param

the GParamSpec to be set.

[nullable]
-
-

Since: 2.4

-
-
-
-

g_value_set_param_take_ownership ()

-
void
-g_value_set_param_take_ownership (GValue *value,
-                                  GParamSpec *param);
-
-

g_value_set_param_take_ownership has been deprecated since version 2.4 and should not be used in newly-written code.

-

Use g_value_take_param() instead.

-
-

This is an internal function introduced mainly for C marshallers.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_PARAM

 

param

the GParamSpec to be set.

[nullable]
-
-
-
-
-

g_value_get_param ()

-
GParamSpec *
-g_value_get_param (const GValue *value);
-

Get the contents of a G_TYPE_PARAM GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue whose type is derived from G_TYPE_PARAM

 
-
-
-

Returns

-

GParamSpec content of value -.

-

[transfer none]

-
-
-
-
-

g_value_dup_param ()

-
GParamSpec *
-g_value_dup_param (const GValue *value);
-

Get the contents of a G_TYPE_PARAM GValue, increasing its -reference count.

-

[skip]

-
-

Parameters

-
----- - - - - - -

value

a valid GValue whose type is derived from G_TYPE_PARAM

 
-
-
-

Returns

-

GParamSpec content of value -, should be unreferenced when -no longer needed.

-
-
-
-
-

G_IS_PARAM_SPEC_BOXED()

-
#define G_IS_PARAM_SPEC_BOXED(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_BOXED))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_BOXED.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_BOXED()

-
#define G_PARAM_SPEC_BOXED(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_BOXED, GParamSpecBoxed))
-
-

Cast a GParamSpec instance into a GParamSpecBoxed.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_BOXED()

-
#define G_VALUE_HOLDS_BOXED(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_BOXED))
-
-

Checks whether the given GValue can hold values derived -from type G_TYPE_BOXED.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_boxed ()

-
GParamSpec *
-g_param_spec_boxed (const gchar *name,
-                    const gchar *nick,
-                    const gchar *blurb,
-                    GType boxed_type,
-                    GParamFlags flags);
-

Creates a new GParamSpecBoxed instance specifying a G_TYPE_BOXED -derived property.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

boxed_type

G_TYPE_BOXED derived type of this property

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_boxed ()

-
void
-g_value_set_boxed (GValue *value,
-                   gconstpointer v_boxed);
-

Set the contents of a G_TYPE_BOXED derived GValue to v_boxed -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of G_TYPE_BOXED derived type

 

v_boxed

boxed value to be set.

[nullable]
-
-
-
-
-

g_value_set_static_boxed ()

-
void
-g_value_set_static_boxed (GValue *value,
-                          gconstpointer v_boxed);
-

Set the contents of a G_TYPE_BOXED derived GValue to v_boxed -. -The boxed value is assumed to be static, and is thus not duplicated -when setting the GValue.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of G_TYPE_BOXED derived type

 

v_boxed

static boxed value to be set.

[nullable]
-
-
-
-
-

g_value_take_boxed ()

-
void
-g_value_take_boxed (GValue *value,
-                    gconstpointer v_boxed);
-

Sets the contents of a G_TYPE_BOXED derived GValue to v_boxed - -and takes over the ownership of the callers reference to v_boxed -; -the caller doesn't have to unref it any more.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of G_TYPE_BOXED derived type

 

v_boxed

duplicated unowned boxed value to be set.

[nullable]
-
-

Since: 2.4

-
-
-
-

g_value_set_boxed_take_ownership ()

-
void
-g_value_set_boxed_take_ownership (GValue *value,
-                                  gconstpointer v_boxed);
-
-

g_value_set_boxed_take_ownership has been deprecated since version 2.4 and should not be used in newly-written code.

-

Use g_value_take_boxed() instead.

-
-

This is an internal function introduced mainly for C marshallers.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of G_TYPE_BOXED derived type

 

v_boxed

duplicated unowned boxed value to be set.

[nullable]
-
-
-
-
-

g_value_get_boxed ()

-
gpointer
-g_value_get_boxed (const GValue *value);
-

Get the contents of a G_TYPE_BOXED derived GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of G_TYPE_BOXED derived type

 
-
-
-

Returns

-

boxed contents of value -.

-

[transfer none]

-
-
-
-
-

g_value_dup_boxed ()

-
gpointer
-g_value_dup_boxed (const GValue *value);
-

Get the contents of a G_TYPE_BOXED derived GValue. Upon getting, -the boxed value is duplicated and needs to be later freed with -g_boxed_free(), e.g. like: g_boxed_free (G_VALUE_TYPE (value -), -return_value);

-

[skip]

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of G_TYPE_BOXED derived type

 
-
-
-

Returns

-

boxed contents of value -

-
-
-
-
-

G_IS_PARAM_SPEC_POINTER()

-
#define G_IS_PARAM_SPEC_POINTER(pspec)     (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_POINTER))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_POINTER.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_POINTER()

-
#define G_PARAM_SPEC_POINTER(pspec)        (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_POINTER, GParamSpecPointer))
-
-

Casts a GParamSpec instance into a GParamSpecPointer.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_POINTER()

-
#define G_VALUE_HOLDS_POINTER(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_POINTER))
-
-

Checks whether the given GValue can hold values of type G_TYPE_POINTER.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_pointer ()

-
GParamSpec *
-g_param_spec_pointer (const gchar *name,
-                      const gchar *nick,
-                      const gchar *blurb,
-                      GParamFlags flags);
-

Creates a new GParamSpecPointer instance specifying a pointer property. -Where possible, it is better to use g_param_spec_object() or -g_param_spec_boxed() to expose memory management information.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_pointer ()

-
void
-g_value_set_pointer (GValue *value,
-                     gpointer v_pointer);
-

Set the contents of a pointer GValue to v_pointer -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of G_TYPE_POINTER

 

v_pointer

pointer value to be set

 
-
-
-
-
-

g_value_get_pointer ()

-
gpointer
-g_value_get_pointer (const GValue *value);
-

Get the contents of a pointer GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of G_TYPE_POINTER

 
-
-
-

Returns

-

pointer contents of value -.

-

[transfer none]

-
-
-
-
-

G_IS_PARAM_SPEC_OBJECT()

-
#define G_IS_PARAM_SPEC_OBJECT(pspec)      (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OBJECT))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_OBJECT.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_OBJECT()

-
#define G_PARAM_SPEC_OBJECT(pspec)         (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OBJECT, GParamSpecObject))
-
-

Casts a GParamSpec instance into a GParamSpecObject.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

G_VALUE_HOLDS_OBJECT()

-
#define G_VALUE_HOLDS_OBJECT(value) (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_OBJECT))
-
-

Checks whether the given GValue can hold values derived from type G_TYPE_OBJECT.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

g_param_spec_object ()

-
GParamSpec *
-g_param_spec_object (const gchar *name,
-                     const gchar *nick,
-                     const gchar *blurb,
-                     GType object_type,
-                     GParamFlags flags);
-

Creates a new GParamSpecBoxed instance specifying a G_TYPE_OBJECT -derived property.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

object_type

G_TYPE_OBJECT derived type of this property

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

g_value_set_object ()

-
void
-g_value_set_object (GValue *value,
-                    gpointer v_object);
-

Set the contents of a G_TYPE_OBJECT derived GValue to v_object -.

-

g_value_set_object() increases the reference count of v_object - -(the GValue holds a reference to v_object -). If you do not wish -to increase the reference count of the object (i.e. you wish to -pass your current reference to the GValue because you no longer -need it), use g_value_take_object() instead.

-

It is important that your GValue holds a reference to v_object - (either its -own, or one it has taken) to ensure that the object won't be destroyed while -the GValue still exists).

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of G_TYPE_OBJECT derived type

 

v_object

object value to be set.

[type GObject.Object][nullable]
-
-
-
-
-

g_value_take_object ()

-
void
-g_value_take_object (GValue *value,
-                     gpointer v_object);
-

Sets the contents of a G_TYPE_OBJECT derived GValue to v_object - -and takes over the ownership of the callers reference to v_object -; -the caller doesn't have to unref it any more (i.e. the reference -count of the object is not increased).

-

If you want the GValue to hold its own reference to v_object -, use -g_value_set_object() instead.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of G_TYPE_OBJECT derived type

 

v_object

object value to be set.

[nullable]
-
-

Since: 2.4

-
-
-
-

g_value_set_object_take_ownership ()

-
void
-g_value_set_object_take_ownership (GValue *value,
-                                   gpointer v_object);
-
-

g_value_set_object_take_ownership has been deprecated since version 2.4 and should not be used in newly-written code.

-

Use g_value_take_object() instead.

-
-

This is an internal function introduced mainly for C marshallers.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of G_TYPE_OBJECT derived type

 

v_object

object value to be set.

[nullable]
-
-
-
-
-

g_value_get_object ()

-
gpointer
-g_value_get_object (const GValue *value);
-

Get the contents of a G_TYPE_OBJECT derived GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of G_TYPE_OBJECT derived type

 
-
-
-

Returns

-

object contents of value -.

-

[type GObject.Object][transfer none]

-
-
-
-
-

g_value_dup_object ()

-
gpointer
-g_value_dup_object (const GValue *value);
-

Get the contents of a G_TYPE_OBJECT derived GValue, increasing -its reference count. If the contents of the GValue are NULL, then -NULL will be returned.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue whose type is derived from G_TYPE_OBJECT

 
-
-
-

Returns

-

object content of value -, -should be unreferenced when no longer needed.

-

[type GObject.Object][transfer full]

-
-
-
-
-

G_IS_PARAM_SPEC_UNICHAR()

-
#define G_IS_PARAM_SPEC_UNICHAR(pspec)     (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_UNICHAR))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_UNICHAR.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_UNICHAR()

-
#define G_PARAM_SPEC_UNICHAR(pspec)        (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_UNICHAR, GParamSpecUnichar))
-
-

Cast a GParamSpec instance into a GParamSpecUnichar.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

g_param_spec_unichar ()

-
GParamSpec *
-g_param_spec_unichar (const gchar *name,
-                      const gchar *nick,
-                      const gchar *blurb,
-                      gunichar default_value,
-                      GParamFlags flags);
-

Creates a new GParamSpecUnichar instance specifying a G_TYPE_UINT -property. GValue structures for this property can be accessed with -g_value_set_uint() and g_value_get_uint().

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

default_value

default value for the property specified

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-
-
-
-

G_IS_PARAM_SPEC_VALUE_ARRAY()

-
#define G_IS_PARAM_SPEC_VALUE_ARRAY(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VALUE_ARRAY))
-
-
-

G_IS_PARAM_SPEC_VALUE_ARRAY has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use GArray instead of GValueArray

-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_VALUE_ARRAY.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-

Returns

-

TRUE on success.

-
-
-
-
-

G_PARAM_SPEC_VALUE_ARRAY()

-
#define G_PARAM_SPEC_VALUE_ARRAY(pspec)    (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VALUE_ARRAY, GParamSpecValueArray))
-
-
-

G_PARAM_SPEC_VALUE_ARRAY has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use GArray instead of GValueArray

-
-

Cast a GParamSpec instance into a GParamSpecValueArray.

-
-

Parameters

-
----- - - - - - -

pspec

a valid GParamSpec instance

 
-
-
-
-
-

g_param_spec_value_array ()

-
GParamSpec *
-g_param_spec_value_array (const gchar *name,
-                          const gchar *nick,
-                          const gchar *blurb,
-                          GParamSpec *element_spec,
-                          GParamFlags flags);
-

Creates a new GParamSpecValueArray instance specifying a -G_TYPE_VALUE_ARRAY property. G_TYPE_VALUE_ARRAY is a -G_TYPE_BOXED type, as such, GValue structures for this property -can be accessed with g_value_set_boxed() and g_value_get_boxed().

-

See g_param_spec_internal() for details on property names.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

element_spec

a GParamSpec describing the elements contained in -arrays of this property, may be NULL

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification

-
-
-
-
-

G_IS_PARAM_SPEC_OVERRIDE()

-
#define G_IS_PARAM_SPEC_OVERRIDE(pspec)    (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_OVERRIDE))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_OVERRIDE.

-
-

Parameters

-
----- - - - - - -

pspec

a GParamSpec

 
-
-
-

Returns

-

TRUE on success.

-
-

Since: 2.4

-
-
-
-

G_PARAM_SPEC_OVERRIDE()

-
#define G_PARAM_SPEC_OVERRIDE(pspec)       (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_OVERRIDE, GParamSpecOverride))
-
-

Casts a GParamSpec into a GParamSpecOverride.

-
-

Parameters

-
----- - - - - - -

pspec

a GParamSpec

 
-
-

Since: 2.4

-
-
-
-

g_param_spec_override ()

-
GParamSpec *
-g_param_spec_override (const gchar *name,
-                       GParamSpec *overridden);
-

Creates a new property of type GParamSpecOverride. This is used -to direct operations to another paramspec, and will not be directly -useful unless you are implementing a new base type similar to GObject.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

name

the name of the property.

 

overridden

The property that is being overridden

 
-
-
-

Returns

-

the newly created GParamSpec

-
-

Since: 2.4

-
-
-
-

G_IS_PARAM_SPEC_GTYPE()

-
#define G_IS_PARAM_SPEC_GTYPE(pspec)       (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_GTYPE))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_GTYPE.

-
-

Parameters

-
----- - - - - - -

pspec

a GParamSpec

 
-
-
-

Returns

-

TRUE on success.

-
-

Since: 2.10

-
-
-
-

G_PARAM_SPEC_GTYPE()

-
#define G_PARAM_SPEC_GTYPE(pspec)          (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_GTYPE, GParamSpecGType))
-
-

Casts a GParamSpec into a GParamSpecGType.

-
-

Parameters

-
----- - - - - - -

pspec

a GParamSpec

 
-
-

Since: 2.10

-
-
-
-

G_VALUE_HOLDS_GTYPE()

-
#define G_VALUE_HOLDS_GTYPE(value)	 (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_GTYPE))
-
-

Checks whether the given GValue can hold values of type G_TYPE_GTYPE.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-

Since: 2.12

-
-
-
-

g_param_spec_gtype ()

-
GParamSpec *
-g_param_spec_gtype (const gchar *name,
-                    const gchar *nick,
-                    const gchar *blurb,
-                    GType is_a_type,
-                    GParamFlags flags);
-

Creates a new GParamSpecGType instance specifying a -G_TYPE_GTYPE property.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

is_a_type

a GType whose subtypes are allowed as values -of the property (use G_TYPE_NONE for any type)

 

flags

flags for the property specified

 
-
-
-

Returns

-

a newly created parameter specification.

-

[transfer full]

-
-

Since: 2.10

-
-
-
-

g_value_get_gtype ()

-
GType
-g_value_get_gtype (const GValue *value);
-

Get the contents of a G_TYPE_GTYPE GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_GTYPE

 
-
-
-

Returns

-

the GType stored in value -

-
-

Since: 2.12

-
-
-
-

g_value_set_gtype ()

-
void
-g_value_set_gtype (GValue *value,
-                   GType v_gtype);
-

Set the contents of a G_TYPE_GTYPE GValue to v_gtype -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_GTYPE

 

v_gtype

GType to be set

 
-
-

Since: 2.12

-
-
-
-

G_IS_PARAM_SPEC_VARIANT()

-
#define G_IS_PARAM_SPEC_VARIANT(pspec)      (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), G_TYPE_PARAM_VARIANT))
-
-

Checks whether the given GParamSpec is of type G_TYPE_PARAM_VARIANT.

-
-

Parameters

-
----- - - - - - -

pspec

a GParamSpec

 
-
-
-

Returns

-

TRUE on success

-
-

Since: 2.26

-
-
-
-

G_PARAM_SPEC_VARIANT()

-
#define G_PARAM_SPEC_VARIANT(pspec)         (G_TYPE_CHECK_INSTANCE_CAST ((pspec), G_TYPE_PARAM_VARIANT, GParamSpecVariant))
-
-

Casts a GParamSpec into a GParamSpecVariant.

-
-

Parameters

-
----- - - - - - -

pspec

a GParamSpec

 
-
-

Since: 2.26

-
-
-
-

G_VALUE_HOLDS_VARIANT()

-
#define G_VALUE_HOLDS_VARIANT(value)     (G_TYPE_CHECK_VALUE_TYPE ((value), G_TYPE_VARIANT))
-
-

Checks whether the given GValue can hold values of type G_TYPE_VARIANT.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue structure

 
-
-
-

Returns

-

TRUE on success.

-
-

Since: 2.26

-
-
-
-

g_param_spec_variant ()

-
GParamSpec *
-g_param_spec_variant (const gchar *name,
-                      const gchar *nick,
-                      const gchar *blurb,
-                      const GVariantType *type,
-                      GVariant *default_value,
-                      GParamFlags flags);
-

Creates a new GParamSpecVariant instance specifying a GVariant -property.

-

If default_value - is floating, it is consumed.

-

See g_param_spec_internal() for details on property names.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

name

canonical name of the property specified

 

nick

nick name for the property specified

 

blurb

description of the property specified

 

type

a GVariantType

 

default_value

a GVariant of type type -to -use as the default value, or NULL.

[nullable][transfer full]

flags

flags for the property specified

 
-
-
-

Returns

-

the newly created GParamSpec.

-

[transfer full]

-
-

Since: 2.26

-
-
-
-

g_value_get_variant ()

-
GVariant *
-g_value_get_variant (const GValue *value);
-

Get the contents of a variant GValue.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_VARIANT

 
-
-
-

Returns

-

variant contents of value -

-
-

Since: 2.26

-
-
-
-

g_value_dup_variant ()

-
GVariant *
-g_value_dup_variant (const GValue *value);
-

Get the contents of a variant GValue, increasing its refcount.

-
-

Parameters

-
----- - - - - - -

value

a valid GValue of type G_TYPE_VARIANT

 
-
-
-

Returns

-

variant contents of value -, should be unrefed using -g_variant_unref() when no longer needed

-
-

Since: 2.26

-
-
-
-

g_value_set_variant ()

-
void
-g_value_set_variant (GValue *value,
-                     GVariant *variant);
-

Set the contents of a variant GValue to variant -. -If the variant is floating, it is consumed.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_VARIANT

 

variant

a GVariant, or NULL.

[nullable]
-
-

Since: 2.26

-
-
-
-

g_value_take_variant ()

-
void
-g_value_take_variant (GValue *value,
-                      GVariant *variant);
-

Set the contents of a variant GValue to variant -, and takes over -the ownership of the caller's reference to variant -; -the caller doesn't have to unref it any more (i.e. the reference -count of the variant is not increased).

-

If variant - was floating then its floating reference is converted to -a hard reference.

-

If you want the GValue to hold its own reference to variant -, use -g_value_set_variant() instead.

-

This is an internal function introduced mainly for C marshallers.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a valid GValue of type G_TYPE_VARIANT

 

variant

a GVariant, or NULL.

[nullable][transfer full]
-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

G_TYPE_PARAM_BOOLEAN

-
#define G_TYPE_PARAM_BOOLEAN		   (g_param_spec_types[2])
-
-

The GType of GParamSpecBoolean.

-
-
-
-

struct GParamSpecBoolean

-
struct GParamSpecBoolean {
-  GParamSpec    parent_instance;
-  
-  gboolean      default_value;
-};
-
-

A GParamSpec derived structure that contains the meta data for boolean properties.

-
-

Members

-
----- - - - - - -

gboolean default_value;

default value for the property specified

 
-
-
-
-
-

G_TYPE_PARAM_CHAR

-
#define G_TYPE_PARAM_CHAR		   (g_param_spec_types[0])
-
-

The GType of GParamSpecChar.

-
-
-
-

struct GParamSpecChar

-
struct GParamSpecChar {
-  GParamSpec    parent_instance;
-  
-  gint8         minimum;
-  gint8         maximum;
-  gint8         default_value;
-};
-
-

A GParamSpec derived structure that contains the meta data for character properties.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

gint8 minimum;

minimum value for the property specified

 

gint8 maximum;

maximum value for the property specified

 

gint8 default_value;

default value for the property specified

 
-
-
-
-
-

G_TYPE_PARAM_UCHAR

-
#define G_TYPE_PARAM_UCHAR		   (g_param_spec_types[1])
-
-

The GType of GParamSpecUChar.

-
-
-
-

struct GParamSpecUChar

-
struct GParamSpecUChar {
-  GParamSpec    parent_instance;
-  
-  guint8        minimum;
-  guint8        maximum;
-  guint8        default_value;
-};
-
-

A GParamSpec derived structure that contains the meta data for unsigned character properties.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

guint8 minimum;

minimum value for the property specified

 

guint8 maximum;

maximum value for the property specified

 

guint8 default_value;

default value for the property specified

 
-
-
-
-
-

G_TYPE_PARAM_INT

-
#define G_TYPE_PARAM_INT		   (g_param_spec_types[3])
-
-

The GType of GParamSpecInt.

-
-
-
-

struct GParamSpecInt

-
struct GParamSpecInt {
-  GParamSpec    parent_instance;
-  
-  gint          minimum;
-  gint          maximum;
-  gint          default_value;
-};
-
-

A GParamSpec derived structure that contains the meta data for integer properties.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

gint minimum;

minimum value for the property specified

 

gint maximum;

maximum value for the property specified

 

gint default_value;

default value for the property specified

 
-
-
-
-
-

G_TYPE_PARAM_UINT

-
#define G_TYPE_PARAM_UINT		   (g_param_spec_types[4])
-
-

The GType of GParamSpecUInt.

-
-
-
-

struct GParamSpecUInt

-
struct GParamSpecUInt {
-  GParamSpec    parent_instance;
-  
-  guint         minimum;
-  guint         maximum;
-  guint         default_value;
-};
-
-

A GParamSpec derived structure that contains the meta data for unsigned integer properties.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

guint minimum;

minimum value for the property specified

 

guint maximum;

maximum value for the property specified

 

guint default_value;

default value for the property specified

 
-
-
-
-
-

G_TYPE_PARAM_LONG

-
#define G_TYPE_PARAM_LONG		   (g_param_spec_types[5])
-
-

The GType of GParamSpecLong.

-
-
-
-

struct GParamSpecLong

-
struct GParamSpecLong {
-  GParamSpec    parent_instance;
-  
-  glong         minimum;
-  glong         maximum;
-  glong         default_value;
-};
-
-

A GParamSpec derived structure that contains the meta data for long integer properties.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

glong minimum;

minimum value for the property specified

 

glong maximum;

maximum value for the property specified

 

glong default_value;

default value for the property specified

 
-
-
-
-
-

G_TYPE_PARAM_ULONG

-
#define G_TYPE_PARAM_ULONG		   (g_param_spec_types[6])
-
-

The GType of GParamSpecULong.

-
-
-
-

struct GParamSpecULong

-
struct GParamSpecULong {
-  GParamSpec    parent_instance;
-  
-  gulong        minimum;
-  gulong        maximum;
-  gulong        default_value;
-};
-
-

A GParamSpec derived structure that contains the meta data for unsigned long integer properties.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

gulong minimum;

minimum value for the property specified

 

gulong maximum;

maximum value for the property specified

 

gulong default_value;

default value for the property specified

 
-
-
-
-
-

G_TYPE_PARAM_INT64

-
#define G_TYPE_PARAM_INT64		   (g_param_spec_types[7])
-
-

The GType of GParamSpecInt64.

-
-
-
-

struct GParamSpecInt64

-
struct GParamSpecInt64 {
-  GParamSpec    parent_instance;
-  
-  gint64        minimum;
-  gint64        maximum;
-  gint64        default_value;
-};
-
-

A GParamSpec derived structure that contains the meta data for 64bit integer properties.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

gint64 minimum;

minimum value for the property specified

 

gint64 maximum;

maximum value for the property specified

 

gint64 default_value;

default value for the property specified

 
-
-
-
-
-

G_TYPE_PARAM_UINT64

-
#define G_TYPE_PARAM_UINT64		   (g_param_spec_types[8])
-
-

The GType of GParamSpecUInt64.

-
-
-
-

struct GParamSpecUInt64

-
struct GParamSpecUInt64 {
-  GParamSpec    parent_instance;
-  
-  guint64       minimum;
-  guint64       maximum;
-  guint64       default_value;
-};
-
-

A GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

guint64 minimum;

minimum value for the property specified

 

guint64 maximum;

maximum value for the property specified

 

guint64 default_value;

default value for the property specified

 
-
-
-
-
-

G_TYPE_PARAM_FLOAT

-
#define G_TYPE_PARAM_FLOAT		   (g_param_spec_types[12])
-
-

The GType of GParamSpecFloat.

-
-
-
-

struct GParamSpecFloat

-
struct GParamSpecFloat {
-  GParamSpec    parent_instance;
-  
-  gfloat        minimum;
-  gfloat        maximum;
-  gfloat        default_value;
-  gfloat        epsilon;
-};
-
-

A GParamSpec derived structure that contains the meta data for float properties.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

gfloat minimum;

minimum value for the property specified

 

gfloat maximum;

maximum value for the property specified

 

gfloat default_value;

default value for the property specified

 

gfloat epsilon;

values closer than epsilon -will be considered identical -by g_param_values_cmp(); the default value is 1e-30.

 
-
-
-
-
-

G_TYPE_PARAM_DOUBLE

-
#define G_TYPE_PARAM_DOUBLE		   (g_param_spec_types[13])
-
-

The GType of GParamSpecDouble.

-
-
-
-

struct GParamSpecDouble

-
struct GParamSpecDouble {
-  GParamSpec    parent_instance;
-  
-  gdouble       minimum;
-  gdouble       maximum;
-  gdouble       default_value;
-  gdouble       epsilon;
-};
-
-

A GParamSpec derived structure that contains the meta data for double properties.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

gdouble minimum;

minimum value for the property specified

 

gdouble maximum;

maximum value for the property specified

 

gdouble default_value;

default value for the property specified

 

gdouble epsilon;

values closer than epsilon -will be considered identical -by g_param_values_cmp(); the default value is 1e-90.

 
-
-
-
-
-

G_TYPE_PARAM_ENUM

-
#define G_TYPE_PARAM_ENUM		   (g_param_spec_types[10])
-
-

The GType of GParamSpecEnum.

-
-
-
-

struct GParamSpecEnum

-
struct GParamSpecEnum {
-  GParamSpec    parent_instance;
-  
-  GEnumClass   *enum_class;
-  gint          default_value;
-};
-
-

A GParamSpec derived structure that contains the meta data for enum -properties.

-
-

Members

-
----- - - - - - - - - - - - - -

GEnumClass *enum_class;

the GEnumClass for the enum

 

gint default_value;

default value for the property specified

 
-
-
-
-
-

G_TYPE_PARAM_FLAGS

-
#define G_TYPE_PARAM_FLAGS		   (g_param_spec_types[11])
-
-

The GType of GParamSpecFlags.

-
-
-
-

struct GParamSpecFlags

-
struct GParamSpecFlags {
-  GParamSpec    parent_instance;
-  
-  GFlagsClass  *flags_class;
-  guint         default_value;
-};
-
-

A GParamSpec derived structure that contains the meta data for flags -properties.

-
-

Members

-
----- - - - - - - - - - - - - -

GFlagsClass *flags_class;

the GFlagsClass for the flags

 

guint default_value;

default value for the property specified

 
-
-
-
-
-

G_TYPE_PARAM_STRING

-
#define G_TYPE_PARAM_STRING		   (g_param_spec_types[14])
-
-

The GType of GParamSpecString.

-
-
-
-

struct GParamSpecString

-
struct GParamSpecString {
-  GParamSpec    parent_instance;
-  
-  gchar        *default_value;
-  gchar        *cset_first;
-  gchar        *cset_nth;
-  gchar         substitutor;
-  guint         null_fold_if_empty : 1;
-  guint         ensure_non_null : 1;
-};
-
-

A GParamSpec derived structure that contains the meta data for string -properties.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

gchar *default_value;

default value for the property specified

 

gchar *cset_first;

a string containing the allowed values for the first byte

 

gchar *cset_nth;

a string containing the allowed values for the subsequent bytes

 

gchar substitutor;

the replacement byte for bytes which don't match cset_first -or cset_nth -.

 

guint null_fold_if_empty : 1;

replace empty string by NULL

 

guint ensure_non_null : 1;

replace NULL strings by an empty string

 
-
-
-
-
-

gchararray

-
typedef gchar* gchararray;
-
-

A C representable type name for G_TYPE_STRING.

-
-
-
-

G_TYPE_PARAM_PARAM

-
#define G_TYPE_PARAM_PARAM		   (g_param_spec_types[15])
-
-

The GType of GParamSpecParam.

-
-
-
-

struct GParamSpecParam

-
struct GParamSpecParam {
-  GParamSpec    parent_instance;
-};
-
-

A GParamSpec derived structure that contains the meta data for G_TYPE_PARAM -properties.

-
-

Members

-
----- - -
-
-
-
-
-

G_TYPE_PARAM_BOXED

-
#define G_TYPE_PARAM_BOXED		   (g_param_spec_types[16])
-
-

The GType of GParamSpecBoxed.

-
-
-
-

struct GParamSpecBoxed

-
struct GParamSpecBoxed {
-  GParamSpec    parent_instance;
-};
-
-

A GParamSpec derived structure that contains the meta data for boxed properties.

-
-

Members

-
----- - -
-
-
-
-
-

G_TYPE_PARAM_POINTER

-
#define G_TYPE_PARAM_POINTER		   (g_param_spec_types[17])
-
-

The GType of GParamSpecPointer.

-
-
-
-

struct GParamSpecPointer

-
struct GParamSpecPointer {
-  GParamSpec    parent_instance;
-};
-
-

A GParamSpec derived structure that contains the meta data for pointer properties.

-
-

Members

-
----- - -
-
-
-
-
-

G_TYPE_PARAM_OBJECT

-
#define G_TYPE_PARAM_OBJECT		   (g_param_spec_types[19])
-
-

The GType of GParamSpecObject.

-
-
-
-

struct GParamSpecObject

-
struct GParamSpecObject {
-  GParamSpec    parent_instance;
-};
-
-

A GParamSpec derived structure that contains the meta data for object properties.

-
-

Members

-
----- - -
-
-
-
-
-

G_TYPE_PARAM_UNICHAR

-
#define G_TYPE_PARAM_UNICHAR		   (g_param_spec_types[9])
-
-

The GType of GParamSpecUnichar.

-
-
-
-

struct GParamSpecUnichar

-
struct GParamSpecUnichar {
-  GParamSpec    parent_instance;
-  
-  gunichar      default_value;
-};
-
-

A GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.

-
-

Members

-
----- - - - - - -

gunichar default_value;

default value for the property specified

 
-
-
-
-
-

G_TYPE_PARAM_VALUE_ARRAY

-
#define G_TYPE_PARAM_VALUE_ARRAY	   (g_param_spec_types[18])
-
-
-

G_TYPE_PARAM_VALUE_ARRAY has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use GArray instead of GValueArray

-
-

The GType of GParamSpecValueArray.

-
-
-
-

struct GParamSpecValueArray

-
struct GParamSpecValueArray {
-  GParamSpec    parent_instance;
-  GParamSpec   *element_spec;
-  guint		fixed_n_elements;
-};
-
-

A GParamSpec derived structure that contains the meta data for GValueArray properties.

-
-

Members

-
----- - - - - - - - - - - - - -

GParamSpec *element_spec;

a GParamSpec describing the elements contained in arrays of this property, may be NULL

 

guint fixed_n_elements;

if greater than 0, arrays of this property will always have this many elements

 
-
-
-
-
-

G_TYPE_PARAM_OVERRIDE

-
#define G_TYPE_PARAM_OVERRIDE		   (g_param_spec_types[20])
-
-

The GType of GParamSpecOverride.

-

Since: 2.4

-
-
-
-

struct GParamSpecOverride

-
struct GParamSpecOverride {
-};
-
-

This is a type of GParamSpec type that simply redirects operations to -another paramspec. All operations other than getting or -setting the value are redirected, including accessing the nick and -blurb, validating a value, and so forth. See -g_param_spec_get_redirect_target() for retrieving the overidden -property. GParamSpecOverride is used in implementing -g_object_class_override_property(), and will not be directly useful -unless you are implementing a new base type similar to GObject.

-

Since: 2.4

-
-
-
-

G_TYPE_PARAM_GTYPE

-
#define G_TYPE_PARAM_GTYPE		   (g_param_spec_types[21])
-
-

The GType of GParamSpecGType.

-

Since: 2.10

-
-
-
-

struct GParamSpecGType

-
struct GParamSpecGType {
-  GParamSpec    parent_instance;
-  GType         is_a_type;
-};
-
-

A GParamSpec derived structure that contains the meta data for GType properties.

-
-

Members

-
----- - - - - - -

GType is_a_type;

a GType whose subtypes can occur as values

 
-
-

Since: 2.10

-
-
-
-

G_TYPE_PARAM_VARIANT

-
#define G_TYPE_PARAM_VARIANT                (g_param_spec_types[22])
-
-

The GType of GParamSpecVariant.

-

Since: 2.26

-
-
-
-

struct GParamSpecVariant

-
struct GParamSpecVariant {
-  GParamSpec    parent_instance;
-  GVariantType *type;
-  GVariant     *default_value;
-};
-
-

A GParamSpec derived structure that contains the meta data for GVariant properties.

-
-

Members

-
----- - - - - - - - - - - - - -

GVariantType *type;

a GVariantType, or NULL

 

GVariant *default_value;

a GVariant, or NULL

 
-
-

Since: 2.26

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gobject-The-Base-Object-Type.html b/docs/reference/gobject/html/gobject-The-Base-Object-Type.html deleted file mode 100644 index 82d2f87c3..000000000 --- a/docs/reference/gobject/html/gobject-The-Base-Object-Type.html +++ /dev/null @@ -1,4225 +0,0 @@ - - - - -GObject: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

GObject

-

GObject — The base object type

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-void - -(*GObjectGetPropertyFunc) () -
-void - -(*GObjectSetPropertyFunc) () -
-void - -(*GObjectFinalizeFunc) () -
#define -G_TYPE_IS_OBJECT() -
#define -G_OBJECT() -
#define -G_IS_OBJECT() -
#define -G_OBJECT_CLASS() -
#define -G_IS_OBJECT_CLASS() -
#define -G_OBJECT_GET_CLASS() -
#define -G_OBJECT_TYPE() -
#define -G_OBJECT_TYPE_NAME() -
#define -G_OBJECT_CLASS_TYPE() -
#define -G_OBJECT_CLASS_NAME() -
-void - -g_object_class_install_property () -
-void - -g_object_class_install_properties () -
-GParamSpec * - -g_object_class_find_property () -
-GParamSpec ** - -g_object_class_list_properties () -
-void - -g_object_class_override_property () -
-void - -g_object_interface_install_property () -
-GParamSpec * - -g_object_interface_find_property () -
-GParamSpec ** - -g_object_interface_list_properties () -
-gpointer - -g_object_new () -
-gpointer - -g_object_newv () -
-gpointer - -g_object_ref () -
-void - -g_object_unref () -
-gpointer - -g_object_ref_sink () -
#define -g_set_object() -
-void - -g_clear_object () -
-gboolean - -g_object_is_floating () -
-void - -g_object_force_floating () -
-void - -(*GWeakNotify) () -
-void - -g_object_weak_ref () -
-void - -g_object_weak_unref () -
-void - -g_object_add_weak_pointer () -
-void - -g_object_remove_weak_pointer () -
-void - -(*GToggleNotify) () -
-void - -g_object_add_toggle_ref () -
-void - -g_object_remove_toggle_ref () -
-gpointer - -g_object_connect () -
-void - -g_object_disconnect () -
-void - -g_object_set () -
-void - -g_object_get () -
-void - -g_object_notify () -
-void - -g_object_notify_by_pspec () -
-void - -g_object_freeze_notify () -
-void - -g_object_thaw_notify () -
-gpointer - -g_object_get_data () -
-void - -g_object_set_data () -
-void - -g_object_set_data_full () -
-gpointer - -g_object_steal_data () -
-gpointer - -g_object_dup_data () -
-gboolean - -g_object_replace_data () -
-gpointer - -g_object_get_qdata () -
-void - -g_object_set_qdata () -
-void - -g_object_set_qdata_full () -
-gpointer - -g_object_steal_qdata () -
-gpointer - -g_object_dup_qdata () -
-gboolean - -g_object_replace_qdata () -
-void - -g_object_set_property () -
-void - -g_object_get_property () -
-GObject * - -g_object_new_valist () -
-void - -g_object_set_valist () -
-void - -g_object_get_valist () -
-void - -g_object_watch_closure () -
-void - -g_object_run_dispose () -
#define -G_OBJECT_WARN_INVALID_PROPERTY_ID() -
-void - -g_weak_ref_init () -
-void - -g_weak_ref_clear () -
-gpointer - -g_weak_ref_get () -
-void - -g_weak_ref_set () -
-
-
-

Signals

-
----- - - - - - -
voidnotifyNo Hooks
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
structGObject
structGObjectClass
structGObjectConstructParam
structGParameter
typedefGInitiallyUnowned
typedefGInitiallyUnownedClass
#defineG_TYPE_INITIALLY_UNOWNED
 GWeakRef
-
-
-

Object Hierarchy

-
    GObject
-    ├── GBinding
-    ╰── GTypeModule
-
-
-
-

Includes

-
#include <glib-object.h>
-
-
-
-

Description

-

GObject is the fundamental type providing the common attributes and -methods for all object types in GTK+, Pango and other libraries -based on GObject. The GObject class provides methods for object -construction and destruction, property access methods, and signal -support. Signals are described in detail here.

-

For a tutorial on implementing a new GObject class, see How to define and -implement a new GObject. For a list of naming conventions for -GObjects and their methods, see the GType conventions. -For the high-level concepts behind GObject, read Instantiable classed types: -Objects.

-
-

Floating references

-

GInitiallyUnowned is derived from GObject. The only difference between -the two is that the initial reference of a GInitiallyUnowned is flagged -as a "floating" reference. This means that it is not specifically -claimed to be "owned" by any code portion. The main motivation for -providing floating references is C convenience. In particular, it -allows code to be written as:

-
- - - - - - - -
1
-2
container = create_container ();
-container_add_child (container, create_child());
-
- -

-If container_add_child() calls g_object_ref_sink() on the passed-in child, -no reference of the newly created child is leaked. Without floating -references, container_add_child() can only g_object_ref() the new child, -so to implement this code without reference leaks, it would have to be -written as:

-
- - - - - - - -
1
-2
-3
-4
-5
Child *child;
-container = create_container ();
-child = create_child ();
-container_add_child (container, child);
-g_object_unref (child);
-
- -

-The floating reference can be converted into an ordinary reference by -calling g_object_ref_sink(). For already sunken objects (objects that -don't have a floating reference anymore), g_object_ref_sink() is equivalent -to g_object_ref() and returns a new reference.

-

Since floating references are useful almost exclusively for C convenience, -language bindings that provide automated reference and memory ownership -maintenance (such as smart pointers or garbage collection) should not -expose floating references in their API.

-

Some object implementations may need to save an objects floating state -across certain code portions (an example is GtkMenu), to achieve this, -the following sequence can be used:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
// save floating state
-gboolean was_floating = g_object_is_floating (object);
-g_object_ref_sink (object);
-// protected code portion
-
-...
-
-// restore floating state
-if (was_floating)
-  g_object_force_floating (object);
-else
-  g_object_unref (object); // release previously acquired reference
-
- -

-
-
-
-

Functions

-
-

GObjectGetPropertyFunc ()

-
void
-(*GObjectGetPropertyFunc) (GObject *object,
-                           guint property_id,
-                           GValue *value,
-                           GParamSpec *pspec);
-

The type of the get_property - function of GObjectClass.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

object

a GObject

 

property_id

the numeric id under which the property was registered with -g_object_class_install_property().

 

value

a GValue to return the property value in

 

pspec

the GParamSpec describing the property

 
-
-
-
-
-

GObjectSetPropertyFunc ()

-
void
-(*GObjectSetPropertyFunc) (GObject *object,
-                           guint property_id,
-                           const GValue *value,
-                           GParamSpec *pspec);
-

The type of the set_property - function of GObjectClass.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

object

a GObject

 

property_id

the numeric id under which the property was registered with -g_object_class_install_property().

 

value

the new value for the property

 

pspec

the GParamSpec describing the property

 
-
-
-
-
-

GObjectFinalizeFunc ()

-
void
-(*GObjectFinalizeFunc) (GObject *object);
-

The type of the finalize - function of GObjectClass.

-
-

Parameters

-
----- - - - - - -

object

the GObject being finalized

 
-
-
-
-
-

G_TYPE_IS_OBJECT()

-
#define G_TYPE_IS_OBJECT(type)      (G_TYPE_FUNDAMENTAL (type) == G_TYPE_OBJECT)
-
-

Check if the passed in type id is a G_TYPE_OBJECT or derived from it.

-
-

Parameters

-
----- - - - - - -

type

Type id to check

 
-
-
-

Returns

-

FALSE or TRUE, indicating whether type -is a G_TYPE_OBJECT.

-
-
-
-
-

G_OBJECT()

-
#define G_OBJECT(object)            (G_TYPE_CHECK_INSTANCE_CAST ((object), G_TYPE_OBJECT, GObject))
-
-

Casts a GObject or derived pointer into a (GObject*) pointer. -Depending on the current debugging level, this function may invoke -certain runtime checks to identify invalid casts.

-
-

Parameters

-
----- - - - - - -

object

Object which is subject to casting.

 
-
-
-
-
-

G_IS_OBJECT()

-
#define G_IS_OBJECT(object)         (G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE ((object), G_TYPE_OBJECT))
-
-

Checks whether a valid GTypeInstance pointer is of type G_TYPE_OBJECT.

-
-

Parameters

-
----- - - - - - -

object

Instance to check for being a G_TYPE_OBJECT.

 
-
-
-
-
-

G_OBJECT_CLASS()

-
#define G_OBJECT_CLASS(class)       (G_TYPE_CHECK_CLASS_CAST ((class), G_TYPE_OBJECT, GObjectClass))
-
-

Casts a derived GObjectClass structure into a GObjectClass structure.

-
-

Parameters

-
----- - - - - - -

class

a valid GObjectClass

 
-
-
-
-
-

G_IS_OBJECT_CLASS()

-
#define G_IS_OBJECT_CLASS(class)    (G_TYPE_CHECK_CLASS_TYPE ((class), G_TYPE_OBJECT))
-
-

Checks whether class - "is a" valid GObjectClass structure of type -G_TYPE_OBJECT or derived.

-
-

Parameters

-
----- - - - - - -

class

a GObjectClass

 
-
-
-
-
-

G_OBJECT_GET_CLASS()

-
#define G_OBJECT_GET_CLASS(object)  (G_TYPE_INSTANCE_GET_CLASS ((object), G_TYPE_OBJECT, GObjectClass))
-
-

Get the class structure associated to a GObject instance.

-
-

Parameters

-
----- - - - - - -

object

a GObject instance.

 
-
-
-

Returns

-

pointer to object class structure.

-
-
-
-
-

G_OBJECT_TYPE()

-
#define G_OBJECT_TYPE(object)       (G_TYPE_FROM_INSTANCE (object))
-
-

Get the type id of an object.

-
-

Parameters

-
----- - - - - - -

object

Object to return the type id for.

 
-
-
-

Returns

-

Type id of object -.

-
-
-
-
-

G_OBJECT_TYPE_NAME()

-
#define G_OBJECT_TYPE_NAME(object)  (g_type_name (G_OBJECT_TYPE (object)))
-
-

Get the name of an object's type.

-
-

Parameters

-
----- - - - - - -

object

Object to return the type name for.

 
-
-
-

Returns

-

Type name of object -. The string is owned by the type system and -should not be freed.

-
-
-
-
-

G_OBJECT_CLASS_TYPE()

-
#define G_OBJECT_CLASS_TYPE(class)  (G_TYPE_FROM_CLASS (class))
-
-

Get the type id of a class structure.

-
-

Parameters

-
----- - - - - - -

class

a valid GObjectClass

 
-
-
-

Returns

-

Type id of class -.

-
-
-
-
-

G_OBJECT_CLASS_NAME()

-
#define G_OBJECT_CLASS_NAME(class)  (g_type_name (G_OBJECT_CLASS_TYPE (class)))
-
-

Return the name of a class structure's type.

-
-

Parameters

-
----- - - - - - -

class

a valid GObjectClass

 
-
-
-

Returns

-

Type name of class -. The string is owned by the type system and -should not be freed.

-
-
-
-
-

g_object_class_install_property ()

-
void
-g_object_class_install_property (GObjectClass *oclass,
-                                 guint property_id,
-                                 GParamSpec *pspec);
-

Installs a new property.

-

All properties should be installed during the class initializer. It -is possible to install properties after that, but doing so is not -recommend, and specifically, is not guaranteed to be thread-safe vs. -use of properties on the same type on other threads.

-

Note that it is possible to redefine a property in a derived class, -by installing a property with the same name. This can be useful at times, -e.g. to change the range of allowed values or the default value.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

oclass

a GObjectClass

 

property_id

the id for the new property

 

pspec

the GParamSpec for the new property

 
-
-
-
-
-

g_object_class_install_properties ()

-
void
-g_object_class_install_properties (GObjectClass *oclass,
-                                   guint n_pspecs,
-                                   GParamSpec **pspecs);
-

Installs new properties from an array of GParamSpecs.

-

All properties should be installed during the class initializer. It -is possible to install properties after that, but doing so is not -recommend, and specifically, is not guaranteed to be thread-safe vs. -use of properties on the same type on other threads.

-

The property id of each property is the index of each GParamSpec in -the pspecs - array.

-

The property id of 0 is treated specially by GObject and it should not -be used to store a GParamSpec.

-

This function should be used if you plan to use a static array of -GParamSpecs and g_object_notify_by_pspec(). For instance, this -class initialization:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
enum {
-  PROP_0, PROP_FOO, PROP_BAR, N_PROPERTIES
-};
-
-static GParamSpec *obj_properties[N_PROPERTIES] = { NULL, };
-
-static void
-my_object_class_init (MyObjectClass *klass)
-{
-  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-
-  obj_properties[PROP_FOO] =
-    g_param_spec_int ("foo", "Foo", "Foo",
-                      -1, G_MAXINT,
-                      0,
-                      G_PARAM_READWRITE);
-
-  obj_properties[PROP_BAR] =
-    g_param_spec_string ("bar", "Bar", "Bar",
-                         NULL,
-                         G_PARAM_READWRITE);
-
-  gobject_class->set_property = my_object_set_property;
-  gobject_class->get_property = my_object_get_property;
-  g_object_class_install_properties (gobject_class,
-                                     N_PROPERTIES,
-                                     obj_properties);
-}
-
- -

-

allows calling g_object_notify_by_pspec() to notify of property changes:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
void
-my_object_set_foo (MyObject *self, gint foo)
-{
-  if (self->foo != foo)
-    {
-      self->foo = foo;
-      g_object_notify_by_pspec (G_OBJECT (self), obj_properties[PROP_FOO]);
-    }
- }
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

oclass

a GObjectClass

 

n_pspecs

the length of the GParamSpecs array

 

pspecs

the GParamSpecs array -defining the new properties.

[array length=n_pspecs]
-
-

Since: 2.26

-
-
-
-

g_object_class_find_property ()

-
GParamSpec *
-g_object_class_find_property (GObjectClass *oclass,
-                              const gchar *property_name);
-

Looks up the GParamSpec for a property of a class.

-
-

Parameters

-
----- - - - - - - - - - - - - -

oclass

a GObjectClass

 

property_name

the name of the property to look up

 
-
-
-

Returns

-

the GParamSpec for the property, or -NULL if the class doesn't have a property of that name.

-

[transfer none]

-
-
-
-
-

g_object_class_list_properties ()

-
GParamSpec **
-g_object_class_list_properties (GObjectClass *oclass,
-                                guint *n_properties);
-

Get an array of GParamSpec* for all properties of a class.

-
-

Parameters

-
----- - - - - - - - - - - - - -

oclass

a GObjectClass

 

n_properties

return location for the length of the returned array.

[out]
-
-
-

Returns

-

an array of -GParamSpec* which should be freed after use.

-

[array length=n_properties][transfer container]

-
-
-
-
-

g_object_class_override_property ()

-
void
-g_object_class_override_property (GObjectClass *oclass,
-                                  guint property_id,
-                                  const gchar *name);
-

Registers property_id - as referring to a property with the name -name - in a parent class or in an interface implemented by oclass -. -This allows this class to "override" a property implementation in -a parent class or to provide the implementation of a property from -an interface.

-

Internally, overriding is implemented by creating a property of type -GParamSpecOverride; generally operations that query the properties of -the object class, such as g_object_class_find_property() or -g_object_class_list_properties() will return the overridden -property. However, in one case, the construct_properties - argument of -the constructor - virtual function, the GParamSpecOverride is passed -instead, so that the param_id - field of the GParamSpec will be -correct. For virtually all uses, this makes no difference. If you -need to get the overridden property, you can call -g_param_spec_get_redirect_target().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

oclass

a GObjectClass

 

property_id

the new property ID

 

name

the name of a property registered in a parent class or -in an interface of this class.

 
-
-

Since: 2.4

-
-
-
-

g_object_interface_install_property ()

-
void
-g_object_interface_install_property (gpointer g_iface,
-                                     GParamSpec *pspec);
-

Add a property to an interface; this is only useful for interfaces -that are added to GObject-derived types. Adding a property to an -interface forces all objects classes with that interface to have a -compatible property. The compatible property could be a newly -created GParamSpec, but normally -g_object_class_override_property() will be used so that the object -class only needs to provide an implementation and inherits the -property description, default value, bounds, and so forth from the -interface property.

-

This function is meant to be called from the interface's default -vtable initialization function (the class_init - member of -GTypeInfo.) It must not be called after after class_init - has -been called for any object types implementing this interface.

-
-

Parameters

-
----- - - - - - - - - - - - - -

g_iface

any interface vtable for the -interface, or the default -vtable for the interface.

[type GObject.TypeInterface]

pspec

the GParamSpec for the new property

 
-
-

Since: 2.4

-
-
-
-

g_object_interface_find_property ()

-
GParamSpec *
-g_object_interface_find_property (gpointer g_iface,
-                                  const gchar *property_name);
-

Find the GParamSpec with the given name for an -interface. Generally, the interface vtable passed in as g_iface - -will be the default vtable from g_type_default_interface_ref(), or, -if you know the interface has already been loaded, -g_type_default_interface_peek().

-
-

Parameters

-
----- - - - - - - - - - - - - -

g_iface

any interface vtable for the -interface, or the default vtable for the interface.

[type GObject.TypeInterface]

property_name

name of a property to lookup.

 
-
-
-

Returns

-

the GParamSpec for the property of the -interface with the name property_name -, or NULL if no -such property exists.

-

[transfer none]

-
-

Since: 2.4

-
-
-
-

g_object_interface_list_properties ()

-
GParamSpec **
-g_object_interface_list_properties (gpointer g_iface,
-                                    guint *n_properties_p);
-

Lists the properties of an interface.Generally, the interface -vtable passed in as g_iface - will be the default vtable from -g_type_default_interface_ref(), or, if you know the interface has -already been loaded, g_type_default_interface_peek().

-
-

Parameters

-
----- - - - - - - - - - - - - -

g_iface

any interface vtable for the -interface, or the default vtable for the interface.

[type GObject.TypeInterface]

n_properties_p

location to store number of properties returned.

[out]
-
-
-

Returns

-

a -pointer to an array of pointers to GParamSpec -structures. The paramspecs are owned by GLib, but the -array should be freed with g_free() when you are done with -it.

-

[array length=n_properties_p][transfer container]

-
-

Since: 2.4

-
-
-
-

g_object_new ()

-
gpointer
-g_object_new (GType object_type,
-              const gchar *first_property_name,
-              ...);
-

Creates a new instance of a GObject subtype and sets its properties.

-

Construction parameters (see G_PARAM_CONSTRUCT, G_PARAM_CONSTRUCT_ONLY) -which are not explicitly specified are set to their default values.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object_type

the type id of the GObject subtype to instantiate

 

first_property_name

the name of the first property

 

...

the value of the first property, followed optionally by more -name/value pairs, followed by NULL

 
-
-
-

Returns

-

(transfer full) (type GObject.Object) : a new instance of -object_type -

-
-
-
-
-

g_object_newv ()

-
gpointer
-g_object_newv (GType object_type,
-               guint n_parameters,
-               GParameter *parameters);
-

Creates a new instance of a GObject subtype and sets its properties.

-

Construction parameters (see G_PARAM_CONSTRUCT, G_PARAM_CONSTRUCT_ONLY) -which are not explicitly specified are set to their default values.

-

[rename-to g_object_new]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object_type

the type id of the GObject subtype to instantiate

 

n_parameters

the length of the parameters -array

 

parameters

an array of GParameter.

[array length=n_parameters]
-
-
-

Returns

-

a new instance of -object_type -.

-

[type GObject.Object][transfer full]

-
-
-
-
-

g_object_ref ()

-
gpointer
-g_object_ref (gpointer object);
-

Increases the reference count of object -.

-
-

Parameters

-
----- - - - - - -

object

a GObject.

[type GObject.Object]
-
-
-

Returns

-

the same object -.

-

[type GObject.Object][transfer none]

-
-
-
-
-

g_object_unref ()

-
void
-g_object_unref (gpointer object);
-

Decreases the reference count of object -. When its reference count -drops to 0, the object is finalized (i.e. its memory is freed).

-

If the pointer to the GObject may be reused in future (for example, if it is -an instance variable of another object), it is recommended to clear the -pointer to NULL rather than retain a dangling pointer to a potentially -invalid GObject instance. Use g_clear_object() for this.

-
-

Parameters

-
----- - - - - - -

object

a GObject.

[type GObject.Object]
-
-
-
-
-

g_object_ref_sink ()

-
gpointer
-g_object_ref_sink (gpointer object);
-

Increase the reference count of object -, and possibly remove the -floating reference, if object - has a floating reference.

-

In other words, if the object is floating, then this call "assumes -ownership" of the floating reference, converting it to a normal -reference by clearing the floating flag while leaving the reference -count unchanged. If the object is not floating, then this call -adds a new normal reference increasing the reference count by one.

-
-

Parameters

-
----- - - - - - -

object

a GObject.

[type GObject.Object]
-
-
-

Returns

-

object -.

-

[type GObject.Object][transfer none]

-
-

Since: 2.10

-
-
-
-

g_set_object()

-
#define             g_set_object(object_ptr, new_object)
-

Updates a GObject pointer to refer to new_object -. It increments the -reference count of new_object - (if non-NULL), decrements the reference -count of the current value of object_ptr - (if non-NULL), and assigns -new_object - to object_ptr -. The assignment is not atomic.

-

object_ptr - must not be NULL.

-

A macro is also included that allows this function to be used without -pointer casts. The function itself is static inline, so its address may vary -between compilation units.

-

One convenient usage of this function is in implementing property setters:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
void
-foo_set_bar (Foo *foo,
-             Bar *new_bar)
-{
-  g_return_if_fail (IS_FOO (foo));
-  g_return_if_fail (new_bar == NULL || IS_BAR (new_bar));
-
-  if (g_set_object (&foo->bar, new_bar))
-    g_object_notify (foo, "bar");
-}
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

object_ptr

a pointer to a GObject reference

 

new_object

a pointer to the new GObject to -assign to it, or NULL to clear the pointer.

[nullable][transfer none]
-
-
-

Returns

-

TRUE if the value of object_ptr -changed, FALSE otherwise

-
-

Since: 2.44

-
-
-
-

g_clear_object ()

-
void
-g_clear_object (volatile GObject **object_ptr);
-

Clears a reference to a GObject.

-

object_ptr - must not be NULL.

-

If the reference is NULL then this function does nothing. -Otherwise, the reference count of the object is decreased and the -pointer is set to NULL.

-

A macro is also included that allows this function to be used without -pointer casts.

-

[skip]

-
-

Parameters

-
----- - - - - - -

object_ptr

a pointer to a GObject reference

 
-
-

Since: 2.28

-
-
-
-

g_object_is_floating ()

-
gboolean
-g_object_is_floating (gpointer object);
-

Checks whether object - has a floating reference.

-
-

Parameters

-
----- - - - - - -

object

a GObject.

[type GObject.Object]
-
-
-

Returns

-

TRUE if object -has a floating reference

-
-

Since: 2.10

-
-
-
-

g_object_force_floating ()

-
void
-g_object_force_floating (GObject *object);
-

This function is intended for GObject implementations to re-enforce -a floating object reference. Doing this is seldom -required: all GInitiallyUnowneds are created with a floating reference -which usually just needs to be sunken by calling g_object_ref_sink().

-
-

Parameters

-
----- - - - - - -

object

a GObject

 
-
-

Since: 2.10

-
-
-
-

GWeakNotify ()

-
void
-(*GWeakNotify) (gpointer data,
-                GObject *where_the_object_was);
-

A GWeakNotify function can be added to an object as a callback that gets -triggered when the object is finalized. Since the object is already being -finalized when the GWeakNotify is called, there's not much you could do -with the object, apart from e.g. using its address as hash-index or the like.

-
-

Parameters

-
----- - - - - - - - - - - - - -

data

data that was provided when the weak reference was established

 

where_the_object_was

the object being finalized

 
-
-
-
-
-

g_object_weak_ref ()

-
void
-g_object_weak_ref (GObject *object,
-                   GWeakNotify notify,
-                   gpointer data);
-

Adds a weak reference callback to an object. Weak references are -used for notification when an object is finalized. They are called -"weak references" because they allow you to safely hold a pointer -to an object without calling g_object_ref() (g_object_ref() adds a -strong reference, that is, forces the object to stay alive).

-

Note that the weak references created by this method are not -thread-safe: they cannot safely be used in one thread if the -object's last g_object_unref() might happen in another thread. -Use GWeakRef if thread-safety is required.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

GObject to reference weakly

 

notify

callback to invoke before the object is freed

 

data

extra data to pass to notify

 
-
-
-
-
-

g_object_weak_unref ()

-
void
-g_object_weak_unref (GObject *object,
-                     GWeakNotify notify,
-                     gpointer data);
-

Removes a weak reference callback to an object.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

GObject to remove a weak reference from

 

notify

callback to search for

 

data

data to search for

 
-
-
-
-
-

g_object_add_weak_pointer ()

-
void
-g_object_add_weak_pointer (GObject *object,
-                           gpointer *weak_pointer_location);
-

Adds a weak reference from weak_pointer to object - to indicate that -the pointer located at weak_pointer_location - is only valid during -the lifetime of object -. When the object - is finalized, -weak_pointer - will be set to NULL.

-

Note that as with g_object_weak_ref(), the weak references created by -this method are not thread-safe: they cannot safely be used in one -thread if the object's last g_object_unref() might happen in another -thread. Use GWeakRef if thread-safety is required.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

object

The object that should be weak referenced.

 

weak_pointer_location

The memory address -of a pointer.

[inout][not optional]
-
-
-
-
-

g_object_remove_weak_pointer ()

-
void
-g_object_remove_weak_pointer (GObject *object,
-                              gpointer *weak_pointer_location);
-

Removes a weak reference from object - that was previously added -using g_object_add_weak_pointer(). The weak_pointer_location - has -to match the one used with g_object_add_weak_pointer().

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

object

The object that is weak referenced.

 

weak_pointer_location

The memory address -of a pointer.

[inout][not optional]
-
-
-
-
-

GToggleNotify ()

-
void
-(*GToggleNotify) (gpointer data,
-                  GObject *object,
-                  gboolean is_last_ref);
-

A callback function used for notification when the state -of a toggle reference changes. See g_object_add_toggle_ref().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

data

Callback data passed to g_object_add_toggle_ref()

 

object

The object on which g_object_add_toggle_ref() was called.

 

is_last_ref

TRUE if the toggle reference is now the -last reference to the object. FALSE if the toggle -reference was the last reference and there are now other -references.

 
-
-
-
-
-

g_object_add_toggle_ref ()

-
void
-g_object_add_toggle_ref (GObject *object,
-                         GToggleNotify notify,
-                         gpointer data);
-

Increases the reference count of the object by one and sets a -callback to be called when all other references to the object are -dropped, or when this is already the last reference to the object -and another reference is established.

-

This functionality is intended for binding object - to a proxy -object managed by another memory manager. This is done with two -paired references: the strong reference added by -g_object_add_toggle_ref() and a reverse reference to the proxy -object which is either a strong reference or weak reference.

-

The setup is that when there are no other references to object -, -only a weak reference is held in the reverse direction from object - -to the proxy object, but when there are other references held to -object -, a strong reference is held. The notify - callback is called -when the reference from object - to the proxy object should be -"toggled" from strong to weak (is_last_ref - true) or weak to strong -(is_last_ref - false).

-

Since a (normal) reference must be held to the object before -calling g_object_add_toggle_ref(), the initial state of the reverse -link is always strong.

-

Multiple toggle references may be added to the same gobject, -however if there are multiple toggle references to an object, none -of them will ever be notified until all but one are removed. For -this reason, you should only ever use a toggle reference if there -is important state in the proxy object.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

a GObject

 

notify

a function to call when this reference is the -last reference to the object, or is no longer -the last reference.

 

data

data to pass to notify -

 
-
-

Since: 2.8

-
-
-
-

g_object_remove_toggle_ref ()

-
void
-g_object_remove_toggle_ref (GObject *object,
-                            GToggleNotify notify,
-                            gpointer data);
-

Removes a reference added with g_object_add_toggle_ref(). The -reference count of the object is decreased by one.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

a GObject

 

notify

a function to call when this reference is the -last reference to the object, or is no longer -the last reference.

 

data

data to pass to notify -

 
-
-

Since: 2.8

-
-
-
-

g_object_connect ()

-
gpointer
-g_object_connect (gpointer object,
-                  const gchar *signal_spec,
-                  ...);
-

A convenience function to connect multiple signals at once.

-

The signal specs expected by this function have the form -"modifier::signal_name", where modifier can be one of the following:

-
    -
    • signal: equivalent to g_signal_connect_data (..., NULL, 0)

  • -
  • object-signal, object_signal: equivalent to g_signal_connect_object (..., 0)

  • -
  • swapped-signal, swapped_signal: equivalent to g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED)

  • -
  • swapped_object_signal, swapped-object-signal: equivalent to g_signal_connect_object (..., G_CONNECT_SWAPPED)

  • -
  • signal_after, signal-after: equivalent to g_signal_connect_data (..., NULL, G_CONNECT_AFTER)

  • -
  • object_signal_after, object-signal-after: equivalent to g_signal_connect_object (..., G_CONNECT_AFTER)

  • -
  • swapped_signal_after, swapped-signal-after: equivalent to g_signal_connect_data (..., NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER)

  • -
  • swapped_object_signal_after, swapped-object-signal-after: equivalent to g_signal_connect_object (..., G_CONNECT_SWAPPED | G_CONNECT_AFTER)

  • -
-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
menu->toplevel = g_object_connect (g_object_new (GTK_TYPE_WINDOW,
-						   "type", GTK_WINDOW_POPUP,
-						   "child", menu,
-						   NULL),
-				     "signal::event", gtk_menu_window_event, menu,
-				     "signal::size_request", gtk_menu_window_size_request, menu,
-				     "signal::destroy", gtk_widget_destroyed, &menu->toplevel,
-				     NULL);
-
- -

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

a GObject.

[type GObject.Object]

signal_spec

the spec for the first signal

 

...

GCallback for the first signal, followed by data for the -first signal, followed optionally by more signal -spec/callback/data triples, followed by NULL

 
-
-
-

Returns

-

object -.

-

[transfer none][type GObject.Object]

-
-
-
-
-

g_object_disconnect ()

-
void
-g_object_disconnect (gpointer object,
-                     const gchar *signal_spec,
-                     ...);
-

A convenience function to disconnect multiple signals at once.

-

The signal specs expected by this function have the form -"any_signal", which means to disconnect any signal with matching -callback and data, or "any_signal::signal_name", which only -disconnects the signal named "signal_name".

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

a GObject.

[type GObject.Object]

signal_spec

the spec for the first signal

 

...

GCallback for the first signal, followed by data for the first signal, -followed optionally by more signal spec/callback/data triples, -followed by NULL

 
-
-
-
-
-

g_object_set ()

-
void
-g_object_set (gpointer object,
-              const gchar *first_property_name,
-              ...);
-

Sets properties on an object.

-

Note that the "notify" signals are queued and only emitted (in -reverse order) after all properties have been set. See -g_object_freeze_notify().

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

a GObject.

[type GObject.Object]

first_property_name

name of the first property to set

 

...

value for the first property, followed optionally by more -name/value pairs, followed by NULL

 
-
-
-
-
-

g_object_get ()

-
void
-g_object_get (gpointer object,
-              const gchar *first_property_name,
-              ...);
-

Gets properties of an object.

-

In general, a copy is made of the property contents and the caller -is responsible for freeing the memory in the appropriate manner for -the type, for instance by calling g_free() or g_object_unref().

-

Here is an example of using g_object_get() to get the contents -of three properties: an integer, a string and an object:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
gint intval;
-gchar *strval;
-GObject *objval;
-
-g_object_get (my_object,
-              "int-property", &intval,
-              "str-property", &strval,
-              "obj-property", &objval,
-              NULL);
-
-// Do something with intval, strval, objval
-
-g_free (strval);
-g_object_unref (objval);
-
- -

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

a GObject.

[type GObject.Object]

first_property_name

name of the first property to get

 

...

return location for the first property, followed optionally by more -name/return location pairs, followed by NULL

 
-
-
-
-
-

g_object_notify ()

-
void
-g_object_notify (GObject *object,
-                 const gchar *property_name);
-

Emits a "notify" signal for the property property_name - on object -.

-

When possible, eg. when signaling a property change from within the class -that registered the property, you should use g_object_notify_by_pspec() -instead.

-

Note that emission of the notify signal may be blocked with -g_object_freeze_notify(). In this case, the signal emissions are queued -and will be emitted (in reverse order) when g_object_thaw_notify() is -called.

-
-

Parameters

-
----- - - - - - - - - - - - - -

object

a GObject

 

property_name

the name of a property installed on the class of object -.

 
-
-
-
-
-

g_object_notify_by_pspec ()

-
void
-g_object_notify_by_pspec (GObject *object,
-                          GParamSpec *pspec);
-

Emits a "notify" signal for the property specified by pspec - on object -.

-

This function omits the property name lookup, hence it is faster than -g_object_notify().

-

One way to avoid using g_object_notify() from within the -class that registered the properties, and using g_object_notify_by_pspec() -instead, is to store the GParamSpec used with -g_object_class_install_property() inside a static array, e.g.:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
enum
-{
-  PROP_0,
-  PROP_FOO,
-  PROP_LAST
-};
-
-static GParamSpec *properties[PROP_LAST];
-
-static void
-my_object_class_init (MyObjectClass *klass)
-{
-  properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
-                                           0, 100,
-                                           50,
-                                           G_PARAM_READWRITE);
-  g_object_class_install_property (gobject_class,
-                                   PROP_FOO,
-                                   properties[PROP_FOO]);
-}
-
- -

-

and then notify a change on the "foo" property with:

-
- - - - - - - -
1
g_object_notify_by_pspec (self, properties[PROP_FOO]);
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

object

a GObject

 

pspec

the GParamSpec of a property installed on the class of object -.

 
-
-

Since: 2.26

-
-
-
-

g_object_freeze_notify ()

-
void
-g_object_freeze_notify (GObject *object);
-

Increases the freeze count on object -. If the freeze count is -non-zero, the emission of "notify" signals on object - is -stopped. The signals are queued until the freeze count is decreased -to zero. Duplicate notifications are squashed so that at most one -“notify” signal is emitted for each property modified while the -object is frozen.

-

This is necessary for accessors that modify multiple properties to prevent -premature notification while the object is still being modified.

-
-

Parameters

-
----- - - - - - -

object

a GObject

 
-
-
-
-
-

g_object_thaw_notify ()

-
void
-g_object_thaw_notify (GObject *object);
-

Reverts the effect of a previous call to -g_object_freeze_notify(). The freeze count is decreased on object - -and when it reaches zero, queued "notify" signals are emitted.

-

Duplicate notifications for each property are squashed so that at most one -“notify” signal is emitted for each property, in the reverse order -in which they have been queued.

-

It is an error to call this function when the freeze count is zero.

-
-

Parameters

-
----- - - - - - -

object

a GObject

 
-
-
-
-
-

g_object_get_data ()

-
gpointer
-g_object_get_data (GObject *object,
-                   const gchar *key);
-

Gets a named field from the objects table of associations (see g_object_set_data()).

-
-

Parameters

-
----- - - - - - - - - - - - - -

object

GObject containing the associations

 

key

name of the key for that association

 
-
-
-

Returns

-

the data if found, or NULL if no such data exists.

-

[transfer none]

-
-
-
-
-

g_object_set_data ()

-
void
-g_object_set_data (GObject *object,
-                   const gchar *key,
-                   gpointer data);
-

Each object carries around a table of associations from -strings to pointers. This function lets you set an association.

-

If the object already had an association with that name, -the old association will be destroyed.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

GObject containing the associations.

 

key

name of the key

 

data

data to associate with that key

 
-
-
-
-
-

g_object_set_data_full ()

-
void
-g_object_set_data_full (GObject *object,
-                        const gchar *key,
-                        gpointer data,
-                        GDestroyNotify destroy);
-

Like g_object_set_data() except it adds notification -for when the association is destroyed, either by setting it -to a different value or when the object is destroyed.

-

Note that the destroy - callback is not called if data - is NULL.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

object

GObject containing the associations

 

key

name of the key

 

data

data to associate with that key

 

destroy

function to call when the association is destroyed

 
-
-
-
-
-

g_object_steal_data ()

-
gpointer
-g_object_steal_data (GObject *object,
-                     const gchar *key);
-

Remove a specified datum from the object's data associations, -without invoking the association's destroy handler.

-
-

Parameters

-
----- - - - - - - - - - - - - -

object

GObject containing the associations

 

key

name of the key

 
-
-
-

Returns

-

the data if found, or NULL if no such data exists.

-

[transfer full]

-
-
-
-
-

g_object_dup_data ()

-
gpointer
-g_object_dup_data (GObject *object,
-                   const gchar *key,
-                   GDuplicateFunc dup_func,
-                   gpointer user_data);
-

This is a variant of g_object_get_data() which returns -a 'duplicate' of the value. dup_func - defines the -meaning of 'duplicate' in this context, it could e.g. -take a reference on a ref-counted object.

-

If the key - is not set on the object then dup_func - -will be called with a NULL argument.

-

Note that dup_func - is called while user data of object - -is locked.

-

This function can be useful to avoid races when multiple -threads are using object data on the same key on the same -object.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

object

the GObject to store user data on

 

key

a string, naming the user data pointer

 

dup_func

function to dup the value.

[nullable]

user_data

passed as user_data to dup_func -.

[nullable]
-
-
-

Returns

-

the result of calling dup_func -on the value -associated with key -on object -, or NULL if not set. -If dup_func -is NULL, the value is returned -unmodified.

-
-

Since: 2.34

-
-
-
-

g_object_replace_data ()

-
gboolean
-g_object_replace_data (GObject *object,
-                       const gchar *key,
-                       gpointer oldval,
-                       gpointer newval,
-                       GDestroyNotify destroy,
-                       GDestroyNotify *old_destroy);
-

Compares the user data for the key key - on object - with -oldval -, and if they are the same, replaces oldval - with -newval -.

-

This is like a typical atomic compare-and-exchange -operation, for user data on an object.

-

If the previous value was replaced then ownership of the -old value (oldval -) is passed to the caller, including -the registered destroy notify for it (passed out in old_destroy -). -Its up to the caller to free this as he wishes, which may -or may not include using old_destroy - as sometimes replacement -should not destroy the object in the normal way.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

object

the GObject to store user data on

 

key

a string, naming the user data pointer

 

oldval

the old value to compare against.

[nullable]

newval

the new value.

[nullable]

destroy

a destroy notify for the new value.

[nullable]

old_destroy

destroy notify for the existing value.

[nullable]
-
-
-

Returns

-

TRUE if the existing value for key -was replaced -by newval -, FALSE otherwise.

-
-

Since: 2.34

-
-
-
-

g_object_get_qdata ()

-
gpointer
-g_object_get_qdata (GObject *object,
-                    GQuark quark);
-

This function gets back user data pointers stored via -g_object_set_qdata().

-
-

Parameters

-
----- - - - - - - - - - - - - -

object

The GObject to get a stored user data pointer from

 

quark

A GQuark, naming the user data pointer

 
-
-
-

Returns

-

The user data pointer set, or NULL.

-

[transfer none]

-
-
-
-
-

g_object_set_qdata ()

-
void
-g_object_set_qdata (GObject *object,
-                    GQuark quark,
-                    gpointer data);
-

This sets an opaque, named pointer on an object. -The name is specified through a GQuark (retrived e.g. via -g_quark_from_static_string()), and the pointer -can be gotten back from the object - with g_object_get_qdata() -until the object - is finalized. -Setting a previously set user data pointer, overrides (frees) -the old pointer set, using NULL as pointer essentially -removes the data stored.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

The GObject to set store a user data pointer

 

quark

A GQuark, naming the user data pointer

 

data

An opaque user data pointer

 
-
-
-
-
-

g_object_set_qdata_full ()

-
void
-g_object_set_qdata_full (GObject *object,
-                         GQuark quark,
-                         gpointer data,
-                         GDestroyNotify destroy);
-

This function works like g_object_set_qdata(), but in addition, -a void (*destroy) (gpointer) function may be specified which is -called with data - as argument when the object - is finalized, or -the data is being overwritten by a call to g_object_set_qdata() -with the same quark -.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

object

The GObject to set store a user data pointer

 

quark

A GQuark, naming the user data pointer

 

data

An opaque user data pointer

 

destroy

Function to invoke with data -as argument, when data -needs to be freed

 
-
-
-
-
-

g_object_steal_qdata ()

-
gpointer
-g_object_steal_qdata (GObject *object,
-                      GQuark quark);
-

This function gets back user data pointers stored via -g_object_set_qdata() and removes the data - from object -without invoking its destroy() function (if any was -set). -Usually, calling this function is only required to update -user data pointers with a destroy notifier, for example:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
void
-object_add_to_user_list (GObject     *object,
-                         const gchar *new_string)
-{
-  // the quark, naming the object data
-  GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
-  // retrive the old string list
-  GList *list = g_object_steal_qdata (object, quark_string_list);
-
-  // prepend new string
-  list = g_list_prepend (list, g_strdup (new_string));
-  // this changed 'list', so we need to set it again
-  g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
-}
-static void
-free_string_list (gpointer data)
-{
-  GList *node, *list = data;
-
-  for (node = list; node; node = node->next)
-    g_free (node->data);
-  g_list_free (list);
-}
-
- -

-Using g_object_get_qdata() in the above example, instead of -g_object_steal_qdata() would have left the destroy function set, -and thus the partial string list would have been freed upon -g_object_set_qdata_full().

-
-

Parameters

-
----- - - - - - - - - - - - - -

object

The GObject to get a stored user data pointer from

 

quark

A GQuark, naming the user data pointer

 
-
-
-

Returns

-

The user data pointer set, or NULL.

-

[transfer full]

-
-
-
-
-

g_object_dup_qdata ()

-
gpointer
-g_object_dup_qdata (GObject *object,
-                    GQuark quark,
-                    GDuplicateFunc dup_func,
-                    gpointer user_data);
-

This is a variant of g_object_get_qdata() which returns -a 'duplicate' of the value. dup_func - defines the -meaning of 'duplicate' in this context, it could e.g. -take a reference on a ref-counted object.

-

If the quark - is not set on the object then dup_func - -will be called with a NULL argument.

-

Note that dup_func - is called while user data of object - -is locked.

-

This function can be useful to avoid races when multiple -threads are using object data on the same key on the same -object.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

object

the GObject to store user data on

 

quark

a GQuark, naming the user data pointer

 

dup_func

function to dup the value.

[nullable]

user_data

passed as user_data to dup_func -.

[nullable]
-
-
-

Returns

-

the result of calling dup_func -on the value -associated with quark -on object -, or NULL if not set. -If dup_func -is NULL, the value is returned -unmodified.

-
-

Since: 2.34

-
-
-
-

g_object_replace_qdata ()

-
gboolean
-g_object_replace_qdata (GObject *object,
-                        GQuark quark,
-                        gpointer oldval,
-                        gpointer newval,
-                        GDestroyNotify destroy,
-                        GDestroyNotify *old_destroy);
-

Compares the user data for the key quark - on object - with -oldval -, and if they are the same, replaces oldval - with -newval -.

-

This is like a typical atomic compare-and-exchange -operation, for user data on an object.

-

If the previous value was replaced then ownership of the -old value (oldval -) is passed to the caller, including -the registered destroy notify for it (passed out in old_destroy -). -Its up to the caller to free this as he wishes, which may -or may not include using old_destroy - as sometimes replacement -should not destroy the object in the normal way.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

object

the GObject to store user data on

 

quark

a GQuark, naming the user data pointer

 

oldval

the old value to compare against.

[nullable]

newval

the new value.

[nullable]

destroy

a destroy notify for the new value.

[nullable]

old_destroy

destroy notify for the existing value.

[nullable]
-
-
-

Returns

-

TRUE if the existing value for quark -was replaced -by newval -, FALSE otherwise.

-
-

Since: 2.34

-
-
-
-

g_object_set_property ()

-
void
-g_object_set_property (GObject *object,
-                       const gchar *property_name,
-                       const GValue *value);
-

Sets a property on an object.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

a GObject

 

property_name

the name of the property to set

 

value

the value

 
-
-
-
-
-

g_object_get_property ()

-
void
-g_object_get_property (GObject *object,
-                       const gchar *property_name,
-                       GValue *value);
-

Gets a property of an object. value - must have been initialized to the -expected type of the property (or a type to which the expected type can be -transformed) using g_value_init().

-

In general, a copy is made of the property contents and the caller is -responsible for freeing the memory by calling g_value_unset().

-

Note that g_object_get_property() is really intended for language -bindings, g_object_get() is much more convenient for C programming.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

a GObject

 

property_name

the name of the property to get

 

value

return location for the property value

 
-
-
-
-
-

g_object_new_valist ()

-
GObject *
-g_object_new_valist (GType object_type,
-                     const gchar *first_property_name,
-                     va_list var_args);
-

Creates a new instance of a GObject subtype and sets its properties.

-

Construction parameters (see G_PARAM_CONSTRUCT, G_PARAM_CONSTRUCT_ONLY) -which are not explicitly specified are set to their default values.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object_type

the type id of the GObject subtype to instantiate

 

first_property_name

the name of the first property

 

var_args

the value of the first property, followed optionally by more -name/value pairs, followed by NULL

 
-
-
-

Returns

-

a new instance of object_type -

-
-
-
-
-

g_object_set_valist ()

-
void
-g_object_set_valist (GObject *object,
-                     const gchar *first_property_name,
-                     va_list var_args);
-

Sets properties on an object.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

a GObject

 

first_property_name

name of the first property to set

 

var_args

value for the first property, followed optionally by more -name/value pairs, followed by NULL

 
-
-
-
-
-

g_object_get_valist ()

-
void
-g_object_get_valist (GObject *object,
-                     const gchar *first_property_name,
-                     va_list var_args);
-

Gets properties of an object.

-

In general, a copy is made of the property contents and the caller -is responsible for freeing the memory in the appropriate manner for -the type, for instance by calling g_free() or g_object_unref().

-

See g_object_get().

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

a GObject

 

first_property_name

name of the first property to get

 

var_args

return location for the first property, followed optionally by more -name/return location pairs, followed by NULL

 
-
-
-
-
-

g_object_watch_closure ()

-
void
-g_object_watch_closure (GObject *object,
-                        GClosure *closure);
-

This function essentially limits the life time of the closure - to -the life time of the object. That is, when the object is finalized, -the closure - is invalidated by calling g_closure_invalidate() on -it, in order to prevent invocations of the closure with a finalized -(nonexisting) object. Also, g_object_ref() and g_object_unref() are -added as marshal guards to the closure -, to ensure that an extra -reference count is held on object - during invocation of the -closure -. Usually, this function will be called on closures that -use this object - as closure data.

-
-

Parameters

-
----- - - - - - - - - - - - - -

object

GObject restricting lifetime of closure -

 

closure

GClosure to watch

 
-
-
-
-
-

g_object_run_dispose ()

-
void
-g_object_run_dispose (GObject *object);
-

Releases all references to other objects. This can be used to break -reference cycles.

-

This function should only be called from object system implementations.

-
-

Parameters

-
----- - - - - - -

object

a GObject

 
-
-
-
-
-

G_OBJECT_WARN_INVALID_PROPERTY_ID()

-
#define             G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec)
-

This macro should be used to emit a standard warning about unexpected -properties in set_property() and get_property() implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

object

the GObject on which set_property() or get_property() was called

 

property_id

the numeric id of the property

 

pspec

the GParamSpec of the property

 
-
-
-
-
-

g_weak_ref_init ()

-
void
-g_weak_ref_init (GWeakRef *weak_ref,
-                 gpointer object);
-

Initialise a non-statically-allocated GWeakRef.

-

This function also calls g_weak_ref_set() with object - on the -freshly-initialised weak reference.

-

This function should always be matched with a call to -g_weak_ref_clear(). It is not necessary to use this function for a -GWeakRef in static storage because it will already be -properly initialised. Just use g_weak_ref_set() directly.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

weak_ref

uninitialized or empty location for a weak -reference.

[inout]

object

a GObject or NULL.

[type GObject.Object][nullable]
-
-

Since: 2.32

-
-
-
-

g_weak_ref_clear ()

-
void
-g_weak_ref_clear (GWeakRef *weak_ref);
-

Frees resources associated with a non-statically-allocated GWeakRef. -After this call, the GWeakRef is left in an undefined state.

-

You should only call this on a GWeakRef that previously had -g_weak_ref_init() called on it.

-

[skip]

-
-

Parameters

-
----- - - - - - -

weak_ref

location of a weak reference, which -may be empty.

[inout]
-
-

Since: 2.32

-
-
-
-

g_weak_ref_get ()

-
gpointer
-g_weak_ref_get (GWeakRef *weak_ref);
-

If weak_ref - is not empty, atomically acquire a strong -reference to the object it points to, and return that reference.

-

This function is needed because of the potential race between taking -the pointer value and g_object_ref() on it, if the object was losing -its last reference at the same time in a different thread.

-

The caller should release the resulting reference in the usual way, -by using g_object_unref().

-

[skip]

-
-

Parameters

-
----- - - - - - -

weak_ref

location of a weak reference to a GObject.

[inout]
-
-
-

Returns

-

the object pointed to -by weak_ref -, or NULL if it was empty.

-

[transfer full][type GObject.Object]

-
-

Since: 2.32

-
-
-
-

g_weak_ref_set ()

-
void
-g_weak_ref_set (GWeakRef *weak_ref,
-                gpointer object);
-

Change the object to which weak_ref - points, or set it to -NULL.

-

You must own a strong reference on object - while calling this -function.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

weak_ref

location for a weak reference

 

object

a GObject or NULL.

[type GObject.Object][nullable]
-
-

Since: 2.32

-
-
-
-

Types and Values

-
-

struct GObject

-
struct GObject;
-

All the fields in the GObject structure are private -to the GObject implementation and should never be accessed directly.

-
-
-
-

struct GObjectClass

-
struct GObjectClass {
-  GTypeClass   g_type_class;
-
-  /* seldom overidden */
-  GObject*   (*constructor)     (GType                  type,
-                                 guint                  n_construct_properties,
-                                 GObjectConstructParam *construct_properties);
-  /* overridable methods */
-  void       (*set_property)		(GObject        *object,
-                                         guint           property_id,
-                                         const GValue   *value,
-                                         GParamSpec     *pspec);
-  void       (*get_property)		(GObject        *object,
-                                         guint           property_id,
-                                         GValue         *value,
-                                         GParamSpec     *pspec);
-  void       (*dispose)			(GObject        *object);
-  void       (*finalize)		(GObject        *object);
-  /* seldom overidden */
-  void       (*dispatch_properties_changed) (GObject      *object,
-					     guint	   n_pspecs,
-					     GParamSpec  **pspecs);
-  /* signals */
-  void	     (*notify)			(GObject *object,
-					 GParamSpec *pspec);
-
-  /* called when done constructing */
-  void	     (*constructed)		(GObject *object);
-};
-
-

The class structure for the GObject type.

-

<example> -<title>Implementing singletons using a constructor</title> -<programlisting> -static MySingleton *the_singleton = NULL;

-

static GObject* -my_singleton_constructor (GType type, - guint n_construct_params, - GObjectConstructParam *construct_params) -{ - GObject *object;

-

if (!the_singleton) - { - object = G_OBJECT_CLASS (parent_class)->constructor (type, - n_construct_params, - construct_params); - the_singleton = MY_SINGLETON (object); - } - else - object = g_object_ref (G_OBJECT (the_singleton));

-

return object; -} -</programlisting></example>

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

GTypeClass g_type_class;

the parent class

 

constructor ()

the constructor -function is called by g_object_new() to -complete the object initialization after all the construction properties are -set. The first thing a constructor -implementation must do is chain up to the -constructor -of the parent class. Overriding constructor -should be rarely -needed, e.g. to handle construct properties, or to implement singletons.

 

set_property ()

the generic setter for all properties of this type. Should be -overridden for every type with properties. If implementations of -set_property -don't emit property change notification explicitly, this will -be done implicitly by the type system. However, if the notify signal is -emitted explicitly, the type system will not emit it a second time.

 

get_property ()

the generic getter for all properties of this type. Should be -overridden for every type with properties.

 

dispose ()

the dispose -function is supposed to drop all references to other -objects, but keep the instance otherwise intact, so that client method -invocations still work. It may be run multiple times (due to reference -loops). Before returning, dispose -should chain up to the dispose -method -of the parent class.

 

finalize ()

instance finalization function, should finish the finalization of -the instance begun in dispose -and chain up to the finalize -method of the -parent class.

 

dispatch_properties_changed ()

emits property change notification for a bunch -of properties. Overriding dispatch_properties_changed -should be rarely -needed.

 

notify ()

the class closure for the notify signal

 

constructed ()

the constructed -function is called by g_object_new() as the -final step of the object creation process. At the point of the call, all -construction properties have been set on the object. The purpose of this -call is to allow for object initialisation steps that can only be performed -after construction properties have been set. constructed -implementors -should chain up to the constructed -call of their parent class to allow it -to complete its initialisation.

 
-
-
-
-
-

struct GObjectConstructParam

-
struct GObjectConstructParam {
-  GParamSpec *pspec;
-  GValue     *value;
-};
-
-

The GObjectConstructParam struct is an auxiliary -structure used to hand GParamSpec/GValue pairs to the constructor - of -a GObjectClass.

-
-

Members

-
----- - - - - - - - - - - - - -

GParamSpec *pspec;

the GParamSpec of the construct parameter

 

GValue *value;

the value to set the parameter to

 
-
-
-
-
-

struct GParameter

-
struct GParameter {
-  const gchar *name;
-  GValue       value;
-};
-
-

The GParameter struct is an auxiliary structure used -to hand parameter name/value pairs to g_object_newv().

-
-

Members

-
----- - - - - - - - - - - - - -

const gchar *name;

the parameter name

 

GValue value;

the parameter value

 
-
-
-
-
-

GInitiallyUnowned

-
typedef struct _GObject                  GInitiallyUnowned;
-
-

All the fields in the GInitiallyUnowned structure -are private to the GInitiallyUnowned implementation and should never be -accessed directly.

-
-
-
-

GInitiallyUnownedClass

-
typedef struct _GObjectClass             GInitiallyUnownedClass;
-
-

The class structure for the GInitiallyUnowned type.

-
-
-
-

G_TYPE_INITIALLY_UNOWNED

-
#define G_TYPE_INITIALLY_UNOWNED	      (g_initially_unowned_get_type())
-
-

The type for GInitiallyUnowned.

-
-
-
-

GWeakRef

-
typedef struct {
-} GWeakRef;
-
-

A structure containing a weak reference to a GObject. It can either -be empty (i.e. point to NULL), or point to an object for as long as -at least one "strong" reference to that object exists. Before the -object's GObjectClass.dispose method is called, every GWeakRef -associated with becomes empty (i.e. points to NULL).

-

Like GValue, GWeakRef can be statically allocated, stack- or -heap-allocated, or embedded in larger structures.

-

Unlike g_object_weak_ref() and g_object_add_weak_pointer(), this weak -reference is thread-safe: converting a weak pointer to a reference is -atomic with respect to invalidation of weak pointers to destroyed -objects.

-

If the object's GObjectClass.dispose method results in additional -references to the object being held, any GWeakRefs taken -before it was disposed will continue to point to NULL. If -GWeakRefs are taken after the object is disposed and -re-referenced, they will continue to point to it until its refcount -goes back to zero, at which point they too will be invalidated.

-
-
-
-

Signal Details

-
-

The “notify” signal

-
void
-user_function (GObject    *gobject,
-               GParamSpec *pspec,
-               gpointer    user_data)
-

The notify signal is emitted on an object when one of its -properties has been changed. Note that getting this signal -doesn't guarantee that the value of the property has actually -changed, it may also be emitted when the setter for the property -is called to reinstate the previous value.

-

This signal is typically used to obtain change notification for a -single property, by specifying the property name as a detail in the -g_signal_connect() call, like this:

-
- - - - - - - -
1
-2
-3
g_signal_connect (text_view->buffer, "notify::paste-target-list",
-                  G_CALLBACK (gtk_text_view_target_list_notify),
-                  text_view)
-
- -

-It is important to note that you must use -canonical parameter names as -detail strings for the notify signal.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

gobject

the object which received the signal.

 

pspec

the GParamSpec of the property which changed.

 

user_data

user data set when the signal handler was connected.

 
-
-

Flags: No Hooks

-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gobject-Type-Information.html b/docs/reference/gobject/html/gobject-Type-Information.html deleted file mode 100644 index fd16f576b..000000000 --- a/docs/reference/gobject/html/gobject-Type-Information.html +++ /dev/null @@ -1,6495 +0,0 @@ - - - - -Type Information: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Type Information

-

Type Information — The GLib Runtime type identification and - management system

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#define -G_TYPE_FUNDAMENTAL() -
#define -G_TYPE_MAKE_FUNDAMENTAL() -
#define -G_TYPE_IS_ABSTRACT() -
#define -G_TYPE_IS_DERIVED() -
#define -G_TYPE_IS_FUNDAMENTAL() -
#define -G_TYPE_IS_VALUE_TYPE() -
#define -G_TYPE_HAS_VALUE_TABLE() -
#define -G_TYPE_IS_CLASSED() -
#define -G_TYPE_IS_INSTANTIATABLE() -
#define -G_TYPE_IS_DERIVABLE() -
#define -G_TYPE_IS_DEEP_DERIVABLE() -
#define -G_TYPE_IS_INTERFACE() -
#define -G_TYPE_FROM_INSTANCE() -
#define -G_TYPE_FROM_CLASS() -
#define -G_TYPE_FROM_INTERFACE() -
#define -G_TYPE_INSTANCE_GET_CLASS() -
#define -G_TYPE_INSTANCE_GET_INTERFACE() -
#define -G_TYPE_INSTANCE_GET_PRIVATE() -
#define -G_TYPE_CLASS_GET_PRIVATE() -
#define -G_TYPE_CHECK_INSTANCE() -
#define -G_TYPE_CHECK_INSTANCE_CAST() -
#define -G_TYPE_CHECK_INSTANCE_TYPE() -
#define -G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE() -
#define -G_TYPE_CHECK_CLASS_CAST() -
#define -G_TYPE_CHECK_CLASS_TYPE() -
#define -G_TYPE_CHECK_VALUE() -
#define -G_TYPE_CHECK_VALUE_TYPE() -
-void - -g_type_init () -
-void - -g_type_init_with_debug_flags () -
const gchar * - -g_type_name () -
-GQuark - -g_type_qname () -
-GType - -g_type_from_name () -
-GType - -g_type_parent () -
-guint - -g_type_depth () -
-GType - -g_type_next_base () -
-gboolean - -g_type_is_a () -
-gpointer - -g_type_class_ref () -
-gpointer - -g_type_class_peek () -
-gpointer - -g_type_class_peek_static () -
-void - -g_type_class_unref () -
-gpointer - -g_type_class_peek_parent () -
-void - -g_type_class_add_private () -
-void - -g_type_add_class_private () -
-gpointer - -g_type_interface_peek () -
-gpointer - -g_type_interface_peek_parent () -
-gpointer - -g_type_default_interface_ref () -
-gpointer - -g_type_default_interface_peek () -
-void - -g_type_default_interface_unref () -
-GType * - -g_type_children () -
-GType * - -g_type_interfaces () -
-GType * - -g_type_interface_prerequisites () -
-void - -g_type_set_qdata () -
-gpointer - -g_type_get_qdata () -
-void - -g_type_query () -
-void - -(*GBaseInitFunc) () -
-void - -(*GBaseFinalizeFunc) () -
-void - -(*GClassInitFunc) () -
-void - -(*GClassFinalizeFunc) () -
-void - -(*GInstanceInitFunc) () -
-void - -(*GInterfaceInitFunc) () -
-void - -(*GInterfaceFinalizeFunc) () -
-gboolean - -(*GTypeClassCacheFunc) () -
-GType - -g_type_register_static () -
-GType - -g_type_register_static_simple () -
-GType - -g_type_register_dynamic () -
-GType - -g_type_register_fundamental () -
-void - -g_type_add_interface_static () -
-void - -g_type_add_interface_dynamic () -
-void - -g_type_interface_add_prerequisite () -
-GTypePlugin * - -g_type_get_plugin () -
-GTypePlugin * - -g_type_interface_get_plugin () -
-GType - -g_type_fundamental_next () -
-GType - -g_type_fundamental () -
-GTypeInstance * - -g_type_create_instance () -
-void - -g_type_free_instance () -
-void - -g_type_add_class_cache_func () -
-void - -g_type_remove_class_cache_func () -
-void - -g_type_class_unref_uncached () -
-void - -g_type_add_interface_check () -
-void - -g_type_remove_interface_check () -
-void - -(*GTypeInterfaceCheckFunc) () -
-GTypeValueTable * - -g_type_value_table_peek () -
-void - -g_type_ensure () -
-guint - -g_type_get_type_registration_serial () -
-int - -g_type_get_instance_count () -
#define -G_DECLARE_FINAL_TYPE() -
#define -G_DECLARE_DERIVABLE_TYPE() -
#define -G_DECLARE_INTERFACE() -
#define -G_DEFINE_TYPE() -
#define -G_DEFINE_TYPE_WITH_PRIVATE() -
#define -G_DEFINE_TYPE_WITH_CODE() -
#define -G_DEFINE_ABSTRACT_TYPE() -
#define -G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE() -
#define -G_DEFINE_ABSTRACT_TYPE_WITH_CODE() -
#define -G_ADD_PRIVATE() -
#define -G_PRIVATE_OFFSET() -
#define -G_PRIVATE_FIELD() -
#define -G_PRIVATE_FIELD_P() -
#define -G_DEFINE_INTERFACE() -
#define -G_DEFINE_INTERFACE_WITH_CODE() -
#define -G_IMPLEMENT_INTERFACE() -
#define -G_DEFINE_TYPE_EXTENDED() -
#define -G_DEFINE_BOXED_TYPE() -
#define -G_DEFINE_BOXED_TYPE_WITH_CODE() -
#define -G_DEFINE_POINTER_TYPE() -
#define -G_DEFINE_POINTER_TYPE_WITH_CODE() -
-
-
-

Types and Values

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
typedefGType
#defineG_TYPE_FUNDAMENTAL_MAX
structGTypeInterface
structGTypeInstance
structGTypeClass
structGTypeInfo
structGTypeFundamentalInfo
structGInterfaceInfo
structGTypeValueTable
#defineG_TYPE_FLAG_RESERVED_ID_BIT
enumGTypeDebugFlags
structGTypeQuery
enumGTypeFlags
enumGTypeFundamentalFlags
#defineG_TYPE_INVALID
#defineG_TYPE_NONE
#defineG_TYPE_INTERFACE
#defineG_TYPE_CHAR
#defineG_TYPE_UCHAR
#defineG_TYPE_BOOLEAN
#defineG_TYPE_INT
#defineG_TYPE_UINT
#defineG_TYPE_LONG
#defineG_TYPE_ULONG
#defineG_TYPE_INT64
#defineG_TYPE_UINT64
#defineG_TYPE_ENUM
#defineG_TYPE_FLAGS
#defineG_TYPE_FLOAT
#defineG_TYPE_DOUBLE
#defineG_TYPE_STRING
#defineG_TYPE_POINTER
#defineG_TYPE_BOXED
#defineG_TYPE_PARAM
#defineG_TYPE_OBJECT
#defineG_TYPE_GTYPE
#defineG_TYPE_VARIANT
#defineG_TYPE_CHECKSUM
#defineG_TYPE_RESERVED_GLIB_FIRST
#defineG_TYPE_RESERVED_GLIB_LAST
#defineG_TYPE_RESERVED_BSE_FIRST
#defineG_TYPE_RESERVED_BSE_LAST
#defineG_TYPE_RESERVED_USER_FIRST
-
-
-

Includes

-
#include <glib-object.h>
-
-
-
-

Description

-

The GType API is the foundation of the GObject system. It provides the -facilities for registering and managing all fundamental data types, -user-defined object and interface types.

-

For type creation and registration purposes, all types fall into one of -two categories: static or dynamic. Static types are never loaded or -unloaded at run-time as dynamic types may be. Static types are created -with g_type_register_static() that gets type specific information passed -in via a GTypeInfo structure.

-

Dynamic types are created with g_type_register_dynamic() which takes a -GTypePlugin structure instead. The remaining type information (the -GTypeInfo structure) is retrieved during runtime through GTypePlugin -and the g_type_plugin_*() API.

-

These registration functions are usually called only once from a -function whose only purpose is to return the type identifier for a -specific class. Once the type (or class or interface) is registered, -it may be instantiated, inherited, or implemented depending on exactly -what sort of type it is.

-

There is also a third registration function for registering fundamental -types called g_type_register_fundamental() which requires both a GTypeInfo -structure and a GTypeFundamentalInfo structure but it is seldom used -since most fundamental types are predefined rather than user-defined.

-

Type instance and class structs are limited to a total of 64 KiB, -including all parent types. Similarly, type instances' private data -(as created by g_type_class_add_private()) are limited to a total of -64 KiB. If a type instance needs a large static buffer, allocate it -separately (typically by using GArray or GPtrArray) and put a pointer -to the buffer in the structure.

-

As mentioned in the GType conventions, type names must -be at least three characters long. There is no upper length limit. The first -character must be a letter (a–z or A–Z) or an underscore (‘_’). Subsequent -characters can be letters, numbers or any of ‘-_+’.

-
-
-

Functions

-
-

G_TYPE_FUNDAMENTAL()

-
#define G_TYPE_FUNDAMENTAL(type) (g_type_fundamental (type))
-
-

The fundamental type which is the ancestor of type -. -Fundamental types are types that serve as ultimate bases for the derived types, -thus they are the roots of distinct inheritance hierarchies.

-
-

Parameters

-
----- - - - - - -

type

A GType value.

 
-
-
-
-
-

G_TYPE_MAKE_FUNDAMENTAL()

-
#define G_TYPE_MAKE_FUNDAMENTAL(x) ((GType) ((x) << G_TYPE_FUNDAMENTAL_SHIFT))
-
-

Get the type ID for the fundamental type number x -. -Use g_type_fundamental_next() instead of this macro to create new fundamental -types.

-
-

Parameters

-
----- - - - - - -

x

the fundamental type number.

 
-
-
-

Returns

-

the GType

-
-
-
-
-

G_TYPE_IS_ABSTRACT()

-
#define G_TYPE_IS_ABSTRACT(type)                (g_type_test_flags ((type), G_TYPE_FLAG_ABSTRACT))
-
-

Checks if type - is an abstract type. An abstract type cannot be -instantiated and is normally used as an abstract base class for -derived classes.

-
-

Parameters

-
----- - - - - - -

type

A GType value

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

G_TYPE_IS_DERIVED()

-
#define G_TYPE_IS_DERIVED(type)                 ((type) > G_TYPE_FUNDAMENTAL_MAX)
-
-

Checks if type - is derived (or in object-oriented terminology: -inherited) from another type (this holds true for all non-fundamental -types).

-
-

Parameters

-
----- - - - - - -

type

A GType value

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

G_TYPE_IS_FUNDAMENTAL()

-
#define G_TYPE_IS_FUNDAMENTAL(type)             ((type) <= G_TYPE_FUNDAMENTAL_MAX)
-
-

Checks if type - is a fundamental type.

-
-

Parameters

-
----- - - - - - -

type

A GType value

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

G_TYPE_IS_VALUE_TYPE()

-
#define G_TYPE_IS_VALUE_TYPE(type)              (g_type_check_is_value_type (type))
-
-

Checks if type - is a value type and can be used with g_value_init().

-
-

Parameters

-
----- - - - - - -

type

A GType value

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

G_TYPE_HAS_VALUE_TABLE()

-
#define G_TYPE_HAS_VALUE_TABLE(type)            (g_type_value_table_peek (type) != NULL)
-
-

Checks if type - has a GTypeValueTable.

-
-

Parameters

-
----- - - - - - -

type

A GType value

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

G_TYPE_IS_CLASSED()

-
#define G_TYPE_IS_CLASSED(type)                 (g_type_test_flags ((type), G_TYPE_FLAG_CLASSED))
-
-

Checks if type - is a classed type.

-
-

Parameters

-
----- - - - - - -

type

A GType value

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

G_TYPE_IS_INSTANTIATABLE()

-
#define G_TYPE_IS_INSTANTIATABLE(type)          (g_type_test_flags ((type), G_TYPE_FLAG_INSTANTIATABLE))
-
-

Checks if type - can be instantiated. Instantiation is the -process of creating an instance (object) of this type.

-
-

Parameters

-
----- - - - - - -

type

A GType value

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

G_TYPE_IS_DERIVABLE()

-
#define G_TYPE_IS_DERIVABLE(type)               (g_type_test_flags ((type), G_TYPE_FLAG_DERIVABLE))
-
-

Checks if type - is a derivable type. A derivable type can -be used as the base class of a flat (single-level) class hierarchy.

-
-

Parameters

-
----- - - - - - -

type

A GType value

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

G_TYPE_IS_DEEP_DERIVABLE()

-
#define G_TYPE_IS_DEEP_DERIVABLE(type)          (g_type_test_flags ((type), G_TYPE_FLAG_DEEP_DERIVABLE))
-
-

Checks if type - is a deep derivable type. A deep derivable type -can be used as the base class of a deep (multi-level) class hierarchy.

-
-

Parameters

-
----- - - - - - -

type

A GType value

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

G_TYPE_IS_INTERFACE()

-
#define G_TYPE_IS_INTERFACE(type)               (G_TYPE_FUNDAMENTAL (type) == G_TYPE_INTERFACE)
-
-

Checks if type - is an interface type. -An interface type provides a pure API, the implementation -of which is provided by another type (which is then said to conform -to the interface). GLib interfaces are somewhat analogous to Java -interfaces and C++ classes containing only pure virtual functions, -with the difference that GType interfaces are not derivable (but see -g_type_interface_add_prerequisite() for an alternative).

-
-

Parameters

-
----- - - - - - -

type

A GType value

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

G_TYPE_FROM_INSTANCE()

-
#define G_TYPE_FROM_INSTANCE(instance)                          (G_TYPE_FROM_CLASS (((GTypeInstance*) (instance))->g_class))
-
-

Get the type identifier from a given instance - structure.

-

This macro should only be used in type implementations.

-
-

Parameters

-
----- - - - - - -

instance

Location of a valid GTypeInstance structure

 
-
-
-

Returns

-

the GType

-
-
-
-
-

G_TYPE_FROM_CLASS()

-
#define G_TYPE_FROM_CLASS(g_class)                              (((GTypeClass*) (g_class))->g_type)
-
-

Get the type identifier from a given class - structure.

-

This macro should only be used in type implementations.

-
-

Parameters

-
----- - - - - - -

g_class

Location of a valid GTypeClass structure

 
-
-
-

Returns

-

the GType

-
-
-
-
-

G_TYPE_FROM_INTERFACE()

-
#define G_TYPE_FROM_INTERFACE(g_iface)                          (((GTypeInterface*) (g_iface))->g_type)
-
-

Get the type identifier from a given interface - structure.

-

This macro should only be used in type implementations.

-
-

Parameters

-
----- - - - - - -

g_iface

Location of a valid GTypeInterface structure

 
-
-
-

Returns

-

the GType

-
-
-
-
-

G_TYPE_INSTANCE_GET_CLASS()

-
#define G_TYPE_INSTANCE_GET_CLASS(instance, g_type, c_type)     (_G_TYPE_IGC ((instance), (g_type), c_type))
-
-

Get the class structure of a given instance -, casted -to a specified ancestor type g_type - of the instance.

-

Note that while calling a GInstanceInitFunc(), the class pointer -gets modified, so it might not always return the expected pointer.

-

This macro should only be used in type implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

instance

Location of the GTypeInstance structure

 

g_type

The GType of the class to be returned

 

c_type

The C type of the class structure

 
-
-
-

Returns

-

a pointer to the class structure

-
-
-
-
-

G_TYPE_INSTANCE_GET_INTERFACE()

-
#define G_TYPE_INSTANCE_GET_INTERFACE(instance, g_type, c_type) (_G_TYPE_IGI ((instance), (g_type), c_type))
-
-

Get the interface structure for interface g_type - of a given instance -.

-

This macro should only be used in type implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

instance

Location of the GTypeInstance structure

 

g_type

The GType of the interface to be returned

 

c_type

The C type of the interface structure

 
-
-
-

Returns

-

a pointer to the interface structure

-
-
-
-
-

G_TYPE_INSTANCE_GET_PRIVATE()

-
#define G_TYPE_INSTANCE_GET_PRIVATE(instance, g_type, c_type)   ((c_type*) g_type_instance_get_private ((GTypeInstance*) (instance), (g_type)))
-
-

Gets the private structure for a particular type. -The private structure must have been registered in the -class_init function with g_type_class_add_private().

-

This macro should only be used in type implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

instance

the instance of a type deriving from private_type -

 

g_type

the type identifying which private data to retrieve

 

c_type

The C type for the private structure

 
-
-
-

Returns

-

a pointer to the private data structure.

-

[not nullable]

-
-

Since: 2.4

-
-
-
-

G_TYPE_CLASS_GET_PRIVATE()

-
#define G_TYPE_CLASS_GET_PRIVATE(klass, g_type, c_type)   ((c_type*) g_type_class_get_private ((GTypeClass*) (klass), (g_type)))
-
-

Gets the private class structure for a particular type. -The private structure must have been registered in the -get_type() function with g_type_add_class_private().

-

This macro should only be used in type implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

klass

the class of a type deriving from private_type -

 

g_type

the type identifying which private data to retrieve

 

c_type

The C type for the private structure

 
-
-
-

Returns

-

a pointer to the private data structure.

-

[not nullable]

-
-

Since: 2.24

-
-
-
-

G_TYPE_CHECK_INSTANCE()

-
#define G_TYPE_CHECK_INSTANCE(instance)				(_G_TYPE_CHI ((GTypeInstance*) (instance)))
-
-

Checks if instance - is a valid GTypeInstance structure, -otherwise issues a warning and returns FALSE. NULL is not a valid -GTypeInstance.

-

This macro should only be used in type implementations.

-
-

Parameters

-
----- - - - - - -

instance

Location of a GTypeInstance structure

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

G_TYPE_CHECK_INSTANCE_CAST()

-
#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type)    (_G_TYPE_CIC ((instance), (g_type), c_type))
-
-

Checks that instance - is an instance of the type identified by g_type - -and issues a warning if this is not the case. Returns instance - casted -to a pointer to c_type -.

-

No warning will be issued if instance - is NULL, and NULL will be returned.

-

This macro should only be used in type implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

instance

Location of a GTypeInstance structure.

[nullable]

g_type

The type to be returned

 

c_type

The corresponding C type of g_type -

 
-
-
-
-
-

G_TYPE_CHECK_INSTANCE_TYPE()

-
#define G_TYPE_CHECK_INSTANCE_TYPE(instance, g_type)            (_G_TYPE_CIT ((instance), (g_type)))
-
-

Checks if instance - is an instance of the type identified by g_type -. If -instance - is NULL, FALSE will be returned.

-

This macro should only be used in type implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - -

instance

Location of a GTypeInstance structure.

[nullable]

g_type

The type to be checked

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE()

-
#define G_TYPE_CHECK_INSTANCE_FUNDAMENTAL_TYPE(instance, g_type)            (_G_TYPE_CIFT ((instance), (g_type)))
-
-

Checks if instance - is an instance of the fundamental type identified by g_type -. -If instance - is NULL, FALSE will be returned.

-

This macro should only be used in type implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - -

instance

Location of a GTypeInstance structure.

[nullable]

g_type

The fundamental type to be checked

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

G_TYPE_CHECK_CLASS_CAST()

-
#define G_TYPE_CHECK_CLASS_CAST(g_class, g_type, c_type)        (_G_TYPE_CCC ((g_class), (g_type), c_type))
-
-

Checks that g_class - is a class structure of the type identified by g_type - -and issues a warning if this is not the case. Returns g_class - casted -to a pointer to c_type -. NULL is not a valid class structure.

-

This macro should only be used in type implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

g_class

Location of a GTypeClass structure

 

g_type

The type to be returned

 

c_type

The corresponding C type of class structure of g_type -

 
-
-
-
-
-

G_TYPE_CHECK_CLASS_TYPE()

-
#define G_TYPE_CHECK_CLASS_TYPE(g_class, g_type)                (_G_TYPE_CCT ((g_class), (g_type)))
-
-

Checks if g_class - is a class structure of the type identified by -g_type -. If g_class - is NULL, FALSE will be returned.

-

This macro should only be used in type implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - -

g_class

Location of a GTypeClass structure.

[nullable]

g_type

The type to be checked

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

G_TYPE_CHECK_VALUE()

-
#define G_TYPE_CHECK_VALUE(value)				(_G_TYPE_CHV ((value)))
-
-

Checks if value - has been initialized to hold values -of a value type.

-

This macro should only be used in type implementations.

-
-

Parameters

-
----- - - - - - -

value

a GValue

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

G_TYPE_CHECK_VALUE_TYPE()

-
#define G_TYPE_CHECK_VALUE_TYPE(value, g_type)			(_G_TYPE_CVH ((value), (g_type)))
-
-

Checks if value - has been initialized to hold values -of type g_type -.

-

This macro should only be used in type implementations.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value

a GValue

 

g_type

The type to be checked

 
-
-
-

Returns

-

TRUE on success

-
-
-
-
-

g_type_init ()

-
void
-g_type_init (void);
-
-

g_type_init has been deprecated since version 2.36 and should not be used in newly-written code.

-

the type system is now initialised automatically

-
-

This function used to initialise the type system. Since GLib 2.36, -the type system is initialised automatically and this function does -nothing.

-
-
-
-

g_type_init_with_debug_flags ()

-
void
-g_type_init_with_debug_flags (GTypeDebugFlags debug_flags);
-
-

g_type_init_with_debug_flags has been deprecated since version 2.36 and should not be used in newly-written code.

-

the type system is now initialised automatically

-
-

This function used to initialise the type system with debugging -flags. Since GLib 2.36, the type system is initialised automatically -and this function does nothing.

-

If you need to enable debugging features, use the GOBJECT_DEBUG -environment variable.

-
-

Parameters

-
----- - - - - - -

debug_flags

bitwise combination of GTypeDebugFlags values for -debugging purposes

 
-
-
-
-
-

g_type_name ()

-
const gchar *
-g_type_name (GType type);
-

Get the unique name that is assigned to a type ID. Note that this -function (like all other GType API) cannot cope with invalid type -IDs. G_TYPE_INVALID may be passed to this function, as may be any -other validly registered type ID, but randomized type IDs should -not be passed in and will most likely lead to a crash.

-
-

Parameters

-
----- - - - - - -

type

type to return name for

 
-
-
-

Returns

-

static type name or NULL

-
-
-
-
-

g_type_qname ()

-
GQuark
-g_type_qname (GType type);
-

Get the corresponding quark of the type IDs name.

-
-

Parameters

-
----- - - - - - -

type

type to return quark of type name for

 
-
-
-

Returns

-

the type names quark or 0

-
-
-
-
-

g_type_from_name ()

-
GType
-g_type_from_name (const gchar *name);
-

Lookup the type ID from a given type name, returning 0 if no type -has been registered under this name (this is the preferred method -to find out by name whether a specific type has been registered -yet).

-
-

Parameters

-
----- - - - - - -

name

type name to lookup

 
-
-
-

Returns

-

corresponding type ID or 0

-
-
-
-
-

g_type_parent ()

-
GType
-g_type_parent (GType type);
-

Return the direct parent type of the passed in type. If the passed -in type has no parent, i.e. is a fundamental type, 0 is returned.

-
-

Parameters

-
----- - - - - - -

type

the derived type

 
-
-
-

Returns

-

the parent type

-
-
-
-
-

g_type_depth ()

-
guint
-g_type_depth (GType type);
-

Returns the length of the ancestry of the passed in type. This -includes the type itself, so that e.g. a fundamental type has depth 1.

-
-

Parameters

-
----- - - - - - -

type

a GType

 
-
-
-

Returns

-

the depth of type -

-
-
-
-
-

g_type_next_base ()

-
GType
-g_type_next_base (GType leaf_type,
-                  GType root_type);
-

Given a leaf_type - and a root_type - which is contained in its -anchestry, return the type that root_type - is the immediate parent -of. In other words, this function determines the type that is -derived directly from root_type - which is also a base class of -leaf_type -. Given a root type and a leaf type, this function can -be used to determine the types and order in which the leaf type is -descended from the root type.

-
-

Parameters

-
----- - - - - - - - - - - - - -

leaf_type

descendant of root_type -and the type to be returned

 

root_type

immediate parent of the returned type

 
-
-
-

Returns

-

immediate child of root_type -and anchestor of leaf_type -

-
-
-
-
-

g_type_is_a ()

-
gboolean
-g_type_is_a (GType type,
-             GType is_a_type);
-

If is_a_type - is a derivable type, check whether type - is a -descendant of is_a_type -. If is_a_type - is an interface, check -whether type - conforms to it.

-
-

Parameters

-
----- - - - - - - - - - - - - -

type

type to check anchestry for

 

is_a_type

possible anchestor of type -or interface that type -could conform to

 
-
-
-

Returns

-

TRUE if type -is a is_a_type -

-
-
-
-
-

g_type_class_ref ()

-
gpointer
-g_type_class_ref (GType type);
-

Increments the reference count of the class structure belonging to -type -. This function will demand-create the class if it doesn't -exist already.

-
-

Parameters

-
----- - - - - - -

type

type ID of a classed type

 
-
-
-

Returns

-

the GTypeClass -structure for the given type ID.

-

[type GObject.TypeClass][transfer none]

-
-
-
-
-

g_type_class_peek ()

-
gpointer
-g_type_class_peek (GType type);
-

This function is essentially the same as g_type_class_ref(), -except that the classes reference count isn't incremented. -As a consequence, this function may return NULL if the class -of the type passed in does not currently exist (hasn't been -referenced before).

-
-

Parameters

-
----- - - - - - -

type

type ID of a classed type

 
-
-
-

Returns

-

the GTypeClass -structure for the given type ID or NULL if the class does not -currently exist.

-

[type GObject.TypeClass][transfer none]

-
-
-
-
-

g_type_class_peek_static ()

-
gpointer
-g_type_class_peek_static (GType type);
-

A more efficient version of g_type_class_peek() which works only for -static types.

-
-

Parameters

-
----- - - - - - -

type

type ID of a classed type

 
-
-
-

Returns

-

the GTypeClass -structure for the given type ID or NULL if the class does not -currently exist or is dynamically loaded.

-

[type GObject.TypeClass][transfer none]

-
-

Since: 2.4

-
-
-
-

g_type_class_unref ()

-
void
-g_type_class_unref (gpointer g_class);
-

Decrements the reference count of the class structure being passed in. -Once the last reference count of a class has been released, classes -may be finalized by the type system, so further dereferencing of a -class pointer after g_type_class_unref() are invalid.

-
-

Parameters

-
----- - - - - - -

g_class

a GTypeClass structure to unref.

[type GObject.TypeClass]
-
-
-
-
-

g_type_class_peek_parent ()

-
gpointer
-g_type_class_peek_parent (gpointer g_class);
-

This is a convenience function often needed in class initializers. -It returns the class structure of the immediate parent type of the -class passed in. Since derived classes hold a reference count on -their parent classes as long as they are instantiated, the returned -class will always exist.

-

This function is essentially equivalent to: -g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class)))

-
-

Parameters

-
----- - - - - - -

g_class

the GTypeClass structure to -retrieve the parent class for.

[type GObject.TypeClass]
-
-
-

Returns

-

the parent class -of g_class -.

-

[type GObject.TypeClass][transfer none]

-
-
-
-
-

g_type_class_add_private ()

-
void
-g_type_class_add_private (gpointer g_class,
-                          gsize private_size);
-

Registers a private structure for an instantiatable type.

-

When an object is allocated, the private structures for -the type and all of its parent types are allocated -sequentially in the same memory block as the public -structures, and are zero-filled.

-

Note that the accumulated size of the private structures of -a type and all its parent types cannot exceed 64 KiB.

-

This function should be called in the type's class_init() function. -The private structure can be retrieved using the -G_TYPE_INSTANCE_GET_PRIVATE() macro.

-

The following example shows attaching a private structure -MyObjectPrivate to an object MyObject defined in the standard -GObject fashion in the type's class_init() function.

-

Note the use of a structure member "priv" to avoid the overhead -of repeatedly calling MY_OBJECT_GET_PRIVATE().

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
typedef struct _MyObject        MyObject;
-typedef struct _MyObjectPrivate MyObjectPrivate;
-
-struct _MyObject {
- GObject parent;
-
- MyObjectPrivate *priv;
-};
-
-struct _MyObjectPrivate {
-  int some_field;
-};
-
-static void
-my_object_class_init (MyObjectClass *klass)
-{
-  g_type_class_add_private (klass, sizeof (MyObjectPrivate));
-}
-
-static void
-my_object_init (MyObject *my_object)
-{
-  my_object->priv = G_TYPE_INSTANCE_GET_PRIVATE (my_object,
-                                                 MY_TYPE_OBJECT,
-                                                 MyObjectPrivate);
-  // my_object->priv->some_field will be automatically initialised to 0
-}
-
-static int
-my_object_get_some_field (MyObject *my_object)
-{
-  MyObjectPrivate *priv;
-
-  g_return_val_if_fail (MY_IS_OBJECT (my_object), 0);
-
-  priv = my_object->priv;
-
-  return priv->some_field;
-}
-
- -

-
-

Parameters

-
----- - - - - - - - - - - - - -

g_class

class structure for an instantiatable -type.

[type GObject.TypeClass]

private_size

size of private structure

 
-
-

Since: 2.4

-
-
-
-

g_type_add_class_private ()

-
void
-g_type_add_class_private (GType class_type,
-                          gsize private_size);
-

Registers a private class structure for a classed type; -when the class is allocated, the private structures for -the class and all of its parent types are allocated -sequentially in the same memory block as the public -structures, and are zero-filled.

-

This function should be called in the -type's get_type() function after the type is registered. -The private structure can be retrieved using the -G_TYPE_CLASS_GET_PRIVATE() macro.

-
-

Parameters

-
----- - - - - - - - - - - - - -

class_type

GType of an classed type

 

private_size

size of private structure

 
-
-

Since: 2.24

-
-
-
-

g_type_interface_peek ()

-
gpointer
-g_type_interface_peek (gpointer instance_class,
-                       GType iface_type);
-

Returns the GTypeInterface structure of an interface to which the -passed in class conforms.

-
-

Parameters

-
----- - - - - - - - - - - - - -

instance_class

a GTypeClass structure.

[type GObject.TypeClass]

iface_type

an interface ID which this class conforms to

 
-
-
-

Returns

-

the GTypeInterface -structure of iface_type -if implemented by instance_class -, NULL -otherwise.

-

[type GObject.TypeInterface][transfer none]

-
-
-
-
-

g_type_interface_peek_parent ()

-
gpointer
-g_type_interface_peek_parent (gpointer g_iface);
-

Returns the corresponding GTypeInterface structure of the parent type -of the instance type to which g_iface - belongs. This is useful when -deriving the implementation of an interface from the parent type and -then possibly overriding some methods.

-
-

Parameters

-
----- - - - - - -

g_iface

a GTypeInterface structure.

[type GObject.TypeInterface]
-
-
-

Returns

-

the -corresponding GTypeInterface structure of the parent type of the -instance type to which g_iface -belongs, or NULL if the parent -type doesn't conform to the interface.

-

[transfer none][type GObject.TypeInterface]

-
-
-
-
-

g_type_default_interface_ref ()

-
gpointer
-g_type_default_interface_ref (GType g_type);
-

Increments the reference count for the interface type g_type -, -and returns the default interface vtable for the type.

-

If the type is not currently in use, then the default vtable -for the type will be created and initalized by calling -the base interface init and default vtable init functions for -the type (the base_init - and class_init - members of GTypeInfo). -Calling g_type_default_interface_ref() is useful when you -want to make sure that signals and properties for an interface -have been installed.

-
-

Parameters

-
----- - - - - - -

g_type

an interface type

 
-
-
-

Returns

-

the default -vtable for the interface; call g_type_default_interface_unref() -when you are done using the interface.

-

[type GObject.TypeInterface][transfer none]

-
-

Since: 2.4

-
-
-
-

g_type_default_interface_peek ()

-
gpointer
-g_type_default_interface_peek (GType g_type);
-

If the interface type g_type - is currently in use, returns its -default interface vtable.

-
-

Parameters

-
----- - - - - - -

g_type

an interface type

 
-
-
-

Returns

-

the default -vtable for the interface, or NULL if the type is not currently -in use.

-

[type GObject.TypeInterface][transfer none]

-
-

Since: 2.4

-
-
-
-

g_type_default_interface_unref ()

-
void
-g_type_default_interface_unref (gpointer g_iface);
-

Decrements the reference count for the type corresponding to the -interface default vtable g_iface -. If the type is dynamic, then -when no one is using the interface and all references have -been released, the finalize function for the interface's default -vtable (the class_finalize - member of GTypeInfo) will be called.

-
-

Parameters

-
----- - - - - - -

g_iface

the default vtable -structure for a interface, as returned by g_type_default_interface_ref().

[type GObject.TypeInterface]
-
-

Since: 2.4

-
-
-
-

g_type_children ()

-
GType *
-g_type_children (GType type,
-                 guint *n_children);
-

Return a newly allocated and 0-terminated array of type IDs, listing -the child types of type -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

type

the parent type

 

n_children

location to store the length of -the returned array, or NULL.

[out][optional]
-
-
-

Returns

-

Newly allocated -and 0-terminated array of child types, free with g_free().

-

[array length=n_children][transfer full]

-
-
-
-
-

g_type_interfaces ()

-
GType *
-g_type_interfaces (GType type,
-                   guint *n_interfaces);
-

Return a newly allocated and 0-terminated array of type IDs, listing -the interface types that type - conforms to.

-
-

Parameters

-
----- - - - - - - - - - - - - -

type

the type to list interface types for

 

n_interfaces

location to store the length of -the returned array, or NULL.

[out][optional]
-
-
-

Returns

-

Newly allocated -and 0-terminated array of interface types, free with g_free().

-

[array length=n_interfaces][transfer full]

-
-
-
-
-

g_type_interface_prerequisites ()

-
GType *
-g_type_interface_prerequisites (GType interface_type,
-                                guint *n_prerequisites);
-

Returns the prerequisites of an interfaces type.

-
-

Parameters

-
----- - - - - - - - - - - - - -

interface_type

an interface type

 

n_prerequisites

location to return the number -of prerequisites, or NULL.

[out][optional]
-
-
-

Returns

-

a -newly-allocated zero-terminated array of GType containing -the prerequisites of interface_type -.

-

[array length=n_prerequisites][transfer full]

-
-

Since: 2.2

-
-
-
-

g_type_set_qdata ()

-
void
-g_type_set_qdata (GType type,
-                  GQuark quark,
-                  gpointer data);
-

Attaches arbitrary data to a type.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

type

a GType

 

quark

a GQuark id to identify the data

 

data

the data

 
-
-
-
-
-

g_type_get_qdata ()

-
gpointer
-g_type_get_qdata (GType type,
-                  GQuark quark);
-

Obtains data which has previously been attached to type - -with g_type_set_qdata().

-

Note that this does not take subtyping into account; data -attached to one type with g_type_set_qdata() cannot -be retrieved from a subtype using g_type_get_qdata().

-
-

Parameters

-
----- - - - - - - - - - - - - -

type

a GType

 

quark

a GQuark id to identify the data

 
-
-
-

Returns

-

the data, or NULL if no data was found.

-

[transfer none]

-
-
-
-
-

g_type_query ()

-
void
-g_type_query (GType type,
-              GTypeQuery *query);
-

Queries the type system for information about a specific type. -This function will fill in a user-provided structure to hold -type-specific information. If an invalid GType is passed in, the -type - member of the GTypeQuery is 0. All members filled into the -GTypeQuery structure should be considered constant and have to be -left untouched.

-
-

Parameters

-
----- - - - - - - - - - - - - -

type

GType of a static, classed type

 

query

a user provided structure that is -filled in with constant values upon success.

[out caller-allocates]
-
-
-
-
-

GBaseInitFunc ()

-
void
-(*GBaseInitFunc) (gpointer g_class);
-

A callback function used by the type system to do base initialization -of the class structures of derived types. It is called as part of the -initialization process of all derived classes and should reallocate -or reset all dynamic class members copied over from the parent class. -For example, class members (such as strings) that are not sufficiently -handled by a plain memory copy of the parent class into the derived class -have to be altered. See GClassInitFunc() for a discussion of the class -initialization process.

-
-

Parameters

-
----- - - - - - -

g_class

The GTypeClass structure to initialize.

[type GObject.TypeClass]
-
-
-
-
-

GBaseFinalizeFunc ()

-
void
-(*GBaseFinalizeFunc) (gpointer g_class);
-

A callback function used by the type system to finalize those portions -of a derived types class structure that were setup from the corresponding -GBaseInitFunc() function. Class finalization basically works the inverse -way in which class initialization is performed. -See GClassInitFunc() for a discussion of the class initialization process.

-
-

Parameters

-
----- - - - - - -

g_class

The GTypeClass structure to finalize.

[type GObject.TypeClass]
-
-
-
-
-

GClassInitFunc ()

-
void
-(*GClassInitFunc) (gpointer g_class,
-                   gpointer class_data);
-

A callback function used by the type system to initialize the class -of a specific type. This function should initialize all static class -members.

-

The initialization process of a class involves:

-
    -
  • Copying common members from the parent class over to the -derived class structure.

  • -
  • Zero initialization of the remaining members not copied -over from the parent class.

  • -
  • Invocation of the GBaseInitFunc() initializers of all parent -types and the class' type.

  • -
  • Invocation of the class' GClassInitFunc() initializer.

  • -
-

Since derived classes are partially initialized through a memory copy -of the parent class, the general rule is that GBaseInitFunc() and -GBaseFinalizeFunc() should take care of necessary reinitialization -and release of those class members that were introduced by the type -that specified these GBaseInitFunc()/GBaseFinalizeFunc(). -GClassInitFunc() should only care about initializing static -class members, while dynamic class members (such as allocated strings -or reference counted resources) are better handled by a GBaseInitFunc() -for this type, so proper initialization of the dynamic class members -is performed for class initialization of derived types as well.

-

An example may help to correspond the intend of the different class -initializers:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
typedef struct {
-  GObjectClass parent_class;
-  gint         static_integer;
-  gchar       *dynamic_string;
-} TypeAClass;
-static void
-type_a_base_class_init (TypeAClass *class)
-{
-  class->dynamic_string = g_strdup ("some string");
-}
-static void
-type_a_base_class_finalize (TypeAClass *class)
-{
-  g_free (class->dynamic_string);
-}
-static void
-type_a_class_init (TypeAClass *class)
-{
-  class->static_integer = 42;
-}
-
-typedef struct {
-  TypeAClass   parent_class;
-  gfloat       static_float;
-  GString     *dynamic_gstring;
-} TypeBClass;
-static void
-type_b_base_class_init (TypeBClass *class)
-{
-  class->dynamic_gstring = g_string_new ("some other string");
-}
-static void
-type_b_base_class_finalize (TypeBClass *class)
-{
-  g_string_free (class->dynamic_gstring);
-}
-static void
-type_b_class_init (TypeBClass *class)
-{
-  class->static_float = 3.14159265358979323846;
-}
-
- -

-Initialization of TypeBClass will first cause initialization of -TypeAClass (derived classes reference their parent classes, see -g_type_class_ref() on this).

-

Initialization of TypeAClass roughly involves zero-initializing its fields, -then calling its GBaseInitFunc() type_a_base_class_init() to allocate -its dynamic members (dynamic_string), and finally calling its GClassInitFunc() -type_a_class_init() to initialize its static members (static_integer). -The first step in the initialization process of TypeBClass is then -a plain memory copy of the contents of TypeAClass into TypeBClass and -zero-initialization of the remaining fields in TypeBClass. -The dynamic members of TypeAClass within TypeBClass now need -reinitialization which is performed by calling type_a_base_class_init() -with an argument of TypeBClass.

-

After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init() -is called to allocate the dynamic members of TypeBClass (dynamic_gstring), -and finally the GClassInitFunc() of TypeBClass, type_b_class_init(), -is called to complete the initialization process with the static members -(static_float).

-

Corresponding finalization counter parts to the GBaseInitFunc() functions -have to be provided to release allocated resources at class finalization -time.

-
-

Parameters

-
----- - - - - - - - - - - - - -

g_class

The GTypeClass structure to initialize.

[type GObject.TypeClass]

class_data

The class_data -member supplied via the GTypeInfo structure.

 
-
-
-
-
-

GClassFinalizeFunc ()

-
void
-(*GClassFinalizeFunc) (gpointer g_class,
-                       gpointer class_data);
-

A callback function used by the type system to finalize a class. -This function is rarely needed, as dynamically allocated class resources -should be handled by GBaseInitFunc() and GBaseFinalizeFunc(). -Also, specification of a GClassFinalizeFunc() in the GTypeInfo -structure of a static type is invalid, because classes of static types -will never be finalized (they are artificially kept alive when their -reference count drops to zero).

-
-

Parameters

-
----- - - - - - - - - - - - - -

g_class

The GTypeClass structure to finalize.

[type GObject.TypeClass]

class_data

The class_data -member supplied via the GTypeInfo structure

 
-
-
-
-
-

GInstanceInitFunc ()

-
void
-(*GInstanceInitFunc) (GTypeInstance *instance,
-                      gpointer g_class);
-

A callback function used by the type system to initialize a new -instance of a type. This function initializes all instance members and -allocates any resources required by it.

-

Initialization of a derived instance involves calling all its parent -types instance initializers, so the class member of the instance -is altered during its initialization to always point to the class that -belongs to the type the current initializer was introduced for.

-

The extended members of instance - are guaranteed to have been filled with -zeros before this function is called.

-
-

Parameters

-
----- - - - - - - - - - - - - -

instance

The instance to initialize

 

g_class

The class of the type the instance is -created for.

[type GObject.TypeClass]
-
-
-
-
-

GInterfaceInitFunc ()

-
void
-(*GInterfaceInitFunc) (gpointer g_iface,
-                       gpointer iface_data);
-

A callback function used by the type system to initialize a new -interface. This function should initialize all internal data and -allocate any resources required by the interface.

-

The members of iface_data - are guaranteed to have been filled with -zeros before this function is called.

-
-

Parameters

-
----- - - - - - - - - - - - - -

g_iface

The interface structure to initialize.

[type GObject.TypeInterface]

iface_data

The interface_data -supplied via the GInterfaceInfo structure

 
-
-
-
-
-

GInterfaceFinalizeFunc ()

-
void
-(*GInterfaceFinalizeFunc) (gpointer g_iface,
-                           gpointer iface_data);
-

A callback function used by the type system to finalize an interface. -This function should destroy any internal data and release any resources -allocated by the corresponding GInterfaceInitFunc() function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

g_iface

The interface structure to finalize.

[type GObject.TypeInterface]

iface_data

The interface_data -supplied via the GInterfaceInfo structure

 
-
-
-
-
-

GTypeClassCacheFunc ()

-
gboolean
-(*GTypeClassCacheFunc) (gpointer cache_data,
-                        GTypeClass *g_class);
-

A callback function which is called when the reference count of a class -drops to zero. It may use g_type_class_ref() to prevent the class from -being freed. You should not call g_type_class_unref() from a -GTypeClassCacheFunc function to prevent infinite recursion, use -g_type_class_unref_uncached() instead.

-

The functions have to check the class id passed in to figure -whether they actually want to cache the class of this type, since all -classes are routed through the same GTypeClassCacheFunc chain.

-
-

Parameters

-
----- - - - - - - - - - - - - -

cache_data

data that was given to the g_type_add_class_cache_func() call

 

g_class

The GTypeClass structure which is -unreferenced.

[type GObject.TypeClass]
-
-
-

Returns

-

TRUE to stop further GTypeClassCacheFuncs from being -called, FALSE to continue

-
-
-
-
-

g_type_register_static ()

-
GType
-g_type_register_static (GType parent_type,
-                        const gchar *type_name,
-                        const GTypeInfo *info,
-                        GTypeFlags flags);
-

Registers type_name - as the name of a new static type derived from -parent_type -. The type system uses the information contained in the -GTypeInfo structure pointed to by info - to manage the type and its -instances (if not abstract). The value of flags - determines the nature -(e.g. abstract or not) of the type.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

parent_type

type from which this type will be derived

 

type_name

0-terminated string used as the name of the new type

 

info

GTypeInfo structure for this type

 

flags

bitwise combination of GTypeFlags values

 
-
-
-

Returns

-

the new type identifier

-
-
-
-
-

g_type_register_static_simple ()

-
GType
-g_type_register_static_simple (GType parent_type,
-                               const gchar *type_name,
-                               guint class_size,
-                               GClassInitFunc class_init,
-                               guint instance_size,
-                               GInstanceInitFunc instance_init,
-                               GTypeFlags flags);
-

Registers type_name - as the name of a new static type derived from -parent_type -. The value of flags - determines the nature (e.g. -abstract or not) of the type. It works by filling a GTypeInfo -struct and calling g_type_register_static().

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

parent_type

type from which this type will be derived

 

type_name

0-terminated string used as the name of the new type

 

class_size

size of the class structure (see GTypeInfo)

 

class_init

location of the class initialization function (see GTypeInfo)

 

instance_size

size of the instance structure (see GTypeInfo)

 

instance_init

location of the instance initialization function (see GTypeInfo)

 

flags

bitwise combination of GTypeFlags values

 
-
-
-

Returns

-

the new type identifier

-
-

Since: 2.12

-
-
-
-

g_type_register_dynamic ()

-
GType
-g_type_register_dynamic (GType parent_type,
-                         const gchar *type_name,
-                         GTypePlugin *plugin,
-                         GTypeFlags flags);
-

Registers type_name - as the name of a new dynamic type derived from -parent_type -. The type system uses the information contained in the -GTypePlugin structure pointed to by plugin - to manage the type and its -instances (if not abstract). The value of flags - determines the nature -(e.g. abstract or not) of the type.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

parent_type

type from which this type will be derived

 

type_name

0-terminated string used as the name of the new type

 

plugin

GTypePlugin structure to retrieve the GTypeInfo from

 

flags

bitwise combination of GTypeFlags values

 
-
-
-

Returns

-

the new type identifier or G_TYPE_INVALID if registration failed

-
-
-
-
-

g_type_register_fundamental ()

-
GType
-g_type_register_fundamental (GType type_id,
-                             const gchar *type_name,
-                             const GTypeInfo *info,
-                             const GTypeFundamentalInfo *finfo,
-                             GTypeFlags flags);
-

Registers type_id - as the predefined identifier and type_name - as the -name of a fundamental type. If type_id - is already registered, or a -type named type_name - is already registered, the behaviour is undefined. -The type system uses the information contained in the GTypeInfo structure -pointed to by info - and the GTypeFundamentalInfo structure pointed to by -finfo - to manage the type and its instances. The value of flags - determines -additional characteristics of the fundamental type.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

type_id

a predefined type identifier

 

type_name

0-terminated string used as the name of the new type

 

info

GTypeInfo structure for this type

 

finfo

GTypeFundamentalInfo structure for this type

 

flags

bitwise combination of GTypeFlags values

 
-
-
-

Returns

-

the predefined type identifier

-
-
-
-
-

g_type_add_interface_static ()

-
void
-g_type_add_interface_static (GType instance_type,
-                             GType interface_type,
-                             const GInterfaceInfo *info);
-

Adds the static interface_type - to instantiable_type -. -The information contained in the GInterfaceInfo structure -pointed to by info - is used to manage the relationship.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

instance_type

GType value of an instantiable type

 

interface_type

GType value of an interface type

 

info

GInterfaceInfo structure for this -(instance_type -, interface_type -) combination

 
-
-
-
-
-

g_type_add_interface_dynamic ()

-
void
-g_type_add_interface_dynamic (GType instance_type,
-                              GType interface_type,
-                              GTypePlugin *plugin);
-

Adds the dynamic interface_type - to instantiable_type -. The information -contained in the GTypePlugin structure pointed to by plugin - -is used to manage the relationship.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

instance_type

GType value of an instantiable type

 

interface_type

GType value of an interface type

 

plugin

GTypePlugin structure to retrieve the GInterfaceInfo from

 
-
-
-
-
-

g_type_interface_add_prerequisite ()

-
void
-g_type_interface_add_prerequisite (GType interface_type,
-                                   GType prerequisite_type);
-

Adds prerequisite_type - to the list of prerequisites of interface_type -. -This means that any type implementing interface_type - must also implement -prerequisite_type -. Prerequisites can be thought of as an alternative to -interface derivation (which GType doesn't support). An interface can have -at most one instantiatable prerequisite type.

-
-

Parameters

-
----- - - - - - - - - - - - - -

interface_type

GType value of an interface type

 

prerequisite_type

GType value of an interface or instantiatable type

 
-
-
-
-
-

g_type_get_plugin ()

-
GTypePlugin *
-g_type_get_plugin (GType type);
-

Returns the GTypePlugin structure for type -.

-
-

Parameters

-
----- - - - - - -

type

GType to retrieve the plugin for

 
-
-
-

Returns

-

the corresponding plugin -if type -is a dynamic type, NULL otherwise.

-

[transfer none]

-
-
-
-
-

g_type_interface_get_plugin ()

-
GTypePlugin *
-g_type_interface_get_plugin (GType instance_type,
-                             GType interface_type);
-

Returns the GTypePlugin structure for the dynamic interface -interface_type - which has been added to instance_type -, or NULL -if interface_type - has not been added to instance_type - or does -not have a GTypePlugin structure. See g_type_add_interface_dynamic().

-
-

Parameters

-
----- - - - - - - - - - - - - -

instance_type

GType of an instantiatable type

 

interface_type

GType of an interface type

 
-
-
-

Returns

-

the GTypePlugin for the dynamic -interface interface_type -of instance_type -.

-

[transfer none]

-
-
-
-
-

g_type_fundamental_next ()

-
GType
-g_type_fundamental_next (void);
-

Returns the next free fundamental type id which can be used to -register a new fundamental type with g_type_register_fundamental(). -The returned type ID represents the highest currently registered -fundamental type identifier.

-
-

Returns

-

the next available fundamental type ID to be registered, -or 0 if the type system ran out of fundamental type IDs

-
-
-
-
-

g_type_fundamental ()

-
GType
-g_type_fundamental (GType type_id);
-

Internal function, used to extract the fundamental type ID portion. -Use G_TYPE_FUNDAMENTAL() instead.

-
-

Parameters

-
----- - - - - - -

type_id

valid type ID

 
-
-
-

Returns

-

fundamental type ID

-
-
-
-
-

g_type_create_instance ()

-
GTypeInstance *
-g_type_create_instance (GType type);
-

Creates and initializes an instance of type - if type - is valid and -can be instantiated. The type system only performs basic allocation -and structure setups for instances: actual instance creation should -happen through functions supplied by the type's fundamental type -implementation. So use of g_type_create_instance() is reserved for -implementators of fundamental types only. E.g. instances of the -GObject hierarchy should be created via g_object_new() and never -directly through g_type_create_instance() which doesn't handle things -like singleton objects or object construction.

-

The extended members of the returned instance are guaranteed to be filled -with zeros.

-

Note: Do not use this function, unless you're implementing a -fundamental type. Also language bindings should not use this -function, but g_object_new() instead.

-

[skip]

-
-

Parameters

-
----- - - - - - -

type

an instantiatable type to create an instance for

 
-
-
-

Returns

-

an allocated and initialized instance, subject to further -treatment by the fundamental type implementation

-
-
-
-
-

g_type_free_instance ()

-
void
-g_type_free_instance (GTypeInstance *instance);
-

Frees an instance of a type, returning it to the instance pool for -the type, if there is one.

-

Like g_type_create_instance(), this function is reserved for -implementors of fundamental types.

-
-

Parameters

-
----- - - - - - -

instance

an instance of a type

 
-
-
-
-
-

g_type_add_class_cache_func ()

-
void
-g_type_add_class_cache_func (gpointer cache_data,
-                             GTypeClassCacheFunc cache_func);
-

Adds a GTypeClassCacheFunc to be called before the reference count of a -class goes from one to zero. This can be used to prevent premature class -destruction. All installed GTypeClassCacheFunc functions will be chained -until one of them returns TRUE. The functions have to check the class id -passed in to figure whether they actually want to cache the class of this -type, since all classes are routed through the same GTypeClassCacheFunc -chain.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

cache_data

data to be passed to cache_func -

 

cache_func

a GTypeClassCacheFunc

 
-
-
-
-
-

g_type_remove_class_cache_func ()

-
void
-g_type_remove_class_cache_func (gpointer cache_data,
-                                GTypeClassCacheFunc cache_func);
-

Removes a previously installed GTypeClassCacheFunc. The cache -maintained by cache_func - has to be empty when calling -g_type_remove_class_cache_func() to avoid leaks.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

cache_data

data that was given when adding cache_func -

 

cache_func

a GTypeClassCacheFunc

 
-
-
-
-
-

g_type_class_unref_uncached ()

-
void
-g_type_class_unref_uncached (gpointer g_class);
-

A variant of g_type_class_unref() for use in GTypeClassCacheFunc -implementations. It unreferences a class without consulting the chain -of GTypeClassCacheFuncs, avoiding the recursion which would occur -otherwise.

-

[skip]

-
-

Parameters

-
----- - - - - - -

g_class

a GTypeClass structure to unref.

[type GObject.TypeClass]
-
-
-
-
-

g_type_add_interface_check ()

-
void
-g_type_add_interface_check (gpointer check_data,
-                            GTypeInterfaceCheckFunc check_func);
-

Adds a function to be called after an interface vtable is -initialized for any class (i.e. after the interface_init - -member of GInterfaceInfo has been called).

-

This function is useful when you want to check an invariant -that depends on the interfaces of a class. For instance, the -implementation of GObject uses this facility to check that an -object implements all of the properties that are defined on its -interfaces.

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

check_data

data to pass to check_func -

 

check_func

function to be called after each interface -is initialized

 
-
-

Since: 2.4

-
-
-
-

g_type_remove_interface_check ()

-
void
-g_type_remove_interface_check (gpointer check_data,
-                               GTypeInterfaceCheckFunc check_func);
-

Removes an interface check function added with -g_type_add_interface_check().

-

[skip]

-
-

Parameters

-
----- - - - - - - - - - - - - -

check_data

callback data passed to g_type_add_interface_check()

 

check_func

callback function passed to g_type_add_interface_check()

 
-
-

Since: 2.4

-
-
-
-

GTypeInterfaceCheckFunc ()

-
void
-(*GTypeInterfaceCheckFunc) (gpointer check_data,
-                            gpointer g_iface);
-

A callback called after an interface vtable is initialized. -See g_type_add_interface_check().

-
-

Parameters

-
----- - - - - - - - - - - - - -

check_data

data passed to g_type_add_interface_check()

 

g_iface

the interface that has been -initialized.

[type GObject.TypeInterface]
-
-

Since: 2.4

-
-
-
-

g_type_value_table_peek ()

-
GTypeValueTable *
-g_type_value_table_peek (GType type);
-

Returns the location of the GTypeValueTable associated with type -.

-

Note that this function should only be used from source code -that implements or has internal knowledge of the implementation of -type -.

-

[skip]

-
-

Parameters

-
----- - - - - - -

type

a GType

 
-
-
-

Returns

-

location of the GTypeValueTable associated with type -or -NULL if there is no GTypeValueTable associated with type -

-
-
-
-
-

g_type_ensure ()

-
void
-g_type_ensure (GType type);
-

Ensures that the indicated type - has been registered with the -type system, and its _class_init() method has been run.

-

In theory, simply calling the type's _get_type() method (or using -the corresponding macro) is supposed take care of this. However, -_get_type() methods are often marked G_GNUC_CONST for performance -reasons, even though this is technically incorrect (since -G_GNUC_CONST requires that the function not have side effects, -which _get_type() methods do on the first call). As a result, if -you write a bare call to a _get_type() macro, it may get optimized -out by the compiler. Using g_type_ensure() guarantees that the -type's _get_type() method is called.

-
-

Parameters

-
----- - - - - - -

type

a GType

 
-
-

Since: 2.34

-
-
-
-

g_type_get_type_registration_serial ()

-
guint
-g_type_get_type_registration_serial (void);
-

Returns an opaque serial number that represents the state of the set -of registered types. Any time a type is registered this serial changes, -which means you can cache information based on type lookups (such as -g_type_from_name()) and know if the cache is still valid at a later -time by comparing the current serial with the one at the type lookup.

-
-

Returns

-

An unsigned int, representing the state of type registrations

-
-

Since: 2.36

-
-
-
-

g_type_get_instance_count ()

-
int
-g_type_get_instance_count (GType type);
-

Returns the number of instances allocated of the particular type; -this is only available if GLib is built with debugging support and -the instance_count debug flag is set (by setting the GOBJECT_DEBUG -variable to include instance-count).

-
-

Parameters

-
----- - - - - - -

type

a GType

 
-
-
-

Returns

-

the number of instances allocated of the given type; -if instance counts are not available, returns 0.

-
-

Since: 2.44

-
-
-
-

G_DECLARE_FINAL_TYPE()

-
#define             G_DECLARE_FINAL_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName)
-

A convenience macro for emitting the usual declarations in the header file for a type which is not (at the -present time) intended to be subclassed.

-

You might use it in a header as follows:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
#ifndef _myapp_window_h_
-#define _myapp_window_h_
-
-#include <gtk/gtk.h>
-
-#define MY_APP_TYPE_WINDOW my_app_window_get_type ()
-G_DECLARE_FINAL_TYPE (MyAppWindow, my_app_window, MY_APP, WINDOW, GtkWindow)
-
-MyAppWindow *    my_app_window_new    (void);
-
-...
-
-#endif
-
- -

-

This results in the following things happening:

-
    -
  • the usual my_app_window_get_type() function is declared with a return type of GType

  • -
  • the MyAppWindow types is defined as a typedef of struct _MyAppWindow. The struct itself is not -defined and should be defined from the .c file before G_DEFINE_TYPE() is used.

  • -
  • the MY_APP_WINDOW() cast is emitted as static inline function along with the MY_APP_IS_WINDOW() type -checking function

  • -
  • the MyAppWindowClass type is defined as a struct containing GtkWindowClass. This is done for the -convenience of the person defining the type and should not be considered to be part of the ABI. In -particular, without a firm declaration of the instance structure, it is not possible to subclass the type -and therefore the fact that the size of the class structure is exposed is not a concern and it can be -freely changed at any point in the future.

  • -
  • g_autoptr() support being added for your type, based on the type of your parent class

  • -
-

You can only use this function if your parent type also supports g_autoptr().

-

Because the type macro (MY_APP_TYPE_WINDOW in the above example) is not a callable, you must continue to -manually define this as a macro for yourself.

-

The declaration of the _get_type() function is the first thing emitted by the macro. This allows this macro -to be used in the usual way with export control and API versioning macros.

-

If you want to declare your own class structure, use G_DECLARE_DERIVABLE_TYPE().

-

If you are writing a library, it is important to note that it is possible to convert a type from using -G_DECLARE_FINAL_TYPE() to G_DECLARE_DERIVABLE_TYPE() without breaking API or ABI. As a precaution, you -should therefore use G_DECLARE_FINAL_TYPE() until you are sure that it makes sense for your class to be -subclassed. Once a class structure has been exposed it is not possible to change its size or remove or -reorder items without breaking the API and/or ABI.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

ModuleObjName

The name of the new type, in camel case (like GtkWidget)

 

module_obj_name

The name of the new type in lowercase, with words -separated by '_' (like 'gtk_widget')

 

MODULE

The name of the module, in all caps (like 'GTK')

 

OBJ_NAME

The bare name of the type, in all caps (like 'WIDGET')

 

ParentName

the name of the parent type, in camel case (like GtkWidget)

 
-
-

Since: 2.44

-
-
-
-

G_DECLARE_DERIVABLE_TYPE()

-
#define             G_DECLARE_DERIVABLE_TYPE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, ParentName)
-

A convenience macro for emitting the usual declarations in the header file for a type which will is intended -to be subclassed.

-

You might use it in a header as follows:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
#ifndef _gtk_frobber_h_
-#define _gtk_frobber_h_
-
-#define GTK_TYPE_FROBBER gtk_frobber_get_type ()
-GDK_AVAILABLE_IN_3_12
-G_DECLARE_DERIVABLE_TYPE (GtkFrobber, gtk_frobber, GTK, FROBBER, GtkWidget)
-
-struct _GtkFrobberClass
-{
-  GtkWidgetClass parent_class;
-
-  void (* handle_frob)  (GtkFrobber *frobber,
-                         guint       n_frobs);
-
-  gpointer padding[12];
-};
-
-GtkWidget *    gtk_frobber_new   (void);
-
-...
-
-#endif
-
- -

-

This results in the following things happening:

-
    -
  • the usual gtk_frobber_get_type() function is declared with a return type of GType

  • -
  • the GtkFrobber struct is created with GtkWidget as the first and only item. You are expected to use -a private structure from your .c file to store your instance variables.

  • -
  • the GtkFrobberClass type is defined as a typedef to struct _GtkFrobberClass, which is left undefined. -You should do this from the header file directly after you use the macro.

  • -
  • the GTK_FROBBER() and GTK_FROBBER_CLASS() casts are emitted as static inline functions along with -the GTK_IS_FROBBER() and GTK_IS_FROBBER_CLASS() type checking functions and GTK_FROBBER_GET_CLASS() -function.

  • -
  • g_autoptr() support being added for your type, based on the type of your parent class

  • -
-

You can only use this function if your parent type also supports g_autoptr().

-

Because the type macro (GTK_TYPE_FROBBER in the above example) is not a callable, you must continue to -manually define this as a macro for yourself.

-

The declaration of the _get_type() function is the first thing emitted by the macro. This allows this macro -to be used in the usual way with export control and API versioning macros.

-

If you are writing a library, it is important to note that it is possible to convert a type from using -G_DECLARE_FINAL_TYPE() to G_DECLARE_DERIVABLE_TYPE() without breaking API or ABI. As a precaution, you -should therefore use G_DECLARE_FINAL_TYPE() until you are sure that it makes sense for your class to be -subclassed. Once a class structure has been exposed it is not possible to change its size or remove or -reorder items without breaking the API and/or ABI. If you want to declare your own class structure, use -G_DECLARE_DERIVABLE_TYPE(). If you want to declare a class without exposing the class or instance -structures, use G_DECLARE_FINAL_TYPE().

-

If you must use G_DECLARE_DERIVABLE_TYPE() you should be sure to include some padding at the bottom of your -class structure to leave space for the addition of future virtual functions.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

ModuleObjName

The name of the new type, in camel case (like GtkWidget)

 

module_obj_name

The name of the new type in lowercase, with words -separated by '_' (like 'gtk_widget')

 

MODULE

The name of the module, in all caps (like 'GTK')

 

OBJ_NAME

The bare name of the type, in all caps (like 'WIDGET')

 

ParentName

the name of the parent type, in camel case (like GtkWidget)

 
-
-

Since: 2.44

-
-
-
-

G_DECLARE_INTERFACE()

-
#define             G_DECLARE_INTERFACE(ModuleObjName, module_obj_name, MODULE, OBJ_NAME, PrerequisiteName)
-

A convenience macro for emitting the usual declarations in the header file for a GInterface type.

-

You might use it in a header as follows:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
#ifndef _my_model_h_
-#define _my_model_h_
-
-#define MY_TYPE_MODEL my_model_get_type ()
-GDK_AVAILABLE_IN_3_12
-G_DECLARE_INTERFACE (MyModel, my_model, MY, MODEL, GObject)
-
-struct _MyModelInterface
-{
-  GTypeInterface g_iface;
-
-  gpointer (* get_item)  (MyModel *model);
-};
-
-gpointer my_model_get_item (MyModel *model);
-
-...
-
-#endif
-
- -

-

This results in the following things happening:

-
    -
  • the usual my_model_get_type() function is declared with a return type of GType

  • -
  • the MyModelInterface type is defined as a typedef to struct _MyModelInterface, -which is left undefined. You should do this from the header file directly after -you use the macro.

  • -
  • the MY_MODEL() cast is emitted as static inline functions along with -the MY_IS_MODEL() type checking function and MY_MODEL_GET_IFACE() function.

  • -
  • g_autoptr() support being added for your type, based on your prerequisite type.

  • -
-

You can only use this function if your prerequisite type also supports g_autoptr().

-

Because the type macro (MY_TYPE_MODEL in the above example) is not a callable, you must continue to -manually define this as a macro for yourself.

-

The declaration of the _get_type() function is the first thing emitted by the macro. This allows this macro -to be used in the usual way with export control and API versioning macros.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

ModuleObjName

The name of the new type, in camel case (like GtkWidget)

 

module_obj_name

The name of the new type in lowercase, with words -separated by '_' (like 'gtk_widget')

 

MODULE

The name of the module, in all caps (like 'GTK')

 

OBJ_NAME

The bare name of the type, in all caps (like 'WIDGET')

 

PrerequisiteName

the name of the prerequisite type, in camel case (like GtkWidget)

 
-
-

Since: 2.44

-
-
-
-

G_DEFINE_TYPE()

-
#define G_DEFINE_TYPE(TN, t_n, T_P)			    G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
-
-

A convenience macro for type implementations, which declares a class -initialization function, an instance initialization function (see GTypeInfo -for information about these) and a static variable named t_n_parent_class -pointing to the parent class. Furthermore, it defines a *_get_type() function. -See G_DEFINE_TYPE_EXTENDED() for an example.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

TN

The name of the new type, in Camel case.

 

t_n

The name of the new type, in lowercase, with words -separated by '_'.

 

T_P

The GType of the parent type.

 
-
-

Since: 2.4

-
-
-
-

G_DEFINE_TYPE_WITH_PRIVATE()

-
#define G_DEFINE_TYPE_WITH_PRIVATE(TN, t_n, T_P)            G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, G_ADD_PRIVATE (TN))
-
-

A convenience macro for type implementations, which declares a class -initialization function, an instance initialization function (see GTypeInfo -for information about these), a static variable named t_n_parent_class -pointing to the parent class, and adds private instance data to the type. -Furthermore, it defines a *_get_type() function. See G_DEFINE_TYPE_EXTENDED() -for an example.

-

Note that private structs added with this macros must have a struct -name of the form TN - Private.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

TN

The name of the new type, in Camel case.

 

t_n

The name of the new type, in lowercase, with words -separated by '_'.

 

T_P

The GType of the parent type.

 
-
-

Since: 2.38

-
-
-
-

G_DEFINE_TYPE_WITH_CODE()

-
#define G_DEFINE_TYPE_WITH_CODE(TN, t_n, T_P, _C_)	    _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, 0) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
-
-

A convenience macro for type implementations. -Similar to G_DEFINE_TYPE(), but allows you to insert custom code into the -*_get_type() function, e.g. interface implementations via G_IMPLEMENT_INTERFACE(). -See G_DEFINE_TYPE_EXTENDED() for an example.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

TN

The name of the new type, in Camel case.

 

t_n

The name of the new type in lowercase, with words separated by '_'.

 

T_P

The GType of the parent type.

 

_C_

Custom code that gets inserted in the *_get_type() function.

 
-
-

Since: 2.4

-
-
-
-

G_DEFINE_ABSTRACT_TYPE()

-
#define G_DEFINE_ABSTRACT_TYPE(TN, t_n, T_P)		    G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, {})
-
-

A convenience macro for type implementations. -Similar to G_DEFINE_TYPE(), but defines an abstract type. -See G_DEFINE_TYPE_EXTENDED() for an example.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

TN

The name of the new type, in Camel case.

 

t_n

The name of the new type, in lowercase, with words -separated by '_'.

 

T_P

The GType of the parent type.

 
-
-

Since: 2.4

-
-
-
-

G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE()

-
#define G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE(TN, t_n, T_P)   G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT, G_ADD_PRIVATE (TN))
-
-

Similar to G_DEFINE_TYPE_WITH_PRIVATE(), but defines an abstract type. -See G_DEFINE_TYPE_EXTENDED() for an example.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

TN

The name of the new type, in Camel case.

 

t_n

The name of the new type, in lowercase, with words -separated by '_'.

 

T_P

The GType of the parent type.

 
-
-

Since: 2.38

-
-
-
-

G_DEFINE_ABSTRACT_TYPE_WITH_CODE()

-
#define G_DEFINE_ABSTRACT_TYPE_WITH_CODE(TN, t_n, T_P, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, G_TYPE_FLAG_ABSTRACT) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
-
-

A convenience macro for type implementations. -Similar to G_DEFINE_TYPE_WITH_CODE(), but defines an abstract type and -allows you to insert custom code into the *_get_type() function, e.g. -interface implementations via G_IMPLEMENT_INTERFACE(). -See G_DEFINE_TYPE_EXTENDED() for an example.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

TN

The name of the new type, in Camel case.

 

t_n

The name of the new type, in lowercase, with words -separated by '_'.

 

T_P

The GType of the parent type.

 

_C_

Custom code that gets inserted in the type_name_get_type() -function.

 
-
-

Since: 2.4

-
-
-
-

G_ADD_PRIVATE()

-
#define             G_ADD_PRIVATE(TypeName)
-

A convenience macro to ease adding private data to instances of a new type -in the _C_ - section of G_DEFINE_TYPE_WITH_CODE() or -G_DEFINE_ABSTRACT_TYPE_WITH_CODE().

-

For instance:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
typedef struct _MyObject MyObject;
-typedef struct _MyObjectClass MyObjectClass;
-
-typedef struct {
-  gint foo;
-  gint bar;
-} MyObjectPrivate;
-
-G_DEFINE_TYPE_WITH_CODE (MyObject, my_object, G_TYPE_OBJECT,
-                         G_ADD_PRIVATE (MyObject))
-
- -

-

Will add MyObjectPrivate as the private data to any instance of the MyObject -type.

-

G_DEFINE_TYPE_* macros will automatically create a private function -based on the arguments to this macro, which can be used to safely -retrieve the private data from an instance of the type; for instance:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
gint
-my_object_get_foo (MyObject *obj)
-{
-  MyObjectPrivate *priv = my_object_get_instance_private (obj);
-
-  g_return_val_if_fail (MY_IS_OBJECT (obj), 0);
-
-  return priv->foo;
-}
-
-void
-my_object_set_bar (MyObject *obj,
-                   gint      bar)
-{
-  MyObjectPrivate *priv = my_object_get_instance_private (obj);
-
-  g_return_if_fail (MY_IS_OBJECT (obj));
-
-  if (priv->bar != bar)
-    priv->bar = bar;
-}
-
- -

-

Note that this macro can only be used together with the G_DEFINE_TYPE_* -macros, since it depends on variable names from those macros.

-

Also note that private structs added with these macros must have a struct -name of the form TypeNamePrivate.

-

It is safe to call _get_instance_private on NULL or invalid object since -it's only adding an offset to the instance pointer. In that case the returned -pointer must not be dereferenced.

-
-

Parameters

-
----- - - - - - -

TypeName

the name of the type in CamelCase

 
-
-

Since: 2.38

-
-
-
-

G_PRIVATE_OFFSET()

-
#define             G_PRIVATE_OFFSET(TypeName, field)
-

Evaluates to the offset of the field - inside the instance private data -structure for TypeName -.

-

Note that this macro can only be used together with the G_DEFINE_TYPE_* -and G_ADD_PRIVATE() macros, since it depends on variable names from -those macros.

-
-

Parameters

-
----- - - - - - - - - - - - - -

TypeName

the name of the type in CamelCase

 

field

the name of the field in the private data structure

 
-
-

Since: 2.38

-
-
-
-

G_PRIVATE_FIELD()

-
#define             G_PRIVATE_FIELD(TypeName, inst, field_type, field_name)
-

Evaluates to the field_name - inside the inst - private data -structure for TypeName -.

-

Note that this macro can only be used together with the G_DEFINE_TYPE_* -and G_ADD_PRIVATE() macros, since it depends on variable names from -those macros.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

TypeName

the name of the type in CamelCase

 

inst

the instance of TypeName -you wish to access

 

field_type

the type of the field in the private data structure

 

field_name

the name of the field in the private data structure

 
-
-

Since: 2.38

-
-
-
-

G_PRIVATE_FIELD_P()

-
#define             G_PRIVATE_FIELD_P(TypeName, inst, field_name)
-

Evaluates to a pointer to the field_name - inside the inst - private data -structure for TypeName -.

-

Note that this macro can only be used together with the G_DEFINE_TYPE_* -and G_ADD_PRIVATE() macros, since it depends on variable names from -those macros.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

TypeName

the name of the type in CamelCase

 

inst

the instance of TypeName -you wish to access

 

field_name

the name of the field in the private data structure

 
-
-

Since: 2.38

-
-
-
-

G_DEFINE_INTERFACE()

-
#define G_DEFINE_INTERFACE(TN, t_n, T_P)		    G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, ;)
-
-

A convenience macro for GTypeInterface definitions, which declares -a default vtable initialization function and defines a *_get_type() -function.

-

The macro expects the interface initialization function to have the -name t_n ## _default_init, and the interface structure to have the -name TN ## Interface.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

TN

The name of the new type, in Camel case.

 

t_n

The name of the new type, in lowercase, with words separated by '_'.

 

T_P

The GType of the prerequisite type for the interface, or 0 -(G_TYPE_INVALID) for no prerequisite type.

 
-
-

Since: 2.24

-
-
-
-

G_DEFINE_INTERFACE_WITH_CODE()

-
#define G_DEFINE_INTERFACE_WITH_CODE(TN, t_n, T_P, _C_)     _G_DEFINE_INTERFACE_EXTENDED_BEGIN(TN, t_n, T_P) {_C_;} _G_DEFINE_INTERFACE_EXTENDED_END()
-
-

A convenience macro for GTypeInterface definitions. Similar to -G_DEFINE_INTERFACE(), but allows you to insert custom code into the -*_get_type() function, e.g. additional interface implementations -via G_IMPLEMENT_INTERFACE(), or additional prerequisite types. See -G_DEFINE_TYPE_EXTENDED() for a similar example using -G_DEFINE_TYPE_WITH_CODE().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

TN

The name of the new type, in Camel case.

 

t_n

The name of the new type, in lowercase, with words separated by '_'.

 

T_P

The GType of the prerequisite type for the interface, or 0 -(G_TYPE_INVALID) for no prerequisite type.

 

_C_

Custom code that gets inserted in the *_get_type() function.

 
-
-

Since: 2.24

-
-
-
-

G_IMPLEMENT_INTERFACE()

-
#define             G_IMPLEMENT_INTERFACE(TYPE_IFACE, iface_init)
-

A convenience macro to ease interface addition in the _C_ section -of G_DEFINE_TYPE_WITH_CODE() or G_DEFINE_ABSTRACT_TYPE_WITH_CODE(). -See G_DEFINE_TYPE_EXTENDED() for an example.

-

Note that this macro can only be used together with the G_DEFINE_TYPE_* -macros, since it depends on variable names from those macros.

-
-

Parameters

-
----- - - - - - - - - - - - - -

TYPE_IFACE

The GType of the interface to add

 

iface_init

The interface init function

 
-
-

Since: 2.4

-
-
-
-

G_DEFINE_TYPE_EXTENDED()

-
#define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, _f_, _C_)	    _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, _f_) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
-
-

The most general convenience macro for type implementations, on which -G_DEFINE_TYPE(), etc are based.

-
- - - - - - - -
1
-2
-3
-4
-5
-6
G_DEFINE_TYPE_EXTENDED (GtkGadget,
-                        gtk_gadget,
-                        GTK_TYPE_WIDGET,
-                        0,
-                        G_IMPLEMENT_INTERFACE (TYPE_GIZMO,
-                                               gtk_gadget_gizmo_init));
-
- -

-expands to

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
static void     gtk_gadget_init       (GtkGadget      *self);
-static void     gtk_gadget_class_init (GtkGadgetClass *klass);
-static gpointer gtk_gadget_parent_class = NULL;
-static void     gtk_gadget_class_intern_init (gpointer klass)
-{
-  gtk_gadget_parent_class = g_type_class_peek_parent (klass);
-  gtk_gadget_class_init ((GtkGadgetClass*) klass);
-}
-
-GType
-gtk_gadget_get_type (void)
-{
-  static volatile gsize g_define_type_id__volatile = 0;
-  if (g_once_init_enter (&g_define_type_id__volatile))
-    {
-      GType g_define_type_id =
-        g_type_register_static_simple (GTK_TYPE_WIDGET,
-                                       g_intern_static_string ("GtkGadget"),
-                                       sizeof (GtkGadgetClass),
-                                       (GClassInitFunc) gtk_gadget_class_intern_init,
-                                       sizeof (GtkGadget),
-                                       (GInstanceInitFunc) gtk_gadget_init,
-                                       0);
-      {
-        const GInterfaceInfo g_implement_interface_info = {
-          (GInterfaceInitFunc) gtk_gadget_gizmo_init
-        };
-        g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
-      }
-      g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
-    }
-  return g_define_type_id__volatile;
-}
-
- -

-The only pieces which have to be manually provided are the definitions of -the instance and class structure and the definitions of the instance and -class init functions.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

TN

The name of the new type, in Camel case.

 

t_n

The name of the new type, in lowercase, with words -separated by '_'.

 

T_P

The GType of the parent type.

 

_f_

GTypeFlags to pass to g_type_register_static()

 

_C_

Custom code that gets inserted in the *_get_type() function.

 
-
-

Since: 2.4

-
-
-
-

G_DEFINE_BOXED_TYPE()

-
#define G_DEFINE_BOXED_TYPE(TypeName, type_name, copy_func, free_func) G_DEFINE_BOXED_TYPE_WITH_CODE (TypeName, type_name, copy_func, free_func, {})
-
-

A convenience macro for boxed type implementations, which defines a -type_name_get_type() function registering the boxed type.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

TypeName

The name of the new type, in Camel case

 

type_name

The name of the new type, in lowercase, with words -separated by '_'

 

copy_func

the GBoxedCopyFunc for the new type

 

free_func

the GBoxedFreeFunc for the new type

 
-
-

Since: 2.26

-
-
-
-

G_DEFINE_BOXED_TYPE_WITH_CODE()

-
#define G_DEFINE_BOXED_TYPE_WITH_CODE(TypeName, type_name, copy_func, free_func, _C_) _G_DEFINE_BOXED_TYPE_BEGIN (TypeName, type_name, copy_func, free_func) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
-
-

A convenience macro for boxed type implementations. -Similar to G_DEFINE_BOXED_TYPE(), but allows to insert custom code into the -type_name_get_type() function, e.g. to register value transformations with -g_value_register_transform_func(), for instance:

-
- - - - - - - -
1
-2
-3
-4
G_DEFINE_BOXED_TYPE_WITH_CODE (GdkRectangle, gdk_rectangle,
-                               gdk_rectangle_copy,
-                               gdk_rectangle_free,
-                               register_rectangle_transform_funcs (g_define_type_id))
-
- -

-

Similarly to the G_DEFINE_TYPE family of macros, the GType of the newly -defined boxed type is exposed in the g_define_type_id variable.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

TypeName

The name of the new type, in Camel case

 

type_name

The name of the new type, in lowercase, with words -separated by '_'

 

copy_func

the GBoxedCopyFunc for the new type

 

free_func

the GBoxedFreeFunc for the new type

 

_C_

Custom code that gets inserted in the *_get_type() function

 
-
-

Since: 2.26

-
-
-
-

G_DEFINE_POINTER_TYPE()

-
#define G_DEFINE_POINTER_TYPE(TypeName, type_name) G_DEFINE_POINTER_TYPE_WITH_CODE (TypeName, type_name, {})
-
-

A convenience macro for pointer type implementations, which defines a -type_name_get_type() function registering the pointer type.

-
-

Parameters

-
----- - - - - - - - - - - - - -

TypeName

The name of the new type, in Camel case

 

type_name

The name of the new type, in lowercase, with words -separated by '_'

 
-
-

Since: 2.26

-
-
-
-

G_DEFINE_POINTER_TYPE_WITH_CODE()

-
#define G_DEFINE_POINTER_TYPE_WITH_CODE(TypeName, type_name, _C_) _G_DEFINE_POINTER_TYPE_BEGIN (TypeName, type_name) {_C_;} _G_DEFINE_TYPE_EXTENDED_END()
-
-

A convenience macro for pointer type implementations. -Similar to G_DEFINE_POINTER_TYPE(), but allows to insert -custom code into the type_name_get_type() function.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

TypeName

The name of the new type, in Camel case

 

type_name

The name of the new type, in lowercase, with words -separated by '_'

 

_C_

Custom code that gets inserted in the *_get_type() function

 
-
-

Since: 2.26

-
-
-
-

Types and Values

-
-

GType

-

A numerical value which represents the unique identifier of a registered -type.

-
-
-
-

G_TYPE_FUNDAMENTAL_MAX

-
#define G_TYPE_FUNDAMENTAL_MAX		(255 << G_TYPE_FUNDAMENTAL_SHIFT)
-
-

An integer constant that represents the number of identifiers reserved -for types that are assigned at compile-time.

-
-
-
-

struct GTypeInterface

-
struct GTypeInterface {
-};
-
-

An opaque structure used as the base of all interface types.

-
-
-
-

struct GTypeInstance

-
struct GTypeInstance {
-};
-
-

An opaque structure used as the base of all type instances.

-
-
-
-

struct GTypeClass

-
struct GTypeClass {
-};
-
-

An opaque structure used as the base of all classes.

-
-
-
-

struct GTypeInfo

-
struct GTypeInfo {
-  /* interface types, classed types, instantiated types */
-  guint16                class_size;
-  
-  GBaseInitFunc          base_init;
-  GBaseFinalizeFunc      base_finalize;
-  
-  /* interface types, classed types, instantiated types */
-  GClassInitFunc         class_init;
-  GClassFinalizeFunc     class_finalize;
-  gconstpointer          class_data;
-  
-  /* instantiated types */
-  guint16                instance_size;
-  guint16                n_preallocs;
-  GInstanceInitFunc      instance_init;
-  
-  /* value handling */
-  const GTypeValueTable *value_table;
-};
-
-

This structure is used to provide the type system with the information -required to initialize and destruct (finalize) a type's class and -its instances.

-

The initialized structure is passed to the g_type_register_static() function -(or is copied into the provided GTypeInfo structure in the -g_type_plugin_complete_type_info()). The type system will perform a deep -copy of this structure, so its memory does not need to be persistent -across invocation of g_type_register_static().

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

guint16 class_size;

Size of the class structure (required for interface, classed and instantiatable types)

 

GBaseInitFunc base_init;

Location of the base initialization function (optional)

 

GBaseFinalizeFunc base_finalize;

Location of the base finalization function (optional)

 

GClassInitFunc class_init;

Location of the class initialization function for -classed and instantiatable types. Location of the default vtable -inititalization function for interface types. (optional) This function -is used both to fill in virtual functions in the class or default vtable, -and to do type-specific setup such as registering signals and object -properties.

 

GClassFinalizeFunc class_finalize;

Location of the class finalization function for -classed and instantiatable types. Location of the default vtable -finalization function for interface types. (optional)

 

gconstpointer class_data;

User-supplied data passed to the class init/finalize functions

 

guint16 instance_size;

Size of the instance (object) structure (required for instantiatable types only)

 

guint16 n_preallocs;

Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the slice allocator now.

 

GInstanceInitFunc instance_init;

Location of the instance initialization function (optional, for instantiatable types only)

 

const GTypeValueTable *value_table;

A GTypeValueTable function table for generic handling of GValues -of this type (usually only useful for fundamental types)

 
-
-
-
-
-

struct GTypeFundamentalInfo

-
struct GTypeFundamentalInfo {
-  GTypeFundamentalFlags  type_flags;
-};
-
-

A structure that provides information to the type system which is -used specifically for managing fundamental types.

-
-

Members

-
----- - - - - - -

GTypeFundamentalFlags type_flags;

GTypeFundamentalFlags describing the characteristics of the fundamental type

 
-
-
-
-
-

struct GInterfaceInfo

-
struct GInterfaceInfo {
-  GInterfaceInitFunc     interface_init;
-  GInterfaceFinalizeFunc interface_finalize;
-  gpointer               interface_data;
-};
-
-

A structure that provides information to the type system which is -used specifically for managing interface types.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - -

GInterfaceInitFunc interface_init;

location of the interface initialization function

 

GInterfaceFinalizeFunc interface_finalize;

location of the interface finalization function

 

gpointer interface_data;

user-supplied data passed to the interface init/finalize functions

 
-
-
-
-
-

struct GTypeValueTable

-
struct GTypeValueTable {
-  void     (*value_init)         (GValue       *value);
-  void     (*value_free)         (GValue       *value);
-  void     (*value_copy)         (const GValue *src_value,
-				  GValue       *dest_value);
-  /* varargs functionality (optional) */
-  gpointer (*value_peek_pointer) (const GValue *value);
-  const gchar *collect_format;
-  gchar*   (*collect_value)      (GValue       *value,
-				  guint         n_collect_values,
-				  GTypeCValue  *collect_values,
-				  guint		collect_flags);
-  const gchar *lcopy_format;
-  gchar*   (*lcopy_value)        (const GValue *value,
-				  guint         n_collect_values,
-				  GTypeCValue  *collect_values,
-				  guint		collect_flags);
-};
-
-

The GTypeValueTable provides the functions required by the GValue -implementation, to serve as a container for values of a type.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

value_init ()

-

Default initialize values -contents by poking values -directly into the value->data array. The data array of -the GValue passed into this function was zero-filled -with memset(), so no care has to be taken to free any -old contents. E.g. for the implementation of a string -value that may never be NULL, the implementation might -look like:

-
- - - - - - - -
1
value->data[0].v_pointer = g_strdup ("");
-
- -

-
 

value_free ()

-

Free any old contents that might be left in the -data array of the passed in value -. No resources may -remain allocated through the GValue contents after -this function returns. E.g. for our above string type:

-
- - - - - - - -
1
-2
-3
// only free strings without a specific flag for static storage
-if (!(value->data[1].v_uint & G_VALUE_NOCOPY_CONTENTS))
-g_free (value->data[0].v_pointer);
-
- -

-
 

value_copy ()

-

dest_value -is a GValue with zero-filled data section -and src_value -is a properly setup GValue of same or -derived type. -The purpose of this function is to copy the contents of -src_value -into dest_value -in a way, that even after -src_value -has been freed, the contents of dest_value -remain valid. String type example:

-
- - - - - - - -
1
dest_value->data[0].v_pointer = g_strdup (src_value->data[0].v_pointer);
-
- -

-
 

value_peek_pointer ()

-

If the value contents fit into a pointer, such as objects -or strings, return this pointer, so the caller can peek at -the current contents. To extend on our above string example:

-
- - - - - - - -
1
return value->data[0].v_pointer;
-
- -

-
 

const gchar *collect_format;

-

A string format describing how to collect the contents of -this value bit-by-bit. Each character in the format represents -an argument to be collected, and the characters themselves indicate -the type of the argument. Currently supported arguments are:

-
    -
  • 'i' - Integers. passed as collect_values[].v_int.

  • -
  • 'l' - Longs. passed as collect_values[].v_long.

  • -
  • 'd' - Doubles. passed as collect_values[].v_double.

  • -
  • 'p' - Pointers. passed as collect_values[].v_pointer. -It should be noted that for variable argument list construction, -ANSI C promotes every type smaller than an integer to an int, and -floats to doubles. So for collection of short int or char, 'i' -needs to be used, and for collection of floats 'd'.

  • -
-
 

collect_value ()

-

The collect_value() function is responsible for converting the -values collected from a variable argument list into contents -suitable for storage in a GValue. This function should setup -value -similar to value_init(); e.g. for a string value that -does not allow NULL pointers, it needs to either spew an error, -or do an implicit conversion by storing an empty string. -The value -passed in to this function has a zero-filled data -array, so just like for value_init() it is guaranteed to not -contain any old contents that might need freeing. -n_collect_values -is exactly the string length of collect_format -, -and collect_values -is an array of unions GTypeCValue with -length n_collect_values -, containing the collected values -according to collect_format -. -collect_flags -is an argument provided as a hint by the caller. -It may contain the flag G_VALUE_NOCOPY_CONTENTS indicating, -that the collected value contents may be considered "static" -for the duration of the value -lifetime. -Thus an extra copy of the contents stored in collect_values -is -not required for assignment to value -. -For our above string example, we continue with:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
if (!collect_values[0].v_pointer)
-value->data[0].v_pointer = g_strdup ("");
-else if (collect_flags & G_VALUE_NOCOPY_CONTENTS)
-{
-value->data[0].v_pointer = collect_values[0].v_pointer;
-// keep a flag for the value_free() implementation to not free this string
-value->data[1].v_uint = G_VALUE_NOCOPY_CONTENTS;
-}
-else
-value->data[0].v_pointer = g_strdup (collect_values[0].v_pointer);
-return NULL;
-
- -

-It should be noted, that it is generally a bad idea to follow the -G_VALUE_NOCOPY_CONTENTS hint for reference counted types. Due to -reentrancy requirements and reference count assertions performed -by the signal emission code, reference counts should always be -incremented for reference counted contents stored in the value->data -array. To deviate from our string example for a moment, and taking -a look at an exemplary implementation for collect_value() of -GObject:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
if (collect_values[0].v_pointer)
-{
-GObject *object = G_OBJECT (collect_values[0].v_pointer);
-// never honour G_VALUE_NOCOPY_CONTENTS for ref-counted types
-value->data[0].v_pointer = g_object_ref (object);
-return NULL;
-}
-else
-return g_strdup_printf ("Object passed as invalid NULL pointer");
-}
-
- -

-The reference count for valid objects is always incremented, -regardless of collect_flags -. For invalid objects, the example -returns a newly allocated string without altering value -. -Upon success, collect_value() needs to return NULL. If, however, -an error condition occurred, collect_value() may spew an -error by returning a newly allocated non-NULL string, giving -a suitable description of the error condition. -The calling code makes no assumptions about the value -contents being valid upon error returns, value -is simply thrown away without further freeing. As such, it is -a good idea to not allocate GValue contents, prior to returning -an error, however, collect_values() is not obliged to return -a correctly setup value -for error returns, simply because -any non-NULL return is considered a fatal condition so further -program behaviour is undefined.

-
 

const gchar *lcopy_format;

Format description of the arguments to collect for lcopy_value -, -analogous to collect_format -. Usually, lcopy_format -string consists -only of 'p's to provide lcopy_value() with pointers to storage locations.

 

lcopy_value ()

-

This function is responsible for storing the value -contents into -arguments passed through a variable argument list which got -collected into collect_values -according to lcopy_format -. -n_collect_values -equals the string length of lcopy_format -, -and collect_flags -may contain G_VALUE_NOCOPY_CONTENTS. -In contrast to collect_value(), lcopy_value() is obliged to -always properly support G_VALUE_NOCOPY_CONTENTS. -Similar to collect_value() the function may prematurely abort -by returning a newly allocated string describing an error condition. -To complete the string example:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
gchar **string_p = collect_values[0].v_pointer;
-if (!string_p)
-return g_strdup_printf ("string location passed as NULL");
-if (collect_flags & G_VALUE_NOCOPY_CONTENTS)
-*string_p = value->data[0].v_pointer;
-else
-*string_p = g_strdup (value->data[0].v_pointer);
-
- -

-And an illustrative version of lcopy_value() for -reference-counted types:

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
GObject **object_p = collect_values[0].v_pointer;
-if (!object_p)
-return g_strdup_printf ("object location passed as NULL");
-if (!value->data[0].v_pointer)
-*object_p = NULL;
-else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) // always honour
-*object_p = value->data[0].v_pointer;
-else
-*object_p = g_object_ref (value->data[0].v_pointer);
-return NULL;
-
- -

-
 
-
-
-
-
-

G_TYPE_FLAG_RESERVED_ID_BIT

-
#define G_TYPE_FLAG_RESERVED_ID_BIT ((GType) (1 << 0))
-
-

A bit in the type number that's supposed to be left untouched.

-
-
-
-

enum GTypeDebugFlags

-
-

GTypeDebugFlags has been deprecated since version 2.36 and should not be used in newly-written code.

-

g_type_init() is now done automatically

-
-

These flags used to be passed to g_type_init_with_debug_flags() which -is now deprecated.

-

If you need to enable debugging features, use the GOBJECT_DEBUG -environment variable.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

G_TYPE_DEBUG_NONE

-

Print no messages

-
 

G_TYPE_DEBUG_OBJECTS

-

Print messages about object bookkeeping

-
 

G_TYPE_DEBUG_SIGNALS

-

Print messages about signal emissions

-
 

G_TYPE_DEBUG_INSTANCE_COUNT

-

Keep a count of instances of each type

-
 

G_TYPE_DEBUG_MASK

-

Mask covering all debug flags

-
 
-
-
-
-
-

struct GTypeQuery

-
struct GTypeQuery {
-  GType		type;
-  const gchar  *type_name;
-  guint		class_size;
-  guint		instance_size;
-};
-
-

A structure holding information for a specific type. -It is filled in by the g_type_query() function.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

GType type;

the GType value of the type

 

const gchar *type_name;

the name of the type

 

guint class_size;

the size of the class structure

 

guint instance_size;

the size of the instance structure

 
-
-
-
-
-

enum GTypeFlags

-

Bit masks used to check or determine characteristics of a type.

-
-

Members

-
----- - - - - - - - - - - - - -

G_TYPE_FLAG_ABSTRACT

-

Indicates an abstract type. No instances can be - created for an abstract type

-
 

G_TYPE_FLAG_VALUE_ABSTRACT

-

Indicates an abstract value type, i.e. a type - that introduces a value table, but can't be used for - g_value_init()

-
 
-
-
-
-
-

enum GTypeFundamentalFlags

-

Bit masks used to check or determine specific characteristics of a -fundamental type.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - -

G_TYPE_FLAG_CLASSED

-

Indicates a classed type

-
 

G_TYPE_FLAG_INSTANTIATABLE

-

Indicates an instantiable type (implies classed)

-
 

G_TYPE_FLAG_DERIVABLE

-

Indicates a flat derivable type

-
 

G_TYPE_FLAG_DEEP_DERIVABLE

-

Indicates a deep derivable type (implies derivable)

-
 
-
-
-
-
-

G_TYPE_INVALID

-
#define G_TYPE_INVALID			G_TYPE_MAKE_FUNDAMENTAL (0)
-
-

An invalid GType used as error return value in some functions which return -a GType.

-
-
-
-

G_TYPE_NONE

-
#define G_TYPE_NONE			G_TYPE_MAKE_FUNDAMENTAL (1)
-
-

A fundamental type which is used as a replacement for the C -void return type.

-
-
-
-

G_TYPE_INTERFACE

-
#define G_TYPE_INTERFACE		G_TYPE_MAKE_FUNDAMENTAL (2)
-
-

The fundamental type from which all interfaces are derived.

-
-
-
-

G_TYPE_CHAR

-
#define G_TYPE_CHAR			G_TYPE_MAKE_FUNDAMENTAL (3)
-
-

The fundamental type corresponding to gchar. -The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer. -This may or may not be the same type a the C type "gchar".

-
-
-
-

G_TYPE_UCHAR

-
#define G_TYPE_UCHAR			G_TYPE_MAKE_FUNDAMENTAL (4)
-
-

The fundamental type corresponding to guchar.

-
-
-
-

G_TYPE_BOOLEAN

-
#define G_TYPE_BOOLEAN			G_TYPE_MAKE_FUNDAMENTAL (5)
-
-

The fundamental type corresponding to gboolean.

-
-
-
-

G_TYPE_INT

-
#define G_TYPE_INT			G_TYPE_MAKE_FUNDAMENTAL (6)
-
-

The fundamental type corresponding to gint.

-
-
-
-

G_TYPE_UINT

-
#define G_TYPE_UINT			G_TYPE_MAKE_FUNDAMENTAL (7)
-
-

The fundamental type corresponding to guint.

-
-
-
-

G_TYPE_LONG

-
#define G_TYPE_LONG			G_TYPE_MAKE_FUNDAMENTAL (8)
-
-

The fundamental type corresponding to glong.

-
-
-
-

G_TYPE_ULONG

-
#define G_TYPE_ULONG			G_TYPE_MAKE_FUNDAMENTAL (9)
-
-

The fundamental type corresponding to gulong.

-
-
-
-

G_TYPE_INT64

-
#define G_TYPE_INT64			G_TYPE_MAKE_FUNDAMENTAL (10)
-
-

The fundamental type corresponding to gint64.

-
-
-
-

G_TYPE_UINT64

-
#define G_TYPE_UINT64			G_TYPE_MAKE_FUNDAMENTAL (11)
-
-

The fundamental type corresponding to guint64.

-
-
-
-

G_TYPE_ENUM

-
#define G_TYPE_ENUM			G_TYPE_MAKE_FUNDAMENTAL (12)
-
-

The fundamental type from which all enumeration types are derived.

-
-
-
-

G_TYPE_FLAGS

-
#define G_TYPE_FLAGS			G_TYPE_MAKE_FUNDAMENTAL (13)
-
-

The fundamental type from which all flags types are derived.

-
-
-
-

G_TYPE_FLOAT

-
#define G_TYPE_FLOAT			G_TYPE_MAKE_FUNDAMENTAL (14)
-
-

The fundamental type corresponding to gfloat.

-
-
-
-

G_TYPE_DOUBLE

-
#define G_TYPE_DOUBLE			G_TYPE_MAKE_FUNDAMENTAL (15)
-
-

The fundamental type corresponding to gdouble.

-
-
-
-

G_TYPE_STRING

-
#define G_TYPE_STRING			G_TYPE_MAKE_FUNDAMENTAL (16)
-
-

The fundamental type corresponding to nul-terminated C strings.

-
-
-
-

G_TYPE_POINTER

-
#define G_TYPE_POINTER			G_TYPE_MAKE_FUNDAMENTAL (17)
-
-

The fundamental type corresponding to gpointer.

-
-
-
-

G_TYPE_BOXED

-
#define G_TYPE_BOXED			G_TYPE_MAKE_FUNDAMENTAL (18)
-
-

The fundamental type from which all boxed types are derived.

-
-
-
-

G_TYPE_PARAM

-
#define G_TYPE_PARAM			G_TYPE_MAKE_FUNDAMENTAL (19)
-
-

The fundamental type from which all GParamSpec types are derived.

-
-
-
-

G_TYPE_OBJECT

-
#define G_TYPE_OBJECT			G_TYPE_MAKE_FUNDAMENTAL (20)
-
-

The fundamental type for GObject.

-
-
-
-

G_TYPE_GTYPE

-
#define G_TYPE_GTYPE			 (g_gtype_get_type())
-
-

The type for GType.

-
-
-
-

G_TYPE_VARIANT

-
#define G_TYPE_VARIANT                  G_TYPE_MAKE_FUNDAMENTAL (21)
-
-

The fundamental type corresponding to GVariant.

-

All floating GVariant instances passed through the GType system are -consumed.

-

Note that callbacks in closures, and signal handlers -for signals of return type G_TYPE_VARIANT, must never return floating -variants.

-

Note: GLib 2.24 did include a boxed type with this name. It was replaced -with this fundamental type in 2.26.

-

Since: 2.26

-
-
-
-

G_TYPE_CHECKSUM

-
#define G_TYPE_CHECKSUM (g_checksum_get_type ())
-
-

The GType for a boxed type holding a GChecksum.

-

Since: 2.36

-
-
-
-

G_TYPE_RESERVED_GLIB_FIRST

-
#define G_TYPE_RESERVED_GLIB_FIRST (22)
-
-

First fundamental type number to create a new fundamental type id with -G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib.

-
-
-
-

G_TYPE_RESERVED_GLIB_LAST

-
#define G_TYPE_RESERVED_GLIB_LAST (31)
-
-

Last fundamental type number reserved for GLib.

-
-
-
-

G_TYPE_RESERVED_BSE_FIRST

-
#define G_TYPE_RESERVED_BSE_FIRST (32)
-
-

First fundamental type number to create a new fundamental type id with -G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE.

-
-
-
-

G_TYPE_RESERVED_BSE_LAST

-
#define G_TYPE_RESERVED_BSE_LAST (48)
-
-

Last fundamental type number reserved for BSE.

-
-
-
-

G_TYPE_RESERVED_USER_FIRST

-
#define G_TYPE_RESERVED_USER_FIRST (49)
-
-

First available fundamental type number to create new fundamental -type id with G_TYPE_MAKE_FUNDAMENTAL().

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gobject-Value-arrays.html b/docs/reference/gobject/html/gobject-Value-arrays.html deleted file mode 100644 index 0bc05dabd..000000000 --- a/docs/reference/gobject/html/gobject-Value-arrays.html +++ /dev/null @@ -1,642 +0,0 @@ - - - - -Value arrays: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Value arrays

-

Value arrays — A container structure to maintain an array of - generic values

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-GValue * - -g_value_array_get_nth () -
-GValueArray * - -g_value_array_new () -
-GValueArray * - -g_value_array_copy () -
-void - -g_value_array_free () -
-GValueArray * - -g_value_array_append () -
-GValueArray * - -g_value_array_prepend () -
-GValueArray * - -g_value_array_insert () -
-GValueArray * - -g_value_array_remove () -
-GValueArray * - -g_value_array_sort () -
-GValueArray * - -g_value_array_sort_with_data () -
-
-
-

Types and Values

-
---- - - - - -
structGValueArray
-
-
-

Includes

-
#include <glib-object.h>
-
-
-
-

Description

-

The prime purpose of a GValueArray is for it to be used as an -object property that holds an array of values. A GValueArray wraps -an array of GValue elements in order for it to be used as a boxed -type through G_TYPE_VALUE_ARRAY.

-

GValueArray is deprecated in favour of GArray since GLib 2.32. It -is possible to create a GArray that behaves like a GValueArray by -using the size of GValue as the element size, and by setting -g_value_unset() as the clear function using g_array_set_clear_func(), -for instance, the following code:

-
- - - - - - - -
1
GValueArray *array = g_value_array_new (10);
-
- -

-

can be replaced by:

-
- - - - - - - -
1
-2
GArray *array = g_array_sized_new (FALSE, TRUE, sizeof (GValue), 10);
-g_array_set_clear_func (array, (GDestroyNotify) g_value_unset);
-
- -

-
-
-

Functions

-
-

g_value_array_get_nth ()

-
GValue *
-g_value_array_get_nth (GValueArray *value_array,
-                       guint index_);
-
-

g_value_array_get_nth has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use g_array_index() instead.

-
-

Return a pointer to the value at index_ - containd in value_array -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value_array

GValueArray to get a value from

 

index_

index of the value of interest

 
-
-
-

Returns

-

pointer to a value at index_ -in value_array -.

-

[transfer none]

-
-
-
-
-

g_value_array_new ()

-
GValueArray *
-g_value_array_new (guint n_prealloced);
-
-

g_value_array_new has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use GArray and g_array_sized_new() instead.

-
-

Allocate and initialize a new GValueArray, optionally preserve space -for n_prealloced - elements. New arrays always contain 0 elements, -regardless of the value of n_prealloced -.

-
-

Parameters

-
----- - - - - - -

n_prealloced

number of values to preallocate space for

 
-
-
-

Returns

-

a newly allocated GValueArray with 0 values

-
-
-
-
-

g_value_array_copy ()

-
GValueArray *
-g_value_array_copy (const GValueArray *value_array);
-
-

g_value_array_copy has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use GArray and g_array_ref() instead.

-
-

Construct an exact copy of a GValueArray by duplicating all its -contents.

-
-

Parameters

-
----- - - - - - -

value_array

GValueArray to copy

 
-
-
-

Returns

-

Newly allocated copy of GValueArray.

-

[transfer full]

-
-
-
-
-

g_value_array_free ()

-
void
-g_value_array_free (GValueArray *value_array);
-
-

g_value_array_free has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use GArray and g_array_unref() instead.

-
-

Free a GValueArray including its contents.

-
-

Parameters

-
----- - - - - - -

value_array

GValueArray to free

 
-
-
-
-
-

g_value_array_append ()

-
GValueArray *
-g_value_array_append (GValueArray *value_array,
-                      const GValue *value);
-
-

g_value_array_append has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use GArray and g_array_append_val() instead.

-
-

Insert a copy of value - as last element of value_array -. If value - is -NULL, an uninitialized value is appended.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value_array

GValueArray to add an element to

 

value

GValue to copy into GValueArray, or NULL.

[nullable]
-
-
-

Returns

-

the GValueArray passed in as value_array -.

-

[transfer none]

-
-
-
-
-

g_value_array_prepend ()

-
GValueArray *
-g_value_array_prepend (GValueArray *value_array,
-                       const GValue *value);
-
-

g_value_array_prepend has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use GArray and g_array_prepend_val() instead.

-
-

Insert a copy of value - as first element of value_array -. If value - is -NULL, an uninitialized value is prepended.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value_array

GValueArray to add an element to

 

value

GValue to copy into GValueArray, or NULL.

[nullable]
-
-
-

Returns

-

the GValueArray passed in as value_array -.

-

[transfer none]

-
-
-
-
-

g_value_array_insert ()

-
GValueArray *
-g_value_array_insert (GValueArray *value_array,
-                      guint index_,
-                      const GValue *value);
-
-

g_value_array_insert has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use GArray and g_array_insert_val() instead.

-
-

Insert a copy of value - at specified position into value_array -. If value - -is NULL, an uninitialized value is inserted.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

value_array

GValueArray to add an element to

 

index_

insertion position, must be <= value_array->;n_values

 

value

GValue to copy into GValueArray, or NULL.

[nullable]
-
-
-

Returns

-

the GValueArray passed in as value_array -.

-

[transfer none]

-
-
-
-
-

g_value_array_remove ()

-
GValueArray *
-g_value_array_remove (GValueArray *value_array,
-                      guint index_);
-
-

g_value_array_remove has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use GArray and g_array_remove_index() instead.

-
-

Remove the value at position index_ - from value_array -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value_array

GValueArray to remove an element from

 

index_

position of value to remove, which must be less than -value_array->n_values -

 
-
-
-

Returns

-

the GValueArray passed in as value_array -.

-

[transfer none]

-
-
-
-
-

g_value_array_sort ()

-
GValueArray *
-g_value_array_sort (GValueArray *value_array,
-                    GCompareFunc compare_func);
-
-

g_value_array_sort has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use GArray and g_array_sort().

-
-

Sort value_array - using compare_func - to compare the elements according to -the semantics of GCompareFunc.

-

The current implementation uses the same sorting algorithm as standard -C qsort() function.

-
-

Parameters

-
----- - - - - - - - - - - - - -

value_array

GValueArray to sort

 

compare_func

function to compare elements.

[scope call]
-
-
-

Returns

-

the GValueArray passed in as value_array -.

-

[transfer none]

-
-
-
-
-

g_value_array_sort_with_data ()

-
GValueArray *
-g_value_array_sort_with_data (GValueArray *value_array,
-                              GCompareDataFunc compare_func,
-                              gpointer user_data);
-
-

g_value_array_sort_with_data has been deprecated since version 2.32 and should not be used in newly-written code.

-

Use GArray and g_array_sort_with_data().

-
-

Sort value_array - using compare_func - to compare the elements according -to the semantics of GCompareDataFunc.

-

The current implementation uses the same sorting algorithm as standard -C qsort() function.

-

[rename-to g_value_array_sort]

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - -

value_array

GValueArray to sort

 

compare_func

function to compare elements.

[scope call]

user_data

extra data argument provided for compare_func -.

[closure]
-
-
-

Returns

-

the GValueArray passed in as value_array -.

-

[transfer none]

-
-
-
-
-

Types and Values

-
-

struct GValueArray

-
struct GValueArray {
-  guint   n_values;
-  GValue *values;
-};
-
-

A GValueArray contains an array of GValue elements.

-
-

Members

-
----- - - - - - - - - - - - - -

guint n_values;

number of values contained in the array

 

GValue *values;

array of values

 
-
-
-
- -
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gobject-Varargs-Value-Collection.html b/docs/reference/gobject/html/gobject-Varargs-Value-Collection.html deleted file mode 100644 index 857187b5c..000000000 --- a/docs/reference/gobject/html/gobject-Varargs-Value-Collection.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - -Varargs Value Collection: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

Varargs Value Collection

-

Varargs Value Collection — Converting varargs to generic values

-
-
-

Functions

-
---- - - - - - - - - - - - - - - - - - - -
#define -G_VALUE_COLLECT_INIT() -
#define -G_VALUE_COLLECT() -
#define -G_VALUE_COLLECT_SKIP() -
#define -G_VALUE_LCOPY() -
-
-
-

Types and Values

-
---- - - - - - - - - - - -
 GTypeCValue
#defineG_VALUE_COLLECT_FORMAT_MAX_LENGTH
-
-
-

Includes

-
#include <glib-object.h>
-#include <gobject/gvaluecollector.h>
-
-
-
-

Description

-

The macros in this section provide the varargs parsing support needed -in variadic GObject functions such as g_object_new() or g_object_set(). -They currently support the collection of integral types, floating point -types and pointers.

-
-
-

Functions

-
-

G_VALUE_COLLECT_INIT()

-
#define             G_VALUE_COLLECT_INIT(value, _value_type, var_args, flags, __error)
-

Collects a variable argument value from a va_list. We have to -implement the varargs collection as a macro, because on some systems -va_list variables cannot be passed by reference.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

value

a GValue return location. value -must contain only 0 bytes.

 

_value_type

the GType to use for value -.

 

var_args

the va_list variable; it may be evaluated multiple times

 

flags

flags which are passed on to the collect_value() function of -the GTypeValueTable of value -.

 

__error

a gchar** variable that will be modified to hold a g_new() -allocated error messages if something fails

 
-
-

Since: 2.24

-
-
-
-

G_VALUE_COLLECT()

-
#define             G_VALUE_COLLECT(value, var_args, flags, __error)
-

Collects a variable argument value from a va_list. We have to -implement the varargs collection as a macro, because on some systems -va_list variables cannot be passed by reference.

-

Note: If you are creating the value - argument just before calling this macro, -you should use the G_VALUE_COLLECT_INIT variant and pass the unitialized -GValue. That variant is faster than G_VALUE_COLLECT.

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

value

a GValue return location. value -is supposed to be initialized -according to the value type to be collected

 

var_args

the va_list variable; it may be evaluated multiple times

 

flags

flags which are passed on to the collect_value() function of -the GTypeValueTable of value -.

 

__error

a gchar** variable that will be modified to hold a g_new() -allocated error messages if something fails

 
-
-
-
-
-

G_VALUE_COLLECT_SKIP()

-
#define             G_VALUE_COLLECT_SKIP(_value_type, var_args)
-

Skip an argument of type _value_type - from var_args -.

-
-

Parameters

-
----- - - - - - - - - - - - - -

_value_type

the GType of the value to skip

 

var_args

the va_list variable; it may be evaluated multiple times

 
-
-
-
-
-

G_VALUE_LCOPY()

-
#define             G_VALUE_LCOPY(value, var_args, flags, __error)
-

Collects a value's variable argument locations from a va_list. Usage is -analogous to G_VALUE_COLLECT().

-
-

Parameters

-
----- - - - - - - - - - - - - - - - - - - - - - - -

value

a GValue return location. value -is supposed to be initialized -according to the value type to be collected

 

var_args

the va_list variable; it may be evaluated multiple times

 

flags

flags which are passed on to the lcopy_value() function of -the GTypeValueTable of value -.

 

__error

a gchar** variable that will be modified to hold a g_new() -allocated error messages if something fails

 
-
-
-
-
-

Types and Values

-
-

GTypeCValue

-

A union holding one collected value.

-
-

Members

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - -

gint v_int;

the field for holding integer values

 

glong v_long;

the field for holding long integer values

 

gint64 v_int64;

the field for holding 64 bit integer values

 

gdouble v_double;

the field for holding floating point values

 

gpointer v_pointer;

the field for holding pointers

 
-
-
-
-
-

G_VALUE_COLLECT_FORMAT_MAX_LENGTH

-
#define G_VALUE_COLLECT_FORMAT_MAX_LENGTH (8)
-
-

The maximal number of GTypeCValues which can be collected for a -single GValue.

-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gobject-memory.html b/docs/reference/gobject/html/gobject-memory.html deleted file mode 100644 index 75c43414f..000000000 --- a/docs/reference/gobject/html/gobject-memory.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - -Object memory management: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Object memory management

-

- The memory-management API for GObjects is a bit complicated but the idea behind it - is pretty simple: the goal is to provide a flexible model based on reference counting - which can be integrated in applications which use or require different memory management - models (such as garbage collection). The methods which are used to - manipulate this reference count are described below. -

-
-

-Reference count

-

- The functions g_object_ref/g_object_unref respectively - increase and decrease the reference count. These functions are - thread-safe. - g_clear_object - is a convenience wrapper around g_object_unref - which also clears the pointer passed to it. -

-

- The reference count is initialized to one by - g_object_new which means that the caller - is currently the sole owner of the newly-created reference. - When the reference count reaches zero, that is, - when g_object_unref is called by the last client holding - a reference to the object, the dispose and the - finalize class methods are invoked. -

-

- Finally, after finalize is invoked, - g_type_free_instance is called to free the object instance. - Depending on the memory allocation policy decided when the type was registered (through - one of the g_type_register_* functions), the object's instance - memory will be freed or returned to the object pool for this type. - Once the object has been freed, if it was the last instance of the type, the type's class - will be destroyed as described in the section called “Instantiable classed types: objects” and - the section called “Non-instantiable classed types: interfaces”. -

-

- The table below summarizes the destruction process of a GObject: -

-
-

Table 5. g_object_unref

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Invocation timeFunction invokedFunction's parametersRemark
Last call to g_object_unref for an instance - of target type - target type's dispose class functionGObject instance - When dispose ends, the object should not hold any reference to any other - member object. The object is also expected to be able to answer client - method invocations (with possibly an error code but no memory violation) - until finalize is executed. dispose can be executed more than once. - dispose should chain up to its parent implementation just before returning - to the caller. -
target type's finalize class functionGObject instance - Finalize is expected to complete the destruction process initiated by - dispose. It should complete the object's destruction. finalize will be - executed only once. - finalize should chain up to its parent implementation just before returning - to the caller. - The reason why the destruction process is split is two different phases is - explained in the section called “Reference counts and cycles”. -
Last call to g_object_unref for the last - instance of target type - interface's interface_finalize functionOn interface's vtableNever used in practice. Unlikely you will need it.
interface's base_finalize functionOn interface's vtableNever used in practice. Unlikely you will need it.
target type's class_finalize functionOn target type's class structureNever used in practice. Unlikely you will need it.
type's base_finalize functionOn the inheritance tree of classes from fundamental type to target type. - base_init is invoked once for each class structure.Never used in practice. Unlikely you will need it.
-
-


-

-
-
-

-Weak References

-

- Weak references are used to monitor object finalization: - g_object_weak_ref adds a monitoring callback which does - not hold a reference to the object but which is invoked when the object runs - its dispose method. As such, each weak ref can be invoked more than once upon - object finalization (since dispose can run more than once during object - finalization). -

-

- g_object_weak_unref can be used to remove a monitoring - callback from the object. -

-

- Weak references are also used to implement g_object_add_weak_pointer - and g_object_remove_weak_pointer. These functions add a weak reference - to the object they are applied to which makes sure to nullify the pointer given by the user - when object is finalized. -

-

- Similarly, GWeakRef can be - used to implement weak references if thread safety is required. -

-
-
-

-Reference counts and cycles

-

- GObject's memory management model was designed to be easily integrated in existing code - using garbage collection. This is why the destruction process is split in two phases: - the first phase, executed in the dispose handler is supposed to release all references - to other member objects. The second phase, executed by the finalize handler is supposed - to complete the object's destruction process. Object methods should be able to run - without program error in-between the two phases. -

-

- This two-step destruction process is very useful to break reference counting cycles. - While the detection of the cycles is up to the external code, once the cycles have been - detected, the external code can invoke g_object_run_dispose which - will indeed break any existing cycles since it will run the dispose handler associated - to the object and thus release all references to other objects. -

-

- This explains one of the rules about the dispose handler stated earlier: - the dispose handler can be invoked multiple times. Let's say we - have a reference count cycle: object A references B which itself references object A. - Let's say we have detected the cycle and we want to destroy the two objects. One way to - do this would be to invoke g_object_run_dispose on one of the - objects. -

-

- If object A releases all its references to all objects, this means it releases its - reference to object B. If object B was not owned by anyone else, this is its last - reference count which means this last unref runs B's dispose handler which, in turn, - releases B's reference on object A. If this is A's last reference count, this last - unref runs A's dispose handler which is running for the second time before - A's finalize handler is invoked ! -

-

- The above example, which might seem a bit contrived, can really happen if - GObjects are being handled by language bindings — hence the rules for - object destruction should be closely followed. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gobject-properties.html b/docs/reference/gobject/html/gobject-properties.html deleted file mode 100644 index 56b090ef2..000000000 --- a/docs/reference/gobject/html/gobject-properties.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - -Object properties: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Object properties

-

- One of GObject's nice features is its generic get/set mechanism for object - properties. When an object - is instantiated, the object's class_init handler should be used to register - the object's properties with g_object_class_install_properties. -

-

- The best way to understand how object properties work is by looking at a real example - of how it is used: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
-71
-72
-73
-74
-75
-76
-77
-78
-79
-80
-81
-82
-83
-84
-85
-86
-87
-88
-89
-90
-91
-92
-93
-94
-95
-96
-97
-98
-99
-100
-101
-102
-103
-104
-105
-106
-107
-108
-109
-110
/************************************************/
-/* Implementation                               */
-/************************************************/
-
-enum
-{
-  PROP_FILENAME = 1,
-  PROP_ZOOM_LEVEL,
-  N_PROPERTIES
-};
-
-static GParamSpec *obj_properties[N_PROPERTIES] = { NULL, };
-
-static void
-viewer_file_set_property (GObject      *object,
-                          guint         property_id,
-                          const GValue *value,
-                          GParamSpec   *pspec)
-{
-  ViewerFile *self = VIEWER_FILE (object);
-
-  switch (property_id)
-    {
-    case PROP_FILENAME:
-      g_free (self->priv->filename);
-      self->priv->filename = g_value_dup_string (value);
-      g_print ("filename: %s\n", self->priv->filename);
-      break;
-
-    case PROP_ZOOM_LEVEL:
-      self->priv->zoom_level = g_value_get_uint (value);
-      g_print ("zoom level: %u\n", self->priv->zoom_level);
-      break;
-
-    default:
-      /* We don't have any other property... */
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-      break;
-    }
-}
-
-static void
-viewer_file_get_property (GObject    *object,
-                          guint       property_id,
-                          GValue     *value,
-                          GParamSpec *pspec)
-{
-  ViewerFile *self = VIEWER_FILE (object);
-
-  switch (property_id)
-    {
-    case PROP_FILENAME:
-      g_value_set_string (value, self->priv->filename);
-      break;
-
-    case PROP_ZOOM_LEVEL:
-      g_value_set_uint (value, self->priv->zoom_level);
-      break;
-
-    default:
-      /* We don't have any other property... */
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-      break;
-    }
-}
-
-static void
-viewer_file_class_init (ViewerFileClass *klass)
-{
-  GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
-  object_class->set_property = viewer_file_set_property;
-  object_class->get_property = viewer_file_get_property;
-
-  obj_properties[PROP_FILENAME] =
-    g_param_spec_string ("filename",
-                         "Filename",
-                         "Name of the file to load and display from.",
-                         NULL  /* default value */,
-                         G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
-
-  obj_properties[PROP_ZOOM_LEVEL] =
-    g_param_spec_uint ("zoom-level",
-                       "Zoom level",
-                       "Zoom level to view the file at.",
-                       0  /* minimum value */,
-                       10 /* maximum value */,
-                       2  /* default value */,
-                       G_PARAM_READWRITE));
-
-  g_object_class_install_properties (object_class,
-                                     N_PROPERTIES,
-                                     obj_properties);
-}
-
-/************************************************/
-/* Use                                          */
-/************************************************/
-
-ViewerFile *file;
-GValue val = G_VALUE_INIT;
-
-file = g_object_new (VIEWER_TYPE_FILE, NULL);
-
-g_value_init (&val, G_TYPE_UINT);
-g_value_set_char (&val, 11);
-
-g_object_set_property (G_OBJECT (file), "zoom-level", &val);
-
-g_value_unset (&val);
-
- -

- The client code above looks simple but a lot of things happen under the hood: -

-

- g_object_set_property first ensures a property - with this name was registered in file's class_init handler. If so it walks the class hierarchy, - from bottom-most most-derived type, to top-most fundamental type to find the class - which registered that property. It then tries to convert the user-provided - GValue - into a GValue whose type is that of the associated property. -

-

- If the user provides a signed char GValue, as is shown - here, and if the object's property was registered as an unsigned int, - g_value_transform will try to transform the input signed char into - an unsigned int. Of course, the success of the transformation depends on the availability - of the required transform function. In practice, there will almost always be a transformation - [2] - which matches and conversion will be carried out if needed. -

-

- After transformation, the GValue is validated by - g_param_value_validate which makes sure the user's - data stored in the GValue matches the characteristics specified by - the property's GParamSpec. - Here, the GParamSpec we - provided in class_init has a validation function which makes sure that the GValue - contains a value which respects the minimum and maximum bounds of the - GParamSpec. In the example above, the client's GValue does not - respect these constraints (it is set to 11, while the maximum is 10). As such, the - g_object_set_property function will return with an error. -

-

- If the user's GValue had been set to a valid value, g_object_set_property - would have proceeded with calling the object's - set_property class method. Here, since our - implementation of ViewerFile did override this method, execution would jump to - viewer_file_set_property after having retrieved from the - GParamSpec the param_id - [3] - which had been stored by - g_object_class_install_property. -

-

- Once the property has been set by the object's - set_property class method, execution - returns to g_object_set_property which makes sure that - the "notify" signal is emitted on the object's instance with the changed property as - parameter unless notifications were frozen by g_object_freeze_notify. -

-

- g_object_thaw_notify can be used to re-enable notification of - property modifications through the - “notify” signal. It is important to remember that - even if properties are changed while property change notification is frozen, the "notify" - signal will be emitted once for each of these changed properties as soon as the property - change notification is thawed: no property change is lost for the "notify" - signal, although multiple notifications for a single property are - compressed. Signals can only be delayed by the notification freezing - mechanism. -

-

- It sounds like a tedious task to set up GValues every time when one wants to modify a property. - In practice one will rarely do this. The functions g_object_set_property - and g_object_get_property - are meant to be used by language bindings. For application there is an easier way and - that is described next. -

-
-

-Accessing multiple properties at once

-

- It is interesting to note that the g_object_set and - g_object_set_valist (variadic version) functions can be used to set - multiple properties at once. The client code shown above can then be re-written as: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
ViewerFile *file;
-file = /* */;
-g_object_set (G_OBJECT (file),
-              "zoom-level", 6, 
-              "filename", "~/some-file.txt", 
-              NULL);
-
- -

- This saves us from managing the GValues that we were needing to handle when using - g_object_set_property. - The code above will trigger one notify signal emission for each property modified. -

-

- Equivalent _get versions are also available: - g_object_get - and g_object_get_valist (variadic version) can be used to get numerous - properties at once. -

-

- These high level functions have one drawback — they don't provide a return value. - One should pay attention to the argument types and ranges when using them. - A known source of errors is to pass a different type from what the - property expects; for instance, passing an integer when the property - expects a floating point value and thus shifting all subsequent parameters - by some number of bytes. Also forgetting the terminating - NULL will lead to undefined behaviour. -

-

- This explains how g_object_new, - g_object_newv and g_object_new_valist - work: they parse the user-provided variable number of parameters and invoke - g_object_set on the parameters only after the object has been successfully constructed. - The "notify" signal will be emitted for each property set. -

-
-
-

-

[2] Its behaviour might not be what you expect but it is up to you to actually avoid - relying on these transformations. -

-

[3] - It should be noted that the param_id used here need only to uniquely identify each - GParamSpec within the ViewerFileClass such that the switch - used in the set and get methods actually works. Of course, this locally-unique - integer is purely an optimization: it would have been possible to use a set of - if (strcmp (a, b) == 0) {} else if (strcmp (a, b) == 0) {} statements. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gobject-query.html b/docs/reference/gobject/html/gobject-query.html deleted file mode 100644 index f634ee1d3..000000000 --- a/docs/reference/gobject/html/gobject-query.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - -gobject-query: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-
- - -
-

gobject-query

-

gobject-query — display a tree of types

-
-
-

Synopsis

-

gobject-query froots [OPTION...]

-

gobject-query tree [OPTION...]

-
-
-

Description

-

-gobject-query is a small utility that draws a tree of -types. -

-

-gobject-query takes a mandatory argument that specifies -whether it should iterate over the fundamental types or print a type tree. -

-
-
-

Commands

-
---- - - - - - - - - - - -

froots

-iterate over fundamental roots -

tree

-print type tree -

-
-
-

Options

-
---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

-r TYPE

-specify the root type -

-n

-don't descend type tree -

-b STRING

-specify indent string -

-i STRING

-specify incremental indent string -

-s NUMBER

-specify line spacing -

-h, --help

-Print brief help and exit. -

-v, --version

-Print version and exit. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gobject.devhelp2 b/docs/reference/gobject/html/gobject.devhelp2 deleted file mode 100644 index f0c41aa1a..000000000 --- a/docs/reference/gobject/html/gobject.devhelp2 +++ /dev/null @@ -1,1032 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/gobject/html/gtype-conventions.html b/docs/reference/gobject/html/gtype-conventions.html deleted file mode 100644 index b8b090203..000000000 --- a/docs/reference/gobject/html/gtype-conventions.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - -Conventions: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Conventions

-

- There are a number of conventions users are expected to follow when creating new types - which are to be exported in a header file: -

-
    -
  • - Type names (including object names) must be at least three - characters long and start with ‘a–z’, ‘A–Z’ or ‘_’. -

  • -
  • - Use the object_method pattern for function names: to invoke - the method named save on an instance of object type file, call - file_save. -

  • -
  • Use prefixing to avoid namespace conflicts with other projects. - If your library (or application) is named Viewer, - prefix all your function names with viewer_. - For example: viewer_object_method. -

  • -
  • Create a macro named PREFIX_TYPE_OBJECT which always - returns the GType for the associated object type. For an object of type - File in the Viewer namespace, - use: VIEWER_TYPE_FILE. - This macro is implemented using a function named - prefix_object_get_type; for example, viewer_file_get_type. -

  • -
  • -

    - Use G_DECLARE_FINAL_TYPE - or G_DECLARE_DERIVABLE_TYPE - to define various other conventional macros for your object: -

    -
      -
    • PREFIX_OBJECT (obj), which - returns a pointer of type PrefixObject. This macro is used to enforce - static type safety by doing explicit casts wherever needed. It also enforces - dynamic type safety by doing runtime checks. It is possible to disable the dynamic - type checks in production builds (see building GLib). - For example, we would create - VIEWER_FILE (obj) to keep the previous example. -

    • -
    • PREFIX_OBJECT_CLASS (klass), which - is strictly equivalent to the previous casting macro: it does static casting with - dynamic type checking of class structures. It is expected to return a pointer - to a class structure of type PrefixObjectClass. An example is: - VIEWER_FILE_CLASS. -

    • -
    • PREFIX_IS_OBJECT (obj), which - returns a gboolean which indicates whether the input - object instance pointer is non-NULL and of type OBJECT. - For example, VIEWER_IS_FILE. -

    • -
    • PREFIX_IS_OBJECT_CLASS (klass), which returns a boolean - if the input class pointer is a pointer to a class of type OBJECT. - For example, VIEWER_IS_FILE_CLASS. -

    • -
    • PREFIX_OBJECT_GET_CLASS (obj), - which returns the class pointer associated to an instance of a given type. This macro - is used for static and dynamic type safety purposes (just like the previous casting - macros). - For example, VIEWER_FILE_GET_CLASS. -

    • -
    -
  • -
-

- The implementation of these macros is pretty straightforward: a number of simple-to-use - macros are provided in gtype.h. For the example we used above, we would - write the following trivial code to declare the macros: -

-
- - - - - - - -
1
-2
#define VIEWER_TYPE_FILE viewer_file_get_type ()
-G_DECLARE_FINAL_TYPE (ViewerFile, viewer_file, VIEWER, FILE, GObject)
-
- -

-

-

- Unless your code has special requirements, you can use the - G_DEFINE_TYPE - macro to define a class: -

-
- - - - - - - -
1
G_DEFINE_TYPE (ViewerFile, viewer_file, G_TYPE_OBJECT)
-
- -

-

-

- Otherwise, the viewer_file_get_type function must be - implemented manually: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
GType viewer_file_get_type (void)
-{
-  static GType type = 0;
-  if (type == 0) {
-    const GTypeInfo info = {
-      /* You fill this structure. */
-    };
-    type = g_type_register_static (G_TYPE_OBJECT,
-                                   "ViewerFile",
-                                   &info, 0);
-  }
-  return type;
-}
-
- -

-

-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gtype-instantiable-classed.html b/docs/reference/gobject/html/gtype-instantiable-classed.html deleted file mode 100644 index a3c0379f6..000000000 --- a/docs/reference/gobject/html/gtype-instantiable-classed.html +++ /dev/null @@ -1,412 +0,0 @@ - - - - -Instantiable classed types: objects: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Instantiable classed types: objects

-

- This section covers the theory behind objects. See - How to define and implement a new GObject for the recommended way to define a - GObject. -

-

- Types which are registered with a class and are declared instantiable are - what most closely resembles an object. - Although GObjects (detailed in The GObject base class) - are the most well known type of instantiable - classed types, other kinds of similar objects used as the base of an inheritance - hierarchy have been externally developed and they are all built on the fundamental - features described below. -

-

- For example, the code below shows how you could register - such a fundamental object type in the type system (using none of the - GObject convenience API): -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
typedef struct {
-  GObject parent;
-
-  /* instance members */
-  gchar *filename;
-} ViewerFile;
-
-typedef struct {
-  GObjectClass parent;
-
-  /* class members */
-  /* the first is public, pure and virtual */
-  void (*open)  (ViewerFile  *self,
-                 GError     **error);
-
-  /* the second is public and virtual */
-  void (*close) (ViewerFile  *self,
-                 GError     **error);
-} ViewerFileClass;
-
-#define VIEWER_TYPE_FILE (viewer_file_get_type ())
-
-GType 
-viewer_file_get_type (void)
-{
-  static GType type = 0;
-  if (type == 0) {
-    const GTypeInfo info = {
-      sizeof (ViewerFileClass),
-      NULL,           /* base_init */
-      NULL,           /* base_finalize */
-      (GClassInitFunc) viewer_file_class_init,
-      NULL,           /* class_finalize */
-      NULL,           /* class_data */
-      sizeof (ViewerFile),
-      0,              /* n_preallocs */
-      (GInstanceInitFunc) NULL /* instance_init */
-    };
-    type = g_type_register_static (G_TYPE_OBJECT,
-                                   "ViewerFile",
-                                   &info, 0);
-  }
-  return type;
-}
-
- -

- Upon the first call to viewer_file_get_type, the type named - ViewerFile will be registered in the type system as inheriting - from the type G_TYPE_OBJECT. -

-

- Every object must define two structures: its class structure and its - instance structure. All class structures must contain as first member - a GTypeClass structure. All instance structures must contain as first - member a GTypeInstance structure. The declaration of these C types, - coming from gtype.h is shown below: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
struct _GTypeClass
-{
-  GType g_type;
-};
-struct _GTypeInstance
-{
-  GTypeClass *g_class;
-};
-
- -

- These constraints allow the type system to make sure that every object instance - (identified by a pointer to the object's instance structure) contains in its - first bytes a pointer to the object's class structure. -

-

- This relationship is best explained by an example: let's take object B which - inherits from object A: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
/* A definitions */
-typedef struct {
-  GTypeInstance parent;
-  int field_a;
-  int field_b;
-} A;
-typedef struct {
-  GTypeClass parent_class;
-  void (*method_a) (void);
-  void (*method_b) (void);
-} AClass;
-
-/* B definitions. */
-typedef struct {
-  A parent;
-  int field_c;
-  int field_d;
-} B;
-typedef struct {
-  AClass parent_class;
-  void (*method_c) (void);
-  void (*method_d) (void);
-} BClass;
-
- -

- The C standard mandates that the first field of a C structure is stored starting - in the first byte of the buffer used to hold the structure's fields in memory. - This means that the first field of an instance of an object B is A's first field - which in turn is GTypeInstance's first field which in - turn is g_class, a pointer - to B's class structure. -

-

- Thanks to these simple conditions, it is possible to detect the type of every - object instance by doing: -

-
- - - - - - - -
1
-2
B *b;
-b->parent.parent.g_class->g_type
-
- -

- or, more quickly: -

-
- - - - - - - -
1
-2
B *b;
-((GTypeInstance *) b)->g_class->g_type
-
- -

-

-
-

-Initialization and Destruction

-

- instantiation of these types can be done with - g_type_create_instance, - which will look up the type information - structure associated with the type requested. Then, the instance size and instantiation - policy (if the n_preallocs field is set - to a non-zero value, the type system allocates - the object's instance structures in chunks rather than mallocing for every instance) - declared by the user are used to get a buffer to hold the object's instance - structure. -

-

- If this is the first instance of the object ever created, the type system must create a class structure. - It allocates a buffer to hold the object's class structure and initializes it. The first part of the - class structure (ie: the embedded parent class structure) is initialized by copying the contents from - the class structure of the parent class. The rest of class structure is initialized to zero. If there - is no parent, the entire class structure is initialized to zero. The type system then invokes the - base_class_initialization functions - (GBaseInitFunc) from topmost - fundamental object to bottom-most most derived object. The object's class_init - (GClassInitFunc) function is invoked afterwards to complete - initialization of the class structure. - Finally, the object's interfaces are initialized (we will discuss interface initialization - in more detail later). -

-

- Once the type system has a pointer to an initialized class structure, it sets the object's - instance class pointer to the object's class structure and invokes the object's - instance_init - (GInstanceInitFunc) - functions, from top-most fundamental - type to bottom-most most-derived type. -

-

- Object instance destruction through g_type_free_instance is very simple: - the instance structure is returned to the instance pool if there is one and if this was the - last living instance of the object, the class is destroyed. -

-

- Class destruction (the concept of destruction is sometimes partly - referred to as finalization in GType) is the symmetric process of - the initialization: interfaces are destroyed first. - Then, the most derived - class_finalize (GClassFinalizeFunc) function is invoked. Finally, the - base_class_finalize (GBaseFinalizeFunc) functions are - invoked from bottom-most most-derived type to top-most fundamental type and - the class structure is freed. -

-

- The base initialization/finalization process is - very similar to the C++ constructor/destructor paradigm. The practical details are different - though and it is important not to get confused by superficial similarities. - GTypes have no instance destruction mechanism. It is - the user's responsibility to implement correct destruction semantics on top - of the existing GType code. (This is what GObject does: see - The GObject base class.) - Furthermore, C++ code equivalent to the base_init - and class_init callbacks of GType is usually not needed because C++ cannot really create object - types at runtime. -

-

- The instantiation/finalization process can be summarized as follows: -

-
-

Table 1. GType Instantiation/Finalization

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Invocation timeFunction invokedFunction's parameters
First call to g_type_create_instance for target typetype's base_init functionOn the inheritance tree of classes from fundamental type to target type. - base_init is invoked once for each class structure.
target type's class_init functionOn target type's class structure
interface initialization, see - the section called “Interface Initialization” - 
Each call to g_type_create_instance for target typetarget type's instance_init functionOn object's instance
Last call to g_type_free_instance for target typeinterface destruction, see - the section called “Interface Destruction” - 
target type's class_finalize functionOn target type's class structure
type's base_finalize functionOn the inheritance tree of classes from fundamental type to target type. - base_finalize is invoked once for each class structure.
-
-


-

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gtype-non-instantiable-classed.html b/docs/reference/gobject/html/gtype-non-instantiable-classed.html deleted file mode 100644 index 8a08cb7b4..000000000 --- a/docs/reference/gobject/html/gtype-non-instantiable-classed.html +++ /dev/null @@ -1,564 +0,0 @@ - - - - -Non-instantiable classed types: interfaces: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Non-instantiable classed types: interfaces

-

- This section covers the theory behind interfaces. See - How to define and implement interfaces for the recommended way to define an - interface. -

-

- GType's interfaces are very similar to Java's interfaces. They allow - to describe a common API that several classes will adhere to. - Imagine the play, pause and stop buttons on hi-fi equipment — those can - be seen as a playback interface. Once you know what they do, you can - control your CD player, MP3 player or anything that uses these symbols. - To declare an interface you have to register a non-instantiable - classed type which derives from - GTypeInterface. The following piece of code declares such an interface. -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
#define VIEWER_TYPE_EDITABLE viewer_editable_get_type ()
-G_DECLARE_INTERFACE (ViewerEditable, viewer_editable, VIEWER, EDITABLE, GObject)
-
-struct _ViewerEditableInterface {
-  GTypeInterface parent;
-
-  void (*save) (ViewerEditable  *self,
-                GError         **error);
-};
-
-void viewer_editable_save (ViewerEditable  *self,
-                           GError         **error);
-
- -

- The interface function, viewer_editable_save is implemented - in a pretty simple way: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
void
-viewer_editable_save (ViewerEditable  *self,
-                      GError         **error)
-{
-  ViewerEditableinterface *iface;
-
-  g_return_if_fail (VIEWER_IS_EDITABLE (self));
-  g_return_if_fail (error == NULL || *error == NULL);
-
-  iface = VIEWER_EDITABLE_GET_INTERFACE (self);
-  g_return_if_fail (iface->save != NULL);
-  iface->save (self);
-}
-
- -

- viewer_editable_get_type registers a type named ViewerEditable - which inherits from G_TYPE_INTERFACE. All interfaces must - be children of G_TYPE_INTERFACE in the inheritance tree. -

-

- An interface is defined by only one structure which must contain as first member - a GTypeInterface structure. The interface structure is expected to - contain the function pointers of the interface methods. It is good style to - define helper functions for each of the interface methods which simply call - the interface's method directly: viewer_editable_save - is one of these. -

-

- If you have no special requirements you can use the - G_IMPLEMENT_INTERFACE macro - to implement an interface: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
static void
-viewer_file_save (ViewerEditable *self)
-{
-  g_print ("File implementation of editable interface save method.\n");
-}
-
-static void
-viewer_file_editable_interface_init (ViewerEditableInterface *iface)
-{
-  iface->save = viewer_file_save;
-}
-
-G_DEFINE_TYPE_WITH_CODE (ViewerFile, viewer_file, VIEWER_TYPE_FILE,
-                         G_IMPLEMENT_INTERFACE (VIEWER_TYPE_EDITABLE,
-                                                viewer_file_editable_interface_init));
-
- -

-

-

- If your code does have special requirements, you must write a custom - get_type function to register your GType which - inherits from some GObject - and which implements the interface ViewerEditable. For - example, this code registers a new ViewerFile class which - implements ViewerEditable: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
static void
-viewer_file_save (ViewerEditable *editable)
-{
-  g_print ("File implementation of editable interface save method.\n");
-}
-
-static void
-viewer_file_editable_interface_init (gpointer g_iface,
-                                     gpointer iface_data)
-{
-  ViewerEditableInterface *iface = g_iface;
-
-  iface->save = viewer_file_save;
-}
-
-GType 
-viewer_file_get_type (void)
-{
-  static GType type = 0;
-  if (type == 0) {
-    const GTypeInfo info = {
-      sizeof (ViewerFileClass),
-      NULL,   /* base_init */
-      NULL,   /* base_finalize */
-      NULL,   /* class_init */
-      NULL,   /* class_finalize */
-      NULL,   /* class_data */
-      sizeof (ViewerFile),
-      0,      /* n_preallocs */
-      NULL    /* instance_init */
-    };
-    const GInterfaceInfo editable_info = {
-      (GInterfaceInitFunc) viewer_file_editable_interface_init,  /* interface_init */
-      NULL,   /* interface_finalize */
-      NULL    /* interface_data */
-    };
-    type = g_type_register_static (VIEWER_TYPE_FILE,
-                                   "ViewerFile",
-                                   &info, 0);
-    g_type_add_interface_static (type,
-                                 VIEWER_TYPE_EDITABLE,
-                                 &editable_info);
-  }
-  return type;
-}
-
- -

-

-

- g_type_add_interface_static records in the type system that - a given type implements also FooInterface - (foo_interface_get_type returns the type of - FooInterface). - The GInterfaceInfo structure holds - information about the implementation of the interface: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
struct _GInterfaceInfo
-{
-  GInterfaceInitFunc     interface_init;
-  GInterfaceFinalizeFunc interface_finalize;
-  gpointer               interface_data;
-};
-
- -

-

-
-

-Interface Initialization

-

- When an instantiable classed type which implements an interface - (either directly or by inheriting an implementation from a superclass) - is created for the first time, its class structure is initialized - following the process described in the section called “Instantiable classed types: objects”. - After that, the interface implementations associated with - the type are initialized. -

-

- First a memory buffer is allocated to hold the interface structure. The parent's - interface structure is then copied over to the new interface structure (the parent - interface is already initialized at that point). If there is no parent interface, - the interface structure is initialized with zeros. The - g_type and the - g_instance_type fields are then - initialized: g_type is set to the type of - the most-derived interface and - g_instance_type is set to the type of the - most derived type which implements this interface. -

-

- The interface's base_init function is called, - and then the interface's default_init is invoked. - Finally if the type has registered an implementation of the interface, - the implementation's interface_init - function is invoked. If there are multiple implementations of an - interface the base_init and - interface_init functions will be invoked once - for each implementation initialized. -

-

- It is thus recommended to use a default_init function to - initialize an interface. This function is called only once for the interface no - matter how many implementations there are. The - default_init function is declared by - G_DEFINE_INTERFACE - which can be used to define the interface: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
G_DEFINE_INTERFACE (ViewerEditable, viewer_editable, G_TYPE_OBJECT);
-
-static void
-viewer_editable_default_init (ViewerEditableInterface *iface)
-{
-  /* add properties and signals here, will only be called once */
-}
-
- -

-

-

- Or you can do that yourself in a GType function for your interface: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
GType
-viewer_editable_get_type (void)
-{
-  static volatile gsize type_id = 0;
-  if (g_once_init_enter (&type_id)) {
-    const GTypeInfo info = {
-      sizeof (ViewerEditableInterface),
-      NULL,   /* base_init */
-      NULL,   /* base_finalize */
-      viewer_editable_default_init, /* class_init */
-      NULL,   /* class_finalize */
-      NULL,   /* class_data */
-      0,      /* instance_size */
-      0,      /* n_preallocs */
-      NULL    /* instance_init */
-    };
-    GType type = g_type_register_static (G_TYPE_INTERFACE,
-                                         "ViewerEditable",
-                                         &info, 0);
-    g_once_init_leave (&type_id, type);
-  }
-  return type_id;
-}
-
-static void
-viewer_editable_default_init (ViewerEditableInterface *iface)
-{
-  /* add properties and signals here, will only called once */
-}
-
- -

-

-

- In summary, interface initialization uses the following functions: -

-

-

-
-

Table 2. Interface Initialization

-
----- - - - - - - - - - - - - - - - - - - - - - - - - - - -
Invocation timeFunction InvokedFunction's parametersRemark
First call to g_type_create_instance - for any type implementing interface - interface's base_init functionOn interface's vtableRarely necessary to use this. Called once per instantiated classed type implementing the interface.
First call to g_type_create_instance - for each type implementing interface - interface's default_init functionOn interface's vtableRegister interface's signals, properties, etc. here. Will be called once.
First call to g_type_create_instance - for any type implementing interface - implementation's interface_init functionOn interface's vtable - Initialize interface implementation. Called for each class that that - implements the interface. Initialize the interface method pointers - in the interface structure to the implementing class's implementation. -
-
-


-

-
-
-

-Interface Destruction

-

- When the last instance of an instantiable type which registered - an interface implementation is destroyed, the interface's - implementations associated to the type are destroyed. -

-

- To destroy an interface implementation, GType first calls the - implementation's interface_finalize function - and then the interface's most-derived - base_finalize function. -

-

- Again, it is important to understand, as in - the section called “Interface Initialization”, - that both interface_finalize and base_finalize - are invoked exactly once for the destruction of each implementation of an interface. Thus, - if you were to use one of these functions, you would need to use a static integer variable - which would hold the number of instances of implementations of an interface such that - the interface's class is destroyed only once (when the integer variable reaches zero). -

-

- The above process can be summarized as follows: -

-
-

Table 3. Interface Finalization

-
----- - - - - - - - - - - - - - - - - -
Invocation timeFunction InvokedFunction's parameters
Last call to g_type_free_instance for type - implementing interface - interface's interface_finalize functionOn interface's vtable
interface's base_finalize functionOn interface's vtable
-
-


-

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/gtype-non-instantiable.html b/docs/reference/gobject/html/gtype-non-instantiable.html deleted file mode 100644 index 03a44c9ba..000000000 --- a/docs/reference/gobject/html/gtype-non-instantiable.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - -Non-instantiable non-classed fundamental types: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Non-instantiable non-classed fundamental types

-

- A lot of types are not instantiable by the type system and do not have - a class. Most of these types are fundamental trivial types such as gchar, - and are already registered by GLib. -

-

- In the rare case of needing to register such a type in the type - system, fill a - GTypeInfo structure with zeros since these types are also most of the time - fundamental: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
GTypeInfo info = {
-  0,                                /* class_size */
-  NULL,                        /* base_init */
-  NULL,                        /* base_destroy */
-  NULL,                        /* class_init */
-  NULL,                        /* class_destroy */
-  NULL,                        /* class_data */
-  0,                                /* instance_size */
-  0,                                /* n_preallocs */
-  NULL,                        /* instance_init */
-  NULL,                        /* value_table */
-};
-static const GTypeValueTable value_table = {
-  value_init_long0,                /* value_init */
-  NULL,                        /* value_free */
-  value_copy_long0,                /* value_copy */
-  NULL,                        /* value_peek_pointer */
-  "i",                        /* collect_format */
-  value_collect_int,        /* collect_value */
-  "p",                        /* lcopy_format */
-  value_lcopy_char,                /* lcopy_value */
-};
-info.value_table = &value_table;
-type = g_type_register_fundamental (G_TYPE_CHAR, "gchar", &info, &finfo, 0);
-
- -

-

-

- Having non-instantiable types might seem a bit useless: what good is a type - if you cannot instantiate an instance of that type ? Most of these types - are used in conjunction with GValues: a GValue is initialized - with an integer or a string and it is passed around by using the registered - type's value_table. GValues (and by extension these trivial fundamental - types) are most useful when used in conjunction with object properties and signals. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/home.png b/docs/reference/gobject/html/home.png deleted file mode 100644 index 9346b336a..000000000 Binary files a/docs/reference/gobject/html/home.png and /dev/null differ diff --git a/docs/reference/gobject/html/howto-gobject-chainup.html b/docs/reference/gobject/html/howto-gobject-chainup.html deleted file mode 100644 index 2866b4e7a..000000000 --- a/docs/reference/gobject/html/howto-gobject-chainup.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - -Chaining up: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Chaining up

-

Chaining up is often loosely defined by the following set of - conditions: -

-
    -
  • Parent class A defines a public virtual method named foo and - provides a default implementation.

  • -
  • Child class B re-implements method foo.

  • -
  • B’s implementation of foo calls (‘chains up to’) its parent class A’s implementation of foo.

  • -
-

- There are various uses of this idiom: -

-
    -
  • You need to extend the behaviour of a class without modifying its code. You create - a subclass to inherit its implementation, re-implement a public virtual method to modify the behaviour - and chain up to ensure that the previous behaviour is not really modified, just extended. -

  • -
  • You need to implement the - Chain - Of Responsibility pattern: each object of the inheritance - tree chains up to its parent (typically, at the beginning or the end of the method) to ensure that - each handler is run in turn.

  • -
-

-

-

- To explicitly chain up to the implementation of the virtual method in the parent class, - you first need a handle to the original parent class structure. This pointer can then be used to - access the original virtual function pointer and invoke it directly. - [7] -

-

- Use the parent_class pointer created and initialized - by the - G_DEFINE_TYPE - family of macros, for instance: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
static void
-b_method_to_call (B *obj, gint some_param)
-{
-  /* do stuff before chain up */
-
-  /* call the method_to_call() virtual function on the
-   * parent of BClass, AClass.
-   *
-   * remember the explicit cast to AClass*
-   */
-  A_CLASS (b_parent_class)->method_to_call (obj, some_param);
-
-  /* do stuff after chain up */
-}
-
- -

-

-
-

-

[7] - The original adjective used in this sentence is not innocuous. To fully - understand its meaning, recall how class structures are initialized: for each object type, - the class structure associated with this object is created by first copying the class structure of its - parent type (a simple memcpy) and then by invoking the class_init callback on - the resulting class structure. Since the class_init callback is responsible for overwriting the class structure - with the user re-implementations of the class methods, the modified copy of the parent class - structure stored in the derived instance cannot be used. A copy of the class structure of an instance of the parent - class is needed. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/howto-gobject-code.html b/docs/reference/gobject/html/howto-gobject-code.html deleted file mode 100644 index 91ecc5696..000000000 --- a/docs/reference/gobject/html/howto-gobject-code.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - -Boilerplate code: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Boilerplate code

-

- In your code, the first step is to #include the - needed headers: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
/*
- * Copyright information
- */
-
-#include "viewer-file.h"
-
-/* Private structure definition. */
-typedef struct {
-  gchar *filename;
-  /* stuff */
-} ViewerFilePrivate;
-
-/* 
- * forward definitions
- */
-
- -

-

-

- If the class is being declared as final using - G_DECLARE_FINAL_TYPE, its instance structure should - be defined in the C file: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
struct _ViewerFile
-{
-  GObject parent_instance;
-
-  /* Other members, including private data. */
-}
-
- -

-

-

- Call the G_DEFINE_TYPE macro (or - G_DEFINE_TYPE_WITH_PRIVATE if your class needs - private data — final types do not need private data) - using the name - of the type, the prefix of the functions and the parent GType to - reduce the amount of boilerplate needed. This macro will: - -

-
    -
  • implement the viewer_file_get_type - function
  • -
  • define a parent class pointer accessible from - the whole .c file
  • -
  • add private instance data to the type (if using - G_DEFINE_TYPE_WITH_PRIVATE)
  • -
-

-

-

- If the class has been declared as final using - G_DECLARE_FINAL_TYPE (see - the section called “Boilerplate header code”), private data should be placed in - the instance structure, ViewerFile, and - G_DEFINE_TYPE should be used instead of - G_DEFINE_TYPE_WITH_PRIVATE. The instance structure - for a final class is not exposed publicly, and is not embedded in the - instance structures of any derived classes (because the class is final); - so its size can vary without causing incompatibilities for code which uses - the class. Conversely, private data for derivable classes - must be included in a private structure, and - G_DEFINE_TYPE_WITH_PRIVATE must be used. - -

-
- - - - - - - -
1
G_DEFINE_TYPE (ViewerFile, viewer_file, G_TYPE_OBJECT)
-
- -

-or -

-
- - - - - - - -
1
G_DEFINE_TYPE_WITH_PRIVATE (ViewerFile, viewer_file, G_TYPE_OBJECT)
-
- -

-

-

- It is also possible to use the - G_DEFINE_TYPE_WITH_CODE macro to control the - get_type function implementation — for instance, to - add a call to the G_IMPLEMENT_INTERFACE macro to - implement an interface. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/howto-gobject-construction.html b/docs/reference/gobject/html/howto-gobject-construction.html deleted file mode 100644 index 5422c7898..000000000 --- a/docs/reference/gobject/html/howto-gobject-construction.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - -Object construction: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Object construction

-

- People often get confused when trying to construct their GObjects because of the - sheer number of different ways to hook into the objects's construction process: it is - difficult to figure which is the correct, recommended way. -

-

- Table 4, “g_object_new” shows what user-provided functions - are invoked during object instantiation and in which order they are invoked. - A user looking for the equivalent of the simple C++ constructor function should use - the instance_init method. It will be invoked after - all the parents’ instance_init - functions have been invoked. It cannot take arbitrary construction parameters - (as in C++) but if your object needs arbitrary parameters to complete initialization, - you can use construction properties. -

-

- Construction properties will be set only after all - instance_init functions have run. - No object reference will be returned to the client of g_object_new - until all the construction properties have been set. -

-

- It is important to note that object construction cannot ever - fail. If you require a fallible GObject construction, you can use the - GInitable and - GAsyncInitable - interfaces provided by the GIO library. -

-

- You should write the following code first: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
G_DEFINE_TYPE_WITH_PRIVATE (ViewerFile, viewer_file, G_TYPE_OBJECT)
-
-static void
-viewer_file_class_init (ViewerFileClass *klass)
-{
-}
-
-static void
-viewer_file_init (ViewerFile *self)
-{
-  ViewerFilePrivate *priv = viewer_file_get_instance_private (self);
-
-  /* initialize all public and private members to reasonable default values.
-   * They are all automatically initialized to 0 to begin with. */
-}
-
- -

-

-

- If you need special construction properties (with - G_PARAM_CONSTRUCT_ONLY - set), install the properties in - the class_init() function, override the set_property() - and get_property() methods of the GObject class, - and implement them as described by the section called “Object properties”. -

-

- Property IDs must start from 1, as 0 is reserved for internal use by - GObject. -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
enum
-{
-  PROP_FILENAME = 1,
-  PROP_ZOOM_LEVEL,
-  N_PROPERTIES
-};
-
-static GParamSpec *obj_properties[N_PROPERTIES] = { NULL, };
-
-static void
-viewer_file_class_init (ViewerFileClass *klass)
-{
-  GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
-  object_class->set_property = viewer_file_set_property;
-  object_class->get_property = viewer_file_get_property;
-
-  obj_properties[PROP_FILENAME] =
-    g_param_spec_string ("filename",
-                         "Filename",
-                         "Name of the file to load and display from.",
-                         NULL  /* default value */,
-                         G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
-
-  obj_properties[PROP_ZOOM_LEVEL] =
-    g_param_spec_uint ("zoom-level",
-                       "Zoom level",
-                       "Zoom level to view the file at.",
-                       0  /* minimum value */,
-                       10 /* maximum value */,
-                       2  /* default value */,
-                       G_PARAM_READWRITE));
-
-  g_object_class_install_properties (object_class,
-                                     N_PROPERTIES,
-                                     obj_properties);
-}
-
- -

- If you need this, make sure you can build and run code similar to the - code shown above. Also, make sure your construct properties can be set - without side effects during construction. -

-

- Some people sometimes need to complete the initialization of a instance - of a type only after the properties passed to the constructors have been - set. This is possible through the use of the constructor() - class method as described in the section called “Object instantiation” or, - more simply, using the constructed() class method. - Note that the constructed() - virtual function will only be invoked after the properties marked as - G_PARAM_CONSTRUCT_ONLY or - G_PARAM_CONSTRUCT have been consumed, but - before the regular properties passed to g_object_new() - have been set. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/howto-gobject-destruction.html b/docs/reference/gobject/html/howto-gobject-destruction.html deleted file mode 100644 index 690d42ca5..000000000 --- a/docs/reference/gobject/html/howto-gobject-destruction.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - -Object destruction: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Object destruction

-

- Again, it is often difficult to figure out which mechanism to use to - hook into the object's destruction process: when the last - g_object_unref - function call is made, a lot of things happen as described in - Table 5, “g_object_unref”. -

-

- The destruction process of your object is in two phases: dispose and - finalize. This split is necessary to handle - potential cycles due to the nature of the reference counting mechanism - used by GObject, as well as dealing with temporary revival of - instances in case of signal emission during the destruction sequence. - See the section called “Reference counts and cycles” for more information. -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
struct _ViewerFilePrivate
-{
-  gchar *filename;
-  guint zoom_level;
-
-  GInputStream *input_stream;
-};
-
-G_DEFINE_TYPE_WITH_PRIVATE (ViewerFile, viewer_file, G_TYPE_OBJECT)
-
-static void
-viewer_file_dispose (GObject *gobject)
-{
-  ViewerFilePrivate *priv = viewer_file_get_instance_private (VIEWER_FILE (gobject));
-
-  /* In dispose(), you are supposed to free all types referenced from this
-   * object which might themselves hold a reference to self. Generally,
-   * the most simple solution is to unref all members on which you own a 
-   * reference.
-   */
-
-  /* dispose() might be called multiple times, so we must guard against
-   * calling g_object_unref() on an invalid GObject by setting the member
-   * NULL; g_clear_object() does this for us.
-   */
-  g_clear_object (&priv->input_stream);
-
-  /* Always chain up to the parent class; there is no need to check if
-   * the parent class implements the dispose() virtual function: it is
-   * always guaranteed to do so
-   */
-  G_OBJECT_CLASS (viewer_file_parent_class)->dispose (gobject);
-}
-
-static void
-viewer_file_finalize (GObject *gobject)
-{
-  ViewerFilePrivate *priv = viewer_file_get_instance_private (VIEWER_FILE (gobject));
-
-  g_free (priv->filename);
-
-  /* Always chain up to the parent class; as with dispose(), finalize()
-   * is guaranteed to exist on the parent's class virtual function table
-   */
-  G_OBJECT_CLASS (viewer_file_parent_class)->finalize (gobject);
-}
-
-static void
-viewer_file_class_init (ViewerFileClass *klass)
-{
-  GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
-  object_class->dispose = viewer_file_dispose;
-  object_class->finalize = viewer_file_finalize;
-}
-
-static void
-viewer_file_init (ViewerFile *self);
-{
-  ViewerFilePrivate *priv = viewer_file_get_instance_private (self);
-
-  priv->input_stream = g_object_new (VIEWER_TYPE_INPUT_STREAM, NULL);
-  priv->filename = /* would be set as a property */;
-}
-
- -

-

-

- It is possible that object methods might be invoked after dispose is - run and before finalize runs. GObject does not consider this to be a - program error: you must gracefully detect this and neither crash nor - warn the user, by having a disposed instance revert to an inert state. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/howto-gobject-methods.html b/docs/reference/gobject/html/howto-gobject-methods.html deleted file mode 100644 index a66a8c3ea..000000000 --- a/docs/reference/gobject/html/howto-gobject-methods.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - -Object methods: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Object methods

-

- Just as with C++, there are many different ways to define object - methods and extend them: the following list and sections draw on - C++ vocabulary. (Readers are expected to know basic C++ concepts. - Those who have not had to write C++ code recently can refer to e.g. - http://www.cplusplus.com/doc/tutorial/ to refresh - their memories.) -

-
    -
  • - non-virtual public methods, -

  • -
  • - virtual public methods and -

  • -
  • - virtual private methods -

  • -
-

-

-
-

-Non-virtual public methods

-

- These are the simplest, providing a simple method which - acts on the object. Provide a function - prototype in the header and an implementation of that prototype - in the source file. -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
/* declaration in the header. */
-void viewer_file_open (ViewerFile  *self,
-                       GError     **error);
-
-/* implementation in the source file */
-void
-viewer_file_open (ViewerFile  *self,
-                  GError     **error)
-{
-  g_return_if_fail (VIEWER_IS_FILE (self));
-  g_return_if_fail (error == NULL || *error == NULL);
-
-  /* do stuff here. */
-}
-
- -

-

-
-
-

-Virtual public methods

-

- This is the preferred way to create GObjects with overridable methods: -

-
    -
  • - Define the common method and its virtual function in the - class structure in the public header -

  • -
  • - Define the common method in the header file and implement it in the - source file -

  • -
  • - Implement a base version of the virtual function in the source - file and initialize the virtual function pointer to this - implementation in the object’s class_init - function; or leave it as NULL for a ‘pure - virtual’ method which must be overridden by derived classes -

  • -
  • - Re-implement the virtual function in each derived class which needs - to override it -

  • -
-

-

-

- Note that virtual functions can only be defined if the class is - derivable, declared using - G_DECLARE_DERIVABLE_TYPE - so the class structure can be defined. -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
/* declaration in viewer-file.h. */
-#define VIEWER_TYPE_FILE viewer_file_get_type ()
-G_DECLARE_DERIVABLE_TYPE (ViewerFile, viewer_file, VIEWER, FILE, GObject)
-
-struct _ViewerFileClass
-{
-  GObjectClass parent_class;
-
-  /* stuff */
-  void (*open) (ViewerFile  *self,
-                GError     **error);
-
-  /* Padding to allow adding up to 12 new virtual functions without
-   * breaking ABI. */
-  gpointer padding[12];
-};
-
-void viewer_file_open (ViewerFile  *self,
-                       GError     **error);
-
-/* implementation in viewer-file.c */
-void
-viewer_file_open (ViewerFile  *self,
-                  GError     **error)
-{
-  ViewerFileClass *klass;
-
-  g_return_if_fail (VIEWER_IS_FILE (self));
-  g_return_if_fail (error == NULL || *error == NULL);
-
-  klass = VIEWER_FILE_GET_CLASS (self);
-  g_return_if_fail (klass->open != NULL);
-
-  klass->open (self, error);
-}
-
- -

- The code above simply redirects the open call - to the relevant virtual function. -

-

- It is possible to provide a default - implementation for this class method in the object's - class_init function: initialize the - klass->open field to a pointer to the - actual implementation. - By default, class methods that are not inherited are initialized to - NULL, and thus are to be considered "pure virtual". -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
static void
-viewer_file_real_close (ViewerFile  *self,
-                        GError     **error)
-{
-  /* Default implementation for the virtual method. */
-}
-
-static void
-viewer_file_class_init (ViewerFileClass *klass)
-{
-  /* this is not necessary, except for demonstration purposes.
-   *
-   * pure virtual method: mandates implementation in children.
-   */
-  klass->open = NULL;
-
-  /* merely virtual method. */
-  klass->close = viewer_file_real_close;
-}
-
-void
-viewer_file_open (ViewerFile  *self,
-                  GError     **error)
-{
-  ViewerFileClass *klass;
-
-  g_return_if_fail (VIEWER_IS_FILE (self));
-  g_return_if_fail (error == NULL || *error == NULL);
-
-  klass = VIEWER_FILE_GET_CLASS (self);
-
-  /* if the method is purely virtual, then it is a good idea to
-   * check that it has been overridden before calling it, and,
-   * depending on the intent of the class, either ignore it silently
-   * or warn the user.
-   */
-  g_return_if_fail (klass->open != NULL);
-  klass->open (self, error);
-}
-
-void
-viewer_file_close (ViewerFile  *self,
-                   GError     **error)
-{
-  ViewerFileClass *klass;
-
-  g_return_if_fail (VIEWER_IS_FILE (self));
-  g_return_if_fail (error == NULL || *error == NULL);
-
-  klass = VIEWER_FILE_GET_CLASS (self);
-  if (klass->close != NULL)
-    klass->close (self, error);
-}
-
- -

-

-
-
-

-Virtual private Methods

-

- These are very similar to virtual - public methods. They just don't - have a public function to call directly. The header - file contains only a declaration of the virtual function: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
/* declaration in viewer-file.h. */
-struct _ViewerFileClass
-{
-  GObjectClass parent;
-
-  /* Public virtual method as before. */
-  void     (*open)           (ViewerFile  *self,
-                              GError     **error);
-
-  /* Private helper function to work out whether the file can be loaded via
-   * memory mapped I/O, or whether it has to be read as a stream. */
-  gboolean (*can_memory_map) (ViewerFile *self);
-
-  /* Padding to allow adding up to 12 new virtual functions without
-   * breaking ABI. */
-  gpointer padding[12];
-};
-
-void viewer_file_open (ViewerFile *self, GError **error);
-
- -

- These virtual functions are often used to delegate part of the job - to child classes: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
/* this accessor function is static: it is not exported outside of this file. */
-static gboolean 
-viewer_file_can_memory_map (ViewerFile *self)
-{
-  return VIEWER_FILE_GET_CLASS (self)->can_memory_map (self);
-}
-
-void
-viewer_file_open (ViewerFile  *self,
-                  GError     **error)
-{
-  g_return_if_fail (VIEWER_IS_FILE (self));
-  g_return_if_fail (error == NULL || *error == NULL);
-
-  /*
-   * Try to load the file using memory mapped I/O, if the implementation of the
-   * class determines that is possible using its private virtual method.
-   */
-  if (viewer_file_can_memory_map (self))
-    {
-      /* Load the file using memory mapped I/O. */
-    }
-  else
-    {
-      /* Fall back to trying to load the file using streaming I/O… */
-    }
-}
-
- -

-

-

- Again, it is possible to provide a default implementation for this - private virtual function: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
static gboolean
-viewer_file_real_can_memory_map (ViewerFile *self)
-{
-  /* As an example, always return false. Or, potentially return true if the
-   * file is local. */
-  return FALSE;
-}
-
-static void
-viewer_file_class_init (ViewerFileClass *klass)
-{
-  /* non-pure virtual method; does not have to be implemented in children. */
-  klass->can_memory_map = viewer_file_real_can_memory_map;
-}
-
- -

-

-

- Derived classes can then override the method with code such as: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
static void
-viewer_audio_file_class_init (ViewerAudioFileClass *klass)
-{
-  ViewerFileClass *file_class = VIEWER_FILE_CLASS (klass);
-
-  /* implement pure virtual function. */
-  file_class->can_memory_map = viewer_audio_file_can_memory_map;
-}
-
- -

-

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/howto-gobject.html b/docs/reference/gobject/html/howto-gobject.html deleted file mode 100644 index ad6a0d7d0..000000000 --- a/docs/reference/gobject/html/howto-gobject.html +++ /dev/null @@ -1,286 +0,0 @@ - - - - -How to define and implement a new GObject: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-How to define and implement a new GObject

- -

- This chapter focuses on the implementation of a subtype of GObject, for - example to create a custom class hierarchy, or to subclass a GTK+ widget. -

-

- Throughout the chapter, a running example of a file viewer program is used, - which has a ViewerFile class to represent a single file being - viewed, and various derived classes for different types of files with - special functionality, such as audio files. The example application also - supports editing files (for example, to tweak a photo being viewed), using - a ViewerEditable interface. -

-
-

-Boilerplate header code

-

- The first step before writing the code for your GObject is to write the - type's header which contains the needed type, function and macro - definitions. Each of these elements is nothing but a convention which - is followed by almost all users of GObject, and has been refined over - multiple years of experience developing GObject-based code. If you are - writing a library, it is particularly important for you to adhere closely - to these conventions; users of your library will assume that you have. - Even if not writing a library, it will help other people who want to work - on your project. -

-

- Pick a name convention for your headers and source code and stick to it: -

-
    -
  • use a dash to separate the prefix from the typename: - viewer-file.h and viewer-file.c - (this is the convention used by Nautilus and most GNOME libraries).

  • -
  • use an underscore to separate the prefix from the - typename: viewer_file.h and - viewer_file.c.

  • -
  • Do not separate the prefix from the typename: - viewerfile.h and viewerfile.c. - (this is the convention used by GTK+)

  • -
-

- Some people like the first two solutions better: it makes reading file - names easier for those with poor eyesight. -

-

- The basic conventions for any header which exposes a GType are described - in the section called “Conventions”. -

-

- If you want to declare a type named ‘file’ in namespace ‘viewer’, name the - type instance ViewerFile and its class - ViewerFileClass (names are case sensitive). The - recommended method of declaring a type differs based on whether the type - is final or derivable. -

-

- Final types cannot be subclassed further, and should be the default choice - for new types — changing a final type to be derivable is always a change - that will be compatible with existing uses of the code, but the converse - will often cause problems. Final types are declared using - G_DECLARE_FINAL_TYPE, - and require a structure to hold the instance data to be declared in the - source code (not the header file). - -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
/*
- * Copyright/Licensing information.
- */
-
-/* inclusion guard */
-#ifndef __VIEWER_FILE_H__
-#define __VIEWER_FILE_H__
-
-#include <glib-object.h>
-/*
- * Potentially, include other headers on which this header depends.
- */
-
-G_BEGIN_DECLS
-
-/*
- * Type declaration.
- */
-#define VIEWER_TYPE_FILE viewer_file_get_type ()
-G_DECLARE_FINAL_TYPE (ViewerFile, viewer_file, VIEWER, FILE, GObject)
-
-/*
- * Method definitions.
- */
-ViewerFile *viewer_file_new (void);
-
-G_END_DECLS
-
-#endif /* __VIEWER_FILE_H__ */
-
- -

-

-

- Derivable types can be subclassed further, and their class and - instance structures form part of the public API which must not be changed - if API stability is cared about. They are declared using - G_DECLARE_DERIVABLE_TYPE: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
/*
- * Copyright/Licensing information.
- */
-
-/* inclusion guard */
-#ifndef __VIEWER_FILE_H__
-#define __VIEWER_FILE_H__
-
-#include <glib-object.h>
-/*
- * Potentially, include other headers on which this header depends.
- */
-
-G_BEGIN_DECLS
-
-/*
- * Type declaration.
- */
-#define VIEWER_TYPE_FILE viewer_file_get_type ()
-G_DECLARE_DERIVABLE_TYPE (ViewerFile, viewer_file, VIEWER, FILE, GObject)
-
-struct _ViewerFileClass
-{
-  GObjectClass parent_class;
-
-  /* Class virtual function fields. */
-  void (* open) (ViewerFile  *file,
-                 GError     **error);
-
-  /* Padding to allow adding up to 12 new virtual functions without
-   * breaking ABI. */
-  gpointer padding[12];
-};
-
-/*
- * Method definitions.
- */
-ViewerFile *viewer_file_new (void);
-
-G_END_DECLS
-
-#endif /* __VIEWER_FILE_H__ */
-
- -

-

-

- The convention for header includes is to add the minimum number of - #include directives to the top of your headers needed - to compile that header. This - allows client code to simply #include "viewer-file.h", - without needing to know the prerequisites for - viewer-file.h. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/howto-interface-implement.html b/docs/reference/gobject/html/howto-interface-implement.html deleted file mode 100644 index 3ff746bcb..000000000 --- a/docs/reference/gobject/html/howto-interface-implement.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - -Implementing interfaces: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Implementing interfaces

-

- Once the interface is defined, implementing it is rather trivial. -

-

- The first step is to define a normal final GObject class exactly as in - the section called “Boilerplate header code”. -

-

- The second step is to implement ViewerFile by defining - it using - G_DEFINE_TYPE_WITH_CODE - and - G_IMPLEMENT_INTERFACE - instead of - G_DEFINE_TYPE: -

-
- - - - - - - -
1
-2
-3
-4
-5
static void viewer_file_editable_interface_init (ViewerEditableInterface *iface);
-
-G_DEFINE_TYPE_WITH_CODE (ViewerFile, viewer_file, G_TYPE_OBJECT,
-                         G_IMPLEMENT_INTERFACE (VIEWER_TYPE_EDITABLE,
-                                                viewer_file_editable_interface_init))
-
- -

- This definition is very much like all the similar functions seen - previously. The only interface-specific code present here is the use of - G_IMPLEMENT_INTERFACE. -

-

Classes can implement multiple interfaces by using multiple calls to - G_IMPLEMENT_INTERFACE - inside the call to - G_DEFINE_TYPE_WITH_CODE -

-

- viewer_file_editable_interface_init, the interface - initialization function: inside it every virtual method of the interface - must be assigned to its implementation: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
static void
-viewer_file_editable_save (ViewerFile  *self,
-                           GError     **error)
-{
-  g_print ("File implementation of editable interface save method: %s.\n",
-           self->filename);
-}
-
-static void
-viewer_file_editable_undo (ViewerFile *self,
-                           guint       n_steps)
-{
-  g_print ("File implementation of editable interface undo method: %s.\n",
-           self->filename);
-}
-
-static void
-viewer_file_editable_redo (ViewerFile *self,
-                           guint       n_steps)
-{
-  g_print ("File implementation of editable interface redo method: %s.\n",
-           self->filename);
-}
-
-static void
-viewer_file_editable_interface_init (ViewerEditableInterface *iface)
-{
-  iface->save = viewer_file_editable_save;
-  iface->undo = viewer_file_editable_undo;
-  iface->redo = viewer_file_editable_redo;
-}
-
-static void
-viewer_file_init (ViewerFile *self)
-{
-  /* Instance variable initialisation code. */
-}
-
- -

-

-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/howto-interface-override.html b/docs/reference/gobject/html/howto-interface-override.html deleted file mode 100644 index c92314f70..000000000 --- a/docs/reference/gobject/html/howto-interface-override.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - -Overriding interface methods: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Overriding interface methods

-

- If a base class already implements an interface and a derived - class needs to implement the same interface but needs to override certain - methods, you must reimplement the interface and set only the interface - methods which need overriding. -

-

- In this example, ViewerAudioFile is derived from - ViewerFile. Both implement the ViewerEditable - interface. ViewerAudioFile only implements one method of the - ViewerEditable interface and uses the base class implementation of - the other. -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
static void
-viewer_audio_file_editable_save (ViewerEditable  *editable,
-                                 GError         **error)
-{
-  ViewerAudioFile *self = VIEWER_AUDIO_FILE (editable);
-
-  g_print ("Audio file implementation of editable interface save method.\n");
-}
-
-static void
-viewer_audio_file_editable_interface_init (ViewerEditableInterface *iface)
-{
-  /* Override the implementation of save(). */
-  iface->save = viewer_audio_file_editable_save;
-
-  /*
-   * Leave iface->undo and ->redo alone, they are already set to the
-   * base class implementation.
-   */
-}
-
-G_DEFINE_TYPE_WITH_CODE (ViewerAudioFile, viewer_audio_file, VIEWER_TYPE_FILE,
-                         G_IMPLEMENT_INTERFACE (VIEWER_TYPE_EDITABLE,
-                                                viewer_audio_file_editable_interface_init))
-
-static void
-viewer_audio_file_class_init (ViewerAudioFileClass *klass)
-{
-  /* Nothing here. */
-}
-
-static void
-viewer_audio_file_init (ViewerAudioFile *self)
-{
-  /* Nothing here. */
-}
-
- -

-

-

- To access the base class interface implementation use - g_type_interface_peek_parent - from within an interface's default_init function. -

-

- To call the base class implementation of an interface - method from an derived class where than interface method has been - overridden, stash away the pointer returned from - g_type_interface_peek_parent - in a global variable. -

-

- In this example ViewerAudioFile overrides the - save interface method. In its overridden method - it calls the base class implementation of the same interface method. -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
static ViewerEditableInterface *viewer_editable_parent_interface = NULL;
-
-static void
-viewer_audio_file_editable_save (ViewerEditable  *editable,
-                                 GError         **error)
-{
-  ViewerAudioFile *self = VIEWER_AUDIO_FILE (editable);
-
-  g_print ("Audio file implementation of editable interface save method.\n");
-
-  /* Now call the base implementation */
-  viewer_editable_parent_interface->save (editable, error);
-}
-
-static void
-viewer_audio_file_editable_interface_init (ViewerEditableInterface *iface)
-{
-  viewer_editable_parent_interface = g_type_interface_peek_parent (iface);
-
-  iface->save = viewer_audio_file_editable_save;
-}
-
-G_DEFINE_TYPE_WITH_CODE (ViewerAudioFile, viewer_audio_file, VIEWER_TYPE_FILE,
-                         G_IMPLEMENT_INTERFACE (VIEWER_TYPE_EDITABLE,
-                                                viewer_audio_file_editable_interface_init))
-
-static void
-viewer_audio_file_class_init (ViewerAudioFileClass *klass)
-{
-  /* Nothing here. */
-}
-
-static void
-viewer_audio_file_init (ViewerAudioFile *self)
-{
-  /* Nothing here. */
-}
-
- -

-

-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/howto-interface-prerequisite.html b/docs/reference/gobject/html/howto-interface-prerequisite.html deleted file mode 100644 index b5561ecfc..000000000 --- a/docs/reference/gobject/html/howto-interface-prerequisite.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - -Interface definition prerequisites: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Interface definition prerequisites

-

- To specify that an interface requires the presence of other interfaces - when implemented, GObject introduces the concept of - prerequisites: it is possible to associate - a list of prerequisite types to an interface. For example, if - object A wishes to implement interface I1, and if interface I1 has a - prerequisite on interface I2, A has to implement both I1 and I2. -

-

- The mechanism described above is, in practice, very similar to - Java's interface I1 extends interface I2. The example below shows - the GObject equivalent: -

-
- - - - - - - -
1
-2
/* Make the ViewerEditableLossy interface require ViewerEditable interface. */
-G_DEFINE_INTERFACE (ViewerEditableLossy, viewer_editable_lossy, VIEWER_TYPE_EDITABLE);
-
- -

- In the G_DEFINE_INTERFACE - call above, the third parameter defines the prerequisite type. This - is the GType of either an interface or a class. In this case - the ViewerEditable interface is a prerequisite of - ViewerEditableLossy. The code - below shows how an implementation can implement both interfaces and - register their implementations: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-68
-69
-70
static void
-viewer_file_editable_lossy_compress (ViewerEditableLossy *editable)
-{
-  ViewerFile *self = VIEWER_FILE (editable);
-
-  g_print ("File implementation of lossy editable interface compress method: %s.\n",
-           self->filename);
-}
-
-static void
-viewer_file_editable_lossy_interface_init (ViewerEditableLossyInterface *iface)
-{
-  iface->compress = viewer_file_editable_lossy_compress;
-}
-
-static void
-viewer_file_editable_save (ViewerEditable  *editable,
-                           GError         **error)
-{
-  ViewerFile *self = VIEWER_FILE (editable);
-
-  g_print ("File implementation of editable interface save method: %s.\n",
-           self->filename);
-}
-
-static void
-viewer_file_editable_undo (ViewerEditable *editable,
-                           guint           n_steps)
-{
-  ViewerFile *self = VIEWER_FILE (editable);
-
-  g_print ("File implementation of editable interface undo method: %s.\n",
-           self->filename);
-}
-
-static void
-viewer_file_editable_redo (ViewerEditable *editable,
-                           guint           n_steps)
-{
-  ViewerFile *self = VIEWER_FILE (editable);
-
-  g_print ("File implementation of editable interface redo method: %s.\n",
-           self->filename);
-}
-
-static void
-viewer_file_editable_interface_init (ViewerEditableInterface *iface)
-{
-  iface->save = viewer_file_editable_save;
-  iface->undo = viewer_file_editable_undo;
-  iface->redo = viewer_file_editable_redo;
-}
-
-static void
-viewer_file_class_init (ViewerFileClass *klass)
-{
-  /* Nothing here. */
-}
-
-static void
-viewer_file_init (ViewerFile *self)
-{
-  /* Instance variable initialisation code. */
-}
-
-G_DEFINE_TYPE_WITH_CODE (ViewerFile, viewer_file, G_TYPE_OBJECT,
-                         G_IMPLEMENT_INTERFACE (VIEWER_TYPE_EDITABLE,
-                                                viewer_file_editable_interface_init)
-                         G_IMPLEMENT_INTERFACE (VIEWER_TYPE_EDITABLE_LOSSY,
-                                                viewer_file_editable_lossy_interface_init))
-
- -

- It is very important to notice that the order in which interface - implementations are added to the main object is not random: - g_type_add_interface_static, - which is called by - G_IMPLEMENT_INTERFACE, - must be invoked first on the interfaces which have no prerequisites and then on - the others. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/howto-interface-properties.html b/docs/reference/gobject/html/howto-interface-properties.html deleted file mode 100644 index df2695005..000000000 --- a/docs/reference/gobject/html/howto-interface-properties.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - -Interface properties: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Interface properties

-

- GObject interfaces can also have - properties. Declaration of the interface properties is similar to - declaring the properties of ordinary GObject types as explained in - the section called “Object properties”, except that - g_object_interface_install_property - is used to declare the properties instead of - g_object_class_install_property. -

-

- To include a property named 'autosave-frequency' of type gdouble in the - ViewerEditable interface example code above, we only need to - add one call in viewer_editable_default_init as shown - below: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
static void
-viewer_editable_default_init (ViewerEditableInterface *iface)
-{
-  g_object_interface_install_property (iface,
-                                       g_param_spec_double ("autosave-frequency",
-                                                            "Autosave frequency",
-                                                            "Frequency (in per-seconds) to autosave backups of the editable content at. "
-                                                            "Or zero to disable autosaves.",
-                                                            0.0,  /* minimum */
-                                                            G_MAXDOUBLE,  /* maximum */
-                                                            0.0,  /* default */
-                                                            G_PARAM_READWRITE));
-}
-
- -

-

-

- One point worth noting is that the declared property wasn't assigned an - integer ID. The reason being that integer IDs of properties are used - only inside the get_property and - set_property virtual methods. Since interfaces - declare but do not implement properties, there is no - need to assign integer IDs to them. -

-

- An implementation declares and defines its properties in the usual - way as explained in the section called “Object properties”, except for one - small change: it can declare the properties of the interface it - implements using g_object_class_override_property - instead of g_object_class_install_property. - The following code snippet shows the modifications needed in the - ViewerFile declaration and implementation above: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
struct _ViewerFile
-{
-  GObject parent_instance;
-
-  gdouble autosave_frequency;
-};
-
-enum
-{
-  PROP_AUTOSAVE_FREQUENCY = 1,
-  N_PROPERTIES
-};
-
-static void
-viewer_file_set_property (GObject      *object,
-                          guint         prop_id,
-                          const GValue *value,
-                          GParamSpec   *pspec)
-{
-  ViewerFile *file = VIEWER_FILE (object);
-
-  switch (prop_id)
-    {
-    case PROP_AUTOSAVE_FREQUENCY:
-      file->autosave_frequency = g_value_get_double (value);
-      break;
-
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-    }
-}
-
-static void
-viewer_file_get_property (GObject    *object,
-                          guint       prop_id,
-                          GValue     *value,
-                          GParamSpec *pspec)
-{
-  ViewerFile *file = VIEWER_FILE (object);
-
-  switch (prop_id)
-    {
-    case PROP_AUTOSAVE_FREQUENCY:
-      g_value_set_double (value, file->autosave_frequency);
-      break;
-
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
-      break;
-    }
-}
-
-static void
-viewer_file_class_init (ViewerFileClass *klass)
-{
-  GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
-  object_class->set_property = viewer_file_set_property;
-  object_class->get_property = viewer_file_get_property;
-
-  g_object_class_override_property (object_class, PROP_AUTOSAVE_FREQUENCY, "autosave-frequency");
-}
-
- -

-

-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/howto-interface.html b/docs/reference/gobject/html/howto-interface.html deleted file mode 100644 index 7f502c19a..000000000 --- a/docs/reference/gobject/html/howto-interface.html +++ /dev/null @@ -1,278 +0,0 @@ - - - - -How to define and implement interfaces: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-How to define and implement interfaces

- -
-

-Defining interfaces

-

- The theory behind how GObject interfaces work is given in - the section called “Non-instantiable classed types: interfaces”; this section covers how to - define and implement an interface. -

-

- The first step is to get the header right. This interface - defines two methods: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
/*
- * Copyright/Licensing information.
- */
-
-#ifndef __VIEWER_EDITABLE_H__
-#define __VIEWER_EDITABLE_H__
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-#define VIEWER_TYPE_EDITABLE viewer_editable_get_type ()
-G_DECLARE_INTERFACE (ViewerEditable, viewer_editable, VIEWER, EDITABLE, GObject)
-
-struct _ViewerEditableInterface
-{
-  GTypeInterface parent_iface;
-
-  void (*save) (ViewerEditable  *self,
-                GError         **error);
-  void (*undo) (ViewerEditable  *self,
-                guint            n_steps);
-  void (*redo) (ViewerEditable  *self,
-                guint            n_steps);
-};
-
-void viewer_editable_save (ViewerEditable  *self,
-                           GError         **error);
-void viewer_editable_undo (ViewerEditable  *self,
-                           guint            n_steps);
-void viewer_editable_redo (ViewerEditable  *self,
-                           guint            n_steps);
-
-G_END_DECLS
-
-#endif /* __VIEWER_EDITABLE_H__ */
-
- -

- This code is the same as the code for a normal GType - which derives from a GObject except for a few details: -

-
    -
  • - The _GET_CLASS function is called - _GET_IFACE (and is defined by - G_DECLARE_INTERFACE). -

  • -
  • - The instance type, ViewerEditable, is not fully defined: it is - used merely as an abstract type which represents an instance of - whatever object which implements the interface. -

  • -
  • - The parent of the ViewerEditableInterface is - GTypeInterface, not GObjectClass. -

  • -
-

-

-

- The implementation of the ViewerEditable type itself is trivial: -

-
    -
  • G_DEFINE_INTERFACE - creates a viewer_editable_get_type function which registers the - type in the type system. The third argument is used to define a - prerequisite interface - (which we'll talk about more later). Just pass 0 for this - argument when an interface has no prerequisite. -

  • -
  • viewer_editable_default_init is expected - to register the interface's signals if there are any (we will see a bit - later how to use them).

  • -
  • The interface methods viewer_editable_save, - viewer_editable_undo and viewer_editable_redo dereference the interface - structure to access its associated interface function and call it. -

  • -
-

-

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
G_DEFINE_INTERFACE (ViewerEditable, viewer_editable, G_TYPE_OBJECT);
-
-static void
-viewer_editable_default_init (ViewerEditableInterface *iface)
-{
-    /* add properties and signals to the interface here */
-}
-
-void
-viewer_editable_save (ViewerEditable  *self,
-                      GError         **error)
-{
-  ViewerEditableInterface *iface;
-
-  g_return_if_fail (VIEWER_IS_EDITABLE (self));
-  g_return_if_fail (error == NULL || *error == NULL);
-
-  iface = VIEWER_EDITABLE_GET_IFACE (self);
-  g_return_if_fail (iface->save != NULL);
-  iface->save (self, error);
-}
-
-void
-viewer_editable_undo (ViewerEditable *self,
-                      guint           n_steps)
-{
-  ViewerEditableInterface *iface;
-
-  g_return_if_fail (VIEWER_IS_EDITABLE (self));
-
-  iface = VIEWER_EDITABLE_GET_IFACE (self);
-  g_return_if_fail (iface->undo != NULL);
-  iface->undo (self, n_steps);
-}
-
-void
-viewer_editable_redo (ViewerEditable *self,
-                      guint           n_steps)
-{
-  ViewerEditableInterface *iface;
-
-  g_return_if_fail (VIEWER_IS_EDITABLE (self));
-
-  iface = VIEWER_EDITABLE_GET_IFACE (self);
-  g_return_if_fail (iface->redo != NULL);
-  iface->redo (self, n_steps);
-}
-
- -

-

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/howto-signals.html b/docs/reference/gobject/html/howto-signals.html deleted file mode 100644 index 8f2a50267..000000000 --- a/docs/reference/gobject/html/howto-signals.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - -How to create and use signals: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-How to create and use signals

- -

- The signal system in GType is pretty complex and - flexible: it is possible for its users to connect at runtime any - number of callbacks (implemented in any language for which a binding - exists) - [8] - to any signal and to stop the emission of any signal at any - state of the signal emission process. This flexibility makes it - possible to use GSignal for much more than just emitting signals to - multiple clients. -

-
-

-Simple use of signals

-

- The most basic use of signals is to implement event - notification. For example, given a ViewerFile object with - a write method, a signal could be emitted whenever - the file is changed using that method. - The code below shows how the user can connect a callback to the - "changed" signal. -

-
- - - - - - - -
1
-2
-3
-4
-5
file = g_object_new (VIEWER_FILE_TYPE, NULL);
-
-g_signal_connect (file, "changed", (GCallback) changed_event, NULL);
-
-viewer_file_write (file, buffer, strlen (buffer));
-
- -

-

-

- The ViewerFile signal is registered in the - class_init function: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
file_signals[CHANGED] = 
-  g_signal_newv ("changed",
-                 G_TYPE_FROM_CLASS (object_class),
-                 G_SIGNAL_RUN_LAST | G_SIGNAL_NO_RECURSE | G_SIGNAL_NO_HOOKS,
-                 NULL /* closure */,
-                 NULL /* accumulator */,
-                 NULL /* accumulator data */,
-                 NULL /* C marshaller */,
-                 G_TYPE_NONE /* return_type */,
-                 0     /* n_params */,
-                 NULL  /* param_types */);
-
- -

- and the signal is emitted in viewer_file_write: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
void
-viewer_file_write (ViewerFile   *self,
-                   const guint8 *buffer,
-                   gsize         size)
-{
-  g_return_if_fail (VIEWER_IS_FILE (self));
-  g_return_if_fail (buffer != NULL || size == 0);
-
-  /* First write data. */
-
-  /* Then, notify user of data written. */
-  g_signal_emit (self, file_signals[CHANGED], 0 /* details */);
-}
-
- -

- As shown above, the details parameter can safely be set to zero if no - detail needs to be conveyed. For a discussion of what it can be used for, - see the section called “The detail argument” -

-

- The C signal marshaller should always be NULL, in which - case the best marshaller for the given closure type will be chosen by - GLib. This may be an internal marshaller specific to the closure type, or - g_cclosure_marshal_generic, which implements generic - conversion of arrays of parameters to C callback invocations. GLib used to - require the user to write or generate a type-specific marshaller and pass - that, but that has been deprecated in favour of automatic selection of - marshallers. -

-

- Note that g_cclosure_marshal_generic is slower than - non-generic marshallers, so should be avoided for performance critical - code. However, performance critical code should rarely be using signals - anyway, as emitting a signal blocks on emitting it to all listeners, which - has potentially unbounded cost. -

-
-
-

-

[8] A Python callback can be connected to any signal on any - C-based GObject, and vice versa, assuming that the Python object - inherits from GObject.

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/index.html b/docs/reference/gobject/html/index.html deleted file mode 100644 index 321960b23..000000000 --- a/docs/reference/gobject/html/index.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - -GObject Reference Manual: GObject Reference Manual - - - - - - - -
-
-
-
-

- for GObject 2.52.3 - - The latest version of this documentation can be found on-line at - https://developer.gnome.org/gobject/unstable/. -

-
-
-
-
-
Introduction
-
I. Concepts
-
-
Background
-
-
Data types and programming
-
Exporting a C API
-
-
The GLib Dynamic Type System
-
-
Copy functions
-
Conventions
-
Non-instantiable non-classed fundamental types
-
Instantiable classed types: objects
-
Initialization and Destruction
-
Non-instantiable classed types: interfaces
-
-
Interface Initialization
-
Interface Destruction
-
-
-
The GObject base class
-
-
Object instantiation
-
Object memory management
-
-
Reference count
-
Weak References
-
Reference counts and cycles
-
-
Object properties
-
Accessing multiple properties at once
-
-
The GObject messaging system
-
-
Closures
-
-
C Closures
-
Non-C closures (for the fearless)
-
-
Signals
-
-
Signal registration
-
Signal connection
-
Signal emission
-
The detail argument
-
-
-
-
II. API Reference
-
-
-Type Information — The GLib Runtime type identification and - management system -
-
-GTypePlugin — An interface for dynamically loadable types -
-
-GTypeModule — Type loading modules -
-
-GObject — The base object type -
-
-Enumeration and Flag Types — Enumeration and flags types -
-
-Boxed Types — A mechanism to wrap opaque C structures registered - by the type system -
-
-Generic values — A polymorphic type that can hold values of any - other type -
-
-Parameters and Values — Standard Parameter and Value Types -
-
-GParamSpec — Metadata for parameter specifications -
-
-Varargs Value Collection — Converting varargs to generic values -
-
-Signals — A means for customization of object behaviour - and a general purpose notification mechanism -
-
-Closures — Functions as first-class objects -
-
-Value arrays — A container structure to maintain an array of - generic values -
-
-GBinding — Bind two object properties -
-
-
III. Tools Reference
-
-
-glib-mkenums — C language enum description generation utility -
-
-glib-genmarshal — C code marshaller generation utility for GLib closures -
-
-gobject-query — display a tree of types -
-
-
IV. Tutorial
-
-
How to define and implement a new GObject
-
-
Boilerplate header code
-
Boilerplate code
-
Object construction
-
Object destruction
-
Object methods
-
-
Non-virtual public methods
-
Virtual public methods
-
Virtual private Methods
-
-
Chaining up
-
-
How to define and implement interfaces
-
-
Defining interfaces
-
Implementing interfaces
-
Interface definition prerequisites
-
Interface properties
-
Overriding interface methods
-
-
How to create and use signals
-
Simple use of signals
-
-
V. Related Tools
-
-
Vala
-
GObject builder
-
Graphical inspection of GObjects
-
Debugging reference count problems
-
Writing API docs
-
-
Index
-
Annotation Glossary
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/left-insensitive.png b/docs/reference/gobject/html/left-insensitive.png deleted file mode 100644 index 3269393a7..000000000 Binary files a/docs/reference/gobject/html/left-insensitive.png and /dev/null differ diff --git a/docs/reference/gobject/html/left.png b/docs/reference/gobject/html/left.png deleted file mode 100644 index 2abde032b..000000000 Binary files a/docs/reference/gobject/html/left.png and /dev/null differ diff --git a/docs/reference/gobject/html/pr01.html b/docs/reference/gobject/html/pr01.html deleted file mode 100644 index e498b962e..000000000 --- a/docs/reference/gobject/html/pr01.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - -Introduction: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Introduction

-

- Most modern programming languages come with their own native object - systems and additional fundamental algorithmic language constructs. - Just as GLib serves as an implementation of such fundamental - types and algorithms (linked lists, hash tables and so forth), the - GLib Object System provides the required implementations of a - flexible, extensible, and intentionally easy to map (into other - languages) object-oriented framework for C. - The substantial elements that are provided can be summarized as: -

-
    -
  • - A generic type system to register arbitrary single-inherited - flat and deep derived types as well as interfaces for - structured types. - It takes care of creation, initialization and memory management - of the assorted object and class structures, maintains - parent/child relationships and deals with dynamic implementations - of such types. That is, their type specific implementations are - relocatable/unloadable during runtime. -

  • -
  • - A collection of fundamental type implementations, such as integers, - doubles, enums and structured types, to name a few. -

  • -
  • - A sample fundamental type implementation to base object hierarchies - upon - the GObject fundamental type. -

  • -
  • - A signal system that allows very flexible user customization of - virtual/overridable object methods and can serve as a powerful - notification mechanism. -

  • -
  • - An extensible parameter/value system, supporting all the provided - fundamental types that can be used to generically handle object - properties or otherwise parameterized types. -

  • -
-

-

-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/pt01.html b/docs/reference/gobject/html/pt01.html deleted file mode 100644 index 937c88177..000000000 --- a/docs/reference/gobject/html/pt01.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - -Part I. Concepts: GObject Reference Manual - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/reference/gobject/html/pt02.html b/docs/reference/gobject/html/pt02.html deleted file mode 100644 index 269d38fbf..000000000 --- a/docs/reference/gobject/html/pt02.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - -Part IV. Tutorial: GObject Reference Manual - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/reference/gobject/html/pt03.html b/docs/reference/gobject/html/pt03.html deleted file mode 100644 index 271ca8993..000000000 --- a/docs/reference/gobject/html/pt03.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - -Part V. Related Tools: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Part V. Related Tools

-
-
-

- Several useful developer tools have been build around GObject - technology. The next sections briefly introduce them and link to - the respective project pages. -

-

- For example, writing GObjects is often seen as a tedious task. It - requires a lot of typing and just doing a copy/paste requires a - great deal of care. A lot of projects and scripts have been - written to generate GObject skeleton form boilerplate code, or - even translating higher-level language into plain C. -

- -
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/right-insensitive.png b/docs/reference/gobject/html/right-insensitive.png deleted file mode 100644 index 4c95785b9..000000000 Binary files a/docs/reference/gobject/html/right-insensitive.png and /dev/null differ diff --git a/docs/reference/gobject/html/right.png b/docs/reference/gobject/html/right.png deleted file mode 100644 index 76260ec88..000000000 Binary files a/docs/reference/gobject/html/right.png and /dev/null differ diff --git a/docs/reference/gobject/html/rn01.html b/docs/reference/gobject/html/rn01.html deleted file mode 100644 index d983f6883..000000000 --- a/docs/reference/gobject/html/rn01.html +++ /dev/null @@ -1,84 +0,0 @@ - - - - -API Reference: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-

-API Reference

-
-
-
-

Table of Contents

-
-
-Type Information — The GLib Runtime type identification and - management system -
-
-GTypePlugin — An interface for dynamically loadable types -
-
-GTypeModule — Type loading modules -
-
-GObject — The base object type -
-
-Enumeration and Flag Types — Enumeration and flags types -
-
-Boxed Types — A mechanism to wrap opaque C structures registered - by the type system -
-
-Generic values — A polymorphic type that can hold values of any - other type -
-
-Parameters and Values — Standard Parameter and Value Types -
-
-GParamSpec — Metadata for parameter specifications -
-
-Varargs Value Collection — Converting varargs to generic values -
-
-Signals — A means for customization of object behaviour - and a general purpose notification mechanism -
-
-Closures — Functions as first-class objects -
-
-Value arrays — A container structure to maintain an array of - generic values -
-
-GBinding — Bind two object properties -
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/rn02.html b/docs/reference/gobject/html/rn02.html deleted file mode 100644 index 791cd8879..000000000 --- a/docs/reference/gobject/html/rn02.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - -Tools Reference: GObject Reference Manual - - - - - - - - - - - - - - - - -
-
-

-Tools Reference

-
-
-
-

Table of Contents

-
-
-glib-mkenums — C language enum description generation utility -
-
-glib-genmarshal — C code marshaller generation utility for GLib closures -
-
-gobject-query — display a tree of types -
-
-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/signal.html b/docs/reference/gobject/html/signal.html deleted file mode 100644 index 45cc7b0de..000000000 --- a/docs/reference/gobject/html/signal.html +++ /dev/null @@ -1,372 +0,0 @@ - - - - -Signals: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Signals

-

- GObject's signals have nothing to do with standard UNIX signals: they connect - arbitrary application-specific events with any number of listeners. - For example, in GTK+, every user event (keystroke or mouse move) is received - from the windowing system and generates a GTK+ event in the form of a signal emission - on the widget object instance. -

-

- Each signal is registered in the type system together with the type on which - it can be emitted: users of the type are said to connect - to the signal on a given type instance when they register a closure to be - invoked upon the signal emission. Users can also emit the signal by themselves - or stop the emission of the signal from within one of the closures connected - to the signal. -

-

- When a signal is emitted on a given type instance, all the closures - connected to this signal on this type instance will be invoked. All the closures - connected to such a signal represent callbacks whose signature looks like: -

-
- - - - - - - -
1
return_type function_callback (gpointer instance,, gpointer user_data);
-
- -

-

-
-

-Signal registration

-

- To register a new signal on an existing type, we can use any of g_signal_newv, - g_signal_new_valist or g_signal_new functions: -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
guint g_signal_newv (const gchar        *signal_name,
-                     GType               itype,
-                     GSignalFlags        signal_flags,
-                     GClosure           *class_closure,
-                     GSignalAccumulator  accumulator,
-                     gpointer            accu_data,
-                     GSignalCMarshaller  c_marshaller,
-                     GType               return_type,
-                     guint               n_params,
-                     GType              *param_types);
-
- -

- The number of parameters to these functions is a bit intimidating but they are relatively - simple: -

-
    -
  • - signal_name: is a string which can be used to uniquely identify a given signal. -

  • -
  • - itype: is the instance type on which this signal can be emitted. -

  • -
  • - signal_flags: partly defines the order in which closures which were connected to the - signal are invoked. -

  • -
  • - class_closure: this is the default closure for the signal: if it is not NULL upon - the signal emission, it will be invoked upon this emission of the signal. The - moment where this closure is invoked compared to other closures connected to that - signal depends partly on the signal_flags. -

  • -
  • - accumulator: this is a function pointer which is invoked after each closure - has been invoked. If it returns FALSE, signal emission is stopped. If it returns - TRUE, signal emission proceeds normally. It is also used to compute the return - value of the signal based on the return value of all the invoked closures. - For example, an accumulator could ignore - NULL returns from closures; or it - could build a list of the values returned by the - closures. -

  • -
  • - accumulator_data: this pointer will be passed down to each invocation of the - accumulator during emission. -

  • -
  • - c_marshaller: this is the default C marshaller for any closure which is connected to - this signal. -

  • -
  • - return_type: this is the type of the return value of the signal. -

  • -
  • - n_params: this is the number of parameters this signal takes. -

  • -
  • - param_types: this is an array of GTypes which indicate the type of each parameter - of the signal. The length of this array is indicated by n_params. -

  • -
-

-

-

- As you can see from the above definition, a signal is basically a description - of the closures which can be connected to this signal and a description of the - order in which the closures connected to this signal will be invoked. -

-
-
-

-Signal connection

-

- If you want to connect to a signal with a closure, you have three possibilities: -

-
    -
  • - You can register a class closure at signal registration: this is a - system-wide operation. i.e.: the class closure will be invoked during each emission - of a given signal on any of the instances of the type which supports that signal. -

  • -
  • - You can use g_signal_override_class_closure which - overrides the class closure of a given type. It is possible to call this function - only on a derived type of the type on which the signal was registered. - This function is of use only to language bindings. -

  • -
  • - You can register a closure with the g_signal_connect - family of functions. This is an instance-specific operation: the closure - will be invoked only during emission of a given signal on a given instance. -

  • -
-

- It is also possible to connect a different kind of callback on a given signal: - emission hooks are invoked whenever a given signal is emitted whatever the instance on - which it is emitted. Emission hooks are used for example to get all mouse_clicked - emissions in an application to be able to emit the small mouse click sound. - Emission hooks are connected with g_signal_add_emission_hook - and removed with g_signal_remove_emission_hook. -

-
-
-

-Signal emission

-

- Signal emission is done through the use of the g_signal_emit family - of functions. -

-
- - - - - - - -
1
-2
-3
-4
void g_signal_emitv (const GValue *instance_and_params,
-                     guint         signal_id,
-                     GQuark        detail,
-                     GValue       *return_value);
-
- -

-

-
    -
  • - The instance_and_params array of GValues contains the list of input - parameters to the signal. The first element of the array is the - instance pointer on which to invoke the signal. The following elements of - the array contain the list of parameters to the signal. -

  • -
  • - signal_id identifies the signal to invoke. -

  • -
  • - detail identifies the specific detail of the signal to invoke. A detail is a kind of - magic token/argument which is passed around during signal emission and which is used - by closures connected to the signal to filter out unwanted signal emissions. In most - cases, you can safely set this value to zero. See the section called “The detail argument” for - more details about this parameter. -

  • -
  • - return_value holds the return value of the last closure invoked during emission if - no accumulator was specified. If an accumulator was specified during signal creation, - this accumulator is used to calculate the return value as a function of the return - values of all the closures invoked during emission. - If no closure is invoked during - emission, the return_value is nonetheless initialized to zero/null. -

  • -
-

-

-

- Signal emission can be decomposed in 5 steps: -

-
    -
  1. - RUN_FIRST: if the - G_SIGNAL_RUN_FIRST flag was used - during signal registration and if there exists a class closure for this signal, - the class closure is invoked. -

  2. -
  3. - EMISSION_HOOK: if any emission hook was added to - the signal, they are invoked from first to last added. Accumulate return values. -

  4. -
  5. - HANDLER_RUN_FIRST: if any closure were connected - with the g_signal_connect family of - functions, and if they are not blocked (with the g_signal_handler_block - family of functions) they are run here, from first to last connected. -

  6. -
  7. - RUN_LAST: if the G_SIGNAL_RUN_LAST - flag was set during registration and if a class closure - was set, it is invoked here. -

  8. -
  9. - HANDLER_RUN_LAST: if any closure were connected - with the g_signal_connect_after family of - functions, if they were not invoked during HANDLER_RUN_FIRST and if they - are not blocked, they are run here, from first to last connected. -

  10. -
  11. - RUN_CLEANUP: if the G_SIGNAL_RUN_CLEANUP flag - was set during registration and if a class closure was set, - it is invoked here. Signal emission is completed here. -

  12. -
-

-

-

- If, at any point during emission (except in RUN_CLEANUP state), one of the - closures or emission hook stops the signal emission with - g_signal_stop_emission, - emission jumps to RUN_CLEANUP state. -

-

- If, at any point during emission, one of the closures or emission hook - emits the same signal on the same instance, emission is restarted from - the RUN_FIRST state. -

-

- The accumulator function is invoked in all states, after invocation - of each closure (except in RUN_EMISSION_HOOK and - RUN_CLEANUP). It accumulates - the closure return value into the signal return value and returns TRUE or - FALSE. If, at any point, it does not return TRUE, emission jumps - to RUN_CLEANUP state. -

-

- If no accumulator function was provided, the value returned by the last handler - run will be returned by g_signal_emit. -

-
-
-

-The detail argument

-

All the functions related to signal emission or signal connection have a parameter - named the detail. Sometimes, this parameter is hidden by the API - but it is always there, in one form or another. -

-

- Of the three main connection functions, - only one has an explicit detail parameter as a GQuark: - g_signal_connect_closure_by_id. - [6] -

-

- The two other functions, - g_signal_connect_closure and - g_signal_connect_data - hide the detail parameter in the signal name identification. - Their detailed_signal parameter is a - string which identifies the name of the signal to connect to. - The format of this string should match - signal_name::detail_name. For example, - connecting to the signal named - notify::cursor_position will actually - connect to the signal named notify with the - cursor_position detail. - Internally, the detail string is transformed to a GQuark if it is present. -

-

- Of the four main signal emission functions, one hides it in its - signal name parameter: - g_signal_connect. - The other three have an explicit detail parameter as a - GQuark again: - g_signal_emit, - g_signal_emitv and - g_signal_emit_valist. -

-

- If a detail is provided by the user to the emission function, it is used during emission to match - against the closures which also provide a detail. - If a closure's detail does not match the detail provided by the user, it - will not be invoked (even though it is connected to a signal which is - being emitted). -

-

- This completely optional filtering mechanism is mainly used as an optimization for signals - which are often emitted for many different reasons: the clients can filter out which events they are - interested in before the closure's marshalling code runs. For example, this is used extensively - by the notify signal of GObject: whenever a property is modified on a GObject, - instead of just emitting the notify signal, GObject associates as a detail to this - signal emission the name of the property modified. This allows clients who wish to be notified of changes - to only one property to filter most events before receiving them. -

-

- As a simple rule, users can and should set the detail parameter to zero: this will disable completely - this optional filtering for that signal. -

-
-
-

-

[6] A GQuark is an integer which uniquely represents a string. It is possible to transform - back and forth between the integer and string representations with the functions - g_quark_from_string and g_quark_to_string. -

-
-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/style.css b/docs/reference/gobject/html/style.css deleted file mode 100644 index 367542097..000000000 --- a/docs/reference/gobject/html/style.css +++ /dev/null @@ -1,479 +0,0 @@ -body -{ - font-family: cantarell, sans-serif; -} -.synopsis, .classsynopsis -{ - /* tango:aluminium 1/2 */ - background: #eeeeec; - background: rgba(238, 238, 236, 0.5); - border: solid 1px rgb(238, 238, 236); - padding: 0.5em; -} -.programlisting -{ - /* tango:sky blue 0/1 */ - /* fallback for no rgba support */ - background: #e6f3ff; - border: solid 1px #729fcf; - background: rgba(114, 159, 207, 0.1); - border: solid 1px rgba(114, 159, 207, 0.2); - padding: 0.5em; -} -.variablelist -{ - padding: 4px; - margin-left: 3em; -} -.variablelist td:first-child -{ - vertical-align: top; -} - -div.gallery-float -{ - float: left; - padding: 10px; -} -div.gallery-float img -{ - border-style: none; -} -div.gallery-spacer -{ - clear: both; -} - -a, a:visited -{ - text-decoration: none; - /* tango:sky blue 2 */ - color: #3465a4; -} -a:hover -{ - text-decoration: underline; - /* tango:sky blue 1 */ - color: #729fcf; -} - -div.informaltable table -{ - border-collapse: separate; - border-spacing: 1em 0.3em; - border: none; -} - -div.informaltable table td, div.informaltable table th -{ - vertical-align: top; -} - -.function_type, -.variable_type, -.property_type, -.signal_type, -.parameter_name, -.struct_member_name, -.union_member_name, -.define_keyword, -.datatype_keyword, -.typedef_keyword -{ - text-align: right; -} - -/* dim non-primary columns */ -.c_punctuation, -.function_type, -.variable_type, -.property_type, -.signal_type, -.define_keyword, -.datatype_keyword, -.typedef_keyword, -.property_flags, -.signal_flags, -.parameter_annotations, -.enum_member_annotations, -.struct_member_annotations, -.union_member_annotations -{ - color: #888a85; -} - -.function_type a, -.function_type a:visited, -.function_type a:hover, -.property_type a, -.property_type a:visited, -.property_type a:hover, -.signal_type a, -.signal_type a:visited, -.signal_type a:hover, -.signal_flags a, -.signal_flags a:visited, -.signal_flags a:hover -{ - color: #729fcf; -} - -td p -{ - margin: 0.25em; -} - -div.table table -{ - border-collapse: collapse; - border-spacing: 0px; - /* tango:aluminium 3 */ - border: solid 1px #babdb6; -} - -div.table table td, div.table table th -{ - /* tango:aluminium 3 */ - border: solid 1px #babdb6; - padding: 3px; - vertical-align: top; -} - -div.table table th -{ - /* tango:aluminium 2 */ - background-color: #d3d7cf; -} - -h4 -{ - color: #555753; - margin-top: 1em; - margin-bottom: 1em; -} - -hr -{ - /* tango:aluminium 1 */ - color: #d3d7cf; - background: #d3d7cf; - border: none 0px; - height: 1px; - clear: both; - margin: 2.0em 0em 2.0em 0em; -} - -dl.toc dt -{ - padding-bottom: 0.25em; -} - -dl.toc > dt -{ - padding-top: 0.25em; - padding-bottom: 0.25em; - font-weight: bold; -} - -dl.toc > dl -{ - padding-bottom: 0.5em; -} - -.parameter -{ - font-style: normal; -} - -.footer -{ - padding-top: 3.5em; - /* tango:aluminium 3 */ - color: #babdb6; - text-align: center; - font-size: 80%; -} - -.informalfigure, -.figure -{ - margin: 1em; -} - -.informalexample, -.example -{ - margin-top: 1em; - margin-bottom: 1em; -} - -.warning -{ - /* tango:orange 0/1 */ - background: #ffeed9; - background: rgba(252, 175, 62, 0.1); - border-color: #ffb04f; - border-color: rgba(252, 175, 62, 0.2); -} -.note -{ - /* tango:chameleon 0/0.5 */ - background: #d8ffb2; - background: rgba(138, 226, 52, 0.1); - border-color: #abf562; - border-color: rgba(138, 226, 52, 0.2); -} -div.blockquote -{ - border-color: #eeeeec; -} -.note, .warning, div.blockquote -{ - padding: 0.5em; - border-width: 1px; - border-style: solid; - margin: 2em; -} -.note p, .warning p -{ - margin: 0; -} - -div.warning h3.title, -div.note h3.title -{ - display: none; -} - -p + div.section -{ - margin-top: 1em; -} - -div.refnamediv, -div.refsynopsisdiv, -div.refsect1, -div.refsect2, -div.toc, -div.section -{ - margin-bottom: 1em; -} - -/* blob links */ -h2 .extralinks, h3 .extralinks -{ - float: right; - /* tango:aluminium 3 */ - color: #babdb6; - font-size: 80%; - font-weight: normal; -} - -.lineart -{ - color: #d3d7cf; - font-weight: normal; -} - -.annotation -{ - /* tango:aluminium 5 */ - color: #555753; - font-weight: normal; -} - -.structfield -{ - font-style: normal; - font-weight: normal; -} - -acronym,abbr -{ - border-bottom: 1px dotted gray; -} - -/* code listings */ - -.listing_code .programlisting .normal, -.listing_code .programlisting .normal a, -.listing_code .programlisting .number, -.listing_code .programlisting .cbracket, -.listing_code .programlisting .symbol { color: #555753; } -.listing_code .programlisting .comment, -.listing_code .programlisting .linenum { color: #babdb6; } /* tango: aluminium 3 */ -.listing_code .programlisting .function, -.listing_code .programlisting .function a, -.listing_code .programlisting .preproc { color: #204a87; } /* tango: sky blue 3 */ -.listing_code .programlisting .string { color: #ad7fa8; } /* tango: plum */ -.listing_code .programlisting .keyword, -.listing_code .programlisting .usertype, -.listing_code .programlisting .type, -.listing_code .programlisting .type a { color: #4e9a06; } /* tango: chameleon 3 */ - -.listing_frame { - /* tango:sky blue 1 */ - border: solid 1px #729fcf; - border: solid 1px rgba(114, 159, 207, 0.2); - padding: 0px; -} - -.listing_lines, .listing_code { - margin-top: 0px; - margin-bottom: 0px; - padding: 0.5em; -} -.listing_lines { - /* tango:sky blue 0.5 */ - background: #a6c5e3; - background: rgba(114, 159, 207, 0.2); - /* tango:aluminium 6 */ - color: #2e3436; -} -.listing_code { - /* tango:sky blue 0 */ - background: #e6f3ff; - background: rgba(114, 159, 207, 0.1); -} -.listing_code .programlisting { - /* override from previous */ - border: none 0px; - padding: 0px; - background: none; -} -.listing_lines pre, .listing_code pre { - margin: 0px; -} - -@media screen { - /* these have a as a first child, but since there are no parent selectors - * we can't use that. */ - a.footnote - { - position: relative; - top: 0em ! important; - } - /* this is needed so that the local anchors are displayed below the naviagtion */ - div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] - { - display: inline-block; - position: relative; - top:-5em; - } - /* this seems to be a bug in the xsl style sheets when generating indexes */ - div.index div.index - { - top: 0em; - } - /* make space for the fixed navigation bar and add space at the bottom so that - * link targets appear somewhat close to top - */ - body - { - padding-top: 2.5em; - padding-bottom: 500px; - max-width: 60em; - } - p - { - max-width: 60em; - } - /* style and size the navigation bar */ - table.navigation#top - { - position: fixed; - background: #e2e2e2; - border-bottom: solid 1px #babdb6; - border-spacing: 5px; - margin-top: 0; - margin-bottom: 0; - top: 0; - left: 0; - z-index: 10; - } - table.navigation#top td - { - padding-left: 6px; - padding-right: 6px; - } - .navigation a, .navigation a:visited - { - /* tango:sky blue 3 */ - color: #204a87; - } - .navigation a:hover - { - /* tango:sky blue 2 */ - color: #3465a4; - } - td.shortcuts - { - /* tango:sky blue 2 */ - color: #3465a4; - font-size: 80%; - white-space: nowrap; - } - td.shortcuts .dim - { - color: #babdb6; - } - .navigation .title - { - font-size: 80%; - max-width: none; - margin: 0px; - font-weight: normal; - } -} -@media screen and (min-width: 60em) { - /* screen larger than 60em */ - body { margin: auto; } -} -@media screen and (max-width: 60em) { - /* screen less than 60em */ - #nav_hierarchy { display: none; } - #nav_interfaces { display: none; } - #nav_prerequisites { display: none; } - #nav_derived_interfaces { display: none; } - #nav_implementations { display: none; } - #nav_child_properties { display: none; } - #nav_style_properties { display: none; } - #nav_index { display: none; } - #nav_glossary { display: none; } - .gallery_image { display: none; } - .property_flags { display: none; } - .signal_flags { display: none; } - .parameter_annotations { display: none; } - .enum_member_annotations { display: none; } - .struct_member_annotations { display: none; } - .union_member_annotations { display: none; } - /* now that a column is hidden, optimize space */ - col.parameters_name { width: auto; } - col.parameters_description { width: auto; } - col.struct_members_name { width: auto; } - col.struct_members_description { width: auto; } - col.enum_members_name { width: auto; } - col.enum_members_description { width: auto; } - col.union_members_name { width: auto; } - col.union_members_description { width: auto; } - .listing_lines { display: none; } -} -@media print { - table.navigation { - visibility: collapse; - display: none; - } - div.titlepage table.navigation { - visibility: visible; - display: table; - background: #e2e2e2; - border: solid 1px #babdb6; - margin-top: 0; - margin-bottom: 0; - top: 0; - left: 0; - height: 3em; - } -} - diff --git a/docs/reference/gobject/html/tools-ginspector.html b/docs/reference/gobject/html/tools-ginspector.html deleted file mode 100644 index c4cc46e0b..000000000 --- a/docs/reference/gobject/html/tools-ginspector.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - -Graphical inspection of GObjects: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Graphical inspection of GObjects

-

- Yet another tool that you may find helpful when working with - GObjects is G-Inspector. It - is able to display GLib/GTK+ objects and their properties. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/tools-gob.html b/docs/reference/gobject/html/tools-gob.html deleted file mode 100644 index 145b3c2b8..000000000 --- a/docs/reference/gobject/html/tools-gob.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - -GObject builder: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-GObject builder

-

- In order to help a GObject class developer, one obvious idea is - to use some sort of templates for the skeletons and then run - them through a special tool to generate the real C files. GOB (or GOB2) is - such a tool. It is a preprocessor which can be used to build - GObjects with inline C code so that there is no need to edit the - generated C code. The syntax is inspired by Java and Yacc or - Lex. The implementation is intentionally kept simple: the inline C - code provided by the user is not parsed. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/tools-gtkdoc.html b/docs/reference/gobject/html/tools-gtkdoc.html deleted file mode 100644 index e45917110..000000000 --- a/docs/reference/gobject/html/tools-gtkdoc.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - -Writing API docs: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Writing API docs

-

The API documentation for most of the GLib, GObject, GTK+ and GNOME - libraries is built with a combination of complex tools. Typically, the part of - the documentation which describes the behavior of each function is extracted - from the specially-formatted source code comments by a tool named gtk-doc which - generates DocBook XML and merges this DocBook XML with a set of master XML - DocBook files. These XML DocBook files are finally processed with xsltproc - (a small program part of the libxslt library) to generate the final HTML - output. Other tools can be used to generate PDF output from the source XML. - The following code excerpt shows what these comments look like. -

-
- - - - - - - -
1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
/**
- * gtk_widget_freeze_child_notify:
- * @widget: a #GtkWidget
- * 
- * Stops emission of "child-notify" signals on @widget. The signals are
- * queued until gtk_widget_thaw_child_notify() is called on @widget. 
- *
- * This is the analogue of g_object_freeze_notify() for child properties.
- **/
-void
-gtk_widget_freeze_child_notify (GtkWidget *widget)
-{
-...
-
- -

-

-

- Thorough - documentation - on how to set up and use gtk-doc in your project is provided on the - GNOME developer website. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/tools-refdb.html b/docs/reference/gobject/html/tools-refdb.html deleted file mode 100644 index 5353f1e38..000000000 --- a/docs/reference/gobject/html/tools-refdb.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - -Debugging reference count problems: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Debugging reference count problems

-

- The reference counting scheme used by GObject does solve quite - a few memory management problems but also introduces new sources of bugs. - In large applications, finding the exact spot where the reference count - of an Object is not properly handled can be very difficult. -

-

- A useful tool in debugging reference counting problems is to - set breakpoints in gdb on g_object_ref() and g_object_unref(). - Once you know the address of the object you are interested in, - you can make the breakpoints conditional: -

-
-break g_object_ref if _object == 0xcafebabe
-break g_object_unref if _object == 0xcafebabe
-      
-

-

-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/tools-vala.html b/docs/reference/gobject/html/tools-vala.html deleted file mode 100644 index 00e1a91c8..000000000 --- a/docs/reference/gobject/html/tools-vala.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - -Vala: GObject Reference Manual - - - - - - - - - - - - - - - - -
-

-Vala

-

- From the Vala - homepage itself: Vala is a new programming language - that aims to bring modern programming language features to GNOME - developers without imposing any additional runtime requirements - and without using a different ABI compared to applications and - libraries written in C. -

-

- The syntax of Vala is similar to C#. The available compiler - translates Vala into GObject C code. It can also compile - non-GObject C, using plain C API. -

-
- - - \ No newline at end of file diff --git a/docs/reference/gobject/html/up-insensitive.png b/docs/reference/gobject/html/up-insensitive.png deleted file mode 100644 index f40498606..000000000 Binary files a/docs/reference/gobject/html/up-insensitive.png and /dev/null differ diff --git a/docs/reference/gobject/html/up.png b/docs/reference/gobject/html/up.png deleted file mode 100644 index 80b4b37e9..000000000 Binary files a/docs/reference/gobject/html/up.png and /dev/null differ diff --git a/docs/reference/gobject/tmpl/.gitignore b/docs/reference/gobject/tmpl/.gitignore new file mode 100644 index 000000000..4e6ee08c1 --- /dev/null +++ b/docs/reference/gobject/tmpl/.gitignore @@ -0,0 +1,15 @@ +enumerations_flags.sgml +gboxed.sgml +gbinding.sgml +gclosure.sgml +generic_values.sgml +gparamspec.sgml +gobject-unused.sgml +gtype.sgml +gtypemodule.sgml +gtypeplugin.sgml +objects.sgml +param_value_types.sgml +signals.sgml +value_arrays.sgml +value_collection.sgml diff --git a/docs/reference/gobject/tut_gtype.xml b/docs/reference/gobject/tut_gtype.xml index df63c2dee..126eac38e 100644 --- a/docs/reference/gobject/tut_gtype.xml +++ b/docs/reference/gobject/tut_gtype.xml @@ -715,7 +715,7 @@ viewer_file_editable_interface_init (ViewerEditableInterface *iface) G_DEFINE_TYPE_WITH_CODE (ViewerFile, viewer_file, VIEWER_TYPE_FILE, G_IMPLEMENT_INTERFACE (VIEWER_TYPE_EDITABLE, - viewer_file_editable_interface_init)); + viewer_file_editable_interface_init)) @@ -836,7 +836,7 @@ struct _GInterfaceInfo G_DEFINE_INTERFACE which can be used to define the interface: -G_DEFINE_INTERFACE (ViewerEditable, viewer_editable, G_TYPE_OBJECT); +G_DEFINE_INTERFACE (ViewerEditable, viewer_editable, G_TYPE_OBJECT) static void viewer_editable_default_init (ViewerEditableInterface *iface) diff --git a/docs/reference/gobject/tut_howto.xml b/docs/reference/gobject/tut_howto.xml index d436984fe..0696666be 100644 --- a/docs/reference/gobject/tut_howto.xml +++ b/docs/reference/gobject/tut_howto.xml @@ -938,7 +938,7 @@ G_END_DECLS -G_DEFINE_INTERFACE (ViewerEditable, viewer_editable, G_TYPE_OBJECT); +G_DEFINE_INTERFACE (ViewerEditable, viewer_editable, G_TYPE_OBJECT) static void viewer_editable_default_init (ViewerEditableInterface *iface) @@ -1091,7 +1091,7 @@ viewer_file_init (ViewerFile *self) the GObject equivalent: /* Make the ViewerEditableLossy interface require ViewerEditable interface. */ -G_DEFINE_INTERFACE (ViewerEditableLossy, viewer_editable_lossy, VIEWER_TYPE_EDITABLE); +G_DEFINE_INTERFACE (ViewerEditableLossy, viewer_editable_lossy, VIEWER_TYPE_EDITABLE) In the G_DEFINE_INTERFACE call above, the third parameter defines the prerequisite type. This diff --git a/docs/reference/gobject/version.xml b/docs/reference/gobject/version.xml deleted file mode 100644 index 908eabe3d..000000000 --- a/docs/reference/gobject/version.xml +++ /dev/null @@ -1 +0,0 @@ -2.52.3 -- cgit v1.2.3