WnckWindow

WnckWindow — an object representing a window.

Stability Level

Unstable, unless otherwise indicated

Synopsis

#include <libwnck/libwnck.h>

                    WnckWindow;
WnckWindow *        wnck_window_get                     (gulong xwindow);
WnckScreen *        wnck_window_get_screen              (WnckWindow *window);
gboolean            wnck_window_has_name                (WnckWindow *window);
const char *        wnck_window_get_name                (WnckWindow *window);
gboolean            wnck_window_has_icon_name           (WnckWindow *window);
const char *        wnck_window_get_icon_name           (WnckWindow *window);
gboolean            wnck_window_get_icon_is_fallback    (WnckWindow *window);
GdkPixbuf *         wnck_window_get_icon                (WnckWindow *window);
GdkPixbuf *         wnck_window_get_mini_icon           (WnckWindow *window);
WnckApplication *   wnck_window_get_application         (WnckWindow *window);
WnckWindow *        wnck_window_get_transient           (WnckWindow *window);
gulong              wnck_window_get_group_leader        (WnckWindow *window);
gulong              wnck_window_get_xid                 (WnckWindow *window);
WnckClassGroup *    wnck_window_get_class_group         (WnckWindow *window);
const char *        wnck_window_get_session_id          (WnckWindow *window);
const char *        wnck_window_get_session_id_utf8     (WnckWindow *window);
int                 wnck_window_get_pid                 (WnckWindow *window);
gint                wnck_window_get_sort_order          (WnckWindow *window);
void                wnck_window_set_sort_order          (WnckWindow *window,
                                                         gint order);
enum                WnckWindowType;
WnckWindowType      wnck_window_get_window_type         (WnckWindow *window);
void                wnck_window_set_window_type         (WnckWindow *window,
                                                         WnckWindowType wintype);
enum                WnckWindowState;
WnckWindowState     wnck_window_get_state               (WnckWindow *window);
gboolean            wnck_window_is_minimized            (WnckWindow *window);
gboolean            wnck_window_is_maximized_horizontally
                                                        (WnckWindow *window);
gboolean            wnck_window_is_maximized_vertically (WnckWindow *window);
gboolean            wnck_window_is_maximized            (WnckWindow *window);
gboolean            wnck_window_is_shaded               (WnckWindow *window);
gboolean            wnck_window_is_pinned               (WnckWindow *window);
gboolean            wnck_window_is_sticky               (WnckWindow *window);
gboolean            wnck_window_is_above                (WnckWindow *window);
gboolean            wnck_window_is_below                (WnckWindow *window);
gboolean            wnck_window_is_skip_pager           (WnckWindow *window);
gboolean            wnck_window_is_skip_tasklist        (WnckWindow *window);
gboolean            wnck_window_is_fullscreen           (WnckWindow *window);
gboolean            wnck_window_needs_attention         (WnckWindow *window);
gboolean            wnck_window_or_transient_needs_attention
                                                        (WnckWindow *window);
enum                WnckWindowActions;
WnckWindowActions   wnck_window_get_actions             (WnckWindow *window);
void                wnck_window_minimize                (WnckWindow *window);
void                wnck_window_unminimize              (WnckWindow *window,
                                                         guint32 timestamp);
void                wnck_window_maximize_horizontally   (WnckWindow *window);
void                wnck_window_unmaximize_horizontally (WnckWindow *window);
void                wnck_window_maximize_vertically     (WnckWindow *window);
void                wnck_window_unmaximize_vertically   (WnckWindow *window);
void                wnck_window_maximize                (WnckWindow *window);
void                wnck_window_unmaximize              (WnckWindow *window);
void                wnck_window_shade                   (WnckWindow *window);
void                wnck_window_unshade                 (WnckWindow *window);
void                wnck_window_pin                     (WnckWindow *window);
void                wnck_window_unpin                   (WnckWindow *window);
void                wnck_window_stick                   (WnckWindow *window);
void                wnck_window_unstick                 (WnckWindow *window);
void                wnck_window_make_above              (WnckWindow *window);
void                wnck_window_unmake_above            (WnckWindow *window);
void                wnck_window_make_below              (WnckWindow *window);
void                wnck_window_unmake_below            (WnckWindow *window);
void                wnck_window_set_skip_pager          (WnckWindow *window,
                                                         gboolean skip);
void                wnck_window_set_skip_tasklist       (WnckWindow *window,
                                                         gboolean skip);
void                wnck_window_set_fullscreen          (WnckWindow *window,
                                                         gboolean fullscreen);
void                wnck_window_close                   (WnckWindow *window,
                                                         guint32 timestamp);
WnckWorkspace *     wnck_window_get_workspace           (WnckWindow *window);
gboolean            wnck_window_is_on_workspace         (WnckWindow *window,
                                                         WnckWorkspace *workspace);
gboolean            wnck_window_is_visible_on_workspace (WnckWindow *window,
                                                         WnckWorkspace *workspace);
void                wnck_window_move_to_workspace       (WnckWindow *window,
                                                         WnckWorkspace *space);
gboolean            wnck_window_is_in_viewport          (WnckWindow *window,
                                                         WnckWorkspace *workspace);
void                wnck_window_activate                (WnckWindow *window,
                                                         guint32 timestamp);
gboolean            wnck_window_is_active               (WnckWindow *window);
gboolean            wnck_window_is_most_recently_activated
                                                        (WnckWindow *window);
void                wnck_window_activate_transient      (WnckWindow *window,
                                                         guint32 timestamp);
gboolean            wnck_window_transient_is_most_recently_activated
                                                        (WnckWindow *window);
