1Gtk2::RecentManager(3)User Contributed Perl DocumentationGtk2::RecentManager(3)
2
3
4

NAME

6       Gtk2::RecentManager - wrapper for GtkRecentManager
7

HIERARCHY

9         Glib::Object
10         +----Gtk2::RecentManager
11

METHODS

13   recentmanager = Gtk2::RecentManager->new
14   boolean = $manager->add_full ($uri, $data)
15       •   $uri (string)
16
17       •   $data (scalar)
18
19       Add $uri to the list of recently used documents.  Instead of letting
20       the Gtk2::RecentManager object guess the meta-data, use $data to supply
21       it.  $data is a hash reference with these keys:
22
23       display_name
24           The name to be used when displaying the document inside the
25           recently used documents list.
26
27       description
28           A short description of the document.
29
30       mime_type
31           The MIME type of the document. [Mandatory]
32
33       app_name
34           The name of the application that is registering the document.  You
35           might use the same name you used in "Glib::set_application_name"
36           (see Glib::Utils).
37
38       app_exec
39           The command line needed to launch the application with the
40           document.  You can use the variable "%u", which will be expanded to
41           the document's URI, or the variable "%f" which will be expanded to
42           the document's canonical full path.
43
44       groups
45           An array reference, containing the group names the document belongs
46           to.
47
48       is_private
49           Whether the document should be visible only to the applications and
50           groups that have registered it.
51
52   boolean = $manager->add_item ($uri)
53       •   $uri (string)
54
55       Add $uri to the list of recently used documents.  The
56       Gtk2::RecentManager object will try to guess the meta-data of the
57       document from its URI, but if you know it you should use "add_full"
58       above.
59
60   recentmanager = Gtk2::RecentManager->get_default
61   recentmanager = Gtk2::RecentManager->get_for_screen ($screen)
62       •   $screen (Gtk2::Gdk::Screen)
63
64   boolean = $manager->has_item ($uri)
65       •   $uri (string)
66
67   (items) = $manager->get_items
68   integer = $manager->get_limit
69   $manager->set_limit ($limit)
70       •   $limit (integer)
71
72   recentinfo = $manager->lookup_item ($uri)
73       •   $uri (string)
74
75       May croak with a Glib::Error in $@ on failure.
76
77   $manager->move_item ($old_uri, $new_uri)
78       •   $old_uri (string)
79
80       •   $new_uri (string or undef)
81
82       May croak with a Glib::Error in $@ on failure.
83
84   integer = $manager->purge_items
85       May croak with a Glib::Error in $@ on failure.
86
87   $manager->remove_item ($uri)
88       •   $uri (string)
89
90       May croak with a Glib::Error in $@ on failure.
91
92   $manager->set_screen ($screen)
93       •   $screen (Gtk2::Gdk::Screen)
94

PROPERTIES

96       'filename' (string : default undef : readable / writable / construct-
97       only)
98           The full path to the file to be used to store and read the list
99
100       'limit' (integer : default -1 : readable / writable / deprecated)
101           The maximum number of items to be returned by
102           gtk_recent_manager_get_items()
103
104       'size' (integer : default 0 : readable)
105           The size of the recently used resources list
106

SIGNALS

108       changed (Gtk2::RecentManager)
109

ENUMS AND FLAGS

111   enum GtkRecentManagerError
112       •   'not-found' / 'GTK_RECENT_MANAGER_ERROR_NOT_FOUND'
113
114       •   'invalid-uri' / 'GTK_RECENT_MANAGER_ERROR_INVALID_URI'
115
116       •   'invalid-encoding' / 'GTK_RECENT_MANAGER_ERROR_INVALID_ENCODING'
117
118       •   'not-registered' / 'GTK_RECENT_MANAGER_ERROR_NOT_REGISTERED'
119
120       •   'read' / 'GTK_RECENT_MANAGER_ERROR_READ'
121
122       •   'write' / 'GTK_RECENT_MANAGER_ERROR_WRITE'
123
124       •   'unknown' / 'GTK_RECENT_MANAGER_ERROR_UNKNOWN'
125

SEE ALSO

127       Gtk2, Glib::Object
128
130       Copyright (C) 2003-2011 by the gtk2-perl team.
131
132       This software is licensed under the LGPL.  See Gtk2 for a full notice.
133
134
135
136perl v5.34.0                      2021-07-22            Gtk2::RecentManager(3)
Impressum