Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > bd5c3d824c3db63ffd9226c15941e6ad > files > 2157

mozart-1.4.0-1mdv2010.0.i586.rpm

<HTML><HEAD><TITLE>Tk Library Procedures - Tk_ConfigureWindow manual page</TITLE></HEAD><BODY>
<H3><A NAME="M2">NAME</A></H3>
Tk_ConfigureWindow, Tk_MoveWindow, Tk_ResizeWindow, Tk_MoveResizeWindow, Tk_SetWindowBorderWidth, Tk_ChangeWindowAttributes, Tk_SetWindowBackground, Tk_SetWindowBackgroundPixmap, Tk_SetWindowBorder, Tk_SetWindowBorderPixmap, Tk_SetWindowColormap, Tk_DefineCursor, Tk_UndefineCursor - change window configuration or attributes
<H3><A NAME="M3">SYNOPSIS</A></H3>
<B>#include &lt;tk.h&gt;</B><BR>
<B>Tk_ConfigureWindow</B>(<I>tkwin, valueMask, valuePtr</I>)<BR>
<B>Tk_MoveWindow</B>(<I>tkwin, x, y</I>)<BR>
<B>Tk_ResizeWindow</B>(<I>tkwin, width, height</I>)<BR>
<B>Tk_MoveResizeWindow</B>(<I>tkwin, x,  y, width, height</I>)<BR>
<B>Tk_SetWindowBorderWidth</B>(<I>tkwin, borderWidth</I>)<BR>
<B>Tk_ChangeWindowAttributes</B>(<I>tkwin, valueMask, attsPtr</I>)<BR>
<B>Tk_SetWindowBackground</B>(<I>tkwin, pixel</I>)<BR>
<B>Tk_SetWindowBackgroundPixmap</B>(<I>tkwin, pixmap</I>)<BR>
<B>Tk_SetWindowBorder</B>(<I>tkwin, pixel</I>)<BR>
<B>Tk_SetWindowBorderPixmap</B>(<I>tkwin, pixmap</I>)<BR>
<B>Tk_SetWindowColormap</B>(<I>tkwin, colormap</I>)<BR>
<B>Tk_DefineCursor</B>(<I>tkwin, cursor</I>)<BR>
<B>Tk_UndefineCursor</B>(<I>tkwin</I>)<BR>
<H3><A NAME="M4">ARGUMENTS</A></H3>
<DL>
<P><DT>Tk_Window <B>tkwin</B> (in)<DD>
Token for window.
<P><DT>unsigned int <B>valueMask</B> (in)<DD>
OR-ed mask of values like <B>CWX</B> or <B>CWBorderPixel</B>,
indicating which fields of <I>*valuePtr</I> or <I>*attsPtr</I> to use.
<P><DT>XWindowChanges <B>*valuePtr</B> (in)<DD>
Points to a structure containing new values for the configuration
parameters selected by <I>valueMask</I>.  Fields not selected
by <I>valueMask</I> are ignored.
<P><DT>int <B>x</B> (in)<DD>
New x-coordinate for <I>tkwin</I>'s top left pixel (including
border, if any) within tkwin's parent.
<P><DT>int <B>y</B> (in)<DD>
New y-coordinate for <I>tkwin</I>'s top left pixel (including
border, if any) within tkwin's parent.
<P><DT>int <B>width</B> (in)<DD>
New width for <I>tkwin</I> (interior, not including border).
<P><DT>int <B>height</B> (in)<DD>
New height for <I>tkwin</I> (interior, not including border).
<P><DT>int <B>borderWidth</B> (in)<DD>
New width for <I>tkwin</I>'s border.
<P><DT>XSetWindowAttributes <B>*attsPtr</B> (in)<DD>
Points to a structure containing new values for the attributes
given by the <I>valueMask</I> argument.  Attributes not selected
by <I>valueMask</I> are ignored.
<P><DT>unsigned long <B>pixel</B> (in)<DD>
New background or border color for window.
<P><DT>Pixmap <B>pixmap</B> (in)<DD>
New pixmap to use for background or border of <I>tkwin</I>.  WARNING:
cannot necessarily be deleted immediately, as for Xlib calls.  See
note below.
<P><DT>Colormap <B>colormap</B> (in)<DD>
New colormap to use for <I>tkwin</I>.
<P><DT>Tk_Cursor <B>cursor</B> (in)<DD>
New cursor to use for <I>tkwin</I>.  If <B>None</B> is specified, then
<I>tkwin</I> will not have its own cursor;  it will use the cursor
of its parent.
<P></DL>
<H3><A NAME="M5">DESCRIPTION</A></H3>
These procedures are analogous to the X library procedures
with similar names, such as <B>XConfigureWindow</B>.  Each
one of the above procedures calls the corresponding X procedure
and also saves the configuration information in Tk's local
structure for the window.  This allows the information to
be retrieved quickly by the application (using macros such
as <B><A HREF="../TkLib/WindowId.htm">Tk_X</A></B> and <B><A HREF="../TkLib/WindowId.htm">Tk_Height</A></B>) without having to contact
the X server.  In addition, if no X window has actually been
created for <I>tkwin</I> yet, these procedures do not issue
X operations or cause event handlers to be invoked;  they save
the information in Tk's local
structure for the window;  when the window is created later,
the saved information will be used to configure the window.
<P>
See the X library documentation for details on what these
procedures do and how they use their arguments.
<P>
In the procedures <B>Tk_ConfigureWindow</B>, <B>Tk_MoveWindow</B>,
<B>Tk_ResizeWindow</B>, <B>Tk_MoveResizeWindow</B>, and
<B>Tk_SetWindowBorderWidth</B>,
if <I>tkwin</I> is an internal window then event handlers interested
in configure events are invoked immediately, before the procedure
returns.  If <I>tkwin</I> is a top-level window
then the event handlers will be invoked later, after X has seen
the request and returned an event for it.
<P>
Applications using Tk should never call procedures like
<B>XConfigureWindow</B> directly;  they should always use the
corresponding Tk procedures.
<P>
The size and location of a window should only be modified by the
appropriate geometry manager for that window and never by a window
itself (but see <B><A HREF="../TkLib/MoveToplev.htm">Tk_MoveToplevelWindow</A></B> for moving a top-level
window).
<P>
You may not use <B>Tk_ConfigureWindow</B> to change the
stacking order of a window (<I>valueMask</I> may not contain the
<B>CWSibling</B> or <B>CWStackMode</B> bits).
To change the stacking order, use the procedure <B><A HREF="../TkLib/Restack.htm">Tk_RestackWindow</A></B>.
<P>
The procedure <B>Tk_SetWindowColormap</B> will automatically add
<I>tkwin</I> to the <B>TK_COLORMAP_WINDOWS</B> property of its
nearest top-level ancestor if the new colormap is different from
that of <I>tkwin</I>'s parent and <I>tkwin</I> isn't already in
the <B>TK_COLORMAP_WINDOWS</B> property.

