Settings.bindWithMapping

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 the 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.

class Settings
void
bindWithMapping
(
string key
,,
string property
,
GSettingsBindFlags flags
,
GSettingsBindGetMapping getMapping
,
GSettingsBindSetMapping setMapping
,
void* userData
,
GDestroyNotify destroy
)

Parameters

key string

the key to bind

object ObjectG

a #GObject

property string

the name of the property to bind

flags GSettingsBindFlags

flags for the binding

getMapping GSettingsBindGetMapping

a function that gets called to convert values from @settings to @object, or %NULL to use the default GIO mapping

setMapping GSettingsBindSetMapping

a function that gets called to convert values from @object to @settings, or %NULL to use the default GIO mapping

userData void*

data that gets passed to @get_mapping and @set_mapping

destroy GDestroyNotify

#GDestroyNotify function for @user_data

Meta

Since

2.26