From 7368d58a2d615e7cade85afd3f88df65256b699f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 2 Feb 2022 13:23:27 +0200 Subject: Update glib introspection data This is based on c7031164b13d1e184aeaf5850a10897b06269735 --- gir/gio-2.0.c | 188 +++++++++++++++++++++++++-- gir/glib-2.0.c | 76 +++++++++++ gir/gobject-2.0.c | 370 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 623 insertions(+), 11 deletions(-) diff --git a/gir/gio-2.0.c b/gir/gio-2.0.c index a1298c01..3948e45f 100644 --- a/gir/gio-2.0.c +++ b/gir/gio-2.0.c @@ -1511,6 +1511,57 @@ */ +/** + * GDebugController:debug-enabled: + * + * %TRUE if debug output should be exposed (for example by forwarding it to + * the journal), %FALSE otherwise. + * + * Since: 2.72 + */ + + +/** + * GDebugControllerDBus::authorize: + * @controller: The #GDebugControllerDBus emitting the signal. + * @invocation: A #GDBusMethodInvocation. + * + * Emitted when a D-Bus peer is trying to change the debug settings and used + * to determine if that is authorized. + * + * This signal is emitted in a dedicated worker thread, so handlers are + * allowed to perform blocking I/O. This means that, for example, it is + * appropriate to call `polkit_authority_check_authorization_sync()` to check + * authorization using polkit. + * + * If %FALSE is returned then no further handlers are run and the request to + * change the debug settings is rejected. + * + * Otherwise, if %TRUE is returned, signal emission continues. If no handlers + * return %FALSE, then the debug settings are allowed to be changed. + * + * Signal handlers must not modify @invocation, or cause it to return a value. + * + * The default class handler just returns %TRUE. + * + * Returns: %TRUE if the call is authorized, %FALSE otherwise. + * Since: 2.72 + */ + + +/** + * GDebugControllerDBus:connection: + * + * The D-Bus connection to expose the debugging interface on. + * + * Typically this will be the same connection (to the system or session bus) + * which the rest of the application or service’s D-Bus objects are registered + * on. + * + * Since: 2.72 + */ + + /** * GDesktopAppInfo: * @@ -5713,6 +5764,9 @@ * On Solaris (including OpenSolaris and its derivatives), the native * credential type is a `ucred_t`. This corresponds to * %G_CREDENTIALS_TYPE_SOLARIS_UCRED. + * + * Since GLib 2.72, on Windows, the native credentials may contain the PID of a + * process. This corresponds to %G_CREDENTIALS_TYPE_WIN32_PID. */ @@ -5822,6 +5876,9 @@ * * TCP D-Bus connections are supported, but accessing them via a proxy is * currently not supported. + * + * Since GLib 2.72, `unix:` addresses are supported on Windows with `AF_UNIX` + * support (Windows 10). */ @@ -6383,6 +6440,46 @@ */ +/** + * SECTION:gdebugcontroller + * @title: GDebugController + * @short_description: Debugging controller + * @include: gio/gio.h + * + * #GDebugController is an interface to expose control of debugging features and + * debug output. + * + * It is implemented on Linux using #GDebugControllerDBus, which exposes a D-Bus + * interface to allow authenticated peers to control debug features in this + * process. + * + * Whether debug output is enabled is exposed as + * #GDebugController:debug-enabled. This controls g_log_set_debug_enabled() by + * default. Application code may connect to the #GObject::notify signal for it + * to control other parts of its debug infrastructure as necessary. + * + * Since: 2.72 + */ + + +/** + * SECTION:gdebugcontrollerdbus + * @title: GDebugControllerDBus + * @short_description: Debugging controller D-Bus implementation + * @include: gio/gio.h + * + * #GDebugControllerDBus is an implementation of #GDebugController which exposes + * debug settings as a D-Bus object. + * + * It is a #GInitable object, and will register an object at + * `/org/gtk/Debugging` on the bus given as + * #GDebugControllerDBus:connection once it’s initialized. The object will be + * unregistered when the last reference to the #GDebugControllerDBus is dropped. + * + * Since: 2.72 + */ + + /** * SECTION:gdesktopappinfo * @title: GDesktopAppInfo @@ -10080,9 +10177,12 @@ * It contains functions to do some of the UNIX socket specific * functionality like passing file descriptors. * - * Note that `` belongs to the UNIX-specific - * GIO interfaces, thus you have to use the `gio-unix-2.0.pc` - * pkg-config file when using it. + * Since GLib 2.72, #GUnixConnection is available on all platforms. It requires + * underlying system support (such as Windows 10 with `AF_UNIX`) at run time. + * + * Before GLib 2.72, `` belonged to the UNIX-specific GIO + * interfaces, thus you had to use the `gio-unix-2.0.pc` pkg-config file when + * using it. This is no longer necessary since GLib 2.72. * * Since: 2.22 */ @@ -10106,6 +10206,14 @@ * g_unix_connection_receive_credentials(). To receive credentials of * a foreign process connected to a socket, use * g_socket_get_credentials(). + * + * Since GLib 2.72, #GUnixCredentialMessage is available on all platforms. It + * requires underlying system support (such as Windows 10 with `AF_UNIX`) at run + * time. + * + * Before GLib 2.72, `` belonged to the UNIX-specific + * GIO interfaces, thus you had to use the `gio-unix-2.0.pc` pkg-config file + * when using it. This is no longer necessary since GLib 2.72. */ @@ -10217,9 +10325,13 @@ * errors. You can use g_unix_socket_address_abstract_names_supported() * to see if abstract names are supported. * - * Note that `` belongs to the UNIX-specific GIO - * interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file - * when using it. + * Since GLib 2.72, #GUnixSocketAddress is available on all platforms. It + * requires underlying system support (such as Windows 10 with `AF_UNIX`) at + * run time. + * + * Before GLib 2.72, `` belonged to the UNIX-specific + * GIO interfaces, thus you had to use the `gio-unix-2.0.pc` pkg-config file + * when using it. This is no longer necessary since GLib 2.72. */ @@ -13610,7 +13722,9 @@ * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the * event that you need a private message bus connection, use * g_dbus_address_get_for_bus_sync() and - * g_dbus_connection_new_for_address(). + * g_dbus_connection_new_for_address() with + * G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and + * G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION flags. * * Note that the returned #GDBusConnection object will (usually) have * the #GDBusConnection:exit-on-close property set to %TRUE. @@ -13639,7 +13753,9 @@ * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the * event that you need a private message bus connection, use * g_dbus_address_get_for_bus_sync() and - * g_dbus_connection_new_for_address(). + * g_dbus_connection_new_for_address() with + * G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and + * G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION flags. * * Note that the returned #GDBusConnection object will (usually) have * the #GDBusConnection:exit-on-close property set to %TRUE. @@ -20120,6 +20236,58 @@ */ +/** + * g_debug_controller_dbus_new: + * @connection: a #GDBusConnection to register the debug object on + * @cancellable: (nullable): a #GCancellable, or %NULL + * @error: return location for a #GError, or %NULL + * + * Create a new #GDebugControllerDBus and synchronously initialize it. + * + * Initializing the object will export the debug object on @connection. The + * object will remain registered until the last reference to the + * #GDebugControllerDBus is dropped. + * + * Initialization may fail if registering the object on @connection fails. + * + * Returns: (nullable) (transfer full): a new #GDebugControllerDBus, or %NULL + * on failure + * Since: 2.72 + */ + + +/** + * g_debug_controller_dup_default: + * + * Gets a reference to the default #GDebugController for the system. + * + * Returns: (not nullable) (transfer full): a new reference to the default #GDebugController + * Since: 2.72 + */ + + +/** + * g_debug_controller_get_debug_enabled: + * @self: a #GDebugController + * + * Get the value of #GDebugController:debug-enabled. + * + * Returns: %TRUE if debug output should be exposed, %FALSE otherwise + * Since: 2.72 + */ + + +/** + * g_debug_controller_set_debug_enabled: + * @self: a #GDebugController + * @debug_enabled: %TRUE if debug output should be exposed, %FALSE otherwise + * + * Set the value of #GDebugController:debug-enabled. + * + * Since: 2.72 + */ + + /** * g_desktop_app_info_get_action_name: * @info: a #GDesktopAppInfo @@ -25602,9 +25770,7 @@ * If the @relative_path is an absolute path name, the resolution * is done absolutely (without taking @file path as base). * - * Returns: (transfer full) (nullable): #GFile to the resolved path. - * %NULL if @relative_path is %NULL or if @file is invalid. - * Free the returned object with g_object_unref(). + * Returns: (transfer full): a #GFile for the resolved path. */ diff --git a/gir/glib-2.0.c b/gir/glib-2.0.c index d31f633c..d0691884 100644 --- a/gir/glib-2.0.c +++ b/gir/glib-2.0.c @@ -21809,6 +21809,23 @@ */ +/** + * g_log_get_debug_enabled: + * + * Return whether debug output from the GLib logging system is enabled. + * + * Note that this should not be used to conditionalise calls to g_debug() or + * other logging functions; it should only be used from %GLogWriterFunc + * implementations. + * + * Note also that the value of this does not depend on `G_MESSAGES_DEBUG`, as + * it is domain-dependent. + * + * Returns: %TRUE if debug output is enabled, %FALSE otherwise + * Since: 2.72 + */ + + /** * g_log_remove_handler: * @log_domain: the log domain @@ -21848,6 +21865,21 @@ */ +/** + * g_log_set_debug_enabled: + * @enabled: %TRUE to enable debug output, %FALSE otherwise + * + * Enable or disable debug output from the GLib logging system is enabled. This + * value interacts disjunctively with `G_MESSAGES_DEBUG` — if either of them + * would allow a debug message to be outputted, it will be. + * + * Note that this should not be used from within library code to enable debug + * output — it is intended for external use. + * + * Since: 2.72 + */ + + /** * g_log_set_default_handler: * @log_func: the log handler function @@ -41992,6 +42024,50 @@ */ +/** + * g_win32_find_helper_executable_path: + * @executable_name: (transfer none): name of the helper executable to find + * (something like gspawn-win64-helper.exe or gdbus.exe for example). + * @dll_handle: handle of the DLL to use as searching base path. Pass NULL + * to take current process executable as searching base path. + * + * Find an external executable path and name starting in the same folder + * as a specified DLL or current process executable path. Helper executables + * (like gspawn-win64-helper.exe, gspawn-win64-helper-console.exe or + * gdbus.exe for example) are generally installed in the same folder as the + * corresponding DLL file. + * + * So, if package has been correctly installed, with a dynamic build of GLib, + * the helper executable should be in the same directory as the corresponding + * DLL file and searching should be straightforward. + * + * But if built statically, DLL handle is not available and we have to start + * searching from the directory holding current executable. It may be very + * different from the directory containing the helper program. In order to + * find the right helper program automatically in all common situations, we + * use this pattern: + * + * current directory + * |-- ??? + * |-- bin + * | |-- ??? + * |-- lib + * | |-- ??? + * |-- glib + * | |-- ??? + * |-- gio + * |-- ??? + * + * starting at base searching path (DLL or current executable directory) and + * getting up until the root path. If we cannot still find the helper program, + * we'll rely on PATH as the last resort. + * + * Returns: (transfer full) (type filename) (nullable): the helper executable + * path and name in the GLib filename encoding or NULL in case of error. It + * should be deallocated with g_free(). + */ + + /** * g_win32_get_command_line: * diff --git a/gir/gobject-2.0.c b/gir/gobject-2.0.c index 4a9d1727..950a9626 100644 --- a/gir/gobject-2.0.c +++ b/gir/gobject-2.0.c @@ -55,6 +55,15 @@ */ +/** + * GBindingGroup:source: (nullable) + * + * The source object used for binding properties. + * + * Since: 2.72 + */ + + /** * GObject::notify: * @gobject: the object which received the signal. @@ -99,6 +108,52 @@ */ +/** + * GSignalGroup::bind: + * @self: the #GSignalGroup + * @instance: a #GObject containing the new value for #GSignalGroup:target + * + * This signal is emitted when #GSignalGroup:target is set to a new value + * other than %NULL. It is similar to #GObject::notify on `target` except it + * will not emit when #GSignalGroup:target is %NULL and also allows for + * receiving the #GObject without a data-race. + * + * Since: 2.72 + */ + + +/** + * GSignalGroup::unbind: + * @self: a #GSignalGroup + * + * This signal is emitted when the target instance of @self is set to a + * new #GObject. + * + * This signal will only be emitted if the previous target of @self is + * non-%NULL. + * + * Since: 2.72 + */ + + +/** + * GSignalGroup:target: + * + * The target instance used when connecting signals. + * + * Since: 2.72 + */ + + +/** + * GSignalGroup:target-type: + * + * The #GType of the target property. + * + * Since: 2.72 + */ + + /** * GWeakRef: * @@ -252,6 +307,24 @@ */ +/** + * SECTION:gbindinggroup + * @Title: GBindingGroup + * @Short_description: Binding multiple properties as a group + * @include: glib-object.h + * + * The #GBindingGroup can be used to bind multiple properties + * from an object collectively. + * + * Use the various methods to bind properties from a single source + * object to multiple destination objects. Properties can be bound + * bidirectionally and are connected when the source object is set + * with g_binding_group_set_source(). + * + * Since: 2.72 + */ + + /** * SECTION:gboxed * @short_description: A mechanism to wrap opaque C structures registered @@ -473,6 +546,34 @@ */ +/** + * SECTION:gsignalgroup + * @Title: GSignalGroup + * @Short_description: Manage a collection of signals on a GObject + * + * #GSignalGroup manages to simplify the process of connecting + * many signals to a #GObject as a group. As such there is no API + * to disconnect a signal from the group. + * + * In particular, this allows you to: + * + * - Change the target instance, which automatically causes disconnection + * of the signals from the old instance and connecting to the new instance. + * - Block and unblock signals as a group + * - Ensuring that blocked state transfers across target instances. + * + * One place you might want to use such a structure is with #GtkTextView and + * #GtkTextBuffer. Often times, you'll need to connect to many signals on + * #GtkTextBuffer from a #GtkTextView subclass. This allows you to create a + * signal group during instance construction, simply bind the + * #GtkTextView:buffer property to #GSignalGroup:target and connect + * all the signals you need. When the #GtkTextView:buffer property changes + * all of the signals will be transitioned correctly. + * + * Since: 2.72 + */ + + /** * SECTION:gtype * @short_description: The GLib Runtime type identification and @@ -975,6 +1076,118 @@ */ +/** + * g_binding_group_bind: + * @self: the #GBindingGroup + * @source_property: the property on the source to bind + * @target: (type GObject) (transfer none) (not nullable): the target #GObject + * @target_property: the property on @target to bind + * @flags: the flags used to create the #GBinding + * + * Creates a binding between @source_property on the source object + * and @target_property on @target. Whenever the @source_property + * is changed the @target_property is updated using the same value. + * The binding flag %G_BINDING_SYNC_CREATE is automatically specified. + * + * See g_object_bind_property() for more information. + * + * Since: 2.72 + */ + + +/** + * g_binding_group_bind_full: + * @self: the #GBindingGroup + * @source_property: the property on the source to bind + * @target: (type GObject) (transfer none) (not nullable): the target #GObject + * @target_property: the property on @target to bind + * @flags: the flags used to create the #GBinding + * @transform_to: (scope notified) (nullable): the transformation function + * from the source object to the @target, or %NULL to use the default + * @transform_from: (scope notified) (nullable): the transformation function + * from the @target to the source object, or %NULL to use the default + * @user_data: custom data to be passed to the transformation + * functions, or %NULL + * @user_data_destroy: function to be called when disposing the binding, + * to free the resources used by the transformation functions + * + * Creates a binding between @source_property on the source object and + * @target_property on @target, allowing you to set the transformation + * functions to be used by the binding. The binding flag + * %G_BINDING_SYNC_CREATE is automatically specified. + * + * See g_object_bind_property_full() for more information. + * + * Since: 2.72 + */ + + +/** + * g_binding_group_bind_with_closures: (rename-to g_binding_group_bind_full) + * @self: the #GBindingGroup + * @source_property: the property on the source to bind + * @target: (type GObject) (transfer none) (not nullable): the target #GObject + * @target_property: the property on @target to bind + * @flags: the flags used to create the #GBinding + * @transform_to: (nullable) (transfer none): a #GClosure wrapping the + * transformation function from the source object to the @target, + * or %NULL to use the default + * @transform_from: (nullable) (transfer none): a #GClosure wrapping the + * transformation function from the @target to the source object, + * or %NULL to use the default + * + * Creates a binding between @source_property on the source object and + * @target_property on @target, allowing you to set the transformation + * functions to be used by the binding. The binding flag + * %G_BINDING_SYNC_CREATE is automatically specified. + * + * This function is the language bindings friendly version of + * g_binding_group_bind_property_full(), using #GClosures + * instead of function pointers. + * + * See g_object_bind_property_with_closures() for more information. + * + * Since: 2.72 + */ + + +/** + * g_binding_group_dup_source: + * @self: the #GBindingGroup + * + * Gets the source object used for binding properties. + * + * Returns: (transfer none) (nullable) (type GObject): a #GObject or %NULL. + * Since: 2.72 + */ + + +/** + * g_binding_group_new: + * + * Creates a new #GBindingGroup. + * + * Returns: (transfer full): a new #GBindingGroup + * Since: 2.72 + */ + + +/** + * g_binding_group_set_source: + * @self: the #GBindingGroup + * @source: (type GObject) (nullable) (transfer none): the source #GObject, + * or %NULL to clear it + * + * Sets @source as the source object used for creating property + * bindings. If there is already a source object all bindings from it + * will be removed. + * + * Note that all properties that have been bound must exist on @source. + * + * Since: 2.72 + */ + + /** * g_binding_unbind: * @binding: a #GBinding @@ -4755,6 +4968,163 @@ */ +/** + * g_signal_group_block: + * @self: the #GSignalGroup + * + * Blocks all signal handlers managed by @self so they will not + * be called during any signal emissions. Must be unblocked exactly + * the same number of times it has been blocked to become active again. + * + * This blocked state will be kept across changes of the target instance. + * + * Since: 2.72 + */ + + +/** + * g_signal_group_connect: (skip) + * @self: a #GSignalGroup + * @detailed_signal: a string of the form "signal-name::detail" + * @c_handler: (scope notified): the #GCallback to connect + * @data: the data to pass to @c_handler calls + * + * Connects @c_handler to the signal @detailed_signal + * on the target instance of @self. + * + * You cannot connect a signal handler after #GSignalGroup:target has been set. + * + * Since: 2.72 + */ + + +/** + * g_signal_group_connect_after: (skip) + * @self: a #GSignalGroup + * @detailed_signal: a string of the form "signal-name::detail" + * @c_handler: (scope notified): the #GCallback to connect + * @data: the data to pass to @c_handler calls + * + * Connects @c_handler to the signal @detailed_signal + * on the target instance of @self. + * + * The @c_handler will be called after the default handler of the signal. + * + * You cannot connect a signal handler after #GSignalGroup:target has been set. + * + * Since: 2.72 + */ + + +/** + * g_signal_group_connect_data: + * @self: a #GSignalGroup + * @detailed_signal: a string of the form "signal-name::detail" + * @c_handler: (scope notified) (closure data) (destroy notify): the #GCallback to connect + * @data: the data to pass to @c_handler calls + * @notify: function to be called when disposing of @self + * @flags: the flags used to create the signal connection + * + * Connects @c_handler to the signal @detailed_signal + * on the target instance of @self. + * + * You cannot connect a signal handler after #GSignalGroup:target has been set. + * + * Since: 2.72 + */ + + +/** + * g_signal_group_connect_object: (skip) + * @self: a #GSignalGroup + * @detailed_signal: a string of the form `signal-name` with optional `::signal-detail` + * @c_handler: (scope notified): the #GCallback to connect + * @object: (not nullable) (transfer none): the #GObject to pass as data to @c_handler calls + * @flags: #GConnectFlags for the signal connection + * + * Connects @c_handler to the signal @detailed_signal on #GSignalGroup:target. + * + * Ensures that the @object stays alive during the call to @c_handler + * by temporarily adding a reference count. When the @object is destroyed + * the signal handler will automatically be removed. + * + * You cannot connect a signal handler after #GSignalGroup:target has been set. + * + * Since: 2.72 + */ + + +/** + * g_signal_group_connect_swapped: + * @self: a #GSignalGroup + * @detailed_signal: a string of the form "signal-name::detail" + * @c_handler: (scope async): the #GCallback to connect + * @data: the data to pass to @c_handler calls + * + * Connects @c_handler to the signal @detailed_signal + * on the target instance of @self. + * + * The instance on which the signal is emitted and @data + * will be swapped when calling @c_handler. + * + * You cannot connect a signal handler after #GSignalGroup:target has been set. + * + * Since: 2.72 + */ + + +/** + * g_signal_group_dup_target: + * @self: the #GSignalGroup + * + * Gets the target instance used when connecting signals. + * + * Returns: (nullable) (transfer full) (type GObject): The target instance + * Since: 2.72 + */ + + +/** + * g_signal_group_new: + * @target_type: the #GType of the target instance. + * + * Creates a new #GSignalGroup for target instances of @target_type. + * + * Returns: (transfer full): a new #GSignalGroup + * Since: 2.72 + */ + + +/** + * g_signal_group_set_target: + * @self: the #GSignalGroup. + * @target: (nullable) (type GObject) (transfer none): The target instance used + * when connecting signals. + * + * Sets the target instance used when connecting signals. Any signal + * that has been registered with g_signal_group_connect_object() or + * similar functions will be connected to this object. + * + * If the target instance was previously set, signals will be + * disconnected from that object prior to connecting to @target. + * + * Since: 2.72 + */ + + +/** + * g_signal_group_unblock: + * @self: the #GSignalGroup + * + * Unblocks all signal handlers managed by @self so they will be + * called again during any signal emissions unless it is blocked + * again. Must be unblocked exactly the same number of times it + * has been blocked to become active again. + * + * Since: 2.72 + */ + + /** * g_signal_handler_block: * @instance: (type GObject.Object): The instance to block the signal handler of. -- cgit v1.2.1