About all my projects
Gnome::Gtk4::CustomFilter

Gnome::Gtk4::CustomFilter

Description

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

Uml Diagram

No caption

Class initialization

new

:native-object

Create an object using a native object from an object of the same type found elsewhere. See also Gnome::N::TopLevelSupportClass.

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

new-customfilter

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 ( GtkCustomFilterFunc &match-func, gpointer $user-data, GDestroyNotify &user-destroy --> Gnome::Gtk4::CustomFilter )
  • GtkCustomFilterFunc &match-func; function to filter items. The function must be specified with the following signature; :( gpointer $item, gpointer $user-data ).

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

  • GDestroyNotify &user-destroy; destroy notify for $user-data. The function must be specified with the following signature; :( gpointer $data ).

Methods

set-filter-func

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 ( GtkCustomFilterFunc &match-func, gpointer $user-data, GDestroyNotify &user-destroy )
  • GtkCustomFilterFunc &match-func; function to filter items. The function must be specified with the following signature; :( gpointer $item, gpointer $user-data ).

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

  • GDestroyNotify &user-destroy; destroy notify for $user-data. The function must be specified with the following signature; :( gpointer $data ).