summaryrefslogtreecommitdiff
path: root/gobject/gbinding.h
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2010-08-03 10:29:50 +0100
committerEmmanuele Bassi <ebassi@linux.intel.com>2010-08-03 10:29:50 +0100
commit90f7f171e621c296526b3978a75433c30c088b46 (patch)
treedbd062a597ac3db255be652ac184f9661e1f78e1 /gobject/gbinding.h
parent3be3ad61d142ca5bbd5659809af749ea5bf441ac (diff)
downloadglib-90f7f171e621c296526b3978a75433c30c088b46.tar.gz
binding: Add G_BINDING_INVERT_BOOLEAN
Since GSettings got the same functionality and flag in commit ca3b7b75b GBinding should also have the ability to automatically invert a boolean value without requiring a custom transformation function.
Diffstat (limited to 'gobject/gbinding.h')
-rw-r--r--gobject/gbinding.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/gobject/gbinding.h b/gobject/gbinding.h
index 361eef9b6..fe6799d43 100644
--- a/gobject/gbinding.h
+++ b/gobject/gbinding.h
@@ -72,13 +72,18 @@ typedef gboolean (* GBindingTransformFunc) (GBinding *binding,
/**
* GBindingFlags:
* @G_BINDING_DEFAULT: The default binding; if the source property
- * changes, the target property is updated with its value
+ * changes, the target property is updated with its value.
* @G_BINDING_BIDIRECTIONAL: Bidirectional binding; if either the
* property of the source or the property of the target changes,
- * the other is updated
+ * the other is updated.
* @G_BINDING_SYNC_CREATE: Synchronize the values of the source and
* target properties when creating the binding; the direction of
- * the synchronization is always from the source to the target
+ * the synchronization is always from the source to the target.
+ * @G_BINDING_INVERT_BOOLEAN: If the two properties being bound are
+ * booleans, setting one to %TRUE will result in the other being
+ * set to %FALSE and vice versa. This flag will only work for
+ * boolean properties, and cannot be used when passing custom
+ * transformation functions to g_object_bind_property_full().
*
* Flags to be passed to g_object_bind_property() or
* g_object_bind_property_full().
@@ -88,10 +93,11 @@ typedef gboolean (* GBindingTransformFunc) (GBinding *binding,
* Since: 2.26
*/
typedef enum { /*< prefix=G_BINDING >*/
- G_BINDING_DEFAULT = 0,
+ G_BINDING_DEFAULT = 0,
- G_BINDING_BIDIRECTIONAL = 1 << 0,
- G_BINDING_SYNC_CREATE = 1 << 1
+ G_BINDING_BIDIRECTIONAL = 1 << 0,
+ G_BINDING_SYNC_CREATE = 1 << 1,
+ G_BINDING_INVERT_BOOLEAN = 1 << 2
} GBindingFlags;
GType g_binding_flags_get_type (void) G_GNUC_CONST;