void                wnck_window_set_icon_geometry       (WnckWindow *window,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height);
enum                WnckWindowGravity;
enum                WnckWindowMoveResizeMask;
void                wnck_window_get_client_window_geometry
                                                        (WnckWindow *window,
                                                         int *xp,
                                                         int *yp,
                                                         int *widthp,
                                                         int *heightp);
void                wnck_window_get_geometry            (WnckWindow *window,
                                                         int *xp,
                                                         int *yp,
                                                         int *widthp,
                                                         int *heightp);
void                wnck_window_set_geometry            (WnckWindow *window,
                                                         WnckWindowGravity gravity,
                                                         WnckWindowMoveResizeMask geometry_mask,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height);
void                wnck_window_keyboard_move           (WnckWindow *window);
void                wnck_window_keyboard_size           (WnckWindow *window);

Object Hierarchy

  GObject
   +----WnckWindow

Signals

  "actions-changed"                                : Run Last
  "geometry-changed"                               : Run Last
  "icon-changed"                                   : Run Last
  "name-changed"                                   : Run Last
  "state-changed"                                  : Run Last
  "workspace-changed"                              : Run Last

Description

The WnckWindow objects are always owned by libwnck and must not be referenced or unreferenced.

Details

WnckWindow

typedef struct _WnckWindow WnckWindow;

The WnckWindow struct contains only private fields and should not be directly accessed.


wnck_window_get ()

WnckWindow *        wnck_window_get                     (gulong xwindow);

Gets a preexisting WnckWindow for the X window xwindow. This will not create a WnckWindow if none exists. The function is robust against bogus window IDs.

xwindow :

an X window ID.

Returns :

the WnckWindow for xwindow. The returned WnckWindow is owned by libwnck and must not be referenced or unreferenced. [transfer none]

wnck_window_get_screen ()

WnckScreen *        wnck_window_get_screen              (WnckWindow *window);

Gets the WnckScreen window is on.

window :

a WnckWindow.

Returns :

the WnckScreen window is on. The returned WnckScreen is owned by libwnck and must not be referenced or unreferenced. [transfer none]

wnck_window_has_name ()

gboolean            wnck_window_has_name                (WnckWindow *window);

Checks whether or not window has a name. wnck_window_get_name() will always return some value, even if window has no name set; wnck_window_has_name() can be used to tell if that name is real or not.

For icons titles, use wnck_window_has_icon_name() instead.

window :

a WnckWindow.

Returns :

TRUE if wnck_window_get_name() returns window's name, FALSE if it returns a fallback name.

Since 2.16


wnck_window_get_name ()

const char *        wnck_window_get_name                (WnckWindow *window);

Gets the name of window, as it should be displayed in a pager or tasklist. Always returns some value, even if window has no name set; use wnck_window_has_name() if you need to know whether the returned name is "real" or not.

For icons titles, use wnck_window_get_icon_name() instead.

window :

a WnckWindow.

Returns :

the name of window, or a fallback name if no name is available.

wnck_window_has_icon_name ()

gboolean            wnck_window_has_icon_name           (WnckWindow *window);

Checks whether or not window has an icon name. wnck_window_get_icon_name() will always return some value, even if window has no icon name set; wnck_window_has_icon_name() can be used to tell if that icon name is real or not.

