W3cubDocs

/GTK 4.0

GtkMultiFilter

GtkMultiFilter — Combining multiple filters

Object Hierarchy

    GObject
    ╰── GtkFilter
        ╰── GtkMultiFilter
            ├── GtkAnyFilter
            ╰── GtkEveryFilter

Implemented Interfaces

GtkMultiFilter implements GListModel and GtkBuildable.

GtkAnyFilter implements GListModel and GtkBuildable.

GtkEveryFilter implements GListModel and GtkBuildable.

Includes

#include <gtk/gtk.h>

Description

GtkMultiFilter is the base type that implements support for handling multiple filters.

GtkAnyFilter is a subclass of GtkMultiFilter that matches an item when at least one of its filters matches.

GtkEveryFilter is a subclass of GtkMultiFilter that matches an item when each of its filters matches.

Functions

gtk_multi_filter_append ()

void
gtk_multi_filter_append (GtkMultiFilter *self,
                         GtkFilter *filter);

Adds a filter to self to use for matching.

Parameters

self

a GtkMultiFilter

filter

A new filter to use.

[transfer full]

gtk_multi_filter_remove ()

void
gtk_multi_filter_remove (GtkMultiFilter *self,
                         guint position);

Removes the filter at the given position from the list of filters used by self . If position is larger than the number of filters, nothing happens and the function returns.

Parameters

self

a GtkMultiFilter

position

position of filter to remove

gtk_any_filter_new ()

GtkAnyFilter *
gtk_any_filter_new (void);

Creates a new empty "any" filter. Use gtk_multi_filter_append() to add filters to it.

This filter matches an item if any of the filters added to it matches the item. In particular, this means that if no filter has been added to it, the filter matches no item.

Returns

a new GtkAnyFilter

gtk_every_filter_new ()

GtkEveryFilter *
gtk_every_filter_new (void);

Creates a new empty "every" filter. Use gtk_multi_filter_append() to add filters to it.

This filter matches an item if each of the filters added to it matches the item. In particular, this means that if no filter has been added to it, the filter matches every item.

Returns

a new GtkEveryFilter

Types and Values

GtkMultiFilter

typedef struct _GtkMultiFilter GtkMultiFilter;

GtkAnyFilter

typedef struct _GtkAnyFilter GtkAnyFilter;

GtkEveryFilter

typedef struct _GtkEveryFilter GtkEveryFilter;

© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.
https://developer.gnome.org/gtk4/4.0/GtkMultiFilter.html