Tk_ConfigureWindow
NAMESYNOPSIS
ARGUMENTS
DESCRIPTION
BUGS
SEE ALSO
KEYWORDS
___________________________
NAME
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
SYNOPSIS
#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)
ARGUMENTS
Tk_Window tkwin (in) |
Token for window. | ||
unsigned int valueMask (in) |
OR-ed mask of values like CWX or CWBorderPixel, indicating which fields of *valuePtr or *attsPtr to use. | ||
XWindowChanges *valuePtr (in) |
Points to a structure containing new values for the configuration parameters selected by valueMask. Fields not selected by valueMask are ignored. | ||
int x (in) |
New x-coordinate for tkwin’s top left pixel (including border, if any) within tkwin’s parent. | ||
int y (in) |
New y-coordinate for tkwin’s top left pixel (including border, if any) within tkwin’s parent. | ||
int width (in) |
New width for tkwin (interior, not including border). | ||
int height (in) |
New height for tkwin (interior, not including border). | ||
int borderWidth (in) |
New width for tkwin’s border. | ||
XSetWindowAttributes *attsPtr (in) |
Points to a structure containing new values for the attributes given by the valueMask argument. Attributes not selected by valueMask are ignored. | ||
unsigned long pixel (in) |
New background or border color for window. | ||
Pixmap pixmap (in) |
New pixmap to use for background or border of tkwin. WARNING: cannot necessarily be deleted immediately, as for Xlib calls. See note below. | ||
Colormap colormap (in) |
New colormap to use for tkwin. | ||
Tk_Cursor cursor (in) |
New cursor to use for tkwin. If None is specified, then tkwin will not have its own cursor; it will use the cursor of its parent. |
______________
DESCRIPTION
These procedures are analogous to the X library procedures with similar names, such as XConfigureWindow. 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 Tk_X and Tk_Height) without having to contact the X server. In addition, if no X window has actually been created for tkwin 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.
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 is not already in the TK_COLORMAP_WINDOWS property.
BUGS
Tk_SetWindowBackgroundPixmap and Tk_SetWindowBorderPixmap differ slightly from their Xlib counterparts in that the pixmap argument may not necessarily be deleted immediately after calling one of these procedures. This is because tkwin’s window may not exist yet at the time of the call, in which case pixmap is merely saved and used later when tkwin’s window is actually created. If you wish to delete pixmap, then call Tk_MakeWindowExist first to be sure that tkwin’s window exists and pixmap has been passed to the X server.
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.
SEE ALSO
Tk_MoveToplevelWindow, Tk_RestackWindow
KEYWORDS
attributes, border, color, configure, height, pixel, pixmap, width, window, x, y
More Linux Commands
manpages/list.3.html
list(3) - list routines (Library - Linux man page)..........
list_new initialises the list header list so as to create an empty list. list_addhead adds node to the head of list, returning the node just added. list_addtail
manpages/XScreenSaverAllocInfo.3.html
XScreenSaverAllocInfo(3) - X11 Screen Saver extension client
The X Window System provides support for changing the image on a display screen after a user-settable period of inactivity to avoid burning the cathode ray tube
manpages/glColor3ui.3gl.html
glColor3ui(3gl) - set the current color - Linux manual page
The GL stores both a current single-valued color index and a current four-valued RGBA color. glColor sets a new four-valued RGBA color. glColor has two major va
manpages/system-config-printer-applet.1.html
system-config-printer-applet(1) - print job manager.........
system-config-printer-applet is a print job manager for CUPS. Normally it will display a printer icon in the notification area, greyed out when there are no pri
manpages/socket.2.html
socket(2) - create an endpoint for communication (Man Page)
socket() creates an endpoint for communication and returns a descriptor. The domain argument specifies a communication domain; this selects the protocol family
manpages/XcmsQueryBlue.3.html
XcmsQueryBlue(3) - obtain black, blue, green, red, and white
The XcmsQueryBlack function returns the color specification in the specified target format for zero-intensity red, green, and blue. The XcmsQueryBlue function r
manpages/feature.3pm.html
feature(3pm) - Perl pragma to enable new features (ManPage)
It is usually impossible to add new syntax to Perl without breaking some existing programs. This pragma provides a way to minimize that risk. New syntactic cons
manpages/memcmp.3.html
memcmp(3) - compare memory areas (Library - Linux man page)
The memcmp() function compares the first n bytes (each interpreted as unsigned char) of the memory areas s1 and s2. RETURN VALUE The memcmp() function returns a
manpages/pdfdetach.1.html
pdfdetach(1) Portable Document Format (PDF) document embedde
Pdfdetach lists or extracts embedded files (attachments) from a Portable Document Format (PDF) file. OPTIONS Some of the following options can be set with confi
manpages/ypchsh.1.html
ypchsh(1) - change your password in the NIS database........
In the old days, the standard passwd(1), chfn(1) and chsh(1) tools could not be used under Linux to change the users NIS password, shell and GECOS information.
manpages/SDL_SemWaitTimeout.3.html
SDL_SemWaitTimeout(3) - Lock a semaphore, but only wait up t
SDL_SemWaitTimeout() is a varient of SDL_SemWait with a maximum timeout value. If the value of the semaphore pointed to by sem is positive (greater than zero) i
manpages/pciconfig_read.2.html
pciconfig_read(2) - pci device information handling.........
Most of the interaction with PCI devices is already handled by the kernel PCI layer, and thus these calls should not normally need to be accessed from user spac
