Gtk.TreeSortable.set_default_sort_func
Description: Reference for Gtk.TreeSortable.set_default_sort_func

### Virtual Method

# Gtk TreeSortableset_default_sort_func

#### Declaration [src]

    void
    set_default_sort_func (
      GtkTreeSortable* sortable,
      GtkTreeIterCompareFunc sort_func,
      gpointer user_data,
      GDestroyNotify destroy
    )

#### Description [src]

Sets the default comparison function used when sorting to be `sort_func`. If the current sort column id of `sortable` is `GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID`, then the model will sort using this function.

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.

#### Parameters

`sort_func`

  Type: `GtkTreeIterCompareFunc`

  The comparison function.

`user_data`

  Type: `gpointer`

  User data to pass to `sort_func`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`destroy`

  Type: `GDestroyNotify`

  Destroy notifier of `user_data`.