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);
GSList *            shell_app_system_initial_search     (ShellAppSystem *system,
                                                         GSList *terms);
GSList *            shell_app_system_subsearch          (ShellAppSystem *system,
                                                         GSList *previous_results,
                                                         GSList *terms);

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]

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 utf8]

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 that returned strings are only valid until a return to the main loop.

system :

A ShellAppSystem

previous_results :

List of previous results. [element-type utf8]

terms :

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

Returns :

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

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