<!-- ##### SECTION Title ##### -->
NetkWindow

<!-- ##### SECTION Short_Description ##### -->
Represents a window for the window manager

<!-- ##### SECTION Long_Description ##### -->
<para>
Represents a window for the window manager
</para>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### STRUCT NetkWindow ##### -->
<para>

</para>

@parent_instance: 
@priv: 

<!-- ##### ENUM NetkWindowState ##### -->
<para>

</para>

@NETK_WINDOW_STATE_MINIMIZED: 
@NETK_WINDOW_STATE_MAXIMIZED_HORIZONTALLY: 
@NETK_WINDOW_STATE_MAXIMIZED_VERTICALLY: 
@NETK_WINDOW_STATE_SHADED: 
@NETK_WINDOW_STATE_SKIP_PAGER: 
@NETK_WINDOW_STATE_SKIP_TASKLIST: 
@NETK_WINDOW_STATE_STICKY: 
@NETK_WINDOW_STATE_HIDDEN: 
@NETK_WINDOW_STATE_FULLSCREEN: 
@NETK_WINDOW_STATE_URGENT: 
@NETK_WINDOW_STATE_DEMANDS_ATTENTION: 

<!-- ##### ENUM NetkWindowActions ##### -->
<para>

</para>

@NETK_WINDOW_ACTION_MOVE: 
@NETK_WINDOW_ACTION_RESIZE: 
@NETK_WINDOW_ACTION_SHADE: 
@NETK_WINDOW_ACTION_STICK: 
@NETK_WINDOW_ACTION_MAXIMIZE_HORIZONTALLY: 
@NETK_WINDOW_ACTION_MAXIMIZE_VERTICALLY: 
@NETK_WINDOW_ACTION_CHANGE_WORKSPACE: 
@NETK_WINDOW_ACTION_CLOSE: 
@NETK_WINDOW_ACTION_UNMAXIMIZE_HORIZONTALLY: 
@NETK_WINDOW_ACTION_UNMAXIMIZE_VERTICALLY: 
@NETK_WINDOW_ACTION_UNSHADE: 
@NETK_WINDOW_ACTION_UNSTICK: 
@NETK_WINDOW_ACTION_MINIMIZE: 
@NETK_WINDOW_ACTION_UNMINIMIZE: 
@NETK_WINDOW_ACTION_MAXIMIZE: 
@NETK_WINDOW_ACTION_UNMAXIMIZE: 

<!-- ##### ENUM NetkWindowType ##### -->
<para>

</para>

@NETK_WINDOW_NORMAL: 
@NETK_WINDOW_DESKTOP: 
@NETK_WINDOW_DOCK: 
@NETK_WINDOW_DIALOG: 
@NETK_WINDOW_MODAL_DIALOG: 
@NETK_WINDOW_TOOLBAR: 
@NETK_WINDOW_MENU: 
@NETK_WINDOW_UTILITY: 
@NETK_WINDOW_SPLASHSCREEN: 

<!-- ##### FUNCTION netk_window_get_type ##### -->
<para>

</para>

@Returns: the gtype of #NetkWindow


<!-- ##### FUNCTION netk_window_get ##### -->
<para>

</para>

@xwindow: the x window id
@Returns: the #NetkWindow instance, or NULL. result refcount is not touched.

Gets a preexisting #NetkWindow for the X window @xwindow.
Will not create a #NetkWindow if none exists. Robust
against bogus window IDs.


<!-- ##### FUNCTION netk_window_get_screen ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: the screen of the window, or NULL on failure. result refcount is not changed.

Gets the screen this window is on.


<!-- ##### FUNCTION netk_window_get_name ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: the window name, or NULL if the instance was invalid. do not free result.

Gets the name of the window, as it should be displayed in a pager   
or tasklist. Always returns some value, even if the window
hasn't set a name.

For icons titles, use netk_window_get_icon_name() instead.


<!-- ##### FUNCTION netk_window_get_icon_name ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: the window icon name, or NULL if the instance was invalid. do not free result.

Gets the name of the window, as it should be displayed for an
icon. Always returns some value, even if the window hasn't set a
name. Contrast with netk_window_get_name(), which returns the
window title, not the icon title.


<!-- ##### FUNCTION netk_window_get_application ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: the application that owns the window, or NULL. refcount is not incremented for the caller,


