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

  1. '\"
  2. '\" Copyright (c) 1990-1993 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/WindowId.3,v 1.9 93/04/01 09:42:00 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS Tk_WindowId tkc
  25. .BS
  26. .SH NAME
  27. Tk_WindowId, Tk_Parent, Tk_Display, Tk_DisplayName, Tk_ScreenNumber, Tk_Screen, Tk_X, Tk_Y, Tk_Width, Tk_Height, Tk_Changes, Tk_Attributes, Tk_IsMapped, Tk_IsTopLevel, Tk_ReqWidth, Tk_ReqHeight, Tk_InternalBorderWidth, Tk_Visual, Tk_Depth, Tk_Colormap  \- retrieve information from Tk's local data structure
  28. .SH SYNOPSIS
  29. .nf
  30. \fB#include <tk.h>\fR
  31. .sp
  32. Window
  33. \fBTk_WindowId\fR(\fItkwin\fR)
  34. .sp
  35. Tk_Window
  36. \fBTk_Parent\fR(\fItkwin\fR)
  37. .sp
  38. Display *
  39. \fBTk_Display\fR(\fItkwin\fR)
  40. .sp
  41. char *
  42. \fBTk_DisplayName\fR(\fItkwin\fR)
  43. .sp
  44. int
  45. \fBTk_ScreenNumber\fR(\fItkwin\fR)
  46. .sp
  47. Screen *
  48. \fBTk_Screen\fR(\fItkwin\fR)
  49. .sp
  50. int
  51. \fBTk_X\fR(\fItkwin\fR)
  52. .sp
  53. int
  54. \fBTk_Y\fR(\fItkwin\fR)
  55. .sp
  56. int
  57. \fBTk_Width\fR(\fItkwin\fR)
  58. .sp
  59. int
  60. \fBTk_Height\fR(\fItkwin\fR)
  61. .sp
  62. XWindowChanges *
  63. \fBTk_Changes\fR(\fItkwin\fR)
  64. .sp
  65. XSetWindowAttributes *
  66. \fBTk_Attributes\fR(\fItkwin\fR)
  67. .sp
  68. int
  69. \fBTk_IsMapped\fR(\fItkwin\fR)
  70. .sp
  71. .VS
  72. int
  73. \fBTk_IsTopLevel\fR(\fItkwin\fR)
  74. .VE
  75. .sp
  76. int
  77. \fBTk_ReqWidth\fR(\fItkwin\fR)
  78. .sp
  79. int
  80. .br
  81. \fBTk_ReqHeight\fR(\fItkwin\fR)
  82. .sp
  83. int
  84. .br
  85. \fBTk_InternalBorderWidth\fR(\fItkwin\fR)
  86. .sp
  87. .VS
  88. Visual *
  89. .br
  90. \fBTk_Visual\fR(\fItkwin\fR)
  91. .sp
  92. int
  93. .br
  94. \fBTk_Depth\fR(\fItkwin\fR)
  95. .sp
  96. Colormap
  97. .br
  98. \fBTk_Colormap\fR(\fItkwin\fR)
  99. .VE
  100. .SH ARGUMENTS
  101. .AS Tk_Window tkwin
  102. .AP Tk_Window tkwin in
  103. Token for window.
  104. .BE
  105.  
  106. .SH DESCRIPTION
  107. .PP
  108. \fBTk_WindowID\fR and the other names listed above are
  109. all macros that return fields from Tk's local data structure
  110. for \fItkwin\fR.  None of these macros requires any
  111. interaction with the server;  it is safe to assume that
  112. all are fast.
  113. .PP
  114. \fBTk_WindowId\fR returns the X identifier for \fItkwin\fR,
  115. or \fBNULL\fR if no X window has been created for \fItkwin\fR
  116. yet (see the \fBTk_CreateMainWindow\fR manual entry for details).
  117. .PP
  118. \fBTk_Parent\fR returns Tk's token for the logical parent of
  119. \fItkwin\fR.  The parent is the token that was specified when
  120. \fItkwin\fR was created, or NULL for main windows.
  121. .PP
  122. \fBTk_Display\fR returns a pointer to the Xlib display structure
  123. corresponding to \fItkwin\fR.  \fBTk_DisplayName\fR returns an
  124. ASCII string identifying \fItkwin\fR's display.  \fBTk_ScreenNumber\fR
  125. returns the index of \fItkwin\fR's screen among all the screens
  126. of \fItkwin\fR's display.  \fBTk_Screen\fR returns a pointer to
  127. the Xlib structure corresponding to \fItkwin\fR's screen.
  128. .PP
  129. \fBTk_X\fR, \fBTk_Y\fR, \fBTk_Width\fR, and \fBTk_Height\fR
  130. return information about \fItkwin's\fR location within its
  131. parent and its size.  The location information refers to the
  132. upper-left pixel in the window, or its border if there is one.
  133. The width and height information refers to the interior size
  134. of the window, not including any border.  \fBTk_Changes\fR
  135. returns a pointer to a structure containing all of the above
  136. information plus a few other fields.  \fBTk_Attributes\fR
  137. returns a pointer to an XSetWindowAttributes structure describing
  138. all of the attributes of the \fItkwin\fR's window, such as background
  139. pixmap, event mask, and so on (Tk keeps track of all this information
  140. as it is changed by the application).  Note: it is essential that
  141. applications use Tk procedures like \fBTk_ResizeWindow\fR instead
  142. of X procedures like \fBXResizeWindow\fR, so that Tk can keep its
  143. data structures up-to-date.
  144. .PP
  145. \fBTk_IsMapped\fR returns a non-zero value if \fItkwin\fR
  146. is mapped and zero if \fItkwin\fR isn't mapped.
  147. .PP
  148. .VS
  149. \fBTk_IsTopLevel\fR returns a non-zero value if \fItkwin\fR
  150. is a top-level window (its X parent is the root window of the
  151. screen) and zero if \fItkwin\fR isn't a top-level window.
  152. .VE
  153. .PP
  154. \fBTk_ReqWidth\fR and \fBTk_ReqHeight\fR return information about
  155. the window's requested size.  These values correspond to the last
  156. call to \fBTk_GeometryRequest\fR for \fItkwin\fR.
  157. .PP
  158. \fBTk_InternalBorderWidth\fR returns the width of internal border
  159. that has been requested for \fItkwin\fR, or 0 if no internal border
  160. was requested.  The return value is simply the last value passed
  161. to \fBTk_SetInternalBorder\fR for \fItkwin\fR.
  162. .PP
  163. .VS
  164. \fBTk_Visual\fR, \fBTk_Depth\fR, and \fBTk_Colormap\fR return
  165. information about the visual characteristics of a window.
  166. \fBTk_Visual\fR returns the visual type for
  167. the window, \fBTk_Depth\fR returns the number of bits per pixel,
  168. and \fBTk_Colormap\fR returns the current
  169. colormap for the window.  The visual characteristics are
  170. normally set from the defaults for the window's screen, but
  171. they may be overridden by calling \fBTk_SetWindowVisual\fR.
  172. .VE
  173.  
  174. .SH KEYWORDS
  175. attributes, colormap, depth, display, height, geometry manager,
  176. identifier, mapped, requested size, screen, top-level,
  177. visual, width, window, x, y
  178.