Top |
Functions
gboolean | (*GtkCustomFilterFunc) () |
GtkCustomFilter * | gtk_custom_filter_new () |
void | gtk_custom_filter_set_filter_func () |
Description
GtkCustomFilter is a GtkFilter that uses a callback to determine whether to include an item or not.
Functions
GtkCustomFilterFunc ()
gboolean (*GtkCustomFilterFunc) (gpointer item
,gpointer user_data
);
User function that is called to determine if the item
should be matched.
If the filter matches the item, this function must return TRUE
. If the
item should be filtered out, FALSE
must be returned.
gtk_custom_filter_new ()
GtkCustomFilter * gtk_custom_filter_new (GtkCustomFilterFunc match_func
,gpointer user_data
,GDestroyNotify user_destroy
);
Creates a new filter using the given match_func
to filter
items.
If match_func
is NULL
, the filter matches all items.
If the filter func changes its filtering behavior,
gtk_filter_changed()
needs to be called.
gtk_custom_filter_set_filter_func ()
void gtk_custom_filter_set_filter_func (GtkCustomFilter *self
,GtkCustomFilterFunc match_func
,gpointer user_data
,GDestroyNotify user_destroy
);
Sets (or unsets) the function used for filtering items.
If match_func
is NULL
, 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.