## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

1.     -----------------------------------------------------------------------

2.     --               GtkAda - Ada95 binding for Gtk+/Gnome               --

3.     --                                                                   --

4.     --                Copyright (C) 2010-2013, AdaCore                   --

5.     --                                                                   --

6.     -- This library is free software; you can redistribute it and/or     --

7.     -- modify it under the terms of the GNU General Public               --

8.     -- License as published by the Free Software Foundation; either      --

9.     -- version 2 of the License, or (at your option) any later version.  --

10.     --                                                                   --

11.     -- This library is distributed in the hope that it will be useful,   --

12.     -- but WITHOUT ANY WARRANTY; without even the implied warranty of    --

13.     -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --

14.     -- General Public License for more details.                          --

15.     --                                                                   --

16.     -- You should have received a copy of the GNU General Public         --

17.     -- License along with this library; if not, write to the             --

18.     -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --

19.     -- Boston, MA 02111-1307, USA.                                       --

20.     --                                                                   --

21.     -- As a special exception, if other files instantiate generics from  --

22.     -- this unit, or you link this unit with other files to produce an   --

23.     -- executable, this  unit  does not  by itself cause  the resulting  --

24.     -- executable to be covered by the GNU General Public License. This  --

25.     -- exception does not however invalidate any other reasons why the   --

26.     -- executable file  might be covered by the  GNU Public License.     --

27.     -----------------------------------------------------------------------

29.     --  <description>

30.     --  A Gtk_Recent_Filter can be used to restrict the files being shown in a

31.     --  Gtk_Recent_Chooser. Files can be filtered based on their name (with

32.     --  Add_Pattern), on their mime type (with Add_Mime_Type), on the application

33.     --  that has registered them (with Add_Application), or by a custom filter

34.     --  function (with Add_Custom).

35.     --

36.     --  Filtering by mime type handles aliasing and subclassing of mime types;

37.     --  e.g. a filter for text/plain also matches a file with mime type

38.     --  application/rtf, since application/rtf is a subclass of text/plain.

39.     --  Note that Gtk_Recent_Filter allows wildcards for the subtype of a mime

40.     --  type, so you can e.g. filter for image/*.

41.     --

42.     --  Normally, filters are used by adding them to a Gtk_Recent_Chooser, see

43.     --  Gtk.Recent_Chooser.Add_Filter, but it is also possible to manually use a

44.     --  filter on a file with Filter.

45.     --  </description>

46.     --  <c_version>2.16.6</c_version>

48.     with Glib.GSlistTo API docTo specTo body;

49.     with Glib.ObjectTo API docTo specTo body;

51.     package Gtk.Recent_FilterTo API docTo specTo body is

53.        type Gtk_Recent_Filter_RecordTo API docTo body is

54.          new Glib.Object.GObject_RecordTo API docTo specTo body with private;

55.        type Gtk_Recent_Filter is access all Gtk_Recent_Filter_RecordTo API docTo specTo body'Class;

57.        function Get_TypeTo API docTo body return GTypeTo API docTo spec;

59.        function ConvertTo API docTo body (Widget : Gtk_Recent_FilterTo API docTo spec) return System.Address;

60.        function ConvertTo API docTo body (Widget : System.Address) return Gtk_Recent_FilterTo API docTo spec;

61.        package Gtk_Recent_Filter_List is

62.          new Glib.GSlist.Generic_SListTo API docTo specTo body (Gtk_Recent_FilterTo API docTo spec);

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

65.        procedure Gtk_NewTo API docTo body (Widget : out Gtk_Recent_FilterTo API docTo spec);

66.        procedure InitializeTo API docTo body (Widget : access Gtk_Recent_Filter_RecordTo API docTo specTo body'Class);

67.        --  Creates a new Gtk_Recent_Filter with no rules added to it.

68.        --  Such filter does not accept any recently used resources, so is not

69.        --  particularly useful until you add rules with Add_Pattern, Add_Mime_Type,

70.        --  Add_Application, Add_Age.  To create a filter that accepts any recently

71.        --  used resource, use:

72.        --

73.        --     declare

74.        --        Filter : Gtk_Recent_Filter;

75.        --     begin

76.        --        Gtk_New (Filter);

77.        --        Add_Pattern (Filter, "*");

78.        --     end;

80.        procedure Add_AgeTo API docTo body

81.          (Filter : access Gtk_Recent_Filter_RecordTo API docTo specTo body;

82.           Days   : GintTo API docTo spec);

83.        --  Adds a rule that allows resources based on their age - that is, the

84.        --  number of days elapsed since they were last modified.

86.        procedure Add_ApplicationTo API docTo body

87.          (Filter      : access Gtk_Recent_Filter_RecordTo API docTo specTo body;

88.           Application : UTF8_StringTo API docTo spec);

89.        --  Adds a rule that allows resources based on the name of the application

90.        --  that has registered them.

92.        procedure Add_GroupTo API docTo body

93.          (Filter : access Gtk_Recent_Filter_RecordTo API docTo specTo body;

94.           Group  : UTF8_StringTo API docTo spec);

95.        --  Adds a rule that allows resources based on the name of the group

96.        --  to which they belong

98.        procedure Add_Mime_TypeTo API docTo body

99.          (Filter    : access Gtk_Recent_Filter_RecordTo API docTo specTo body;

100.           Mime_Type : UTF8_StringTo API docTo spec);

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

103.        procedure Add_PatternTo API docTo body

104.          (Filter  : access Gtk_Recent_Filter_RecordTo API docTo specTo body;

105.           Pattern : UTF8_StringTo API docTo spec);

106.        --  Adds a rule that allows resources based on a pattern matching their

107.        --  display name.

109.        procedure Add_Pixbuf_FormatsTo API docTo body (Filter : access Gtk_Recent_Filter_RecordTo API docTo specTo body);

110.        --  Adds a rule allowing image files in the formats supported

111.        --  by Gdk_Pixbuf.

113.        function Get_NameTo API docTo body

114.          (Filter : access Gtk_Recent_Filter_RecordTo API docTo specTo body) return UTF8_StringTo API docTo spec;

115.        procedure Set_NameTo API docTo body

116.          (Filter : access Gtk_Recent_Filter_RecordTo API docTo specTo body;

117.           Name   : UTF8_StringTo API docTo spec);

118.        --  Gets/Sets the human-readable name of the filter; this is the string

119.        --  that will be displayed in the recently used resources selector

120.        --  user interface if there is a selectable list of filters.

122.     private

124.        type Gtk_Recent_Filter_RecordTo API docTo spec is

125.          new Glib.Object.GObject_RecordTo API docTo specTo body with null record;

127.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_recent_filter_get_type");

129.     end Gtk.Recent_FilterTo API docTo specTo body;