[glide] Doc and API guards for slide box



commit 8faadeb44fa2ed69bb9568c6b2652f79c0f60f06
Author: Robert Carr <racarr Valentine localdomain>
Date:   Fri May 7 14:53:42 2010 -0400

    Doc and API guards for slide box

 libglide/glide-slide-box.c |   32 +++++++++++++++++++++++++++++++-
 1 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/libglide/glide-slide-box.c b/libglide/glide-slide-box.c
index db4c82c..366c5f2 100644
--- a/libglide/glide-slide-box.c
+++ b/libglide/glide-slide-box.c
@@ -178,6 +178,13 @@ glide_slide_box_class_init (GlideSlideBoxClass *klass)
   g_type_class_add_private (object_class, sizeof(GlideSlideBoxPrivate));
 }
 
+/**
+ * glide_slide_box_new:
+ *
+ * Constructs a new #GlideSlideBox.
+ *
+ * Return value: The newly allocated #GlideSlideBox.
+ */
 GtkWidget *
 glide_slide_box_new ()
 {
@@ -185,17 +192,40 @@ glide_slide_box_new ()
 }
 
 
+/**
+ * glide_slide_box_get_stage_manager:
+ * @box: A #GlideSlideBox.
+ *
+ * Returns the #GlideStageManager that @box is watching.
+ *
+ * Return value: The #GlideStageManager for @box.
+ */
 GlideStageManager *
 glide_slide_box_get_stage_manager (GlideSlideBox *box)
 {
+  g_return_val_if_fail (GLIDE_IS_SLIDE_BOX(box), NULL);
   return box->priv->manager;
 }
 
+/**
+ * glide_slide_box_set_stage_manager:
+ * @box: A #GlideSlideBox.
+ * @manager: A #GlideStageManager to set as the manager for @box.
+ *
+ * Sets @manager as the stage manager for @box. @box will listen to the
+ * slide-added and slide-removed signals on the managers document
+ * to populate its contents
+ */
 void
 glide_slide_box_set_stage_manager (GlideSlideBox *box,
 				   GlideStageManager *manager)
 {
-  GlideDocument *doc = glide_stage_manager_get_document (manager);
+  GlideDocument *doc;
+  
+  g_return_if_fail (GLIDE_IS_SLIDE_BOX (box));
+  g_return_if_fail (GLIDE_IS_STAGE_MANAGER (manager));
+
+  doc  = glide_stage_manager_get_document (manager);
 
   if (box->priv->manager)
     {



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