[glide] SlideButton docs+guards



commit bfbe4975fea667a4f11807b557e05c24c5941e45
Author: Robert Carr <racarr Valentine localdomain>
Date:   Fri May 7 15:15:32 2010 -0400

    SlideButton docs+guards

 libglide/glide-slide-button.c |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/libglide/glide-slide-button.c b/libglide/glide-slide-button.c
index 1691ee2..602cfcd 100644
--- a/libglide/glide-slide-button.c
+++ b/libglide/glide-slide-button.c
@@ -177,22 +177,49 @@ glide_slide_button_class_init (GlideSlideButtonClass *klass)
   g_type_class_add_private (object_class, sizeof(GlideSlideButtonPrivate));
 }
 
+/**
+ * glide_slide_button_new:
+ *
+ * Returns a new #GlideSlideButton.
+ *
+ * Return value: The newly allocated #GlideSlideButton
+ */
+
 GtkWidget *
 glide_slide_button_new ()
 {
   return (GtkWidget *)g_object_new (GLIDE_TYPE_SLIDE_BUTTON, NULL);
 }
 
+/**
+ * glide_slide_button_get_slide:
+ * @button: A #GlideSlideButton
+ * 
+ * Returns the slide @button displays.
+ *
+ * Return value: The #GlideSlide for @button
+ */
 GlideSlide *
 glide_slide_button_get_slide (GlideSlideButton *button)
 {
+  g_return_val_if_fail (GLIDE_IS_SLIDE_BUTTON (button), NULL);
   return button->priv->slide;
 }
 
+/**
+ * glide_slide_button_set_slide:
+ * @button: A #GlideSlideButton
+ * @slide: The #GlideSlide to set for @button
+ *
+ * Sets the slide displayed for @button to @slide.
+ *
+ */
 void
 glide_slide_button_set_slide (GlideSlideButton *button,
 			      GlideSlide *slide)
 {
+  g_return_if_fail (GLIDE_IS_SLIDE_BUTTON (button));
+  g_return_if_fail (GLIDE_IS_SLIDE (slide));
   button->priv->manager = 
     (GlideUndoManager *)g_object_ref 
     (G_OBJECT (glide_stage_manager_get_undo_manager 



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