home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tk3.3b1 / doc / SetVisual.3 < prev    next >
Encoding:
Text File  |  1993-04-01  |  2.6 KB  |  70 lines

  1. '\"
  2. '\" Copyright (c) 1992 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/wish/man/RCS/SetVisual.3,v 1.4 93/04/01 09:41:58 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS Tk_SetWindowVisual tkc
  25. .BS
  26. .SH NAME
  27. .na
  28. Tk_SetWindowVisual \- change visual characteristics of window
  29. .ad
  30. .SH SYNOPSIS
  31. .nf
  32. \fB#include <tk.h>\fR
  33. .sp
  34. int
  35. \fBTk_SetWindowVisual\fR(\fItkwin, visual, depth, colormap\fR)
  36. .SH ARGUMENTS
  37. .AS "unsigned int" colormap
  38. .AP Tk_Window tkwin in
  39. Token for window.
  40. .AP Visual *visual in
  41. New visual type to use for \fItkwin\fR.
  42. .AP "unsigned int" depth in
  43. Number of bits per pixel desired for \fItkwin\fR.
  44. .AP Colormap colormap in
  45. New colormap for \fItkwin\fR, which must be compatible with
  46. \fIvisual\fR and \fIdepth\fR.
  47. .BE
  48.  
  49. .SH DESCRIPTION
  50. .PP
  51. When Tk creates a new window it assigns it the default visual
  52. characteristics (visual, depth, and colormap) for its screen.
  53. \fBTk_SetWindowVisual\fR may be called to change them.
  54. \fBTk_SetWindowVisual\fR must be called before the window has
  55. actually been created in X (e.g. before \fBTk_MapWindow\fR or
  56. \fBTk_MakeWindowExist\fR has been invoked for the window).
  57. The safest thing is to call \fBTk_SetWindowVisual\fR immediately
  58. after calling \fBTk_CreateWindow\fR.
  59. If \fItkwin\fR has already been created before \fBTk_SetWindowVisual\fR
  60. is called then it returns 0 and doesn't make any changes;  otherwise
  61. it returns 1 to signify that the operation
  62. completed successfully.
  63. .PP
  64. Note:  \fBTk_SetWindowVisual\fR should not be called if you just want
  65. to change a window's colormap without changing its visual or depth;
  66. call \fBTk_SetWindowColormap\fR instead.
  67.  
  68. .SH KEYWORDS
  69. colormap, depth, visual
  70.