<H3><A NAME="M6">BUGS</A></H3>
<B>Tk_SetWindowBackgroundPixmap</B> and <B>Tk_SetWindowBorderPixmap</B>
differ slightly from their Xlib counterparts in that the <I>pixmap</I>
argument may not necessarily be deleted immediately after calling
one of these procedures.  This is because <I>tkwin</I>'s window
may not exist yet at the time of the call, in which case <I>pixmap</I>
is merely saved and used later when <I>tkwin</I>'s window is actually
created.  If you wish to delete <I>pixmap</I>, then call
<B><A HREF="../TkLib/CrtWindow.htm">Tk_MakeWindowExist</A></B> first to be sure that <I>tkwin</I>'s window exists
and <I>pixmap</I> has been passed to the X server.
<P>
A similar problem occurs for the <I>cursor</I> argument passed to
<B>Tk_DefineCursor</B>.  The solution is the same as for pixmaps above:
call <B><A HREF="../TkLib/CrtWindow.htm">Tk_MakeWindowExist</A></B> before freeing the cursor.

<H3><A NAME="M7">SEE ALSO</A></H3>
<B><A HREF="../TkLib/MoveToplev.htm">Tk_MoveToplevelWindow</A></B>, <B><A HREF="../TkLib/Restack.htm">Tk_RestackWindow</A></B>
<H3><A NAME="M8">KEYWORDS</A></H3>
<A href="../Keywords/A.htm#attributes">attributes</A>, <A href="../Keywords/B.htm#border">border</A>, <A href="../Keywords/C.htm#color">color</A>, <A href="../Keywords/C.htm#configure">configure</A>, <A href="../Keywords/H.htm#height">height</A>, <A href="../Keywords/P.htm#pixel">pixel</A>, <A href="../Keywords/P.htm#pixmap">pixmap</A>, <A href="../Keywords/W.htm#width">width</A>, <A href="../Keywords/W.htm#window">window</A>, <A href="../Keywords/X.htm#x">x</A>, <A href="../Keywords/Y.htm#y">y</A>
<HR><PRE>
<A HREF="../copyright.htm">Copyright</A> &#169; 1990-1993 The Regents of the University of California.
<A HREF="../copyright.htm">Copyright</A> &#169; 1994-1996 Sun Microsystems, Inc.
<A HREF="../copyright.htm">Copyright</A> &#169; 1995-1997 Roger E. Critchlow Jr.</PRE>
</BODY></HTML>