Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: GioBusAcquiredCallbackCallback

[91:7] extends: object

Invoked when a connection to a message bus has been obtained.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioBusAcquiredCallbackCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (connection, name, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioDatagramBasedSourceFuncCallback

[1212:7] extends: object

This is the function type of the callback used for the #GSource returned by g_datagram_based_create_source().

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioDatagramBasedSourceFuncCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (datagram_based, condition, data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioDBusInterfaceMethodCallFuncCallback

[595:7] extends: object

The type of the @method_call function in #GDBusInterfaceVTable. @interface_name may be NULL if not specified by the sender, although it’s encouraged for the sender to set it. If unset, and the object has only one method (across all interfaces) matching @method_name, that method is invoked. Otherwise, behaviour is implementation defined. See the D-Bus specification. It is recommended to return [error@Gio.DBusError.UNKNOWN_METHOD].

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioDBusInterfaceMethodCallFuncCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (connection, sender, object_path, interface_name, method_name, parameters, invocation, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioSettingsBindSetMappingCallback

[1800:7] extends: object

The type for the function that is used to convert an object property value to a [struct@GLib.Variant] for storing it in [class@Gio.Settings].

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioSettingsBindSetMappingCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (value, expected_type, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioApi

[2263:14] static extends: object

Generated low-level function wrappers for namespace Gio.

Members

  • lib

Methods

  • getLib ()

  • action_name_is_valid (string action_name)

    Checks if @action_name is valid. @action_name is valid if it consists only of alphanumeric characters, plus - and .. The empty string is not a valid action name. It is an error to call this function with a non-UTF-8 @action_name. @action_name must not be NULL.

    • @p action_name is a potential action name.
    • @r TRUE if @action_name is valid.
  • action_parse_detailed_name (string detailed_name)

    Parses a detailed action name into its separate name and target components. Detailed action names can have three formats. The first format is used to represent an action name with no target value and consists of just an action name containing no whitespace nor the characters :, ( or ). For example: app.action. The second format is used to represent an action with a target value that is a non-empty string consisting only of alphanumerics, plus - and .. In that case, the action name and target value are separated by a double colon (::). For example: app.action::target. The third format is used to represent an action with any type of target value, including strings. The target value follows the action name, surrounded in parens. For example: app.action(42). The target value is parsed using [func@GLib.Variant.parse]. If a tuple-typed value is desired, it must be specified in the same way, resulting in two sets of parens, for example: app.action((1,2,3)). A string target can be specified this way as well: app.action('target'). For strings, this third format must be used if target value is empty or contains characters other than alphanumerics, - and .. If this function returns TRUE, a non-NULL value is guaranteed to be returned in @action_name (if a pointer is passed in). A NULL value may still be returned in @target_value, as the

    • @detailed_name may not contain a target. If returned, the [type@GLib.Variant] in @target_value is guaranteed to not be floating.
    • @p detailed_name is a detailed action name.
    • @p action_name is the action name.
    • @p target_value is the target value, or NULL for no target.
    • @r TRUE if successful, else FALSE with @error set.
  • action_print_detailed_name (string action_name, object target_value)

    Formats a detailed action name from @action_name and @target_value. It is an error to call this function with an invalid action name. This function is the opposite of [func@Gio.Action.parse_detailed_name]. It will produce a string that can be parsed back to the @action_name and @target_value by that function. See that function for the types of strings that will be printed by this function.

    • @p action_name is a valid action name.
    • @p target_value is a [type@GLib.Variant] target value, or NULL.
    • @r a detailed format string.
  • app_info_create_from_commandline (string commandline, string application_name, string flags)

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

    • @p commandline is the command line to use.
    • @p application_name is the application name, or NULL to use
    • @commandline. ``
    • @p flags is flags that can specify details of the created [iface@Gio.AppInfo].
    • @r new [iface@Gio.AppInfo] for given command..
  • app_info_get_all ()

    Gets a list of all of the applications currently registered on this system. For desktop files, this includes applications that have NoDisplay=true set or are excluded from display by means of OnlyShowIn or NotShowIn. See [method@Gio.AppInfo.should_show]. The returned list does not include applications which have the Hidden key set.

    • @r a newly allocated list of references to [iface@Gio.AppInfo]s..
  • app_info_get_all_for_type (string content_type)

    Gets a list of all [iface@Gio.AppInfo]s for a given content type, including the recommended and fallback [iface@Gio.AppInfo]s. See [func@Gio.AppInfo.get_recommended_for_type] and [func@Gio.AppInfo.get_fallback_for_type].

    • @p content_type is the content type to find a [iface@Gio.AppInfo] for.
    • @r list of [iface@Gio.AppInfo]s for given @content_type..
  • app_info_get_default_for_type (string content_type, bool must_support_uris)

    Gets the default [iface@Gio.AppInfo] for a given content type.

    • @p content_type is the content type to find a [iface@Gio.AppInfo] for.
    • @p must_support_uris is if TRUE, the [iface@Gio.AppInfo] is expected to support URIs.
    • @r [iface@Gio.AppInfo] for given @content_type or NULL on error..
  • app_info_get_default_for_type_async (string content_type, bool must_support_uris, object cancellable, object arg3Callback)

    Asynchronously gets the default [iface@Gio.AppInfo] for a given content type.

    • @p content_type is the content type to find a [iface@Gio.AppInfo] for.
    • @p must_support_uris is if TRUE, the [iface@Gio.AppInfo] is expected to support URIs.
    • @p cancellable is a [class@Gio.Cancellable].
    • @p callback is a [type@Gio.AsyncReadyCallback] to call when the request is done.
    • @p user_data is data to pass to @callback.
    • @r None.
  • app_info_get_default_for_type_finish (object result)

    Finishes a default [iface@Gio.AppInfo] lookup started by [func@Gio.AppInfo.get_default_for_type_async]. If no #[iface@Gio.AppInfo] is found, then @error will be set to [error@Gio.IOErrorEnum.NOT_FOUND].

    • @p result is the async result.
    • @r [iface@Gio.AppInfo] for given @content_type or NULL on error..
  • app_info_get_default_for_uri_scheme (string uri_scheme)

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

    • @p uri_scheme is a string containing a URI scheme..
    • @r [iface@Gio.AppInfo] for given @uri_scheme or NULL on error..
  • app_info_get_default_for_uri_scheme_async (string uri_scheme, object cancellable, object arg2Callback)

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

    • @p uri_scheme is a string containing a URI scheme..
    • @p cancellable is a [class@Gio.Cancellable].
    • @p callback is a [type@Gio.AsyncReadyCallback] to call when the request is done.
    • @p user_data is data to pass to @callback.
    • @r None.
  • app_info_get_default_for_uri_scheme_finish (object result)

    Finishes a default [iface@Gio.AppInfo] lookup started by [func@Gio.AppInfo.get_default_for_uri_scheme_async]. If no [iface@Gio.AppInfo] is found, then @error will be set to [error@Gio.IOErrorEnum.NOT_FOUND].

    • @p result is the async result.
    • @r [iface@Gio.AppInfo] for given @uri_scheme or NULL on error..
  • app_info_get_fallback_for_type (string content_type)

    Gets a list of fallback [iface@Gio.AppInfo]s for a given content type, i.e. those applications which claim to support the given content type by MIME type subclassing and not directly.

    • @p content_type is the content type to find a [iface@Gio.AppInfo] for.
    • @r list of [iface@Gio.AppInfo]s for given @content_type or NULL on error..
  • app_info_get_recommended_for_type (string content_type)

    Gets a list of recommended [iface@Gio.AppInfo]s for a given content type, i.e. those applications which claim to support the given content type exactly, and not by MIME type subclassing. Note that the first application of the list is the last used one, i.e. the last one for which [method@Gio.AppInfo.set_as_last_used_for_type] has been called.

    • @p content_type is the content type to find a [iface@Gio.AppInfo] for.
    • @r list of [iface@Gio.AppInfo]s for given @content_type or NULL on error..
  • app_info_launch_default_for_uri (string uri, object context)

    Utility function that launches the default application registered to handle the specified uri. Synchronous I/O is done on the uri to detect the type of the file if required. The D-Bus–activated applications don’t have to be started if your application terminates too soon after this function. To prevent this, use [func@Gio.AppInfo.launch_default_for_uri_async] instead.

    • @p uri is the uri to show.
    • @p context is optional launch context.
    • @r TRUE on success, FALSE on error..
  • app_info_launch_default_for_uri_async (string uri, object context, object cancellable, object arg3Callback)

    Async version of [func@Gio.AppInfo.launch_default_for_uri]. This version is useful if you are interested in receiving error information in the case where the application is sandboxed and the portal may present an application chooser dialog to the user. This is also useful if you want to be sure that the D-Bus–activated applications are really started before termination and if you are interested in receiving error information from their activation.

    • @p uri is the uri to show.
    • @p context is optional launch context.
    • @p cancellable is a [class@Gio.Cancellable].
    • @p callback is a [type@Gio.AsyncReadyCallback] to call when the request is done.
    • @p user_data is data to pass to @callback.
    • @r None.
  • app_info_launch_default_for_uri_finish (object result)

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

    • @p result is the async result.
    • @r TRUE if the launch was successful, FALSE if @error is set.
  • app_info_reset_type_associations (string content_type)

    Removes all changes to the type associations done by [method@Gio.AppInfo.set_as_default_for_type], [method@Gio.AppInfo.set_as_default_for_extension], [method@Gio.AppInfo.add_supports_type] or [method@Gio.AppInfo.remove_supports_type].

    • @p content_type is a content type.
    • @r None.
  • async_initable_newv_async (int object_type, int n_parameters, object parameters, int io_priority, object cancellable, object arg5Callback)

    Helper function for constructing #GAsyncInitable object. This is similar to g_object_newv() but also initializes the object asynchronously. When the initialization is finished, @callback will be called. You can then call g_async_initable_new_finish() to get the new object and check for any errors.

    • @p object_type is a #GType supporting #GAsyncInitable..
    • @p n_parameters is the number of parameters in @parameters.
    • @p parameters is the parameters to use to construct the object.
    • @p io_priority is the I/O priority of the operation.
    • @p cancellable is optional #GCancellable object, %NULL to ignore..
    • @p callback is a #GAsyncReadyCallback to call when the initialization is finished.
    • @p user_data is the data to pass to callback function.
    • @r None.
  • bus_get (string bus_type, object cancellable, object arg2Callback)

    Asynchronously connects to the message bus specified by @bus_type. When the operation is finished, @callback will be invoked. You can then call g_bus_get_finish() to get the result of the operation. This is an asynchronous failable function. See g_bus_get_sync() for the synchronous version.

    • @p bus_type is a #GBusType.
    • @p cancellable is a #GCancellable or %NULL.
    • @p callback is a #GAsyncReadyCallback to call when the request is satisfied.
    • @p user_data is the data to pass to @callback.
    • @r None.
  • bus_get_finish (object res)

    Finishes an operation started with g_bus_get(). The returned object is a singleton, that is, shared with other callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the event that you need a private message bus connection, use g_dbus_address_get_for_bus_sync() and g_dbus_connection_new_for_address() 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.

    • @p res is a #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_bus_get().
    • @r a #GDBusConnection or %NULL if @error is set. Free with g_object_unref()..
  • bus_get_sync (string bus_type, object cancellable)

    Synchronously connects to the message bus specified by @bus_type. Note that the returned object may shared with other callers, e.g. if two separate parts of a process calls this function with the same @bus_type, they will share the same object. This is a synchronous failable function. See g_bus_get() and g_bus_get_finish() for the asynchronous version. The returned object is a singleton, that is, shared with other callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the event that you need a private message bus connection, use g_dbus_address_get_for_bus_sync() and g_dbus_connection_new_for_address() 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.

    • @p bus_type is a #GBusType.
    • @p cancellable is a #GCancellable or %NULL.
    • @r a #GDBusConnection or %NULL if @error is set. Free with g_object_unref()..
  • bus_own_name (string bus_type, string name, string flags, object bus_acquired_handler, object name_acquired_handler, object name_lost_handler)

    Requests ownership of @name on the bus specified by @bus_type. It asynchronously calls @name_acquired_handler and @name_lost_handler when the name is acquired and lost, respectively. Callbacks will be invoked in the thread-default main context (see [method@GLib.MainContext.push_thread_default]) of the thread you are calling this function from. You are guaranteed that one of the

    • @name_acquired_handler and @name_lost_handler callbacks will be invoked after calling this function — there are three possible cases: -
    • @name_lost_handler with a NULL connection (if a connection to the bus can’t be made). - @bus_acquired_handler then @name_lost_handler (if the name can’t be obtained). - @bus_acquired_handler then
    • @name_acquired_handler (if the name was obtained). When you are done owning the name, call [func@Gio.bus_unown_name] with the owner ID this function returns. If the name is acquired or lost (for example another application could acquire the name if you allow replacement or the application currently owning the name exits), the handlers are also invoked. If the [class@Gio.DBusConnection] that is used for attempting to own the name closes, then @name_lost_handler is invoked since it is no longer possible for other processes to access the process. You cannot use [func@Gio.bus_own_name] several times for the same name (unless interleaved with calls to [func@Gio.bus_unown_name]) — only the first call will work. Another guarantee is that invocations of
    • @name_acquired_handler and @name_lost_handler are guaranteed to alternate; that is, if @name_acquired_handler is invoked then you are guaranteed that the next time one of the handlers is invoked, it will be
    • @name_lost_handler. The reverse is also true. If you plan on exporting objects (using, for example, [method@Gio.DBusConnection.register_object]), note that it is generally too late to export the objects in @name_acquired_handler. Instead, you can do this in @bus_acquired_handler since you are guaranteed that this will run before @name is requested from the bus. This behavior makes it very simple to write applications that want to own names and export objects. Simply register objects to be exported in @bus_acquired_handler and unregister the objects (if any) in @name_lost_handler.
    • @p bus_type is the type of bus to own a name on.
    • @p name is the well-known name to own.
    • @p flags is a set of flags with ownership options.
    • @p bus_acquired_handler is handler to invoke when connected to the bus of type @bus_type, or NULL to ignore.
    • @p name_acquired_handler is handler to invoke when @name is acquired, or NULL to ignore.
    • @p name_lost_handler is handler to invoke when @name is lost, or NULL to ignore.
    • @p user_data is user data to pass to handlers.
    • @p user_data_free_func is function for freeing @user_data.
    • @r an identifier (never 0) that can be used with [func@Gio.bus_unown_name] to stop owning the name.
  • bus_own_name_on_connection (object connection, string name, string flags, object name_acquired_handler, object name_lost_handler)

    Like [func@Gio.bus_own_name] but takes a [class@Gio.DBusConnection] instead of a [enum@Gio.BusType].

    • @p connection is a bus connection.
    • @p name is the well-known name to own.
    • @p flags is a set of flags with ownership options.
    • @p name_acquired_handler is handler to invoke when @name is acquired, or NULL to ignore.
    • @p name_lost_handler is handler to invoke when @name is lost, or NULL to ignore.
    • @p user_data is user data to pass to handlers.
    • @p user_data_free_func is function for freeing @user_data.
    • @r an identifier (never 0) that can be used with [func@Gio.bus_unown_name] to stop owning the name.
  • bus_own_name_on_connection_with_closures (object connection, string name, string flags, object name_acquired_closure, object name_lost_closure)

    Version of [func@Gio.bus_own_name_on_connection] using closures instead of callbacks for easier binding in other languages.

    • @p connection is a bus connection.
    • @p name is the well-known name to own.
    • @p flags is a set of flags with ownership options.
    • @p name_acquired_closure is closure to invoke when @name is acquired, or NULL to ignore.
    • @p name_lost_closure is closure to invoke when @name is lost, or NULL to ignore.
    • @r an identifier (never 0) that can be used with [func@Gio.bus_unown_name] to stop owning the name..
  • bus_own_name_with_closures (string bus_type, string name, string flags, object bus_acquired_closure, object name_acquired_closure, object name_lost_closure)

    Version of [func@Gio.bus_own_name using closures instead of callbacks for easier binding in other languages.

    • @p bus_type is the type of bus to own a name on.
    • @p name is the well-known name to own.
    • @p flags is a set of flags with ownership options.
    • @p bus_acquired_closure is closure to invoke when connected to the bus of type @bus_type, or NULL to ignore.
    • @p name_acquired_closure is closure to invoke when @name is acquired, or NULL to ignore.
    • @p name_lost_closure is closure to invoke when @name is lost, or NULL to ignore.
    • @r an identifier (never 0) that can be used with [func@Gio.bus_unown_name] to stop owning the name..
  • bus_unown_name (int owner_id)

    Stops owning a name. Note that there may still be D-Bus traffic to process (relating to owning and unowning the name) in the current thread-default [struct@GLib.MainContext] after this function has returned. You should continue to iterate the [struct@GLib.MainContext] until the [callback@GLib.DestroyNotify] function passed to [func@Gio.bus_own_name] is called, in order to avoid memory leaks through callbacks queued on the [struct@GLib.MainContext] after it’s stopped being iterated.

    • @p owner_id is an identifier obtained from [func@Gio.bus_own_name].
    • @r None.
  • bus_unwatch_name (int watcher_id)

    Stops watching a name. Note that there may still be D-Bus traffic to process (relating to watching and unwatching the name) in the current thread-default #GMainContext after this function has returned. You should continue to iterate the #GMainContext until the #GDestroyNotify function passed to g_bus_watch_name() is called, in order to avoid memory leaks through callbacks queued on the #GMainContext after it’s stopped being iterated.

    • @p watcher_id is An identifier obtained from g_bus_watch_name().
    • @r None.
  • bus_watch_name (string bus_type, string name, string flags, object name_appeared_handler, object name_vanished_handler)

    Starts watching @name on the bus specified by @bus_type and calls

    • @name_appeared_handler and @name_vanished_handler when the name is known to have an owner respectively known to lose its owner. Callbacks will be invoked in the thread-default main context (see [method@GLib.MainContext.push_thread_default]) of the thread you are calling this function from. You are guaranteed that one of the handlers will be invoked after calling this function. When you are done watching the name, just call g_bus_unwatch_name() with the watcher id this function returns. If the name vanishes or appears (for example the application owning the name could restart), the handlers are also invoked. If the #GDBusConnection that is used for watching the name disconnects, then @name_vanished_handler is invoked since it is no longer possible to access the name. Another guarantee is that invocations of
    • @name_appeared_handler and @name_vanished_handler are guaranteed to alternate; that is, if @name_appeared_handler is invoked then you are guaranteed that the next time one of the handlers is invoked, it will be
    • @name_vanished_handler. The reverse is also true. This behavior makes it very simple to write applications that want to take action when a certain name exists. Basically, the application should create object proxies in @name_appeared_handler and destroy them again (if any) in @name_vanished_handler.
    • @p bus_type is The type of bus to watch a name on..
    • @p name is The name (well-known or unique) to watch..
    • @p flags is Flags from the #GBusNameWatcherFlags enumeration..
    • @p name_appeared_handler is Handler to invoke when @name is known to exist or %NULL..
    • @p name_vanished_handler is Handler to invoke when @name is known to not exist or %NULL..
    • @p user_data is User data to pass to handlers..
    • @p user_data_free_func is Function for freeing @user_data or %NULL..
    • @r An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name..
  • bus_watch_name_on_connection (object connection, string name, string flags, object name_appeared_handler, object name_vanished_handler)

    Like g_bus_watch_name() but takes a #GDBusConnection instead of a #GBusType.

    • @p connection is A #GDBusConnection..
    • @p name is The name (well-known or unique) to watch..
    • @p flags is Flags from the #GBusNameWatcherFlags enumeration..
    • @p name_appeared_handler is Handler to invoke when @name is known to exist or %NULL..
    • @p name_vanished_handler is Handler to invoke when @name is known to not exist or %NULL..
    • @p user_data is User data to pass to handlers..
    • @p user_data_free_func is Function for freeing @user_data or %NULL..
    • @r An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name..
  • bus_watch_name_on_connection_with_closures (object connection, string name, string flags, object name_appeared_closure, object name_vanished_closure)

    Version of g_bus_watch_name_on_connection() using closures instead of callbacks for easier binding in other languages.

    • @p connection is A #GDBusConnection..
    • @p name is The name (well-known or unique) to watch..
    • @p flags is Flags from the #GBusNameWatcherFlags enumeration..
    • @p name_appeared_closure is #GClosure to invoke when @name is known to exist or %NULL..
    • @p name_vanished_closure is #GClosure to invoke when @name is known to not exist or %NULL..
    • @r An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name..
  • bus_watch_name_with_closures (string bus_type, string name, string flags, object name_appeared_closure, object name_vanished_closure)

    Version of g_bus_watch_name() using closures instead of callbacks for easier binding in other languages.

    • @p bus_type is The type of bus to watch a name on..
    • @p name is The name (well-known or unique) to watch..
    • @p flags is Flags from the #GBusNameWatcherFlags enumeration..
    • @p name_appeared_closure is #GClosure to invoke when @name is known to exist or %NULL..
    • @p name_vanished_closure is #GClosure to invoke when @name is known to not exist or %NULL..
    • @r An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name..
  • content_type_can_be_executable (string type)

    Checks if a content type can be executable. Note that for instance things like text files can be executables (i.e. scripts and batch files).

    • @p type is a content type string.
    • @r %TRUE if the file type corresponds to a type that can be executable, %FALSE otherwise..
  • content_type_equals (string type1, string type2)

    Compares two content types for equality.

    • @p type1 is a content type string.
    • @p type2 is a content type string.
    • @r %TRUE if the two strings are identical or equivalent, %FALSE otherwise..
  • content_type_from_mime_type (string mime_type)

    Tries to find a content type based on the mime type name.

    • @p mime_type is a mime type string.
    • @r Newly allocated string with content type or %NULL. Free with g_free().
  • content_type_get_description (string type)

    Gets the human readable description of the content type.

    • @p type is a content type string.
    • @r a short description of the content type @type. Free the returned string with g_free().
  • content_type_get_generic_icon_name (string type)

    Gets the generic icon name for a content type. See the shared-mime-info specification for more on the generic icon name.

    • @p type is a content type string.
    • @r the registered generic icon name for the given @type, or %NULL if unknown. Free with g_free().
  • content_type_get_icon (string type)

    Gets the icon for a content type.

    • @p type is a content type string.
    • @r #GIcon corresponding to the content type. Free the returned object with g_object_unref().
  • content_type_get_mime_dirs ()

    Get the list of directories which MIME data is loaded from. See g_content_type_set_mime_dirs() for details.

    • @r %NULL-terminated list of directories to load MIME data from, including any mime/ subdirectory, and with the first directory to try listed first.
  • content_type_get_mime_type (string type)

    Gets the mime type for the content type, if one is registered.

    • @p type is a content type string.
    • @r the registered mime type for the given @type, or %NULL if unknown; free with g_free()..
  • content_type_get_symbolic_icon (string type)

    Gets the symbolic icon for a content type.

    • @p type is a content type string.
    • @r symbolic #GIcon corresponding to the content type. Free the returned object with g_object_unref().
  • content_type_guess (string filename, list data)

    Guesses the content type based on example data. If the function is uncertain, @result_uncertain will be set to %TRUE. Either @filename or

    • @data may be %NULL, in which case the guess will be based solely on the other argument.
    • @p filename is a path, or %NULL.
    • @p data is a stream of data, or %NULL.
    • @p data_size is the size of @data.
    • @p result_uncertain is return location for the certainty of the result, or %NULL.
    • @r a string indicating a guessed content type for the given data. Free with g_free().
  • content_type_guess_for_tree (object root)

    Tries to guess the type of the tree with root @root, by looking at the files it contains. The result is an array of content types, with the best guess coming first. The types returned all have the form x-content/foo, e.g. x-content/audio-cdda (for audio CDs) or x-content/image-dcf (for a camera memory card). See the shared-mime-info specification for more on x-content types. This function is useful in the implementation of g_mount_guess_content_type().

    • @p root is the root of the tree to guess a type for.
    • @r an %NULL-terminated array of zero or more content types. Free with g_strfreev().
  • content_type_is_a (string type, string supertype)

    Determines if @type is a subset of @supertype.

    • @p type is a content type string.
    • @p supertype is a content type string.
    • @r %TRUE if @type is a kind of @supertype, %FALSE otherwise..
  • content_type_is_mime_type (string type, string mime_type)

    Determines if @type is a subset of @mime_type. Convenience wrapper around g_content_type_is_a().

    • @p type is a content type string.
    • @p mime_type is a mime type string.
    • @r %TRUE if @type is a kind of @mime_type, %FALSE otherwise..
  • content_type_is_unknown (string type)

    Checks if the content type is the generic "unknown" type. On UNIX this is the "application/octet-stream" mimetype, while on win32 it is "*" and on OSX it is a dynamic type or octet-stream.

    • @p type is a content type string.
    • @r %TRUE if the type is the unknown type..
  • content_type_set_mime_dirs (list dirs)

    Set the list of directories used by GIO to load the MIME database. If

    • @dirs is %NULL, the directories used are the default: - the mime subdirectory of the directory in $XDG_DATA_HOME - the mime subdirectory of every directory in $XDG_DATA_DIRS This function is intended to be used when writing tests that depend on information stored in the MIME database, in order to control the data. Typically, in case your tests use %G_TEST_OPTION_ISOLATE_DIRS, but they depend on the system’s MIME database, you should call this function with @dirs set to %NULL before calling g_test_init(), for instance: |[ // Load MIME data from the system g_content_type_set_mime_dirs (NULL); // Isolate the environment g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL); … return g_test_run (); ]|
    • @p dirs is %NULL-terminated list of directories to load MIME data from, including any mime/ subdirectory, and with the first directory to try listed first.
    • @r None.
  • content_types_get_registered ()

    Gets a list of strings containing all the registered content types known to the system. The list and its data should be freed using g_list_free_full (list, g_free).

    • @r list of the registered content types.
  • dbus_address_escape_value (string arg0String)

    Escape @string so it can appear in a D-Bus address as the value part of a key-value pair. For instance, if @string is /run/bus-for-:0, this function would return /run/bus-for-%3A0, which could be used in a D-Bus address like unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0.

    • @p string is an unescaped string to be included in a D-Bus address as the value in a key-value pair.
    • @r a copy of @string with all non-optionally-escaped bytes escaped.
  • dbus_address_get_for_bus_sync (string bus_type, object cancellable)

    Synchronously looks up the D-Bus address for the well-known message bus instance specified by @bus_type. This may involve using various platform specific mechanisms. The returned address will be in the D-Bus address format.

    • @p bus_type is a #GBusType.
    • @p cancellable is a #GCancellable or %NULL.
    • @r a valid D-Bus address string for @bus_type or %NULL if @error is set.
  • dbus_address_get_stream (string address, object cancellable, object arg2Callback)

    Asynchronously connects to an endpoint specified by @address and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation. @address must be in the D-Bus address format. When the operation is finished, @callback will be invoked. You can then call g_dbus_address_get_stream_finish() to get the result of the operation. This is an asynchronous failable function. See g_dbus_address_get_stream_sync() for the synchronous version.

    • @p address is A valid D-Bus address..
    • @p cancellable is A #GCancellable or %NULL..
    • @p callback is A #GAsyncReadyCallback to call when the request is satisfied..
    • @p user_data is Data to pass to @callback..
    • @r None.
  • dbus_address_get_stream_finish (object res)

    Finishes an operation started with g_dbus_address_get_stream(). A server is not required to set a GUID, so @out_guid may be set to %NULL even on success.

    • @p res is A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream()..
    • @p out_guid is %NULL or return location to store the GUID extracted from
    • @address, if any..
    • @r A #GIOStream or %NULL if @error is set..
  • dbus_address_get_stream_sync (string address, object cancellable)

    Synchronously connects to an endpoint specified by @address and sets up the connection so it is in a state to run the client-side of the D-Bus authentication conversation. @address must be in the D-Bus address format. A server is not required to set a GUID, so @out_guid may be set to %NULL even on success. This is a synchronous failable function. See g_dbus_address_get_stream() for the asynchronous version.

    • @p address is A valid D-Bus address..
    • @p out_guid is %NULL or return location to store the GUID extracted from
    • @address, if any..
    • @p cancellable is A #GCancellable or %NULL..
    • @r A #GIOStream or %NULL if @error is set..
  • dbus_annotation_info_lookup (list annotations, string name)

    Looks up the value of an annotation. The cost of this function is O(n) in number of annotations.

    • @p annotations is A %NULL-terminated array of annotations or %NULL..
    • @p name is The name of the annotation to look up..
    • @r The value or %NULL if not found. Do not free, it is owned by
    • @annotations.. ``
  • dbus_error_encode_gerror (object error)

    Creates a D-Bus error name to use for @error. If @error matches a registered error (see [func@Gio.DBusError.register_error]), the corresponding D-Bus error name will be returned. Otherwise the a name of the form org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE will be used. This allows other GDBus applications to map the error on the wire back to a [type@GLib.Error] using [func@Gio.DBusError.new_for_dbus_error]. This function is typically only used in object mappings to put a [type@GLib.Error] on the wire. Regular applications should not use it.

    • @p error is an error.
    • @r a D-Bus error name.
  • dbus_error_get_remote_error (object error)

    Gets the D-Bus error name used for @error, if any. This function is guaranteed to return a D-Bus error name for all [type@GLib.Error]s returned from functions handling remote method calls (for example, [method@Gio.DBusConnection.call_finish]) unless [func@Gio.DBusError.strip_remote_error] has already been used on @error.

    • @p error is an error.
    • @r an allocated string, or NULL if the D-Bus error name could not be found.
  • dbus_error_is_remote_error (object error)

    Checks if @error represents an error received via D-Bus from a remote peer. If so, use [func@Gio.DBusError.get_remote_error] to get the name of the error.

    • @p error is an error.
    • @r true if @error represents an error from a remote peer; false otherwise.
  • dbus_error_new_for_dbus_error (string dbus_error_name, string dbus_error_message)

    Creates a [type@GLib.Error] based on the contents of @dbus_error_name and

    • @dbus_error_message. Errors registered with [func@Gio.DBusError.register_error] will be looked up using
    • @dbus_error_name and if a match is found, the error domain and code is used. Applications can use [func@Gio.DBusError.get_remote_error] to recover @dbus_error_name. If a match against a registered error is not found and the D-Bus error name is in a form as returned by [func@Gio.DBusError.encode_gerror] the error domain and code encoded in the name is used to create the [type@GLib.Error]. Also, @dbus_error_name is added to the error message such that it can be recovered with [func@Gio.DBusError.get_remote_error]. Otherwise, a [type@GLib.Error] with the error code [error@Gio.IOErrorEnum.DBUS_ERROR] in the [error@Gio.IOErrorEnum] error domain is returned. Also, @dbus_error_name is added to the error message such that it can be recovered with [func@Gio.DBusError.get_remote_error]. In all three cases,
    • @dbus_error_name can always be recovered from the returned [type@GLib.Error] using the [func@Gio.DBusError.get_remote_error] function (unless [func@Gio.DBusError.strip_remote_error] hasn’t been used on the returned error). This function is typically only used in object mappings to prepare [type@GLib.Error] instances for applications. Regular applications should not use it.
    • @p dbus_error_name is D-Bus error name.
    • @p dbus_error_message is D-Bus error message.
    • @r an allocated [type@GLib.Error].
  • dbus_error_register_error_domain (string error_domain_quark_name, list entries)

    Helper function for associating a [type@GLib.Error] error domain with D-Bus error names. While @quark_volatile has a volatile qualifier, this is a historical artifact and the argument passed to it should not be volatile.

    • @p error_domain_quark_name is the error domain name.
    • @p quark_volatile is return location for the [type@GLib.Quark] representing the error domain.
    • @p entries is items to register.
    • @p num_entries is number of items to register.
    • @r None.
  • dbus_error_strip_remote_error (object error)

    Looks for extra information in the error message used to recover the D-Bus error name and strips it if found. If stripped, the message field in @error will correspond exactly to what was received on the wire. This is typically used when presenting errors to the end user.

    • @p error is an error.
    • @r true if information was stripped; false otherwise.
  • dbus_escape_object_path (string s)

    This is a language binding friendly version of g_dbus_escape_object_path_bytestring().

    • @p s is the string to escape.
    • @r an escaped version of @s. Free with g_free()..
  • dbus_escape_object_path_bytestring (list bytes)

    Escapes @bytes for use in a D-Bus object path component. @bytes is an array of zero or more nonzero bytes in an unspecified encoding, followed by a single zero byte. The escaping method consists of replacing all non-alphanumeric characters (see g_ascii_isalnum()) with their hexadecimal value preceded by an underscore (_). For example: foo.bar.baz will become foo_2ebar_2ebaz. This method is appropriate to use when the input is nearly a valid object path component but is not when your input is far from being a valid object path component. Other escaping algorithms are also valid to use with D-Bus object paths. This can be reversed with g_dbus_unescape_object_path().

    • @p bytes is the string of bytes to escape.
    • @r an escaped version of @bytes. Free with g_free()..
  • dbus_generate_guid ()

    Generate a D-Bus GUID that can be used with e.g. g_dbus_connection_new(). See the D-Bus specification regarding what strings are valid D-Bus GUIDs. The specification refers to these as ‘UUIDs’ whereas GLib (for historical reasons) refers to them as ‘GUIDs’. The terms are interchangeable. Note that D-Bus GUIDs do not follow RFC 4122.

    • @r A valid D-Bus GUID. Free with g_free()..
  • dbus_gvalue_to_gvariant (object gvalue, object type)

    Converts a #GValue to a #GVariant of the type indicated by the @type parameter. The conversion is using the following rules: - G_TYPE_STRING: 's', 'o', 'g' or 'ay' - G_TYPE_STRV: 'as', 'ao' or 'aay' - G_TYPE_BOOLEAN: 'b' - G_TYPE_UCHAR: 'y' - G_TYPE_INT: 'i', 'n' - G_TYPE_UINT: 'u', 'q' - G_TYPE_INT64: 'x' - G_TYPE_UINT64: 't' - G_TYPE_DOUBLE: 'd' - G_TYPE_VARIANT: Any #GVariantType This can fail if e.g. @gvalue is of type %G_TYPE_STRING and @type is 'i', i.e. %G_VARIANT_TYPE_INT32. It will also fail for any #GType (including e.g. %G_TYPE_OBJECT and %G_TYPE_BOXED derived-types) not in the table above. Note that if @gvalue is of type %G_TYPE_VARIANT and its value is %NULL, the empty #GVariant instance (never %NULL) for @type is returned (e.g. 0 for scalar types, the empty string for string types, '/' for object path types, the empty array for any array type and so on). See the g_dbus_gvariant_to_gvalue() function for how to convert a #GVariant to a #GValue.

    • @p gvalue is A #GValue to convert to a #GVariant.
    • @p type is A #GVariantType.
    • @r A #GVariant (never floating) of #GVariantType @type holding the data from @gvalue or an empty #GVariant in case of failure. Free with g_variant_unref()..
  • dbus_is_address (string arg0String)

    Checks if @string is a D-Bus address. This doesn't check if @string is actually supported by #GDBusServer or #GDBusConnection - use g_dbus_is_supported_address() to do more checks.

    • @p string is A string..
    • @r %TRUE if @string is a valid D-Bus address, %FALSE otherwise..
  • dbus_is_error_name (string arg0String)

    Check whether @string is a valid D-Bus error name. This function returns the same result as g_dbus_is_interface_name(), because D-Bus error names are defined to have exactly the same syntax as interface names.

    • @p string is The string to check..
    • @r %TRUE if valid, %FALSE otherwise..
  • dbus_is_guid (string arg0String)

    Checks if @string is a D-Bus GUID. See the documentation for g_dbus_generate_guid() for more information about the format of a GUID.

    • @p string is The string to check..
    • @r %TRUE if @string is a GUID, %FALSE otherwise..
  • dbus_is_interface_name (string arg0String)

    Checks if @string is a valid D-Bus interface name.

    • @p string is The string to check..
    • @r %TRUE if valid, %FALSE otherwise..
  • dbus_is_member_name (string arg0String)

    Checks if @string is a valid D-Bus member (e.g. signal or method) name.

    • @p string is The string to check..
    • @r %TRUE if valid, %FALSE otherwise..
  • dbus_is_name (string arg0String)

    Checks if @string is a valid D-Bus bus name (either unique or well-known).

    • @p string is The string to check..
    • @r %TRUE if valid, %FALSE otherwise..
  • dbus_is_supported_address (string arg0String)

    Like g_dbus_is_address() but also checks if the library supports the transports in @string and that key/value pairs for each transport are valid. See the specification of the D-Bus address format.

    • @p string is A string..
    • @r %TRUE if @string is a valid D-Bus address that is supported by this library, %FALSE if @error is set..
  • dbus_is_unique_name (string arg0String)

    Checks if @string is a valid D-Bus unique bus name.

    • @p string is The string to check..
    • @r %TRUE if valid, %FALSE otherwise..
  • dbus_unescape_object_path (string s)

    Unescapes an string that was previously escaped with g_dbus_escape_object_path(). If the string is in a format that could not have been returned by g_dbus_escape_object_path(), this function returns %NULL. Encoding alphanumeric characters which do not need to be encoded is not allowed (e.g _63 is not valid, the string should contain c instead).

    • @p s is the string to unescape.
    • @r an unescaped version of @s, or %NULL if @s is not a string returned from g_dbus_escape_object_path(). Free with g_free()..
  • dtls_client_connection_new (object base_socket, object server_identity)

    Creates a new #GDtlsClientConnection wrapping @base_socket which is assumed to communicate with the server identified by @server_identity.

    • @p base_socket is the #GDatagramBased to wrap.
    • @p server_identity is the expected identity of the server.
    • @r the new #GDtlsClientConnection, or %NULL on error.
  • dtls_server_connection_new (object base_socket, object certificate)

    Creates a new #GDtlsServerConnection wrapping @base_socket.

    • @p base_socket is the #GDatagramBased to wrap.
    • @p certificate is the default server certificate, or %NULL.
    • @r the new #GDtlsServerConnection, or %NULL on error.
  • file_new_build_filenamev (list args)

    Constructs a #GFile from a vector of elements using the correct separator for filenames. Using this function is equivalent to calling g_build_filenamev(), followed by g_file_new_for_path() on the result.

    • @p args is %NULL-terminated array of strings containing the path elements..
    • @r a new #GFile.
  • file_new_for_commandline_arg (string arg)

    Creates a #GFile with the given argument from the command line. The value of @arg can be either a URI, an absolute path or a relative path resolved relative to the current working directory. This operation never fails, but the returned object might not support any I/O operation if @arg points to a malformed path. Note that on Windows, this function expects its argument to be in UTF-8 -- not the system code page. This means that you should not use this function with string from argv as it is passed to main(). g_win32_get_command_line() will return a UTF-8 version of the commandline. #GApplication also uses UTF-8 but g_application_command_line_create_file_for_arg() may be more useful for you there. It is also always possible to use this function with #GOptionContext arguments of type %G_OPTION_ARG_FILENAME.

    • @p arg is a command line string.
    • @r a new #GFile. Free the returned object with g_object_unref()..
  • file_new_for_commandline_arg_and_cwd (string arg, string cwd)

    Creates a #GFile with the given argument from the command line. This function is similar to g_file_new_for_commandline_arg() except that it allows for passing the current working directory as an argument instead of using the current working directory of the process. This is useful if the commandline argument was given in a context other than the invocation of the current process. See also g_application_command_line_create_file_for_arg().

    • @p arg is a command line string.
    • @p cwd is the current working directory of the commandline.
    • @r a new #GFile.
  • file_new_for_path (string path)

    Constructs a #GFile for a given path. This operation never fails, but the returned object might not support any I/O operation if @path is malformed.

    • @p path is a string containing a relative or absolute path. The string must be encoded in the glib filename encoding..
    • @r a new #GFile for the given @path. Free the returned object with g_object_unref()..
  • file_new_for_uri (string uri)

    Constructs a #GFile for a given URI. This operation never fails, but the returned object might not support any I/O operation if @uri is malformed or if the uri type is not supported.

    • @p uri is a UTF-8 string containing a URI.
    • @r a new #GFile for the given @uri. Free the returned object with g_object_unref()..
  • file_new_tmp (string tmpl)

    Opens a file in the preferred directory for temporary files (as returned by g_get_tmp_dir()) and returns a #GFile and #GFileIOStream pointing to it. @tmpl should be a string in the GLib file name encoding containing a sequence of six 'X' characters, and containing no directory components. If it is %NULL, a default template is used. Unlike the other #GFile constructors, this will return %NULL if a temporary file could not be created.

    • @p tmpl is Template for the file name, as in g_file_open_tmp(), or %NULL for a default template.
    • @p iostream is on return, a #GFileIOStream for the created file.
    • @r a new #GFile. Free the returned object with g_object_unref()..
  • file_new_tmp_async (string tmpl, int io_priority, object cancellable, object arg3Callback)

    Asynchronously opens a file in the preferred directory for temporary files (as returned by g_get_tmp_dir()) as g_file_new_tmp(). @tmpl should be a string in the GLib file name encoding containing a sequence of six 'X' characters, and containing no directory components. If it is %NULL, a default template is used.

    • @p tmpl is Template for the file name, as in g_file_open_tmp(), or %NULL for a default template.
    • @p io_priority is the I/O priority of the request.
    • @p cancellable is optional #GCancellable object, %NULL to ignore.
    • @p callback is a #GAsyncReadyCallback to call when the request is done.
    • @p user_data is data to pass to @callback.
    • @r None.
  • file_new_tmp_dir_async (string tmpl, int io_priority, object cancellable, object arg3Callback)

    Asynchronously creates a directory in the preferred directory for temporary files (as returned by g_get_tmp_dir()) as g_dir_make_tmp().

    • @tmpl should be a string in the GLib file name encoding containing a sequence of six 'X' characters, and containing no directory components. If it is %NULL, a default template is used.
    • @p tmpl is Template for the file name, as in g_dir_make_tmp(), or %NULL for a default template.
    • @p io_priority is the I/O priority of the request.
    • @p cancellable is optional #GCancellable object, %NULL to ignore.
    • @p callback is a #GAsyncReadyCallback to call when the request is done.
    • @p user_data is data to pass to @callback.
    • @r None.
  • file_new_tmp_dir_finish (object result)

    Finishes a temporary directory creation started by g_file_new_tmp_dir_async().

    • @p result is a #GAsyncResult.
    • @r a new #GFile. Free the returned object with g_object_unref()..
  • file_new_tmp_finish (object result)

    Finishes a temporary file creation started by g_file_new_tmp_async().

    • @p result is a #GAsyncResult.
    • @p iostream is on return, a #GFileIOStream for the created file.
    • @r a new #GFile. Free the returned object with g_object_unref()..
  • file_parse_name (string parse_name)

    Constructs a #GFile with the given @parse_name (i.e. something given by g_file_get_parse_name()). This operation never fails, but the returned object might not support any I/O operation if the @parse_name cannot be parsed.

    • @p parse_name is a file name or path to be parsed.
    • @r a new #GFile..
  • icon_deserialize (object value)

    Deserializes a #GIcon previously serialized using g_icon_serialize().

    • @p value is a #GVariant created with g_icon_serialize().
    • @r a #GIcon, or %NULL when deserialization fails..
  • icon_new_for_string (string str)

    Generate a #GIcon instance from @str. This function can fail if @str is not valid - see g_icon_to_string() for discussion. If your application or library provides one or more #GIcon implementations you need to ensure that each #GType is registered with the type system prior to calling g_icon_new_for_string().

    • @p str is A string obtained via g_icon_to_string()..
    • @r An object implementing the #GIcon interface or %NULL if @error is set..
  • initable_newv (int object_type, list parameters, object cancellable)

    Helper function for constructing #GInitable object. This is similar to g_object_newv() but also initializes the object and returns %NULL, setting an error on failure.

    • @p object_type is a #GType supporting #GInitable..
    • @p n_parameters is the number of parameters in @parameters.
    • @p parameters is the parameters to use to construct the object.
    • @p cancellable is optional #GCancellable object, %NULL to ignore..
    • @r a newly allocated #GObject, or %NULL on error.
  • io_error_from_errno (int err_no)

    Converts errno.h error codes into GIO error codes. The fallback value %G_IO_ERROR_FAILED is returned for error codes not currently handled (but note that future GLib releases may return a more specific value instead). 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: |[ int saved_errno; ret = read (blah); saved_errno = errno; g_io_error_from_errno (saved_errno); ]|

    • @p err_no is Error number as defined in errno.h..
    • @r #GIOErrorEnum value for the given errno.h error number.
  • io_error_from_file_error (string file_error)

    Converts #GFileError error codes into GIO error codes.

    • @p file_error is a #GFileError..
    • @r #GIOErrorEnum value for the given #GFileError error value..
  • io_extension_point_implement (string extension_point_name, int type, string extension_name, int priority)

    Registers @type as extension for the extension point with name

    • @extension_point_name. If @type has already been registered as an extension for this extension point, the existing #GIOExtension object is returned.
    • @p extension_point_name is the name of the extension point.
    • @p type is the #GType to register as extension.
    • @p extension_name is the name for the extension.
    • @p priority is the priority for the extension.
    • @r a #GIOExtension object for #GType.
  • io_extension_point_lookup (string name)

    Looks up an existing extension point.

    • @p name is the name of the extension point.
    • @r the #GIOExtensionPoint, or %NULL if there is no registered extension point with the given name..
  • io_extension_point_register (string name)

    Registers an extension point.

    • @p name is The name of the extension point.
    • @r the new #GIOExtensionPoint. This object is owned by GIO and should not be freed..
  • io_modules_load_all_in_directory (string dirname)

    Loads all the modules in the specified directory. If don't require all modules to be initialized (and thus registering all gtypes) then you can use g_io_modules_scan_all_in_directory() which allows delayed/lazy loading of modules.

    • @p dirname is pathname for a directory containing modules to load..
    • @r a list of #GIOModules loaded from the directory, All the modules are loaded into memory, if you want to unload them (enabling on-demand loading) you must call g_type_module_unuse() on all the modules. Free the list with g_list_free()..
  • io_modules_load_all_in_directory_with_scope (string dirname, object scope)

    Loads all the modules in the specified directory. If don't require all modules to be initialized (and thus registering all gtypes) then you can use g_io_modules_scan_all_in_directory() which allows delayed/lazy loading of modules.

    • @p dirname is pathname for a directory containing modules to load..
    • @p scope is a scope to use when scanning the modules..
    • @r a list of #GIOModules loaded from the directory, All the modules are loaded into memory, if you want to unload them (enabling on-demand loading) you must call g_type_module_unuse() on all the modules. Free the list with g_list_free()..
  • io_modules_scan_all_in_directory (string dirname)

    Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered. This may not actually load and initialize all the types in each module, some modules may be lazily loaded and initialized when an extension point it implements is used with e.g. g_io_extension_point_get_extensions() or g_io_extension_point_get_extension_by_name(). If you need to guarantee that all types are loaded in all the modules, use g_io_modules_load_all_in_directory().

    • @p dirname is pathname for a directory containing modules to scan..
    • @r None.
  • io_modules_scan_all_in_directory_with_scope (string dirname, object scope)

    Scans all the modules in the specified directory, ensuring that any extension point implemented by a module is registered. This may not actually load and initialize all the types in each module, some modules may be lazily loaded and initialized when an extension point it implements is used with e.g. g_io_extension_point_get_extensions() or g_io_extension_point_get_extension_by_name(). If you need to guarantee that all types are loaded in all the modules, use g_io_modules_load_all_in_directory().

    • @p dirname is pathname for a directory containing modules to scan..
    • @p scope is a scope to use when scanning the modules.
    • @r None.
  • io_scheduler_cancel_all_jobs ()

    Cancels all cancellable I/O jobs. A job is cancellable if a #GCancellable was passed into g_io_scheduler_push_job().

    • @r None.
  • io_scheduler_push_job (object job_func, int io_priority, object cancellable)

    Schedules the I/O job to run in another thread. @notify will be called on

    • @user_data after @job_func has returned, regardless whether the job was cancelled or has run to completion. If @cancellable is not %NULL, it can be used to cancel the I/O job by calling g_cancellable_cancel() or by calling g_io_scheduler_cancel_all_jobs().
    • @p job_func is a #GIOSchedulerJobFunc..
    • @p user_data is data to pass to @job_func.
    • @p notify is a #GDestroyNotify for @user_data, or %NULL.
    • @p io_priority is the I/O priority of the request..
    • @p cancellable is optional #GCancellable object, %NULL to ignore..
    • @r None.
  • keyfile_settings_backend_new (string filename, string root_path, string root_group)

    Creates a keyfile-backed [class@Gio.SettingsBackend]. The filename of the keyfile to use is given by @filename. All settings read to or written from the backend must fall under the path given in @root_path (which must start and end with a slash and not contain two consecutive slashes).

    • @root_path may be "/". If @root_group is non-NULL then it specifies the name of the keyfile group used for keys that are written directly below @root_path. For example, if @root_path is "/apps/example/" and
    • @root_group is "toplevel", then setting the key "/apps/example/enabled" to true will cause the following to appear in the keyfile: [toplevel] enabled=true If @root_group is NULL then it is not permitted to store keys directly below the @root_path. For keys not stored directly below @root_path (ie: in a sub-path), the name of the subpath (with the final slash stripped) is used as the name of the keyfile group. To continue the example, if "/apps/example/profiles/default/font-size" were set to 12 then the following would appear in the keyfile: [profiles/default] font-size=12 The backend will refuse writes (and return writability as being false) for keys outside of @root_path and, in the event that
    • @root_group is NULL, also for keys directly under @root_path. Writes will also be refused if the backend detects that it has the inability to rewrite the keyfile (ie: the containing directory is not writable). There is no checking done for your key namespace clashing with the syntax of the key file format. For example, if you have [ or ] characters in your path names or = in your key names you may be in trouble. The backend reads default values from a keyfile called defaults in the directory specified by the GKeyfileSettingsBackend:defaults-dir property, and a list of locked keys from a text file with the name locks in the same location.
    • @p filename is the filename of the keyfile.
    • @p root_path is the path under which all settings keys appear.
    • @p root_group is the group name corresponding to @root_path, or NULL to disallow storing keys directly beneath @root_path.
    • @r a keyfile-backed [class@Gio.SettingsBackend].
  • memory_monitor_dup_default ()

    Gets a reference to the default #GMemoryMonitor for the system.

    • @r a new reference to the default #GMemoryMonitor.
  • memory_settings_backend_new ()

    Creates a memory-backed #GSettingsBackend. This backend allows changes to settings, but does not write them to any backing storage, so the next time you run your application, the memory backend will start out with the default values again.

    • @r a newly created #GSettingsBackend.
  • network_monitor_get_default ()

    Gets the default #GNetworkMonitor for the system.

    • @r a #GNetworkMonitor, which will be a dummy object if no network monitor is available.
  • networking_init ()

    Initializes the platform networking libraries (eg, on Windows, this calls WSAStartup()). GLib will call this itself if it is needed, so you only need to call it if you directly call system networking functions (without calling any GLib networking functions first).

    • @r None.
  • null_settings_backend_new ()

    Creates a readonly #GSettingsBackend. This backend does not allow changes to settings, so all settings will always have their default values.

    • @r a newly created #GSettingsBackend.
  • pollable_source_new (object pollable_stream)

    Utility method for #GPollableInputStream and #GPollableOutputStream implementations. Creates a new #GSource that expects a callback of type #GPollableSourceFunc. The new source does not actually do anything on its own; use g_source_add_child_source() to add other sources to it to cause it to trigger.

    • @p pollable_stream is the stream associated with the new source.
    • @r the new #GSource..
  • pollable_source_new_full (object pollable_stream, object child_source, object cancellable)

    Utility method for #GPollableInputStream and #GPollableOutputStream implementations. Creates a new #GSource, as with g_pollable_source_new(), but also attaching @child_source (with a dummy callback), and

    • @cancellable, if they are non-%NULL.
    • @p pollable_stream is the stream associated with the new source.
    • @p child_source is optional child source to attach.
    • @p cancellable is optional #GCancellable to attach.
    • @r the new #GSource..
  • pollable_stream_read (object stream, list buffer, bool blocking, object cancellable)

    Tries to read from @stream, as with g_input_stream_read() (if @blocking is %TRUE) or g_pollable_input_stream_read_nonblocking() (if @blocking is %FALSE). This can be used to more easily share code between blocking and non-blocking implementations of a method. If @blocking is %FALSE, then

    • @stream must be a #GPollableInputStream for which g_pollable_input_stream_can_poll() returns %TRUE, or else the behavior is undefined. If @blocking is %TRUE, then @stream does not need to be a #GPollableInputStream.
    • @p stream is a #GInputStream.
    • @p buffer is a buffer to read data into.
    • @p count is the number of bytes to read.
    • @p blocking is whether to do blocking I/O.
    • @p cancellable is optional #GCancellable object, %NULL to ignore..
    • @r the number of bytes read, or -1 on error..
  • pollable_stream_write (object stream, list buffer, bool blocking, object cancellable)

    Tries to write to @stream, as with g_output_stream_write() (if @blocking is %TRUE) or g_pollable_output_stream_write_nonblocking() (if @blocking is %FALSE). This can be used to more easily share code between blocking and non-blocking implementations of a method. If @blocking is %FALSE, then @stream must be a #GPollableOutputStream for which g_pollable_output_stream_can_poll() returns %TRUE or else the behavior is undefined. If @blocking is %TRUE, then @stream does not need to be a #GPollableOutputStream.

    • @p stream is a #GOutputStream..
    • @p buffer is the buffer containing the data to write..
    • @p count is the number of bytes to write.
    • @p blocking is whether to do blocking I/O.
    • @p cancellable is optional #GCancellable object, %NULL to ignore..
    • @r the number of bytes written, or -1 on error..
  • pollable_stream_write_all (object stream, list buffer, bool blocking, object cancellable)

    Tries to write @count bytes to @stream, as with g_output_stream_write_all(), but using g_pollable_stream_write() rather than g_output_stream_write(). On a successful write of @count bytes, %TRUE is returned, and @bytes_written is set to @count. If there is an error during the operation (including %G_IO_ERROR_WOULD_BLOCK in the non-blocking case), %FALSE is returned and @error is set to indicate the error status, @bytes_written is updated to contain the number of bytes written into the stream before the error occurred. As with g_pollable_stream_write(), if @blocking is %FALSE, then @stream must be a #GPollableOutputStream for which g_pollable_output_stream_can_poll() returns %TRUE or else the behavior is undefined. If @blocking is %TRUE, then @stream does not need to be a #GPollableOutputStream.

    • @p stream is a #GOutputStream..
    • @p buffer is the buffer containing the data to write..
    • @p count is the number of bytes to write.
    • @p blocking is whether to do blocking I/O.
    • @p bytes_written is location to store the number of bytes that was written to the stream.
    • @p cancellable is optional #GCancellable object, %NULL to ignore..
    • @r %TRUE on success, %FALSE if there was an error.
  • power_profile_monitor_dup_default ()

    Gets a reference to the default #GPowerProfileMonitor for the system.

    • @r a new reference to the default #GPowerProfileMonitor.
  • proxy_get_default_for_protocol (string protocol)

    Find the gio-proxy extension point for a proxy implementation that supports the specified protocol.

    • @p protocol is the proxy protocol name (e.g. http, socks, etc).
    • @r return a #GProxy or NULL if protocol is not supported..
  • proxy_resolver_get_default ()

    Gets the default #GProxyResolver for the system.

    • @r the default #GProxyResolver, which will be a dummy object if no proxy resolver is available.
  • resource_load (string filename)

    Loads a binary resource bundle and creates a [struct@Gio.Resource] representation of it, allowing you to query it for data. If you want to use this resource in the global resource namespace you need to register it with [func@Gio.resources_register]. If @filename is empty or the data in it is corrupt, %G_RESOURCE_ERROR_INTERNAL will be returned. If

    • @filename doesn’t exist, or there is an error in reading it, an error from [ctor@GLib.MappedFile.new] will be returned.
    • @p filename is the path of a filename to load, in the GLib filename encoding.
    • @r a new [struct@Gio.Resource], or NULL on error.
  • resources_enumerate_children (string path, string lookup_flags)

    Returns all the names of children at the specified @path in the set of globally registered resources. The return result is a NULL terminated list of strings which should be released with [func@GLib.strfreev].

    • @lookup_flags controls the behaviour of the lookup.
    • @p path is A path name inside the resource.
    • @p lookup_flags is A [flags@Gio.ResourceLookupFlags].
    • @r an array of constant strings.
  • resources_get_info (string path, string lookup_flags)

    Looks for a file at the specified @path in the set of globally registered resources and if found returns information about it. @lookup_flags controls the behaviour of the lookup.

    • @p path is A path name inside the resource.
    • @p lookup_flags is A [flags@Gio.ResourceLookupFlags].
    • @p size is a location to place the length of the contents of the file, or NULL if the length is not needed.
    • @p flags is a location to place the [flags@Gio.ResourceFlags] about the file, or NULL if the flags are not needed.
    • @r TRUE if the file was found, FALSE if there were errors.
  • resources_has_children (string path)

    Returns whether the specified @path in the set of globally registered resources has children.

    • @p path is A pathname.
    • @r %TRUE if @patch has children.
  • resources_lookup_data (string path, string lookup_flags)

    Looks for a file at the specified @path in the set of globally registered resources and returns a [struct@GLib.Bytes] that lets you directly access the data in memory. The data is always followed by a zero byte, so you can safely use the data as a C string. However, that byte is not included in the size of the [struct@GLib.Bytes]. For uncompressed resource files this is a pointer directly into the resource bundle, which is typically in some read-only data section in the program binary. For compressed files we allocate memory on the heap and automatically uncompress the data. @lookup_flags controls the behaviour of the lookup.

    • @p path is A path name inside the resource.
    • @p lookup_flags is A [flags@Gio.ResourceLookupFlags].
    • @r [struct@GLib.Bytes] or NULL on error.
  • resources_open_stream (string path, string lookup_flags)

    Looks for a file at the specified @path in the set of globally registered resources and returns a [class@Gio.InputStream] that lets you read the data. @lookup_flags controls the behaviour of the lookup.

    • @p path is A path name inside the resource.
    • @p lookup_flags is A [flags@Gio.ResourceLookupFlags].
    • @r [class@Gio.InputStream] or NULL on error.
  • resources_register (object resource)

    Registers the resource with the process-global set of resources. Once a resource is registered the files in it can be accessed with the global resource lookup functions like [func@Gio.resources_lookup_data].

    • @p resource is A [struct@Gio.Resource].
    • @r None.
  • resources_unregister (object resource)

    Unregisters the resource from the process-global set of resources.

    • @p resource is A [struct@Gio.Resource].
    • @r None.
  • settings_schema_source_get_default ()

    Gets the default system schema source. This function is not required for normal uses of #GSettings but it may be useful to authors of plugin management systems or to those who want to introspect the content of schemas. If no schemas are installed, %NULL will be returned. The returned source may actually consist of multiple schema sources from different directories, depending on which directories were given in XDG_DATA_DIRS and GSETTINGS_SCHEMA_DIR. For this reason, all lookups performed against the default source should probably be done recursively.

    • @r the default schema source.
  • simple_async_report_gerror_in_idle (object object, object arg1Callback, object error)

    Reports an error in an idle function. Similar to g_simple_async_report_error_in_idle(), but takes a #GError rather than building a new one.

    • @p object is a #GObject, or %NULL.
    • @p callback is a #GAsyncReadyCallback..
    • @p user_data is user data passed to @callback..
    • @p error is the #GError to report.
    • @r None.
  • simple_async_report_take_gerror_in_idle (object object, object arg1Callback, object error)

    Reports an error in an idle function. Similar to g_simple_async_report_gerror_in_idle(), but takes over the caller's ownership of @error, so the caller does not have to free it any more.

    • @p object is a #GObject, or %NULL.
    • @p callback is a #GAsyncReadyCallback..
    • @p user_data is user data passed to @callback..
    • @p error is the #GError to report.
    • @r None.
  • srv_target_list_sort (list targets)

    Sorts @targets in place according to the algorithm in RFC 2782.

    • @p targets is a #GList of #GSrvTarget.
    • @r the head of the sorted list..
  • tls_backend_get_default ()

    Gets the default #GTlsBackend for the system.

    • @r a #GTlsBackend, which will be a dummy object if no TLS backend is available.
  • tls_client_connection_new (object base_io_stream, object server_identity)

    Creates a new #GTlsClientConnection wrapping @base_io_stream (which must have pollable input and output streams) which is assumed to communicate with the server identified by @server_identity. See the documentation for #GTlsConnection:base-io-stream for restrictions on when application code can run operations on the @base_io_stream after this function has returned.

    • @p base_io_stream is the #GIOStream to wrap.
    • @p server_identity is the expected identity of the server.
    • @r the new #GTlsClientConnection, or %NULL on error.
  • tls_file_database_new (string anchors)

    Creates a new #GTlsFileDatabase which uses anchor certificate authorities in @anchors to verify certificate chains. The certificates in @anchors must be PEM encoded.

    • @p anchors is filename of anchor certificate authorities..
    • @r the new #GTlsFileDatabase, or %NULL on error.
  • tls_server_connection_new (object base_io_stream, object certificate)

    Creates a new #GTlsServerConnection wrapping @base_io_stream (which must have pollable input and output streams). See the documentation for #GTlsConnection:base-io-stream for restrictions on when application code can run operations on the @base_io_stream after this function has returned.

    • @p base_io_stream is the #GIOStream to wrap.
    • @p certificate is the default server certificate, or %NULL.
    • @r the new #GTlsServerConnection, or %NULL on error.
  • app_info_get_all_list ()

    Returns app_info_get_all as an Aussom list of wrapper objects. This companion method materializes the full collection up front; use app_info_get_all() when lazy or change-notify access is required.

    • @r An Aussom list of elements.
  • app_info_get_all_for_type_list ()

    Returns app_info_get_all_for_type as an Aussom list of wrapper objects. This companion method materializes the full collection up front; use app_info_get_all_for_type() when lazy or change-notify access is required.

    • @r An Aussom list of elements.
  • app_info_get_fallback_for_type_list ()

    Returns app_info_get_fallback_for_type as an Aussom list of wrapper objects. This companion method materializes the full collection up front; use app_info_get_fallback_for_type() when lazy or change-notify access is required.

    • @r An Aussom list of elements.
  • app_info_get_recommended_for_type_list ()

    Returns app_info_get_recommended_for_type as an Aussom list of wrapper objects. This companion method materializes the full collection up front; use app_info_get_recommended_for_type() when lazy or change-notify access is required.

    • @r An Aussom list of elements.
  • content_types_get_registered_list ()

    Returns content_types_get_registered as an Aussom list of wrapper objects. This companion method materializes the full collection up front; use content_types_get_registered() when lazy or change-notify access is required.

    • @r An Aussom list of elements.
  • io_modules_load_all_in_directory_list ()

    Returns io_modules_load_all_in_directory as an Aussom list of wrapper objects. This companion method materializes the full collection up front; use io_modules_load_all_in_directory() when lazy or change-notify access is required.

    • @r An Aussom list of elements.
  • io_modules_load_all_in_directory_with_scope_list ()

    Returns io_modules_load_all_in_directory_with_scope as an Aussom list of wrapper objects. This companion method materializes the full collection up front; use io_modules_load_all_in_directory_with_scope() when lazy or change-notify access is required.

    • @r An Aussom list of elements.
  • srv_target_list_sort_list ()

    Returns srv_target_list_sort as an Aussom list of wrapper objects. This companion method materializes the full collection up front; use srv_target_list_sort() when lazy or change-notify access is required.

    • @r An Aussom list of elements.

class: GioDBusProxyTypeFuncCallback

[838:7] extends: object

Function signature for a function used to determine the #GType to use for an interface proxy (if @interface_name is not %NULL) or object proxy (if @interface_name is %NULL). This function is called in the thread-default main context (see [method@GLib.MainContext.push_thread_default]) that @manager was constructed in.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioDBusProxyTypeFuncCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (manager, object_path, interface_name, data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioSettingsBindGetMappingCallback

[1728:7] extends: object

The type for the function that is used to convert from [class@Gio.Settings] to an object property. The @value is already initialized to hold values of the appropriate type.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioSettingsBindGetMappingCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (value, variant, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioSettingsGetMappingCallback

[1881:7] extends: object

The type of the function that is used to convert from a value stored in a [class@Gio.Settings] to a value that is useful to the application. If the value is successfully mapped, the result should be stored at @result and true returned. If mapping fails (for example, if @value is not in the right format) then false should be returned. If @value is NULL then it means that the mapping function is being given a ‘last chance’ to successfully return a valid value. True must be returned in this case.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioSettingsGetMappingCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (value, result, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioAsyncReadyCallbackCallback

[20:7] extends: object

Type definition for a function that will be called back when an asynchronous operation within GIO has been completed. #GAsyncReadyCallback callbacks from #GTask are guaranteed to be invoked in a later iteration of the thread-default main context (see [method@GLib.MainContext.push_thread_default]) where the #GTask was created. All other users of #GAsyncReadyCallback must likewise call it asynchronously in a later iteration of the main context. The asynchronous operation is guaranteed to have held a reference to @source_object from the time when the *_async() function was called, until after this callback returns.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioAsyncReadyCallbackCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (source_object, res, data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioSimpleAsyncThreadFuncCallback

[1960:7] extends: object

Simple thread function that runs an asynchronous operation and checks for cancellation.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioSimpleAsyncThreadFuncCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (res, object, cancellable)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioReallocFuncCallback

[1657:7] extends: object

Changes the size of the memory block pointed to by @data to @size bytes. The function should have the same semantics as realloc().

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioReallocFuncCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (data, size)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioDBusSubtreeDispatchFuncCallback

[981:7] extends: object

The type of the @dispatch function in #GDBusSubtreeVTable. Subtrees are flat. @node, if non-%NULL, is always exactly one segment of the object path (ie: it never contains a slash).

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioDBusSubtreeDispatchFuncCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (connection, sender, object_path, interface_name, node, out_user_data, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioFileReadMoreCallbackCallback

[1443:7] extends: object

When loading the partial contents of a file with g_file_load_partial_contents_async(), it may become necessary to determine if any more data from the file should be loaded. A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data should be read, or %FALSE otherwise.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioFileReadMoreCallbackCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (file_contents, file_size, callback_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioIOSchedulerJobFuncCallback

[1513:7] extends: object

I/O Job function. Long-running jobs should periodically check the @cancellable to see if they have been cancelled.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioIOSchedulerJobFuncCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (job, cancellable, data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioFileProgressCallbackCallback

[1370:7] extends: object

When doing file operations that may take a while, such as moving a file or copying a file, a progress callback is used to pass how far along that operation is to the application.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioFileProgressCallbackCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (current_num_bytes, total_num_bytes, data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioDBusInterfaceSetPropertyFuncCallback

[667:7] extends: object

The type of the @set_property function in #GDBusInterfaceVTable.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioDBusInterfaceSetPropertyFuncCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (connection, sender, object_path, interface_name, property_name, value, error, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioFileMeasureProgressCallbackCallback

[1298:7] extends: object

This callback type is used by g_file_measure_disk_usage() to make periodic progress reports when measuring the amount of disk spaced used by a directory. These calls are made on a best-effort basis and not all types of #GFile will support them. At the minimum, however, one call will always be made immediately. In the case that there is no support, @reporting will be set to %FALSE (and the other values undefined) and no further calls will be made. Otherwise, the @reporting will be %TRUE and the other values all-zeros during the first (immediate) call. In this way, you can know which type of progress UI to show without a delay. For g_file_measure_disk_usage() the callback is made directly. For g_file_measure_disk_usage_async() the callback is made via the default main context of the calling thread (ie: the same way that the final async result would be reported). @current_size is in the same units as requested by the operation (see %G_FILE_MEASURE_APPARENT_SIZE). The frequency of the updates is implementation defined, but is ideally about once every 200ms. The last progress callback may or may not be equal to the final result. Always check the async result to get the final value.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioFileMeasureProgressCallbackCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (reporting, current_size, num_dirs, num_files, data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioDBusMessageFilterFunctionCallback

[758:7] extends: object

Signature for function used in g_dbus_connection_add_filter(). A filter function is passed a #GDBusMessage and expected to return a #GDBusMessage too. Passive filter functions that don't modify the message can simply return the @message object: |[ static GDBusMessage * passive_filter (GDBusConnection *connection GDBusMessage *message, gboolean incoming, gpointer user_data) { // inspect @message return message; } ]| Filter functions that wants to drop a message can simply return %NULL: |[ static GDBusMessage * drop_filter (GDBusConnection *connection GDBusMessage *message, gboolean incoming, gpointer user_data) { if (should_drop_message) { g_object_unref (message); message = NULL; } return message; } ]| Finally, a filter function may modify a message by copying it: |[ static GDBusMessage * modifying_filter (GDBusConnection *connection GDBusMessage *message, gboolean incoming, gpointer user_data) { GDBusMessage *copy; GError *error; error = NULL; copy = g_dbus_message_copy (message, &error); // handle @error being set g_object_unref (message); // modify @copy return copy; } ]| If the returned #GDBusMessage is different from @message and cannot be sent on @connection (it could use features, such as file descriptors, not compatible with @connection), then a warning is logged to standard error. Applications can check this ahead of time using g_dbus_message_to_blob() passing a #GDBusCapabilityFlags value obtained from @connection.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioDBusMessageFilterFunctionCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (connection, message, incoming, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioSocketSourceFuncCallback

[2033:7] extends: object

This is the function type of the callback used for the #GSource returned by g_socket_create_source().

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioSocketSourceFuncCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (socket, condition, data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioBusNameVanishedCallbackCallback

[373:7] extends: object

Invoked when the name being watched is known not to have to have an owner. This is also invoked when the #GDBusConnection on which the watch was established has been closed. In that case, @connection will be %NULL.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioBusNameVanishedCallbackCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (connection, name, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioDBusSubtreeIntrospectFuncCallback

[1141:7] extends: object

The type of the @introspect function in #GDBusSubtreeVTable. Subtrees are flat. @node, if non-%NULL, is always exactly one segment of the object path (ie: it never contains a slash). This function should return %NULL to indicate that there is no object at this node. If this function returns non-%NULL, the return value is expected to be a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures describing the interfaces implemented by @node. This array will have g_dbus_interface_info_unref() called on each item before being freed with g_free(). The difference between returning %NULL and an array containing zero items is that the standard DBus interfaces will returned to the remote introspector in the empty array case, but not in the %NULL case.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioDBusSubtreeIntrospectFuncCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (connection, sender, object_path, node, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioBusNameLostCallbackCallback

[301:7] extends: object

Invoked when the name is lost or @connection has been closed.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioBusNameLostCallbackCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (connection, name, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioDBusInterfaceGetPropertyFuncCallback

[514:7] extends: object

The type of the @get_property function in #GDBusInterfaceVTable.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioDBusInterfaceGetPropertyFuncCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (connection, sender, object_path, interface_name, property_name, error, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioPollableSourceFuncCallback

[1586:7] extends: object

This is the function type of the callback used for the #GSource returned by g_pollable_input_stream_create_source() and g_pollable_output_stream_create_source().

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioPollableSourceFuncCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (pollable_stream, data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioTaskThreadFuncCallback

[2114:7] extends: object

The prototype for a task function to be run in a thread via g_task_run_in_thread() or g_task_run_in_thread_sync(). If the return-on-cancel flag is set on @task, and @cancellable gets cancelled, then the #GTask will be completed immediately (as though g_task_return_error_if_cancelled() had been called), without waiting for the task function to complete. However, the task function will continue running in its thread in the background. The function therefore needs to be careful about how it uses externally-visible state in this case. See g_task_set_return_on_cancel() for more details. Other than in that case, @task will be completed when the #GTaskThreadFunc returns, not when it calls a g_task_return_ function.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioTaskThreadFuncCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (task, source_object, task_data, cancellable)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioDBusSubtreeEnumerateFuncCallback

[1061:7] extends: object

The type of the @enumerate function in #GDBusSubtreeVTable. This function is called when generating introspection data and also when preparing to dispatch incoming messages in the event that the %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not specified (ie: to verify that the object path is valid). Hierarchies are not supported; the items that you return should not contain the / character. The return value will be freed with g_strfreev().

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioDBusSubtreeEnumerateFuncCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (connection, sender, object_path, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioDBusSignalCallbackCallback

[908:7] extends: object

Signature for callback function used in g_dbus_connection_signal_subscribe().

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioDBusSignalCallbackCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (connection, sender_name, object_path, interface_name, signal_name, parameters, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioBusNameAppearedCallbackCallback

[231:7] extends: object

Invoked when the name being watched is known to have to have an owner.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioBusNameAppearedCallbackCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (connection, name, name_owner, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioVfsFileLookupFuncCallback

[2189:7] extends: object

This function type is used by g_vfs_register_uri_scheme() to make it possible for a client to associate a URI scheme to a different #GFile implementation. The client should return a reference to the new file that has been created for @uri, or %NULL to continue with the default implementation.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioVfsFileLookupFuncCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (vfs, identifier, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioBusNameAcquiredCallbackCallback

[161:7] extends: object

Invoked when the name is acquired.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioBusNameAcquiredCallbackCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (connection, name, user_data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: GioCancellableSourceFuncCallback

[444:7] extends: object

This is the function type of the callback used for the #GSource returned by g_cancellable_source_new().

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • GioCancellableSourceFuncCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (cancellable, data)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.