ShellAppSystem

ShellAppSystem

Synopsis

struct              ShellAppSystem;
struct              ShellAppSystemClass;
ShellAppSystem *    shell_app_system_get_default        (void);
GMenuTree *         shell_app_system_get_tree           (ShellAppSystem *system);
ShellApp *          shell_app_system_lookup_app         (ShellAppSystem *system,
                                                         const char *id);
ShellApp *          shell_app_system_lookup_app_by_tree_entry
                                                        (ShellAppSystem *system,
                                                         GMenuTreeEntry *entry);
ShellApp *          shell_app_system_lookup_app_for_path
                                                        (ShellAppSystem *system,
                                                         const char *desktop_path);
ShellApp *          shell_app_system_lookup_heuristic_basename
                                                        (ShellAppSystem *system,
                                                         const char *id);
ShellApp *          shell_app_system_lookup_wmclass     (ShellAppSystem *system,
                                                         const char *wmclass);
GSList *            shell_app_system_get_running        (ShellAppSystem *self);
GSList *            shell_app_system_initial_search     (ShellAppSystem *system,
                                                         GSList *terms);
GSList *            shell_app_system_subsearch          (ShellAppSystem *system,
                                                         GSList *previous_results,
                                                         GSList *terms);
GMenuTree *         shell_app_system_get_settings_tree  (ShellAppSystem *system);
GSList *            shell_app_system_search_settings    (ShellAppSystem *system,
                                                         GSList *terms);
ShellApp *          shell_app_system_lookup_setting     (ShellAppSystem *system,
                                                         const char *id);

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_get_tree ()

GMenuTree *         shell_app_system_get_tree           (ShellAppSystem *system);

Returns :

The GMenuTree for apps. [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_app_by_tree_entry ()

ShellApp *          shell_app_system_lookup_app_by_tree_entry
                                                        (ShellAppSystem *system,
                                                         GMenuTreeEntry *entry);

Find a ShellApp corresponding to a GMenuTreeEntry.

system :

a ShellAppSystem

entry :

a GMenuTreeEntry

Returns :

The ShellApp for entry, or NULL if none. [transfer none]

shell_app_system_lookup_app_for_path ()

ShellApp *          shell_app_system_lookup_app_for_path
                                                        (ShellAppSystem *system,
                                                         const char *desktop_path);

Find or create a ShellApp 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.

system :

a ShellAppSystem

desktop_path :

UTF-8 encoded absolute file name. [type utf8]

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_wmclass ()

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

Find a valid application corresponding to a WM_CLASS value.

system :

a ShellAppSystem

wmclass :

A WM_CLASS value

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]

shell_app_system_initial_search ()

GSList *            shell_app_system_initial_search     (ShellAppSystem *system,
                                                         GSList *terms);

Search through applications for the given search terms.

system :

A ShellAppSystem

terms :

List of terms, logical AND. [element-type utf8]

Returns :

List of applications. [transfer container][element-type ShellApp]

shell_app_system_subsearch ()

GSList *            shell_app_system_subsearch          (ShellAppSystem *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 shell_app_system_initial_search(). Note that returned strings are only valid until a return to the main loop.

system :

A ShellAppSystem

previous_results :

List of previous results. [element-type ShellApp]

terms :

List of terms, logical AND. [element-type utf8]

Returns :

List of application identifiers. [transfer container][element-type ShellApp]

shell_app_system_get_settings_tree ()

GMenuTree *         shell_app_system_get_settings_tree  (ShellAppSystem *system);

Returns :

The GMenuTree for apps. [transfer none]

shell_app_system_search_settings ()

GSList *            shell_app_system_search_settings    (ShellAppSystem *system,
                                                         GSList *terms);

Search through settings for the given search terms.

system :

A ShellAppSystem

terms :

List of terms, logical AND. [element-type utf8]

Returns :

List of setting applications. [transfer container][element-type ShellApp]

shell_app_system_lookup_setting ()

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

id :

desktop file id

Returns :

Application in gnomecc.menu, or NULL if none. [transfer none]

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