### Class

# Gtk Filter

#### Description [src]

    class Gtk.Filter : GObject.Object {
      parent_instance: GObject
    }

A `GtkFilter` object describes the filtering to be performed by a `GtkFilterListModel`.

The model will use the filter to determine if it should include items or not by calling gtk_filter_match() for each item and only keeping the ones that the function returns `TRUE` for.

Filters may change what items they match through their lifetime. In that case, they will emit the `GtkFilter::changed` signal to notify that previous filter results are no longer valid and that items should be checked again via gtk_filter_match().

GTK provides various pre-made filter implementations for common filtering operations. These filters often include properties that can be linked to various widgets to easily allow searches.

However, in particular for large lists or complex search methods, it is also possible to subclass `GtkFilter` and provide one’s own filter.

#### Hierarchy

#### Ancestors

- GObject

#### Instance methods

###### gtk_filter_changed

Notifies all users of the filter that it has changed.

###### gtk_filter_get_strictness

Gets the known strictness of `filters`.

###### gtk_filter_match

Checks if the given `item` is matched by the filter or not.

#### Signals

###### Gtk.Filter::changed

Emitted whenever the filter changed.

#### Class structure

    struct GtkFilterClass {
      GObjectClass parent_class;
      gboolean (* match) (
        GtkFilter* self,
        GObject* item
      );
      GtkFilterMatch (* get_strictness) (
        GtkFilter* self
      );
      void (* _gtk_reserved1) (
    void
      );
      void (* _gtk_reserved2) (
    void
      );
      void (* _gtk_reserved3) (
    void
      );
      void (* _gtk_reserved4) (
    void
      );
      void (* _gtk_reserved5) (
    void
      );
      void (* _gtk_reserved6) (
    void
      );
      void (* _gtk_reserved7) (
    void
      );
      void (* _gtk_reserved8) (
    void
      );

    }

###### Class members

`parent_class` |
    GObjectClass
| No description available.
`match` |
    gboolean (* match) (
        GtkFilter* self,
        GObject* item
      )
| No description available.
`get_strictness` |
    GtkFilterMatch (* get_strictness) (
        GtkFilter* self
      )
| No description available.
`_gtk_reserved1` |
    void (* _gtk_reserved1) (
    void
      )
| No description available.
`_gtk_reserved2` |
    void (* _gtk_reserved2) (
    void
      )
| No description available.
`_gtk_reserved3` |
    void (* _gtk_reserved3) (
    void
      )
| No description available.
`_gtk_reserved4` |
    void (* _gtk_reserved4) (
    void
      )
| No description available.
`_gtk_reserved5` |
    void (* _gtk_reserved5) (
    void
      )
| No description available.
`_gtk_reserved6` |
    void (* _gtk_reserved6) (
    void
      )
| No description available.
`_gtk_reserved7` |
    void (* _gtk_reserved7) (
    void
      )
| No description available.
`_gtk_reserved8` |
    void (* _gtk_reserved8) (
    void
      )
| No description available.

#### Virtual methods

###### Gtk.FilterClass.get_strictness

Gets the known strictness of `filters`.

###### Gtk.FilterClass.match

Checks if the given `item` is matched by the filter or not.