mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 18:52:09 +01:00
Merge branch 'ebassi/gir' into 'main'
Generate introspection data See merge request GNOME/glib!3636
This commit is contained in:
commit
1d2507a7e5
File diff suppressed because it is too large
Load Diff
@ -235,11 +235,10 @@ expand_content_files = [
|
||||
'overview.md',
|
||||
]
|
||||
|
||||
gio_gir = meson.current_source_dir() / 'Gio-2.0.gir'
|
||||
gio_toml = configure_file(input: 'gio.toml.in', output: 'gio.toml', configuration: toml_conf)
|
||||
|
||||
custom_target('gio-docs',
|
||||
input: [ gio_toml, gio_gir ],
|
||||
input: [ gio_toml, gio_gir[0] ],
|
||||
output: 'gio',
|
||||
command: [
|
||||
gidocgen,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -108,6 +108,17 @@ libraries.
|
||||
where GLib installs the SystemTap probes, using the
|
||||
`-Dtapset_install_dir=DIR` option.
|
||||
|
||||
- [gobject-introspection](https://gitlab.gnome.org/GNOME/gobject-introspection/)
|
||||
is needed to generate introspection data for consumption by other projects,
|
||||
and to generate the GLib documentation via
|
||||
[gi-docgen](https://gitlab.gnome.org/GNOME/gi-docgen). There is a dependency
|
||||
cycle between GLib and gobject-introspection. This can be broken by building
|
||||
GLib first with `-Dintrospection=disabled`, then building
|
||||
gobject-introspection against this copy of GLib, then re-building GLib against
|
||||
the new gobject-introspection with `-Dintrospection=enabled`. The GLib API
|
||||
documentation can be built during this second build process if
|
||||
`-Dgtk_doc=true` is also set.
|
||||
|
||||
## Extra Configuration Options
|
||||
|
||||
In addition to the normal options, these additional ones are supported when
|
||||
|
@ -166,11 +166,10 @@ expand_content_files = [
|
||||
'unicode.md',
|
||||
]
|
||||
|
||||
glib_gir = meson.current_source_dir() / 'GLib-2.0.gir'
|
||||
glib_toml = configure_file(input: 'glib.toml.in', output: 'glib.toml', configuration: toml_conf)
|
||||
|
||||
custom_target('glib-docs',
|
||||
input: [ glib_toml, glib_gir ],
|
||||
input: [ glib_toml, glib_gir[0] ],
|
||||
output: 'glib',
|
||||
command: [
|
||||
gidocgen,
|
||||
|
@ -1,535 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- This file was automatically generated from C sources - DO NOT EDIT!
|
||||
To affect the contents of this file, edit the original C definitions,
|
||||
and/or use gtk-doc annotations. -->
|
||||
<repository version="1.2"
|
||||
xmlns="http://www.gtk.org/introspection/core/1.0"
|
||||
xmlns:c="http://www.gtk.org/introspection/c/1.0"
|
||||
xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
|
||||
<include name="GLib" version="2.0"/>
|
||||
<package name="gmodule-2.0"/>
|
||||
<c:include name="gmodule.h"/>
|
||||
<namespace name="GModule"
|
||||
version="2.0"
|
||||
shared-library="libgmodule-2.0.so.0"
|
||||
c:identifier-prefixes="G"
|
||||
c:symbol-prefixes="g">
|
||||
<record name="Module" c:type="GModule" disguised="1" opaque="1">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="5">The #GModule struct is an opaque data structure to represent a
|
||||
[dynamically-loaded module][glib-Dynamic-Loading-of-Modules].
|
||||
It should only be accessed via the following functions.</doc>
|
||||
<source-position filename="gmodule.h" line="70"/>
|
||||
<method name="close" c:identifier="g_module_close">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="207">Closes a module.</doc>
|
||||
<source-position filename="gmodule.h" line="110"/>
|
||||
<return-value transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="213">%TRUE on success</doc>
|
||||
<type name="gboolean" c:type="gboolean"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<instance-parameter name="module" transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="209">a #GModule to close</doc>
|
||||
<type name="Module" c:type="GModule*"/>
|
||||
</instance-parameter>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="make_resident" c:identifier="g_module_make_resident">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="226">Ensures that a module will never be unloaded.
|
||||
Any future g_module_close() calls on the module will be ignored.</doc>
|
||||
<source-position filename="gmodule.h" line="114"/>
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="none" c:type="void"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<instance-parameter name="module" transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="228">a #GModule to make permanently resident</doc>
|
||||
<type name="Module" c:type="GModule*"/>
|
||||
</instance-parameter>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="name" c:identifier="g_module_name">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="235">Returns the filename that the module was opened with.
|
||||
|
||||
If @module refers to the application itself, "main" is returned.</doc>
|
||||
<source-position filename="gmodule.h" line="128"/>
|
||||
<return-value transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="243">the filename of the module</doc>
|
||||
<type name="utf8" c:type="const gchar*"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<instance-parameter name="module" transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="237">a #GModule</doc>
|
||||
<type name="Module" c:type="GModule*"/>
|
||||
</instance-parameter>
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="symbol" c:identifier="g_module_symbol">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="299">Gets a symbol pointer from a module, such as one exported
|
||||
by %G_MODULE_EXPORT. Note that a valid symbol can be %NULL.</doc>
|
||||
<source-position filename="gmodule.h" line="122"/>
|
||||
<return-value transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="308">%TRUE on success</doc>
|
||||
<type name="gboolean" c:type="gboolean"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<instance-parameter name="module" transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="301">a #GModule</doc>
|
||||
<type name="Module" c:type="GModule*"/>
|
||||
</instance-parameter>
|
||||
<parameter name="symbol_name" transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="302">the name of the symbol to find</doc>
|
||||
<type name="utf8" c:type="const gchar*"/>
|
||||
</parameter>
|
||||
<parameter name="symbol"
|
||||
direction="out"
|
||||
caller-allocates="0"
|
||||
transfer-ownership="full"
|
||||
nullable="1">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="303">returns the pointer to the symbol value</doc>
|
||||
<type name="gpointer" c:type="gpointer*"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</method>
|
||||
<function name="build_path"
|
||||
c:identifier="g_module_build_path"
|
||||
deprecated="1"
|
||||
deprecated-version="2.76">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="179">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`.</doc>
|
||||
<doc-deprecated xml:space="preserve">Use g_module_open() instead with @module_name as the
|
||||
basename of the file_name argument. See %G_MODULE_SUFFIX for why.</doc-deprecated>
|
||||
<source-position filename="gmodule.h" line="142"/>
|
||||
<return-value transfer-ownership="full">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="200">the complete path of the module, including the standard library
|
||||
prefix and suffix. This should be freed when no longer needed</doc>
|
||||
<type name="utf8" c:type="gchar*"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<parameter name="directory"
|
||||
transfer-ownership="none"
|
||||
nullable="1"
|
||||
allow-none="1">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="181">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</doc>
|
||||
<type name="utf8" c:type="const gchar*"/>
|
||||
</parameter>
|
||||
<parameter name="module_name" transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="184">the name of the module</doc>
|
||||
<type name="utf8" c:type="const gchar*"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</function>
|
||||
<function name="error" c:identifier="g_module_error">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="217">Gets a string describing the last module error.</doc>
|
||||
<source-position filename="gmodule.h" line="118"/>
|
||||
<return-value transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="222">a string describing the last module error</doc>
|
||||
<type name="utf8" c:type="const gchar*"/>
|
||||
</return-value>
|
||||
</function>
|
||||
<function name="error_quark" c:identifier="g_module_error_quark">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="GLib.Quark" c:type="GQuark"/>
|
||||
</return-value>
|
||||
</function>
|
||||
<function name="open" c:identifier="g_module_open" introspectable="0">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="247">A thin wrapper function around g_module_open_full()</doc>
|
||||
<source-position filename="gmodule.h" line="100"/>
|
||||
<return-value>
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="256">a #GModule on success, or %NULL on failure</doc>
|
||||
<type name="Module" c:type="GModule*"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<parameter name="file_name"
|
||||
transfer-ownership="none"
|
||||
nullable="1"
|
||||
allow-none="1">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="249">the name or path to the file containing the module,
|
||||
or %NULL to obtain a #GModule representing the main program itself</doc>
|
||||
<type name="utf8" c:type="const gchar*"/>
|
||||
</parameter>
|
||||
<parameter name="flags" transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="251">the flags used for opening the module. This can be the
|
||||
logical OR of any of the #GModuleFlags.</doc>
|
||||
<type name="ModuleFlags" c:type="GModuleFlags"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</function>
|
||||
<function name="open_full"
|
||||
c:identifier="g_module_open_full"
|
||||
version="2.70"
|
||||
introspectable="0"
|
||||
throws="1">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="260">Opens a module. If the module has already been opened, its reference count
|
||||
is incremented. If not, the module is searched in the following order:
|
||||
|
||||
1. If @file_name exists as a regular file, it is used as-is; else
|
||||
2. If @file_name doesn't have the correct suffix and/or prefix for the
|
||||
platform, then possible suffixes and prefixes will be added to the
|
||||
basename till a file is found and whatever is found will be used; else
|
||||
3. If @file_name doesn't have the ".la"-suffix, ".la" is appended. Either
|
||||
way, if a matching .la file exists (and is a libtool archive) the
|
||||
libtool archive is parsed to find the actual file name, and that is
|
||||
used.
|
||||
|
||||
At the end of all this, we would have a file path that we can access on
|
||||
disk, and it is opened as a module. If not, @file_name is opened as
|
||||
a module verbatim in the hopes that the system implementation will somehow
|
||||
be able to access it.</doc>
|
||||
<source-position filename="gmodule.h" line="104"/>
|
||||
<return-value>
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="285">a #GModule on success, or %NULL on failure</doc>
|
||||
<type name="Module" c:type="GModule*"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<parameter name="file_name"
|
||||
transfer-ownership="none"
|
||||
nullable="1"
|
||||
allow-none="1">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="262">the name or path to the file containing the module,
|
||||
or %NULL to obtain a #GModule representing the main program itself</doc>
|
||||
<type name="utf8" c:type="const gchar*"/>
|
||||
</parameter>
|
||||
<parameter name="flags" transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="264">the flags used for opening the module. This can be the
|
||||
logical OR of any of the #GModuleFlags</doc>
|
||||
<type name="ModuleFlags" c:type="GModuleFlags"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</function>
|
||||
<function name="supported" c:identifier="g_module_supported">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="290">Checks if modules are supported on the current platform.</doc>
|
||||
<source-position filename="gmodule.h" line="96"/>
|
||||
<return-value transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="295">%TRUE if modules are supported</doc>
|
||||
<type name="gboolean" c:type="gboolean"/>
|
||||
</return-value>
|
||||
</function>
|
||||
</record>
|
||||
<callback name="ModuleCheckInit" c:type="GModuleCheckInit">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="14">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.</doc>
|
||||
<source-position filename="gmodule.h" line="71"/>
|
||||
<return-value transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="24">%NULL on success, or a string describing the initialization error</doc>
|
||||
<type name="utf8" c:type="const gchar*"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<parameter name="module" transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="16">the #GModule corresponding to the module which has just been loaded</doc>
|
||||
<type name="Module" c:type="GModule*"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</callback>
|
||||
<enumeration name="ModuleError"
|
||||
version="2.70"
|
||||
c:type="GModuleError"
|
||||
glib:error-domain="g-module-error-quark">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule.h"
|
||||
line="78">Errors returned by g_module_open_full().</doc>
|
||||
<source-position filename="gmodule.h" line="91"/>
|
||||
<member name="failed" value="0" c:identifier="G_MODULE_ERROR_FAILED">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule.h"
|
||||
line="80">there was an error loading or opening a module file</doc>
|
||||
</member>
|
||||
<member name="check_failed"
|
||||
value="1"
|
||||
c:identifier="G_MODULE_ERROR_CHECK_FAILED">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule.h"
|
||||
line="81">a module returned an error from its `g_module_check_init()` function</doc>
|
||||
</member>
|
||||
</enumeration>
|
||||
<bitfield name="ModuleFlags" c:type="GModuleFlags">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule.h"
|
||||
line="49">Flags passed to g_module_open().
|
||||
Note that these flags are not supported on all platforms.</doc>
|
||||
<source-position filename="gmodule.h" line="68"/>
|
||||
<member name="lazy" value="1" c:identifier="G_MODULE_BIND_LAZY">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule.h"
|
||||
line="51">specifies that symbols are only resolved when
|
||||
needed. The default action is to bind all symbols when the module
|
||||
is loaded.</doc>
|
||||
</member>
|
||||
<member name="local" value="2" c:identifier="G_MODULE_BIND_LOCAL">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule.h"
|
||||
line="54">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.</doc>
|
||||
</member>
|
||||
<member name="mask" value="3" c:identifier="G_MODULE_BIND_MASK">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule.h"
|
||||
line="58">mask for all flags.</doc>
|
||||
</member>
|
||||
</bitfield>
|
||||
<callback name="ModuleUnload" c:type="GModuleUnload">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="28">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.</doc>
|
||||
<source-position filename="gmodule.h" line="72"/>
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="none" c:type="void"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<parameter name="module" transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="30">the #GModule about to be unloaded</doc>
|
||||
<type name="Module" c:type="GModule*"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</callback>
|
||||
<function name="module_build_path"
|
||||
c:identifier="g_module_build_path"
|
||||
moved-to="Module.build_path"
|
||||
deprecated="1"
|
||||
deprecated-version="2.76">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="179">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`.</doc>
|
||||
<doc-deprecated xml:space="preserve">Use g_module_open() instead with @module_name as the
|
||||
basename of the file_name argument. See %G_MODULE_SUFFIX for why.</doc-deprecated>
|
||||
<source-position filename="gmodule.h" line="142"/>
|
||||
<return-value transfer-ownership="full">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="200">the complete path of the module, including the standard library
|
||||
prefix and suffix. This should be freed when no longer needed</doc>
|
||||
<type name="utf8" c:type="gchar*"/>
|
||||
</return-value>
|
||||
<parameters>
|
||||
<parameter name="directory"
|
||||
transfer-ownership="none"
|
||||
nullable="1"
|
||||
allow-none="1">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="181">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</doc>
|
||||
<type name="utf8" c:type="const gchar*"/>
|
||||
</parameter>
|
||||
<parameter name="module_name" transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="184">the name of the module</doc>
|
||||
<type name="utf8" c:type="const gchar*"/>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</function>
|
||||
<function name="module_error"
|
||||
c:identifier="g_module_error"
|
||||
moved-to="Module.error">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="217">Gets a string describing the last module error.</doc>
|
||||
<source-position filename="gmodule.h" line="118"/>
|
||||
<return-value transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="222">a string describing the last module error</doc>
|
||||
<type name="utf8" c:type="const gchar*"/>
|
||||
</return-value>
|
||||
</function>
|
||||
<function name="module_error_quark"
|
||||
c:identifier="g_module_error_quark"
|
||||
moved-to="Module.error_quark">
|
||||
<return-value transfer-ownership="none">
|
||||
<type name="GLib.Quark" c:type="GQuark"/>
|
||||
</return-value>
|
||||
</function>
|
||||
<function name="module_supported"
|
||||
c:identifier="g_module_supported"
|
||||
moved-to="Module.supported">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="290">Checks if modules are supported on the current platform.</doc>
|
||||
<source-position filename="gmodule.h" line="96"/>
|
||||
<return-value transfer-ownership="none">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="295">%TRUE if modules are supported</doc>
|
||||
<type name="gboolean" c:type="gboolean"/>
|
||||
</return-value>
|
||||
</function>
|
||||
<docsection name="modules">
|
||||
<doc xml:space="preserve"
|
||||
filename="gmodule-2.0.c"
|
||||
line="99">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
|
||||
|[<!-- language="C" -->
|
||||
// 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;
|
||||
}
|
||||
]|</doc>
|
||||
</docsection>
|
||||
</namespace>
|
||||
</repository>
|
@ -2,11 +2,10 @@ expand_content_files = [
|
||||
'modules.md',
|
||||
]
|
||||
|
||||
gmodule_gir = meson.current_source_dir() / 'GModule-2.0.gir'
|
||||
gmodule_toml = configure_file(input: 'gmodule.toml.in', output: 'gmodule.toml', configuration: toml_conf)
|
||||
|
||||
custom_target('gmodule-docs',
|
||||
input: [ gmodule_toml, gmodule_gir ],
|
||||
input: [ gmodule_toml, gmodule_gir[0] ],
|
||||
output: 'gmodule',
|
||||
command: [
|
||||
gidocgen,
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -76,11 +76,10 @@ expand_content_files = [
|
||||
'signals.md',
|
||||
]
|
||||
|
||||
gobject_gir = meson.current_source_dir() / 'GObject-2.0.gir'
|
||||
gobject_toml = configure_file(input: 'gobject.toml.in', output: 'gobject.toml', configuration: toml_conf)
|
||||
|
||||
custom_target('gobject-docs',
|
||||
input: [ gobject_toml, gobject_gir ],
|
||||
input: [ gobject_toml, gobject_gir[0] ],
|
||||
output: 'gobject',
|
||||
command: [
|
||||
gidocgen,
|
||||
|
@ -54,7 +54,7 @@ if get_option('gtk_doc')
|
||||
endif
|
||||
|
||||
# gi-docgen version
|
||||
if get_option('gtk_doc')
|
||||
if get_option('gtk_doc') and enable_gir
|
||||
gidocgen_dep = dependency('gi-docgen', version: '>= 2023.1',
|
||||
fallback: ['gi-docgen', 'dummy_dep'],
|
||||
required: true)
|
||||
|
@ -48,7 +48,7 @@ G_DEFINE_INTERFACE (GAction, g_action, G_TYPE_OBJECT)
|
||||
*
|
||||
* `GAction` is merely the interface to the concept of an action, as
|
||||
* described above. Various implementations of actions exist, including
|
||||
* [struct@Gio.SimpleAction].
|
||||
* [class@Gio.SimpleAction].
|
||||
*
|
||||
* In all cases, the implementing class is responsible for storing the
|
||||
* name of the action, the parameter type, the enabled state, the optional
|
||||
@ -58,7 +58,7 @@ G_DEFINE_INTERFACE (GAction, g_action, G_TYPE_OBJECT)
|
||||
* 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 [struct@Gio.SimpleActionGroup].
|
||||
* inside of a [class@Gio.SimpleActionGroup].
|
||||
**/
|
||||
|
||||
/**
|
||||
|
@ -84,13 +84,12 @@
|
||||
* @get_action_enabled: the virtual function pointer for g_action_group_get_action_enabled()
|
||||
* @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()
|
||||
* @query_action: the virtual function pointer for g_action_group_query_action()
|
||||
* @activate_action: the virtual function pointer for g_action_group_activate_action()
|
||||
* @change_action_state: the virtual function pointer for g_action_group_change_action_state()
|
||||
* @action_added: the class closure for the #GActionGroup::action-added signal
|
||||
* @action_removed: the class closure for the #GActionGroup::action-removed signal
|
||||
* @action_enabled_changed: the class closure for the #GActionGroup::action-enabled-changed signal
|
||||
* @action_state_changed: the class closure for the #GActionGroup::action-enabled-changed signal
|
||||
* @query_action: the virtual function pointer for g_action_group_query_action()
|
||||
*
|
||||
* The virtual function table for #GActionGroup.
|
||||
*
|
||||
|
@ -30,9 +30,9 @@
|
||||
*
|
||||
* `GActionMap` is an interface for action containers.
|
||||
*
|
||||
* The `GActionMap` interface is implemented by [struct@Gio.ActionGroup]
|
||||
* The `GActionMap` interface is implemented by [iface@Gio.ActionGroup]
|
||||
* implementations that operate by containing a number of named
|
||||
* [struct@Gio.Action] instances, such as [struct@Gio.SimpleActionGroup].
|
||||
* [iface@Gio.Action] instances, such as [class@Gio.SimpleActionGroup].
|
||||
*
|
||||
* One useful application of this interface is to map the
|
||||
* names of actions from various action groups to unique,
|
||||
|
@ -67,10 +67,10 @@
|
||||
* 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 [struct@Gio.File] constructors (since GVfs
|
||||
* back to the GIO URI in the [iface@Gio.File] constructors (since GVfs
|
||||
* implements the GVfs extension point). As such, if the application
|
||||
* needs to examine the URI, it needs to use [method@Gio.File.get_uri]
|
||||
* or similar on [struct@Gio.File]. In other words, an application cannot
|
||||
* or similar on [iface@Gio.File]. In other words, an application cannot
|
||||
* assume that the URI passed to e.g. [func@Gio.File.new_for_commandline_arg]
|
||||
* is equal to the result of [method@Gio.File.get_uri]. The following snippet
|
||||
* illustrates this:
|
||||
@ -1304,7 +1304,7 @@ g_app_info_can_delete (GAppInfo *appinfo)
|
||||
|
||||
|
||||
/**
|
||||
* g_app_info_delete:
|
||||
* g_app_info_delete: (virtual do_delete)
|
||||
* @appinfo: a #GAppInfo
|
||||
*
|
||||
* Tries to delete a #GAppInfo.
|
||||
@ -1313,7 +1313,6 @@ g_app_info_can_delete (GAppInfo *appinfo)
|
||||
* #GAppInfos which can be deleted, and system-wide ones which cannot.
|
||||
* See g_app_info_can_delete().
|
||||
*
|
||||
* Virtual: do_delete
|
||||
* Returns: %TRUE if @appinfo has been deleted
|
||||
*
|
||||
* Since: 2.20
|
||||
@ -1662,24 +1661,24 @@ g_app_launch_context_launch_failed (GAppLaunchContext *context,
|
||||
* info database for changes (newly installed or removed applications).
|
||||
*
|
||||
* Call [func@Gio.AppInfoMonitor.get] to get a `GAppInfoMonitor` and connect
|
||||
* to the [signal@Gio.AppInfoMonitor.changed] signal. The signal will be emitted once when
|
||||
* to the [signal@Gio.AppInfoMonitor::changed] signal. The signal will be emitted once when
|
||||
* the app info database changes, and will not be emitted again until after the
|
||||
* next call to [func@Gio.AppInfo.get_all] or another `g_app_info_*()` function.
|
||||
* This is because monitoring the app info database for changes is expensive.
|
||||
*
|
||||
* The following functions will re-arm the [signal@Gio.AppInfoMonitor.changed]
|
||||
* The following functions will re-arm the [signal@Gio.AppInfoMonitor::changed]
|
||||
* signal so it can be emitted again:
|
||||
*
|
||||
* - [method@Gio.AppInfo.get_all]
|
||||
* - [method@Gio.AppInfo.get_all_for_type]
|
||||
* - [method@Gio.AppInfo.get_default_for_type]
|
||||
* - [method@Gio.AppInfo.get_fallback_for_type]
|
||||
* - [method@Gio.AppInfo.get_recommended_for_type]
|
||||
* - [method@Gio.DesktopAppInfo.get_implementations]
|
||||
* - [method@Gio.DesktopAppInfo.new]
|
||||
* - [method@Gio.DesktopAppInfo.new_from_filename]
|
||||
* - [method@Gio.DesktopAppInfo.new_from_keyfile]
|
||||
* - [method@Gio.DesktopAppInfo.search]
|
||||
* - [func@Gio.AppInfo.get_all]
|
||||
* - [func@Gio.AppInfo.get_all_for_type]
|
||||
* - [func@Gio.AppInfo.get_default_for_type]
|
||||
* - [func@Gio.AppInfo.get_fallback_for_type]
|
||||
* - [func@Gio.AppInfo.get_recommended_for_type]
|
||||
* - [func@Gio.DesktopAppInfo.get_implementations]
|
||||
* - [ctor@Gio.DesktopAppInfo.new]
|
||||
* - [ctor@Gio.DesktopAppInfo.new_from_filename]
|
||||
* - [ctor@Gio.DesktopAppInfo.new_from_keyfile]
|
||||
* - [func@Gio.DesktopAppInfo.search]
|
||||
*
|
||||
* In the usual case, applications should try to make note of the change
|
||||
* (doing things like invalidating caches) but not act on it. In
|
||||
|
@ -106,17 +106,17 @@
|
||||
* any object paths that you wish to register are registered before #GApplication
|
||||
* attempts to acquire the bus name of your application (which happens in
|
||||
* [method@Gio.Application.register]). Unfortunately, this means that you cannot
|
||||
* use [method@Gio.Application.is_remote] to decide if you want to register
|
||||
* use [property@Gio.Application:is-remote] to decide if you want to register
|
||||
* object paths.
|
||||
*
|
||||
* `GApplication` also implements the [struct@Gio.ActionGroup] and [struct@Gio.ActionMap]
|
||||
* `GApplication` also implements the [iface@Gio.ActionGroup] and [iface@Gio.ActionMap]
|
||||
* interfaces and lets you easily export actions by adding them with
|
||||
* [method@Gio.ActionMap.add_action]. When invoking an action by calling
|
||||
* [method@Gio.ActionGroup.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 [struct@Gio.DBusActionGroup] wrapper to
|
||||
* conveniently access them remotely. GIO provides a [struct@Gio.DBusMenuModel] wrapper
|
||||
* for remote access to exported [struct@Gio.MenuModel]s.
|
||||
* the session bus, and GIO provides the [class@Gio.DBusActionGroup] wrapper to
|
||||
* conveniently access them remotely. GIO provides a [class@Gio.DBusMenuModel] wrapper
|
||||
* for remote access to exported [class@Gio.MenuModel]s.
|
||||
*
|
||||
* Note: Due to the fact that actions are exported on the session bus,
|
||||
* using `maybe` parameters is not supported, since D-Bus does not support
|
||||
@ -132,7 +132,7 @@
|
||||
*
|
||||
* - via activating an action
|
||||
*
|
||||
* The [signal@Gio.Application.startup] signal lets you handle the application
|
||||
* The [signal@Gio.Application::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
|
||||
@ -142,7 +142,7 @@
|
||||
* data, override the [vfunc@Gio.Application.before_emit] or
|
||||
* [vfunc@Gio.Application.after_emit] virtual functions
|
||||
* in your `GApplication` subclass. When dealing with
|
||||
* [struct@Gio.ApplicationCommandLine] objects, the platform data is
|
||||
* [class@Gio.ApplicationCommandLine] objects, the platform data is
|
||||
* directly available via [method@Gio.ApplicationCommandLine.get_cwd],
|
||||
* [method@Gio.ApplicationCommandLine.get_environ] and
|
||||
* [method@Gio.ApplicationCommandLine.get_platform_data].
|
||||
@ -158,7 +158,7 @@
|
||||
* `GtkApplication` adds startup notification data in this way.
|
||||
*
|
||||
* To parse commandline arguments you may handle the
|
||||
* [signal@Gio.Application.command-line] signal or override the
|
||||
* [signal@Gio.Application::command-line] signal or override the
|
||||
* [vfunc@Gio.Application.local_command_line] virtual funcion, to parse them in
|
||||
* either the primary instance or the local instance, respectively.
|
||||
*
|
||||
@ -654,8 +654,8 @@ add_packed_option (GApplication *application,
|
||||
/**
|
||||
* g_application_add_main_option_entries:
|
||||
* @application: a #GApplication
|
||||
* @entries: (array zero-terminated=1) (element-type GOptionEntry) a
|
||||
* %NULL-terminated list of #GOptionEntrys
|
||||
* @entries: (array zero-terminated=1) (element-type GOptionEntry): the
|
||||
* main options for the application
|
||||
*
|
||||
* Adds main option entries to be handled by @application.
|
||||
*
|
||||
|
@ -45,8 +45,8 @@
|
||||
* `GApplicationCommandLine` represents a command-line invocation of
|
||||
* an application.
|
||||
*
|
||||
* It is created by [struct@Gio.Application] and emitted
|
||||
* in the [signal@Gio.Application.command-line] signal and virtual function.
|
||||
* It is created by [class@Gio.Application] and emitted
|
||||
* in the [signal@Gio.Application::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
|
||||
@ -67,7 +67,7 @@
|
||||
* dropped).
|
||||
*
|
||||
* The main use for `GApplicationCommandLine` (and the
|
||||
* [signal@Gio.Application.command-line] signal) is 'Emacs server' like use cases:
|
||||
* [signal@Gio.Application::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
|
||||
@ -76,7 +76,7 @@
|
||||
* does not return until the editing is done.
|
||||
*
|
||||
* Normally, the commandline is completely handled in the
|
||||
* [signal@Gio.Application.command-line handler]. The launching instance exits
|
||||
* [signal@Gio.Application::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.
|
||||
@ -161,7 +161,7 @@
|
||||
*
|
||||
* In this example of split commandline handling, options that start
|
||||
* with `--local-` are handled locally, all other options are passed
|
||||
* to the [signal@Gio.Application.command-line] handler which runs in the primary
|
||||
* to the [signal@Gio.Application::command-line] handler which runs in the primary
|
||||
* instance.
|
||||
*
|
||||
* The complete example can be found here:
|
||||
@ -202,7 +202,7 @@
|
||||
* ```
|
||||
*
|
||||
* In this example the commandline is not completely handled before
|
||||
* the [signal@Gio.Application.command-line] handler returns. Instead, we keep
|
||||
* the [signal@Gio.Application::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.
|
||||
|
@ -33,7 +33,7 @@
|
||||
*
|
||||
* `GAsyncInitable` is an interface for asynchronously initializable objects.
|
||||
*
|
||||
* This is the asynchronous version of [struct@Gio.Initable]; it behaves the same
|
||||
* This is the asynchronous version of [iface@Gio.Initable]; it behaves the same
|
||||
* in all ways except that initialization is asynchronous. For more details
|
||||
* see the descriptions on `GInitable`.
|
||||
*
|
||||
@ -41,9 +41,9 @@
|
||||
*
|
||||
* 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 [func@Gio.AsyncInitiable.new_async]
|
||||
* For C applications you generally just call [func@Gio.AsyncInitable.new_async]
|
||||
* directly, or indirectly via a foo_thing_new_async() wrapper. This will call
|
||||
* [func@Gio.AsyncInitable.init_async] under the covers, calling back with `NULL`
|
||||
* [method@Gio.AsyncInitable.init_async] under the covers, calling back with `NULL`
|
||||
* and a set `GError` on failure.
|
||||
*
|
||||
* A typical implementation might look something like this:
|
||||
|
@ -48,7 +48,7 @@
|
||||
*
|
||||
* 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 [struct@Gio.FileEnumerator] for a
|
||||
* operation in question yields (e.g. a [class@Gio.FileEnumerator] 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
|
||||
|
@ -41,8 +41,8 @@
|
||||
*
|
||||
* By default, `GBufferedInputStream`'s buffer size is set at 4 kilobytes.
|
||||
*
|
||||
* To create a buffered input stream, use [func@Gio.BufferedInputStream.new],
|
||||
* or [func@Gio.BufferedInputStream.new_sized] to specify the buffer's size at
|
||||
* To create a buffered input stream, use [ctor@Gio.BufferedInputStream.new],
|
||||
* or [ctor@Gio.BufferedInputStream.new_sized] to specify the buffer's size at
|
||||
* construction.
|
||||
*
|
||||
* To get the size of a buffer within a buffered input stream, use
|
||||
|
@ -32,13 +32,13 @@
|
||||
/**
|
||||
* GBufferedOutputStream:
|
||||
*
|
||||
* Buffered output stream implements [struct@Gio.FilterOutputStream] and provides
|
||||
* Buffered output stream implements [class@Gio.FilterOutputStream] and provides
|
||||
* for buffered writes.
|
||||
*
|
||||
* By default, `GBufferedOutputStream`'s buffer size is set at 4 kilobytes.
|
||||
*
|
||||
* To create a buffered output stream, use [func@Gio.BufferedOutputStream.new],
|
||||
* or [func@Gio.BufferedOutputStream.new_sized] to specify the buffer's size
|
||||
* To create a buffered output stream, use [ctor@Gio.BufferedOutputStream.new],
|
||||
* or [ctor@Gio.BufferedOutputStream.new_sized] to specify the buffer's size
|
||||
* at construction.
|
||||
*
|
||||
* To get the size of a buffer within a buffered input stream, use
|
||||
|
@ -42,7 +42,7 @@ enum {
|
||||
* GCharsetConverter:
|
||||
*
|
||||
* `GCharsetConverter` is an implementation of [iface@Gio.Converter] based on
|
||||
* [class@GLib.IConv].
|
||||
* [struct@GLib.IConv].
|
||||
*/
|
||||
|
||||
static void g_charset_converter_iface_init (GConverterIface *iface);
|
||||
|
@ -35,7 +35,7 @@
|
||||
/**
|
||||
* GConverterInputStream:
|
||||
*
|
||||
* Converter input stream implements [iface@Gio.InputStream] and allows
|
||||
* Converter input stream implements [class@Gio.InputStream] and allows
|
||||
* conversion of data of various types during reading.
|
||||
*
|
||||
* As of GLib 2.34, `GConverterInputStream` implements
|
||||
|
@ -35,7 +35,7 @@
|
||||
/**
|
||||
* GConverterOutputStream:
|
||||
*
|
||||
* Converter output stream implements [iface@Gio.OutputStream] and allows
|
||||
* Converter output stream implements [class@Gio.OutputStream] and allows
|
||||
* conversion of data of various types during reading.
|
||||
*
|
||||
* As of GLib 2.34, `GConverterOutputStream` implements
|
||||
|
@ -48,7 +48,7 @@
|
||||
* peer of a communication endpoint - see e.g. [method@Gio.Socket.get_credentials].
|
||||
*
|
||||
* Some operating systems supports securely sending and receiving
|
||||
* credentials over a Unix Domain Socket, see [struct@Gio.UnixCredentialsMessage],
|
||||
* credentials over a Unix Domain Socket, see [class@Gio.UnixCredentialsMessage],
|
||||
* [method@Gio.UnixConnection.send_credentials] and
|
||||
* [method@Gio.UnixConnection.receive_credentials] for details.
|
||||
*
|
||||
|
@ -39,10 +39,10 @@
|
||||
* 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
|
||||
* [struct@Gio.Socket], which wraps the UNIX socket API on UNIX and winsock2 on Windows.
|
||||
* [class@Gio.Socket], 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 [struct@Gio.IOStream].
|
||||
* alongside higher-level networking APIs such as [class@Gio.IOStream].
|
||||
*
|
||||
* 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
|
||||
|
@ -35,7 +35,7 @@
|
||||
/**
|
||||
* GDataInputStream:
|
||||
*
|
||||
* Data input stream implements [iface@Gio.InputStream] and includes functions
|
||||
* Data input stream implements [class@Gio.InputStream] and includes functions
|
||||
* for reading structured data directly from a binary input stream.
|
||||
*/
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
/**
|
||||
* GDataOutputStream:
|
||||
*
|
||||
* Data output stream implements [iface@Gio.OutputStream] and includes functions
|
||||
* Data output stream implements [class@Gio.OutputStream] and includes functions
|
||||
* for writing data directly to an output stream.
|
||||
*/
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
* interface.
|
||||
*
|
||||
* `GDBusActionGroup` can be used as a proxy for an action group
|
||||
* that is exported over D-Bus with [func@Gio.DBusConnection.export_action_group].
|
||||
* that is exported over D-Bus with [method@Gio.DBusConnection.export_action_group].
|
||||
*/
|
||||
|
||||
struct _GDBusActionGroup
|
||||
|
@ -138,32 +138,33 @@
|
||||
*
|
||||
* 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 a [struct@Gio.IOStream].
|
||||
* as a [class@Gio.IOStream].
|
||||
*
|
||||
* 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 [func@g_bus_own_name],
|
||||
* [func@g_bus_watch_name] or [ctor@Gio.DBusProxy.new_for_bus] APIs.
|
||||
* a D-Bus client, it is often easier to use the [func@Gio.bus_own_name],
|
||||
* [func@Gio.bus_watch_name] or [func@Gio.DBusProxy.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.
|
||||
* called from any thread. This is so that [func@Gio.bus_get] and
|
||||
* [func@Gio.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, [func@Gio.DBusConnection.new] and
|
||||
* `g_bus_get()`, and the synchronous versions of those methods, give you an
|
||||
* initialized connection. Language bindings for GIO should use
|
||||
* [func@Gio.Initiable.new] or [func@Gio.AsyncInitable.new_async], which also
|
||||
* [func@Gio.bus_get], and the synchronous versions of those methods, give you
|
||||
* an initialized connection. Language bindings for GIO should use
|
||||
* [func@Gio.Initable.new] or [func@Gio.AsyncInitable.new_async], which also
|
||||
* initialize the connection.
|
||||
*
|
||||
* If you construct an uninitialized `GDBusConnection`, such as via
|
||||
* `g_object_new()`, you must initialize it via [method@Gio.Initable.init] or
|
||||
* [ctor@GObject.Object.new], you must initialize it via [method@Gio.Initable.init] or
|
||||
* [method@Gio.AsyncInitable.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()`.
|
||||
* free it with [method@GObject.Object.unref].
|
||||
*
|
||||
* ## An example D-Bus server
|
||||
*
|
||||
|
@ -33,8 +33,8 @@
|
||||
* Base type for D-Bus interfaces.
|
||||
*
|
||||
* The `GDBusInterface` type is the base type for D-Bus interfaces both
|
||||
* on the service side (see [struct@Gio.DBusInterfaceSkeleton]) and client side
|
||||
* (see [struct@Gio.DBusProxy]).
|
||||
* on the service side (see [class@Gio.DBusInterfaceSkeleton]) and client side
|
||||
* (see [class@Gio.DBusProxy]).
|
||||
*
|
||||
* Since: 2.30
|
||||
*/
|
||||
|
45
gio/gfile.c
45
gio/gfile.c
@ -747,14 +747,13 @@ g_file_dup (GFile *file)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_file_hash:
|
||||
* g_file_hash: (virtual hash)
|
||||
* @file: (type GFile): #gconstpointer to a #GFile
|
||||
*
|
||||
* Creates a hash value for a #GFile.
|
||||
*
|
||||
* This call does no blocking I/O.
|
||||
*
|
||||
* Virtual: hash
|
||||
* 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
|
||||
@ -939,7 +938,7 @@ g_file_get_child_for_display_name (GFile *file,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_file_has_prefix:
|
||||
* g_file_has_prefix: (virtual prefix_matches)
|
||||
* @file: input #GFile
|
||||
* @prefix: input #GFile
|
||||
*
|
||||
@ -958,7 +957,6 @@ g_file_get_child_for_display_name (GFile *file,
|
||||
* filesystem point of view), because the prefix of @file is an alias
|
||||
* of @prefix.
|
||||
*
|
||||
* Virtual: prefix_matches
|
||||
* Returns: %TRUE if the @file's parent, grandparent, etc is @prefix,
|
||||
* %FALSE otherwise.
|
||||
*/
|
||||
@ -1674,7 +1672,7 @@ g_file_find_enclosing_mount_finish (GFile *file,
|
||||
|
||||
|
||||
/**
|
||||
* g_file_read:
|
||||
* g_file_read: (virtual read_fn)
|
||||
* @file: #GFile to read
|
||||
* @cancellable: (nullable): a #GCancellable
|
||||
* @error: a #GError, or %NULL
|
||||
@ -1691,7 +1689,6 @@ g_file_find_enclosing_mount_finish (GFile *file,
|
||||
* error will be returned. Other errors are possible too, and depend
|
||||
* on what kind of filesystem the file is on.
|
||||
*
|
||||
* Virtual: read_fn
|
||||
* Returns: (transfer full): #GFileInputStream or %NULL on error.
|
||||
* Free the returned object with g_object_unref().
|
||||
*/
|
||||
@ -4097,7 +4094,7 @@ g_file_make_directory (GFile *file,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_file_make_directory_async:
|
||||
* g_file_make_directory_async: (virtual make_directory_async)
|
||||
* @file: input #GFile
|
||||
* @io_priority: the [I/O priority][io-priority] of the request
|
||||
* @cancellable: (nullable): optional #GCancellable object,
|
||||
@ -4108,7 +4105,6 @@ g_file_make_directory (GFile *file,
|
||||
*
|
||||
* Asynchronously creates a directory.
|
||||
*
|
||||
* Virtual: make_directory_async
|
||||
* Since: 2.38
|
||||
*/
|
||||
void
|
||||
@ -4131,7 +4127,7 @@ g_file_make_directory_async (GFile *file,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_file_make_directory_finish:
|
||||
* g_file_make_directory_finish: (virtual make_directory_finish)
|
||||
* @file: input #GFile
|
||||
* @result: a #GAsyncResult
|
||||
* @error: a #GError, or %NULL
|
||||
@ -4139,7 +4135,6 @@ g_file_make_directory_async (GFile *file,
|
||||
* Finishes an asynchronous directory creation, started with
|
||||
* g_file_make_directory_async().
|
||||
*
|
||||
* Virtual: make_directory_finish
|
||||
* Returns: %TRUE on successful directory creation, %FALSE otherwise.
|
||||
* Since: 2.38
|
||||
*/
|
||||
@ -4371,7 +4366,7 @@ g_file_real_make_symbolic_link_async (GFile *file,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_file_make_symbolic_link_async:
|
||||
* g_file_make_symbolic_link_async: (virtual make_symbolic_link_async)
|
||||
* @file: a #GFile with the name of the symlink to create
|
||||
* @symlink_value: (type filename): a string with the path for the target
|
||||
* of the new symlink
|
||||
@ -4385,7 +4380,6 @@ g_file_real_make_symbolic_link_async (GFile *file,
|
||||
* Asynchronously creates a symbolic link named @file which contains the
|
||||
* string @symlink_value.
|
||||
*
|
||||
* Virtual: make_symbolic_link_async
|
||||
* Since: 2.74
|
||||
*/
|
||||
void
|
||||
@ -4422,7 +4416,7 @@ g_file_real_make_symbolic_link_finish (GFile *file,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_file_make_symbolic_link_finish:
|
||||
* g_file_make_symbolic_link_finish: (virtual make_symbolic_link_finish)
|
||||
* @file: input #GFile
|
||||
* @result: a #GAsyncResult
|
||||
* @error: a #GError, or %NULL
|
||||
@ -4430,7 +4424,6 @@ g_file_real_make_symbolic_link_finish (GFile *file,
|
||||
* Finishes an asynchronous symbolic link creation, started with
|
||||
* g_file_make_symbolic_link_async().
|
||||
*
|
||||
* Virtual: make_symbolic_link_finish
|
||||
* Returns: %TRUE on successful directory creation, %FALSE otherwise.
|
||||
* Since: 2.74
|
||||
*/
|
||||
@ -4452,7 +4445,7 @@ g_file_make_symbolic_link_finish (GFile *file,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_file_delete:
|
||||
* g_file_delete: (virtual delete_file)
|
||||
* @file: input #GFile
|
||||
* @cancellable: (nullable): optional #GCancellable object,
|
||||
* %NULL to ignore
|
||||
@ -4480,7 +4473,6 @@ g_file_make_symbolic_link_finish (GFile *file,
|
||||
* triggering the cancellable object from another thread. If the operation
|
||||
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
||||
*
|
||||
* Virtual: delete_file
|
||||
* Returns: %TRUE if the file was deleted. %FALSE otherwise.
|
||||
*/
|
||||
gboolean
|
||||
@ -4509,7 +4501,7 @@ g_file_delete (GFile *file,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_file_delete_async:
|
||||
* g_file_delete_async: (virtual delete_file_async)
|
||||
* @file: input #GFile
|
||||
* @io_priority: the [I/O priority][io-priority] of the request
|
||||
* @cancellable: (nullable): optional #GCancellable object,
|
||||
@ -4522,7 +4514,6 @@ g_file_delete (GFile *file,
|
||||
* only be deleted if it is empty. This has the same semantics as
|
||||
* g_unlink().
|
||||
*
|
||||
* Virtual: delete_file_async
|
||||
* Since: 2.34
|
||||
*/
|
||||
void
|
||||
@ -4545,14 +4536,13 @@ g_file_delete_async (GFile *file,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_file_delete_finish:
|
||||
* g_file_delete_finish: (virtual delete_file_finish)
|
||||
* @file: input #GFile
|
||||
* @result: a #GAsyncResult
|
||||
* @error: a #GError, or %NULL
|
||||
*
|
||||
* Finishes deleting a file started with g_file_delete_async().
|
||||
*
|
||||
* Virtual: delete_file_finish
|
||||
* Returns: %TRUE if the file was deleted. %FALSE otherwise.
|
||||
* Since: 2.34
|
||||
**/
|
||||
@ -4574,7 +4564,7 @@ g_file_delete_finish (GFile *file,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_file_trash:
|
||||
* g_file_trash: (virtual trash)
|
||||
* @file: #GFile to send to trash
|
||||
* @cancellable: (nullable): optional #GCancellable object,
|
||||
* %NULL to ignore
|
||||
@ -4591,7 +4581,6 @@ g_file_delete_finish (GFile *file,
|
||||
* triggering the cancellable object from another thread. If the operation
|
||||
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
|
||||
*
|
||||
* Virtual: trash
|
||||
* Returns: %TRUE on successful trash, %FALSE otherwise.
|
||||
*/
|
||||
gboolean
|
||||
@ -4620,7 +4609,7 @@ g_file_trash (GFile *file,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_file_trash_async:
|
||||
* g_file_trash_async: (virtual trash_async)
|
||||
* @file: input #GFile
|
||||
* @io_priority: the [I/O priority][io-priority] of the request
|
||||
* @cancellable: (nullable): optional #GCancellable object,
|
||||
@ -4631,7 +4620,6 @@ g_file_trash (GFile *file,
|
||||
*
|
||||
* Asynchronously sends @file to the Trash location, if possible.
|
||||
*
|
||||
* Virtual: trash_async
|
||||
* Since: 2.38
|
||||
*/
|
||||
void
|
||||
@ -4654,7 +4642,7 @@ g_file_trash_async (GFile *file,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_file_trash_finish:
|
||||
* g_file_trash_finish: (virtual trash_finish)
|
||||
* @file: input #GFile
|
||||
* @result: a #GAsyncResult
|
||||
* @error: a #GError, or %NULL
|
||||
@ -4662,7 +4650,6 @@ g_file_trash_async (GFile *file,
|
||||
* Finishes an asynchronous file trashing operation, started with
|
||||
* g_file_trash_async().
|
||||
*
|
||||
* Virtual: trash_finish
|
||||
* Returns: %TRUE on successful trash, %FALSE otherwise.
|
||||
* Since: 2.38
|
||||
*/
|
||||
@ -5798,7 +5785,7 @@ g_file_eject_mountable_with_operation_finish (GFile *file,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_file_monitor_directory:
|
||||
* g_file_monitor_directory: (virtual monitor_dir)
|
||||
* @file: input #GFile
|
||||
* @flags: a set of #GFileMonitorFlags
|
||||
* @cancellable: (nullable): optional #GCancellable object,
|
||||
@ -5818,10 +5805,8 @@ g_file_eject_mountable_with_operation_finish (GFile *file,
|
||||
* 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
|
||||
* Returns: (transfer full): a #GFileMonitor for the given @file,
|
||||
* or %NULL on error.
|
||||
* Free the returned object with g_object_unref().
|
||||
* or %NULL on error. Free the returned object with g_object_unref().
|
||||
*/
|
||||
GFileMonitor *
|
||||
g_file_monitor_directory (GFile *file,
|
||||
|
@ -84,14 +84,13 @@ g_icon_default_init (GIconInterface *iface)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_icon_hash:
|
||||
* g_icon_hash: (hash)
|
||||
* @icon: (not nullable) (type Gio.Icon): #gconstpointer to an icon object.
|
||||
*
|
||||
* Gets a hash for an icon.
|
||||
*
|
||||
* Virtual: hash
|
||||
* Returns: a #guint containing a hash for the @icon, suitable for
|
||||
* use in a #GHashTable or similar data structure.
|
||||
* use in a #GHashTable or similar data structure.
|
||||
**/
|
||||
guint
|
||||
g_icon_hash (gconstpointer icon)
|
||||
|
@ -23,6 +23,8 @@
|
||||
#error "Only <gio/gio.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __GI_SCANNER__
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAction, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GActionMap, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAppInfo, g_object_unref)
|
||||
@ -153,3 +155,5 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVolume, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVolumeMonitor, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GZlibCompressor, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GZlibDecompressor, g_object_unref)
|
||||
|
||||
#endif /* __GI_SCANNER__ */
|
||||
|
@ -51,15 +51,18 @@ G_DEFINE_QUARK (g-io-error-quark, g_io_error)
|
||||
* g_io_error_from_errno:
|
||||
* @err_no: Error number as defined in errno.h.
|
||||
*
|
||||
* 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
|
||||
* 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).
|
||||
*
|
||||
* As %errno is global and may be modified by intermediate function
|
||||
* calls, you should save its value as soon as the call which sets it
|
||||
* returns:
|
||||
* |[
|
||||
* As `errno` is global and may be modified by intermediate function
|
||||
* calls, you should save its value immediately after the call returns,
|
||||
* and use the saved value instead of `errno`:
|
||||
*
|
||||
*
|
||||
* |[<!-- language="C" -->
|
||||
* int saved_errno;
|
||||
*
|
||||
* ret = read (blah);
|
||||
@ -68,8 +71,8 @@ G_DEFINE_QUARK (g-io-error-quark, g_io_error)
|
||||
* g_io_error_from_errno (saved_errno);
|
||||
* ]|
|
||||
*
|
||||
* Returns: #GIOErrorEnum value for the given errno.h error number.
|
||||
**/
|
||||
* Returns: #GIOErrorEnum value for the given `errno.h` error number
|
||||
*/
|
||||
GIOErrorEnum
|
||||
g_io_error_from_errno (gint err_no)
|
||||
{
|
||||
|
@ -171,7 +171,7 @@ g_output_stream_init (GOutputStream *stream)
|
||||
}
|
||||
|
||||
/**
|
||||
* g_output_stream_write:
|
||||
* g_output_stream_write: (virtual write_fn)
|
||||
* @stream: a #GOutputStream.
|
||||
* @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
|
||||
* @count: the number of bytes to write
|
||||
@ -199,8 +199,6 @@ g_output_stream_init (GOutputStream *stream)
|
||||
*
|
||||
* On error -1 is returned and @error is set accordingly.
|
||||
*
|
||||
* Virtual: write_fn
|
||||
*
|
||||
* Returns: Number of bytes written, or -1 on error
|
||||
**/
|
||||
gssize
|
||||
@ -320,7 +318,7 @@ g_output_stream_write_all (GOutputStream *stream,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_output_stream_writev:
|
||||
* g_output_stream_writev: (virtual writev_fn)
|
||||
* @stream: a #GOutputStream.
|
||||
* @vectors: (array length=n_vectors): the buffer containing the #GOutputVectors to write.
|
||||
* @n_vectors: the number of vectors to write
|
||||
@ -353,8 +351,6 @@ g_output_stream_write_all (GOutputStream *stream,
|
||||
* are exceeded. For example, when writing to a local file on UNIX platforms,
|
||||
* the aggregate buffer size must not exceed %G_MAXSSIZE bytes.
|
||||
*
|
||||
* Virtual: writev_fn
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE if there was an error
|
||||
*
|
||||
* Since: 2.60
|
||||
|
@ -170,7 +170,7 @@ g_pollable_input_stream_default_read_nonblocking (GPollableInputStream *stream,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_pollable_input_stream_read_nonblocking:
|
||||
* g_pollable_input_stream_read_nonblocking: (virtual read_nonblocking)
|
||||
* @stream: a #GPollableInputStream
|
||||
* @buffer: (array length=count) (element-type guint8) (out caller-allocates): a
|
||||
* buffer to read data into (which should be at least @count bytes long).
|
||||
@ -193,7 +193,6 @@ g_pollable_input_stream_default_read_nonblocking (GPollableInputStream *stream,
|
||||
* The behaviour of this method is undefined if
|
||||
* g_pollable_input_stream_can_poll() returns %FALSE for @stream.
|
||||
*
|
||||
* Virtual: read_nonblocking
|
||||
* Returns: the number of bytes read, or -1 on error (including
|
||||
* %G_IO_ERROR_WOULD_BLOCK).
|
||||
*/
|
||||
|
@ -238,7 +238,7 @@ g_pollable_output_stream_default_writev_nonblocking (GPollableOutputStream *str
|
||||
}
|
||||
|
||||
/**
|
||||
* g_pollable_output_stream_write_nonblocking:
|
||||
* g_pollable_output_stream_write_nonblocking: (virtual write_nonblocking)
|
||||
* @stream: a #GPollableOutputStream
|
||||
* @buffer: (array length=count) (element-type guint8): a buffer to write
|
||||
* data from
|
||||
@ -265,7 +265,6 @@ g_pollable_output_stream_default_writev_nonblocking (GPollableOutputStream *str
|
||||
* The behaviour of this method is undefined if
|
||||
* g_pollable_output_stream_can_poll() returns %FALSE for @stream.
|
||||
*
|
||||
* Virtual: write_nonblocking
|
||||
* Returns: the number of bytes written, or -1 on error (including
|
||||
* %G_IO_ERROR_WOULD_BLOCK).
|
||||
*/
|
||||
@ -307,7 +306,7 @@ g_pollable_output_stream_write_nonblocking (GPollableOutputStream *stream,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_pollable_output_stream_writev_nonblocking:
|
||||
* g_pollable_output_stream_writev_nonblocking: (virtual writev_nonblocking)
|
||||
* @stream: a #GPollableOutputStream
|
||||
* @vectors: (array length=n_vectors): the buffer containing the #GOutputVectors to write.
|
||||
* @n_vectors: the number of vectors to write
|
||||
@ -336,8 +335,6 @@ g_pollable_output_stream_write_nonblocking (GPollableOutputStream *stream,
|
||||
* The behaviour of this method is undefined if
|
||||
* g_pollable_output_stream_can_poll() returns %FALSE for @stream.
|
||||
*
|
||||
* Virtual: writev_nonblocking
|
||||
*
|
||||
* Returns: %@G_POLLABLE_RETURN_OK on success, %G_POLLABLE_RETURN_WOULD_BLOCK
|
||||
* if the stream is not currently writable (and @error is *not* set), or
|
||||
* %G_POLLABLE_RETURN_FAILED if there was an error in which case @error will
|
||||
|
@ -417,7 +417,7 @@ g_simple_proxy_resolver_class_init (GSimpleProxyResolverClass *resolver_class)
|
||||
object_class->finalize = g_simple_proxy_resolver_finalize;
|
||||
|
||||
/**
|
||||
* GSimpleProxyResolver:default-proxy: (nullable)
|
||||
* GSimpleProxyResolver:default-proxy:
|
||||
*
|
||||
* The default proxy URI that will be used for any URI that doesn't
|
||||
* match #GSimpleProxyResolver:ignore-hosts, and doesn't match any
|
||||
@ -503,7 +503,7 @@ g_simple_proxy_resolver_iface_init (GProxyResolverInterface *iface)
|
||||
* #GSimpleProxyResolver:ignore-hosts for more details on how the
|
||||
* arguments are interpreted.
|
||||
*
|
||||
* Returns: (transfer full) a new #GSimpleProxyResolver
|
||||
* Returns: (transfer full): a new #GSimpleProxyResolver
|
||||
*
|
||||
* Since: 2.36
|
||||
*/
|
||||
|
@ -403,7 +403,7 @@ assign_fd (gint *fd_ptr, gint fd)
|
||||
/**
|
||||
* g_subprocess_launcher_set_stdin_file_path:
|
||||
* @self: a #GSubprocessLauncher
|
||||
* @path: (type filename) (nullable: a filename or %NULL
|
||||
* @path: (type filename) (nullable): a filename or %NULL
|
||||
*
|
||||
* Sets the file path to use as the stdin for spawned processes.
|
||||
*
|
||||
|
@ -300,7 +300,7 @@ g_tls_password_set_value (GTlsPassword *password,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_tls_password_set_value_full:
|
||||
* g_tls_password_set_value_full: (virtual set_value)
|
||||
* @password: a #GTlsPassword object
|
||||
* @value: (array length=length): the value for the password
|
||||
* @length: the length of the password, or -1
|
||||
@ -316,7 +316,6 @@ g_tls_password_set_value (GTlsPassword *password,
|
||||
* calculated automatically. (Note that the terminating nul is not
|
||||
* considered part of the password in this case.)
|
||||
*
|
||||
* Virtual: set_value
|
||||
* Since: 2.30
|
||||
*/
|
||||
void
|
||||
|
@ -330,7 +330,7 @@ g_volume_should_automount (GVolume *volume)
|
||||
|
||||
|
||||
/**
|
||||
* g_volume_mount:
|
||||
* g_volume_mount: (virtual mount_fn)
|
||||
* @volume: a #GVolume
|
||||
* @flags: flags affecting the operation
|
||||
* @mount_operation: (nullable): a #GMountOperation or %NULL to avoid user interaction
|
||||
@ -341,8 +341,6 @@ g_volume_should_automount (GVolume *volume)
|
||||
* 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
|
||||
*/
|
||||
void
|
||||
g_volume_mount (GVolume *volume,
|
||||
|
@ -472,7 +472,7 @@ else
|
||||
install_headers(gio_win32_include_headers, subdir : 'gio-win32-2.0/gio')
|
||||
endif
|
||||
|
||||
gio_sources = files(
|
||||
gio_base_sources = files(
|
||||
'gappinfo.c',
|
||||
'gasynchelper.c',
|
||||
'gasyncinitable.c',
|
||||
@ -603,6 +603,8 @@ gio_sources = files(
|
||||
'gliststore.c',
|
||||
)
|
||||
|
||||
gio_sources = gio_base_sources
|
||||
|
||||
if glib_build_shared
|
||||
gio_sources += files ('../glib/gtrace.c')
|
||||
endif
|
||||
@ -1101,6 +1103,58 @@ if multiarch_bindir != get_option('bindir')
|
||||
endforeach
|
||||
endif
|
||||
|
||||
if enable_gir
|
||||
gio_gir_sources = [
|
||||
gio_visibility_h,
|
||||
gioenumtypes_h,
|
||||
gnetworking_h,
|
||||
gio_headers,
|
||||
gio_base_sources,
|
||||
application_sources,
|
||||
gdbus_sources,
|
||||
appinfo_sources,
|
||||
contenttype_sources,
|
||||
unix_sources,
|
||||
win32_sources,
|
||||
settings_sources,
|
||||
]
|
||||
gio_gir_packages = [ 'gio-2.0' ]
|
||||
gio_gir_args = [
|
||||
'-DGIO_COMPILATION',
|
||||
'-DG_SETTINGS_ENABLE_BACKEND',
|
||||
'--symbol-prefix=gio',
|
||||
]
|
||||
if host_system == 'windows'
|
||||
gio_gir_sources += gio_win32_include_headers
|
||||
foreach h: gio_win32_include_headers
|
||||
gio_gir_args += '--c-include=@0@'.format(h)
|
||||
endforeach
|
||||
gio_gir_packages += 'gio-win32-2.0'
|
||||
gio_gir_args += '--pkg=gio-win32-2.0'
|
||||
else
|
||||
gio_gir_sources += gio_unix_include_headers
|
||||
foreach h: gio_unix_include_headers
|
||||
gio_gir_args += '--c-include=@0@'.format(h)
|
||||
endforeach
|
||||
gio_gir_packages += 'gio-unix-2.0'
|
||||
gio_gir_args += '--pkg=gio-unix-2.0'
|
||||
endif
|
||||
|
||||
gio_gir = gnome.generate_gir(libgio,
|
||||
sources: gio_gir_sources,
|
||||
namespace: 'Gio',
|
||||
nsversion: '2.0',
|
||||
identifier_prefix: 'G',
|
||||
symbol_prefix: 'g',
|
||||
export_packages: gio_gir_packages,
|
||||
header: 'gio/gio.h',
|
||||
includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0] ],
|
||||
install: true,
|
||||
dependencies: [ libglib_dep, libgobject_dep, libgmodule_dep ],
|
||||
extra_args: gir_args + gio_gir_args,
|
||||
)
|
||||
endif
|
||||
|
||||
if build_tests
|
||||
subdir('tests')
|
||||
endif
|
||||
|
34
glib/gdate.c
34
glib/gdate.c
@ -61,6 +61,14 @@
|
||||
|
||||
/**
|
||||
* GDate:
|
||||
* @julian_days: the Julian representation of the date
|
||||
* @julian: this bit is set if @julian_days is valid
|
||||
* @dmy: this is set if @day, @month and @year are valid
|
||||
* @day: the day of the day-month-year representation of the date,
|
||||
* as a number between 1 and 31
|
||||
* @month: the day of the day-month-year representation of the date,
|
||||
* as a number between 1 and 12
|
||||
* @year: the day of the day-month-year representation of the date
|
||||
*
|
||||
* `GDate` is a struct for calendrical calculations.
|
||||
*
|
||||
@ -85,7 +93,7 @@
|
||||
* 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 [method@GLib.Date.new], or you can declare an
|
||||
* dynamically allocated date from [ctor@GLib.Date.new], or you can declare an
|
||||
* automatic variable or array and initialize it by calling [method@GLib.Date.clear].
|
||||
* A cleared date is safe; it's safe to call [method@GLib.Date.set_dmy] and the other
|
||||
* mutator functions to initialize the value of a cleared date. However, a cleared date
|
||||
@ -129,30 +137,6 @@
|
||||
* Deprecated: 2.62: Use #GDateTime or #guint64 instead.
|
||||
*/
|
||||
|
||||
/**
|
||||
* GDate:
|
||||
* @julian_days: the Julian representation of the date
|
||||
* @julian: this bit is set if @julian_days is valid
|
||||
* @dmy: this is set if @day, @month and @year are valid
|
||||
* @day: the day of the day-month-year representation of the date,
|
||||
* as a number between 1 and 31
|
||||
* @month: the day of the day-month-year representation of the date,
|
||||
* as a number between 1 and 12
|
||||
* @year: the day of the day-month-year representation of the date
|
||||
*
|
||||
* 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 safe. 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* GTime:
|
||||
*
|
||||
|
@ -106,7 +106,7 @@ typedef gint64 GTimeSpan;
|
||||
* of range, in which case %NULL will be returned.
|
||||
*
|
||||
* `GDateTime` is reference counted: the reference count is increased by calling
|
||||
* [metohd@GLib.DateTime.ref] and decreased by calling [method@GLib.DateTime.unref].
|
||||
* [method@GLib.DateTime.ref] and decreased by calling [method@GLib.DateTime.unref].
|
||||
* When the reference count drops to 0, the resources allocated by the `GDateTime`
|
||||
* structure are released.
|
||||
*
|
||||
|
@ -105,7 +105,7 @@
|
||||
* 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
|
||||
* @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.
|
||||
|
@ -102,7 +102,6 @@
|
||||
* Welcome[de]=Hallo
|
||||
* Welcome[fr_FR]=Bonjour
|
||||
* Welcome[it]=Ciao
|
||||
* Welcome[be@latin]=Hello
|
||||
*
|
||||
* [Another Group]
|
||||
*
|
||||
|
@ -23,6 +23,8 @@
|
||||
#error "Only <glib.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __GI_SCANNER__
|
||||
|
||||
static inline void
|
||||
g_autoptr_cleanup_generic_gfree (void *p)
|
||||
{
|
||||
@ -105,3 +107,5 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (GPathBuf, g_path_buf_free)
|
||||
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (GPathBuf, g_path_buf_clear)
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
#endif /* __GI_SCANNER__ */
|
||||
|
@ -35,7 +35,7 @@
|
||||
*
|
||||
* A `GPatternSpec` struct is the 'compiled' form of a glob-style pattern.
|
||||
*
|
||||
* The [func@g_pattern_match_simple] and [method@GLib.PatternSpec.match] functions
|
||||
* The [func@GLib.pattern_match_simple] and [method@GLib.PatternSpec.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.
|
||||
@ -46,8 +46,8 @@
|
||||
*
|
||||
* When multiple strings must be matched against the same pattern, it is better
|
||||
* to compile the pattern to a [struct@GLib.PatternSpec] using
|
||||
* [method@GLib.PatternSpec.new] and use [method@GLib.PatternSpec.match_string]
|
||||
* instead of [func@g_pattern_match_simple]. This avoids the overhead of repeated
|
||||
* [ctor@GLib.PatternSpec.new] and use [method@GLib.PatternSpec.match_string]
|
||||
* instead of [func@GLib.pattern_match_simple]. This avoids the overhead of repeated
|
||||
* pattern compilation.
|
||||
*/
|
||||
|
||||
|
@ -52,20 +52,20 @@
|
||||
* is full a new block is allocated.
|
||||
*
|
||||
* When storing a large number of strings, string chunks are more
|
||||
* efficient than using [func@g_strdup] since fewer calls to `malloc()`
|
||||
* efficient than using [func@GLib.strdup] since fewer calls to `malloc()`
|
||||
* are needed, and less memory is wasted in memory allocation overheads.
|
||||
*
|
||||
* By adding strings with [method@GLib.StringChunk.insert_const] it is also
|
||||
* possible to remove duplicates.
|
||||
*
|
||||
* To create a new `GStringChunk` use [method@GLib.StringChunk.new].
|
||||
* To create a new `GStringChunk` use [func@GLib.StringChunk.new].
|
||||
*
|
||||
* To add strings to a `GStringChunk` use [method@GLib.Stringchunk.insert].
|
||||
* To add strings to a `GStringChunk` use [method@GLib.StringChunk.insert].
|
||||
*
|
||||
* To add strings to a `GStringChunk`, but without duplicating strings
|
||||
* which are already in the `GStringChunk`, use [method@GLib.StringChunk.insert_const].
|
||||
*
|
||||
* To free the entire `GStringChunk` use [method@GLib.Stringchunk.free].
|
||||
* To free the entire `GStringChunk` use [method@GLib.StringChunk.free].
|
||||
* It is not possible to free individual strings.
|
||||
*/
|
||||
|
||||
|
@ -59,7 +59,7 @@ typedef struct _GRealThreadPool GRealThreadPool;
|
||||
* 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 [method@GLib.ThreadPool.new].
|
||||
* To create a new thread pool, you use [func@GLib.ThreadPool.new].
|
||||
* It is destroyed by [method@GLib.ThreadPool.free].
|
||||
*
|
||||
* If you want to execute a certain task within a thread pool, use [method@GLib.ThreadPool.push].
|
||||
@ -70,10 +70,10 @@ typedef struct _GRealThreadPool GRealThreadPool;
|
||||
* [method@GLib.ThreadPool.get_max_threads]. and [method@GLib.ThreadPool.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 [method@GLib.ThreadPool.get_num_unused_threads].
|
||||
* The maximum number can be controlled by [method@GLib.ThreadPool.get_max_unused_threads] and
|
||||
* [method@GLib.ThreadPool.set_max_unused_threads]. All currently unused threads
|
||||
* can be stopped by calling [method@GLib.ThreadPool.stop_unused_threads()].
|
||||
* The current number can be fetched with [func@GLib.ThreadPool.get_num_unused_threads].
|
||||
* The maximum number can be controlled by [func@GLib.ThreadPool.get_max_unused_threads] and
|
||||
* [func@GLib.ThreadPool.set_max_unused_threads]. All currently unused threads
|
||||
* can be stopped by calling [func@GLib.ThreadPool.stop_unused_threads].
|
||||
*/
|
||||
struct _GRealThreadPool
|
||||
{
|
||||
|
@ -60,7 +60,7 @@
|
||||
* The `GTimeZone` struct is refcounted and immutable.
|
||||
*
|
||||
* Each time zone has an identifier (for example, ‘Europe/London’) which is
|
||||
* platform dependent. See [method@GLib.TimeZone.new] for information on the
|
||||
* platform dependent. See [ctor@GLib.TimeZone.new] for information on the
|
||||
* identifier formats. The identifier of a time zone can be retrieved using
|
||||
* [method@GLib.TimeZone.get_identifier].
|
||||
*
|
||||
@ -69,7 +69,7 @@
|
||||
* if the daylight savings time is in effect during that interval. A time zone
|
||||
* always has at least one interval — interval 0. Note that interval abbreviations
|
||||
* are not the same as time zone identifiers (apart from ‘UTC’), and cannot be
|
||||
* passed to [method@GLib.TimeZone.new].
|
||||
* passed to [ctor@GLib.TimeZone.new].
|
||||
*
|
||||
* 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
|
||||
|
@ -120,7 +120,7 @@ g_tree_node_new (gpointer key,
|
||||
}
|
||||
|
||||
/**
|
||||
* g_tree_new:
|
||||
* g_tree_new: (constructor)
|
||||
* @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
|
||||
|
@ -253,7 +253,7 @@ glib_sub_headers = files(
|
||||
|
||||
install_headers(glib_sub_headers, install_dir : glib_sub_includedir)
|
||||
|
||||
deprecated_sources = files(
|
||||
glib_deprecated_sources = files(
|
||||
'deprecated/gallocator.c',
|
||||
'deprecated/gcache.c',
|
||||
'deprecated/gcompletion.c',
|
||||
@ -407,7 +407,7 @@ endif
|
||||
glib_c_args = ['-DG_LOG_DOMAIN="GLib"'] + glib_c_args_internal + pcre2_static_args
|
||||
libglib = library('glib-2.0',
|
||||
glib_dtrace_obj, glib_dtrace_hdr,
|
||||
sources : [deprecated_sources, glib_sources],
|
||||
sources : [glib_deprecated_sources, glib_sources],
|
||||
version : library_version,
|
||||
soversion : soversion,
|
||||
darwin_versions : darwin_versions,
|
||||
|
@ -147,6 +147,31 @@ meson.override_dependency('gmodule-no-export-2.0', libgmodule_dep)
|
||||
meson.override_dependency('gmodule-export-2.0', libgmodule_dep)
|
||||
meson.override_dependency('gmodule-2.0', libgmodule_dep)
|
||||
|
||||
if enable_gir
|
||||
gmodule_gir = gnome.generate_gir(libgmodule,
|
||||
sources: [
|
||||
gmoduleconf_h,
|
||||
gmodule_h,
|
||||
gmodule_c,
|
||||
'gmodule-deprecated.c',
|
||||
],
|
||||
namespace: 'GModule',
|
||||
nsversion: '2.0',
|
||||
identifier_prefix: 'G',
|
||||
symbol_prefix: 'g',
|
||||
export_packages: 'gmodule-2.0',
|
||||
header: 'gmodule.h',
|
||||
includes: [ glib_gir[0] ],
|
||||
install: true,
|
||||
dependencies: libglib_dep,
|
||||
extra_args: gir_args + [
|
||||
'-DGMODULE_COMPILATION',
|
||||
'-DGETTEXT_PACKAGE="dummy"',
|
||||
'--symbol-prefix=gmodule',
|
||||
],
|
||||
)
|
||||
endif
|
||||
|
||||
if build_tests
|
||||
subdir('tests')
|
||||
endif
|
||||
|
@ -338,7 +338,7 @@ g_binding_group_class_init (GBindingGroupClass *klass)
|
||||
object_class->set_property = g_binding_group_set_property;
|
||||
|
||||
/**
|
||||
* GBindingGroup:source: (nullable)
|
||||
* GBindingGroup:source:
|
||||
*
|
||||
* The source object used for binding properties.
|
||||
*
|
||||
|
@ -1675,320 +1675,3 @@ g_cclosure_marshal_generic_va (GClosure *closure,
|
||||
if (return_value && G_VALUE_TYPE (return_value))
|
||||
value_from_ffi_type (return_value, rvalue);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__VOID:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 1
|
||||
* @param_values: a #GValue array holding only the instance
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, gpointer user_data)`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__BOOLEAN:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the #gboolean parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, gboolean arg1, gpointer user_data)`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__CHAR:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the #gchar parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, gchar arg1, gpointer user_data)`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__UCHAR:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the #guchar parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, guchar arg1, gpointer user_data)`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__INT:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the #gint parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, gint arg1, gpointer user_data)`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__UINT:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the #guint parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, guint arg1, gpointer user_data)`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__LONG:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the #glong parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, glong arg1, gpointer user_data)`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__ULONG:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the #gulong parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, gulong arg1, gpointer user_data)`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__ENUM:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the enumeration parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter denotes an enumeration type..
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__FLAGS:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the flags parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter denotes a flags type.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__FLOAT:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the #gfloat parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, gfloat arg1, gpointer user_data)`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__DOUBLE:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the #gdouble parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, gdouble arg1, gpointer user_data)`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__STRING:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the #gchar* parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, const gchar *arg1, gpointer user_data)`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__PARAM:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the #GParamSpec* parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, GParamSpec *arg1, gpointer user_data)`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__BOXED:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the #GBoxed* parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, GBoxed *arg1, gpointer user_data)`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__POINTER:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the #gpointer parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, gpointer arg1, gpointer user_data)`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__OBJECT:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the #GObject* parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, GObject *arg1, gpointer user_data)`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__VARIANT:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding the instance and the #GVariant* parameter
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, GVariant *arg1, gpointer user_data)`.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_VOID__UINT_POINTER:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: ignored
|
||||
* @n_param_values: 3
|
||||
* @param_values: a #GValue array holding instance, arg1 and arg2
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `void (*callback) (gpointer instance, guint arg1, gpointer arg2, gpointer user_data)`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_BOOLEAN__FLAGS:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: a #GValue which can store the returned #gboolean
|
||||
* @n_param_values: 2
|
||||
* @param_values: a #GValue array holding instance and arg1
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `gboolean (*callback) (gpointer instance, gint arg1, gpointer user_data)` where the #gint parameter
|
||||
* denotes a flags type.
|
||||
*/
|
||||
|
||||
/**
|
||||
* g_cclosure_marshal_BOOL__FLAGS:
|
||||
*
|
||||
* Another name for g_cclosure_marshal_BOOLEAN__FLAGS().
|
||||
*/
|
||||
/**
|
||||
* g_cclosure_marshal_STRING__OBJECT_POINTER:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: a #GValue, which can store the returned string
|
||||
* @n_param_values: 3
|
||||
* @param_values: a #GValue array holding instance, arg1 and arg2
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `gchar* (*callback) (gpointer instance, GObject *arg1, gpointer arg2, gpointer user_data)`.
|
||||
*/
|
||||
/**
|
||||
* g_cclosure_marshal_BOOLEAN__OBJECT_BOXED_BOXED:
|
||||
* @closure: the #GClosure to which the marshaller belongs
|
||||
* @return_value: a #GValue, which can store the returned string
|
||||
* @n_param_values: 3
|
||||
* @param_values: a #GValue array holding instance, arg1 and arg2
|
||||
* @invocation_hint: the invocation hint given as the last argument
|
||||
* to g_closure_invoke()
|
||||
* @marshal_data: additional data specified when registering the marshaller
|
||||
*
|
||||
* A marshaller for a #GCClosure with a callback of type
|
||||
* `gboolean (*callback) (gpointer instance, GBoxed *arg1, GBoxed *arg2, gpointer user_data)`.
|
||||
*
|
||||
* Since: 2.26
|
||||
*/
|
||||
|
@ -23,6 +23,8 @@
|
||||
#error "Only <glib-object.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef __GI_SCANNER__
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GClosure, g_closure_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GEnumClass, g_type_class_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFlagsClass, g_type_class_unref)
|
||||
@ -31,3 +33,5 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitiallyUnowned, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GParamSpec, g_param_spec_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTypeClass, g_type_class_unref)
|
||||
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_unset)
|
||||
|
||||
#endif /* __GI_SCANNER__ */
|
||||
|
@ -2041,7 +2041,7 @@ g_signal_override_class_handler (const gchar *signal_name,
|
||||
|
||||
/**
|
||||
* g_signal_chain_from_overridden:
|
||||
* @instance_and_params: (array) the argument list of the signal emission.
|
||||
* @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.
|
||||
|
@ -50,7 +50,7 @@
|
||||
* 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
|
||||
* [func@GObject.type_module_use] and [func@GObject.type_module_unuse].
|
||||
* [method@GObject.TypeModule.use] and [method@GObject.TypeModule.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
|
||||
|
@ -39,25 +39,25 @@
|
||||
* new_type_plugin,
|
||||
* type_flags);
|
||||
* ```
|
||||
* where @new_type_plugin is an implementation of the
|
||||
* where `new_type_plugin` is an implementation of the
|
||||
* `GTypePlugin` interface.
|
||||
*
|
||||
* 2. The type's implementation is referenced, e.g. through
|
||||
* [func@GObject.type_class_ref] or through [func@GObject.type_create_instance]
|
||||
* (this is being called by [func@GObject.object_new]) or through one of the above
|
||||
* done on a type derived from @new_type_id.
|
||||
* [func@GObject.TypeClass.ref] or through [func@GObject.type_create_instance]
|
||||
* (this is being called by [ctor@GObject.Object.new]) or through one of the above
|
||||
* done on a type derived from `new_type_id`.
|
||||
*
|
||||
* 3. This causes the type system to load the type's implementation by calling
|
||||
* [func@GObject.type_plugin_use] and [method@GObject.TypePlugin.complete_type_info]
|
||||
* on @new_type_plugin.
|
||||
* [method@GObject.TypePlugin.use] and [method@GObject.TypePlugin.complete_type_info]
|
||||
* on `new_type_plugin`.
|
||||
*
|
||||
* 4. At some point the type's implementation isn't required anymore, e.g. after
|
||||
* [func@GObject.type_class_unref] or [func@GObject.type_free_instance]
|
||||
* [method@GObject.TypeClass.unref] or [func@GObject.type_free_instance]
|
||||
* (called when the reference count of an instance drops to zero).
|
||||
*
|
||||
* 5. This causes the type system to throw away the information retrieved
|
||||
* from [method@GObject.TypePlugin.complete_type_info] and then it calls
|
||||
* [method@GObject.TypePlugin.unuse] on @new_type_plugin.
|
||||
* [method@GObject.TypePlugin.unuse] on `new_type_plugin`.
|
||||
*
|
||||
* 6. Things may repeat from the second step.
|
||||
*
|
||||
@ -70,7 +70,7 @@
|
||||
* [method@GObject.TypePlugin.use] and [method@GObject.TypePlugin.complete_type_info]
|
||||
* again when the type is needed again.
|
||||
*
|
||||
* [struct@GObject.TypeModule] is an implementation of `GTypePlugin` that
|
||||
* [class@GObject.TypeModule] 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.
|
||||
*/
|
||||
|
@ -44,8 +44,8 @@
|
||||
* `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
|
||||
* [func@GObject.value_unset] as the clear function using
|
||||
* [method@GLib.Array.set_clear_func], for instance, the following code:
|
||||
* [method@GObject.Value.unset] as the clear function using
|
||||
* [func@GLib.Array.set_clear_func], for instance, the following code:
|
||||
*
|
||||
* ```c
|
||||
* GValueArray *array = g_value_array_new (10);
|
||||
|
@ -163,6 +163,58 @@ pkg.generate(libgobject,
|
||||
description : 'GLib Type, Object, Parameter and Signal Library',
|
||||
)
|
||||
|
||||
if enable_gir
|
||||
# We generate GLib-2.0 here, as we need various GTypes
|
||||
glib_gir = gnome.generate_gir(libglib,
|
||||
sources: [
|
||||
glibconfig_h,
|
||||
gversionmacros_h,
|
||||
glib_visibility_h,
|
||||
glib_headers,
|
||||
glib_deprecated_headers,
|
||||
glib_sub_headers,
|
||||
glib_enumtypes_h,
|
||||
glib_types_h,
|
||||
glib_deprecated_sources,
|
||||
glib_sources,
|
||||
],
|
||||
namespace: 'GLib',
|
||||
nsversion: '2.0',
|
||||
identifier_prefix: 'G',
|
||||
symbol_prefix: 'g',
|
||||
export_packages: 'glib-2.0',
|
||||
header: 'glib.h',
|
||||
install: true,
|
||||
dependencies: libglib_dep,
|
||||
extra_args: gir_args + [
|
||||
'-DGLIB_COMPILATION',
|
||||
'-DGETTEXT_PACKAGE="dummy"',
|
||||
'--symbol-prefix=glib',
|
||||
'--library=gobject-2.0',
|
||||
],
|
||||
)
|
||||
|
||||
gobject_gir = gnome.generate_gir(libgobject,
|
||||
sources: [
|
||||
gobject_visibility_h,
|
||||
gobject_install_headers,
|
||||
gobject_sources,
|
||||
],
|
||||
namespace: 'GObject',
|
||||
nsversion: '2.0',
|
||||
identifier_prefix: 'G',
|
||||
symbol_prefix: 'g',
|
||||
export_packages: 'gobject-2.0',
|
||||
header: 'glib-object.h',
|
||||
includes: [ glib_gir[0] ],
|
||||
install: true,
|
||||
extra_args: gir_args + [
|
||||
'-DGOBJECT_COMPILATION',
|
||||
'--symbol-prefix=gobject',
|
||||
],
|
||||
)
|
||||
endif
|
||||
|
||||
libgobject_dep = declare_dependency(link_with : libgobject,
|
||||
include_directories : [gobjectinc],
|
||||
sources : [gobject_visibility_h, glib_enumtypes_h],
|
||||
|
15
meson.build
15
meson.build
@ -2456,8 +2456,22 @@ if want_systemtap and enable_dtrace
|
||||
enable_systemtap = true
|
||||
endif
|
||||
|
||||
# introspection
|
||||
gir_scanner = find_program('g-ir-scanner', required: get_option('introspection'))
|
||||
enable_gir = get_option('introspection').allowed() and gir_scanner.found() and meson.can_run_host_binaries()
|
||||
|
||||
if get_option('introspection').enabled() and not meson.can_run_host_binaries()
|
||||
error('Running binaries on the build host needs to be supported to build with -Dintrospection=enabled')
|
||||
endif
|
||||
|
||||
gir_args = [
|
||||
'--quiet',
|
||||
]
|
||||
|
||||
pkg = import('pkgconfig')
|
||||
windows = import('windows')
|
||||
gnome = import('gnome')
|
||||
|
||||
subdir('tools')
|
||||
subdir('glib')
|
||||
subdir('gobject')
|
||||
@ -2579,4 +2593,5 @@ summary({
|
||||
'glib_checks' : get_option('glib_checks'),
|
||||
'libelf' : get_option('libelf'),
|
||||
'multiarch' : get_option('multiarch'),
|
||||
'introspection' : enable_gir,
|
||||
}, section: 'Options')
|
||||
|
@ -125,3 +125,8 @@ option('multiarch',
|
||||
type : 'boolean',
|
||||
value : false,
|
||||
description : 'Install some helper executables in per-architecture locations')
|
||||
|
||||
option('introspection',
|
||||
type: 'feature',
|
||||
value: 'auto',
|
||||
description: 'Enable generating introspection data (requires gobject-introspection)')
|
||||
|
Loading…
x
Reference in New Issue
Block a user