WnckScreen

## WnckScreen WnckScreen |

## Synopsis

                        WnckApplication;
                        WnckClassGroup;
                        WnckWindow;
                        WnckWorkspace;
                        WnckScreenPrivate;
    WnckScreen*         wnck_screen_get_default             (void);
    WnckScreen*         wnck_screen_get                     (int index);
    WnckScreen*         wnck_screen_get_for_root            (gulong root_window_id);
    WnckWorkspace*      wnck_screen_get_workspace           (WnckScreen *screen,
                                                             int workspace);
    WnckWorkspace*      wnck_screen_get_active_workspace    (WnckScreen *screen);
    WnckWindow*         wnck_screen_get_active_window       (WnckScreen *screen);
    WnckWindow*         wnck_screen_get_previously_active_window
                                                            (WnckScreen *screen);
    GList*              wnck_screen_get_windows             (WnckScreen *screen);
    GList*              wnck_screen_get_windows_stacked     (WnckScreen *screen);
    void                wnck_screen_force_update            (WnckScreen *screen);
    int                 wnck_screen_get_workspace_count     (WnckScreen *screen);
    void                wnck_screen_change_workspace_count  (WnckScreen *screen,
                                                             int count);
    gboolean            wnck_screen_net_wm_supports         (WnckScreen *screen,
                                                             const char *atom);
    gulong              wnck_screen_get_background_pixmap   (WnckScreen *screen);
    int                 wnck_screen_get_width               (WnckScreen *screen);
    int                 wnck_screen_get_height              (WnckScreen *screen);
    gboolean            wnck_screen_get_showing_desktop     (WnckScreen *screen);
    void                wnck_screen_toggle_showing_desktop  (WnckScreen *screen,
                                                             gboolean show);
    void                wnck_screen_move_viewport           (WnckScreen *screen,
                                                             int x,
                                                             int y);
    int                 wnck_screen_try_set_workspace_layout
                                                            (WnckScreen *screen,
                                                             int current_token,
                                                             int rows,
                                                             int columns);
    void                wnck_screen_release_workspace_layout
                                                            (WnckScreen *screen,
                                                             int current_token);

## Description

## Details

### WnckApplication

    typedef struct {
      GObject parent_instance;

      WnckApplicationPrivate *priv;
    } WnckApplication;

### WnckClassGroup

    typedef struct {
      GObject parent_instance;

      WnckClassGroupPrivate *priv;
    } WnckClassGroup;

### WnckWindow

    typedef struct {
      GObject parent_instance;

      WnckWindowPrivate *priv;
    } WnckWindow;

### WnckWorkspace

    typedef struct {
      GObject parent_instance;

      WnckWorkspacePrivate *priv;
    } WnckWorkspace;

### WnckScreenPrivate

    typedef struct _WnckScreenPrivate WnckScreenPrivate;

### wnck_screen_get_default ()

    WnckScreen*         wnck_screen_get_default             (void);

Returns : |

### wnck_screen_get ()

    WnckScreen*         wnck_screen_get                     (int index);

Gets the WnckScreen for a given screen on the default display. Creates the WnckScreen if necessary.

`index` : | screen number, starting from 0, as for Xlib
Returns : | the WnckScreen for screen `index`

### wnck_screen_get_for_root ()

    WnckScreen*         wnck_screen_get_for_root            (gulong root_window_id);

Gets the WnckScreen for the root window at `root_window_id`, or returns `NULL` if no WnckScreen exists for this root window. Never creates a new WnckScreen, unlike `wnck_screen_get()`.

`root_window_id` : | an Xlib window ID
Returns : | WnckScreen or `NULL`

### wnck_screen_get_workspace ()

    WnckWorkspace*      wnck_screen_get_workspace           (WnckScreen *screen,
                                                             int workspace);

Gets the workspace numbered `workspace` for screen `screen`, or returns `NULL` if no such workspace exists.

`screen` : | a WnckScreen
`workspace` : | a workspace index
Returns : | the workspace, or `NULL`

### wnck_screen_get_active_workspace ()

    WnckWorkspace*      wnck_screen_get_active_workspace    (WnckScreen *screen);

