
@c %start of fragment

@deffn Function gdk-window-destroy  (self@tie{}@code{<gdk-window>})
@deffnx Method destroy
Destroys the window system resources associated with @var{window} and decrements
@var{window}'s reference count. The window system resources for all children of
@var{window} are also destroyed, but the children's reference counts are not
decremented.

Note that a window will not be destroyed automatically when its reference count
reaches zero. You must call this function yourself before that happens.

@table @var
@item window
a @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-get-window-type  (self@tie{}@code{<gdk-window>}) @result{}@tie{} (ret@tie{}@code{<gdk-window-type>})
@deffnx Method get-window-type
Gets the type of the window. See @code{<gdk-window-type>}.

@table @var
@item window
a @code{<gdk-window>}

@item ret
type of window

@end table

@end deffn

@deffn Function gdk-window-at-pointer  @result{}@tie{} (ret@tie{}@code{<gdk-window>}) (win_x@tie{}@code{int}) (win_y@tie{}@code{int})
Obtains the window underneath the mouse pointer, returning the location of that
window in @var{win-x}, @var{win-y}. Returns @samp{@code{#f}} if the window under
the mouse pointer is not known to GDK (if the window belongs to another
application and a @code{<gdk-window>} hasn't been created for it with
@code{gdk-window-foreign-new})

NOTE: For multihead-aware widgets or applications use
@code{gdk-display-get-window-at-pointer} instead.

@table @var
@item win-x
return location for origin of the window under the pointer

@item win-y
return location for origin of the window under the pointer

@item ret
window under the mouse pointer

@end table

@end deffn

@deffn Function gdk-window-show  (self@tie{}@code{<gdk-window>})
@deffnx Method show
Like @code{gdk-window-show-unraised}, but also raises the window to the top of
the window stack (moves the window to the front of the Z-order).

This function maps a window so it's visible onscreen. Its opposite is
@code{gdk-window-hide}.

When implementing a @code{<gtk-widget>}, you should call this function on the
widget's @code{<gdk-window>} as part of the "map" method.

@table @var
@item window
a @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-show-unraised  (self@tie{}@code{<gdk-window>})
@deffnx Method show-unraised
Shows a @code{<gdk-window>} onscreen, but does not modify its stacking order. In
contrast, @code{gdk-window-show} will raise the window to the top of the window
stack.

On the X11 platform, in Xlib terms, this function calls @code{x-map-window} (it
also updates some internal GDK state, which means that you can't really use
@code{x-map-window} directly on a GDK window).

@table @var
@item window
a @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-hide  (self@tie{}@code{<gdk-window>})
@deffnx Method hide
For toplevel windows, withdraws them, so they will no longer be known to the
window manager; for all windows, unmaps them, so they won't be displayed.
Normally done automatically as part of @code{gtk-widget-hide}.

@table @var
@item window
a @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-is-visible  (self@tie{}@code{<gdk-window>}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method is-visible
Checks whether the window has been mapped (with @code{gdk-window-show} or
@code{gdk-window-show-unraised}).

@table @var
@item window
a @code{<gdk-window>}

@item ret
@samp{@code{#t}} if the window is mapped

@end table

@end deffn

@deffn Function gdk-window-is-viewable  (self@tie{}@code{<gdk-window>}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method is-viewable
Check if the window and all ancestors of the window are mapped. (This is not
necessarily "viewable" in the X sense, since we only check as far as we have GDK
window parents, not to the root window.)

@table @var
@item window
a @code{<gdk-window>}

@item ret
@samp{@code{#t}} if the window is viewable

@end table

@end deffn

@deffn Function gdk-window-get-state  (self@tie{}@code{<gdk-window>}) @result{}@tie{} (ret@tie{}@code{<gdk-window-state>})
@deffnx Method get-state
Gets the bitwise OR of the currently active window state flags, from the
@code{<gdk-window-state>} enumeration.

@table @var
@item window
a @code{<gdk-window>}

@item ret
window state bitfield

@end table

@end deffn

@deffn Function gdk-window-withdraw  (self@tie{}@code{<gdk-window>})
@deffnx Method withdraw
Withdraws a window (unmaps it and asks the window manager to forget about it).
This function is not really useful as @code{gdk-window-hide} automatically
withdraws toplevel windows before hiding them.

@table @var
@item window
a toplevel @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-iconify  (self@tie{}@code{<gdk-window>})
@deffnx Method iconify
Asks to iconify (minimize) @var{window}. The window manager may choose to ignore
the request, but normally will honor it. Using @code{gtk-window-iconify} is
preferred, if you have a @code{<gtk-window>} widget.

This function only makes sense when @var{window} is a toplevel window.

@table @var
@item window
a toplevel @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-deiconify  (self@tie{}@code{<gdk-window>})
@deffnx Method deiconify
Attempt to deiconify (unminimize) @var{window}. On X11 the window manager may
choose to ignore the request to deiconify. When using GTK+, use
@code{gtk-window-deiconify} instead of the @code{<gdk-window>} variant. Or
better yet, you probably want to use @code{gtk-window-present}, which raises the
window, focuses it, unminimizes it, and puts it on the current desktop.

@table @var
@item window
a toplevel @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-stick  (self@tie{}@code{<gdk-window>})
@deffnx Method stick
"Pins" a window such that it's on all workspaces and does not scroll with
viewports, for window managers that have scrollable viewports. (When using
@code{<gtk-window>}, @code{gtk-window-stick} may be more useful.)

On the X11 platform, this function depends on window manager support, so may
have no effect with many window managers. However, GDK will do the best it can
to convince the window manager to stick the window. For window managers that
don't support this operation, there's nothing you can do to force it to happen.

@table @var
@item window
a toplevel @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-unstick  (self@tie{}@code{<gdk-window>})
@deffnx Method unstick
Reverse operation for @code{gdk-window-stick}; see @code{gdk-window-stick}, and
@code{gtk-window-unstick}.

@table @var
@item window
a toplevel @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-maximize  (self@tie{}@code{<gdk-window>})
@deffnx Method maximize
Maximizes the window. If the window was already maximized, then this function
does nothing.

On X11, asks the window manager to maximize @var{window}, if the window manager
supports this operation. Not all window managers support this, and some
deliberately ignore it or don't have a concept of "maximized"; so you can't rely
on the maximization actually happening. But it will happen with most standard
window managers, and GDK makes a best effort to get it to happen.

On Windows, reliably maximizes the window.

@table @var
@item window
a toplevel @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-unmaximize  (self@tie{}@code{<gdk-window>})
@deffnx Method unmaximize
Unmaximizes the window. If the window wasn't maximized, then this function does
nothing.

On X11, asks the window manager to unmaximize @var{window}, if the window
manager supports this operation. Not all window managers support this, and some
deliberately ignore it or don't have a concept of "maximized"; so you can't rely
on the unmaximization actually happening. But it will happen with most standard
window managers, and GDK makes a best effort to get it to happen.

On Windows, reliably unmaximizes the window.

@table @var
@item window
a toplevel @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-fullscreen  (self@tie{}@code{<gdk-window>})
@deffnx Method fullscreen
Moves the window into fullscreen mode. This means the window covers the entire
screen and is above any panels or task bars.

If the window was already fullscreen, then this function does nothing.

On X11, asks the window manager to put @var{window} in a fullscreen state, if
the window manager supports this operation. Not all window managers support
this, and some deliberately ignore it or don't have a concept of "fullscreen";
so you can't rely on the fullscreenification actually happening. But it will
happen with most standard window managers, and GDK makes a best effort to get it
to happen.

@table @var
@item window
a toplevel @code{<gdk-window>}

@end table

Since 2.2

@end deffn

@deffn Function gdk-window-unfullscreen  (self@tie{}@code{<gdk-window>})
@deffnx Method unfullscreen
Moves the window out of fullscreen mode. If the window was not fullscreen, does
nothing.

On X11, asks the window manager to move @var{window} out of the fullscreen
state, if the window manager supports this operation. Not all window managers
support this, and some deliberately ignore it or don't have a concept of
"fullscreen"; so you can't rely on the unfullscreenification actually happening.
But it will happen with most standard window managers, and GDK makes a best
effort to get it to happen.

@table @var
@item window
a toplevel @code{<gdk-window>}

@end table

Since 2.2

@end deffn

@deffn Function gdk-window-set-keep-above  (self@tie{}@code{<gdk-window>}) (setting@tie{}@code{bool})
@deffnx Method set-keep-above
Set if @var{window} must be kept above other windows. If the window was already
above, then this function does nothing.

On X11, asks the window manager to keep @var{window} above, if the window
manager supports this operation. Not all window managers support this, and some
deliberately ignore it or don't have a concept of "keep above"; so you can't
rely on the window being kept above. But it will happen with most standard
window managers, and GDK makes a best effort to get it to happen.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item setting
whether to keep @var{window} above other windows

@end table

Since 2.4

@end deffn

@deffn Function gdk-window-set-keep-below  (self@tie{}@code{<gdk-window>}) (setting@tie{}@code{bool})
@deffnx Method set-keep-below
Set if @var{window} must be kept below other windows. If the window was already
below, then this function does nothing.

On X11, asks the window manager to keep @var{window} below, if the window
manager supports this operation. Not all window managers support this, and some
deliberately ignore it or don't have a concept of "keep below"; so you can't
rely on the window being kept below. But it will happen with most standard
window managers, and GDK makes a best effort to get it to happen.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item setting
whether to keep @var{window} below other windows

@end table

Since 2.4

@end deffn

@deffn Function gdk-window-move  (self@tie{}@code{<gdk-window>}) (x@tie{}@code{int}) (y@tie{}@code{int})
@deffnx Method move
Repositions a window relative to its parent window. For toplevel windows, window
managers may ignore or modify the move; you should probably use
@code{gtk-window-move} on a @code{<gtk-window>} widget anyway, instead of using
GDK functions. For child windows, the move will reliably succeed.

If you're also planning to resize the window, use @code{gdk-window-move-resize}
to both move and resize simultaneously, for a nicer visual effect.

@table @var
@item window
a @code{<gdk-window>}

@item x
X coordinate relative to window's parent

@item y
Y coordinate relative to window's parent

@end table

@end deffn

@deffn Function gdk-window-resize  (self@tie{}@code{<gdk-window>}) (width@tie{}@code{int}) (height@tie{}@code{int})
@deffnx Method resize
Resizes @var{window}; for toplevel windows, asks the window manager to resize
the window. The window manager may not allow the resize. When using GTK+, use
@code{gtk-window-resize} instead of this low-level GDK function.

Windows may not be resized below 1x1.

If you're also planning to move the window, use @code{gdk-window-move-resize} to
both move and resize simultaneously, for a nicer visual effect.

@table @var
@item window
a @code{<gdk-window>}

@item width
new width of the window

@item height
new height of the window

@end table

@end deffn

@deffn Function gdk-window-move-resize  (self@tie{}@code{<gdk-window>}) (x@tie{}@code{int}) (y@tie{}@code{int}) (width@tie{}@code{int}) (height@tie{}@code{int})
@deffnx Method move-resize
Equivalent to calling @code{gdk-window-move} and @code{gdk-window-resize},
except that both operations are performed at once, avoiding strange visual
effects. (i.e. the user may be able to see the window first move, then resize,
if you don't use @code{gdk-window-move-resize}.)

@table @var
@item window
a @code{<gdk-window>}

@item x
new X position relative to window's parent

@item y
new Y position relative to window's parent

@item width
new width

@item height
new height

@end table

@end deffn

@deffn Function gdk-window-scroll  (self@tie{}@code{<gdk-window>}) (dx@tie{}@code{int}) (dy@tie{}@code{int})
@deffnx Method scroll
Scroll the contents of @var{window}, both pixels and children, by the given
amount. @var{window} itself does not move. Portions of the window that the
scroll operation brings in from offscreen areas are invalidated. The invalidated
region may be bigger than what would strictly be necessary. (For X11, a minimum
area will be invalidated if the window has no subwindows, or if the edges of the
window's parent do not extend beyond the edges of the window. In other cases, a
multi-step process is used to scroll the window which may produce temporary
visual artifacts and unnecessary invalidations.)

@table @var
@item window
a @code{<gdk-window>}

@item dx
Amount to scroll in the X direction

@item dy
Amount to scroll in the Y direction

@end table

@end deffn

@deffn Function gdk-window-move-region  (self@tie{}@code{<gdk-window>}) (region@tie{}@code{<gdk-region>}) (dx@tie{}@code{int}) (dy@tie{}@code{int})
@deffnx Method move-region
Move the part of @var{window} indicated by @var{region} by @var{dy} pixels in
the Y direction and @var{dx} pixels in the X direction. The portions of
@var{region} that not covered by the new position of @var{region} are
invalidated.

Child windows are not moved.

@table @var
@item window
a @code{<gdk-window>}

@item region
The @code{<gdk-region>} to move

@item dx
Amount to move in the X direction

@item dy
Amount to move in the Y direction

@end table

Since 2.8

@end deffn

@deffn Function gdk-window-reparent  (self@tie{}@code{<gdk-window>}) (new_parent@tie{}@code{<gdk-window>}) (x@tie{}@code{int}) (y@tie{}@code{int})
@deffnx Method reparent
Reparents @var{window} into the given @var{new-parent}. The window being
reparented will be unmapped as a side effect.

@table @var
@item window
a @code{<gdk-window>}

@item new-parent
new parent to move @var{window} into

@item x
X location inside the new parent

@item y
Y location inside the new parent

@end table

@end deffn

@deffn Function gdk-window-clear  (self@tie{}@code{<gdk-window>})
@deffnx Method clear
Clears an entire @var{window} to the background color or background pixmap.

@table @var
@item window
a @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-clear-area  (self@tie{}@code{<gdk-window>}) (x@tie{}@code{int}) (y@tie{}@code{int}) (width@tie{}@code{int}) (height@tie{}@code{int})
@deffnx Method clear-area
Clears an area of @var{window} to the background color or background pixmap.

@table @var
@item window
a @code{<gdk-window>}

@item x
x coordinate of rectangle to clear

@item y
y coordinate of rectangle to clear

@item width
width of rectangle to clear

@item height
height of rectangle to clear

@end table

@end deffn

@deffn Function gdk-window-clear-area-e  (self@tie{}@code{<gdk-window>}) (x@tie{}@code{int}) (y@tie{}@code{int}) (width@tie{}@code{int}) (height@tie{}@code{int})
@deffnx Method clear-area-e
Like @code{gdk-window-clear-area}, but also generates an expose event for the
cleared area.

This function has a stupid name because it dates back to the mists time,
pre-GDK-1.0.

@table @var
@item window
a @code{<gdk-window>}

@item x
x coordinate of rectangle to clear

@item y
y coordinate of rectangle to clear

@item width
width of rectangle to clear

@item height
height of rectangle to clear

@end table

@end deffn

@deffn Function gdk-window-raise  (self@tie{}@code{<gdk-window>})
@deffnx Method raise
Raises @var{window} to the top of the Z-order (stacking order), so that other
windows with the same parent window appear below @var{window}. This is true
whether or not the windows are visible.

If @var{window} is a toplevel, the window manager may choose to deny the request
to move the window in the Z-order, @code{gdk-window-raise} only requests the
restack, does not guarantee it.

@table @var
@item window
a @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-lower  (self@tie{}@code{<gdk-window>})
@deffnx Method lower
Lowers @var{window} to the bottom of the Z-order (stacking order), so that other
windows with the same parent window appear above @var{window}. This is true
whether or not the other windows are visible.

If @var{window} is a toplevel, the window manager may choose to deny the request
to move the window in the Z-order, @code{gdk-window-lower} only requests the
restack, does not guarantee it.

Note that @code{gdk-window-show} raises the window again, so don't call this
function before @code{gdk-window-show}. (Try @code{gdk-window-show-unraised}.)

@table @var
@item window
a @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-focus  (self@tie{}@code{<gdk-window>}) (timestamp@tie{}@code{unsigned-int32})
@deffnx Method focus
Sets keyboard focus to @var{window}. In most cases, @code{gtk-window-present}
should be used on a @code{<gtk-window>}, rather than calling this function.

@table @var
@item window
a @code{<gdk-window>}

@item timestamp
timestamp of the event triggering the window focus

@end table

@end deffn

@deffn Function gdk-window-register-dnd  (self@tie{}@code{<gdk-window>})
@deffnx Method register-dnd
Registers a window as a potential drop destination.

@table @var
@item window
a @code{<gdk-window>}.

@end table

@end deffn

@deffn Function gdk-window-begin-resize-drag  (self@tie{}@code{<gdk-window>}) (edge@tie{}@code{<gdk-window-edge>}) (button@tie{}@code{int}) (root_x@tie{}@code{int}) (root_y@tie{}@code{int}) (timestamp@tie{}@code{unsigned-int32})
@deffnx Method begin-resize-drag
Begins a window resize operation (for a toplevel window). You might use this
function to implement a "window resize grip," for example; in fact
@code{<gtk-statusbar>} uses it. The function works best with window managers
that support the @uref{http://www.freedesktop.org/Standards/wm-spec,Extended
Window Manager Hints}, but has a fallback implementation for other window
managers.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item edge
the edge or corner from which the drag is started

@item button
the button being used to drag

@item root-x
root window X coordinate of mouse click that began the drag

@item root-y
root window Y coordinate of mouse click that began the drag

@item timestamp
timestamp of mouse click that began the drag (use @code{gdk-event-get-time})

@end table

@end deffn

@deffn Function gdk-window-begin-move-drag  (self@tie{}@code{<gdk-window>}) (button@tie{}@code{int}) (root_x@tie{}@code{int}) (root_y@tie{}@code{int}) (timestamp@tie{}@code{unsigned-int32})
@deffnx Method begin-move-drag
Begins a window move operation (for a toplevel window). You might use this
function to implement a "window move grip," for example. The function works best
with window managers that support the
@uref{http://www.freedesktop.org/Standards/wm-spec,Extended Window Manager
Hints}, but has a fallback implementation for other window managers.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item button
the button being used to drag

@item root-x
root window X coordinate of mouse click that began the drag

@item root-y
root window Y coordinate of mouse click that began the drag

@item timestamp
timestamp of mouse click that began the drag

@end table

@end deffn

@deffn Function gdk-window-begin-paint-rect  (self@tie{}@code{<gdk-window>}) (rectangle@tie{}@code{<gdk-rectangle>})
@deffnx Method begin-paint-rect
A convenience wrapper around @code{gdk-window-begin-paint-region} which creates
a rectangular region for you. See @code{gdk-window-begin-paint-region} for
details.

@table @var
@item window
a @code{<gdk-window>}

@item rectangle
rectangle you intend to draw to

@end table

@end deffn

@deffn Function gdk-window-begin-paint-region  (self@tie{}@code{<gdk-window>}) (region@tie{}@code{<gdk-region>})
@deffnx Method begin-paint-region
Indicates that you are beginning the process of redrawing @var{region}. A
backing store (offscreen buffer) large enough to contain @var{region} will be
created. The backing store will be initialized with the background color or
background pixmap for @var{window}. Then, all drawing operations performed on
@var{window} will be diverted to the backing store. When you call
@code{gdk-window-end-paint}, the backing store will be copied to @var{window},
making it visible onscreen. Only the part of @var{window} contained in
@var{region} will be modified; that is, drawing operations are clipped to
@var{region}.

The net result of all this is to remove flicker, because the user sees the
finished product appear all at once when you call @code{gdk-window-end-paint}.
If you draw to @var{window} directly without calling
@code{gdk-window-begin-paint-region}, the user may see flicker as individual
drawing operations are performed in sequence. The clipping and
background-initializing features of @code{gdk-window-begin-paint-region} are
conveniences for the programmer, so you can avoid doing that work yourself.

When using GTK+, the widget system automatically places calls to
@code{gdk-window-begin-paint-region} and @code{gdk-window-end-paint} around
emissions of the expose_event signal. That is, if you're writing an expose event
handler, you can assume that the exposed area in @code{<gdk-event-expose>} has
already been cleared to the window background, is already set as the clip
region, and already has a backing store. Therefore in most cases, application
code need not call @code{gdk-window-begin-paint-region}. (You can disable the
automatic calls around expose events on a widget-by-widget basis by calling
@code{gtk-widget-set-double-buffered}.)

If you call this function multiple times before calling the matching
@code{gdk-window-end-paint}, the backing stores are pushed onto a stack.
@code{gdk-window-end-paint} copies the topmost backing store onscreen, subtracts
the topmost region from all other regions in the stack, and pops the stack. All
drawing operations affect only the topmost backing store in the stack. One
matching call to @code{gdk-window-end-paint} is required for each call to
@code{gdk-window-begin-paint-region}.

@table @var
@item window
a @code{<gdk-window>}

@item region
region you intend to draw to

@end table

@end deffn

@deffn Function gdk-window-end-paint  (self@tie{}@code{<gdk-window>})
@deffnx Method end-paint
Indicates that the backing store created by the most recent call to
@code{gdk-window-begin-paint-region} should be copied onscreen and deleted,
leaving the next-most-recent backing store or no backing store at all as the
active paint region. See @code{gdk-window-begin-paint-region} for full details.
It is an error to call this function without a matching
@code{gdk-window-begin-paint-region} first.

@table @var
@item window
a @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-invalidate-rect  (self@tie{}@code{<gdk-window>}) (rect@tie{}@code{<gdk-rectangle>}) (invalidate_children@tie{}@code{bool})
@deffnx Method invalidate-rect
A convenience wrapper around @code{gdk-window-invalidate-region} which
invalidates a rectangular region. See @code{gdk-window-invalidate-region} for
details.

@table @var
@item window
a @code{<gdk-window>}

@item rect
rectangle to invalidate

@item invalidate-children
whether to also invalidate child windows

@end table

@end deffn

@deffn Function gdk-window-invalidate-region  (self@tie{}@code{<gdk-window>}) (region@tie{}@code{<gdk-region>}) (invalidate_children@tie{}@code{bool})
@deffnx Method invalidate-region
Adds @var{region} to the update area for @var{window}. The update area is the
region that needs to be redrawn, or "dirty region." The call
@code{gdk-window-process-updates} sends one or more expose events to the window,
which together cover the entire update area. An application would normally
redraw the contents of @var{window} in response to those expose events.

GDK will call @code{gdk-window-process-all-updates} on your behalf whenever your
program returns to the main loop and becomes idle, so normally there's no need
to do that manually, you just need to invalidate regions that you know should be
redrawn.

The @var{invalidate-children} parameter controls whether the region of each
child window that intersects @var{region} will also be invalidated. If
@samp{@code{#f}}, then the update area for child windows will remain unaffected.
See gdk_window_invalidate_maybe_recurse if you need fine grained control over
which children are invalidated.

@table @var
@item window
a @code{<gdk-window>}

@item region
a @code{<gdk-region>}

@item invalidate-children
@samp{@code{#t}} to also invalidate child windows

@end table

@end deffn

@deffn Function gdk-window-get-update-area  (self@tie{}@code{<gdk-window>}) @result{}@tie{} (ret@tie{}@code{<gdk-region>})
@deffnx Method get-update-area
Transfers ownership of the update area from @var{window} to the caller of the
function. That is, after calling this function, @var{window} will no longer have
an invalid/dirty region; the update area is removed from @var{window} and handed
to you. If a window has no update area, @code{gdk-window-get-update-area}
returns @samp{@code{#f}}. You are responsible for calling
@code{gdk-region-destroy} on the returned region if it's non-@samp{@code{#f}}.

@table @var
@item window
a @code{<gdk-window>}

@item ret
the update area for @var{window}

@end table

@end deffn

@deffn Function gdk-window-freeze-updates  (self@tie{}@code{<gdk-window>})
@deffnx Method freeze-updates
Temporarily freezes a window such that it won't receive expose events. The
window will begin receiving expose events again when
@code{gdk-window-thaw-updates} is called. If @code{gdk-window-freeze-updates}
has been called more than once, @code{gdk-window-thaw-updates} must be called an
equal number of times to begin processing exposes.

@table @var
@item window
a @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-thaw-updates  (self@tie{}@code{<gdk-window>})
@deffnx Method thaw-updates
Thaws a window frozen with @code{gdk-window-freeze-updates}.

@table @var
@item window
a @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-process-all-updates 
Calls @code{gdk-window-process-updates} for all windows (see
@code{<gdk-window>}) in the application.

@end deffn

@deffn Function gdk-window-process-updates  (self@tie{}@code{<gdk-window>}) (update_children@tie{}@code{bool})
@deffnx Method process-updates
Sends one or more expose events to @var{window}. The areas in each expose event
will cover the entire update area for the window (see
@code{gdk-window-invalidate-region} for details). Normally GDK calls
@code{gdk-window-process-all-updates} on your behalf, so there's no need to call
this function unless you want to force expose events to be delivered immediately
and synchronously (vs. the usual case, where GDK delivers them in an idle
handler). Occasionally this is useful to produce nicer scrolling behavior, for
example.

@table @var
@item window
a @code{<gdk-window>}

@item update-children
whether to also process updates for child windows

@end table

@end deffn

@deffn Function gdk-window-set-debug-updates  (setting@tie{}@code{bool})
With update debugging enabled, calls to @code{gdk-window-invalidate-region}
clear the invalidated region of the screen to a noticeable color, and GDK pauses
for a short time before sending exposes to windows during
@code{gdk-window-process-updates}. The net effect is that you can see the
invalid region for each window and watch redraws as they occur. This allows you
to diagnose inefficiencies in your application.

In essence, because the GDK rendering model prevents all flicker, if you are
redrawing the same region 400 times you may never notice, aside from noticing a
speed problem. Enabling update debugging causes GTK to flicker slowly and
noticeably, so you can see exactly what's being redrawn when, in what order.

The --gtk-debug=updates command line option passed to GTK+ programs enables this
debug option at application startup time. That's usually more useful than
calling @code{gdk-window-set-debug-updates} yourself, though you might want to
use this function to enable updates sometime after application startup time.

@table @var
@item setting
@samp{@code{#t}} to turn on update debugging

@end table

@end deffn

@deffn Function gdk-window-configure-finished  (self@tie{}@code{<gdk-window>})
@deffnx Method configure-finished
Signal to the window system that the application has finished handling Configure
events it has received. Window Managers can use this to better synchronize the
frame repaint with the application. GTK+ applications will automatically call
this function when appropriate.

This function can only be called if
@code{gdk-window-enable-synchronized-configure} was called previously.

@table @var
@item window
a toplevel @code{<gdk-window>}

@end table

Since 2.6

@end deffn

@deffn Function gdk-window-set-override-redirect  (self@tie{}@code{<gdk-window>}) (override_redirect@tie{}@code{bool})
@deffnx Method set-override-redirect
An override redirect window is not under the control of the window manager. This
means it won't have a titlebar, won't be minimizable, etc. - it will be entirely
under the control of the application. The window manager can't see the override
redirect window at all.

Override redirect should only be used for short-lived temporary windows, such as
popup menus. @code{<gtk-menu>} uses an override redirect window in its
implementation, for example.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item override-redirect
@samp{@code{#t}} if window should be override redirect

@end table

@end deffn

@deffn Function gdk-window-set-accept-focus  (self@tie{}@code{<gdk-window>}) (accept_focus@tie{}@code{bool})
@deffnx Method set-accept-focus
Setting @var{accept-focus} to @samp{@code{#f}} hints the desktop environment
that the window doesn't want to receive input focus.

On X, it is the responsibility of the window manager to interpret this hint.
ICCCM-compliant window manager usually respect it.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item accept-focus
@samp{@code{#t}} if the window should receive input focus

@end table

Since 2.4

@end deffn

@deffn Function gdk-window-set-focus-on-map  (self@tie{}@code{<gdk-window>}) (focus_on_map@tie{}@code{bool})
@deffnx Method set-focus-on-map
Setting @var{focus-on-map} to @samp{@code{#f}} hints the desktop environment
that the window doesn't want to receive input focus when it is mapped.
focus_on_map should be turned off for windows that aren't triggered
interactively (such as popups from network activity).

On X, it is the responsibility of the window manager to interpret this hint.
Window managers following the freedesktop.org window manager extension
specification should respect it.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item focus-on-map
@samp{@code{#t}} if the window should receive input focus when mapped

@end table

Since 2.6

@end deffn

@deffn Function gdk-window-shape-combine-mask  (self@tie{}@code{<gdk-window>}) (mask@tie{}@code{<gdk-drawable>}) (x@tie{}@code{int}) (y@tie{}@code{int})
@deffnx Method shape-combine-mask
Applies a shape mask to @var{window}. Pixels in @var{window} corresponding to
set bits in the @var{mask} will be visible; pixels in @var{window} corresponding
to unset bits in the @var{mask} will be transparent. This gives a
non-rectangular window.

If @var{mask} is @samp{@code{#f}}, the shape mask will be unset, and the
@var{x}/@var{y} parameters are not used.

On the X11 platform, this uses an X server extension which is widely available
on most common platforms, but not available on very old X servers, and
occasionally the implementation will be buggy. On servers without the shape
extension, this function will do nothing.

On the Win32 platform the functionality is always present.

This function works on both toplevel and child windows.

@table @var
@item window
a @code{<gdk-window>}

@item mask
shape mask

@item x
X position of shape mask with respect to @var{window}

@item y
Y position of shape mask with respect to @var{window}

@end table

@end deffn

@deffn Function gdk-window-shape-combine-region  (self@tie{}@code{<gdk-window>}) (shape_region@tie{}@code{<gdk-region>}) (offset_x@tie{}@code{int}) (offset_y@tie{}@code{int})
@deffnx Method shape-combine-region
Makes pixels in @var{window} outside @var{shape-region} be transparent, so that
the window may be nonrectangular. See also @code{gdk-window-shape-combine-mask}
to use a bitmap as the mask.

If @var{shape-region} is @samp{@code{#f}}, the shape will be unset, so the whole
window will be opaque again. @var{offset-x} and @var{offset-y} are ignored if
@var{shape-region} is @samp{@code{#f}}.

On the X11 platform, this uses an X server extension which is widely available
on most common platforms, but not available on very old X servers, and
occasionally the implementation will be buggy. On servers without the shape
extension, this function will do nothing.

On the Win32 platform, this functionality is always present.

This function works on both toplevel and child windows.

@table @var
@item window
a @code{<gdk-window>}

@item shape-region
region of window to be non-transparent

@item offset-x
X position of @var{shape-region} in @var{window} coordinates

@item offset-y
Y position of @var{shape-region} in @var{window} coordinates

@end table

@end deffn

@deffn Function gdk-window-set-child-shapes  (self@tie{}@code{<gdk-window>})
@deffnx Method set-child-shapes
Sets the shape mask of @var{window} to the union of shape masks for all children
of @var{window}, ignoring the shape mask of @var{window} itself. Contrast with
@code{gdk-window-merge-child-shapes} which includes the shape mask of
@var{window} in the masks to be merged.

@table @var
@item window
a @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-merge-child-shapes  (self@tie{}@code{<gdk-window>})
@deffnx Method merge-child-shapes
Merges the shape masks for any child windows into the shape mask for
@var{window}. i.e. the union of all masks for @var{window} and its children will
become the new mask for @var{window}. See @code{gdk-window-shape-combine-mask}.

This function is distinct from @code{gdk-window-set-child-shapes} because it
includes @var{window}'s shape mask in the set of shapes to be merged.

@table @var
@item window
a @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-input-shape-combine-mask  (self@tie{}@code{<gdk-window>}) (mask@tie{}@code{<gdk-drawable>}) (x@tie{}@code{int}) (y@tie{}@code{int})
@deffnx Method input-shape-combine-mask
Like @code{gdk-window-shape-combine-mask}, but the shape applies only to event
handling. Mouse events which happen while the pointer position corresponds to an
unset bit in the mask will be passed on the window below @var{window}.

An input shape is typically used with RGBA windows. The alpha channel of the
window defines which pixels are invisible and allows for nicely antialiased
borders, and the input shape controls where the window is "clickable".

On the X11 platform, this requires version 1.1 of the shape extension.

On the Win32 platform, this functionality is not present and the function does
nothing.

@table @var
@item window
a @code{<gdk-window>}

@item mask
shape mask

@item x
X position of shape mask with respect to @var{window}

@item y
Y position of shape mask with respect to @var{window}

@end table

Since 2.10

@end deffn

@deffn Function gdk-window-set-child-input-shapes  (self@tie{}@code{<gdk-window>})
@deffnx Method set-child-input-shapes
Sets the input shape mask of @var{window} to the union of input shape masks for
all children of @var{window}, ignoring the input shape mask of @var{window}
itself. Contrast with @code{gdk-window-merge-child-input-shapes} which includes
the input shape mask of @var{window} in the masks to be merged.

@table @var
@item window
a @code{<gdk-window>}

@end table

Since 2.10

@end deffn

@deffn Function gdk-window-merge-child-input-shapes  (self@tie{}@code{<gdk-window>})
@deffnx Method merge-child-input-shapes
Merges the input shape masks for any child windows into the input shape mask for
@var{window}. i.e. the union of all input masks for @var{window} and its
children will become the new input mask for @var{window}. See
@code{gdk-window-input-shape-combine-mask}.

This function is distinct from @code{gdk-window-set-child-input-shapes} because
it includes @var{window}'s input shape mask in the set of shapes to be merged.

@table @var
@item window
a @code{<gdk-window>}

@end table

Since 2.10

@end deffn

@deffn Function gdk-window-set-static-gravities  (self@tie{}@code{<gdk-window>}) (use_static@tie{}@code{bool}) @result{}@tie{} (ret@tie{}@code{bool})
@deffnx Method set-static-gravities
Set the bit gravity of the given window to static, and flag it so all children
get static subwindow gravity. This is used if you are implementing scary
features that involve deep knowledge of the windowing system. Don't worry about
it unless you have to.

@table @var
@item window
a @code{<gdk-window>}

@item use-static
@samp{@code{#t}} to turn on static gravity

@item ret
@samp{@code{#t}} if the server supports static gravity

@end table

@end deffn

@deffn Function gdk-window-set-hints  (self@tie{}@code{<gdk-window>}) (x@tie{}@code{int}) (y@tie{}@code{int}) (min_width@tie{}@code{int}) (min_height@tie{}@code{int}) (max_width@tie{}@code{int}) (max_height@tie{}@code{int}) (flags@tie{}@code{int})
@deffnx Method set-hints
@samp{gdk_window_set_hints} is deprecated and should not be used in
newly-written code.

This function is broken and useless and you should ignore it. If using GTK+, use
functions such as @code{gtk-window-resize}, @code{gtk-window-set-size-request},
@code{gtk-window-move}, @code{gtk-window-parse-geometry}, and
@code{gtk-window-set-geometry-hints}, depending on what you're trying to do.

If using GDK directly, use @code{gdk-window-set-geometry-hints}.

@table @var
@item window
a @code{<gdk-window>}

@item x
ignored field, does not matter

@item y
ignored field, does not matter

@item min-width
minimum width hint

@item min-height
minimum height hint

@item max-width
max width hint

@item max-height
max height hint

@item flags
logical OR of GDK_HINT_POS, GDK_HINT_MIN_SIZE, and/or GDK_HINT_MAX_SIZE

@end table

@end deffn

@deffn Function gdk-window-set-title  (self@tie{}@code{<gdk-window>}) (title@tie{}@code{mchars})
@deffnx Method set-title
Sets the title of a toplevel window, to be displayed in the titlebar. If you
haven't explicitly set the icon name for the window (using
@code{gdk-window-set-icon-name}), the icon name will be set to @var{title} as
well. @var{title} must be in UTF-8 encoding (as with all user-readable strings
in GDK/GTK+). @var{title} may not be @samp{@code{#f}}.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item title
title of @var{window}

@end table

@end deffn

@deffn Function gdk-window-set-background  (self@tie{}@code{<gdk-window>}) (color@tie{}@code{<gdk-color>})
@deffnx Method set-background
Sets the background color of @var{window}. (However, when using GTK+, set the
background of a widget with @code{gtk-widget-modify-bg} - if you're an
application - or @code{gtk-style-set-background} - if you're implementing a
custom widget.)

The @var{color} must be allocated; @code{gdk-rgb-find-color} is the best way to
allocate a color.

See also @code{gdk-window-set-back-pixmap}.

@table @var
@item window
a @code{<gdk-window>}

@item color
an allocated @code{<gdk-color>}

@end table

@end deffn

@deffn Function gdk-window-set-back-pixmap  (self@tie{}@code{<gdk-window>}) (pixmap@tie{}@code{<gdk-pixmap>}) (parent_relative@tie{}@code{bool})
@deffnx Method set-back-pixmap
Sets the background pixmap of @var{window}. May also be used to set a background
of "None" on @var{window}, by setting a background pixmap of @samp{@code{#f}}. A
background pixmap will be tiled, positioning the first tile at the origin of
@var{window}, or if @var{parent-relative} is @samp{@code{#t}}, the tiling will
be done based on the origin of the parent window (useful to align tiles in a
parent with tiles in a child).

A background pixmap of @samp{@code{#f}} means that the window will have no
background. A window with no background will never have its background filled by
the windowing system, instead the window will contain whatever pixels were
already in the corresponding area of the display.

The windowing system will normally fill a window with its background when the
window is obscured then exposed, and when you call @code{gdk-window-clear}.

@table @var
@item window
a @code{<gdk-window>}

@item pixmap
a @code{<gdk-pixmap>}, or @samp{@code{#f}}

@item parent-relative
whether the tiling origin is at the origin of @var{window}'s parent

@end table

@end deffn

@deffn Function gdk-window-set-cursor  (self@tie{}@code{<gdk-window>}) (cursor@tie{}@code{<gdk-cursor>})
@deffnx Method set-cursor
Sets the mouse pointer for a @code{<gdk-window>}. Use @code{gdk-cursor-new} or
@code{gdk-cursor-new-from-pixmap} to create the cursor. To make the cursor
invisible, use @code{gdk-cursor-new-from-pixmap} to create a cursor with no
pixels in it. Passing @samp{@code{#f}} for the @var{cursor} argument to
@code{gdk-window-set-cursor} means that @var{window} will use the cursor of its
parent window. Most windows should use this default.

@table @var
@item window
a @code{<gdk-window>}

@item cursor
a cursor

@end table

@end deffn

@deffn Function gdk-window-get-geometry  (self@tie{}@code{<gdk-window>}) @result{}@tie{} (x@tie{}@code{int}) (y@tie{}@code{int}) (width@tie{}@code{int}) (height@tie{}@code{int}) (depth@tie{}@code{int})
@deffnx Method get-geometry
Any of the return location arguments to this function may be @samp{@code{#f}},
if you aren't interested in getting the value of that field.

The X and Y coordinates returned are relative to the parent window of
@var{window}, which for toplevels usually means relative to the window
decorations (titlebar, etc.) rather than relative to the root window
(screen-size background window).

On the X11 platform, the geometry is obtained from the X server, so reflects the
latest position of @var{window}; this may be out-of-sync with the position of
@var{window} delivered in the most-recently-processed
@code{<gdk-event-configure>}. @code{gdk-window-get-position} in contrast gets
the position from the most recent configure event.

@cartouche 

If @var{window} is not a toplevel, it is @emph{much} better 
to call @code{gdk-window-get-position} and @code{gdk-drawable-get-size} instead, 
because it avoids the roundtrip to the X server and because 
@code{gdk-drawable-get-size} supports the full 32-bit coordinate space,
whereas @code{gdk-window-get-geometry} is restricted to the 16-bit
coordinates of X11.
@end cartouche

@table @var
@item window
a @code{<gdk-window>}

@item x
return location for X coordinate of window (relative to its parent)

@item y
return location for Y coordinate of window (relative to its parent)

@item width
return location for width of window

@item height
return location for height of window

@item depth
return location for bit depth of window

@end table

@end deffn

@deffn Function gdk-window-set-icon-list  (self@tie{}@code{<gdk-window>}) (pixbufs@tie{}@code{glist-of})
@deffnx Method set-icon-list
Sets a list of icons for the window. One of these will be used to represent the
window when it has been iconified. The icon is usually shown in an icon box or
some sort of task bar. Which icon size is shown depends on the window manager.
The window manager can scale the icon but setting several size icons can give
better image quality since the window manager may only need to scale the icon by
a small amount or not at all.

@table @var
@item window
The @code{<gdk-window>} toplevel window to set the icon of.

@item pixbufs
A list of pixbufs, of different sizes.

@end table

@end deffn

@deffn Function gdk-window-set-modal-hint  (self@tie{}@code{<gdk-window>}) (modal@tie{}@code{bool})
@deffnx Method set-modal-hint
The application can use this hint to tell the window manager that a certain
window has modal behaviour. The window manager can use this information to
handle modal windows in a special way.

You should only use this on windows for which you have previously called
@code{gdk-window-set-transient-for}

@table @var
@item window
A toplevel @code{<gdk-window>}

@item modal
@samp{@code{#t}} if the window is modal, @samp{@code{#f}} otherwise.

@end table

@end deffn

@deffn Function gdk-window-set-type-hint  (self@tie{}@code{<gdk-window>}) (hint@tie{}@code{<gdk-window-type-hint>})
@deffnx Method set-type-hint
The application can use this call to provide a hint to the window manager about
the functionality of a window. The window manager can use this information when
determining the decoration and behaviour of the window.

The hint must be set before the window is mapped.

@table @var
@item window
A toplevel @code{<gdk-window>}

@item hint
A hint of the function this window will have

@end table

@end deffn

@deffn Function gdk-window-get-type-hint  (self@tie{}@code{<gdk-window>}) @result{}@tie{} (ret@tie{}@code{<gdk-window-type-hint>})
@deffnx Method get-type-hint
This function returns the type hint set for a window.

@table @var
@item window
A toplevel @code{<gdk-window>}

@item ret
The type hint set for @var{window}

@end table

Since 2.10

@end deffn

@deffn Function gdk-window-set-skip-taskbar-hint  (self@tie{}@code{<gdk-window>}) (skips_taskbar@tie{}@code{bool})
@deffnx Method set-skip-taskbar-hint
Toggles whether a window should appear in a task list or window list. If a
window's semantic type as specified with @code{gdk-window-set-type-hint} already
fully describes the window, this function should @emph{not} be called in
addition, instead you should allow the window to be treated according to
standard policy for its semantic type.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item skips-taskbar
@samp{@code{#t}} to skip the taskbar

@end table

Since 2.2

@end deffn

@deffn Function gdk-window-set-skip-pager-hint  (self@tie{}@code{<gdk-window>}) (skips_pager@tie{}@code{bool})
@deffnx Method set-skip-pager-hint
Toggles whether a window should appear in a pager (workspace switcher, or other
desktop utility program that displays a small thumbnail representation of the
windows on the desktop). If a window's semantic type as specified with
@code{gdk-window-set-type-hint} already fully describes the window, this
function should @emph{not} be called in addition, instead you should allow the
window to be treated according to standard policy for its semantic type.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item skips-pager
@samp{@code{#t}} to skip the pager

@end table

Since 2.2

@end deffn

@deffn Function gdk-window-set-urgency-hint  (self@tie{}@code{<gdk-window>}) (urgent@tie{}@code{bool})
@deffnx Method set-urgency-hint
Toggles whether a window needs the user's urgent attention.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item urgent
@samp{@code{#t}} if the window is urgent

@end table

Since 2.8

@end deffn

@deffn Function gdk-window-get-position  (self@tie{}@code{<gdk-window>}) @result{}@tie{} (x@tie{}@code{int}) (y@tie{}@code{int})
@deffnx Method get-position
Obtains the position of the window as reported in the most-recently-processed
@code{<gdk-event-configure>}. Contrast with @code{gdk-window-get-geometry} which
queries the X server for the current window position, regardless of which events
have been received or processed.

The position coordinates are relative to the window's parent window.

@table @var
@item window
a @code{<gdk-window>}

@item x
X coordinate of window

@item y
Y coordinate of window

@end table

@end deffn

@deffn Function gdk-window-get-root-origin  (self@tie{}@code{<gdk-window>}) @result{}@tie{} (x@tie{}@code{int}) (y@tie{}@code{int})
@deffnx Method get-root-origin
Obtains the top-left corner of the window manager frame in root window
coordinates.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item x
return location for X position of window frame

@item y
return location for Y position of window frame

@end table

@end deffn

@deffn Function gdk-window-get-origin  (self@tie{}@code{<gdk-window>}) @result{}@tie{} (ret@tie{}@code{int}) (x@tie{}@code{int}) (y@tie{}@code{int})
@deffnx Method get-origin
Obtains the position of a window in root window coordinates. (Compare with
@code{gdk-window-get-position} and @code{gdk-window-get-geometry} which return
the position of a window relative to its parent window.)

@table @var
@item window
a @code{<gdk-window>}

@item x
return location for X coordinate

@item y
return location for Y coordinate

@item ret
not meaningful, ignore

@end table

@end deffn

@deffn Function gdk-window-get-deskrelative-origin  (self@tie{}@code{<gdk-window>}) @result{}@tie{} (ret@tie{}@code{bool}) (x@tie{}@code{int}) (y@tie{}@code{int})
@deffnx Method get-deskrelative-origin
@samp{gdk_window_get_deskrelative_origin} is deprecated and should not be used
in newly-written code.

This gets the origin of a @code{<gdk-window>} relative to an
Enlightenment-window-manager desktop. As long as you don't assume that the
user's desktop/workspace covers the entire root window (i.e. you don't assume
that the desktop begins at root window coordinate 0,0) this function is not
necessary. It's deprecated for that reason.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item x
return location for X coordinate

@item y
return location for Y coordinate

@item ret
not meaningful

@end table

@end deffn

@deffn Function gdk-window-get-parent  (self@tie{}@code{<gdk-window>}) @result{}@tie{} (ret@tie{}@code{<gdk-window>})
@deffnx Method get-parent
Obtains the parent of @var{window}, as known to GDK. Does not query the X
server; thus this returns the parent as passed to @code{gdk-window-new}, not the
actual parent. This should never matter unless you're using Xlib calls mixed
with GDK calls on the X11 platform. It may also matter for toplevel windows,
because the window manager may choose to reparent them.

@table @var
@item window
a @code{<gdk-window>}

@item ret
parent of @var{window}

@end table

@end deffn

@deffn Function gdk-window-get-toplevel  (self@tie{}@code{<gdk-window>}) @result{}@tie{} (ret@tie{}@code{<gdk-window>})
@deffnx Method get-toplevel
Gets the toplevel window that's an ancestor of @var{window}.

@table @var
@item window
a @code{<gdk-window>}

@item ret
the toplevel window containing @var{window}

@end table

@end deffn

@deffn Function gdk-window-get-children  (self@tie{}@code{<gdk-window>}) @result{}@tie{} (ret@tie{}@code{glist-of})
@deffnx Method get-children
Gets the list of children of @var{window} known to GDK. This function only
returns children created via GDK, so for example it's useless when used with the
root window; it only returns windows an application created itself.

The returned list must be freed, but the elements in the list need not be.

@table @var
@item window
a @code{<gdk-window>}

@item ret
list of child windows inside @var{window}

@end table

@end deffn

@deffn Function gdk-window-get-events  (self@tie{}@code{<gdk-window>}) @result{}@tie{} (ret@tie{}@code{<gdk-event-mask>})
@deffnx Method get-events
Gets the event mask for @var{window}. See @code{gdk-window-set-events}.

@table @var
@item window
a @code{<gdk-window>}

@item ret
event mask for @var{window}

@end table

@end deffn

@deffn Function gdk-window-set-events  (self@tie{}@code{<gdk-window>}) (event_mask@tie{}@code{<gdk-event-mask>})
@deffnx Method set-events
The event mask for a window determines which events will be reported for that
window. For example, an event mask including @code{<gdk-button-press-mask>}
means the window should report button press events. The event mask is the
bitwise OR of values from the @code{<gdk-event-mask>} enumeration.

@table @var
@item window
a @code{<gdk-window>}

@item event-mask
event mask for @var{window}

@end table

@end deffn

@deffn Function gdk-window-set-icon  (self@tie{}@code{<gdk-window>}) (icon_window@tie{}@code{<gdk-window>}) (pixmap@tie{}@code{<gdk-pixmap>}) (mask@tie{}@code{<gdk-drawable>})
@deffnx Method set-icon
Sets the icon of @var{window} as a pixmap or window. If using GTK+, investigate
@code{gtk-window-set-default-icon-list} first, and then
@code{gtk-window-set-icon-list} and @code{gtk-window-set-icon}. If those don't
meet your needs, look at @code{gdk-window-set-icon-list}. Only if all those are
too high-level do you want to fall back to @code{gdk-window-set-icon}.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item icon-window
a @code{<gdk-window>} to use for the icon, or @samp{@code{#f}} to unset

@item pixmap
a @code{<gdk-pixmap>} to use as the icon, or @samp{@code{#f}} to unset

@item mask
a 1-bit pixmap (@code{<gdk-bitmap>}) to use as mask for @var{pixmap}, or
@samp{@code{#f}} to have none

@end table

@end deffn

@deffn Function gdk-window-set-icon-name  (self@tie{}@code{<gdk-window>}) (name@tie{}@code{mchars})
@deffnx Method set-icon-name
Windows may have a name used while minimized, distinct from the name they
display in their titlebar. Most of the time this is a bad idea from a user
interface standpoint. But you can set such a name with this function, if you
like.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item name
name of window while iconified (minimized)

@end table

@end deffn

@deffn Function gdk-window-set-transient-for  (self@tie{}@code{<gdk-window>}) (parent@tie{}@code{<gdk-window>})
@deffnx Method set-transient-for
Indicates to the window manager that @var{window} is a transient dialog
associated with the application window @var{parent}. This allows the window
manager to do things like center @var{window} on @var{parent} and keep
@var{window} above @var{parent}.

See @code{gtk-window-set-transient-for} if you're using @code{<gtk-window>} or
@code{<gtk-dialog>}.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item parent
another toplevel @code{<gdk-window>}

@end table

@end deffn

@deffn Function gdk-window-set-role  (self@tie{}@code{<gdk-window>}) (role@tie{}@code{mchars})
@deffnx Method set-role
When using GTK+, typically you should use @code{gtk-window-set-role} instead of
this low-level function.

The window manager and session manager use a window's role to distinguish it
from other kinds of window in the same application. When an application is
restarted after being saved in a previous session, all windows with the same
title and role are treated as interchangeable. So if you have two windows with
the same title that should be distinguished for session management purposes, you
should set the role on those windows. It doesn't matter what string you use for
the role, as long as you have a different role for each non-interchangeable kind
of window.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item role
a string indicating its role

@end table

@end deffn

@deffn Function gdk-window-set-group  (self@tie{}@code{<gdk-window>}) (leader@tie{}@code{<gdk-window>})
@deffnx Method set-group
Sets the group leader window for @var{window}. By default, GDK sets the group
leader for all toplevel windows to a global window implicitly created by GDK.
With this function you can override this default.

The group leader window allows the window manager to distinguish all windows
that belong to a single application. It may for example allow users to
minimize/unminimize all windows belonging to an application at once. You should
only set a non-default group window if your application pretends to be multiple
applications.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item leader
group leader window, or @samp{@code{#f}} to restore the default group leader
window

@end table

@end deffn

@deffn Function gdk-window-get-group  (self@tie{}@code{<gdk-window>}) @result{}@tie{} (ret@tie{}@code{<gdk-window>})
@deffnx Method get-group
Returns the group leader window for @var{window}. See
@code{gdk-window-set-group}.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item ret
the group leader window for @var{window}

@end table

Since 2.4

@end deffn

@deffn Function gdk-window-set-decorations  (self@tie{}@code{<gdk-window>}) (decorations@tie{}@code{<gdk-wm-decoration>})
@deffnx Method set-decorations
"Decorations" are the features the window manager adds to a toplevel
@code{<gdk-window>}. This function sets the traditional Motif window manager
hints that tell the window manager which decorations you would like your window
to have. Usually you should use @code{gtk-window-set-decorated} on a
@code{<gtk-window>} instead of using the GDK function directly.

The @var{decorations} argument is the logical OR of the fields in the
@code{<gdk-wm-decoration>} enumeration. If @code{<gdk-decor-all>} is included in
the mask, the other bits indicate which decorations should be turned off. If
@code{<gdk-decor-all>} is not included, then the other bits indicate which
decorations should be turned on.

Most window managers honor a decorations hint of 0 to disable all decorations,
but very few honor all possible combinations of bits.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item decorations
decoration hint mask

@end table

@end deffn

@deffn Function gdk-window-set-functions  (self@tie{}@code{<gdk-window>}) (functions@tie{}@code{<gdk-wm-function>})
@deffnx Method set-functions
Sets hints about the window management functions to make available via buttons
on the window frame.

On the X backend, this function sets the traditional Motif window manager hint
for this purpose. However, few window managers do anything reliable or
interesting with this hint. Many ignore it entirely.

The @var{functions} argument is the logical OR of values from the
@code{<gdk-wm-function>} enumeration. If the bitmask includes
@code{<gdk-func-all>}, then the other bits indicate which functions to disable;
if it doesn't include @code{<gdk-func-all>}, it indicates which functions to
enable.

@table @var
@item window
a toplevel @code{<gdk-window>}

@item functions
bitmask of operations to allow on @var{window}

@end table

@end deffn

@deffn Function gdk-window-get-toplevels  @result{}@tie{} (ret@tie{}@code{glist-of})
Obtains a list of all toplevel windows known to GDK on the default screen (see
@code{gdk-screen-get-toplevel-windows}). A toplevel window is a child of the
root window (see @code{gdk-get-default-root-window}).

The returned list should be freed with @code{g-list-free}, but its elements need
not be freed.

@table @var
@item ret
list of toplevel windows, free with @code{g-list-free}

@end table

@end deffn

@deffn Function gdk-get-default-root-window  @result{}@tie{} (ret@tie{}@code{<gdk-window>})
Obtains the root window (parent all other windows are inside) for the default
display and screen.

@table @var
@item ret
the default root window

@end table

@end deffn


@c %end of fragment
