![]() |
![]() |
![]() |
Libmatewnck Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
#include <libmatewnck/libmatewnck.h> MatewnckWindow; MatewnckWindow * matewnck_window_get (gulong xwindow
); MatewnckScreen * matewnck_window_get_screen (MatewnckWindow *window
); gboolean matewnck_window_has_name (MatewnckWindow *window
); const char * matewnck_window_get_name (MatewnckWindow *window
); gboolean matewnck_window_has_icon_name (MatewnckWindow *window
); const char * matewnck_window_get_icon_name (MatewnckWindow *window
); gboolean matewnck_window_get_icon_is_fallback (MatewnckWindow *window
); GdkPixbuf * matewnck_window_get_icon (MatewnckWindow *window
); GdkPixbuf * matewnck_window_get_mini_icon (MatewnckWindow *window
); MatewnckApplication * matewnck_window_get_application (MatewnckWindow *window
); MatewnckWindow * matewnck_window_get_transient (MatewnckWindow *window
); gulong matewnck_window_get_group_leader (MatewnckWindow *window
); gulong matewnck_window_get_xid (MatewnckWindow *window
); MatewnckClassGroup * matewnck_window_get_class_group (MatewnckWindow *window
); const char * matewnck_window_get_session_id (MatewnckWindow *window
); const char * matewnck_window_get_session_id_utf8 (MatewnckWindow *window
); int matewnck_window_get_pid (MatewnckWindow *window
); gint matewnck_window_get_sort_order (MatewnckWindow *window
); void matewnck_window_set_sort_order (MatewnckWindow *window
,gint order
); enum MatewnckWindowType; MatewnckWindowType matewnck_window_get_window_type (MatewnckWindow *window
); void matewnck_window_set_window_type (MatewnckWindow *window
,MatewnckWindowType wintype
); enum MatewnckWindowState; MatewnckWindowState matewnck_window_get_state (MatewnckWindow *window
); gboolean matewnck_window_is_minimized (MatewnckWindow *window
); gboolean matewnck_window_is_maximized_horizontally (MatewnckWindow *window
); gboolean matewnck_window_is_maximized_vertically (MatewnckWindow *window
); gboolean matewnck_window_is_maximized (MatewnckWindow *window
); gboolean matewnck_window_is_shaded (MatewnckWindow *window
); gboolean matewnck_window_is_pinned (MatewnckWindow *window
); gboolean matewnck_window_is_sticky (MatewnckWindow *window
); gboolean matewnck_window_is_above (MatewnckWindow *window
); gboolean matewnck_window_is_below (MatewnckWindow *window
); gboolean matewnck_window_is_skip_pager (MatewnckWindow *window
); gboolean matewnck_window_is_skip_tasklist (MatewnckWindow *window
); gboolean matewnck_window_is_fullscreen (MatewnckWindow *window
); gboolean matewnck_window_needs_attention (MatewnckWindow *window
); gboolean matewnck_window_or_transient_needs_attention (MatewnckWindow *window
); enum MatewnckWindowActions; MatewnckWindowActions matewnck_window_get_actions (MatewnckWindow *window
); void matewnck_window_minimize (MatewnckWindow *window
); void matewnck_window_unminimize (MatewnckWindow *window
,guint32 timestamp
); void matewnck_window_maximize_horizontally (MatewnckWindow *window
); void matewnck_window_unmaximize_horizontally (MatewnckWindow *window
); void matewnck_window_maximize_vertically (MatewnckWindow *window
); void matewnck_window_unmaximize_vertically (MatewnckWindow *window
); void matewnck_window_maximize (MatewnckWindow *window
); void matewnck_window_unmaximize (MatewnckWindow *window
); void matewnck_window_shade (MatewnckWindow *window
); void matewnck_window_unshade (MatewnckWindow *window
); void matewnck_window_pin (MatewnckWindow *window
); void matewnck_window_unpin (MatewnckWindow *window
); void matewnck_window_stick (MatewnckWindow *window
); void matewnck_window_unstick (MatewnckWindow *window
); void matewnck_window_make_above (MatewnckWindow *window
); void matewnck_window_unmake_above (MatewnckWindow *window
); void matewnck_window_make_below (MatewnckWindow *window
); void matewnck_window_unmake_below (MatewnckWindow *window
); void matewnck_window_set_skip_pager (MatewnckWindow *window
,gboolean skip
); void matewnck_window_set_skip_tasklist (MatewnckWindow *window
,gboolean skip
); void matewnck_window_set_fullscreen (MatewnckWindow *window
,gboolean fullscreen
); void matewnck_window_close (MatewnckWindow *window
,guint32 timestamp
); MatewnckWorkspace * matewnck_window_get_workspace (MatewnckWindow *window
); gboolean matewnck_window_is_on_workspace (MatewnckWindow *window
,MatewnckWorkspace *workspace
); gboolean matewnck_window_is_visible_on_workspace (MatewnckWindow *window
,MatewnckWorkspace *workspace
); void matewnck_window_move_to_workspace (MatewnckWindow *window
,MatewnckWorkspace *space
); gboolean matewnck_window_is_in_viewport (MatewnckWindow *window
,MatewnckWorkspace *workspace
); void matewnck_window_activate (MatewnckWindow *window
,guint32 timestamp
); gboolean matewnck_window_is_active (MatewnckWindow *window
); gboolean matewnck_window_is_most_recently_activated (MatewnckWindow *window
); void matewnck_window_activate_transient (MatewnckWindow *window
,guint32 timestamp
); gboolean matewnck_window_transient_is_most_recently_activated (MatewnckWindow *window
); void matewnck_window_set_icon_geometry (MatewnckWindow *window
,int x
,int y
,int width
,int height
); enum MatewnckWindowGravity; enum MatewnckWindowMoveResizeMask; void matewnck_window_get_client_window_geometry (MatewnckWindow *window
,int *xp
,int *yp
,int *widthp
,int *heightp
); void matewnck_window_get_geometry (MatewnckWindow *window
,int *xp
,int *yp
,int *widthp
,int *heightp
); void matewnck_window_set_geometry (MatewnckWindow *window
,MatewnckWindowGravity gravity
,MatewnckWindowMoveResizeMask geometry_mask
,int x
,int y
,int width
,int height
); void matewnck_window_keyboard_move (MatewnckWindow *window
); void matewnck_window_keyboard_size (MatewnckWindow *window
);
"actions-changed" :Run Last
"geometry-changed" :Run Last
"icon-changed" :Run Last
"name-changed" :Run Last
"state-changed" :Run Last
"workspace-changed" :Run Last
The MatewnckWindow objects are always owned by libmatewnck and must not be referenced or unreferenced.
typedef struct _MatewnckWindow MatewnckWindow;
The MatewnckWindow struct contains only private fields and should not be directly accessed.
MatewnckWindow * matewnck_window_get (gulong xwindow
);
Gets a preexisting MatewnckWindow for the X window xwindow
. This will not
create a MatewnckWindow if none exists. The function is robust against bogus
window IDs.
|
an X window ID. |
Returns : |
the MatewnckWindow for xwindow . The returned
MatewnckWindow is owned by libmatewnck and must not be referenced or unreferenced. [transfer none]
|
MatewnckScreen * matewnck_window_get_screen (MatewnckWindow *window
);
Gets the MatewnckScreen window
is on.
|
a MatewnckWindow. |
Returns : |
the MatewnckScreen window is on. The returned
MatewnckScreen is owned by libmatewnck and must not be referenced or unreferenced. [transfer none]
|
gboolean matewnck_window_has_name (MatewnckWindow *window
);
Checks whether or not window
has a name. matewnck_window_get_name()
will always return some value, even if window
has no name set;
matewnck_window_has_name()
can be used to tell if that name is
real or not.
For icons titles, use matewnck_window_has_icon_name()
instead.
|
a MatewnckWindow. |
Returns : |
TRUE if matewnck_window_get_name() returns window 's
name, FALSE if it returns a fallback name. |
Since 2.16
const char * matewnck_window_get_name (MatewnckWindow *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 matewnck_window_has_name()
if you need to know whether the returned
name is "real" or not.
For icons titles, use matewnck_window_get_icon_name()
instead.
|
a MatewnckWindow. |
Returns : |
the name of window , or a fallback name if no name is
available. |
gboolean matewnck_window_has_icon_name (MatewnckWindow *window
);
Checks whether or not window
has an icon name.
matewnck_window_get_icon_name()
will always return some value, even if
window
has no icon name set; matewnck_window_has_icon_name()
can
be used to tell if that icon name is real or not.
(Note that if matewnck_window_has_icon_name()
returns FALSE
, but
matewnck_window_has_name()
returns TRUE
, then the name returned by
matewnck_window_get_icon_name()
is window
's name. Only when both
methods return FALSE
does matewnck_window_get_icon_name()
return a
generic fallback name.)
|
a MatewnckWindow |
Returns : |
TRUE if matewnck_window_get_icon_name() returns
window 's icon name, FALSE if it returns a fallback name. |
Since 2.16
const char * matewnck_window_get_icon_name (MatewnckWindow *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 matewnck_window_has_icon_name()
if you need to know whether the
returned icon name is "real" or not.
Contrast with matewnck_window_get_name()
, which returns window
's
title, not its icon title.
|
a MatewnckWindow |
Returns : |
the icon name of window , or a fallback icon name if no icon
name is available. |
gboolean matewnck_window_get_icon_is_fallback
(MatewnckWindow *window
);
Gets whether a default fallback icon is used for window
(because none
was set on window
).
|
a MatewnckWindow. |
Returns : |
TRUE if the icon for window is a fallback, FALSE otherwise. |
GdkPixbuf * matewnck_window_get_icon (MatewnckWindow *window
);
Gets the icon to be used for window
. If no icon was found, a fallback
icon is used. matewnck_window_get_icon_is_fallback()
can be used to tell if the
icon is the fallback icon.
|
a MatewnckWindow. |
Returns : |
the icon for window . The caller should reference the
returned GdkPixbuf if it needs to keep the icon
around. |
GdkPixbuf * matewnck_window_get_mini_icon (MatewnckWindow *window
);
Gets the mini-icon to be used for window
. If no mini-icon was found, a
fallback mini-icon is used. matewnck_window_get_icon_is_fallback()
can be used
to tell if the mini-icon is the fallback mini-icon.
|
a MatewnckWindow. |
Returns : |
the mini-icon for window . The caller should reference the
returned GdkPixbuf if it needs to keep the icon
around. |
MatewnckApplication * matewnck_window_get_application (MatewnckWindow *window
);
Gets the MatewnckApplication to which window
belongs.
|
a MatewnckWindow. |
Returns : |
the MatewnckApplication to which window belongs.
The returned MatewnckApplication is owned by libmatewnck and must not be referenced
or unreferenced. [transfer none]
|
MatewnckWindow * matewnck_window_get_transient (MatewnckWindow *window
);
Gets the MatewnckWindow for which window
is transient.
|
a MatewnckWindow. |
Returns : |
the MatewnckWindow for which window is transient, or NULL if
window is not transient for any MatewnckWindow. |
Since 2.12
gulong matewnck_window_get_group_leader (MatewnckWindow *window
);
Gets the group leader of the group of windows to which window
belongs.
|
a MatewnckWindow. |
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. |
gulong matewnck_window_get_xid (MatewnckWindow *window
);
Gets the X window ID of window
.
|
a MatewnckWindow. |
Returns : |
the X window ID of window . |
MatewnckClassGroup * matewnck_window_get_class_group (MatewnckWindow *window
);
Gets the MatewnckClassGroup to which window
belongs.
|
a MatewnckWindow. |
Returns : |
the MatewnckClassGroup to which window belongs.
The returned MatewnckClassGroup is owned by libmatewnck and must not be referenced
or unreferenced. [transfer none]
|
Since 2.2
const char * matewnck_window_get_session_id (MatewnckWindow *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 matewnck_window_get_session_id_utf8()
.
|
a MatewnckWindow. |
Returns : |
the session ID for window in Latin-1, or NULL if window has
no session ID. |
const char * matewnck_window_get_session_id_utf8 (MatewnckWindow *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.
|
a MatewnckWindow. |
Returns : |
the session ID for window in UTF-8, or NULL if window has
no session ID. |
int matewnck_window_get_pid (MatewnckWindow *window
);
Gets the process ID of window
.
|
a MatewnckWindow. |
Returns : |
the process ID of window , or 0 if none is available. |
gint matewnck_window_get_sort_order (MatewnckWindow *window
);
Gets the sort order of window
, used for ordering of window
in
MatewnckSelector and MatewnckTasklist. The sort order is an internal state in
libmatewnck. The initial value is defined when the window is created.
|
a MatewnckWindow. |
Returns : |
the sort order of window , or G_MAXINT if none is available. |
Since 2.10
void matewnck_window_set_sort_order (MatewnckWindow *window
,gint order
);
Sets the sort order of window
. The sort order is used for ordering of
window
in MatewnckSelector and MatewnckTasklist.
|
a MatewnckWindow. |
|
new sort order for window . |
Since 2.20
typedef enum { MATEWNCK_WINDOW_NORMAL, /* document/app window */ MATEWNCK_WINDOW_DESKTOP, /* desktop background */ MATEWNCK_WINDOW_DOCK, /* panel */ MATEWNCK_WINDOW_DIALOG, /* dialog */ MATEWNCK_WINDOW_TOOLBAR, /* tearoff toolbar */ MATEWNCK_WINDOW_MENU, /* tearoff menu */ MATEWNCK_WINDOW_UTILITY, /* palette/toolbox window */ MATEWNCK_WINDOW_SPLASHSCREEN /* splash screen */ } MatewnckWindowType;
Type describing the semantic type of a MatewnckWindow.
the window is a normal window. | |
the window is a desktop. | |
the window is a dock or a panel. | |
the window is a dialog window. | |
the window is a tearoff toolbar. | |
the window is a tearoff menu. | |
the window is a small persistent utility window, such as a palette or toolbox. | |
the window is a splash screen displayed as an application is starting up. |
MatewnckWindowType matewnck_window_get_window_type (MatewnckWindow *window
);
Gets the semantic type of window
.
|
a MatewnckWindow. |
Returns : |
the semantic type of window . |
void matewnck_window_set_window_type (MatewnckWindow *window
,MatewnckWindowType wintype
);
Sets the semantic type of window
to wintype
.
|
a MatewnckWindow. |
|
a semantic type. |
Since 2.12
typedef enum { MATEWNCK_WINDOW_STATE_MINIMIZED = 1 << 0, MATEWNCK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY = 1 << 1, MATEWNCK_WINDOW_STATE_MAXIMIZED_VERTICALLY = 1 << 2, MATEWNCK_WINDOW_STATE_SHADED = 1 << 3, MATEWNCK_WINDOW_STATE_SKIP_PAGER = 1 << 4, MATEWNCK_WINDOW_STATE_SKIP_TASKLIST = 1 << 5, MATEWNCK_WINDOW_STATE_STICKY = 1 << 6, MATEWNCK_WINDOW_STATE_HIDDEN = 1 << 7, MATEWNCK_WINDOW_STATE_FULLSCREEN = 1 << 8, MATEWNCK_WINDOW_STATE_DEMANDS_ATTENTION = 1 << 9, MATEWNCK_WINDOW_STATE_URGENT = 1 << 10, MATEWNCK_WINDOW_STATE_ABOVE = 1 << 11, MATEWNCK_WINDOW_STATE_BELOW = 1 << 12 } MatewnckWindowState;
Type used as a bitmask to describe the state of a MatewnckWindow.
the window is minimized. | |
the window is horizontically maximized. | |
the window is vertically maximized. | |
the window is shaded. | |
the window should not be included on pagers. | |
the window should not be included on tasklists. | |
the window is sticky (see
matewnck_window_is_sticky() ).
|
|
the window is not visible on its MatewnckWorkspace and viewport (when minimized, for example). | |
the window is fullscreen. | |
the window needs attention (because the window requested activation but the window manager refused it, for example). | |
the window requires a response from the user. | |
the window is above other windows (see
matewnck_window_make_above() ).
|
|
the window is below other windows (see
matewnck_window_make_below() ).
|
MatewnckWindowState matewnck_window_get_state (MatewnckWindow *window
);
Gets the state of window
.
|
a MatewnckWindow. |
Returns : |
bitmask of active states for window . |
gboolean matewnck_window_is_minimized (MatewnckWindow *window
);
Gets whether window
is minimized. Minimization state may change anytime
a "state-changed" signal gets emitted.
|
a MatewnckWindow. |
Returns : |
TRUE if window is minimized, FALSE otherwise. |
gboolean matewnck_window_is_maximized_horizontally
(MatewnckWindow *window
);
Gets whether window
is maximized horizontally. Horizontal maximization
state may change anytime a "state-changed" signal gets emitted.
|
a MatewnckWindow. |
Returns : |
TRUE if window is maximized horizontally, FALSE otherwise. |
gboolean matewnck_window_is_maximized_vertically
(MatewnckWindow *window
);
Gets whether window
is maximized vertically. vertiVal maximization
state may change anytime a "state-changed" signal gets emitted.
|
a MatewnckWindow. |
Returns : |
TRUE if window is maximized vertically, FALSE otherwise. |
gboolean matewnck_window_is_maximized (MatewnckWindow *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.
|
a MatewnckWindow. |
Returns : |
TRUE if window is maximized in both directions, FALSE
otherwise. |
gboolean matewnck_window_is_shaded (MatewnckWindow *window
);
Gets whether window
is shaded. Shade state may change anytime
a "state-changed" signal gets emitted.
|
a MatewnckWindow. |
Returns : |
TRUE if window is shaded, FALSE otherwise. |
gboolean matewnck_window_is_pinned (MatewnckWindow *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.
|
a MatewnckWindow. |
Returns : |
TRUE if window is on all workspaces, FALSE otherwise. |
gboolean matewnck_window_is_sticky (MatewnckWindow *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.
|
a MatewnckWindow. |
Returns : |
TRUE if window is "stuck to the glass", FALSE otherwise. |
gboolean matewnck_window_is_above (MatewnckWindow *window
);
Gets whether window
is above other windows. This state may change
anytime a "state-changed" signal gets emitted.
See matewnck_window_make_above()
for more details on this state.
|
a MatewnckWindow. |
Returns : |
TRUE if window is above other windows, FALSE otherwise. |
Since 2.14
gboolean matewnck_window_is_below (MatewnckWindow *window
);
Gets whether window
is below other windows. This state may change
anytime a "state-changed" signal gets emitted.
See matewnck_window_make_below()
for more details on this state.
|
a MatewnckWindow. |
Returns : |
TRUE if window is below other windows, FALSE otherwise. |
Since 2.20
gboolean matewnck_window_is_skip_pager (MatewnckWindow *window
);
Gets whether window
is included on pagers. This state may change
anytime a "state-changed" signal gets emitted.
|
a MatewnckWindow. |
Returns : |
TRUE if window is included on pagers, FALSE otherwise. |
gboolean matewnck_window_is_skip_tasklist (MatewnckWindow *window
);
Gets whether window
is included on tasklists. This state may change
anytime a "state-changed" signal gets emitted.
|
a MatewnckWindow. |
Returns : |
TRUE if window is included on tasklists, FALSE otherwise. |
gboolean matewnck_window_is_fullscreen (MatewnckWindow *window
);
Gets whether window
is fullscreen. Fullscreen state may change
anytime a "state-changed" signal gets emitted.
|
a MatewnckWindow. |
Returns : |
TRUE if window is fullscreen, FALSE otherwise. |
Since 2.8
gboolean matewnck_window_needs_attention (MatewnckWindow *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.
|
a MatewnckWindow. |
Returns : |
TRUE if window needs attention, FALSE otherwise. |
Since 2.12
gboolean matewnck_window_or_transient_needs_attention
(MatewnckWindow *window
);
Gets whether window
or one of its transients needs attention. This state
may change anytime a "state-changed" signal gets emitted.
|
a MatewnckWindow. |
Returns : |
TRUE if window or one of its transients needs attention,
FALSE otherwise. |
Since 2.12
typedef enum { MATEWNCK_WINDOW_ACTION_MOVE = 1 << 0, MATEWNCK_WINDOW_ACTION_RESIZE = 1 << 1, MATEWNCK_WINDOW_ACTION_SHADE = 1 << 2, MATEWNCK_WINDOW_ACTION_STICK = 1 << 3, MATEWNCK_WINDOW_ACTION_MAXIMIZE_HORIZONTALLY = 1 << 4, MATEWNCK_WINDOW_ACTION_MAXIMIZE_VERTICALLY = 1 << 5, MATEWNCK_WINDOW_ACTION_CHANGE_WORKSPACE = 1 << 6, /* includes pin/unpin */ MATEWNCK_WINDOW_ACTION_CLOSE = 1 << 7, MATEWNCK_WINDOW_ACTION_UNMAXIMIZE_HORIZONTALLY = 1 << 8, MATEWNCK_WINDOW_ACTION_UNMAXIMIZE_VERTICALLY = 1 << 9, MATEWNCK_WINDOW_ACTION_UNSHADE = 1 << 10, MATEWNCK_WINDOW_ACTION_UNSTICK = 1 << 11, MATEWNCK_WINDOW_ACTION_MINIMIZE = 1 << 12, MATEWNCK_WINDOW_ACTION_UNMINIMIZE = 1 << 13, MATEWNCK_WINDOW_ACTION_MAXIMIZE = 1 << 14, MATEWNCK_WINDOW_ACTION_UNMAXIMIZE = 1 << 15, MATEWNCK_WINDOW_ACTION_FULLSCREEN = 1 << 16, MATEWNCK_WINDOW_ACTION_ABOVE = 1 << 17, MATEWNCK_WINDOW_ACTION_BELOW = 1 << 18 } MatewnckWindowActions;
Type used as a bitmask to describe the actions that can be done for a MatewnckWindow.
the window may be moved around the screen. | |
the window may be resized. | |
the window may be shaded. | |
the window may be sticked. | |
the window may be maximized horizontally. | |
the window may be maximized vertically. | |
the window may be moved between workspaces, or (un)pinned. | |
the window may be closed. | |
the window may be unmaximized horizontally. | |
the window may be maximized vertically. | |
the window may be unshaded. | |
the window may be unsticked. | |
the window may be minimized. | |
the window may be unminimized. | |
the window may be maximized. | |
the window may be unmaximized. | |
the window may be brought to fullscreen. | |
the window may be made above other windows. | |
the window may be made below other windows. |
MatewnckWindowActions matewnck_window_get_actions (MatewnckWindow *window
);
Gets the actions that can be done for window
.
|
a MatewnckWindow. |
Returns : |
bitmask of actions that can be done for window . |
void matewnck_window_minimize (MatewnckWindow *window
);
Minimizes window
.
|
a MatewnckWindow. |
void matewnck_window_unminimize (MatewnckWindow *window
,guint32 timestamp
);
Unminimizes window
by activating it or one of its transients. See
matewnck_window_activate_transient()
for details on how the activation is done.
|
a MatewnckWindow. |
|
the X server timestamp of the user interaction event that caused this call to occur. |
void matewnck_window_maximize_horizontally
(MatewnckWindow *window
);
Asks the window manager to maximize horizontally window
.
|
a MatewnckWindow. |
void matewnck_window_unmaximize_horizontally
(MatewnckWindow *window
);
Asks the window manager to unmaximize horizontally window
.
|
a MatewnckWindow. |
void matewnck_window_maximize_vertically (MatewnckWindow *window
);
Asks the window manager to maximize vertically window
.
|
a MatewnckWindow. |
void matewnck_window_unmaximize_vertically
(MatewnckWindow *window
);
Asks the window manager to unmaximize vertically window
.
|
a MatewnckWindow. |
void matewnck_window_maximize (MatewnckWindow *window
);
Asks the window manager to maximize window
.
|
a MatewnckWindow. |
void matewnck_window_unmaximize (MatewnckWindow *window
);
Asks the window manager to unmaximize window
.
|
a MatewnckWindow. |
void matewnck_window_shade (MatewnckWindow *window
);
Asks the window manager to shade window
.
|
a MatewnckWindow. |
void matewnck_window_unshade (MatewnckWindow *window
);
Asks the window manager to unshade window
.
|
a MatewnckWindow. |
void matewnck_window_pin (MatewnckWindow *window
);
Asks the window manager to put window
on all workspaces.
|
a MatewnckWindow. |
void matewnck_window_unpin (MatewnckWindow *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.
|
a MatewnckWindow. |
void matewnck_window_stick (MatewnckWindow *window
);
Asks the window manager to keep the window
's position fixed on the
screen, even when the workspace or viewport scrolls.
|
a MatewnckWindow. |
void matewnck_window_unstick (MatewnckWindow *window
);
Asks the window manager to not have window
's position fixed on the
screen when the workspace or viewport scrolls.
|
a MatewnckWindow. |
void matewnck_window_make_above (MatewnckWindow *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).
|
a MatewnckWindow. |
Since 2.14
void matewnck_window_unmake_above (MatewnckWindow *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.
|
a MatewnckWindow. |
Since 2.14
void matewnck_window_make_below (MatewnckWindow *window
);
Asks the window manager to put window
below most windows.
|
a MatewnckWindow. |
Since 2.20
void matewnck_window_unmake_below (MatewnckWindow *window
);
Asks the window manager to not put window
below most windows, and to
put it again in the stack with other windows.
|
a MatewnckWindow. |
Since 2.20
void matewnck_window_set_skip_pager (MatewnckWindow *window
,gboolean skip
);
Asks the window manager to make window
included or not included on pagers.
|
a MatewnckWindow. |
|
whether window should be included on pagers. |
void matewnck_window_set_skip_tasklist (MatewnckWindow *window
,gboolean skip
);
Asks the window manager to make window
included or not included on
tasklists.
|
a MatewnckWindow. |
|
whether window should be included on tasklists. |
void matewnck_window_set_fullscreen (MatewnckWindow *window
,gboolean fullscreen
);
Asks the window manager to set the fullscreen state of window
according to
fullscreen
.
|
a MatewnckWindow. |
|
whether to make window fullscreen. |
Since 2.8
void matewnck_window_close (MatewnckWindow *window
,guint32 timestamp
);
Closes window
.
This function existed before 2.6, but the timestamp
argument was missing
in earlier versions.
|
a MatewnckWindow. |
|
the X server timestamp of the user interaction event that caused this call to occur. |
Since 2.6
MatewnckWorkspace * matewnck_window_get_workspace (MatewnckWindow *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.
|
a MatewnckWindow. |
Returns : |
the single current workspace window is on, or
NULL . The returned MatewnckWorkspace is owned by libmatewnck and must not be
referenced or unreferenced. [transfer none]
|
gboolean matewnck_window_is_on_workspace (MatewnckWindow *window
,MatewnckWorkspace *workspace
);
Gets whether window
appears on workspace
.
|
a MatewnckWindow. |
|
a MatewnckWorkspace. |
Returns : |
TRUE if window appears on workspace , FALSE otherwise. |
gboolean matewnck_window_is_visible_on_workspace (MatewnckWindow *window
,MatewnckWorkspace *workspace
);
Like matewnck_window_is_on_workspace()
, but also checks that
the window is in a visible state (i.e. not minimized or shaded).
|
a MatewnckWindow. |
|
a MatewnckWorkspace. |
Returns : |
TRUE if window appears on workspace in normal state, FALSE
otherwise. |
void matewnck_window_move_to_workspace (MatewnckWindow *window
,MatewnckWorkspace *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
.
|
a MatewnckWindow. |
|
a MatewnckWorkspace. |
gboolean matewnck_window_is_in_viewport (MatewnckWindow *window
,MatewnckWorkspace *workspace
);
Gets TRUE
if window
appears in the current viewport of workspace
.
|
a MatewnckWindow. |
|
a MatewnckWorkspace. |
Returns : |
TRUE if window appears in current viewport of workspace ,
FALSE otherwise. |
Since 2.4
void matewnck_window_activate (MatewnckWindow *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.
|
a MatewnckWindow. |
|
the X server timestamp of the user interaction event that caused this call to occur. |
Since 2.10
gboolean matewnck_window_is_active (MatewnckWindow *window
);
Gets whether window
is the active window on its MatewnckScreen.
|
a MatewnckWindow. |
Returns : |
TRUE if window is the active window on its MatewnckScreen,
FALSE otherwise. |
gboolean matewnck_window_is_most_recently_activated
(MatewnckWindow *window
);
Gets whether window
is the most recently activated window on its
MatewnckScreen.
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.
|
a MatewnckWindow. |
Returns : |
TRUE if window was the most recently activated window on its
MatewnckScreen, FALSE otherwise. |
Since 2.8
void matewnck_window_activate_transient (MatewnckWindow *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.
|
a MatewnckWindow. |
|
the X server timestamp of the user interaction event that caused this call to occur. |
Since 2.10
gboolean matewnck_window_transient_is_most_recently_activated
(MatewnckWindow *window
);
Gets whether one of the transients of window
is the most
recently activated window. See
matewnck_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 MatewnckTasklist once will
activate a transient instead of window
itself
(matewnck_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 MatewnckTaslist).
|
a MatewnckWindow. |
Returns : |
TRUE if one of the transients of window is the most recently
activated window, FALSE otherwise. |
Since 2.12
void matewnck_window_set_icon_geometry (MatewnckWindow *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
.
|
a MatewnckWindow. |
|
X coordinate in pixels. |
|
Y coordinate in pixels. |
|
width in pixels. |
|
height in pixels. |
typedef enum { MATEWNCK_WINDOW_GRAVITY_CURRENT = 0, MATEWNCK_WINDOW_GRAVITY_NORTHWEST = 1, MATEWNCK_WINDOW_GRAVITY_NORTH = 2, MATEWNCK_WINDOW_GRAVITY_NORTHEAST = 3, MATEWNCK_WINDOW_GRAVITY_WEST = 4, MATEWNCK_WINDOW_GRAVITY_CENTER = 5, MATEWNCK_WINDOW_GRAVITY_EAST = 6, MATEWNCK_WINDOW_GRAVITY_SOUTHWEST = 7, MATEWNCK_WINDOW_GRAVITY_SOUTH = 8, MATEWNCK_WINDOW_GRAVITY_SOUTHEAST = 9, MATEWNCK_WINDOW_GRAVITY_STATIC = 10 } MatewnckWindowGravity;
Flag used when changing the geometry of a MatewnckWindow. This is the gravity point to use as a reference for the new position.
keep the current gravity point. | |
use the left top corner of the frame window as gravity point. | |
use the center of the frame window's top side as gravity point. | |
use the right top corner of the frame window as gravity point. | |
use the center of the frame window's left side as gravity point. | |
use the center of the frame window as gravity point. | |
use the center of the frame window's right side as gravity point. | |
use the left bottom corner of the frame window as gravity point. | |
use the center of the frame window's bottom side as gravity point. | |
use the right bottom corner of the frame window as gravity point. | |
use the left top corner of the client window as gravity point. |
Since 2.16
typedef enum { MATEWNCK_WINDOW_CHANGE_X = 1 << 0, MATEWNCK_WINDOW_CHANGE_Y = 1 << 1, MATEWNCK_WINDOW_CHANGE_WIDTH = 1 << 2, MATEWNCK_WINDOW_CHANGE_HEIGHT = 1 << 3 } MatewnckWindowMoveResizeMask;
Flag used as a bitmask when changing the geometry of a MatewnckWindow. This indicates which part of the geometry should be changed.
X coordinate of the window should be changed. | |
Y coordinate of the window should be changed. | |
width of the window should be changed. | |
height of the window should be changed. |
Since 2.16
void matewnck_window_get_client_window_geometry (MatewnckWindow *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
matewnck_window_get_geometry()
.
|
a MatewnckWindow. |
|
return location for X coordinate in pixels of window . |
|
return location for Y coordinate in pixels of window . |
|
return location for width in pixels of window . |
|
return location for height in pixels of window . |
Since 2.20
void matewnck_window_get_geometry (MatewnckWindow *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 matewnck_window_get_client_window_geometry()
.
|
a MatewnckWindow. |
|
return location for X coordinate in pixels of window . |
|
return location for Y coordinate in pixels of window . |
|
return location for width in pixels of window . |
|
return location for height in pixels of window . |
void matewnck_window_set_geometry (MatewnckWindow *window
,MatewnckWindowGravity gravity
,MatewnckWindowMoveResizeMask 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 matewnck_window_set_geometry()
with
the values returned by matewnck_window_get_geometry()
should be a no-op, while
using matewnck_window_set_geometry()
with the values returned by
matewnck_window_get_client_window_geometry()
should reduce the size of window
and move it.
|
a MatewnckWindow. |
|
the gravity point to use as a reference for the new position. |
|
a bitmask containing flags for what should be set. |
|
new X coordinate in pixels of window . |
|
new Y coordinate in pixels of window . |
|
new width in pixels of window . |
|
new height in pixels of window . |
Since 2.16
void matewnck_window_keyboard_move (MatewnckWindow *window
);
Asks the window manager to start moving window
via the keyboard.
|
a MatewnckWindow. |
void matewnck_window_keyboard_size (MatewnckWindow *window
);
Asks the window manager to start resizing window
via the keyboard.
|
a MatewnckWindow. |
"actions-changed"
signalvoid user_function (MatewnckWindow *window,
MatewnckWindowActions changed_mask,
MatewnckWindowActions new_state,
gpointer user_data) : Run Last
Emitted when the actions availabilities for window
change.
|
the MatewnckWindow which emitted the signal. |
|
the bitmask containing bits set for all actions
availabilities for window that have changed. |
|
the new actions availabilities for window . |
|
user data set when the signal handler was connected. |
"geometry-changed"
signalvoid user_function (MatewnckWindow *window,
gpointer user_data) : Run Last
Emitted when the geometry of window
changes.
|
the MatewnckWindow which emitted the signal. |
|
user data set when the signal handler was connected. |
"icon-changed"
signalvoid user_function (MatewnckWindow *window,
gpointer user_data) : Run Last
Emitted when the icon of window
changes.
|
the MatewnckWindow which emitted the signal. |
|
user data set when the signal handler was connected. |
"name-changed"
signalvoid user_function (MatewnckWindow *window,
gpointer user_data) : Run Last
Emitted when the name of window
changes.
|
the MatewnckWindow which emitted the signal. |
|
user data set when the signal handler was connected. |
"state-changed"
signalvoid user_function (MatewnckWindow *window,
MatewnckWindowState changed_mask,
MatewnckWindowState 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
MatewnckWindowState for the complete list of states that might have changed.
|
the MatewnckWindow which emitted the signal. |
|
the bitmask containing bits set for all states of window
that have changed. |
|
the new state of window . |
|
user data set when the signal handler was connected. |
"workspace-changed"
signalvoid user_function (MatewnckWindow *window,
gpointer user_data) : Run Last
Emitted when the current workspace of window
changes, or if window
has
been pinned or unpinned.
|
the MatewnckWindow which emitted the signal. |
|
user data set when the signal handler was connected. |