GtkCustomFilter

GtkCustomFilter — Filtering with callbacks

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GtkFilter
        ╰── GtkCustomFilter

Includes

#include <gtk/gtk.h>

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.

Parameters

item

The item to be matched.

[type GObject]

user_data

user data

 

Returns

TRUE to keep the item around


gtk_custom_filter_new ()

GtkFilter *
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 the filter func changes its filtering behavior, gtk_filter_changed() needs to be called.

Parameters

match_func

function to filter items.

[nullable]

user_data

user data to pass to match_func .

[nullable]

user_destroy

destory notify

 

Returns

a new GtkFilter

Types and Values

GtkCustomFilter

typedef struct _GtkCustomFilter GtkCustomFilter;