Gtk.FileChooser.prototype.add_filter

function add_filter(filter:Gtk.FileFilter):void {
    // Gjs wrapper for gtk_file_chooser_add_filter()
}

Adds filter to the list of filters that the user can select between. When a filter is selected, only files that are passed by that filter are displayed.

Note that the chooser takes ownership of the filter, so you have to ref and sink it if you want to keep a reference.

Since 2.4

filter

a Gtk.FileFilter