[gtk+/grid-widget: 19/20] Add docs for functions



commit af9b5070ca55fe6c71c9b2e358b4aa3bf22e0b70
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Oct 11 00:25:15 2010 -0400

    Add docs for functions

 gtk/gtkgrid.c |  102 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 100 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkgrid.c b/gtk/gtkgrid.c
index 62bd967..eda8518 100644
--- a/gtk/gtkgrid.c
+++ b/gtk/gtkgrid.c
@@ -955,9 +955,9 @@ gtk_grid_request_run (GtkGridRequest *request,
   gtk_grid_request_homogeneous (request, orientation);
 }
 
-/* requires that the minimum and natural fields of lines
+/* Requires that the minimum and natural fields of lines
  * have been set, computes the allocation field of lines
- * by distributing total_size among lines
+ * by distributing total_size among lines.
  */
 static void
 gtk_grid_request_allocate (GtkGridRequest *request,
@@ -1059,6 +1059,8 @@ gtk_grid_request_allocate (GtkGridRequest *request,
     }
 }
 
+/* Computes the position fields from allocation and spacing.
+ */
 static void
 gtk_grid_request_position (GtkGridRequest *request,
                            GtkOrientation  orientation)
@@ -1374,6 +1376,13 @@ gtk_grid_class_init (GtkGridClass *class)
   g_type_class_add_private (class, sizeof (GtkGridPrivate));
 }
 
+/**
+ * gtk_grid_new:
+ *
+ * Creates a new grid widget.
+ *
+ * Returns: the new #GtkGrid
+ */
 GtkWidget *
 gtk_grid_new (void)
 {
@@ -1405,6 +1414,21 @@ grid_attach (GtkGrid   *grid,
   gtk_widget_set_parent (widget, GTK_WIDGET (grid));
 }
 
+/**
+ * gtk_grid_attach:
+ * @grid: a #GtkGrid
+ * @child: the widget to add
+ * @left: the column number to attach the left side of @child to
+ * @top: the row number to attach the top side of @child to
+ * @width: the number of columns that @child will span
+ * @height: the number of rows that @child will span
+ *
+ * Adds a widget to the grid.
+ *
+ * The position of @child is determined by @left and @top. The
+ * number of 'cells' that @child will occupy is determined by
+ * @width and @height.
+ */
 void
 gtk_grid_attach (GtkGrid   *grid,
                  GtkWidget *child,
@@ -1422,6 +1446,20 @@ gtk_grid_attach (GtkGrid   *grid,
   grid_attach (grid, child, left, top, width, height);
 }
 
+/**
+ * gtk_grid_attach_next_to:
+ * @grid: a #GtkGrid
+ * @child: the widget to add
+ * @sibling: the child of @grid that @child will be placed next to
+ * @side: the side of @sibling that @child is positioned next to
+ * @width: the number of columns that @child will span
+ * @height: the number of rows that @child will span
+ *
+ * Adds a widget to the grid.
+ *
+ * The widget is placed next to @sibling, on the side determined by
+ * @side.
+ */
 void
 gtk_grid_attach_next_to (GtkGrid         *grid,
                          GtkWidget       *child,
@@ -1467,6 +1505,13 @@ gtk_grid_attach_next_to (GtkGrid         *grid,
   grid_attach (grid, child, left, top, width, height);
 }
 
+/**
+ * gtk_grid_set_row_homogeneous:
+ * @grid: a #GtkGrid
+ * @homogeneous: %TRUE to make rows homogeneous
+ *
+ * Sets whether all rows of @grid will have the same height.
+ */
 void
 gtk_grid_set_row_homogeneous (GtkGrid  *grid,
                               gboolean  homogeneous)
@@ -1487,6 +1532,14 @@ gtk_grid_set_row_homogeneous (GtkGrid  *grid,
     }
 }
 
+/**
+ * gtk_grid_get_row_homogeneous:
+ * @grid: a #GtkGrid
+ *
+ * Returns whether all rows of @grid have the same height.
+ *
+ * Returns: whether all rows of @grid have the same height.
+ */
 gboolean
 gtk_grid_get_row_homogeneous (GtkGrid *grid)
 {
@@ -1498,6 +1551,13 @@ gtk_grid_get_row_homogeneous (GtkGrid *grid)
   return ROWS (priv)->homogeneous;
 }
 
+/**
+ * gtk_grid_set_column_homogeneous:
+ * @grid: a #GtkGrid
+ * @homogeneous: %TRUE to make columns homogeneous
+ *
+ * Sets whether all columns of @grid will have the same width.
+ */
 void
 gtk_grid_set_column_homogeneous (GtkGrid  *grid,
                                  gboolean  homogeneous)
@@ -1518,6 +1578,14 @@ gtk_grid_set_column_homogeneous (GtkGrid  *grid,
     }
 }
 
+/**
+ * gtk_grid_get_column_homogeneous:
+ * @grid: a #GtkGrid
+ *
+ * Returns whether all columns of @grid have the same width.
+ *
+ * Returns: whether all columns of @grid have the same width.
+ */
 gboolean
 gtk_grid_get_column_homogeneous (GtkGrid *grid)
 {
@@ -1529,6 +1597,13 @@ gtk_grid_get_column_homogeneous (GtkGrid *grid)
   return COLUMNS (priv)->homogeneous;
 }
 
+/**
+ * gtk_grid_set_row_spacing:
+ * @grid: a #GtkGrid
+ * @spacing: the amount of space to insert between rows
+ *
+ * Sets the amount of space between rows of @grid.
+ */
 void
 gtk_grid_set_row_spacing (GtkGrid *grid,
                           guint    spacing)
@@ -1550,6 +1625,14 @@ gtk_grid_set_row_spacing (GtkGrid *grid,
     }
 }
 
+/**
+ * gtk_grid_get_row_spacing:
+ * @grid: a #GtkGrid
+ *
+ * Returns the amount of space between the rows of @grid.
+ *
+ * Returns: the row spacing of @grid
+ */
 guint
 gtk_grid_get_row_spacing (GtkGrid *grid)
 {
@@ -1561,6 +1644,13 @@ gtk_grid_get_row_spacing (GtkGrid *grid)
   return ROWS (priv)->spacing;
 }
 
+/**
+ * gtk_grid_set_column_spacing:
+ * @grid: a #GtkGrid
+ * @spacing: the amount of space to insert between columns
+ *
+ * Sets the amount of space between columns of @grid.
+ */
 void
 gtk_grid_set_column_spacing (GtkGrid *grid,
                              guint    spacing)
@@ -1582,6 +1672,14 @@ gtk_grid_set_column_spacing (GtkGrid *grid,
     }
 }
 
+/**
+ * gtk_grid_get_column_spacing:
+ * @grid: a #GtkGrid
+ *
+ * Returns the amount of space between the columns of @grid.
+ *
+ * Returns: the column spacing of @grid
+ */
 guint
 gtk_grid_get_column_spacing (GtkGrid *grid)
 {



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