1xcb_create_window(3) XCB Requests xcb_create_window(3)
2
3
4
6 xcb_create_window - Creates a window
7
9 #include <xcb/xproto.h>
10
11 Request function
12 xcb_void_cookie_t xcb_create_window(xcb_connection_t *conn,
13 uint8_t depth, xcb_window_t wid, xcb_window_t parent, int16_t x,
14 int16_t y, uint16_t width, uint16_t height,
15 uint16_t border_width, uint16_t _class, xcb_visualid_t visual,
16 uint32_t value_mask, const void *value_list);
17
19 conn The XCB connection to X11.
20
21 depth Specifies the new window's depth (TODO: what unit?).
22
23 The special value XCB_COPY_FROM_PARENT means the depth is
24 taken from the parent window.
25
26 wid The ID with which you will refer to the new window, created
27 by xcb_generate_id.
28
29 parent The parent window of the new window.
30
31 x The X coordinate of the new window.
32
33 y The Y coordinate of the new window.
34
35 width The width of the new window.
36
37 height The height of the new window.
38
39 border_width
40 TODO:
41
42 Must be zero if the class is InputOnly or a xcb_match_error_t
43 occurs.
44
45 _class One of the following values:
46
47 XCB_WINDOW_CLASS_COPY_FROM_PARENT
48 TODO: NOT YET DOCUMENTED.
49
50 XCB_WINDOW_CLASS_INPUT_OUTPUT
51 TODO: NOT YET DOCUMENTED.
52
53 XCB_WINDOW_CLASS_INPUT_ONLY
54 TODO: NOT YET DOCUMENTED.
55
56
57
58 visual Specifies the id for the new window's visual.
59
60 The special value XCB_COPY_FROM_PARENT means the visual is
61 taken from the parent window.
62
63 value_mask
64 One of the following values:
65
66 XCB_CW_BACK_PIXMAP
67 Overrides the default background-pixmap. The back‐
68 ground pixmap and window must have the same root
69 and same depth. Any size pixmap can be used, al‐
70 though some sizes may be faster than others.
71
72 If XCB_BACK_PIXMAP_NONE is specified, the window
73 has no defined background. The server may fill the
74 contents with the previous screen contents or with
75 contents of its own choosing.
76
77 If XCB_BACK_PIXMAP_PARENT_RELATIVE is specified,
78 the parent's background is used, but the window
79 must have the same depth as the parent (or a Match
80 error results). The parent's background is
81 tracked, and the current version is used each time
82 the window background is required.
83
84 XCB_CW_BACK_PIXEL
85 Overrides BackPixmap. A pixmap of undefined size
86 filled with the specified background pixel is used
87 for the background. Range-checking is not per‐
88 formed, the background pixel is truncated to the
89 appropriate number of bits.
90
91 XCB_CW_BORDER_PIXMAP
92 Overrides the default border-pixmap. The border
93 pixmap and window must have the same root and the
94 same depth. Any size pixmap can be used, although
95 some sizes may be faster than others.
96
97 The special value XCB_COPY_FROM_PARENT means the
98 parent's border pixmap is copied (subsequent
99 changes to the parent's border attribute do not af‐
100 fect the child), but the window must have the same
101 depth as the parent.
102
103 XCB_CW_BORDER_PIXEL
104 Overrides BorderPixmap. A pixmap of undefined size
105 filled with the specified border pixel is used for
106 the border. Range checking is not performed on the
107 border-pixel value, it is truncated to the appro‐
108 priate number of bits.
109
110 XCB_CW_BIT_GRAVITY
111 Defines which region of the window should be re‐
112 tained if the window is resized.
113
114 XCB_CW_WIN_GRAVITY
115 Defines how the window should be repositioned if
116 the parent is resized (see ConfigureWindow).
117
118 XCB_CW_BACKING_STORE
119 A backing-store of WhenMapped advises the server
120 that maintaining contents of obscured regions when
121 the window is mapped would be beneficial. A back‐
122 ing-store of Always advises the server that main‐
123 taining contents even when the window is unmapped
124 would be beneficial. In this case, the server may
125 generate an exposure event when the window is cre‐
126 ated. A value of NotUseful advises the server that
127 maintaining contents is unnecessary, although a
128 server may still choose to maintain contents while
129 the window is mapped. Note that if the server main‐
130 tains contents, then the server should maintain
131 complete contents not just the region within the
132 parent boundaries, even if the window is larger
133 than its parent. While the server maintains con‐
134 tents, exposure events will not normally be gener‐
135 ated, but the server may stop maintaining contents
136 at any time.
137
138 XCB_CW_BACKING_PLANES
139 The backing-planes indicates (with bits set to 1)
140 which bit planes of the window hold dynamic data
141 that must be preserved in backing-stores and during
142 save-unders.
143
144 XCB_CW_BACKING_PIXEL
145 The backing-pixel specifies what value to use in
146 planes not covered by backing-planes. The server is
147 free to save only the specified bit planes in the
148 backing-store or save-under and regenerate the re‐
149 maining planes with the specified pixel value. Any
150 bits beyond the specified depth of the window in
151 these values are simply ignored.
152
153 XCB_CW_OVERRIDE_REDIRECT
154 The override-redirect specifies whether map and
155 configure requests on this window should override a
156 SubstructureRedirect on the parent, typically to
157 inform a window manager not to tamper with the win‐
158 dow.
159
160 XCB_CW_SAVE_UNDER
161 If 1, the server is advised that when this window
162 is mapped, saving the contents of windows it ob‐
163 scures would be beneficial.
164
165 XCB_CW_EVENT_MASK
166 The event-mask defines which events the client is
167 interested in for this window (or for some event
168 types, inferiors of the window).
169
170 XCB_CW_DONT_PROPAGATE
171 The do-not-propagate-mask defines which events
172 should not be propagated to ancestor windows when
173 no client has the event type selected in this win‐
174 dow.
175
176 XCB_CW_COLORMAP
177 The colormap specifies the colormap that best re‐
178 flects the true colors of the window. Servers capa‐
179 ble of supporting multiple hardware colormaps may
180 use this information, and window man- agers may use
181 it for InstallColormap requests. The colormap must
182 have the same visual type and root as the window
183 (or a Match error results). If CopyFromParent is
184 specified, the parent's colormap is copied (subse‐
185 quent changes to the parent's colormap attribute do
186 not affect the child). However, the window must
187 have the same visual type as the parent (or a Match
188 error results), and the parent must not have a col‐
189 ormap of None (or a Match error results). For an
190 explanation of None, see FreeColormap request. The
191 colormap is copied by sharing the colormap object
192 between the child and the parent, not by making a
193 complete copy of the colormap contents.
194
195 XCB_CW_CURSOR
196 If a cursor is specified, it will be used whenever
197 the pointer is in the window. If None is speci-
198 fied, the parent's cursor will be used when the
199 pointer is in the window, and any change in the
200 parent's cursor will cause an immediate change in
201 the displayed cursor.
202 TODO: NOT YET DOCUMENTED.
203
204 value_list
205 TODO: NOT YET DOCUMENTED.
206
208 Creates an unmapped window as child of the specified parent window. A
209 CreateNotify event will be generated. The new window is placed on top
210 in the stacking order with respect to siblings.
211
212 The coordinate system has the X axis horizontal and the Y axis vertical
213 with the origin [0, 0] at the upper-left corner. Coordinates are inte‐
214 gral, in terms of pixels, and coincide with pixel centers. Each window
215 and pixmap has its own coordinate system. For a window, the origin is
216 inside the border at the inside, upper-left corner.
217
218 The created window is not yet displayed (mapped), call xcb_map_window
219 to display it.
220
221 The created window will initially use the same cursor as its parent.
222
224 Returns an xcb_void_cookie_t. Errors (if any) have to be handled in the
225 event loop.
226
227 If you want to handle errors directly with xcb_request_check instead,
228 use xcb_create_window_checked. See xcb-requests(3) for details.
229
231 xcb_alloc_error_t
232 The X server could not allocate the requested resources (no
233 memory?).
234
235 xcb_colormap_error_t
236 TODO: reasons?
237
238 xcb_cursor_error_t
239 TODO: reasons?
240
241 xcb_match_error_t
242 TODO: reasons?
243
244 xcb_pixmap_error_t
245 TODO: reasons?
246
247 xcb_value_error_t
248 TODO: reasons?
249
250 xcb_window_error_t
251 TODO: reasons?
252
254 xcb-requests(3), xcb_create_notify_event_t(3), xcb_map_window(3),
255 xcb_generate_id(3)
256
258 Generated from xproto.xml. Contact xcb@lists.freedesktop.org for cor‐
259 rections and improvements.
260
261
262
263X Version 11 libxcb 1.13 xcb_create_window(3)