### Method

# Gtk TreeSortable set_sort_func

deprecated: 4.10

#### Declaration [src]

    void
    gtk_tree_sortable_set_sort_func (
      GtkTreeSortable* sortable,
      int sort_column_id,
      GtkTreeIterCompareFunc sort_func,
      gpointer user_data,
      GDestroyNotify destroy
    )

#### Description [src]

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.

Deprecated since: 4.10

Please do not use it in newly written code.

#### Parameters

`sort_column_id`

  Type: `int`

  The sort column id to set the function for.

`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 method.

`destroy`

  Type: `GDestroyNotify`

  Destroy notifier of `user_data`.

  The argument can be `NULL`.