Method
GioSettingsbind_with_mapping
since: 2.26
Declaration [src]
void
g_settings_bind_with_mapping (
GSettings* settings,
const gchar* key,
GObject* object,
const gchar* property,
GSettingsBindFlags flags,
GSettingsBindGetMapping get_mapping,
GSettingsBindSetMapping set_mapping,
gpointer user_data,
GDestroyNotify destroy
)
Description [src]
Create a binding between the key
in the settings
object
and the property property
of object
.
The binding uses the provided mapping functions to map between settings and property values.
Note that the lifecycle of the binding is tied to object
,
and that you can have only one binding per object property.
If you bind the same property twice on the same object, the second
binding overrides the first one.
Available since: 2.26
This method is not directly available to language bindings.
The implementation of this method is provided by g_settings_bind_with_mapping_closures()
in language bindings.
Parameters
key
-
Type:
const gchar*
The key to bind.
The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. object
-
Type:
GObject
A
GObject
.The data is owned by the caller of the method. property
-
Type:
const gchar*
The name of the property to bind.
The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. flags
-
Type:
GSettingsBindFlags
Flags for the binding.
get_mapping
-
Type:
GSettingsBindGetMapping
A function that gets called to convert values from
settings
toobject
, orNULL
to use the default GIO mapping. set_mapping
-
Type:
GSettingsBindSetMapping
A function that gets called to convert values from
object
tosettings
, orNULL
to use the default GIO mapping. user_data
-
Type:
gpointer
Data that gets passed to
get_mapping
andset_mapping
.The argument can be NULL
.The data is owned by the caller of the method. destroy
-
Type:
GDestroyNotify
GDestroyNotify
function foruser_data
.