Gtk.CustomSorter.new
Description: Reference for Gtk.CustomSorter.new

### Constructor

# Gtk CustomSorternew

#### Declaration [src]

    GtkCustomSorter*
    gtk_custom_sorter_new (
      GCompareDataFunc sort_func,
      gpointer user_data,
      GDestroyNotify user_destroy
    )

#### Description [src]

Creates a new `GtkSorter` that works by calling `sort_func` to compare items.

If `sort_func` is `NULL`, all items are considered equal.

#### Parameters

`sort_func`

  Type: `GCompareDataFunc`

  The `GCompareDataFunc` to use for sorting.

  The argument can be `NULL`.

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

`user_destroy`

  Type: `GDestroyNotify`

  Destroy notify for `user_data`.

  The argument can be `NULL`.

#### Return value

Type: `GtkCustomSorter`

A new `GtkCustomSorter`.

The caller of the function takes ownership of the data, and is responsible for freeing it.