Debian Codegraph @

pod/pTk/WindowId.pod

raw
1 # Copyright (c) 1990-1993 The Regents of the University of California.
2 # Copyright (c) 1994-1997 Sun Microsystems, Inc.
3 # See the file "license.terms" for information on usage and redistribution
4 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
5 #
6 #
7
8 =head1 NAME
9
10 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
11
12 =for category C Programming
13
14 =head1 SYNOPSIS
15
16 B<#include E<lt>tk.hE<gt>>
17
18 Window
19 B<Tk_WindowId>(I<tkwin>)
20
21 Tk_Window
22 B<Tk_Parent>(I<tkwin>)
23
24 Display *
25 B<Tk_Display>(I<tkwin>)
26
27 char *
28 B<Tk_DisplayName>(I<tkwin>)
29
30 int
31 B<Tk_ScreenNumber>(I<tkwin>)
32
33 Screen *
34 B<Tk_Screen>(I<tkwin>)
35
36 int
37 B<Tk_X>(I<tkwin>)
38
39 int
40 B<Tk_Y>(I<tkwin>)
41
42 int
43 B<Tk_Width>(I<tkwin>)
44
45 int
46 B<Tk_Height>(I<tkwin>)
47
48 XWindowChanges *
49 B<Tk_Changes>(I<tkwin>)
50
51 XSetWindowAttributes *
52 B<Tk_Attributes>(I<tkwin>)
53
54 int
55 B<Tk_IsMapped>(I<tkwin>)
56
57 int
58 B<Tk_IsTopLevel>(I<tkwin>)
59
60 int
61 B<Tk_ReqWidth>(I<tkwin>)
62
63 int
64 B<Tk_ReqHeight>(I<tkwin>)
65
66 int
67 B<Tk_InternalBorderWidth>(I<tkwin>)
68
69 Visual *
70 B<Tk_Visual>(I<tkwin>)
71
72 int
73 B<Tk_Depth>(I<tkwin>)
74
75 Colormap
76 B<Tk_Colormap>(I<tkwin>)
77
78 =head1 ARGUMENTS
79
80 =over 4
81
82 =item Tk_Window tkwin (in)
83
84 Token for window.
85
86 =back
87
88 =head1 DESCRIPTION
89
90 B<Tk_WindowID> and the other names listed above are
91 all macros that return fields from Tk's local data structure
92 for I<tkwin>. None of these macros requires any
93 interaction with the server; it is safe to assume that
94 all are fast.
95
96 B<Tk_WindowId> returns the X identifier for I<tkwin>,
97 or B<NULL> if no X window has been created for I<tkwin>
98 yet.
99
100 B<Tk_Parent> returns Tk's token for the logical parent of
101 I<tkwin>. The parent is the token that was specified when
102 I<tkwin> was created, or NULL for main windows.
103
104 B<Tk_Display> returns a pointer to the Xlib display structure
105 corresponding to I<tkwin>. B<Tk_DisplayName> returns an
106 ASCII string identifying I<tkwin>'s display. B<Tk_ScreenNumber>
107 returns the index of I<tkwin>'s screen among all the screens
108 of I<tkwin>'s display. B<Tk_Screen> returns a pointer to
109 the Xlib structure corresponding to I<tkwin>'s screen.
110
111 B<Tk_X>, B<Tk_Y>, B<Tk_Width>, and B<Tk_Height>
112 return information about I<tkwin's> location within its
113 parent and its size. The location information refers to the
114 upper-left pixel in the window, or its border if there is one.
115 The width and height information refers to the interior size
116 of the window, not including any border. B<Tk_Changes>
117 returns a pointer to a structure containing all of the above
118 information plus a few other fields. B<Tk_Attributes>
119 returns a pointer to an XSetWindowAttributes structure describing
120 all of the attributes of the I<tkwin>'s window, such as background
121 pixmap, event mask, and so on (Tk keeps track of all this information
122 as it is changed by the application). Note: it is essential that
123 applications use Tk procedures like B<Tk_ResizeWindow> instead
124 of X procedures like B<XResizeWindow>, so that Tk can keep its
125 data structures up-to-date.
126
127 B<Tk_IsMapped> returns a non-zero value if I<tkwin>
128 is mapped and zero if I<tkwin> isn't mapped.
129
130 B<Tk_IsTopLevel> returns a non-zero value if I<tkwin>
131 is a top-level window (its X parent is the root window of the
132 screen) and zero if I<tkwin> isn't a top-level window.
133
134 B<Tk_ReqWidth> and B<Tk_ReqHeight> return information about
135 the window's requested size. These values correspond to the last
136 call to B<Tk_GeometryRequest> for I<tkwin>.
137
138 B<Tk_InternalBorderWidth> returns the width of internal border
139 that has been requested for I<tkwin>, or 0 if no internal border
140 was requested. The return value is simply the last value passed
141 to B<Tk_SetInternalBorder> for I<tkwin>.
142
143 B<Tk_Visual>, B<Tk_Depth>, and B<Tk_Colormap> return
144 information about the visual characteristics of a window.
145 B<Tk_Visual> returns the visual type for
146 the window, B<Tk_Depth> returns the number of bits per pixel,
147 and B<Tk_Colormap> returns the current
148 colormap for the window. The visual characteristics are
149 normally set from the defaults for the window's screen, but
150 they may be overridden by calling B<Tk_SetWindowVisual>.
151
152 =head1 KEYWORDS
153
154 attributes, colormap, depth, display, height, geometry manager,
155 identifier, mapped, requested size, screen, top-level,
156 visual, width, window, x, y