Gets the active workspace. May return `NULL` sometimes, if we are in a weird state due to the asynchronous nature of our interaction with the window manager.

`screen` : | a WnckScreen
Returns : | active workspace or `NULL`

### wnck_screen_get_active_window ()

    WnckWindow*         wnck_screen_get_active_window       (WnckScreen *screen);

Gets the active window. May return `NULL` sometimes, since not all window managers guarantee that a window is always active.

`screen` : | a WnckScreen
Returns : | active window or `NULL`

### wnck_screen_get_previously_active_window ()

    WnckWindow*         wnck_screen_get_previously_active_window
                                                            (WnckScreen *screen);

Gets the previously active window. May return `NULL` sometimes, since not all window managers guarantee that a window is always active.

`screen` : | a WnckScreen
Returns : | previously active window or `NULL`

### wnck_screen_get_windows ()

    GList*              wnck_screen_get_windows             (WnckScreen *screen);

Gets the screen's list of windows. The list is not copied and should not be freed. The list is not in a defined order, but should be "stable" (windows shouldn't reorder themselves in it). (However, the stability of the list is established by the window manager, so don't blame libwnck if it breaks down.)

`screen` : | a WnckScreen
Returns : | reference to list of windows

### wnck_screen_get_windows_stacked ()

    GList*              wnck_screen_get_windows_stacked     (WnckScreen *screen);

Gets the screen's list of windows in bottom-to-top order. The list is not copied and should not be freed.

`screen` : | a WnckScreen
Returns : | reference to list of windows in stacking order

### wnck_screen_force_update ()

    void                wnck_screen_force_update            (WnckScreen *screen);

Synchronously and immediately update the window list. This is usually a bad idea for both performance and correctness reasons (to get things right, you need to write model-view code that tracks changes, not get a static list of open windows).

`screen` : | a WnckScreen

### wnck_screen_get_workspace_count ()

    int                 wnck_screen_get_workspace_count     (WnckScreen *screen);

Gets the number of workspaces.

`screen` : | a WnckScreen
Returns : | number of workspaces

### wnck_screen_change_workspace_count ()

    void                wnck_screen_change_workspace_count  (WnckScreen *screen,
                                                             int count);

Asks the window manager to change the number of workspaces.

`screen` : | a WnckScreen
`count` : | requested count

### wnck_screen_net_wm_supports ()

    gboolean            wnck_screen_net_wm_supports         (WnckScreen *screen,
                                                             const char *atom);

`screen` : |
`atom` : |
Returns : |

### wnck_screen_get_background_pixmap ()

    gulong              wnck_screen_get_background_pixmap   (WnckScreen *screen);

`screen` : |
Returns : |

### wnck_screen_get_width ()

    int                 wnck_screen_get_width               (WnckScreen *screen);

`screen` : |
Returns : |

### wnck_screen_get_height ()

    int                 wnck_screen_get_height              (WnckScreen *screen);

`screen` : |
Returns : |

### wnck_screen_get_showing_desktop ()

    gboolean            wnck_screen_get_showing_desktop     (WnckScreen *screen);

`screen` : |
Returns : |

### wnck_screen_toggle_showing_desktop ()

    void                wnck_screen_toggle_showing_desktop  (WnckScreen *screen,
                                                             gboolean show);

`screen` : |
`show` : |

### wnck_screen_move_viewport ()

    void                wnck_screen_move_viewport           (WnckScreen *screen,
                                                             int x,
                                                             int y);

Ask window manager to move the viewport of the current workspace.

`screen` : | a WnckScreen
`x` : | X offset of viewport
`y` : | Y offset of viewport

### wnck_screen_try_set_workspace_layout ()

    int                 wnck_screen_try_set_workspace_layout
                                                            (WnckScreen *screen,
                                                             int current_token,
                                                             int rows,
                                                             int columns);

`screen` : |
`current_token` : |
`rows` : |
`columns` : |
Returns : |

### wnck_screen_release_workspace_layout ()

    void                wnck_screen_release_workspace_layout
                                                            (WnckScreen *screen,
                                                             int current_token);

`screen` : |
`current_token` : |