CinnamonAppSystem: Cinnamon Reference Manual

## CinnamonAppSystem CinnamonAppSystem |

## Functions

CinnamonAppSystem * | cinnamon_app_system_get_default ()
GMenuTree * | cinnamon_app_system_get_tree ()
CinnamonApp * | cinnamon_app_system_lookup_app ()
CinnamonApp * | cinnamon_app_system_lookup_settings_app ()
CinnamonApp * | cinnamon_app_system_lookup_app_by_tree_entry ()
CinnamonApp * | cinnamon_app_system_lookup_settings_app_by_tree_entry ()
CinnamonApp * | cinnamon_app_system_lookup_app_for_path ()
CinnamonApp * | cinnamon_app_system_lookup_heuristic_basename ()
GSList * | cinnamon_app_system_get_all ()
GSList * | cinnamon_app_system_get_running ()
GSList * | cinnamon_app_system_initial_search ()
GSList * | cinnamon_app_system_subsearch ()
GMenuTree * | cinnamon_app_system_get_settings_tree ()
GSList * | cinnamon_app_system_search_settings ()
CinnamonApp * | cinnamon_app_system_lookup_setting ()

## Signals

void | app-state-changed | Run Last
void | installed-changed | Run Last

## Object Hierarchy

        GObject
        ╰── CinnamonAppSystem

## Description

## Functions

### cinnamon_app_system_get_default ()

    CinnamonAppSystem *
    cinnamon_app_system_get_default (void);

#### Returns

The global CinnamonAppSystem singleton.

[transfer none]

### cinnamon_app_system_get_tree ()

    GMenuTree *
    cinnamon_app_system_get_tree (CinnamonAppSystem *system);

#### Returns

The GMenuTree for apps.

[transfer none]

### cinnamon_app_system_lookup_app ()

    CinnamonApp *
    cinnamon_app_system_lookup_app (CinnamonAppSystem *system,
                                    const char *id);

Find a CinnamonApp corresponding to an id.

#### Returns

The CinnamonApp for id, or `NULL` if none.

[transfer none]

### cinnamon_app_system_lookup_settings_app ()

    CinnamonApp *
    cinnamon_app_system_lookup_settings_app
                                   (CinnamonAppSystem *system,
                                    const char *id);

#### Returns

The CinnamonApp for id, or `NULL` if none OBSOLETE - ONLY LEFT IN FOR COMPATIBILITY RETURNS NULL.

[transfer none]

### cinnamon_app_system_lookup_app_by_tree_entry ()

    CinnamonApp *
    cinnamon_app_system_lookup_app_by_tree_entry
                                   (CinnamonAppSystem *system,
                                    GMenuTreeEntry *entry);

Find a CinnamonApp corresponding to a GMenuTreeEntry.

#### Parameters

system | a CinnamonAppSystem |
entry | a GMenuTreeEntry |

#### Returns

The CinnamonApp for `entry` , or `NULL` if none.

[transfer none]

### cinnamon_app_system_lookup_settings_app_by_tree_entry ()

    CinnamonApp *
    cinnamon_app_system_lookup_settings_app_by_tree_entry
                                   (CinnamonAppSystem *system,
                                    GMenuTreeEntry *entry);

#### Returns

The CinnamonApp for `entry` , or `NULL` if none OBSOLETE - ONLY LEFT IN FOR COMPATIBILITY RETURNS NULL.

[transfer none]

### cinnamon_app_system_lookup_app_for_path ()

    CinnamonApp *
    cinnamon_app_system_lookup_app_for_path
                                   (CinnamonAppSystem *system,
                                    const char *desktop_path);

Find or create a CinnamonApp corresponding to a given absolute file name which must be in the standard paths (XDG_DATA_DIRS). For files outside the datadirs, this function returns `NULL`.

#### Parameters

system | a CinnamonAppSystem |
desktop_path | UTF-8 encoded absolute file name. | [type utf8]

#### Returns

The CinnamonApp for id, or `NULL` if none.

[transfer none]

### cinnamon_app_system_lookup_heuristic_basename ()

    CinnamonApp *
    cinnamon_app_system_lookup_heuristic_basename
                                   (CinnamonAppSystem *system,
                                    const char *id);

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

#### Parameters

system | a CinnamonAppSystem |
id | Probable application identifier |

#### Returns

A CinnamonApp for `name` .

[transfer none]

### cinnamon_app_system_get_all ()

    GSList *
    cinnamon_app_system_get_all (CinnamonAppSystem *system);

#### Returns

All installed applications.

[transfer container][element-type CinnamonApp]

### cinnamon_app_system_get_running ()

    GSList *
    cinnamon_app_system_get_running (CinnamonAppSystem *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 `cinnamon_app_compare()`.

#### Parameters

self | A CinnamonAppSystem |

#### Returns

Active applications.

[element-type CinnamonApp][transfer container]

### cinnamon_app_system_initial_search ()

    GSList *
    cinnamon_app_system_initial_search (CinnamonAppSystem *system,
                                        GSList *terms);

Search through applications for the given search terms.

#### Parameters

system | A CinnamonAppSystem |
terms | List of terms, logical AND. | [element-type utf8]

#### Returns

List of applications.

[transfer container][element-type CinnamonApp]

### cinnamon_app_system_subsearch ()

    GSList *
    cinnamon_app_system_subsearch (CinnamonAppSystem *system,
                                   GSList *previous_results,
                                   GSList *terms);

Search through a previous result set; for more information, see js/ui/search.js. Note the value of `prefs` must be the same as passed to `cinnamon_app_system_initial_search()`. Note that returned strings are only valid until a return to the main loop.

#### Parameters

system | A CinnamonAppSystem |
previous_results | List of previous results. | [element-type CinnamonApp]
terms | List of terms, logical AND. | [element-type utf8]

#### Returns

List of application identifiers.

[transfer container][element-type CinnamonApp]

### cinnamon_app_system_get_settings_tree ()

    GMenuTree *
    cinnamon_app_system_get_settings_tree (CinnamonAppSystem *system);

#### Returns

The GMenuTree for apps OBSOLETE - ONLY LEFT IN FOR COMPATIBILITY RETURNS EMPTY GMenuTree.

[transfer none]

### cinnamon_app_system_search_settings ()

    GSList *
    cinnamon_app_system_search_settings (CinnamonAppSystem *system,
                                         GSList *terms);

Search through settings for the given search terms.

#### Parameters

system | A CinnamonAppSystem |
terms | List of terms, logical AND. | [element-type utf8]

#### Returns

List of setting applications.

[transfer container][element-type CinnamonApp]

### cinnamon_app_system_lookup_setting ()

    CinnamonApp *
    cinnamon_app_system_lookup_setting (CinnamonAppSystem *system,
                                        const char *id);

#### Returns

Application in gnomecc.menu, or `NULL` if none OBSOLETE - ONLY LEFT IN FOR COMPATIBILITY RETURNS NULL IF NOT FOUND IN STANDARD APPS.

[transfer none]

## Types and Values

## Signal Details

### The `“app-state-changed”` signal

    void
    user_function (CinnamonAppSystem *cinnamonappsystem,
                   CinnamonApp       *arg1,
                   gpointer           user_data)

Flags: Run Last

### The `“installed-changed”` signal

    void
    user_function (CinnamonAppSystem *cinnamonappsystem,
                   gpointer           user_data)

Flags: Run Last