(Note that if wnck_window_has_icon_name() returns FALSE, but wnck_window_has_name() returns TRUE, then the name returned by wnck_window_get_icon_name() is window's name. Only when both methods return FALSE does wnck_window_get_icon_name() return a generic fallback name.)

window :

a WnckWindow

Returns :

TRUE if wnck_window_get_icon_name() returns window's icon name, FALSE if it returns a fallback name.

Since 2.16


wnck_window_get_icon_name ()

const char *        wnck_window_get_icon_name           (WnckWindow *window);

Gets the icon name of window, as it should be displayed for an icon (minimized state). Always returns some value, even if window has no icon name set; use wnck_window_has_icon_name() if you need to know whether the returned icon name is "real" or not.

Contrast with wnck_window_get_name(), which returns window's title, not its icon title.

window :

a WnckWindow

Returns :

the icon name of window, or a fallback icon name if no icon name is available.

wnck_window_get_icon_is_fallback ()

gboolean            wnck_window_get_icon_is_fallback    (WnckWindow *window);

Gets whether a default fallback icon is used for window (because none was set on window).

window :

a WnckWindow.

Returns :

TRUE if the icon for window is a fallback, FALSE otherwise.

wnck_window_get_icon ()

GdkPixbuf *         wnck_window_get_icon                (WnckWindow *window);

Gets the icon to be used for window. If no icon was found, a fallback icon is used. wnck_window_get_icon_is_fallback() can be used to tell if the icon is the fallback icon.

window :

a WnckWindow.

Returns :

the icon for window. The caller should reference the returned GdkPixbuf if it needs to keep the icon around.

wnck_window_get_mini_icon ()

GdkPixbuf *         wnck_window_get_mini_icon           (WnckWindow *window);

Gets the mini-icon to be used for window. If no mini-icon was found, a fallback mini-icon is used. wnck_window_get_icon_is_fallback() can be used to tell if the mini-icon is the fallback mini-icon.

window :

a WnckWindow.

Returns :

the mini-icon for window. The caller should reference the returned GdkPixbuf if it needs to keep the icon around.

wnck_window_get_application ()

WnckApplication *   wnck_window_get_application         (WnckWindow *window);

Gets the WnckApplication to which window belongs.

window :

a WnckWindow.

Returns :

the WnckApplication to which window belongs. The returned WnckApplication is owned by libwnck and must not be referenced or unreferenced. [transfer none]

wnck_window_get_transient ()

WnckWindow *        wnck_window_get_transient           (WnckWindow *window);

Gets the WnckWindow for which window is transient.

window :

a WnckWindow.

Returns :

the WnckWindow for which window is transient, or NULL if window is not transient for any WnckWindow.

Since 2.12


wnck_window_get_group_leader ()

gulong              wnck_window_get_group_leader        (WnckWindow *window);

Gets the group leader of the group of windows to which window belongs.

window :

a WnckWindow.

Returns :

the group leader of the group of windows to which window belongs, or the X window ID of window if window does not belong to any group.

wnck_window_get_xid ()

gulong              wnck_window_get_xid                 (WnckWindow *window);

Gets the X window ID of window.

window :

a WnckWindow.

Returns :

the X window ID of window.

wnck_window_get_class_group ()

WnckClassGroup *    wnck_window_get_class_group         (WnckWindow *window);

Gets the WnckClassGroup to which window belongs.

window :

a WnckWindow.

Returns :

the WnckClassGroup to which window belongs. The returned WnckClassGroup is owned by libwnck and must not be referenced or unreferenced. [transfer none]

Since 2.2


wnck_window_get_session_id ()

const char *        wnck_window_get_session_id          (WnckWindow *window);

Gets the session ID for window in Latin-1 encoding. NOTE: this is invalid UTF-8. You can't display this string in a GTK+ widget without converting to UTF-8. See wnck_window_get_session_id_utf8().

window :

a WnckWindow.

Returns :

the session ID for window in Latin-1, or NULL if window has no session ID.

wnck_window_get_session_id_utf8 ()

const char *        wnck_window_get_session_id_utf8     (WnckWindow *window);

Gets the session ID for window in UTF-8 encoding. The session ID should be in Latin-1 encoding, so the conversion should work, but a broken client could set a session ID that might not be convertable to UTF-8.

window :

a WnckWindow.

Returns :

the session ID for window in UTF-8, or NULL if window has no session ID.

wnck_window_get_pid ()

int                 wnck_window_get_pid                 (WnckWindow *window);

Gets the process ID of window.

window :

a WnckWindow.

Returns :

the process ID of window, or 0 if none is available.

wnck_window_get_sort_order ()

gint                wnck_window_get_sort_order          (WnckWindow *window);

Gets the sort order of window, used for ordering of window in WnckSelector and WnckTasklist. The sort order is an internal state in libwnck. The initial value is defined when the window is created.

window :

a WnckWindow.

Returns :

the sort order of window, or G_MAXINT if none is available.

Since 2.10


wnck_window_set_sort_order ()

void                wnck_window_set_sort_order          (WnckWindow *window,
                                                         gint order);

Sets the sort order of window. The sort order is used for ordering of window in WnckSelector and WnckTasklist.

window :

a WnckWindow.

order :

new sort order for window.

Since 2.20


enum WnckWindowType

typedef enum
{
  WNCK_WINDOW_NORMAL,       /* document/app window */
  WNCK_WINDOW_DESKTOP,      /* desktop background */
  WNCK_WINDOW_DOCK,         /* panel */
  WNCK_WINDOW_DIALOG,       /* dialog */
  WNCK_WINDOW_TOOLBAR,      /* tearoff toolbar */
  WNCK_WINDOW_MENU,         /* tearoff menu */
  WNCK_WINDOW_UTILITY,      /* palette/toolbox window */
  WNCK_WINDOW_SPLASHSCREEN  /* splash screen */
} WnckWindowType;

Type describing the semantic type of a WnckWindow.

WNCK_WINDOW_NORMAL

the window is a normal window.

WNCK_WINDOW_DESKTOP

the window is a desktop.

WNCK_WINDOW_DOCK

the window is a dock or a panel.

WNCK_WINDOW_DIALOG

the window is a dialog window.

WNCK_WINDOW_TOOLBAR

the window is a tearoff toolbar.

WNCK_WINDOW_MENU

the window is a tearoff menu.

WNCK_WINDOW_UTILITY

the window is a small persistent utility window, such as a palette or toolbox.

WNCK_WINDOW_SPLASHSCREEN

the window is a splash screen displayed as an application is starting up.

wnck_window_get_window_type ()

WnckWindowType      wnck_window_get_window_type         (WnckWindow *window);

Gets the semantic type of window.

window :

a WnckWindow.

Returns :

the semantic type of window.

wnck_window_set_window_type ()

void                wnck_window_set_window_type         (WnckWindow *window,
                                                         WnckWindowType wintype);

Sets the semantic type of window to wintype.

window :

a WnckWindow.

wintype :

a semantic type.

Since 2.12


enum WnckWindowState

typedef enum
{
  WNCK_WINDOW_STATE_MINIMIZED              = 1 << 0,
  WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY = 1 << 1,
  WNCK_WINDOW_STATE_MAXIMIZED_VERTICALLY   = 1 << 2,
  WNCK_WINDOW_STATE_SHADED                 = 1 << 3,
  WNCK_WINDOW_STATE_SKIP_PAGER             = 1 << 4,
  WNCK_WINDOW_STATE_SKIP_TASKLIST          = 1 << 5,
  WNCK_WINDOW_STATE_STICKY                 = 1 << 6,
  WNCK_WINDOW_STATE_HIDDEN                 = 1 << 7,
  WNCK_WINDOW_STATE_FULLSCREEN             = 1 << 8,
  WNCK_WINDOW_STATE_DEMANDS_ATTENTION      = 1 << 9,
  WNCK_WINDOW_STATE_URGENT                 = 1 << 10,
  WNCK_WINDOW_STATE_ABOVE                  = 1 << 11,
  WNCK_WINDOW_STATE_BELOW                  = 1 << 12
} WnckWindowState;

Type used as a bitmask to describe the state of a WnckWindow.

WNCK_WINDOW_STATE_MINIMIZED

the window is minimized.

WNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY

the window is horizontically maximized.

WNCK_WINDOW_STATE_MAXIMIZED_VERTICALLY

the window is vertically maximized.

WNCK_WINDOW_STATE_SHADED

the window is shaded.

WNCK_WINDOW_STATE_SKIP_PAGER

the window should not be included on pagers.

WNCK_WINDOW_STATE_SKIP_TASKLIST

the window should not be included on tasklists.

WNCK_WINDOW_STATE_STICKY

the window is sticky (see wnck_window_is_sticky()).

WNCK_WINDOW_STATE_HIDDEN

the window is not visible on its WnckWorkspace and viewport (when minimized, for example).

WNCK_WINDOW_STATE_FULLSCREEN

the window is fullscreen.

WNCK_WINDOW_STATE_DEMANDS_ATTENTION

the window needs attention (because the window requested activation but the window manager refused it, for example).

WNCK_WINDOW_STATE_URGENT

the window requires a response from the user.

WNCK_WINDOW_STATE_ABOVE

the window is above other windows (see wnck_window_make_above()).

WNCK_WINDOW_STATE_BELOW

the window is below other windows (see wnck_window_make_below()).

wnck_window_get_state ()

WnckWindowState     wnck_window_get_state               (WnckWindow *window);

Gets the state of window.

window :

a WnckWindow.

Returns :

bitmask of active states for window.

wnck_window_is_minimized ()

gboolean            wnck_window_is_minimized            (WnckWindow *window);

Gets whether window is minimized. Minimization state may change anytime a "state-changed" signal gets emitted.

window :

a WnckWindow.

Returns :

TRUE if window is minimized, FALSE otherwise.

wnck_window_is_maximized_horizontally ()

gboolean            wnck_window_is_maximized_horizontally
                                                        (WnckWindow *window);

Gets whether window is maximized horizontally. Horizontal maximization state may change anytime a "state-changed" signal gets emitted.

window :

a WnckWindow.

Returns :

TRUE if window is maximized horizontally, FALSE otherwise.

wnck_window_is_maximized_vertically ()

gboolean            wnck_window_is_maximized_vertically (WnckWindow *window);

Gets whether window is maximized vertically. vertiVal maximization state may change anytime a "state-changed" signal gets emitted.

window :

a WnckWindow.

Returns :

TRUE if window is maximized vertically, FALSE otherwise.

wnck_window_is_maximized ()

gboolean            wnck_window_is_maximized            (WnckWindow *window);

Gets whether window is maximized. Maximization state may change anytime a "state-changed" signal gets emitted.

As for GDK, "maximized" means both vertically and horizontally. If window is maximized in only one direction, then window is not considered maximized.

window :

a WnckWindow.

Returns :

TRUE if window is maximized in both directions, FALSE otherwise.

wnck_window_is_shaded ()

gboolean            wnck_window_is_shaded               (WnckWindow *window);

Gets whether window is shaded. Shade state may change anytime a "state-changed" signal gets emitted.

window :

a WnckWindow.

Returns :

TRUE if window is shaded, FALSE otherwise.

wnck_window_is_pinned ()

gboolean            wnck_window_is_pinned               (WnckWindow *window);

Gets whether window is on all workspace. Pinned state may change anytime a "workspace-changed" signal gets emitted, but not when a "state-changed" gets emitted.

window :

a WnckWindow.

Returns :

TRUE if window is on all workspaces, FALSE otherwise.

wnck_window_is_sticky ()

gboolean            wnck_window_is_sticky               (WnckWindow *window);

Gets whether window is sticky. Sticky state may change anytime a "state-changed" signal gets emitted.

Sticky here means "stuck to the glass", i.e. does not scroll with the viewport. In GDK/GTK+ (e.g. gdk_window_stick()/gtk_window_stick()), sticky means "stuck to the glass" and also that the window is on all workspaces. But here it only means the viewport aspect of it.

window :

a WnckWindow.

Returns :

TRUE if window is "stuck to the glass", FALSE otherwise.

wnck_window_is_above ()

gboolean            wnck_window_is_above                (WnckWindow *window);

Gets whether window is above other windows. This state may change anytime a "state-changed" signal gets emitted.

See wnck_window_make_above() for more details on this state.

window :

a WnckWindow.

Returns :

TRUE if window is above other windows, FALSE otherwise.

Since 2.14


wnck_window_is_below ()

gboolean            wnck_window_is_below                (WnckWindow *window);

Gets whether window is below other windows. This state may change anytime a "state-changed" signal gets emitted.

See wnck_window_make_below() for more details on this state.

window :

a WnckWindow.

Returns :

TRUE if window is below other windows, FALSE otherwise.

Since 2.20


wnck_window_is_skip_pager ()

gboolean            wnck_window_is_skip_pager           (WnckWindow *window);

Gets whether window is included on pagers. This state may change anytime a "state-changed" signal gets emitted.

window :

a WnckWindow.

Returns :

TRUE if window is included on pagers, FALSE otherwise.

wnck_window_is_skip_tasklist ()

gboolean            wnck_window_is_skip_tasklist        (WnckWindow *window);

Gets whether window is included on tasklists. This state may change anytime a "state-changed" signal gets emitted.

window :

a WnckWindow.

Returns :

TRUE if window is included on tasklists, FALSE otherwise.

wnck_window_is_fullscreen ()

gboolean            wnck_window_is_fullscreen           (WnckWindow *window);

Gets whether window is fullscreen. Fullscreen state may change anytime a "state-changed" signal gets emitted.

window :

a WnckWindow.

Returns :

TRUE if window is fullscreen, FALSE otherwise.

Since 2.8


wnck_window_needs_attention ()

gboolean            wnck_window_needs_attention         (WnckWindow *window);

Gets whether window needs attention. This state may change anytime a "state-changed" signal gets emitted.

This state depends on flags such as the demands_attention and is_urgent hints.

window :

a WnckWindow.

Returns :

TRUE if window needs attention, FALSE otherwise.

Since 2.12


wnck_window_or_transient_needs_attention ()

gboolean            wnck_window_or_transient_needs_attention
                                                        (WnckWindow *window);

Gets whether window or one of its transients needs attention. This state may change anytime a "state-changed" signal gets emitted.

window :

a WnckWindow.

Returns :

TRUE if window or one of its transients needs attention, FALSE otherwise.

Since 2.12


enum WnckWindowActions

typedef enum
{
  WNCK_WINDOW_ACTION_MOVE                    = 1 << 0,
  WNCK_WINDOW_ACTION_RESIZE                  = 1 << 1,
  WNCK_WINDOW_ACTION_SHADE                   = 1 << 2,
  WNCK_WINDOW_ACTION_STICK                   = 1 << 3,
  WNCK_WINDOW_ACTION_MAXIMIZE_HORIZONTALLY   = 1 << 4,
  WNCK_WINDOW_ACTION_MAXIMIZE_VERTICALLY     = 1 << 5,
  WNCK_WINDOW_ACTION_CHANGE_WORKSPACE        = 1 << 6, /* includes pin/unpin */
  WNCK_WINDOW_ACTION_CLOSE                   = 1 << 7,
  WNCK_WINDOW_ACTION_UNMAXIMIZE_HORIZONTALLY = 1 << 8,
  WNCK_WINDOW_ACTION_UNMAXIMIZE_VERTICALLY   = 1 << 9,
  WNCK_WINDOW_ACTION_UNSHADE                 = 1 << 10,
  WNCK_WINDOW_ACTION_UNSTICK                 = 1 << 11,
  WNCK_WINDOW_ACTION_MINIMIZE                = 1 << 12,
  WNCK_WINDOW_ACTION_UNMINIMIZE              = 1 << 13,
  WNCK_WINDOW_ACTION_MAXIMIZE                = 1 << 14,
  WNCK_WINDOW_ACTION_UNMAXIMIZE              = 1 << 15,
  WNCK_WINDOW_ACTION_FULLSCREEN              = 1 << 16,
  WNCK_WINDOW_ACTION_ABOVE                   = 1 << 17,
  WNCK_WINDOW_ACTION_BELOW                   = 1 << 18
} WnckWindowActions;

Type used as a bitmask to describe the actions that can be done for a WnckWindow.

WNCK_WINDOW_ACTION_MOVE

the window may be moved around the screen.

WNCK_WINDOW_ACTION_RESIZE

the window may be resized.

WNCK_WINDOW_ACTION_SHADE

the window may be shaded.

WNCK_WINDOW_ACTION_STICK

the window may be sticked.

WNCK_WINDOW_ACTION_MAXIMIZE_HORIZONTALLY

the window may be maximized horizontally.

WNCK_WINDOW_ACTION_MAXIMIZE_VERTICALLY

the window may be maximized vertically.

WNCK_WINDOW_ACTION_CHANGE_WORKSPACE

the window may be moved between workspaces, or (un)pinned.

WNCK_WINDOW_ACTION_CLOSE

the window may be closed.

WNCK_WINDOW_ACTION_UNMAXIMIZE_HORIZONTALLY

the window may be unmaximized horizontally.

WNCK_WINDOW_ACTION_UNMAXIMIZE_VERTICALLY

the window may be maximized vertically.

WNCK_WINDOW_ACTION_UNSHADE

the window may be unshaded.

WNCK_WINDOW_ACTION_UNSTICK

the window may be unsticked.

WNCK_WINDOW_ACTION_MINIMIZE

the window may be minimized.

WNCK_WINDOW_ACTION_UNMINIMIZE

the window may be unminimized.

WNCK_WINDOW_ACTION_MAXIMIZE

the window may be maximized.

WNCK_WINDOW_ACTION_UNMAXIMIZE

the window may be unmaximized.

WNCK_WINDOW_ACTION_FULLSCREEN

the window may be brought to fullscreen.

WNCK_WINDOW_ACTION_ABOVE

the window may be made above other windows.

WNCK_WINDOW_ACTION_BELOW

the window may be made below other windows.

wnck_window_get_actions ()

WnckWindowActions   wnck_window_get_actions             (WnckWindow *window);

Gets the actions that can be done for window.

window :

a WnckWindow.

Returns :

bitmask of actions that can be done for window.

wnck_window_minimize ()

void                wnck_window_minimize                (WnckWindow *window);

Minimizes window.

window :

a WnckWindow.

wnck_window_unminimize ()

void                wnck_window_unminimize              (WnckWindow *window,
                                                         guint32 timestamp);

Unminimizes window by activating it or one of its transients. See wnck_window_activate_transient() for details on how the activation is done.

window :

a WnckWindow.

timestamp :

the X server timestamp of the user interaction event that caused this call to occur.

wnck_window_maximize_horizontally ()

void                wnck_window_maximize_horizontally   (WnckWindow *window);

Asks the window manager to maximize horizontally window.

window :

a WnckWindow.

wnck_window_unmaximize_horizontally ()

void                wnck_window_unmaximize_horizontally (WnckWindow *window);

Asks the window manager to unmaximize horizontally window.

window :

a WnckWindow.

wnck_window_maximize_vertically ()

void                wnck_window_maximize_vertically     (WnckWindow *window);

Asks the window manager to maximize vertically window.

window :

a WnckWindow.

wnck_window_unmaximize_vertically ()

void                wnck_window_unmaximize_vertically   (WnckWindow *window);

Asks the window manager to unmaximize vertically window.

window :

a WnckWindow.

wnck_window_maximize ()

void                wnck_window_maximize                (WnckWindow *window);

Asks the window manager to maximize window.

window :

a WnckWindow.

wnck_window_unmaximize ()

void                wnck_window_unmaximize              (WnckWindow *window);

Asks the window manager to unmaximize window.

window :

a WnckWindow.

wnck_window_shade ()

void                wnck_window_shade                   (WnckWindow *window);

Asks the window manager to shade window.

window :

a WnckWindow.

wnck_window_unshade ()

void                wnck_window_unshade                 (WnckWindow *window);

Asks the window manager to unshade window.

window :

a WnckWindow.

wnck_window_pin ()

void                wnck_window_pin                     (WnckWindow *window);

Asks the window manager to put window on all workspaces.

window :

a WnckWindow.

wnck_window_unpin ()

void                wnck_window_unpin                   (WnckWindow *window);

Asks the window manager to put window only in the currently active workspace, if window was previously pinned. If window was not pinned, does not change window's workspace. If the active workspace is not known for some reason (it should not happen much), sets window's workspace to the first workspace.

window :

a WnckWindow.

wnck_window_stick ()

void                wnck_window_stick                   (WnckWindow *window);

Asks the window manager to keep the window's position fixed on the screen, even when the workspace or viewport scrolls.

window :

a WnckWindow.

wnck_window_unstick ()

void                wnck_window_unstick                 (WnckWindow *window);

Asks the window manager to not have window's position fixed on the screen when the workspace or viewport scrolls.

window :

a WnckWindow.

wnck_window_make_above ()

void                wnck_window_make_above              (WnckWindow *window);

Asks the window manager to put window on top of most windows (window will not be on top of focused fullscreen windows, of other windows with this setting and of dock windows).

window :

a WnckWindow.

Since 2.14


wnck_window_unmake_above ()

void                wnck_window_unmake_above            (WnckWindow *window);

Asks the window manager to not put window on top of most windows, and to put it again in the stack with other windows.

window :

a WnckWindow.

Since 2.14


wnck_window_make_below ()

void                wnck_window_make_below              (WnckWindow *window);

Asks the window manager to put window below most windows.

window :

a WnckWindow.

Since 2.20


wnck_window_unmake_below ()

void                wnck_window_unmake_below            (WnckWindow *window);

Asks the window manager to not put window below most windows, and to put it again in the stack with other windows.

window :

a WnckWindow.

Since 2.20


wnck_window_set_skip_pager ()

void                wnck_window_set_skip_pager          (WnckWindow *window,
                                                         gboolean skip);

Asks the window manager to make window included or not included on pagers.

window :

a WnckWindow.

skip :

whether window should be included on pagers.

wnck_window_set_skip_tasklist ()

void                wnck_window_set_skip_tasklist       (WnckWindow *window,
                                                         gboolean skip);

Asks the window manager to make window included or not included on tasklists.

window :

a WnckWindow.

skip :

whether window should be included on tasklists.

wnck_window_set_fullscreen ()

void                wnck_window_set_fullscreen          (WnckWindow *window,
                                                         gboolean fullscreen);

Asks the window manager to set the fullscreen state of window according to fullscreen.

window :

a WnckWindow.

fullscreen :

whether to make window fullscreen.

Since 2.8


wnck_window_close ()

void                wnck_window_close                   (WnckWindow *window,
                                                         guint32 timestamp);

Closes window.

This function existed before 2.6, but the timestamp argument was missing in earlier versions.

window :

a WnckWindow.

timestamp :

the X server timestamp of the user interaction event that caused this call to occur.

Since 2.6


wnck_window_get_workspace ()

WnckWorkspace *     wnck_window_get_workspace           (WnckWindow *window);

Gets the current workspace window is on. If the window is pinned (on all workspaces), or not on any workspaces, NULL may be returned.

window :

a WnckWindow.

Returns :

the single current workspace window is on, or NULL. The returned WnckWorkspace is owned by libwnck and must not be referenced or unreferenced. [transfer none]

wnck_window_is_on_workspace ()

gboolean            wnck_window_is_on_workspace         (WnckWindow *window,
                                                         WnckWorkspace *workspace);

Gets whether window appears on workspace.

window :

a WnckWindow.

workspace :

a WnckWorkspace.

Returns :

TRUE if window appears on workspace, FALSE otherwise.

wnck_window_is_visible_on_workspace ()

gboolean            wnck_window_is_visible_on_workspace (WnckWindow *window,
                                                         WnckWorkspace *workspace);

Like wnck_window_is_on_workspace(), but also checks that the window is in a visible state (i.e. not minimized or shaded).

window :

a WnckWindow.

workspace :

a WnckWorkspace.

Returns :

TRUE if window appears on workspace in normal state, FALSE otherwise.

wnck_window_move_to_workspace ()

void                wnck_window_move_to_workspace       (WnckWindow *window,
                                                         WnckWorkspace *space);

Asks the window manager to move window to space. If window was pinned, it will also result in window being visible only on space.

window :

a WnckWindow.

space :

a WnckWorkspace.

wnck_window_is_in_viewport ()

gboolean            wnck_window_is_in_viewport          (WnckWindow *window,
                                                         WnckWorkspace *workspace);

Gets TRUE if window appears in the current viewport of workspace.

window :

a WnckWindow.

workspace :

a WnckWorkspace.

Returns :

TRUE if window appears in current viewport of workspace, FALSE otherwise.

Since 2.4


wnck_window_activate ()

void                wnck_window_activate                (WnckWindow *window,
                                                         guint32 timestamp);

Asks the window manager to make window the active window. The window manager may choose to raise window along with focusing it, and may decide to refuse the request (to not steal the focus if there is a more recent user activity, for example).

This function existed before 2.10, but the timestamp argument was missing in earlier versions.

window :

a WnckWindow.

timestamp :

the X server timestamp of the user interaction event that caused this call to occur.

Since 2.10


wnck_window_is_active ()

gboolean            wnck_window_is_active               (WnckWindow *window);

Gets whether window is the active window on its WnckScreen.

window :

a WnckWindow.

Returns :

TRUE if window is the active window on its WnckScreen, FALSE otherwise.

wnck_window_is_most_recently_activated ()

gboolean            wnck_window_is_most_recently_activated
                                                        (WnckWindow *window);

Gets whether window is the most recently activated window on its WnckScreen.

The most recently activated window is identical to the active window for click and sloppy focus methods (since a window is always active in those cases) but differs slightly for mouse focus since there often is no active window.

window :

a WnckWindow.

Returns :

TRUE if window was the most recently activated window on its WnckScreen, FALSE otherwise.

Since 2.8


wnck_window_activate_transient ()

void                wnck_window_activate_transient      (WnckWindow *window,
                                                         guint32 timestamp);

If window has transients, activates the most likely transient instead of the window itself. Otherwise activates window.

FIXME the ideal behavior of this function is probably to activate the most recently active window among window and its transients. This is probably best implemented on the window manager side.

This function existed before 2.10, but the timestamp argument was missing in earlier versions.

window :

a WnckWindow.

timestamp :

the X server timestamp of the user interaction event that caused this call to occur.

Since 2.10


wnck_window_transient_is_most_recently_activated ()

gboolean            wnck_window_transient_is_most_recently_activated
                                                        (WnckWindow *window);

Gets whether one of the transients of window is the most recently activated window. See wnck_window_is_most_recently_activated() for a more complete description of what is meant by most recently activated. This function is needed because clicking on a WnckTasklist once will activate a transient instead of window itself (wnck_window_activate_transient), and clicking again should minimize window and its transients. (Not doing this can be especially annoying in the case of modal dialogs that don't appear in the WnckTaslist).

window :

a WnckWindow.

Returns :

TRUE if one of the transients of window is the most recently activated window, FALSE otherwise.

Since 2.12


wnck_window_set_icon_geometry ()

void                wnck_window_set_icon_geometry       (WnckWindow *window,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height);

Sets the icon geometry for window. A typical use case for this is the destination of the minimization animation of window.

window :

a WnckWindow.

x :

X coordinate in pixels.

y :

Y coordinate in pixels.

width :

width in pixels.

height :

height in pixels.

enum WnckWindowGravity

typedef enum
{
  WNCK_WINDOW_GRAVITY_CURRENT   = 0,
  WNCK_WINDOW_GRAVITY_NORTHWEST = 1,
  WNCK_WINDOW_GRAVITY_NORTH     = 2,
  WNCK_WINDOW_GRAVITY_NORTHEAST = 3,
  WNCK_WINDOW_GRAVITY_WEST      = 4,
  WNCK_WINDOW_GRAVITY_CENTER    = 5,
  WNCK_WINDOW_GRAVITY_EAST      = 6,
  WNCK_WINDOW_GRAVITY_SOUTHWEST = 7,
  WNCK_WINDOW_GRAVITY_SOUTH     = 8,
  WNCK_WINDOW_GRAVITY_SOUTHEAST = 9,
  WNCK_WINDOW_GRAVITY_STATIC    = 10
} WnckWindowGravity;

Flag used when changing the geometry of a WnckWindow. This is the gravity point to use as a reference for the new position.

WNCK_WINDOW_GRAVITY_CURRENT

keep the current gravity point.

WNCK_WINDOW_GRAVITY_NORTHWEST

use the left top corner of the frame window as gravity point.

WNCK_WINDOW_GRAVITY_NORTH

use the center of the frame window's top side as gravity point.

WNCK_WINDOW_GRAVITY_NORTHEAST

use the right top corner of the frame window as gravity point.

WNCK_WINDOW_GRAVITY_WEST

use the center of the frame window's left side as gravity point.

WNCK_WINDOW_GRAVITY_CENTER

use the center of the frame window as gravity point.

WNCK_WINDOW_GRAVITY_EAST

use the center of the frame window's right side as gravity point.

WNCK_WINDOW_GRAVITY_SOUTHWEST

use the left bottom corner of the frame window as gravity point.

WNCK_WINDOW_GRAVITY_SOUTH

use the center of the frame window's bottom side as gravity point.

WNCK_WINDOW_GRAVITY_SOUTHEAST

use the right bottom corner of the frame window as gravity point.

WNCK_WINDOW_GRAVITY_STATIC

use the left top corner of the client window as gravity point.

Since 2.16


enum WnckWindowMoveResizeMask

typedef enum
{
  WNCK_WINDOW_CHANGE_X      = 1 << 0,
  WNCK_WINDOW_CHANGE_Y      = 1 << 1,
  WNCK_WINDOW_CHANGE_WIDTH  = 1 << 2,
  WNCK_WINDOW_CHANGE_HEIGHT = 1 << 3
} WnckWindowMoveResizeMask;

Flag used as a bitmask when changing the geometry of a WnckWindow. This indicates which part of the geometry should be changed.

WNCK_WINDOW_CHANGE_X

X coordinate of the window should be changed.

WNCK_WINDOW_CHANGE_Y

Y coordinate of the window should be changed.

WNCK_WINDOW_CHANGE_WIDTH

width of the window should be changed.

WNCK_WINDOW_CHANGE_HEIGHT

height of the window should be changed.

Since 2.16


wnck_window_get_client_window_geometry ()

void                wnck_window_get_client_window_geometry
                                                        (WnckWindow *window,
                                                         int *xp,
                                                         int *yp,
                                                         int *widthp,
                                                         int *heightp);

Gets the size and position of window, as last received in a ConfigureNotify event (i.e. this call does not round-trip to the server, just gets the last size we were notified of). The X and Y coordinates are relative to the root window.

The window manager usually adds a frame around windows. If you need to know the size of window with the frame, use wnck_window_get_geometry().

window :

a WnckWindow.

xp :

return location for X coordinate in pixels of window.

yp :

return location for Y coordinate in pixels of window.

widthp :

return location for width in pixels of window.

heightp :

return location for height in pixels of window.

Since 2.20


wnck_window_get_geometry ()

void                wnck_window_get_geometry            (WnckWindow *window,
                                                         int *xp,
                                                         int *yp,
                                                         int *widthp,
                                                         int *heightp);

Gets the size and position of window, including decorations. This function uses the information last received in a ConfigureNotify event and adjusts it according to the size of the frame that is added by the window manager (this call does not round-trip to the server, it just gets the last sizes that were notified). The X and Y coordinates are relative to the root window.

If you need to know the actual size of window ignoring the frame added by the window manager, use wnck_window_get_client_window_geometry().

window :

a WnckWindow.

xp :

return location for X coordinate in pixels of window.

yp :

return location for Y coordinate in pixels of window.

widthp :

return location for width in pixels of window.

heightp :

return location for height in pixels of window.

wnck_window_set_geometry ()

void                wnck_window_set_geometry            (WnckWindow *window,
                                                         WnckWindowGravity gravity,
                                                         WnckWindowMoveResizeMask geometry_mask,
                                                         int x,
                                                         int y,
                                                         int width,
                                                         int height);

Sets the size and position of window. The X and Y coordinates should be relative to the root window.

Note that the new size and position apply to window with its frame added by the window manager. Therefore, using wnck_window_set_geometry() with the values returned by wnck_window_get_geometry() should be a no-op, while using wnck_window_set_geometry() with the values returned by wnck_window_get_client_window_geometry() should reduce the size of window and move it.

window :

a WnckWindow.

gravity :

the gravity point to use as a reference for the new position.

geometry_mask :

a bitmask containing flags for what should be set.

x :

new X coordinate in pixels of window.

y :

new Y coordinate in pixels of window.

width :

new width in pixels of window.

height :

new height in pixels of window.

Since 2.16


wnck_window_keyboard_move ()

void                wnck_window_keyboard_move           (WnckWindow *window);

Asks the window manager to start moving window via the keyboard.

window :

a WnckWindow.

wnck_window_keyboard_size ()

void                wnck_window_keyboard_size           (WnckWindow *window);

Asks the window manager to start resizing window via the keyboard.

window :

a WnckWindow.

Signal Details

The "actions-changed" signal

void                user_function                      (WnckWindow       *window,
                                                        WnckWindowActions changed_mask,
                                                        WnckWindowActions new_state,
                                                        gpointer          user_data)         : Run Last

Emitted when the actions availabilities for window change.

window :

the WnckWindow which emitted the signal.

changed_mask :

the bitmask containing bits set for all actions availabilities for window that have changed.

new_state :

the new actions availabilities for window.

user_data :

user data set when the signal handler was connected.

The "geometry-changed" signal

void                user_function                      (WnckWindow *window,
                                                        gpointer    user_data)      : Run Last

Emitted when the geometry of window changes.

window :

the WnckWindow which emitted the signal.

user_data :

user data set when the signal handler was connected.

The "icon-changed" signal

void                user_function                      (WnckWindow *window,
                                                        gpointer    user_data)      : Run Last

Emitted when the icon of window changes.

window :

the WnckWindow which emitted the signal.

user_data :

user data set when the signal handler was connected.

The "name-changed" signal

void                user_function                      (WnckWindow *window,
                                                        gpointer    user_data)      : Run Last

Emitted when the name of window changes.

window :

the WnckWindow which emitted the signal.

user_data :

user data set when the signal handler was connected.

The "state-changed" signal

void                user_function                      (WnckWindow     *window,
                                                        WnckWindowState changed_mask,
                                                        WnckWindowState new_state,
                                                        gpointer        user_data)         : Run Last

Emitted when the state of window changes. This can happen when window is (un)minimized, (un)maximized, (un)sticked, (un)shaded, (un)made above, (un)made below, (un)set fullscreen, when it needs attention, etc. See WnckWindowState for the complete list of states that might have changed.

window :

the WnckWindow which emitted the signal.

changed_mask :

the bitmask containing bits set for all states of window that have changed.

new_state :

the new state of window.

user_data :

user data set when the signal handler was connected.

The "workspace-changed" signal

void                user_function                      (WnckWindow *window,
                                                        gpointer    user_data)      : Run Last

Emitted when the current workspace of window changes, or if window has been pinned or unpinned.

window :

the WnckWindow which emitted the signal.

user_data :

user data set when the signal handler was connected.

See Also

WnckWorkspace, WnckApplication, WnckClassGroup