package Gtk_Recent_Filter_List is new Glib.GSlist.Generic_SList (Gtk_Recent_Filter);
type Gtk_Recent_Filter_Record is new Glib.Object.GObject_Record with private;
type Gtk_Recent_Filter is access all Gtk_Recent_Filter_Record'Class;
function Get_Type return GType;
function Convert
( | Widget | : Gtk_Recent_Filter) return System.Address; |
function Convert
( | Widget | : System.Address) return Gtk_Recent_Filter; |
procedure Gtk_New
( | Widget | : out Gtk_Recent_Filter); |
procedure Initialize
( | Widget | : access Gtk_Recent_Filter_Record'Class); |
procedure Add_Age
( | Filter | : access Gtk_Recent_Filter_Record; |
Days | : Gint); |
procedure Add_Application
( | Filter | : access Gtk_Recent_Filter_Record; |
Application | : UTF8_String); |
procedure Add_Group
( | Filter | : access Gtk_Recent_Filter_Record; |
Group | : UTF8_String); |
procedure Add_Mime_Type
( | Filter | : access Gtk_Recent_Filter_Record; |
Mime_Type | : UTF8_String); |
procedure Add_Pattern
( | Filter | : access Gtk_Recent_Filter_Record; |
Pattern | : UTF8_String); |
procedure Add_Pixbuf_Formats
( | Filter | : access Gtk_Recent_Filter_Record); |
function Get_Name
( | Filter | : access Gtk_Recent_Filter_Record) return UTF8_String; |
procedure Set_Name
( | Filter | : access Gtk_Recent_Filter_Record; |
Name | : UTF8_String); |
A Gtk_Recent_Filter can be used to restrict the files being shown in a Gtk_Recent_Chooser. Files can be filtered based on their name (with Add_Pattern), on their mime type (with Add_Mime_Type), on the application that has registered them (with Add_Application), or by a custom filter function (with Add_Custom).
Filtering by mime type handles aliasing and subclassing of mime types; e.g. a filter for text/plain also matches a file with mime type application/rtf, since application/rtf is a subclass of text/plain.
Note that Gtk_Recent_Filter allows wildcards for the subtype of a mime type, so you can e.g. filter for image/*.
Normally, filters are used by adding them to a Gtk_Recent_Chooser, see Gtk.Recent_Chooser.Add_Filter, but it is also possible to manually use a filter on a file with Filter.
Binding from C File version 2.16.6