## ShellAppSystem ShellAppSystem |

## Synopsis

    struct              ShellAppSystem;
    struct              ShellAppSystemClass;
    ShellAppSystem *    shell_app_system_get_default        (void);
    ShellApp *          shell_app_system_lookup_app         (ShellAppSystem *system,
                                                             const char *id);
    ShellApp *          shell_app_system_lookup_heuristic_basename
                                                            (ShellAppSystem *system,
                                                             const char *id);
    ShellApp *          shell_app_system_lookup_startup_wmclass
                                                            (ShellAppSystem *system,
                                                             const char *wmclass);
    ShellApp *          shell_app_system_lookup_desktop_wmclass
                                                            (ShellAppSystem *system,
                                                             const char *wmclass);
    GSList *            shell_app_system_get_running        (ShellAppSystem *self);

## Object Hierarchy

      GObject
       +----ShellAppSystem

## Signals

      "app-state-changed"                              : Run Last
      "installed-changed"                              : Run Last

## Description

## Details

### struct ShellAppSystem

    struct ShellAppSystem;

### struct ShellAppSystemClass

    struct ShellAppSystemClass {
      GObjectClass parent_class;

      void (*installed_changed)(ShellAppSystem *appsys, gpointer user_data);
      void (*favorites_changed)(ShellAppSystem *appsys, gpointer user_data);
    };

### shell_app_system_get_default ()

    ShellAppSystem *    shell_app_system_get_default        (void);

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

### shell_app_system_lookup_app ()

    ShellApp *          shell_app_system_lookup_app         (ShellAppSystem *system,
                                                             const char *id);

Find a ShellApp corresponding to an id.

Returns : | The ShellApp for id, or `NULL` if none. [transfer none]

### shell_app_system_lookup_heuristic_basename ()

    ShellApp *          shell_app_system_lookup_heuristic_basename
                                                            (ShellAppSystem *system,
                                                             const char *id);

Find a valid application corresponding to a given heuristically determined application identifier string, or `NULL` if none.

`system` : | a ShellAppSystem
`id` : | Probable application identifier
Returns : | A ShellApp for `name`. [transfer none]

### shell_app_system_lookup_startup_wmclass ()

    ShellApp *          shell_app_system_lookup_startup_wmclass
                                                            (ShellAppSystem *system,
                                                             const char *wmclass);

Find a valid application whose .desktop file contains a StartupWMClass entry matching `wmclass`.

`system` : | a ShellAppSystem
`wmclass` : | A WM_CLASS value. [allow-none]
Returns : | A ShellApp for `wmclass`. [transfer none]

### shell_app_system_lookup_desktop_wmclass ()

    ShellApp *          shell_app_system_lookup_desktop_wmclass
                                                            (ShellAppSystem *system,
                                                             const char *wmclass);

Find a valid application whose .desktop file, without the extension and properly canonicalized, matches `wmclass`.

`system` : | a ShellAppSystem
`wmclass` : | A WM_CLASS value. [allow-none]
Returns : | A ShellApp for `wmclass`. [transfer none]

### shell_app_system_get_running ()

    GSList *            shell_app_system_get_running        (ShellAppSystem *self);

Returns the set of applications which currently have at least one open window in the given context. The returned list will be sorted by `shell_app_compare()`.

`self` : | A ShellAppSystem
Returns : | Active applications. [element-type ShellApp][transfer container]

## Signal Details

### The `"app-state-changed"` signal

    void                user_function                      (ShellAppSystem *shellappsystem,
                                                            ShellApp       *arg1,
                                                            gpointer        user_data)           : Run Last

### The `"installed-changed"` signal

    void                user_function                      (ShellAppSystem *shellappsystem,
                                                            gpointer        user_data)           : Run Last