## ShellDocSystem ShellDocSystem — Track recently used documents |

## Synopsis

    struct              ShellDocSystem;
    struct              ShellDocSystemClass;
    GSList *            shell_doc_system_get_all            (ShellDocSystem *system);
    ShellDocSystem *    shell_doc_system_get_default        (void);
    GtkRecentInfo *     shell_doc_system_lookup_by_uri      (ShellDocSystem *system,
                                                             const char *uri);
    void                shell_doc_system_open               (ShellDocSystem *system,
                                                             GtkRecentInfo *info,
                                                             int workspace);
    void                shell_doc_system_queue_existence_check
                                                            (ShellDocSystem *system,
                                                             guint n_items);

## Object Hierarchy

      GObject
       +----ShellDocSystem

## Signals

      "changed"                                        : Run Last
      "deleted"                                        : Run Last

## Description

Wraps GtkRecentManager, caching recently used document information, and adds APIs for asynchronous queries.

## Details

### struct ShellDocSystem

    struct ShellDocSystem;

### struct ShellDocSystemClass

    struct ShellDocSystemClass {
      GObjectClass parent_class;
    };

### shell_doc_system_get_all ()

    GSList *            shell_doc_system_get_all            (ShellDocSystem *system);

Returns the currently cached set of recent files. Recent files are read initially from the underlying GtkRecentManager, and updated when it changes. This function does not perform I/O.

`system` : | A ShellDocSystem
Returns : | Cached recent file infos. [transfer none][element-type GtkRecentInfo]

### shell_doc_system_get_default ()

    ShellDocSystem *    shell_doc_system_get_default        (void);

Returns : | The global ShellDocSystem singleton. [transfer none]

### shell_doc_system_lookup_by_uri ()

    GtkRecentInfo *     shell_doc_system_lookup_by_uri      (ShellDocSystem *system,
                                                             const char *uri);

`system` : | A ShellDocSystem
`uri` : | URI
Returns : | Recent file info corresponding to given `uri`. [transfer none]

### shell_doc_system_open ()

    void                shell_doc_system_open               (ShellDocSystem *system,
                                                             GtkRecentInfo *info,
                                                             int workspace);

Launch the default application associated with the mime type of `info`, using its uri.

`system` : | A ShellDocSystem
`info` : | A GtkRecentInfo
`workspace` : | Open on this workspace, or -1 for default

### shell_doc_system_queue_existence_check ()

    void                shell_doc_system_queue_existence_check
                                                            (ShellDocSystem *system,
                                                             guint n_items);

Asynchronously start a check of a number of recent file for existence; any deleted files will be emitted from the "deleted" signal. Note that this function ignores non-local files; they will simply always appear to exist (until they are removed from the recent file list manually).

The intent of this function is to be called after a "changed" signal has been emitted, and a display has shown a subset of those files.

`system` : | A ShellDocSystem
`n_items` : | Count of items to check for existence, starting from most recent

## Signal Details

### The `"changed"` signal

    void                user_function                      (ShellDocSystem *shelldocsystem,
                                                            gpointer        user_data)           : Run Last

### The `"deleted"` signal

    void                user_function                      (ShellDocSystem *shelldocsystem,
                                                            GtkRecentInfo  *arg1,
                                                            gpointer        user_data)           : Run Last