GtkMultiFilter

GtkMultiFilter — Combining multiple filters

Types and Values

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 an implementation of GtkMultiFilter that matches an item when at least one of its filters matches.

GtkEveryFilter is an implementation 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 ()

GtkFilter *
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 GtkFilter


gtk_every_filter_new ()

GtkFilter *
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 GtkFilter

Types and Values

GtkMultiFilter

typedef struct _GtkMultiFilter GtkMultiFilter;

GtkAnyFilter

typedef struct _GtkAnyFilter GtkAnyFilter;

GtkEveryFilter

typedef struct _GtkEveryFilter GtkEveryFilter;