About all my projects
Gnome::Gtk4::CustomSorter

Gnome::Gtk4::CustomSorter

Description

Gnome::Gtk4::CustomSorter is a Gnome::Gtk4::Sorter implementation that sorts via a callback function.

Class initialization

new

:native-object

Create an object using a native object from elsewhere. See also Gnome::N::TopLevelSupportClass.

multi method new ( N-Object :$native-object! )

new-customsorter This function is not yet available

Creates a new Gnome::Gtk4::Sorter that works by calling $sort-func to compare items.

If $sort-func is undefined, all items are considered equal.

method new-customsorter ( …, gpointer $user-data, … --> Gnome::Gtk4::CustomSorter \)
  • sort-func; the Gnome::Glib::T-types to use for sorting. Note that each argument must be specified as a type followed by its value!

  • $user-data; user data to pass to $sort-func.

  • user-destroy; destroy notify for $user-data. Note that each argument must be specified as a type followed by its value!

Methods

set-sort-func This function is not yet available

Sets (or unsets) the function used for sorting items.

If $sort-func is undefined, all items are considered equal.

If the sort func changes its sorting behavior, gtk_sorter_changed() needs to be called.

If a previous function was set, its $user-destroy will be called now.

method set-sort-func ( …, gpointer $user-data, … )
  • sort-func; function to sort items. Note that each argument must be specified as a type followed by its value!

  • $user-data; user data to pass to $match-func.

  • user-destroy; destroy notify for $user-data. Note that each argument must be specified as a type followed by its value!