Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tk_setwindowvisual(3tk) [opensolaris man page]

Tk_SetWindowVisual(3TK) 				       Tk Library Procedures					   Tk_SetWindowVisual(3TK)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_SetWindowVisual - change visual characteristics of window SYNOPSIS
#include <tk.h> int Tk_SetWindowVisual(tkwin, visual, depth, colormap) ARGUMENTS
Tk_Window tkwin (in) Token for window. Visual *visual (in) New visual type to use for tkwin. int depth (in) Number of bits per pixel desired for tkwin. Colormap colormap (in) New colormap for tkwin, which must be compatible with visual and depth. _________________________________________________________________ DESCRIPTION
When Tk creates a new window it assigns it the default visual characteristics (visual, depth, and colormap) for its screen. Tk_SetWin- dowVisual may be called to change them. Tk_SetWindowVisual must be called before the window has actually been created in X (e.g. before Tk_MapWindow or Tk_MakeWindowExist has been invoked for the window). The safest thing is to call Tk_SetWindowVisual immediately after calling Tk_CreateWindow. If tkwin has already been created before Tk_SetWindowVisual is called then it returns 0 and doesn't make any changes; otherwise it returns 1 to signify that the operation completed successfully. Note: Tk_SetWindowVisual should not be called if you just want to change a window's colormap without changing its visual or depth; call Tk_SetWindowColormap instead. KEYWORDS
colormap, depth, visual ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWTk | +--------------------+-----------------+ |Interface Stability | Uncommitted | +--------------------+-----------------+ NOTES
Source for Tk is available on http://opensolaris.org. Tk 4.0 Tk_SetWindowVisual(3TK)

Check Out this Related Man Page

Tk_GetVisual(3) 					       Tk Library Procedures						   Tk_GetVisual(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_GetVisual - translate from string to visual SYNOPSIS
#include <tk.h> Visual * Tk_GetVisual(interp, tkwin, string, depthPtr, colormapPtr) ARGUMENTS
Tcl_Interp *interp (in) Interpreter to use for error reporting. Tk_Window tkwin (in) Token for window in which the visual will be used. const char *string (in) String that identifies the desired visual. See below for valid formats. int *depthPtr (out) Depth of returned visual gets stored here. Colormap *colormapPtr (out) If non-NULL then a suitable colormap for visual is found and its identifier is stored here. _________________________________________________________________ DESCRIPTION
Tk_GetVisual takes a string description of a visual and finds a suitable X Visual for use in tkwin, if there is one. It returns a pointer to the X Visual structure for the visual and stores the number of bits per pixel for it at *depthPtr. If string is unrecognizable or if no suitable visual could be found, then NULL is returned and Tk_GetVisual leaves an error message in interp->result. If colormap is non-NULL then Tk_GetVisual also locates an appropriate colormap for use with the result visual and stores its X identifier at *colormapPtr. The string argument specifies the desired visual in one of the following ways: class depth The string consists of a class name followed by an integer depth, with any amount of white space (including none) in between. class selects what sort of visual is desired and must be one of directcolor, grayscale, greyscale, pseudocolor, staticcolor, staticgray, staticgrey, or truecolor, or a unique abbreviation. depth specifies how many bits per pixel are needed for the visual. If possible, Tk_GetVisual will return a visual with this depth; if there is no visual of the desired depth then Tk_GetVisual looks first for a visual with greater depth, then one with less depth. default Use the default visual for tkwin's screen. pathName Use the visual for the window given by pathName. pathName must be the name of a window on the same screen as tkwin. number Use the visual whose X identifier is number. best ?depth? Choose the "best possible" visual, using the following rules, in decreasing order of priority: (a) a visual that has exactly the desired depth is best, followed by a visual with greater depth than requested (but as little extra as possible), followed by a visual with less depth than requested (but as great a depth as possible); (b) if no depth is specified, then the deepest available visual is chosen; (c) pseudocolor is better than truecolor or directcolor, which are better than staticcolor, which is better than stat- icgray or grayscale; (d) the default visual for the screen is better than any other visual. CREDITS
The idea for Tk_GetVisual, and the first implementation, came from Paul Mackerras. KEYWORDS
colormap, screen, visual Tk 4.0 Tk_GetVisual(3)
Man Page