### Function

# Gtk TreeSelectionFunc

#### Declaration

    gboolean
    (* GtkTreeSelectionFunc) (
      GtkTreeSelection* selection,
      GtkTreeModel* model,
      GtkTreePath* path,
      gboolean path_currently_selected,
      gpointer data
    )

#### Description [src]

A function used by `gtk_tree_selection_set_select_function()` to filter whether or not a row may be selected. It is called whenever a row’s state might change.

A return value of `TRUE` indicates to `selection` that it is okay to change the selection.

#### Parameters

`selection`

  Type: `GtkTreeSelection`

  A `GtkTreeSelection`.

  The data is owned by the caller of the function.

`model`

  Type: `GtkTreeModel`

  A `GtkTreeModel` being viewed.

  The data is owned by the caller of the function.

`path`

  Type: `GtkTreePath`

  The `GtkTreePath` of the row in question.

  The data is owned by the caller of the function.

`path_currently_selected`

  Type: `gboolean`

  `TRUE`, if the path is currently selected.

`data`

  Type: `gpointer`

  User data.

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

#### Return value

Type: `gboolean`

`TRUE`, if the selection state of the row can be toggled.