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:
GObjectA
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:
GSettingsBindFlagsFlags for the binding.
get_mapping-
Type:
GSettingsBindGetMappingA function that gets called to convert values from
settingstoobject, orNULLto use the default GIO mapping. set_mapping-
Type:
GSettingsBindSetMappingA function that gets called to convert values from
objecttosettings, orNULLto use the default GIO mapping. user_data-
Type:
gpointerData that gets passed to
get_mappingandset_mapping.The argument can be NULL.The data is owned by the caller of the method. destroy-
Type:
GDestroyNotifyGDestroyNotifyfunction foruser_data.