## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

## Index

Package: Recent_Filter

- Goto spec source

# Description

    package Gtk.Recent_Filter is

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

# Packages

### Gtk_Recent_Filter_List (new Glib.GSlist.Generic_SList)

    package Gtk_Recent_Filter_List is
         new Glib.GSlist.Generic_SList (Gtk_Recent_Filter);

Instantiation of a singly-linked list of Gtk_Recent_Filter's.

# Classes

### Gtk_Recent_Filter_Record

- Goto declaration in source
- Goto full declaration in source

    type Gtk_Recent_Filter_Record is
         new Glib.Object.GObject_Record with private;

#### Ancestors:

Glib.Object.GObject_Record

#### Primitive operations:

Add_Age

- To API doc
- To spec

Add_Application

- To API doc
- To spec

Add_Group

- To API doc
- To spec

Add_Mime_Type

- To API doc
- To spec

Add_Pattern

- To API doc
- To spec

Add_Pixbuf_Formats

- To API doc
- To spec

Get_Name

- To API doc
- To spec

Glib.Object.Deallocate

- To API doc
- To spec

(Inherited)
Glib.Object.Get_Type

- To API doc
- To spec

(Inherited)
Glib.Object.Notify

- To API doc
- To spec

(Inherited)
Glib.Object.Ref

- To API doc
- To spec

(Inherited)
Glib.Object.Ref_Sink

- To API doc
- To spec

(Inherited)
Glib.Object.Unref

- To API doc
- To spec

(Inherited)
Set_Name

- To API doc
- To spec

# Types

### Gtk_Recent_Filter

- Goto declaration in source

    type Gtk_Recent_Filter is access all Gtk_Recent_Filter_Record'Class;

# Subprograms & Entries

### Get_Type

- Goto spec in source
- Goto body in source

    function Get_Type return GType;

### Convert

- Goto spec in source

    function Convert (Widget: Gtk_Recent_Filter) return System.Address;

### Convert

- Goto spec in source

    function Convert (Widget: System.Address) return Gtk_Recent_Filter;

### Gtk_New

- Goto spec in source

    procedure Gtk_New (Widget: out Gtk_Recent_Filter);

### Initialize

- Goto spec in source

    procedure Initialize (Widget: access Gtk_Recent_Filter_Record'Class);

Creates a new Gtk_Recent_Filter with no rules added to it. Such filter does not accept any recently used resources, so is not particularly useful until you add rules with Add_Pattern, Add_Mime_Type, Add_Application, Add_Age. To create a filter that accepts any recently used resource, use: declare Filter : Gtk_Recent_Filter; begin Gtk_New (Filter); Add_Pattern (Filter, "*"); end;

### Add_Age

- Goto spec in source

    procedure Add_Age (Filter: access Gtk_Recent_Filter_Record;Days: Gint);

Adds a rule that allows resources based on their age - that is, the number of days elapsed since they were last modified.

### Add_Application

- Goto spec in source

    procedure Add_Application (Filter: access Gtk_Recent_Filter_Record;Application: UTF8_String);

Adds a rule that allows resources based on the name of the application that has registered them.

### Add_Group

- Goto spec in source

    procedure Add_Group (Filter: access Gtk_Recent_Filter_Record;Group: UTF8_String);

Adds a rule that allows resources based on the name of the group to which they belong

### Add_Mime_Type

- Goto spec in source

    procedure Add_Mime_Type (Filter: access Gtk_Recent_Filter_Record;Mime_Type: UTF8_String);

Adds a rule that allows resources based on their registered MIME type.

### Add_Pattern

- Goto spec in source

    procedure Add_Pattern (Filter: access Gtk_Recent_Filter_Record;Pattern: UTF8_String);

Adds a rule that allows resources based on a pattern matching their display name.

### Add_Pixbuf_Formats

- Goto spec in source

    procedure Add_Pixbuf_Formats (Filter: access Gtk_Recent_Filter_Record);

Adds a rule allowing image files in the formats supported by Gdk_Pixbuf.

### Get_Name

- Goto spec in source

    function Get_Name (Filter: access Gtk_Recent_Filter_Record) return UTF8_String;

### Set_Name

- Goto spec in source

    procedure Set_Name (Filter: access Gtk_Recent_Filter_Record;Name: UTF8_String);

Gets/Sets the human-readable name of the filter; this is the string that will be displayed in the recently used resources selector user interface if there is a selectable list of filters.