Class: Gtk::CustomFilter

Inherits:
Filter
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Methods inherited from Filter

#changed, #match, #strictness

Constructor Details

#initialize(match_func, user_data, user_destroy) ⇒ Gtk::CustomFilter

Creates a new filter using the given match_func to filter items.

If match_func is nil, the filter matches all items.

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

Parameters:

  • match_func (Gtk::CustomFilterFunc)

    function to filter items

  • user_data (GObject)

    user data to pass to match_func

  • user_destroy (GLib::DestroyNotify)

    destroy notify for user_data

Instance Method Details

#set_filter_func(match_func, user_data, user_destroy) ⇒ nil

Sets the function used for filtering items.

If match_func is nil, 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.

Parameters:

  • match_func (Gtk::CustomFilterFunc)

    function to filter items

  • user_data (GObject)

    user data to pass to match_func

  • user_destroy (GLib::DestroyNotify)

    destroy notify for user_data

Returns:

  • (nil)