About all my projects
Gnome::Gtk4::CustomFilter

Gnome::Gtk4::CustomFilter

Description

Gnome::Gtk4::CustomFilter determines whether to include items with a callback.

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-customfilter This function is not yet available

Creates a new filter using the given $match-func to filter items.

If $match-func is undefined, the filter matches all items.

If the filter func changes its filtering behavior, gtk_filter_changed() needs to be called.

method new-customfilter ( &match-func, gpointer $user-data, … --> Gnome::Gtk4::CustomFilter \)
  • &match-func; function to filter items. Tthe function must be specified with following signature; :( gpointer $item, gpointer $user-data -- gboolean )>.

  • $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!

Methods

set-filter-func This function is not yet available

Sets the function used for filtering items.

If $match-func is undefined, the filter matches all items.

If the filter func changes its filtering behavior, gtk_filter_changed() needs to be called.

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

method set-filter-func ( &match-func, gpointer $user-data, … )
  • &match-func; function to filter items. Tthe function must be specified with following signature; :( gpointer $item, gpointer $user-data -- gboolean )>.

  • $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!