[gnome-builder] egg-binding-set: Improve docs



commit b39e34b0142665e6eff1d39837888f9f58c59b6c
Author: Garrett Regier <garrettregier gmail com>
Date:   Wed May 13 14:27:06 2015 -0700

    egg-binding-set: Improve docs

 contrib/egg/egg-binding-set.c |   23 ++++++++++++++++-------
 contrib/egg/egg-binding-set.h |    2 ++
 2 files changed, 18 insertions(+), 7 deletions(-)
---
diff --git a/contrib/egg/egg-binding-set.c b/contrib/egg/egg-binding-set.c
index a414772..0141c32 100644
--- a/contrib/egg/egg-binding-set.c
+++ b/contrib/egg/egg-binding-set.c
@@ -25,14 +25,18 @@
 /**
  * SECTION:egg-binding-set
  * @title: EggBindingSet
- * @short_description: Manage multiple #GBinding as a set.
+ * @short_description: Manage a collection of #GBindings on
+ *      a #GObject as a set.
  *
- * This should not be confused with #GtkBindingSet.
+ * #EggBindingSet manages to simplify the process of binding
+ * many properties from a #GObject as a group. As such there is no API
+ * to unbind a property from the group.
+ *
+ * In particular, this allows you to change the source instance for the
+ * bindings. This automatically causes the unbinding of the properties
+ * from the old instance and binding to the new instance.
  *
- * #EggBindingSet allows you to manage a set of #GBindings that you
- * would like attached to the same source object. This is convenience
- * so that you can manage them as a set rather than reconnecting them
- * individually.
+ * This should not be confused with #GtkBindingSet.
  */
 
 struct _EggBindingSet
@@ -329,10 +333,15 @@ egg_binding_set_class_init (EggBindingSetClass *klass)
   object_class->get_property = egg_binding_set_get_property;
   object_class->set_property = egg_binding_set_set_property;
 
+  /**
+   * EggBindingSet:source
+   *
+   * The source object used for binding properties.
+   */
   gParamSpecs [PROP_SOURCE] =
     g_param_spec_object ("source",
                          _("Source"),
-                         _("The source GObject."),
+                         _("The source GObject used for binding properties."),
                          G_TYPE_OBJECT,
                          (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
diff --git a/contrib/egg/egg-binding-set.h b/contrib/egg/egg-binding-set.h
index b474b7f..52b505d 100644
--- a/contrib/egg/egg-binding-set.h
+++ b/contrib/egg/egg-binding-set.h
@@ -28,9 +28,11 @@ G_BEGIN_DECLS
 G_DECLARE_FINAL_TYPE (EggBindingSet, egg_binding_set, EGG, BINDING_SET, GObject)
 
 EggBindingSet *egg_binding_set_new        (void);
+
 GObject       *egg_binding_set_get_source (EggBindingSet         *self);
 void           egg_binding_set_set_source (EggBindingSet         *self,
                                            gpointer               source);
+
 void           egg_binding_set_bind       (EggBindingSet         *self,
                                            const gchar           *source_property,
                                            gpointer               target,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]