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
107

DESCRIPTION

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

KEYWORDS

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