1Gtk2::RecentManager(3)User Contributed Perl DocumentationGtk2::RecentManager(3)
2
3
4
6 Gtk2::RecentManager
7
9 Glib::Object
10 +----Gtk2::RecentManager
11
13 recentmanager = Gtk2::RecentManager->new
14
15 boolean = $manager->add_full ($uri, $data)
16
17 * $uri (string)
18 * $data (scalar)
19
20 Add $uri to the list of recently used documents. Instead of let‐
21 ting the Gtk2::RecentManager object guess the meta-data, use $data
22 to supply it. $data is a hash reference with these keys:
23
24 display_name
25 The name to be used when displaying the document inside the
26 recently used documents list.
27
28 description
29 A short description of the document.
30
31 mime_type
32 The MIME type of the document. [Mandatory]
33
34 app_name
35 The name of the application that is registering the document.
36 You might use the same name you used in Glib::set_applica‐
37 tion_name.
38
39 app_exec
40 The command line needed to launch the application with the doc‐
41 ument. You can use the variable "%u", which will be expanded
42 to the document's URI, or the variable "%f" which will be
43 expanded to the document's canonical full path.
44
45 groups
46 An array reference, containing the group names the document
47 belongs to.
48
49 is_private
50 Whether the document should be visible only to the applications
51 and groups that have registered it.
52
53 boolean = $manager->add_item ($uri)
54
55 * $uri (string)
56
57 Add $uri to the list of recently used documents. The Gtk2::Recent‐
58 Manager object will try to guess the meta-data of the document from
59 its URI, but if you know it you should use Gtk2::RecentMan‐
60 ager::add_full.
61
62 recentmanager = Gtk2::RecentManager->get_default
63
64 recentmanager = Gtk2::RecentManager->get_for_screen ($screen)
65
66 * $screen (Gtk2::Gdk::Screen)
67
68 boolean = $manager->has_item ($uri)
69
70 * $uri (string)
71
72 (items) = $manager->get_items
73
74 integer = $manager->get_limit
75
76 $manager->set_limit ($limit)
77
78 * $limit (integer)
79
80 recentinfo = $manager->lookup_item ($uri)
81
82 * $uri (string)
83
84 May croak with a Glib::Error in $@ on failure.
85
86 $manager->move_item ($old_uri, $new_uri)
87
88 * $old_uri (string)
89 * $new_uri (string or undef)
90
91 May croak with a Glib::Error in $@ on failure.
92
93 integer = $manager->purge_items
94
95 May croak with a Glib::Error in $@ on failure.
96
97 $manager->remove_item ($uri)
98
99 * $uri (string)
100
101 May croak with a Glib::Error in $@ on failure.
102
103 $manager->set_screen ($screen)
104
105 * $screen (Gtk2::Gdk::Screen)
106
108 'filename' (string : readable / writable / construct-only)
109 The full path to the file to be used to store and read the list
110
111 'limit' (integer : readable / writable)
112 The maximum number of items to be returned by gtk_recent_man‐
113 ager_get_items()
114
115 'size' (integer : readable)
116 The size of the recently used resources list
117
119 changed (Gtk2::RecentManager)
120
122 enum GtkRecentManagerError
123
124 * 'not-found' / 'GTK_RECENT_MANAGER_ERROR_NOT_FOUND'
125 * 'invalid-uri' / 'GTK_RECENT_MANAGER_ERROR_INVALID_URI'
126 * 'invalid-encoding' / 'GTK_RECENT_MANAGER_ERROR_INVALID_ENCODING'
127 * 'not-registered' / 'GTK_RECENT_MANAGER_ERROR_NOT_REGISTERED'
128 * 'read' / 'GTK_RECENT_MANAGER_ERROR_READ'
129 * 'write' / 'GTK_RECENT_MANAGER_ERROR_WRITE'
130 * 'unknown' / 'GTK_RECENT_MANAGER_ERROR_UNKNOWN'
131
133 Gtk2, Glib::Object
134
136 Copyright (C) 2003-2007 by the gtk2-perl team.
137
138 This software is licensed under the LGPL. See Gtk2 for a full notice.
139
140
141
142perl v5.8.8 2007-03-18 Gtk2::RecentManager(3)