X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtktreesortable.c;h=0eeadc5e8be333c8ae50f93da791e0879a93d4e2;hb=cf216d780cb2c889a3bcb5faa825fc1b21af8896;hp=09bea0095c312a9ed86e882e8c8a45e337f53311;hpb=f47a4a2232336c2fd85ad12e2a2f61e28d6a953a;p=~andy%2Fgtk
diff --git a/gtk/gtktreesortable.c b/gtk/gtktreesortable.c
index 09bea0095..0eeadc5e8 100644
--- a/gtk/gtktreesortable.c
+++ b/gtk/gtktreesortable.c
@@ -12,9 +12,7 @@
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see .
*/
@@ -22,7 +20,19 @@
#include "gtktreesortable.h"
#include "gtkmarshalers.h"
#include "gtkintl.h"
-#include "gtkalias.h"
+
+
+/**
+ * SECTION:gtktreesortable
+ * @Short_description: The interface for sortable models used by GtkTreeView
+ * @Title: GtkTreeSortable
+ * @See_also:#GtkTreeModel, #GtkTreeView
+ *
+ * #GtkTreeSortable is an interface to be implemented by tree models which
+ * support sorting. The #GtkTreeView uses the methods provided by this interface
+ * to sort the model.
+ */
+
static void gtk_tree_sortable_base_init (gpointer g_class);
@@ -63,6 +73,14 @@ gtk_tree_sortable_base_init (gpointer g_class)
if (! initialized)
{
+ /**
+ * GtkTreeSortable::sort-column-changed:
+ * @sortable: the object on which the signal is emitted
+ *
+ * The ::sort-column-changed signal is emitted when the sort column
+ * or sort order of @sortable is changed. The signal is emitted before
+ * the contents of @sortable are resorted.
+ */
g_signal_new (I_("sort-column-changed"),
GTK_TYPE_TREE_SORTABLE,
G_SIGNAL_RUN_LAST,
@@ -78,8 +96,8 @@ gtk_tree_sortable_base_init (gpointer g_class)
* gtk_tree_sortable_sort_column_changed:
* @sortable: A #GtkTreeSortable
*
- * Emits a GtkTreeSortable::sort_column_changed signal on
- **/
+ * Emits a #GtkTreeSortable::sort-column-changed signal on @sortable.
+ */
void
gtk_tree_sortable_sort_column_changed (GtkTreeSortable *sortable)
{
@@ -91,11 +109,11 @@ gtk_tree_sortable_sort_column_changed (GtkTreeSortable *sortable)
/**
* gtk_tree_sortable_get_sort_column_id:
* @sortable: A #GtkTreeSortable
- * @sort_column_id: The sort column id to be filled in
- * @order: The #GtkSortType to be filled in
+ * @sort_column_id: (out): The sort column id to be filled in
+ * @order: (out): The #GtkSortType to be filled in
*
* Fills in @sort_column_id and @order with the current sort column and the
- * order. It returns %TRUE unless the @sort_column_id is
+ * order. It returns %TRUE unless the @sort_column_id is
* %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID or
* %GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID.
*
@@ -125,12 +143,21 @@ gtk_tree_sortable_get_sort_column_id (GtkTreeSortable *sortable,
* @sort_column_id: the sort column id to set
* @order: The sort order of the column
*
- * Sets the current sort column to be @sort_column_id. The @sortable will
+ * Sets the current sort column to be @sort_column_id. The @sortable will
* resort itself to reflect this change, after emitting a
- * GtkTreeSortable::sort_column_changed signal. If @sort_column_id is
- * %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the default sort function
- * will be used, if it is set.
- **/
+ * #GtkTreeSortable::sort-column-changed signal. @sort_column_id may either be
+ * a regular column id, or one of the following special values:
+ *
+ *
+ * %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID
+ * the default sort function will be used, if it is set
+ *
+ *
+ * %GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID
+ * no sorting will occur
+ *
+ *
+ */
void
gtk_tree_sortable_set_sort_column_id (GtkTreeSortable *sortable,
gint sort_column_id,
@@ -153,13 +180,13 @@ gtk_tree_sortable_set_sort_column_id (GtkTreeSortable *sortable,
* @sortable: A #GtkTreeSortable
* @sort_column_id: the sort column id to set the function for
* @sort_func: The comparison function
- * @user_data: User data to pass to @sort_func, or %NULL
- * @destroy: Destroy notifier of @user_data, or %NULL
+ * @user_data: (allow-none): User data to pass to @sort_func, or %NULL
+ * @destroy: (allow-none): Destroy notifier of @user_data, or %NULL
*
- * Sets the comparison function used when sorting to be @sort_func. If the
- * current sort column id of @sortable is the same as @sort_column_id, then the
- * model will sort using this function.
- **/
+ * Sets the comparison function used when sorting to be @sort_func. If the
+ * current sort column id of @sortable is the same as @sort_column_id, then
+ * the model will sort using this function.
+ */
void
gtk_tree_sortable_set_sort_func (GtkTreeSortable *sortable,
gint sort_column_id,
@@ -185,8 +212,8 @@ gtk_tree_sortable_set_sort_func (GtkTreeSortable *sortable,
* gtk_tree_sortable_set_default_sort_func:
* @sortable: A #GtkTreeSortable
* @sort_func: The comparison function
- * @user_data: User data to pass to @sort_func, or %NULL
- * @destroy: Destroy notifier of @user_data, or %NULL
+ * @user_data: (allow-none): User data to pass to @sort_func, or %NULL
+ * @destroy: (allow-none): Destroy notifier of @user_data, or %NULL
*
* Sets the default comparison function used when sorting to be @sort_func.
* If the current sort column id of @sortable is
@@ -195,9 +222,9 @@ gtk_tree_sortable_set_sort_func (GtkTreeSortable *sortable,
*
* If @sort_func is %NULL, then there will be no default comparison function.
* This means that once the model has been sorted, it can't go back to the
- * default state. In this case, when the current sort column id of @sortable is
- * GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, the model will be unsorted.
- **/
+ * default state. In this case, when the current sort column id of @sortable
+ * is %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, the model will be unsorted.
+ */
void
gtk_tree_sortable_set_default_sort_func (GtkTreeSortable *sortable,
GtkTreeIterCompareFunc sort_func,
@@ -220,12 +247,12 @@ gtk_tree_sortable_set_default_sort_func (GtkTreeSortable *sortable,
* gtk_tree_sortable_has_default_sort_func:
* @sortable: A #GtkTreeSortable
*
- * Returns %TRUE if the model has a default sort function. This is used
- * primarily by GtkTreeViewColumns in order to determine if a model can go back
- * to the default state, or not.
+ * Returns %TRUE if the model has a default sort function. This is used
+ * primarily by GtkTreeViewColumns in order to determine if a model can
+ * go back to the default state, or not.
*
* Return value: %TRUE, if the model has a default sort function
- **/
+ */
gboolean
gtk_tree_sortable_has_default_sort_func (GtkTreeSortable *sortable)
{
@@ -240,6 +267,3 @@ gtk_tree_sortable_has_default_sort_func (GtkTreeSortable *sortable)
return (* iface->has_default_sort_func) (sortable);
}
-
-#define __GTK_TREE_SORTABLE_C__
-#include "gtkaliasdef.c"