[glide] Documentation and API guards for manipulator



commit 5d9add44ac2894588a14ba228d6f0b074674af7b
Author: Robert Carr <racarr Valentine localdomain>
Date:   Fri May 7 14:01:21 2010 -0400

    Documentation and API guards for manipulator

 docs/reference/glide-sections.txt |    1 -
 libglide/glide-manipulator.c      |   48 +++++++++++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+), 1 deletions(-)
---
diff --git a/docs/reference/glide-sections.txt b/docs/reference/glide-sections.txt
index 63a336a..99f98e4 100644
--- a/docs/reference/glide-sections.txt
+++ b/docs/reference/glide-sections.txt
@@ -301,7 +301,6 @@ GLIDE_INSPECTOR_ANIMATION_GET_CLASS
 <SECTION>
 <FILE>glide-manipulator</FILE>
 <TITLE>GlideManipulator</TITLE>
-GlideManipulatorPrivate
 GlideManipulator
 GlideManipulatorClass
 glide_manipulator_new
diff --git a/libglide/glide-manipulator.c b/libglide/glide-manipulator.c
index 689420f..da129bd 100644
--- a/libglide/glide-manipulator.c
+++ b/libglide/glide-manipulator.c
@@ -798,35 +798,83 @@ glide_manipulator_init (GlideManipulator *manipulator)
   clutter_actor_set_reactive (CLUTTER_ACTOR (manipulator), TRUE);
 }
 
+/**
+ * glide_manipulator_new:
+ * @target: A #ClutterActor or NULL.
+ *
+ * Creates a new #GlideManipulator, targeting
+ * @target.
+ *
+ * Return value: The newly allocated #GlideManipulator.
+ */
 GlideManipulator *
 glide_manipulator_new (ClutterActor *target)
 {
   return g_object_new (GLIDE_TYPE_MANIPULATOR, "target", target, NULL);
 }
 
+/**
+ * glide_manipulator_get_target:
+ * @manip: A #GlideManipulator
+ *
+ * Returns the target of @manip.
+ *
+ * Return value: The current target of @manip.
+ */
 ClutterActor *
 glide_manipulator_get_target (GlideManipulator *manip)
 {
+  g_return_val_if_fail (GLIDE_IS_MANIPULATOR (manip), NULL);
   return manip->priv->target;
 }
 
+/**
+ * glide_manipulator_set_target:
+ * @manip: A #GlideManipulator
+ * @target: A #ClutterActor to set as the target, or %NULL.
+ *
+ * Sets the target of @manip to @target.
+ *
+ */
 void
 glide_manipulator_set_target (GlideManipulator *manip, ClutterActor *actor)
 {
+  g_return_if_fail (GLIDE_IS_MANIPULATOR (manip));
   glide_manipulator_set_target_real (manip, actor);
   g_object_notify (G_OBJECT (manip), "target");
 }
 
+/**
+ * glide_manipulator_get_width_only:
+ * @manip: A #GlideManipulator
+ *
+ * Returns whether the manipulator should display only
+ * width adjustments, as in the case of #GlideText.
+ *
+ * Return value: Whether the manipulator only displays
+ * horizontal adjustment widgets.
+ */
 gboolean
 glide_manipulator_get_width_only (GlideManipulator *manip)
 {
+  g_return_val_if_fail (GLIDE_IS_MANIPULATOR (manip), FALSE);
   return manip->priv->width_only;
 }
 
+/**
+ * glide_manipulator_set_width_only:
+ * @manip: A #GlideManipulator
+ * @width_only: The new value.
+ *
+ * Sets @manip to only display width adjustments, based on the
+ * value of @width_only.
+ *
+ */
 void
 glide_manipulator_set_width_only (GlideManipulator *manip,
 				  gboolean width_only)
 {
+  g_return_if_fail (GLIDE_IS_MANIPULATOR (manip));
   if (width_only == manip->priv->width_only)
     return;
   manip->priv->width_only = width_only;



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