## ShellWindowTracker

ShellWindowTracker — Associate windows with applications

## Functions

ShellWindowTracker * | shell_window_tracker_get_default ()
ShellApp * | shell_window_tracker_get_window_app ()
ShellApp * | shell_window_tracker_get_app_from_pid ()
GSList * | shell_window_tracker_get_startup_sequences ()
const char * | shell_startup_sequence_get_id ()
ShellApp * | shell_startup_sequence_get_app ()
const char * | shell_startup_sequence_get_name ()
gboolean | shell_startup_sequence_get_completed ()
int | shell_startup_sequence_get_workspace ()
ClutterActor * | shell_startup_sequence_create_icon ()

## Properties

ShellApp * | focus-app | Read

## Signals

void | startup-sequence-changed | Run Last
void | tracked-windows-changed | Run Last

## Object Hierarchy

        GBoxed
        ╰── ShellStartupSequence
        GObject
        ╰── ShellWindowTracker

## Description

Maintains a mapping from windows to applications (.desktop file ids). It currently implements this with some heuristics on the WM_CLASS X11 property (and some static override regexps); in the future, we want to have it also track through startup-notification.

## Functions

### shell_window_tracker_get_default ()

    ShellWindowTracker *
    shell_window_tracker_get_default (void);

#### Returns

The global ShellWindowTracker instance.

[transfer none]

### shell_window_tracker_get_window_app ()

    ShellApp *
    shell_window_tracker_get_window_app (ShellWindowTracker *tracker,
                                         MetaWindow *metawin);

#### Parameters

tracker | An app monitor instance |
metawin | A MetaWindow |

#### Returns

Application associated with window.

[transfer full]

### shell_window_tracker_get_app_from_pid ()

    ShellApp *
    shell_window_tracker_get_app_from_pid (ShellWindowTracker *tracker,
                                           int pid);

Look up the application corresponding to a process.

#### Parameters

tracker | A ShellAppSystem |
pid | A Unix process identifier |

#### Returns

A ShellApp, or `NULL` if none.

[transfer none]

### shell_window_tracker_get_startup_sequences ()

    GSList *
    shell_window_tracker_get_startup_sequences
                                   (ShellWindowTracker *tracker);

#### Returns

Currently active startup sequences.

[transfer none][element-type ShellStartupSequence]

### shell_startup_sequence_get_id ()

    const char *
    shell_startup_sequence_get_id (ShellStartupSequence *sequence);

### shell_startup_sequence_get_app ()

    ShellApp *
    shell_startup_sequence_get_app (ShellStartupSequence *sequence);

#### Parameters

sequence | A ShellStartupSequence |

#### Returns

The application being launched, or `NULL` if unknown.

[transfer none]

### shell_startup_sequence_get_name ()

    const char *
    shell_startup_sequence_get_name (ShellStartupSequence *sequence);

### shell_startup_sequence_get_completed ()

    gboolean
    shell_startup_sequence_get_completed (ShellStartupSequence *sequence);

### shell_startup_sequence_get_workspace ()

    int
    shell_startup_sequence_get_workspace (ShellStartupSequence *sequence);

### shell_startup_sequence_create_icon ()

    ClutterActor *
    shell_startup_sequence_create_icon (ShellStartupSequence *sequence,
                                        guint size);

#### Parameters

size | Size in pixels of icon |

#### Returns

A new ClutterTexture containing an icon for the sequence.

[transfer none]

## Types and Values

## Property Details

### The `“focus-app”` property

      “focus-app”                ShellApp *

Focused application.

Flags: Read

## Signal Details

### The `“startup-sequence-changed”` signal

    void
    user_function (ShellWindowTracker   *shellwindowtracker,
                   ShellStartupSequence *arg1,
                   gpointer              user_data)

Flags: Run Last

### The `“tracked-windows-changed”` signal

    void
    user_function (ShellWindowTracker *shellwindowtracker,
                   gpointer            user_data)

Flags: Run Last