<!-- ##### FUNCTION netk_window_get_group_leader ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: group leader, or None on failure. XXX what is that gulong is that X ?

Returns the group leader, or None.


<!-- ##### FUNCTION netk_window_get_xid ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: the X window id of the window, or None if the NetkWindow instance was invalid.


<!-- ##### FUNCTION netk_window_get_class_group ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: the class group, or NULL. it's reference count is not increased.


<!-- ##### FUNCTION netk_window_get_session_id ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: the session id, or NULL. do not free result.


<!-- ##### FUNCTION netk_window_get_session_id_utf8 ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: the session id in utf-8 format, or NULL

XXX what does that implementation do


<!-- ##### FUNCTION netk_window_get_pid ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: the pid of the creator of the window, or 0 if none available or if NetkWindow instance is invalid

Gets the process ID of @window, if available.


<!-- ##### FUNCTION netk_window_get_window_type ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: the window type (#NetkWindowType), or 0 on failure


<!-- ##### FUNCTION netk_window_get_resource_class ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: the resource class name, or NULL. do not free result.


<!-- ##### FUNCTION netk_window_is_minimized ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: if the window is minimized, FALSE on failure


<!-- ##### FUNCTION netk_window_is_maximized_horizontally ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: if the window is maximized horizontally, FALSE on failure


<!-- ##### FUNCTION netk_window_is_maximized_vertically ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: if the window is maximized vertically, FALSE on failure


<!-- ##### FUNCTION netk_window_is_maximized ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: if the window is maximized, FALSE on failure


<!-- ##### FUNCTION netk_window_is_shaded ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: if the window is shaded, FALSE on failure


<!-- ##### FUNCTION netk_window_is_skip_pager ##### -->
<para>

</para>

@window: the #NetkWindow instance
@Returns: if the window has the skip pager hint set, FALSE on failure


<!-- ##### FUNCTION netk_window_is_skip_tasklist ##### -->
<para>

</para>

@window: the #NetkWindow instance
@Returns: if the window has the skip tasklist hint set, FALSE on failure


<!-- ##### FUNCTION netk_window_is_sticky ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: if the window is sticky, or FALSE on failure


<!-- ##### FUNCTION netk_window_set_skip_pager ##### -->
<para>

</para>

@window: the NetkWindow instance
@skip: whether to enable the skip hint

sets or unsets the skip pager hint.


<!-- ##### FUNCTION netk_window_set_skip_tasklist ##### -->
<para>

</para>

@window: the NetkWindow instance
@skip: whether to enable the skip hint

sets or unsets the skip tasklist hint.


<!-- ##### FUNCTION netk_window_close ##### -->
<para>

</para>

@window: the NetkWindow instance

Try to close the netk window


<!-- ##### FUNCTION netk_window_minimize ##### -->
<para>

</para>

@window: the NetkWindow instance

Iconifies the window


<!-- ##### FUNCTION netk_window_unminimize ##### -->
<para>

</para>

@window: the NetkWindow instance

Deiconifies the window


<!-- ##### FUNCTION netk_window_maximize ##### -->
<para>

</para>

@window: the NetkWindow instance

Maximizes the window


<!-- ##### FUNCTION netk_window_unmaximize ##### -->
<para>

</para>

@window: the NetkWindow instance

Unmaximizes the window


<!-- ##### FUNCTION netk_window_maximize_horizontally ##### -->
<para>

</para>

@window: the NetkWindow instance


<!-- ##### FUNCTION netk_window_unmaximize_horizontally ##### -->
<para>

</para>

@window: the NetkWindow instance


<!-- ##### FUNCTION netk_window_maximize_vertically ##### -->
<para>

</para>

@window: the NetkWindow instance


<!-- ##### FUNCTION netk_window_unmaximize_vertically ##### -->
<para>

</para>

@window: the NetkWindow instance


<!-- ##### FUNCTION netk_window_shade ##### -->
<para>

</para>

@window: the NetkWindow instance

Shades the window. A shaded window is "rolled up".


<!-- ##### FUNCTION netk_window_unshade ##### -->
<para>

</para>

@window: the NetkWindow instance


<!-- ##### FUNCTION netk_window_stick ##### -->
<para>

</para>

@window: the NetkWindow instance

Sets the sticky state. Sticky windows are XXX.


