#include <tk.h> Tk_ConfigureWindow(tkwin, valueMask, valuePtr) Tk_MoveWindow(tkwin, x, y) Tk_ResizeWindow(tkwin, width, height) Tk_MoveResizeWindow(tkwin, x, y, width, height) Tk_SetWindowBorderWidth(tkwin, borderWidth) Tk_ChangeWindowAttributes(tkwin, valueMask, attsPtr) Tk_SetWindowBackground(tkwin, pixel) Tk_SetWindowBackgroundPixmap(tkwin, pixmap) Tk_SetWindowBorder(tkwin, pixel) Tk_SetWindowBorderPixmap(tkwin, pixmap) Tk_SetWindowColormap(tkwin, colormap) Tk_DefineCursor(tkwin, cursor) Tk_UndefineCursor(tkwin)
See the X library documentation for details on what these procedures do and how they use their arguments.
In the procedures Tk_ConfigureWindow, Tk_MoveWindow, Tk_ResizeWindow, Tk_MoveResizeWindow, and Tk_SetWindowBorderWidth, if tkwin is an internal window then event handlers interested in configure events are invoked immediately, before the procedure returns. If tkwin 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.
Applications using Tk should never call procedures like XConfigureWindow directly; they should always use the corresponding Tk procedures.
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 Tk_MoveToplevelWindow for moving a top-level window).
You may not use Tk_ConfigureWindow to change the stacking order of a window (valueMask may not contain the CWSibling or CWStackMode bits). To change the stacking order, use the procedure Tk_RestackWindow.
The procedure Tk_SetWindowColormap will automatically add tkwin to the TK_COLORMAP_WINDOWS property of its nearest top-level ancestor if the new colormap is different from that of tkwin's parent and tkwin isn't already in the TK_COLORMAP_WINDOWS property.
A similar problem occurs for the cursor argument passed to Tk_DefineCursor. The solution is the same as for pixmaps above: call Tk_MakeWindowExist before freeing the cursor.
Copyright © 1989-1994 The Regents of the University of California.
Copyright © 1994-1997 Sun Microsystems, Inc.