mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-10-04 20:59:21 +02:00
Some more details about bindings
This commit is contained in:
@@ -107,7 +107,9 @@
|
|||||||
* A very convenient feature of GSettings lets you bind #GObject properties
|
* A very convenient feature of GSettings lets you bind #GObject properties
|
||||||
* directly to settings, using g_settings_bind(). Once a GObject property
|
* directly to settings, using g_settings_bind(). Once a GObject property
|
||||||
* has been bound to a setting, changes on either side are automatically
|
* has been bound to a setting, changes on either side are automatically
|
||||||
* propagated to the other side.
|
* propagated to the other side. GSettings handles details like
|
||||||
|
* mapping between GObject and GVariant types, and preventing infinite
|
||||||
|
* cycles.
|
||||||
* </para>
|
* </para>
|
||||||
* <para>
|
* <para>
|
||||||
* This makes it very easy to hook up a preferences dialog to the
|
* This makes it very easy to hook up a preferences dialog to the
|
||||||
@@ -795,7 +797,8 @@ g_settings_get_value (GSettings *settings,
|
|||||||
* @settings: a #GSettings object
|
* @settings: a #GSettings object
|
||||||
* @key: the name of the key to set
|
* @key: the name of the key to set
|
||||||
* @value: a #GVariant of the correct type
|
* @value: a #GVariant of the correct type
|
||||||
* @returns: %TRUE if setting succeeded, %FALSE if the key was not writable
|
* @returns: %TRUE if setting the key succeeded,
|
||||||
|
* %FALSE if the key was not writable
|
||||||
*
|
*
|
||||||
* Sets @key in @settings to @value.
|
* Sets @key in @settings to @value.
|
||||||
*
|
*
|
||||||
@@ -873,6 +876,8 @@ g_settings_get (GSettings *settings,
|
|||||||
* @key: the name of the key to set
|
* @key: the name of the key to set
|
||||||
* @format: a #GVariant format string
|
* @format: a #GVariant format string
|
||||||
* @...: arguments as per @format
|
* @...: arguments as per @format
|
||||||
|
* @returns: %TRUE if setting the key succeeded,
|
||||||
|
* %FALSE if the key was not writable
|
||||||
*
|
*
|
||||||
* Sets @key in @settings to @value.
|
* Sets @key in @settings to @value.
|
||||||
*
|
*
|
||||||
@@ -1507,15 +1512,19 @@ g_settings_get_mapping (GValue *value,
|
|||||||
* @flags: flags for the binding
|
* @flags: flags for the binding
|
||||||
*
|
*
|
||||||
* Create a binding between the @key in the @settings object
|
* Create a binding between the @key in the @settings object
|
||||||
* and the property @property of @object, using the default GIO
|
* and the property @property of @object.
|
||||||
* mapping functions to map between the settings and property values.
|
|
||||||
*
|
*
|
||||||
* The default GIO mapping functions handle booleans, numeric and
|
* The binding uses the default GIO mapping functions to map
|
||||||
* string types in a straightforward way. See g_settings_bind_with_mapping()
|
* between the settings and property values. These functions
|
||||||
* if you need a custom mapping.
|
* handle booleans, numeric types and string types in a
|
||||||
|
* straightforward way. Use g_settings_bind_with_mapping()
|
||||||
|
* if you need a custom mapping, or map between types that
|
||||||
|
* are not supported by the default mapping functions.
|
||||||
*
|
*
|
||||||
* Note that the lifecycle of the binding is tied to the
|
* Note that the lifecycle of the binding is tied to the object,
|
||||||
* 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.
|
||||||
*
|
*
|
||||||
* Since: 2.26
|
* Since: 2.26
|
||||||
*/
|
*/
|
||||||
@@ -1545,8 +1554,10 @@ g_settings_bind (GSettings *settings,
|
|||||||
* @destroy: #GDestroyNotify function for @user_data
|
* @destroy: #GDestroyNotify function for @user_data
|
||||||
*
|
*
|
||||||
* Create a binding between the @key in the @settings object
|
* Create a binding between the @key in the @settings object
|
||||||
* and the property @property of @object, using the provided mapping
|
* and the property @property of @object.
|
||||||
* functions to map between settings and property values.
|
*
|
||||||
|
* 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,
|
* Note that the lifecycle of the binding is tied to the object,
|
||||||
* and that you can have only one binding per object property.
|
* and that you can have only one binding per object property.
|
||||||
|
Reference in New Issue
Block a user