<!-- ##### FUNCTION netk_window_unstick ##### -->
<para>

</para>

@window: the NetkWindow instance


<!-- ##### FUNCTION netk_window_keyboard_move ##### -->
<para>

</para>

@window: the NetkWindow instance

enters keyboard move mode for the window.


<!-- ##### FUNCTION netk_window_keyboard_size ##### -->
<para>

</para>

@window: the NetkWindow instance

enters keyboard size mode for the window.


<!-- ##### FUNCTION netk_window_get_workspace ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: the #NetkWorkspace of the window, or NULL. It's refcount is not touched.

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


<!-- ##### FUNCTION netk_window_move_to_workspace ##### -->
<para>

</para>

@window: the NetkWindow instance
@space: the workspace to move the window to

moves the window to the given workspace


<!-- ##### FUNCTION netk_window_is_pinned ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: if the window is pinned

Returns if the window is on all workspaces. Note that if this
changes, it's signalled by a workspace_changed signal,
not state_changed.


<!-- ##### FUNCTION netk_window_pin ##### -->
<para>

</para>

@window: the NetkWindow instance

Pins the window. A pinned window is on all workspaces.


<!-- ##### FUNCTION netk_window_unpin ##### -->
<para>

</para>

@window: the NetkWindow instance

Unpins the window. Thus it is not visible on all workspaces anymore.

Sets @window's workspace to only the currently active workspace,
if the window was previously pinned. If the window wasn't pinned,
doesn't change the window's workspace. If the active workspace
isn't known for some reason (shouldn't happen much), sets the
 window's workspace to 0.


<!-- ##### FUNCTION netk_window_activate ##### -->
<para>

</para>

@window: the NetkWindow instance

Ask the window manager to make @window the active window.  The
window manager may choose to raise @window along with focusing it.


<!-- ##### FUNCTION netk_window_is_active ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: if the window is active, FALSE on failure


<!-- ##### FUNCTION netk_window_activate_transient ##### -->
<para>

</para>

@window: the NetkWindow instance

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.


<!-- ##### FUNCTION netk_window_get_icon ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: the pixbuf of the icon of the window, or NULL. result refcount is not touched.


<!-- ##### FUNCTION netk_window_get_mini_icon ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: the pixbuf of the mini icon of the window, or NULL. result refcount is not touched.


<!-- ##### FUNCTION netk_window_get_icon_is_fallback ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: if the icon is the fallback icon

Checks if we are using a default fallback icon because
none was set on the window.


<!-- ##### FUNCTION netk_window_set_icon_geometry ##### -->
<para>

</para>

@window: the NetkWindow instance
@x: x coordinate in pixels
@y: y coordinate in pixels
@width: width in pixels
@height: height in pixels

Set the icon geometry for a NetkWindow.


<!-- ##### FUNCTION netk_window_get_actions ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: set of possible actions, or 0 on failure

Gets the window operations that should be sensitive for @window.
(bitmask of actions the window supports)


<!-- ##### FUNCTION netk_window_get_state ##### -->
<para>

</para>

@window: the NetkWindow instance
@Returns: the window state, or 0 on failure

Gets the state of a window as a bitmask (bitmask of active state flags)


<!-- ##### FUNCTION netk_window_get_geometry ##### -->
<para>

</para>

@window: the NetkWindow instance
@xp: pointer of variable to store the x coordinate in
@yp: pointer of variable to store the y coordinate in
@widthp: pointer of variable to store the width in
@heightp: pointer of variable to store the height in

Gets the size and position of the window, as last received
in a configure notify (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.


<!-- ##### FUNCTION netk_window_is_visible_on_workspace ##### -->
<para>

</para>

@window: the NetkWindow instance
@workspace: the NetkWorkspace to check
@Returns: if the window is on said workspace, or FALSE on failure

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


<!-- ##### FUNCTION netk_window_is_on_workspace ##### -->
<para>

</para>

@window: the #NetkWindow instance
@workspace: the #NetkWorkspace to check
@Returns: if the window appears on workspace, or FALSE on failure


<!-- ##### FUNCTION netk_window_is_in_viewport ##### -->
<para>

</para>

@window: the #NetkWindow instance
@workspace: the #NetkWorkspace instance
@Returns: if the window is inside the current viewport of the given workspace, or FALSE on failure.


