Constructor

GtkFileFilternew

Declaration [src]

GtkFileFilter*
gtk_file_filter_new (
  void
)

Description [src]

Creates a new GtkFileFilter with no rules added to it.

Such a filter doesn’t accept any files, so is not particularly useful until you add rules with gtk_file_filter_add_mime_type(), gtk_file_filter_add_pattern(), gtk_file_filter_add_suffix() or gtk_file_filter_add_pixbuf_formats().

To create a filter that accepts any file, use:

GtkFileFilter *filter = gtk_file_filter_new ();
gtk_file_filter_add_pattern (filter, "*");

Return value

Type: GtkFileFilter

A new GtkFileFilter.

The caller of the function takes ownership of the data, and is responsible for freeing it.