1Tk_WindowId(3)               Tk Library Procedures              Tk_WindowId(3)
2
3
4
5______________________________________________________________________________
6

NAME

8       Tk_WindowId,  Tk_Parent,  Tk_Display,  Tk_DisplayName, Tk_ScreenNumber,
9       Tk_Screen, Tk_X, Tk_Y, Tk_Width, Tk_Height, Tk_Changes,  Tk_Attributes,
10       Tk_IsContainer, Tk_IsEmbedded, Tk_IsMapped, Tk_IsTopLevel, Tk_ReqWidth,
11       Tk_ReqHeight, Tk_MinReqWidth,  Tk_MinReqHeight,  Tk_InternalBorderLeft,
12       Tk_InternalBorderRight,  Tk_InternalBorderTop, Tk_InternalBorderBottom,
13       Tk_Visual, Tk_Depth, Tk_Colormap,  Tk_Interp   -  retrieve  information
14       from Tk's local data structure
15

SYNOPSIS

17       #include <tk.h>
18
19       Window
20       Tk_WindowId(tkwin)
21
22       Tk_Window
23       Tk_Parent(tkwin)
24
25       Display *
26       Tk_Display(tkwin)
27
28       const char *
29       Tk_DisplayName(tkwin)
30
31       int
32       Tk_ScreenNumber(tkwin)
33
34       Screen *
35       Tk_Screen(tkwin)
36
37       int
38       Tk_X(tkwin)
39
40       int
41       Tk_Y(tkwin)
42
43       int
44       Tk_Width(tkwin)
45
46       int
47       Tk_Height(tkwin)
48
49       XWindowChanges *
50       Tk_Changes(tkwin)
51
52       XSetWindowAttributes *
53       Tk_Attributes(tkwin)
54
55       int
56       Tk_IsContainer(tkwin)
57
58       int
59       Tk_IsEmbedded(tkwin)
60
61       int
62       Tk_IsMapped(tkwin)
63
64       int
65       Tk_IsTopLevel(tkwin)
66
67       int
68       Tk_ReqWidth(tkwin)
69
70       int
71       Tk_ReqHeight(tkwin)
72
73       int
74       Tk_MinReqWidth(tkwin)
75
76       int
77       Tk_MinReqHeight(tkwin)
78
79       int
80       Tk_InternalBorderLeft(tkwin)
81
82       int
83       Tk_InternalBorderRight(tkwin)
84
85       int
86       Tk_InternalBorderTop(tkwin)
87
88       int
89       Tk_InternalBorderBottom(tkwin)
90
91       Visual *
92       Tk_Visual(tkwin)
93
94       int
95       Tk_Depth(tkwin)
96
97       Colormap
98       Tk_Colormap(tkwin)
99
100       Tcl_Interp *
101       Tk_Interp(tkwin)
102

ARGUMENTS

104       Tk_Window tkwin (in)          Token for window.
105______________________________________________________________________________
106

DESCRIPTION

108       Tk_WindowId and the other names listed above are all macros that return
109       fields from Tk's local data structure for tkwin.  None of these  macros
110       requires  any  interaction  with the server;  it is safe to assume that
111       all are fast.
112
113       Tk_WindowId returns the X identifier for tkwin, or NULL if no X  window
114       has been created for tkwin yet.
115
116       Tk_Parent returns Tk's token for the logical parent of tkwin.  The par‐
117       ent is the token that was specified when tkwin was created, or NULL for
118       main windows.
119
120       Tk_Interp  returns  the Tcl interpreter associated with a tkwin or NULL
121       if there is an error.
122
123       Tk_Display returns a pointer to the Xlib display structure  correspond‐
124       ing  to  tkwin.   Tk_DisplayName  returns  an  ASCII string identifying
125       tkwin's display.  Tk_ScreenNumber returns the index of  tkwin's  screen
126       among  all the screens of tkwin's display.  Tk_Screen returns a pointer
127       to the Xlib structure corresponding to tkwin's screen.
128
129       Tk_X, Tk_Y, Tk_Width, and Tk_Height return  information  about  tkwin's
130       location  within  its  parent  and  its size.  The location information
131       refers to the upper-left pixel in the window, or its border if there is
132       one.   The  width and height information refers to the interior size of
133       the window, not including any border.  Tk_Changes returns a pointer  to
134       a  structure  containing  all of the above information plus a few other
135       fields.  Tk_Attributes returns a  pointer  to  an  XSetWindowAttributes
136       structure  describing all of the attributes of the tkwin's window, such
137       as background pixmap, event mask, and so on (Tk keeps track of all this
138       information  as  it is changed by the application).  Note: it is essen‐
139       tial that applications use Tk procedures like  Tk_ResizeWindow  instead
140       of X procedures like XResizeWindow, so that Tk can keep its data struc‐
141       tures up-to-date.
142
143       Tk_IsContainer returns a non-zero value if tkwin is  a  container,  and
144       that some other application may be embedding itself inside tkwin.
145
146       Tk_IsEmbedded  returns a non-zero value if tkwin is not a free-standing
147       window, but rather is embedded in some other application.
148
149       Tk_IsMapped returns a non-zero value if tkwin is  mapped  and  zero  if
150       tkwin is not mapped.
151
152       Tk_IsTopLevel  returns  a non-zero value if tkwin is a top-level window
153       (its X parent is the root window of the screen) and zero  if  tkwin  is
154       not a top-level window.
155
156       Tk_ReqWidth  and  Tk_ReqHeight  return  information  about the window's
157       requested size.  These values correspond to the last call to  Tk_Geome‐
158       tryRequest for tkwin.
159
160       Tk_MinReqWidth  and  Tk_MinReqHeight  return information about the win‐
161       dow's minimum requested size.  These values correspond to the last call
162       to Tk_SetMinimumRequestSize for tkwin.
163
164       Tk_InternalBorderLeft, Tk_InternalBorderRight, Tk_InternalBorderTop and
165       Tk_InternalBorderBottom return the width of one side  of  the  internal
166       border  that  has  been requested for tkwin, or 0 if no internal border
167       was requested.  The return value is simply the  last  value  passed  to
168       Tk_SetInternalBorder or Tk_SetInternalBorderEx for tkwin.
169
170       Tk_Visual,  Tk_Depth, and Tk_Colormap return information about the vis‐
171       ual characteristics of a window.  Tk_Visual returns the visual type for
172       the  window, Tk_Depth returns the number of bits per pixel, and Tk_Col‐
173       ormap returns the current colormap for the window.  The visual  charac‐
174       teristics  are  normally set from the defaults for the window's screen,
175       but they may be overridden by calling Tk_SetWindowVisual.
176

KEYWORDS

178       attributes, colormap, depth, display, height, geometry manager, identi‐
179       fier, mapped, requested size, screen, top-level, visual, width, window,
180       x, y
181
182
183
184Tk                                    8.4                       Tk_WindowId(3)
Impressum