---
name: "Gtk2::RecentManager"
section: "3pm"
platform: "linux"
package: "libgtk2-perl-doc"
version: "2:1.24992-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/Gtk2::RecentManager"
---

# Gtk2::RecentManager(3pm)

wrapper for GtkRecentManager

## NAME

Gtk2::RecentManager - wrapper for GtkRecentManager

## HIERARCHY

```
  Glib::Object
  +----Gtk2::RecentManager
```

## METHODS

### recentmanager = Gtk2::RecentManager-\>new

### boolean = $manager-\>add\_full ($uri, $data)

- •

  `$uri` (string)

- •

  `$data` (scalar)

Add *$uri* to the list of recently used documents.  Instead of letting the Gtk2::RecentManager object guess the meta-data, use *$data* to supply it. *$data* is a hash reference with these keys:

- display\_name

  The name to be used when displaying the document inside the recently used documents list.

- description

  A short description of the document.

- mime\_type

  The MIME type of the document. \[Mandatory\]

- app\_name

  The name of the application that is registering the document.  You might use the same name you used in `"Glib::set_application_name"` (see Glib::Utils).

- app\_exec

  The command line needed to launch the application with the document.  You can use the variable `"%u"`, which will be expanded to the document's URI, or the variable `"%f"` which will be expanded to the document's canonical full path.

- groups

  An array reference, containing the group names the document belongs to.

- is\_private

  Whether the document should be visible only to the applications and groups that have registered it.

### boolean = $manager-\>add\_item ($uri)

- •

  `$uri` (string)

Add *$uri* to the list of recently used documents.  The Gtk2::RecentManager object will try to guess the meta-data of the document from its URI, but if you know it you should use `"add_full"` above.

### recentmanager = Gtk2::RecentManager-\>get\_default

### recentmanager = Gtk2::RecentManager-\>get\_for\_screen ($screen)

- •

  `$screen` (Gtk2::Gdk::Screen)

### boolean = $manager-\>has\_item ($uri)

- •

  `$uri` (string)

### (items) = $manager-\>get\_items

### integer = $manager-\>get\_limit

### $manager-\>set\_limit ($limit)

- •

  `$limit` (integer)

### recentinfo = $manager-\>lookup\_item ($uri)

- •

  `$uri` (string)

May croak with a Glib::Error in $@ on failure.

### $manager-\>move\_item ($old\_uri, $new\_uri)

- •

  `$old_uri` (string)

- •

  `$new_uri` (string or undef)

May croak with a Glib::Error in $@ on failure.

### integer = $manager-\>purge\_items

May croak with a Glib::Error in $@ on failure.

### $manager-\>remove\_item ($uri)

- •

  `$uri` (string)

May croak with a Glib::Error in $@ on failure.

### $manager-\>set\_screen ($screen)

- •

  `$screen` (Gtk2::Gdk::Screen)

## PROPERTIES

- 'filename' (string : default undef : readable / writable / construct-only)

  The full path to the file to be used to store and read the list

- 'limit' (integer : default -1 : readable / writable)

  The maximum number of items to be returned by *gtk\_recent\_manager\_get\_items()*

- 'size' (integer : default 0 : readable)

  The size of the recently used resources list

## SIGNALS

- **changed** (Gtk2::RecentManager)

  ## ENUMS AND FLAGS

### enum GtkRecentManagerError

- •

  'not-found' / 'GTK\_RECENT\_MANAGER\_ERROR\_NOT\_FOUND'

- •

  'invalid-uri' / 'GTK\_RECENT\_MANAGER\_ERROR\_INVALID\_URI'

- •

  'invalid-encoding' / 'GTK\_RECENT\_MANAGER\_ERROR\_INVALID\_ENCODING'

- •

  'not-registered' / 'GTK\_RECENT\_MANAGER\_ERROR\_NOT\_REGISTERED'

- •

  'read' / 'GTK\_RECENT\_MANAGER\_ERROR\_READ'

- •

  'write' / 'GTK\_RECENT\_MANAGER\_ERROR\_WRITE'

- •

  'unknown' / 'GTK\_RECENT\_MANAGER\_ERROR\_UNKNOWN'

## SEE ALSO

Gtk2, Glib::Object

## COPYRIGHT

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL.  See Gtk2 for a full notice.
