| @@ -0,0 +1,5617 @@ |
| 1 | + | <?xml version="1.0" encoding="utf-8"?> |
| 2 | + | <!-- |
| 3 | + | Copyright (C) 2001-2004 Bart Massey, Jamey Sharp, and Josh Triplett. |
| 4 | + | All Rights Reserved. |
| 5 | + | |
| 6 | + | Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | + | of this software and associated documentation files (the "Software"), to deal |
| 8 | + | in the Software without restriction, including without limitation the rights |
| 9 | + | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 10 | + | copies of the Software, and to permit persons to whom the Software is |
| 11 | + | furnished to do so, subject to the following conditions: |
| 12 | + | |
| 13 | + | The above copyright notice and this permission notice shall be included in all |
| 14 | + | copies or substantial portions of the Software. |
| 15 | + | |
| 16 | + | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | + | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | + | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | + | AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN |
| 20 | + | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
| 21 | + | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 22 | + | |
| 23 | + | Except as contained in this notice, the names of the authors or their |
| 24 | + | institutions shall not be used in advertising or otherwise to promote the |
| 25 | + | sale, use or other dealings in this Software without prior written |
| 26 | + | authorization from the authors. |
| 27 | + | --> |
| 28 | + | <xcb header="xproto"> |
| 29 | + | <!-- Core protocol types --> |
| 30 | + | |
| 31 | + | <struct name="CHAR2B"> |
| 32 | + | <field type="CARD8" name="byte1" /> |
| 33 | + | <field type="CARD8" name="byte2" /> |
| 34 | + | </struct> |
| 35 | + | |
| 36 | + | <xidtype name="WINDOW" /> |
| 37 | + | |
| 38 | + | <xidtype name="PIXMAP" /> |
| 39 | + | |
| 40 | + | <xidtype name="CURSOR" /> |
| 41 | + | |
| 42 | + | <xidtype name="FONT" /> |
| 43 | + | |
| 44 | + | <xidtype name="GCONTEXT" /> |
| 45 | + | |
| 46 | + | <xidtype name="COLORMAP" /> |
| 47 | + | |
| 48 | + | <xidtype name="ATOM" /> |
| 49 | + | |
| 50 | + | <xidunion name="DRAWABLE"> |
| 51 | + | <type>WINDOW</type> |
| 52 | + | <type>PIXMAP</type> |
| 53 | + | </xidunion> |
| 54 | + | |
| 55 | + | <xidunion name="FONTABLE"> |
| 56 | + | <type>FONT</type> |
| 57 | + | <type>GCONTEXT</type> |
| 58 | + | </xidunion> |
| 59 | + | |
| 60 | + | <typedef oldname="CARD32" newname="BOOL32" /> |
| 61 | + | <typedef oldname="CARD32" newname="VISUALID" /> |
| 62 | + | |
| 63 | + | <typedef oldname="CARD32" newname="TIMESTAMP" /> |
| 64 | + | |
| 65 | + | <typedef oldname="CARD32" newname="KEYSYM" /> |
| 66 | + | |
| 67 | + | <typedef oldname="CARD8" newname="KEYCODE" /> |
| 68 | + | |
| 69 | + | <typedef oldname="CARD32" newname="KEYCODE32" /> |
| 70 | + | |
| 71 | + | <typedef oldname="CARD8" newname="BUTTON" /> |
| 72 | + | |
| 73 | + | <struct name="POINT"> |
| 74 | + | <field type="INT16" name="x" /> |
| 75 | + | <field type="INT16" name="y" /> |
| 76 | + | </struct> |
| 77 | + | |
| 78 | + | <struct name="RECTANGLE"> |
| 79 | + | <field type="INT16" name="x" /> |
| 80 | + | <field type="INT16" name="y" /> |
| 81 | + | <field type="CARD16" name="width" /> |
| 82 | + | <field type="CARD16" name="height" /> |
| 83 | + | </struct> |
| 84 | + | |
| 85 | + | <struct name="ARC"> |
| 86 | + | <field type="INT16" name="x" /> |
| 87 | + | <field type="INT16" name="y" /> |
| 88 | + | <field type="CARD16" name="width" /> |
| 89 | + | <field type="CARD16" name="height" /> |
| 90 | + | <field type="INT16" name="angle1" /> |
| 91 | + | <field type="INT16" name="angle2" /> |
| 92 | + | </struct> |
| 93 | + | |
| 94 | + | <!-- Connection setup-related types --> |
| 95 | + | |
| 96 | + | <struct name="FORMAT"> |
| 97 | + | <field type="CARD8" name="depth" /> |
| 98 | + | <field type="CARD8" name="bits_per_pixel" /> |
| 99 | + | <field type="CARD8" name="scanline_pad" /> |
| 100 | + | <pad bytes="5" /> |
| 101 | + | </struct> |
| 102 | + | |
| 103 | + | <enum name="VisualClass"> |
| 104 | + | <item name="StaticGray"> <value>0</value></item> |
| 105 | + | <item name="GrayScale"> <value>1</value></item> |
| 106 | + | <item name="StaticColor"><value>2</value></item> |
| 107 | + | <item name="PseudoColor"><value>3</value></item> |
| 108 | + | <item name="TrueColor"> <value>4</value></item> |
| 109 | + | <item name="DirectColor"><value>5</value></item> |
| 110 | + | </enum> |
| 111 | + | |
| 112 | + | <struct name="VISUALTYPE"> |
| 113 | + | <field type="VISUALID" name="visual_id" /> |
| 114 | + | <field type="CARD8" name="class" enum="VisualClass" /> |
| 115 | + | <field type="CARD8" name="bits_per_rgb_value" /> |
| 116 | + | <field type="CARD16" name="colormap_entries" /> |
| 117 | + | <field type="CARD32" name="red_mask" /> |
| 118 | + | <field type="CARD32" name="green_mask" /> |
| 119 | + | <field type="CARD32" name="blue_mask" /> |
| 120 | + | <pad bytes="4" /> |
| 121 | + | </struct> |
| 122 | + | |
| 123 | + | <struct name="DEPTH"> |
| 124 | + | <field type="CARD8" name="depth" /> |
| 125 | + | <pad bytes="1" /> |
| 126 | + | <field type="CARD16" name="visuals_len" /> |
| 127 | + | <pad bytes="4" /> |
| 128 | + | <list type="VISUALTYPE" name="visuals"> |
| 129 | + | <fieldref>visuals_len</fieldref> |
| 130 | + | </list> |
| 131 | + | </struct> |
| 132 | + | |
| 133 | + | <enum name="EventMask"> |
| 134 | + | <item name="NoEvent"> <value>0</value></item> |
| 135 | + | <item name="KeyPress"> <bit>0</bit></item> |
| 136 | + | <item name="KeyRelease"> <bit>1</bit></item> |
| 137 | + | <item name="ButtonPress"> <bit>2</bit></item> |
| 138 | + | <item name="ButtonRelease"> <bit>3</bit></item> |
| 139 | + | <item name="EnterWindow"> <bit>4</bit></item> |
| 140 | + | <item name="LeaveWindow"> <bit>5</bit></item> |
| 141 | + | <item name="PointerMotion"> <bit>6</bit></item> |
| 142 | + | <item name="PointerMotionHint"> <bit>7</bit></item> |
| 143 | + | <item name="Button1Motion"> <bit>8</bit></item> |
| 144 | + | <item name="Button2Motion"> <bit>9</bit></item> |
| 145 | + | <item name="Button3Motion"> <bit>10</bit></item> |
| 146 | + | <item name="Button4Motion"> <bit>11</bit></item> |
| 147 | + | <item name="Button5Motion"> <bit>12</bit></item> |
| 148 | + | <item name="ButtonMotion"> <bit>13</bit></item> |
| 149 | + | <item name="KeymapState"> <bit>14</bit></item> |
| 150 | + | <item name="Exposure"> <bit>15</bit></item> |
| 151 | + | <item name="VisibilityChange"> <bit>16</bit></item> |
| 152 | + | <item name="StructureNotify"> <bit>17</bit></item> |
| 153 | + | <item name="ResizeRedirect"> <bit>18</bit></item> |
| 154 | + | <item name="SubstructureNotify"> <bit>19</bit></item> |
| 155 | + | <item name="SubstructureRedirect"><bit>20</bit></item> |
| 156 | + | <item name="FocusChange"> <bit>21</bit></item> |
| 157 | + | <item name="PropertyChange"> <bit>22</bit></item> |
| 158 | + | <item name="ColorMapChange"> <bit>23</bit></item> |
| 159 | + | <item name="OwnerGrabButton"> <bit>24</bit></item> |
| 160 | + | </enum> |
| 161 | + | |
| 162 | + | <enum name="BackingStore"> |
| 163 | + | <item name="NotUseful"> <value>0</value></item> |
| 164 | + | <item name="WhenMapped"><value>1</value></item> |
| 165 | + | <item name="Always"> <value>2</value></item> |
| 166 | + | </enum> |
| 167 | + | |
| 168 | + | <struct name="SCREEN"> |
| 169 | + | <field type="WINDOW" name="root" /> |
| 170 | + | <field type="COLORMAP" name="default_colormap" /> |
| 171 | + | <field type="CARD32" name="white_pixel" /> |
| 172 | + | <field type="CARD32" name="black_pixel" /> |
| 173 | + | <field type="CARD32" name="current_input_masks" mask="EventMask" /> |
| 174 | + | <field type="CARD16" name="width_in_pixels" /> |
| 175 | + | <field type="CARD16" name="height_in_pixels" /> |
| 176 | + | <field type="CARD16" name="width_in_millimeters" /> |
| 177 | + | <field type="CARD16" name="height_in_millimeters" /> |
| 178 | + | <field type="CARD16" name="min_installed_maps" /> |
| 179 | + | <field type="CARD16" name="max_installed_maps" /> |
| 180 | + | <field type="VISUALID" name="root_visual" /> |
| 181 | + | <field type="BYTE" name="backing_stores" enum="BackingStore" /> |
| 182 | + | <field type="BOOL" name="save_unders" /> |
| 183 | + | <field type="CARD8" name="root_depth" /> |
| 184 | + | <field type="CARD8" name="allowed_depths_len" /> |
| 185 | + | <list type="DEPTH" name="allowed_depths"> |
| 186 | + | <fieldref>allowed_depths_len</fieldref> |
| 187 | + | </list> |
| 188 | + | </struct> |
| 189 | + | |
| 190 | + | <struct name="SetupRequest"> |
| 191 | + | <field type="CARD8" name="byte_order" /> |
| 192 | + | <pad bytes="1" /> |
| 193 | + | <field type="CARD16" name="protocol_major_version" /> |
| 194 | + | <field type="CARD16" name="protocol_minor_version" /> |
| 195 | + | <field type="CARD16" name="authorization_protocol_name_len" /> |
| 196 | + | <field type="CARD16" name="authorization_protocol_data_len" /> |
| 197 | + | <pad bytes="2" /> |
| 198 | + | <list type="char" name="authorization_protocol_name"> |
| 199 | + | <fieldref>authorization_protocol_name_len</fieldref> |
| 200 | + | </list> |
| 201 | + | <pad align="4" /> |
| 202 | + | <list type="char" name="authorization_protocol_data"> |
| 203 | + | <fieldref>authorization_protocol_data_len</fieldref> |
| 204 | + | </list> |
| 205 | + | <pad align="4" /> |
| 206 | + | </struct> |
| 207 | + | |
| 208 | + | <struct name="SetupFailed"> |
| 209 | + | <field type="CARD8" name="status" /> <!-- always 0 -> Failed --> |
| 210 | + | <field type="CARD8" name="reason_len" /> |
| 211 | + | <field type="CARD16" name="protocol_major_version" /> |
| 212 | + | <field type="CARD16" name="protocol_minor_version" /> |
| 213 | + | <field type="CARD16" name="length" /> |
| 214 | + | <list type="char" name="reason"> |
| 215 | + | <fieldref>reason_len</fieldref> |
| 216 | + | </list> |
| 217 | + | </struct> |
| 218 | + | |
| 219 | + | <struct name="SetupAuthenticate"> |
| 220 | + | <field type="CARD8" name="status" /> <!-- always 2 -> Authenticate --> |
| 221 | + | <pad bytes="5" /> |
| 222 | + | <field type="CARD16" name="length" /> |
| 223 | + | <list type="char" name="reason"> |
| 224 | + | <op op="*"> |
| 225 | + | <fieldref>length</fieldref> |
| 226 | + | <value>4</value> |
| 227 | + | </op> |
| 228 | + | </list> |
| 229 | + | </struct> |
| 230 | + | |
| 231 | + | <enum name="ImageOrder"> |
| 232 | + | <item name="LSBFirst"><value>0</value></item> |
| 233 | + | <item name="MSBFirst"><value>1</value></item> |
| 234 | + | </enum> |
| 235 | + | |
| 236 | + | <struct name="Setup"> |
| 237 | + | <field type="CARD8" name="status" /> <!-- always 1 -> Success --> |
| 238 | + | <pad bytes="1" /> |
| 239 | + | <field type="CARD16" name="protocol_major_version" /> |
| 240 | + | <field type="CARD16" name="protocol_minor_version" /> |
| 241 | + | <field type="CARD16" name="length" /> |
| 242 | + | <field type="CARD32" name="release_number" /> |
| 243 | + | <field type="CARD32" name="resource_id_base" /> |
| 244 | + | <field type="CARD32" name="resource_id_mask" /> |
| 245 | + | <field type="CARD32" name="motion_buffer_size" /> |
| 246 | + | <field type="CARD16" name="vendor_len" /> |
| 247 | + | <field type="CARD16" name="maximum_request_length" /> |
| 248 | + | <field type="CARD8" name="roots_len" /> |
| 249 | + | <field type="CARD8" name="pixmap_formats_len" /> |
| 250 | + | <field type="CARD8" name="image_byte_order" enum="ImageOrder" /> |
| 251 | + | <field type="CARD8" name="bitmap_format_bit_order" enum="ImageOrder" /> |
| 252 | + | <field type="CARD8" name="bitmap_format_scanline_unit" /> |
| 253 | + | <field type="CARD8" name="bitmap_format_scanline_pad" /> |
| 254 | + | <field type="KEYCODE" name="min_keycode" /> |
| 255 | + | <field type="KEYCODE" name="max_keycode" /> |
| 256 | + | <pad bytes="4" /> |
| 257 | + | <list type="char" name="vendor"> |
| 258 | + | <fieldref>vendor_len</fieldref> |
| 259 | + | </list> |
| 260 | + | <pad align="4" /> |
| 261 | + | <list type="FORMAT" name="pixmap_formats"> |
| 262 | + | <fieldref>pixmap_formats_len</fieldref> |
| 263 | + | </list> |
| 264 | + | <list type="SCREEN" name="roots"> |
| 265 | + | <fieldref>roots_len</fieldref> |
| 266 | + | </list> |
| 267 | + | </struct> |
| 268 | + | |
| 269 | + | <!-- Core event types --> |
| 270 | + | |
| 271 | + | <enum name="ModMask"> |
| 272 | + | <item name="Shift"> <bit>0</bit></item> |
| 273 | + | <item name="Lock"> <bit>1</bit></item> |
| 274 | + | <item name="Control"><bit>2</bit></item> |
| 275 | + | <item name="1"> <bit>3</bit></item> |
| 276 | + | <item name="2"> <bit>4</bit></item> |
| 277 | + | <item name="3"> <bit>5</bit></item> |
| 278 | + | <item name="4"> <bit>6</bit></item> |
| 279 | + | <item name="5"> <bit>7</bit></item> |
| 280 | + | <item name="Any"> <bit>15</bit></item> |
| 281 | + | </enum> |
| 282 | + | |
| 283 | + | <enum name="KeyButMask"> |
| 284 | + | <item name="Shift"> <bit>0</bit></item> |
| 285 | + | <item name="Lock"> <bit>1</bit></item> |
| 286 | + | <item name="Control"><bit>2</bit></item> |
| 287 | + | <item name="Mod1"> <bit>3</bit></item> |
| 288 | + | <item name="Mod2"> <bit>4</bit></item> |
| 289 | + | <item name="Mod3"> <bit>5</bit></item> |
| 290 | + | <item name="Mod4"> <bit>6</bit></item> |
| 291 | + | <item name="Mod5"> <bit>7</bit></item> |
| 292 | + | <item name="Button1"><bit>8</bit></item> |
| 293 | + | <item name="Button2"><bit>9</bit></item> |
| 294 | + | <item name="Button3"><bit>10</bit></item> |
| 295 | + | <item name="Button4"><bit>11</bit></item> |
| 296 | + | <item name="Button5"><bit>12</bit></item> |
| 297 | + | </enum> |
| 298 | + | |
| 299 | + | <enum name="Window"> |
| 300 | + | <item name="None"> <value>0</value></item> |
| 301 | + | </enum> |
| 302 | + | |
| 303 | + | <event name="KeyPress" number="2"> |
| 304 | + | <field type="KEYCODE" name="detail" /> |
| 305 | + | <field type="TIMESTAMP" name="time" /> |
| 306 | + | <field type="WINDOW" name="root" /> |
| 307 | + | <field type="WINDOW" name="event" /> |
| 308 | + | <field type="WINDOW" name="child" altenum="Window" /> |
| 309 | + | <field type="INT16" name="root_x" /> |
| 310 | + | <field type="INT16" name="root_y" /> |
| 311 | + | <field type="INT16" name="event_x" /> |
| 312 | + | <field type="INT16" name="event_y" /> |
| 313 | + | <field type="CARD16" name="state" mask="KeyButMask" /> |
| 314 | + | <field type="BOOL" name="same_screen" /> |
| 315 | + | <pad bytes="1" /> |
| 316 | + | <doc> |
| 317 | + | <brief>a key was pressed/released</brief> |
| 318 | + | <field name="detail"><![CDATA[ |
| 319 | + | The keycode (a number representing a physical key on the keyboard) of the key |
| 320 | + | which was pressed. |
| 321 | + | ]]></field> |
| 322 | + | <field name="time"><![CDATA[ |
| 323 | + | Time when the event was generated (in milliseconds). |
| 324 | + | ]]></field> |
| 325 | + | <field name="root"><![CDATA[ |
| 326 | + | The root window of `child`. |
| 327 | + | ]]></field> |
| 328 | + | <field name="same_screen"><![CDATA[ |
| 329 | + | Whether the `event` window is on the same screen as the `root` window. |
| 330 | + | ]]></field> |
| 331 | + | <field name="event_x"><![CDATA[ |
| 332 | + | If `same_screen` is true, this is the X coordinate relative to the `event` |
| 333 | + | window's origin. Otherwise, `event_x` will be set to zero. |
| 334 | + | ]]></field> |
| 335 | + | <field name="event_y"><![CDATA[ |
| 336 | + | If `same_screen` is true, this is the Y coordinate relative to the `event` |
| 337 | + | window's origin. Otherwise, `event_y` will be set to zero. |
| 338 | + | ]]></field> |
| 339 | + | <field name="root_x"><![CDATA[ |
| 340 | + | The X coordinate of the pointer relative to the `root` window at the time of |
| 341 | + | the event. |
| 342 | + | ]]></field> |
| 343 | + | <field name="root_y"><![CDATA[ |
| 344 | + | The Y coordinate of the pointer relative to the `root` window at the time of |
| 345 | + | the event. |
| 346 | + | ]]></field> |
| 347 | + | <field name="state"><![CDATA[ |
| 348 | + | The logical state of the pointer buttons and modifier keys just prior to the |
| 349 | + | event. |
| 350 | + | ]]></field> |
| 351 | + | <see type="request" name="GrabKey" /> |
| 352 | + | <see type="request" name="GrabKeyboard" /> |
| 353 | + | </doc> |
| 354 | + | </event> |
| 355 | + | |
| 356 | + | <eventcopy name="KeyRelease" number="3" ref="KeyPress" /> |
| 357 | + | |
| 358 | + | <enum name="ButtonMask"> |
| 359 | + | <item name="1"> <bit>8</bit></item> |
| 360 | + | <item name="2"> <bit>9</bit></item> |
| 361 | + | <item name="3"> <bit>10</bit></item> |
| 362 | + | <item name="4"> <bit>11</bit></item> |
| 363 | + | <item name="5"> <bit>12</bit></item> |
| 364 | + | <item name="Any"> <bit>15</bit></item> |
| 365 | + | </enum> |
| 366 | + | |
| 367 | + | <event name="ButtonPress" number="4"> |
| 368 | + | <field type="BUTTON" name="detail" /> |
| 369 | + | <field type="TIMESTAMP" name="time" /> |
| 370 | + | <field type="WINDOW" name="root" /> |
| 371 | + | <field type="WINDOW" name="event" /> |
| 372 | + | <field type="WINDOW" name="child" altenum="Window" /> |
| 373 | + | <field type="INT16" name="root_x" /> |
| 374 | + | <field type="INT16" name="root_y" /> |
| 375 | + | <field type="INT16" name="event_x" /> |
| 376 | + | <field type="INT16" name="event_y" /> |
| 377 | + | <field type="CARD16" name="state" mask="KeyButMask" /> |
| 378 | + | <field type="BOOL" name="same_screen" /> |
| 379 | + | <pad bytes="1" /> |
| 380 | + | <doc> |
| 381 | + | <brief>a mouse button was pressed/released</brief> |
| 382 | + | <field name="detail"><![CDATA[ |
| 383 | + | The keycode (a number representing a physical key on the keyboard) of the key |
| 384 | + | which was pressed. |
| 385 | + | ]]></field> |
| 386 | + | <field name="time"><![CDATA[ |
| 387 | + | Time when the event was generated (in milliseconds). |
| 388 | + | ]]></field> |
| 389 | + | <field name="root"><![CDATA[ |
| 390 | + | The root window of `child`. |
| 391 | + | ]]></field> |
| 392 | + | <field name="same_screen"><![CDATA[ |
| 393 | + | Whether the `event` window is on the same screen as the `root` window. |
| 394 | + | ]]></field> |
| 395 | + | <field name="event_x"><![CDATA[ |
| 396 | + | If `same_screen` is true, this is the X coordinate relative to the `event` |
| 397 | + | window's origin. Otherwise, `event_x` will be set to zero. |
| 398 | + | ]]></field> |
| 399 | + | <field name="event_y"><![CDATA[ |
| 400 | + | If `same_screen` is true, this is the Y coordinate relative to the `event` |
| 401 | + | window's origin. Otherwise, `event_y` will be set to zero. |
| 402 | + | ]]></field> |
| 403 | + | <field name="root_x"><![CDATA[ |
| 404 | + | The X coordinate of the pointer relative to the `root` window at the time of |
| 405 | + | the event. |
| 406 | + | ]]></field> |
| 407 | + | <field name="root_y"><![CDATA[ |
| 408 | + | The Y coordinate of the pointer relative to the `root` window at the time of |
| 409 | + | the event. |
| 410 | + | ]]></field> |
| 411 | + | <field name="state"><![CDATA[ |
| 412 | + | The logical state of the pointer buttons and modifier keys just prior to the |
| 413 | + | event. |
| 414 | + | ]]></field> |
| 415 | + | <see type="request" name="GrabButton" /> |
| 416 | + | <see type="request" name="GrabPointer" /> |
| 417 | + | </doc> |
| 418 | + | </event> |
| 419 | + | |
| 420 | + | <eventcopy name="ButtonRelease" number="5" ref="ButtonPress" /> |
| 421 | + | |
| 422 | + | <!-- MotionNotify detail --> |
| 423 | + | <enum name="Motion"> |
| 424 | + | <item name="Normal"><value>0</value></item> |
| 425 | + | <item name="Hint"> <value>1</value></item> |
| 426 | + | </enum> |
| 427 | + | |
| 428 | + | <event name="MotionNotify" number="6"> |
| 429 | + | <field type="BYTE" name="detail" enum="Motion" /> |
| 430 | + | <field type="TIMESTAMP" name="time" /> |
| 431 | + | <field type="WINDOW" name="root" /> |
| 432 | + | <field type="WINDOW" name="event" /> |
| 433 | + | <field type="WINDOW" name="child" altenum="Window" /> |
| 434 | + | <field type="INT16" name="root_x" /> |
| 435 | + | <field type="INT16" name="root_y" /> |
| 436 | + | <field type="INT16" name="event_x" /> |
| 437 | + | <field type="INT16" name="event_y" /> |
| 438 | + | <field type="CARD16" name="state" mask="KeyButMask" /> |
| 439 | + | <field type="BOOL" name="same_screen" /> |
| 440 | + | <pad bytes="1" /> |
| 441 | + | <doc> |
| 442 | + | <brief>a key was pressed</brief> |
| 443 | + | <field name="detail"><![CDATA[ |
| 444 | + | The keycode (a number representing a physical key on the keyboard) of the key |
| 445 | + | which was pressed. |
| 446 | + | ]]></field> |
| 447 | + | <field name="time"><![CDATA[ |
| 448 | + | Time when the event was generated (in milliseconds). |
| 449 | + | ]]></field> |
| 450 | + | <field name="root"><![CDATA[ |
| 451 | + | The root window of `child`. |
| 452 | + | ]]></field> |
| 453 | + | <field name="same_screen"><![CDATA[ |
| 454 | + | Whether the `event` window is on the same screen as the `root` window. |
| 455 | + | ]]></field> |
| 456 | + | <field name="event_x"><![CDATA[ |
| 457 | + | If `same_screen` is true, this is the X coordinate relative to the `event` |
| 458 | + | window's origin. Otherwise, `event_x` will be set to zero. |
| 459 | + | ]]></field> |
| 460 | + | <field name="event_y"><![CDATA[ |
| 461 | + | If `same_screen` is true, this is the Y coordinate relative to the `event` |
| 462 | + | window's origin. Otherwise, `event_y` will be set to zero. |
| 463 | + | ]]></field> |
| 464 | + | <field name="root_x"><![CDATA[ |
| 465 | + | The X coordinate of the pointer relative to the `root` window at the time of |
| 466 | + | the event. |
| 467 | + | ]]></field> |
| 468 | + | <field name="root_y"><![CDATA[ |
| 469 | + | The Y coordinate of the pointer relative to the `root` window at the time of |
| 470 | + | the event. |
| 471 | + | ]]></field> |
| 472 | + | <field name="state"><![CDATA[ |
| 473 | + | The logical state of the pointer buttons and modifier keys just prior to the |
| 474 | + | event. |
| 475 | + | ]]></field> |
| 476 | + | <see type="request" name="GrabKey" /> |
| 477 | + | <see type="request" name="GrabKeyboard" /> |
| 478 | + | </doc> |
| 479 | + | </event> |
| 480 | + | |
| 481 | + | <enum name="NotifyDetail"> |
| 482 | + | <item name="Ancestor"> <value>0</value></item> |
| 483 | + | <item name="Virtual"> <value>1</value></item> |
| 484 | + | <item name="Inferior"> <value>2</value></item> |
| 485 | + | <item name="Nonlinear"> <value>3</value></item> |
| 486 | + | <item name="NonlinearVirtual"><value>4</value></item> |
| 487 | + | <item name="Pointer"> <value>5</value></item> |
| 488 | + | <item name="PointerRoot"> <value>6</value></item> |
| 489 | + | <item name="None"> <value>7</value></item> |
| 490 | + | </enum> |
| 491 | + | |
| 492 | + | <enum name="NotifyMode"> |
| 493 | + | <item name="Normal"> <value>0</value></item> |
| 494 | + | <item name="Grab"> <value>1</value></item> |
| 495 | + | <item name="Ungrab"> <value>2</value></item> |
| 496 | + | <item name="WhileGrabbed"><value>3</value></item> |
| 497 | + | </enum> |
| 498 | + | |
| 499 | + | <event name="EnterNotify" number="7"> |
| 500 | + | <field type="BYTE" name="detail" enum="NotifyDetail" /> |
| 501 | + | <field type="TIMESTAMP" name="time" /> |
| 502 | + | <field type="WINDOW" name="root" /> |
| 503 | + | <field type="WINDOW" name="event" /> |
| 504 | + | <field type="WINDOW" name="child" altenum="Window" /> |
| 505 | + | <field type="INT16" name="root_x" /> |
| 506 | + | <field type="INT16" name="root_y" /> |
| 507 | + | <field type="INT16" name="event_x" /> |
| 508 | + | <field type="INT16" name="event_y" /> |
| 509 | + | <field type="CARD16" name="state" mask="KeyButMask" /> |
| 510 | + | <field type="BYTE" name="mode" enum="NotifyMode" /> |
| 511 | + | <field type="BYTE" name="same_screen_focus" /> |
| 512 | + | <doc> |
| 513 | + | <brief>the pointer is in a different window</brief> |
| 514 | + | <field name="event"><![CDATA[ |
| 515 | + | The window on which the event was generated. |
| 516 | + | ]]></field> |
| 517 | + | <field name="child"><![CDATA[ |
| 518 | + | If the `event` window has subwindows and the final pointer position is in one |
| 519 | + | of them, then `child` is set to that subwindow, `XCB_WINDOW_NONE` otherwise. |
| 520 | + | ]]></field> |
| 521 | + | <field name="root"><![CDATA[ |
| 522 | + | The root window for the final cursor position. |
| 523 | + | ]]></field> |
| 524 | + | <field name="root_x"><![CDATA[ |
| 525 | + | The pointer X coordinate relative to `root`'s origin at the time of the event. |
| 526 | + | ]]></field> |
| 527 | + | <field name="root_y"><![CDATA[ |
| 528 | + | The pointer Y coordinate relative to `root`'s origin at the time of the event. |
| 529 | + | ]]></field> |
| 530 | + | <field name="event_x"><![CDATA[ |
| 531 | + | If `event` is on the same screen as `root`, this is the pointer X coordinate |
| 532 | + | relative to the event window's origin. |
| 533 | + | ]]></field> |
| 534 | + | <field name="event_y"><![CDATA[ |
| 535 | + | If `event` is on the same screen as `root`, this is the pointer Y coordinate |
| 536 | + | relative to the event window's origin. |
| 537 | + | ]]></field> |
| 538 | + | <field name="mode" /> |
| 539 | + | </doc> |
| 540 | + | </event> |
| 541 | + | |
| 542 | + | <eventcopy name="LeaveNotify" number="8" ref="EnterNotify" /> |
| 543 | + | |
| 544 | + | <event name="FocusIn" number="9"> |
| 545 | + | <field type="BYTE" name="detail" enum="NotifyDetail" /> |
| 546 | + | <field type="WINDOW" name="event" /> |
| 547 | + | <field type="BYTE" name="mode" enum="NotifyMode" /> |
| 548 | + | <pad bytes="3" /> |
| 549 | + | <doc> |
| 550 | + | <brief>NOT YET DOCUMENTED</brief> |
| 551 | + | <field name="event"><![CDATA[ |
| 552 | + | The window on which the focus event was generated. This is the window used by |
| 553 | + | the X server to report the event. |
| 554 | + | ]]></field> |
| 555 | + | <!-- enum documentation is sufficient --> |
| 556 | + | <field name="detail" /> |
| 557 | + | <field name="mode" /> |
| 558 | + | </doc> |
| 559 | + | </event> |
| 560 | + | |
| 561 | + | <eventcopy name="FocusOut" number="10" ref="FocusIn" /> |
| 562 | + | |
| 563 | + | <event name="KeymapNotify" number="11" no-sequence-number="true"> |
| 564 | + | <list type="CARD8" name="keys"><value>31</value></list> |
| 565 | + | </event> |
| 566 | + | |
| 567 | + | <event name="Expose" number="12"> |
| 568 | + | <pad bytes="1" /> |
| 569 | + | <field type="WINDOW" name="window" /> |
| 570 | + | <field type="CARD16" name="x" /> |
| 571 | + | <field type="CARD16" name="y" /> |
| 572 | + | <field type="CARD16" name="width" /> |
| 573 | + | <field type="CARD16" name="height" /> |
| 574 | + | <field type="CARD16" name="count" /> |
| 575 | + | <pad bytes="2" /> |
| 576 | + | <doc> |
| 577 | + | <brief>NOT YET DOCUMENTED</brief> |
| 578 | + | <field name="window"><![CDATA[ |
| 579 | + | The exposed (damaged) window. |
| 580 | + | ]]></field> |
| 581 | + | <field name="x"><![CDATA[ |
| 582 | + | The X coordinate of the left-upper corner of the exposed rectangle, relative to |
| 583 | + | the `window`'s origin. |
| 584 | + | ]]></field> |
| 585 | + | <field name="y"><![CDATA[ |
| 586 | + | The Y coordinate of the left-upper corner of the exposed rectangle, relative to |
| 587 | + | the `window`'s origin. |
| 588 | + | ]]></field> |
| 589 | + | <field name="width"><![CDATA[ |
| 590 | + | The width of the exposed rectangle. |
| 591 | + | ]]></field> |
| 592 | + | <field name="height"><![CDATA[ |
| 593 | + | The height of the exposed rectangle. |
| 594 | + | ]]></field> |
| 595 | + | <field name="count"><![CDATA[ |
| 596 | + | The amount of `Expose` events following this one. Simple applications that do |
| 597 | + | not want to optimize redisplay by distinguishing between subareas of its window |
| 598 | + | can just ignore all Expose events with nonzero counts and perform full |
| 599 | + | redisplays on events with zero counts. |
| 600 | + | ]]></field> |
| 601 | + | </doc> |
| 602 | + | </event> |
| 603 | + | |
| 604 | + | <event name="GraphicsExposure" number="13"> |
| 605 | + | <pad bytes="1" /> |
| 606 | + | <field type="DRAWABLE" name="drawable" /> |
| 607 | + | <field type="CARD16" name="x" /> |
| 608 | + | <field type="CARD16" name="y" /> |
| 609 | + | <field type="CARD16" name="width" /> |
| 610 | + | <field type="CARD16" name="height" /> |
| 611 | + | <field type="CARD16" name="minor_opcode" /> |
| 612 | + | <field type="CARD16" name="count" /> |
| 613 | + | <field type="CARD8" name="major_opcode" /> |
| 614 | + | <pad bytes="3" /> |
| 615 | + | </event> |
| 616 | + | |
| 617 | + | <event name="NoExposure" number="14"> |
| 618 | + | <pad bytes="1" /> |
| 619 | + | <field type="DRAWABLE" name="drawable" /> |
| 620 | + | <field type="CARD16" name="minor_opcode" /> |
| 621 | + | <field type="CARD8" name="major_opcode" /> |
| 622 | + | <pad bytes="1" /> |
| 623 | + | </event> |
| 624 | + | |
| 625 | + | <enum name="Visibility"> |
| 626 | + | <item name="Unobscured"> <value>0</value></item> |
| 627 | + | <item name="PartiallyObscured"><value>1</value></item> |
| 628 | + | <item name="FullyObscured"> <value>2</value></item> |
| 629 | + | </enum> |
| 630 | + | |
| 631 | + | <event name="VisibilityNotify" number="15"> |
| 632 | + | <pad bytes="1" /> |
| 633 | + | <field type="WINDOW" name="window" /> |
| 634 | + | <field type="BYTE" name="state" enum="Visibility" /> |
| 635 | + | <pad bytes="3" /> |
| 636 | + | </event> |
| 637 | + | |
| 638 | + | <event name="CreateNotify" number="16"> |
| 639 | + | <pad bytes="1" /> |
| 640 | + | <field type="WINDOW" name="parent" /> |
| 641 | + | <field type="WINDOW" name="window" /> |
| 642 | + | <field type="INT16" name="x" /> |
| 643 | + | <field type="INT16" name="y" /> |
| 644 | + | <field type="CARD16" name="width" /> |
| 645 | + | <field type="CARD16" name="height" /> |
| 646 | + | <field type="CARD16" name="border_width" /> |
| 647 | + | <field type="BOOL" name="override_redirect" /> |
| 648 | + | <pad bytes="1" /> |
| 649 | + | </event> |
| 650 | + | |
| 651 | + | <event name="DestroyNotify" number="17"> |
| 652 | + | <pad bytes="1" /> |
| 653 | + | <field type="WINDOW" name="event" /> |
| 654 | + | <field type="WINDOW" name="window" /> |
| 655 | + | <doc> |
| 656 | + | <brief>a window is destroyed</brief> |
| 657 | + | <field name="event"><![CDATA[ |
| 658 | + | The reconfigured window or its parent, depending on whether `StructureNotify` |
| 659 | + | or `SubstructureNotify` was selected. |
| 660 | + | ]]></field> |
| 661 | + | <field name="window"><![CDATA[ |
| 662 | + | The window that is destroyed. |
| 663 | + | ]]></field> |
| 664 | + | <see type="request" name="DestroyWindow" /> |
| 665 | + | </doc> |
| 666 | + | </event> |
| 667 | + | |
| 668 | + | <event name="UnmapNotify" number="18"> |
| 669 | + | <pad bytes="1" /> |
| 670 | + | <field type="WINDOW" name="event" /> |
| 671 | + | <field type="WINDOW" name="window" /> |
| 672 | + | <field type="BOOL" name="from_configure" /> |
| 673 | + | <pad bytes="3" /> |
| 674 | + | <doc> |
| 675 | + | <brief>a window is unmapped</brief> |
| 676 | + | <field name="event"><![CDATA[ |
| 677 | + | The reconfigured window or its parent, depending on whether `StructureNotify` |
| 678 | + | or `SubstructureNotify` was selected. |
| 679 | + | ]]></field> |
| 680 | + | <field name="window"><![CDATA[ |
| 681 | + | The window that was unmapped. |
| 682 | + | ]]></field> |
| 683 | + | <field name="from_configure"><![CDATA[ |
| 684 | + | Set to 1 if the event was generated as a result of a resizing of the window's |
| 685 | + | parent when `window` had a win_gravity of `UnmapGravity`. |
| 686 | + | ]]></field> |
| 687 | + | <see type="request" name="UnmapWindow" /> |
| 688 | + | </doc> |
| 689 | + | </event> |
| 690 | + | |
| 691 | + | <event name="MapNotify" number="19"> |
| 692 | + | <pad bytes="1" /> |
| 693 | + | <field type="WINDOW" name="event" /> |
| 694 | + | <field type="WINDOW" name="window" /> |
| 695 | + | <field type="BOOL" name="override_redirect" /> |
| 696 | + | <pad bytes="3" /> |
| 697 | + | <doc> |
| 698 | + | <brief>a window was mapped</brief> |
| 699 | + | <field name="event"><![CDATA[ |
| 700 | + | The window which was mapped or its parent, depending on whether |
| 701 | + | `StructureNotify` or `SubstructureNotify` was selected. |
| 702 | + | ]]></field> |
| 703 | + | <field name="window"><![CDATA[ |
| 704 | + | The window that was mapped. |
| 705 | + | ]]></field> |
| 706 | + | <field name="override_redirect"><![CDATA[ |
| 707 | + | Window managers should ignore this window if `override_redirect` is 1. |
| 708 | + | ]]></field> |
| 709 | + | <see type="request" name="MapWindow" /> |
| 710 | + | </doc> |
| 711 | + | </event> |
| 712 | + | |
| 713 | + | <event name="MapRequest" number="20"> |
| 714 | + | <pad bytes="1" /> |
| 715 | + | <field type="WINDOW" name="parent" /> |
| 716 | + | <field type="WINDOW" name="window" /> |
| 717 | + | <doc> |
| 718 | + | <brief>window wants to be mapped</brief> |
| 719 | + | <field name="parent"><![CDATA[ |
| 720 | + | The parent of `window`. |
| 721 | + | ]]></field> |
| 722 | + | <field name="window"><![CDATA[ |
| 723 | + | The window to be mapped. |
| 724 | + | ]]></field> |
| 725 | + | <see type="request" name="MapWindow" /> |
| 726 | + | </doc> |
| 727 | + | </event> |
| 728 | + | |
| 729 | + | <event name="ReparentNotify" number="21"> |
| 730 | + | <pad bytes="1" /> |
| 731 | + | <field type="WINDOW" name="event" /> |
| 732 | + | <field type="WINDOW" name="window" /> |
| 733 | + | <field type="WINDOW" name="parent" /> |
| 734 | + | <field type="INT16" name="x" /> |
| 735 | + | <field type="INT16" name="y" /> |
| 736 | + | <field type="BOOL" name="override_redirect" /> |
| 737 | + | <pad bytes="3" /> |
| 738 | + | </event> |
| 739 | + | |
| 740 | + | <event name="ConfigureNotify" number="22"> |
| 741 | + | <pad bytes="1" /> |
| 742 | + | <field type="WINDOW" name="event" /> |
| 743 | + | <field type="WINDOW" name="window" /> |
| 744 | + | <field type="WINDOW" name="above_sibling" altenum="Window" /> |
| 745 | + | <field type="INT16" name="x" /> |
| 746 | + | <field type="INT16" name="y" /> |
| 747 | + | <field type="CARD16" name="width" /> |
| 748 | + | <field type="CARD16" name="height" /> |
| 749 | + | <field type="CARD16" name="border_width" /> |
| 750 | + | <field type="BOOL" name="override_redirect" /> |
| 751 | + | <pad bytes="1" /> |
| 752 | + | <doc> |
| 753 | + | <brief>NOT YET DOCUMENTED</brief> |
| 754 | + | <field name="event"><![CDATA[ |
| 755 | + | The reconfigured window or its parent, depending on whether `StructureNotify` |
| 756 | + | or `SubstructureNotify` was selected. |
| 757 | + | ]]></field> |
| 758 | + | <field name="window"><![CDATA[ |
| 759 | + | The window whose size, position, border, and/or stacking order was changed. |
| 760 | + | ]]></field> |
| 761 | + | <field name="above_sibling"><![CDATA[ |
| 762 | + | If `XCB_NONE`, the `window` is on the bottom of the stack with respect to |
| 763 | + | sibling windows. However, if set to a sibling window, the `window` is placed on |
| 764 | + | top of this sibling window. |
| 765 | + | ]]></field> |
| 766 | + | <field name="x"><![CDATA[ |
| 767 | + | The X coordinate of the upper-left outside corner of `window`, relative to the |
| 768 | + | parent window's origin. |
| 769 | + | ]]></field> |
| 770 | + | <field name="y"><![CDATA[ |
| 771 | + | The Y coordinate of the upper-left outside corner of `window`, relative to the |
| 772 | + | parent window's origin. |
| 773 | + | ]]></field> |
| 774 | + | <field name="width"><![CDATA[ |
| 775 | + | The inside width of `window`, not including the border. |
| 776 | + | ]]></field> |
| 777 | + | <field name="height"><![CDATA[ |
| 778 | + | The inside height of `window`, not including the border. |
| 779 | + | ]]></field> |
| 780 | + | <field name="border_width"><![CDATA[ |
| 781 | + | The border width of `window`. |
| 782 | + | ]]></field> |
| 783 | + | <field name="override_redirect"><![CDATA[ |
| 784 | + | Window managers should ignore this window if `override_redirect` is 1. |
| 785 | + | ]]></field> |
| 786 | + | <see type="request" name="FreeColormap" /> |
| 787 | + | </doc> |
| 788 | + | </event> |
| 789 | + | |
| 790 | + | <event name="ConfigureRequest" number="23"> |
| 791 | + | <field type="BYTE" name="stack_mode" enum="StackMode" /> |
| 792 | + | <field type="WINDOW" name="parent" /> |
| 793 | + | <field type="WINDOW" name="window" /> |
| 794 | + | <field type="WINDOW" name="sibling" altenum="Window" /> |
| 795 | + | <field type="INT16" name="x" /> |
| 796 | + | <field type="INT16" name="y" /> |
| 797 | + | <field type="CARD16" name="width" /> |
| 798 | + | <field type="CARD16" name="height" /> |
| 799 | + | <field type="CARD16" name="border_width" /> |
| 800 | + | <field type="CARD16" name="value_mask" mask="ConfigWindow" /> |
| 801 | + | </event> |
| 802 | + | |
| 803 | + | <event name="GravityNotify" number="24"> |
| 804 | + | <pad bytes="1" /> |
| 805 | + | <field type="WINDOW" name="event" /> |
| 806 | + | <field type="WINDOW" name="window" /> |
| 807 | + | <field type="INT16" name="x" /> |
| 808 | + | <field type="INT16" name="y" /> |
| 809 | + | </event> |
| 810 | + | |
| 811 | + | <event name="ResizeRequest" number="25"> |
| 812 | + | <pad bytes="1" /> |
| 813 | + | <field type="WINDOW" name="window" /> |
| 814 | + | <field type="CARD16" name="width" /> |
| 815 | + | <field type="CARD16" name="height" /> |
| 816 | + | </event> |
| 817 | + | |
| 818 | + | <enum name="Place"> |
| 819 | + | <item name="OnTop"> <value>0</value></item> |
| 820 | + | <item name="OnBottom"><value>1</value></item> |
| 821 | + | <doc> |
| 822 | + | <field name="OnTop"><![CDATA[ |
| 823 | + | The window is now on top of all siblings. |
| 824 | + | ]]></field> |
| 825 | + | <field name="OnBottom"><![CDATA[ |
| 826 | + | The window is now below all siblings. |
| 827 | + | ]]></field> |
| 828 | + | </doc> |
| 829 | + | </enum> |
| 830 | + | |
| 831 | + | <event name="CirculateNotify" number="26"> |
| 832 | + | <pad bytes="1" /> |
| 833 | + | <field type="WINDOW" name="event" /> |
| 834 | + | <field type="WINDOW" name="window" /> |
| 835 | + | <pad bytes="4" /> |
| 836 | + | <field type="BYTE" name="place" enum="Place" /> |
| 837 | + | <pad bytes="3" /> |
| 838 | + | <doc> |
| 839 | + | <brief>NOT YET DOCUMENTED</brief> |
| 840 | + | <field name="event"><![CDATA[ |
| 841 | + | Either the restacked window or its parent, depending on whether |
| 842 | + | `StructureNotify` or `SubstructureNotify` was selected. |
| 843 | + | ]]></field> |
| 844 | + | <field name="window"><![CDATA[ |
| 845 | + | The restacked window. |
| 846 | + | ]]></field> |
| 847 | + | <!-- the enum doc is sufficient --> |
| 848 | + | <field name="place" /> |
| 849 | + | <see type="request" name="CirculateWindow" /> |
| 850 | + | </doc> |
| 851 | + | </event> |
| 852 | + | |
| 853 | + | <eventcopy name="CirculateRequest" number="27" ref="CirculateNotify" /> |
| 854 | + | |
| 855 | + | <enum name="Property"> |
| 856 | + | <item name="NewValue"><value>0</value></item> |
| 857 | + | <item name="Delete"> <value>1</value></item> |
| 858 | + | </enum> |
| 859 | + | |
| 860 | + | <event name="PropertyNotify" number="28"> |
| 861 | + | <pad bytes="1" /> |
| 862 | + | <field type="WINDOW" name="window" /> |
| 863 | + | <field type="ATOM" name="atom" /> |
| 864 | + | <field type="TIMESTAMP" name="time" /> |
| 865 | + | <field type="BYTE" name="state" enum="Property" /> |
| 866 | + | <pad bytes="3" /> |
| 867 | + | <doc> |
| 868 | + | <brief>a window property changed</brief> |
| 869 | + | <field name="window"><![CDATA[ |
| 870 | + | The window whose associated property was changed. |
| 871 | + | ]]></field> |
| 872 | + | <field name="atom"><![CDATA[ |
| 873 | + | The property's atom, to indicate which property was changed. |
| 874 | + | ]]></field> |
| 875 | + | <field name="time"><![CDATA[ |
| 876 | + | A timestamp of the server time when the property was changed. |
| 877 | + | ]]></field> |
| 878 | + | <!-- enum documentation is sufficient --> |
| 879 | + | <field name="state" /> |
| 880 | + | <see type="request" name="ChangeProperty" /> |
| 881 | + | </doc> |
| 882 | + | </event> |
| 883 | + | |
| 884 | + | <event name="SelectionClear" number="29"> |
| 885 | + | <pad bytes="1" /> |
| 886 | + | <field type="TIMESTAMP" name="time" /> |
| 887 | + | <field type="WINDOW" name="owner" /> |
| 888 | + | <field type="ATOM" name="selection" /> |
| 889 | + | </event> |
| 890 | + | |
| 891 | + | <enum name="Time"> |
| 892 | + | <item name="CurrentTime"> <value>0</value> </item> |
| 893 | + | </enum> |
| 894 | + | |
| 895 | + | <enum name="Atom"> |
| 896 | + | <item name="None"> <value>0</value></item> |
| 897 | + | <item name="Any"> <value>0</value></item> |
| 898 | + | <item name="PRIMARY"> <value>1</value> </item> |
| 899 | + | <item name="SECONDARY"> <value>2</value> </item> |
| 900 | + | <item name="ARC"> <value>3</value> </item> |
| 901 | + | <item name="ATOM"> <value>4</value> </item> |
| 902 | + | <item name="BITMAP"> <value>5</value> </item> |
| 903 | + | <item name="CARDINAL"> <value>6</value> </item> |
| 904 | + | <item name="COLORMAP"> <value>7</value> </item> |
| 905 | + | <item name="CURSOR"> <value>8</value> </item> |
| 906 | + | <item name="CUT_BUFFER0"> <value>9</value> </item> |
| 907 | + | <item name="CUT_BUFFER1"> <value>10</value> </item> |
| 908 | + | <item name="CUT_BUFFER2"> <value>11</value> </item> |
| 909 | + | <item name="CUT_BUFFER3"> <value>12</value> </item> |
| 910 | + | <item name="CUT_BUFFER4"> <value>13</value> </item> |
| 911 | + | <item name="CUT_BUFFER5"> <value>14</value> </item> |
| 912 | + | <item name="CUT_BUFFER6"> <value>15</value> </item> |
| 913 | + | <item name="CUT_BUFFER7"> <value>16</value> </item> |
| 914 | + | <item name="DRAWABLE"> <value>17</value> </item> |
| 915 | + | <item name="FONT"> <value>18</value> </item> |
| 916 | + | <item name="INTEGER"> <value>19</value> </item> |
| 917 | + | <item name="PIXMAP"> <value>20</value> </item> |
| 918 | + | <item name="POINT"> <value>21</value> </item> |
| 919 | + | <item name="RECTANGLE"> <value>22</value> </item> |
| 920 | + | <item name="RESOURCE_MANAGER"> <value>23</value> </item> |
| 921 | + | <item name="RGB_COLOR_MAP"> <value>24</value> </item> |
| 922 | + | <item name="RGB_BEST_MAP"> <value>25</value> </item> |
| 923 | + | <item name="RGB_BLUE_MAP"> <value>26</value> </item> |
| 924 | + | <item name="RGB_DEFAULT_MAP"> <value>27</value> </item> |
| 925 | + | <item name="RGB_GRAY_MAP"> <value>28</value> </item> |
| 926 | + | <item name="RGB_GREEN_MAP"> <value>29</value> </item> |
| 927 | + | <item name="RGB_RED_MAP"> <value>30</value> </item> |
| 928 | + | <item name="STRING"> <value>31</value> </item> |
| 929 | + | <item name="VISUALID"> <value>32</value> </item> |
| 930 | + | <item name="WINDOW"> <value>33</value> </item> |
| 931 | + | <item name="WM_COMMAND"> <value>34</value> </item> |
| 932 | + | <item name="WM_HINTS"> <value>35</value> </item> |
| 933 | + | <item name="WM_CLIENT_MACHINE"> <value>36</value> </item> |
| 934 | + | <item name="WM_ICON_NAME"> <value>37</value> </item> |
| 935 | + | <item name="WM_ICON_SIZE"> <value>38</value> </item> |
| 936 | + | <item name="WM_NAME"> <value>39</value> </item> |
| 937 | + | <item name="WM_NORMAL_HINTS"> <value>40</value> </item> |
| 938 | + | <item name="WM_SIZE_HINTS"> <value>41</value> </item> |
| 939 | + | <item name="WM_ZOOM_HINTS"> <value>42</value> </item> |
| 940 | + | <item name="MIN_SPACE"> <value>43</value> </item> |
| 941 | + | <item name="NORM_SPACE"> <value>44</value> </item> |
| 942 | + | <item name="MAX_SPACE"> <value>45</value> </item> |
| 943 | + | <item name="END_SPACE"> <value>46</value> </item> |
| 944 | + | <item name="SUPERSCRIPT_X"> <value>47</value> </item> |
| 945 | + | <item name="SUPERSCRIPT_Y"> <value>48</value> </item> |
| 946 | + | <item name="SUBSCRIPT_X"> <value>49</value> </item> |
| 947 | + | <item name="SUBSCRIPT_Y"> <value>50</value> </item> |
| 948 | + | <item name="UNDERLINE_POSITION"> <value>51</value> </item> |
| 949 | + | <item name="UNDERLINE_THICKNESS"> <value>52</value> </item> |
| 950 | + | <item name="STRIKEOUT_ASCENT"> <value>53</value> </item> |
| 951 | + | <item name="STRIKEOUT_DESCENT"> <value>54</value> </item> |
| 952 | + | <item name="ITALIC_ANGLE"> <value>55</value> </item> |
| 953 | + | <item name="X_HEIGHT"> <value>56</value> </item> |
| 954 | + | <item name="QUAD_WIDTH"> <value>57</value> </item> |
| 955 | + | <item name="WEIGHT"> <value>58</value> </item> |
| 956 | + | <item name="POINT_SIZE"> <value>59</value> </item> |
| 957 | + | <item name="RESOLUTION"> <value>60</value> </item> |
| 958 | + | <item name="COPYRIGHT"> <value>61</value> </item> |
| 959 | + | <item name="NOTICE"> <value>62</value> </item> |
| 960 | + | <item name="FONT_NAME"> <value>63</value> </item> |
| 961 | + | <item name="FAMILY_NAME"> <value>64</value> </item> |
| 962 | + | <item name="FULL_NAME"> <value>65</value> </item> |
| 963 | + | <item name="CAP_HEIGHT"> <value>66</value> </item> |
| 964 | + | <item name="WM_CLASS"> <value>67</value> </item> |
| 965 | + | <item name="WM_TRANSIENT_FOR"> <value>68</value> </item> |
| 966 | + | </enum> |
| 967 | + | |
| 968 | + | <event name="SelectionRequest" number="30"> |
| 969 | + | <pad bytes="1" /> |
| 970 | + | <field type="TIMESTAMP" name="time" altenum="Time" /> |
| 971 | + | <field type="WINDOW" name="owner" /> |
| 972 | + | <field type="WINDOW" name="requestor" /> |
| 973 | + | <field type="ATOM" name="selection" /> |
| 974 | + | <field type="ATOM" name="target" /> |
| 975 | + | <field type="ATOM" name="property" altenum="Atom" /> |
| 976 | + | </event> |
| 977 | + | |
| 978 | + | <event name="SelectionNotify" number="31"> |
| 979 | + | <pad bytes="1" /> |
| 980 | + | <field type="TIMESTAMP" name="time" altenum="Time" /> |
| 981 | + | <field type="WINDOW" name="requestor" /> |
| 982 | + | <field type="ATOM" name="selection" /> |
| 983 | + | <field type="ATOM" name="target" /> |
| 984 | + | <field type="ATOM" name="property" altenum="Atom" /> |
| 985 | + | </event> |
| 986 | + | |
| 987 | + | <enum name="ColormapState"> |
| 988 | + | <item name="Uninstalled"><value>0</value></item> |
| 989 | + | <item name="Installed"> <value>1</value></item> |
| 990 | + | <doc> |
| 991 | + | <field name="Uninstalled"><![CDATA[ |
| 992 | + | The colormap was uninstalled. |
| 993 | + | ]]></field> |
| 994 | + | <field name="Installed"><![CDATA[ |
| 995 | + | The colormap was installed. |
| 996 | + | ]]></field> |
| 997 | + | </doc> |
| 998 | + | </enum> |
| 999 | + | |
| 1000 | + | <enum name="Colormap"> |
| 1001 | + | <item name="None"> <value>0</value></item> |
| 1002 | + | </enum> |
| 1003 | + | |
| 1004 | + | <event name="ColormapNotify" number="32"> |
| 1005 | + | <pad bytes="1" /> |
| 1006 | + | <field type="WINDOW" name="window" /> |
| 1007 | + | <field type="COLORMAP" name="colormap" altenum="Colormap" /> |
| 1008 | + | <field type="BOOL" name="new" /> |
| 1009 | + | <field type="BYTE" name="state" enum="ColormapState" /> |
| 1010 | + | <pad bytes="2" /> |
| 1011 | + | <doc> |
| 1012 | + | <brief>the colormap for some window changed</brief> |
| 1013 | + | <field name="window"><![CDATA[ |
| 1014 | + | The window whose associated colormap is changed, installed or uninstalled. |
| 1015 | + | ]]></field> |
| 1016 | + | <field name="colormap"><![CDATA[ |
| 1017 | + | The colormap which is changed, installed or uninstalled. This is `XCB_NONE` |
| 1018 | + | when the colormap is changed by a call to `FreeColormap`. |
| 1019 | + | ]]></field> |
| 1020 | + | <field name="_new"><![CDATA[ |
| 1021 | + | Indicates whether the colormap was changed (1) or installed/uninstalled (0). |
| 1022 | + | ]]></field> |
| 1023 | + | <!-- enum doc is sufficient --> |
| 1024 | + | <field name="state" /> |
| 1025 | + | <see type="request" name="FreeColormap" /> |
| 1026 | + | </doc> |
| 1027 | + | </event> |
| 1028 | + | |
| 1029 | + | <union name="ClientMessageData"> |
| 1030 | + | <!-- The format member of the ClientMessage event determines which array |
| 1031 | + | to use. --> |
| 1032 | + | <list type="CARD8" name="data8" ><value>20</value></list> <!-- 8 --> |
| 1033 | + | <list type="CARD16" name="data16"><value>10</value></list> <!-- 16 --> |
| 1034 | + | <list type="CARD32" name="data32"><value>5</value></list> <!-- 32 --> |
| 1035 | + | </union> |
| 1036 | + | |
| 1037 | + | <event name="ClientMessage" number="33"> |
| 1038 | + | <field type="CARD8" name="format" /> <!-- 8, 16, or 32. --> |
| 1039 | + | <field type="WINDOW" name="window" /> |
| 1040 | + | <field type="ATOM" name="type" /> |
| 1041 | + | <field type="ClientMessageData" name="data" /> |
| 1042 | + | <doc> |
| 1043 | + | <brief>NOT YET DOCUMENTED</brief> |
| 1044 | + | <description><![CDATA[ |
| 1045 | + | This event represents a ClientMessage, sent by another X11 client. An example |
| 1046 | + | is a client sending the `_NET_WM_STATE` ClientMessage to the root window |
| 1047 | + | to indicate the fullscreen window state, effectively requesting that the window |
| 1048 | + | manager puts it into fullscreen mode. |
| 1049 | + | ]]></description> |
| 1050 | + | <field name="format"><![CDATA[ |
| 1051 | + | Specifies how to interpret `data`. Can be either 8, 16 or 32. |
| 1052 | + | ]]></field> |
| 1053 | + | <field name="type"><![CDATA[ |
| 1054 | + | An atom which indicates how the data should be interpreted by the receiving |
| 1055 | + | client. |
| 1056 | + | ]]></field> |
| 1057 | + | <field name="data"><![CDATA[ |
| 1058 | + | The data itself (20 bytes max). |
| 1059 | + | ]]></field> |
| 1060 | + | <see type="request" name="SendEvent" /> |
| 1061 | + | </doc> |
| 1062 | + | </event> |
| 1063 | + | |
| 1064 | + | <enum name="Mapping"> |
| 1065 | + | <item name="Modifier"><value>0</value></item> |
| 1066 | + | <item name="Keyboard"><value>1</value></item> |
| 1067 | + | <item name="Pointer"> <value>2</value></item> |
| 1068 | + | </enum> |
| 1069 | + | |
| 1070 | + | <event name="MappingNotify" number="34"> |
| 1071 | + | <pad bytes="1" /> |
| 1072 | + | <field type="BYTE" name="request" enum="Mapping" /> |
| 1073 | + | <field type="KEYCODE" name="first_keycode" /> |
| 1074 | + | <field type="CARD8" name="count" /> |
| 1075 | + | <pad bytes="1" /> |
| 1076 | + | <doc> |
| 1077 | + | <brief>keyboard mapping changed</brief> |
| 1078 | + | <!-- enum documentation is sufficient --> |
| 1079 | + | <field name="request" /> |
| 1080 | + | <field name="first_keycode"><![CDATA[ |
| 1081 | + | The first number in the range of the altered mapping. |
| 1082 | + | ]]></field> |
| 1083 | + | <field name="count"><![CDATA[ |
| 1084 | + | The number of keycodes altered. |
| 1085 | + | ]]></field> |
| 1086 | + | </doc> |
| 1087 | + | </event> |
| 1088 | + | |
| 1089 | + | <event name="GeGeneric" number="35" xge="true"> |
| 1090 | + | <pad bytes="22" /> |
| 1091 | + | <doc> |
| 1092 | + | <brief>generic event (with length)</brief> |
| 1093 | + | <field name="extension"><![CDATA[ |
| 1094 | + | The major opcode of the extension creating this event |
| 1095 | + | ]]></field> |
| 1096 | + | <field name="length"><![CDATA[ |
| 1097 | + | The amount (in 4-byte units) of data beyond 32 bytes |
| 1098 | + | ]]></field> |
| 1099 | + | <field name="evtype"><![CDATA[ |
| 1100 | + | The extension-specific event type |
| 1101 | + | ]]></field> |
| 1102 | + | </doc> |
| 1103 | + | </event> |
| 1104 | + | |
| 1105 | + | <!-- Core error types --> |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | <error name="Request" number="1"> |
| 1110 | + | <field type="CARD32" name="bad_value" /> |
| 1111 | + | <field type="CARD16" name="minor_opcode" /> |
| 1112 | + | <field type="CARD8" name="major_opcode" /> |
| 1113 | + | <pad bytes="1" /> |
| 1114 | + | </error> |
| 1115 | + | |
| 1116 | + | <error name="Value" number="2"> |
| 1117 | + | <field type="CARD32" name="bad_value" /> |
| 1118 | + | <field type="CARD16" name="minor_opcode" /> |
| 1119 | + | <field type="CARD8" name="major_opcode" /> |
| 1120 | + | <pad bytes="1" /> |
| 1121 | + | </error> |
| 1122 | + | |
| 1123 | + | <errorcopy name="Window" number="3" ref="Value" /> |
| 1124 | + | <errorcopy name="Pixmap" number="4" ref="Value" /> |
| 1125 | + | <errorcopy name="Atom" number="5" ref="Value" /> |
| 1126 | + | <errorcopy name="Cursor" number="6" ref="Value" /> |
| 1127 | + | <errorcopy name="Font" number="7" ref="Value" /> |
| 1128 | + | <errorcopy name="Match" number="8" ref="Request" /> |
| 1129 | + | <errorcopy name="Drawable" number="9" ref="Value" /> |
| 1130 | + | <errorcopy name="Access" number="10" ref="Request" /> |
| 1131 | + | <errorcopy name="Alloc" number="11" ref="Request" /> |
| 1132 | + | <errorcopy name="Colormap" number="12" ref="Value" /> |
| 1133 | + | <errorcopy name="GContext" number="13" ref="Value" /> |
| 1134 | + | <errorcopy name="IDChoice" number="14" ref="Value" /> |
| 1135 | + | <errorcopy name="Name" number="15" ref="Request" /> |
| 1136 | + | <errorcopy name="Length" number="16" ref="Request" /> |
| 1137 | + | <errorcopy name="Implementation" number="17" ref="Request" /> |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | <!-- The core requests, in major number order. --> |
| 1142 | + | <!-- It is the caller's responsibility to free returned XCB*Rep objects. --> |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | <enum name="WindowClass"> |
| 1147 | + | <item name="CopyFromParent"><value>0</value></item> |
| 1148 | + | <item name="InputOutput"> <value>1</value></item> |
| 1149 | + | <item name="InputOnly"> <value>2</value></item> |
| 1150 | + | </enum> |
| 1151 | + | |
| 1152 | + | <!-- Window attributes for CreateWindow and ChangeWindowAttributes. --> |
| 1153 | + | <enum name="CW"> |
| 1154 | + | <item name="BackPixmap"> <bit>0</bit></item> |
| 1155 | + | <item name="BackPixel"> <bit>1</bit></item> |
| 1156 | + | <item name="BorderPixmap"> <bit>2</bit></item> |
| 1157 | + | <item name="BorderPixel"> <bit>3</bit></item> |
| 1158 | + | <item name="BitGravity"> <bit>4</bit></item> |
| 1159 | + | <item name="WinGravity"> <bit>5</bit></item> |
| 1160 | + | <item name="BackingStore"> <bit>6</bit></item> |
| 1161 | + | <item name="BackingPlanes"> <bit>7</bit></item> |
| 1162 | + | <item name="BackingPixel"> <bit>8</bit></item> |
| 1163 | + | <item name="OverrideRedirect"><bit>9</bit></item> |
| 1164 | + | <item name="SaveUnder"> <bit>10</bit></item> |
| 1165 | + | <item name="EventMask"> <bit>11</bit></item> |
| 1166 | + | <item name="DontPropagate"> <bit>12</bit></item> |
| 1167 | + | <item name="Colormap"> <bit>13</bit></item> |
| 1168 | + | <item name="Cursor"> <bit>14</bit></item> |
| 1169 | + | <doc> |
| 1170 | + | <field name="BackPixmap"><![CDATA[ |
| 1171 | + | Overrides the default background-pixmap. The background pixmap and window must |
| 1172 | + | have the same root and same depth. Any size pixmap can be used, although some |
| 1173 | + | sizes may be faster than others. |
| 1174 | + | |
| 1175 | + | If `XCB_BACK_PIXMAP_NONE` is specified, the window has no defined background. |
| 1176 | + | The server may fill the contents with the previous screen contents or with |
| 1177 | + | contents of its own choosing. |
| 1178 | + | |
| 1179 | + | If `XCB_BACK_PIXMAP_PARENT_RELATIVE` is specified, the parent's background is |
| 1180 | + | used, but the window must have the same depth as the parent (or a Match error |
| 1181 | + | results). The parent's background is tracked, and the current version is |
| 1182 | + | used each time the window background is required. |
| 1183 | + | ]]></field> |
| 1184 | + | <field name="BackPixel"><![CDATA[ |
| 1185 | + | Overrides `BackPixmap`. A pixmap of undefined size filled with the specified |
| 1186 | + | background pixel is used for the background. Range-checking is not performed, |
| 1187 | + | the background pixel is truncated to the appropriate number of bits. |
| 1188 | + | ]]></field> |
| 1189 | + | <field name="BorderPixmap"><![CDATA[ |
| 1190 | + | Overrides the default border-pixmap. The border pixmap and window must have the |
| 1191 | + | same root and the same depth. Any size pixmap can be used, although some sizes |
| 1192 | + | may be faster than others. |
| 1193 | + | |
| 1194 | + | The special value `XCB_COPY_FROM_PARENT` means the parent's border pixmap is |
| 1195 | + | copied (subsequent changes to the parent's border attribute do not affect the |
| 1196 | + | child), but the window must have the same depth as the parent. |
| 1197 | + | ]]></field> |
| 1198 | + | <field name="BorderPixel"><![CDATA[ |
| 1199 | + | Overrides `BorderPixmap`. A pixmap of undefined size filled with the specified |
| 1200 | + | border pixel is used for the border. Range checking is not performed on the |
| 1201 | + | border-pixel value, it is truncated to the appropriate number of bits. |
| 1202 | + | ]]></field> |
| 1203 | + | <field name="BitGravity"><![CDATA[ |
| 1204 | + | Defines which region of the window should be retained if the window is resized. |
| 1205 | + | ]]></field> |
| 1206 | + | <field name="WinGravity"><![CDATA[ |
| 1207 | + | Defines how the window should be repositioned if the parent is resized (see |
| 1208 | + | `ConfigureWindow`). |
| 1209 | + | ]]></field> |
| 1210 | + | <field name="BackingStore"><![CDATA[ |
| 1211 | + | A backing-store of `WhenMapped` advises the server that maintaining contents of |
| 1212 | + | obscured regions when the window is mapped would be beneficial. A backing-store |
| 1213 | + | of `Always` advises the server that maintaining contents even when the window |
| 1214 | + | is unmapped would be beneficial. In this case, the server may generate an |
| 1215 | + | exposure event when the window is created. A value of `NotUseful` advises the |
| 1216 | + | server that maintaining contents is unnecessary, although a server may still |
| 1217 | + | choose to maintain contents while the window is mapped. Note that if the server |
| 1218 | + | maintains contents, then the server should maintain complete contents not just |
| 1219 | + | the region within the parent boundaries, even if the window is larger than its |
| 1220 | + | parent. While the server maintains contents, exposure events will not normally |
| 1221 | + | be generated, but the server may stop maintaining contents at any time. |
| 1222 | + | ]]></field> |
| 1223 | + | <field name="BackingPlanes"><![CDATA[ |
| 1224 | + | The backing-planes indicates (with bits set to 1) which bit planes of the |
| 1225 | + | window hold dynamic data that must be preserved in backing-stores and during |
| 1226 | + | save-unders. |
| 1227 | + | ]]></field> |
| 1228 | + | <field name="BackingPixel"><![CDATA[ |
| 1229 | + | The backing-pixel specifies what value to use in planes not covered by |
| 1230 | + | backing-planes. The server is free to save only the specified bit planes in the |
| 1231 | + | backing-store or save-under and regenerate the remaining planes with the |
| 1232 | + | specified pixel value. Any bits beyond the specified depth of the window in |
| 1233 | + | these values are simply ignored. |
| 1234 | + | ]]></field> |
| 1235 | + | <field name="OverrideRedirect"><![CDATA[ |
| 1236 | + | The override-redirect specifies whether map and configure requests on this |
| 1237 | + | window should override a SubstructureRedirect on the parent, typically to |
| 1238 | + | inform a window manager not to tamper with the window. |
| 1239 | + | ]]></field> |
| 1240 | + | <field name="SaveUnder"><![CDATA[ |
| 1241 | + | If 1, the server is advised that when this window is mapped, saving the |
| 1242 | + | contents of windows it obscures would be beneficial. |
| 1243 | + | ]]></field> |
| 1244 | + | <field name="EventMask"><![CDATA[ |
| 1245 | + | The event-mask defines which events the client is interested in for this window |
| 1246 | + | (or for some event types, inferiors of the window). |
| 1247 | + | ]]></field> |
| 1248 | + | <field name="DontPropagate"><![CDATA[ |
| 1249 | + | The do-not-propagate-mask defines which events should not be propagated to |
| 1250 | + | ancestor windows when no client has the event type selected in this window. |
| 1251 | + | ]]></field> |
| 1252 | + | <field name="Colormap"><![CDATA[ |
| 1253 | + | The colormap specifies the colormap that best reflects the true colors of the window. Servers |
| 1254 | + | capable of supporting multiple hardware colormaps may use this information, and window man- |
| 1255 | + | agers may use it for InstallColormap requests. The colormap must have the same visual type |
| 1256 | + | and root as the window (or a Match error results). If CopyFromParent is specified, the parent's |
| 1257 | + | colormap is copied (subsequent changes to the parent's colormap attribute do not affect the child). |
| 1258 | + | However, the window must have the same visual type as the parent (or a Match error results), |
| 1259 | + | and the parent must not have a colormap of None (or a Match error results). For an explanation |
| 1260 | + | of None, see FreeColormap request. The colormap is copied by sharing the colormap object |
| 1261 | + | between the child and the parent, not by making a complete copy of the colormap contents. |
| 1262 | + | ]]></field> |
| 1263 | + | <field name="Cursor"><![CDATA[ |
| 1264 | + | If a cursor is specified, it will be used whenever the pointer is in the window. If None is speci- |
| 1265 | + | fied, the parent's cursor will be used when the pointer is in the window, and any change in the |
| 1266 | + | parent's cursor will cause an immediate change in the displayed cursor. |
| 1267 | + | ]]></field> |
| 1268 | + | </doc> |
| 1269 | + | </enum> |
| 1270 | + | |
| 1271 | + | <enum name="BackPixmap"> |
| 1272 | + | <item name="None"> <value>0</value></item> |
| 1273 | + | <item name="ParentRelative"><value>1</value></item> |
| 1274 | + | </enum> |
| 1275 | + | |
| 1276 | + | <enum name="Gravity"> |
| 1277 | + | <item name="BitForget"><value>0</value></item> |
| 1278 | + | <item name="WinUnmap"> <value>0</value></item> |
| 1279 | + | <item name="NorthWest"><value>1</value></item> |
| 1280 | + | <item name="North"> <value>2</value></item> |
| 1281 | + | <item name="NorthEast"><value>3</value></item> |
| 1282 | + | <item name="West"> <value>4</value></item> |
| 1283 | + | <item name="Center"> <value>5</value></item> |
| 1284 | + | <item name="East"> <value>6</value></item> |
| 1285 | + | <item name="SouthWest"><value>7</value></item> |
| 1286 | + | <item name="South"> <value>8</value></item> |
| 1287 | + | <item name="SouthEast"><value>9</value></item> |
| 1288 | + | <item name="Static"> <value>10</value></item> |
| 1289 | + | </enum> |
| 1290 | + | |
| 1291 | + | <request name="CreateWindow" opcode="1"> |
| 1292 | + | <field type="CARD8" name="depth" /> |
| 1293 | + | <field type="WINDOW" name="wid" /> |
| 1294 | + | <field type="WINDOW" name="parent" /> |
| 1295 | + | <field type="INT16" name="x" /> |
| 1296 | + | <field type="INT16" name="y" /> |
| 1297 | + | <field type="CARD16" name="width" /> |
| 1298 | + | <field type="CARD16" name="height" /> |
| 1299 | + | <field type="CARD16" name="border_width" /> |
| 1300 | + | <field type="CARD16" name="class" enum="WindowClass" /> |
| 1301 | + | <field type="VISUALID" name="visual" /> |
| 1302 | + | <field type="CARD32" name="value_mask" mask="CW" /> |
| 1303 | + | <switch name="value_list"> |
| 1304 | + | <fieldref>value_mask</fieldref> |
| 1305 | + | <bitcase> |
| 1306 | + | <enumref ref="CW">BackPixmap</enumref> |
| 1307 | + | <field type="PIXMAP" name="background_pixmap" altenum="BackPixmap"/> |
| 1308 | + | </bitcase> |
| 1309 | + | <bitcase> |
| 1310 | + | <enumref ref="CW">BackPixel</enumref> |
| 1311 | + | <field type="CARD32" name="background_pixel" /> |
| 1312 | + | </bitcase> |
| 1313 | + | <bitcase> |
| 1314 | + | <enumref ref="CW">BorderPixmap</enumref> |
| 1315 | + | <field type="PIXMAP" name="border_pixmap" altenum="Pixmap"/> |
| 1316 | + | </bitcase> |
| 1317 | + | <bitcase> |
| 1318 | + | <enumref ref="CW">BorderPixel</enumref> |
| 1319 | + | <field type="CARD32" name="border_pixel" /> |
| 1320 | + | </bitcase> |
| 1321 | + | <bitcase> |
| 1322 | + | <enumref ref="CW">BitGravity</enumref> |
| 1323 | + | <field type="CARD32" name="bit_gravity" enum="Gravity"/> |
| 1324 | + | </bitcase> |
| 1325 | + | <bitcase> |
| 1326 | + | <enumref ref="CW">WinGravity</enumref> |
| 1327 | + | <field type="CARD32" name="win_gravity" enum="Gravity"/> |
| 1328 | + | </bitcase> |
| 1329 | + | <bitcase> |
| 1330 | + | <enumref ref="CW">BackingStore</enumref> |
| 1331 | + | <field type="CARD32" name="backing_store" enum="BackingStore"/> |
| 1332 | + | </bitcase> |
| 1333 | + | <bitcase> |
| 1334 | + | <enumref ref="CW">BackingPlanes</enumref> |
| 1335 | + | <field type="CARD32" name="backing_planes" /> |
| 1336 | + | </bitcase> |
| 1337 | + | <bitcase> |
| 1338 | + | <enumref ref="CW">BackingPixel</enumref> |
| 1339 | + | <field type="CARD32" name="backing_pixel" /> |
| 1340 | + | </bitcase> |
| 1341 | + | <bitcase> |
| 1342 | + | <enumref ref="CW">OverrideRedirect</enumref> |
| 1343 | + | <field type="BOOL32" name="override_redirect" /> |
| 1344 | + | </bitcase> |
| 1345 | + | <bitcase> |
| 1346 | + | <enumref ref="CW">SaveUnder</enumref> |
| 1347 | + | <field type="BOOL32" name="save_under" /> |
| 1348 | + | </bitcase> |
| 1349 | + | <bitcase> |
| 1350 | + | <enumref ref="CW">EventMask</enumref> |
| 1351 | + | <field type="CARD32" name="event_mask" mask="EventMask"/> |
| 1352 | + | </bitcase> |
| 1353 | + | <bitcase> |
| 1354 | + | <enumref ref="CW">DontPropagate</enumref> |
| 1355 | + | <field type="CARD32" name="do_not_propogate_mask" mask="EventMask"/> |
| 1356 | + | </bitcase> |
| 1357 | + | <bitcase> |
| 1358 | + | <enumref ref="CW">Colormap</enumref> |
| 1359 | + | <field type="COLORMAP" name="colormap" altenum="Colormap"/> |
| 1360 | + | </bitcase> |
| 1361 | + | <bitcase> |
| 1362 | + | <enumref ref="CW">Cursor</enumref> |
| 1363 | + | <field type="CURSOR" name="cursor" altenum="Cursor"/> |
| 1364 | + | </bitcase> |
| 1365 | + | </switch> |
| 1366 | + | |
| 1367 | + | <doc> |
| 1368 | + | <brief>Creates a window</brief> |
| 1369 | + | <description><![CDATA[ |
| 1370 | + | Creates an unmapped window as child of the specified `parent` window. A |
| 1371 | + | CreateNotify event will be generated. The new window is placed on top in the |
| 1372 | + | stacking order with respect to siblings. |
| 1373 | + | |
| 1374 | + | The coordinate system has the X axis horizontal and the Y axis vertical with |
| 1375 | + | the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms |
| 1376 | + | of pixels, and coincide with pixel centers. Each window and pixmap has its own |
| 1377 | + | coordinate system. For a window, the origin is inside the border at the inside, |
| 1378 | + | upper-left corner. |
| 1379 | + | |
| 1380 | + | The created window is not yet displayed (mapped), call `xcb_map_window` to |
| 1381 | + | display it. |
| 1382 | + | |
| 1383 | + | The created window will initially use the same cursor as its parent. |
| 1384 | + | ]]></description> |
| 1385 | + | <field name="wid"><![CDATA[ |
| 1386 | + | The ID with which you will refer to the new window, created by |
| 1387 | + | `xcb_generate_id`. |
| 1388 | + | ]]></field> |
| 1389 | + | <field name="depth"><![CDATA[ |
| 1390 | + | Specifies the new window's depth (TODO: what unit?). |
| 1391 | + | |
| 1392 | + | The special value `XCB_COPY_FROM_PARENT` means the depth is taken from the |
| 1393 | + | `parent` window. |
| 1394 | + | ]]></field> |
| 1395 | + | <field name="visual"><![CDATA[ |
| 1396 | + | Specifies the id for the new window's visual. |
| 1397 | + | |
| 1398 | + | The special value `XCB_COPY_FROM_PARENT` means the visual is taken from the |
| 1399 | + | `parent` window. |
| 1400 | + | ]]></field> |
| 1401 | + | <field name="class"></field> |
| 1402 | + | <field name="parent"><![CDATA[ |
| 1403 | + | The parent window of the new window. |
| 1404 | + | ]]></field> |
| 1405 | + | <field name="border_width"><![CDATA[ |
| 1406 | + | TODO: |
| 1407 | + | |
| 1408 | + | Must be zero if the `class` is `InputOnly` or a `xcb_match_error_t` occurs. |
| 1409 | + | ]]></field> |
| 1410 | + | <field name="x"><![CDATA[The X coordinate of the new window.]]></field> |
| 1411 | + | <field name="y"><![CDATA[The Y coordinate of the new window.]]></field> |
| 1412 | + | <field name="width"><![CDATA[The width of the new window.]]></field> |
| 1413 | + | <field name="height"><![CDATA[The height of the new window.]]></field> |
| 1414 | + | <error type="Colormap"><![CDATA[ |
| 1415 | + | TODO: reasons? |
| 1416 | + | ]]></error> |
| 1417 | + | <error type="Match"><![CDATA[ |
| 1418 | + | TODO: reasons? |
| 1419 | + | ]]></error> |
| 1420 | + | <error type="Cursor"><![CDATA[ |
| 1421 | + | TODO: reasons? |
| 1422 | + | ]]></error> |
| 1423 | + | <error type="Pixmap"><![CDATA[ |
| 1424 | + | TODO: reasons? |
| 1425 | + | ]]></error> |
| 1426 | + | <error type="Value"><![CDATA[ |
| 1427 | + | TODO: reasons? |
| 1428 | + | ]]></error> |
| 1429 | + | <error type="Window"><![CDATA[ |
| 1430 | + | TODO: reasons? |
| 1431 | + | ]]></error> |
| 1432 | + | <error type="Alloc"><![CDATA[ |
| 1433 | + | The X server could not allocate the requested resources (no memory?). |
| 1434 | + | ]]></error> |
| 1435 | + | <see type="function" name="xcb_generate_id" /> |
| 1436 | + | <see type="request" name="MapWindow" /> |
| 1437 | + | <see type="event" name="CreateNotify" /> |
| 1438 | + | </doc> |
| 1439 | + | |
| 1440 | + | </request> |
| 1441 | + | |
| 1442 | + | <request name="ChangeWindowAttributes" opcode="2"> |
| 1443 | + | <pad bytes="1" /> |
| 1444 | + | <field type="WINDOW" name="window" /> |
| 1445 | + | <field type="CARD32" name="value_mask" mask="CW" /> |
| 1446 | + | <switch name="value_list"> |
| 1447 | + | <fieldref>value_mask</fieldref> |
| 1448 | + | <bitcase> |
| 1449 | + | <enumref ref="CW">BackPixmap</enumref> |
| 1450 | + | <field type="PIXMAP" name="background_pixmap" altenum="BackPixmap"/> |
| 1451 | + | </bitcase> |
| 1452 | + | <bitcase> |
| 1453 | + | <enumref ref="CW">BackPixel</enumref> |
| 1454 | + | <field type="CARD32" name="background_pixel" /> |
| 1455 | + | </bitcase> |
| 1456 | + | <bitcase> |
| 1457 | + | <enumref ref="CW">BorderPixmap</enumref> |
| 1458 | + | <field type="PIXMAP" name="border_pixmap" altenum="Pixmap"/> |
| 1459 | + | </bitcase> |
| 1460 | + | <bitcase> |
| 1461 | + | <enumref ref="CW">BorderPixel</enumref> |
| 1462 | + | <field type="CARD32" name="border_pixel" /> |
| 1463 | + | </bitcase> |
| 1464 | + | <bitcase> |
| 1465 | + | <enumref ref="CW">BitGravity</enumref> |
| 1466 | + | <field type="CARD32" name="bit_gravity" enum="Gravity"/> |
| 1467 | + | </bitcase> |
| 1468 | + | <bitcase> |
| 1469 | + | <enumref ref="CW">WinGravity</enumref> |
| 1470 | + | <field type="CARD32" name="win_gravity" enum="Gravity"/> |
| 1471 | + | </bitcase> |
| 1472 | + | <bitcase> |
| 1473 | + | <enumref ref="CW">BackingStore</enumref> |
| 1474 | + | <field type="CARD32" name="backing_store" enum="BackingStore"/> |
| 1475 | + | </bitcase> |
| 1476 | + | <bitcase> |
| 1477 | + | <enumref ref="CW">BackingPlanes</enumref> |
| 1478 | + | <field type="CARD32" name="backing_planes" /> |
| 1479 | + | </bitcase> |
| 1480 | + | <bitcase> |
| 1481 | + | <enumref ref="CW">BackingPixel</enumref> |
| 1482 | + | <field type="CARD32" name="backing_pixel" /> |
| 1483 | + | </bitcase> |
| 1484 | + | <bitcase> |
| 1485 | + | <enumref ref="CW">OverrideRedirect</enumref> |
| 1486 | + | <field type="BOOL32" name="override_redirect" /> |
| 1487 | + | </bitcase> |
| 1488 | + | <bitcase> |
| 1489 | + | <enumref ref="CW">SaveUnder</enumref> |
| 1490 | + | <field type="BOOL32" name="save_under" /> |
| 1491 | + | </bitcase> |
| 1492 | + | <bitcase> |
| 1493 | + | <enumref ref="CW">EventMask</enumref> |
| 1494 | + | <field type="CARD32" name="event_mask" mask="EventMask"/> |
| 1495 | + | </bitcase> |
| 1496 | + | <bitcase> |
| 1497 | + | <enumref ref="CW">DontPropagate</enumref> |
| 1498 | + | <field type="CARD32" name="do_not_propogate_mask" mask="EventMask"/> |
| 1499 | + | </bitcase> |
| 1500 | + | <bitcase> |
| 1501 | + | <enumref ref="CW">Colormap</enumref> |
| 1502 | + | <field type="COLORMAP" name="colormap" altenum="Colormap"/> |
| 1503 | + | </bitcase> |
| 1504 | + | <bitcase> |
| 1505 | + | <enumref ref="CW">Cursor</enumref> |
| 1506 | + | <field type="CURSOR" name="cursor" altenum="Cursor"/> |
| 1507 | + | </bitcase> |
| 1508 | + | </switch> |
| 1509 | + | |
| 1510 | + | <doc> |
| 1511 | + | <brief>change window attributes</brief> |
| 1512 | + | <description><![CDATA[ |
| 1513 | + | Changes the attributes specified by `value_mask` for the specified `window`. |
| 1514 | + | ]]></description> |
| 1515 | + | <field name="window"><![CDATA[ |
| 1516 | + | The window to change. |
| 1517 | + | ]]></field> |
| 1518 | + | <!-- the enum documentation is good enough. --> |
| 1519 | + | <field name="value_mask" /> |
| 1520 | + | <field name="value_list"><![CDATA[ |
| 1521 | + | Values for each of the attributes specified in the bitmask `value_mask`. The |
| 1522 | + | order has to correspond to the order of possible `value_mask` bits. See the |
| 1523 | + | example. |
| 1524 | + | ]]></field> |
| 1525 | + | <error type="Access"><![CDATA[ |
| 1526 | + | TODO: reasons? |
| 1527 | + | ]]></error> |
| 1528 | + | <error type="Colormap"><![CDATA[ |
| 1529 | + | TODO: reasons? |
| 1530 | + | ]]></error> |
| 1531 | + | <error type="Cursor"><![CDATA[ |
| 1532 | + | TODO: reasons? |
| 1533 | + | ]]></error> |
| 1534 | + | <error type="Match"><![CDATA[ |
| 1535 | + | TODO: reasons? |
| 1536 | + | ]]></error> |
| 1537 | + | <error type="Pixmap"><![CDATA[ |
| 1538 | + | TODO: reasons? |
| 1539 | + | ]]></error> |
| 1540 | + | <error type="Value"><![CDATA[ |
| 1541 | + | TODO: reasons? |
| 1542 | + | ]]></error> |
| 1543 | + | <error type="Window"><![CDATA[ |
| 1544 | + | The specified `window` does not exist. |
| 1545 | + | ]]></error> |
| 1546 | + | </doc> |
| 1547 | + | </request> |
| 1548 | + | |
| 1549 | + | <enum name="MapState"> |
| 1550 | + | <item name="Unmapped"> <value>0</value></item> |
| 1551 | + | <item name="Unviewable"><value>1</value></item> |
| 1552 | + | <item name="Viewable"> <value>2</value></item> |
| 1553 | + | </enum> |
| 1554 | + | |
| 1555 | + | <request name="GetWindowAttributes" opcode="3"> |
| 1556 | + | <pad bytes="1" /> |
| 1557 | + | <field type="WINDOW" name="window" /> |
| 1558 | + | <reply> |
| 1559 | + | <field type="CARD8" name="backing_store" enum="BackingStore" /> |
| 1560 | + | <field type="VISUALID" name="visual" /> |
| 1561 | + | <field type="CARD16" name="class" enum="WindowClass" /> |
| 1562 | + | <field type="CARD8" name="bit_gravity" enum="Gravity" /> |
| 1563 | + | <field type="CARD8" name="win_gravity" enum="Gravity" /> |
| 1564 | + | <field type="CARD32" name="backing_planes" /> |
| 1565 | + | <field type="CARD32" name="backing_pixel" /> |
| 1566 | + | <field type="BOOL" name="save_under" /> |
| 1567 | + | <field type="BOOL" name="map_is_installed" /> |
| 1568 | + | <field type="CARD8" name="map_state" enum="MapState" /> |
| 1569 | + | <field type="BOOL" name="override_redirect" /> |
| 1570 | + | <field type="COLORMAP" name="colormap" altenum="Colormap" /> |
| 1571 | + | <field type="CARD32" name="all_event_masks" mask="EventMask" /> |
| 1572 | + | <field type="CARD32" name="your_event_mask" mask="EventMask" /> |
| 1573 | + | <field type="CARD16" name="do_not_propagate_mask" mask="EventMask" /> |
| 1574 | + | <pad bytes="2" /> |
| 1575 | + | <doc> |
| 1576 | + | <field name="override_redirect"><![CDATA[ |
| 1577 | + | Window managers should ignore this window if `override_redirect` is 1. |
| 1578 | + | ]]></field> |
| 1579 | + | <field name="visual"><![CDATA[ |
| 1580 | + | The associated visual structure of `window`. |
| 1581 | + | ]]></field> |
| 1582 | + | <field name="backing_planes"><![CDATA[ |
| 1583 | + | Planes to be preserved if possible. |
| 1584 | + | ]]></field> |
| 1585 | + | <field name="backing_pixel"><![CDATA[ |
| 1586 | + | Value to be used when restoring planes. |
| 1587 | + | ]]></field> |
| 1588 | + | <field name="save_under"><![CDATA[ |
| 1589 | + | Boolean, should bits under be saved? |
| 1590 | + | ]]></field> |
| 1591 | + | <field name="colormap"><![CDATA[ |
| 1592 | + | Color map to be associated with window. |
| 1593 | + | ]]></field> |
| 1594 | + | <field name="all_event_masks"><![CDATA[ |
| 1595 | + | Set of events all people have interest in. |
| 1596 | + | ]]></field> |
| 1597 | + | <field name="your_event_mask"><![CDATA[ |
| 1598 | + | My event mask. |
| 1599 | + | ]]></field> |
| 1600 | + | <field name="do_not_propagate_mask"><![CDATA[ |
| 1601 | + | Set of events that should not propagate. |
| 1602 | + | ]]></field> |
| 1603 | + | <!-- enum documentation is sufficient for these fields --> |
| 1604 | + | <field name="backing_store" /> |
| 1605 | + | <field name="class" /> |
| 1606 | + | <field name="bit_gravity" /> |
| 1607 | + | <field name="win_gravity" /> |
| 1608 | + | <field name="map_state" /> |
| 1609 | + | </doc> |
| 1610 | + | </reply> |
| 1611 | + | <doc> |
| 1612 | + | <brief>Gets window attributes</brief> |
| 1613 | + | <description><![CDATA[ |
| 1614 | + | Gets the current attributes for the specified `window`. |
| 1615 | + | ]]></description> |
| 1616 | + | <field name="window"><![CDATA[The window to get the attributes from.]]></field> |
| 1617 | + | <error type="Window"><![CDATA[ |
| 1618 | + | The specified `window` does not exist. |
| 1619 | + | ]]></error> |
| 1620 | + | <error type="Drawable"><![CDATA[ |
| 1621 | + | TODO: reasons? |
| 1622 | + | ]]></error> |
| 1623 | + | </doc> |
| 1624 | + | |
| 1625 | + | </request> |
| 1626 | + | |
| 1627 | + | <request name="DestroyWindow" opcode="4"> |
| 1628 | + | <pad bytes="1" /> |
| 1629 | + | <field type="WINDOW" name="window" /> |
| 1630 | + | <doc> |
| 1631 | + | <brief>Destroys a window</brief> |
| 1632 | + | <description><![CDATA[ |
| 1633 | + | Destroys the specified window and all of its subwindows. A DestroyNotify event |
| 1634 | + | is generated for each destroyed window (a DestroyNotify event is first generated |
| 1635 | + | for any given window's inferiors). If the window was mapped, it will be |
| 1636 | + | automatically unmapped before destroying. |
| 1637 | + | |
| 1638 | + | Calling DestroyWindow on the root window will do nothing. |
| 1639 | + | ]]></description> |
| 1640 | + | <field name="window"><![CDATA[The window to destroy.]]></field> |
| 1641 | + | <error type="Window"><![CDATA[ |
| 1642 | + | The specified window does not exist. |
| 1643 | + | ]]></error> |
| 1644 | + | <see type="event" name="DestroyNotify" /> |
| 1645 | + | <see type="request" name="MapWindow" /> |
| 1646 | + | <see type="request" name="UnmapWindow" /> |
| 1647 | + | </doc> |
| 1648 | + | </request> |
| 1649 | + | |
| 1650 | + | <request name="DestroySubwindows" opcode="5"> |
| 1651 | + | <pad bytes="1" /> |
| 1652 | + | <field type="WINDOW" name="window" /> |
| 1653 | + | </request> |
| 1654 | + | |
| 1655 | + | <enum name="SetMode"> |
| 1656 | + | <item name="Insert"><value>0</value></item> |
| 1657 | + | <item name="Delete"><value>1</value></item> |
| 1658 | + | </enum> |
| 1659 | + | |
| 1660 | + | <request name="ChangeSaveSet" opcode="6"> |
| 1661 | + | <field type="BYTE" name="mode" enum="SetMode" /> |
| 1662 | + | <field type="WINDOW" name="window" /> |
| 1663 | + | <doc> |
| 1664 | + | <brief>Changes a client's save set</brief> |
| 1665 | + | <description><![CDATA[ |
| 1666 | + | TODO: explain what the save set is for. |
| 1667 | + | |
| 1668 | + | This function either adds or removes the specified window to the client's (your |
| 1669 | + | application's) save set. |
| 1670 | + | ]]></description> |
| 1671 | + | <field name="mode"><![CDATA[Insert to add the specified window to the save set or Delete to delete it from the save set.]]></field> |
| 1672 | + | <field name="window"><![CDATA[The window to add or delete to/from your save set.]]></field> |
| 1673 | + | <error type="Match"><![CDATA[ |
| 1674 | + | You created the specified window. This does not make sense, you can only add |
| 1675 | + | windows created by other clients to your save set. |
| 1676 | + | ]]></error> |
| 1677 | + | <error type="Value"><![CDATA[ |
| 1678 | + | You specified an invalid mode. |
| 1679 | + | ]]></error> |
| 1680 | + | <error type="Window"><![CDATA[ |
| 1681 | + | The specified window does not exist. |
| 1682 | + | ]]></error> |
| 1683 | + | <see type="request" name="ReparentWindow" /> |
| 1684 | + | </doc> |
| 1685 | + | </request> |
| 1686 | + | |
| 1687 | + | <request name="ReparentWindow" opcode="7"> |
| 1688 | + | <pad bytes="1" /> |
| 1689 | + | <field type="WINDOW" name="window" /> |
| 1690 | + | <field type="WINDOW" name="parent" /> |
| 1691 | + | <field type="INT16" name="x" /> |
| 1692 | + | <field type="INT16" name="y" /> |
| 1693 | + | <doc> |
| 1694 | + | <brief>Reparents a window</brief> |
| 1695 | + | <description><![CDATA[ |
| 1696 | + | Makes the specified window a child of the specified parent window. If the |
| 1697 | + | window is mapped, it will automatically be unmapped before reparenting and |
| 1698 | + | re-mapped after reparenting. The window is placed in the stacking order on top |
| 1699 | + | with respect to sibling windows. |
| 1700 | + | |
| 1701 | + | After reparenting, a ReparentNotify event is generated. |
| 1702 | + | ]]></description> |
| 1703 | + | <field name="window"><![CDATA[The window to reparent.]]></field> |
| 1704 | + | <field name="parent"><![CDATA[The new parent of the window.]]></field> |
| 1705 | + | <field name="x"><![CDATA[ |
| 1706 | + | The X position of the window within its new parent. |
| 1707 | + | ]]></field> |
| 1708 | + | <field name="y"><![CDATA[ |
| 1709 | + | The Y position of the window within its new parent. |
| 1710 | + | ]]></field> |
| 1711 | + | <error type="Match"><![CDATA[ |
| 1712 | + | The new parent window is not on the same screen as the old parent window. |
| 1713 | + | |
| 1714 | + | The new parent window is the specified window or an inferior of the specified window. |
| 1715 | + | |
| 1716 | + | The new parent is InputOnly and the window is not. |
| 1717 | + | |
| 1718 | + | The specified window has a ParentRelative background and the new parent window is not the same depth as the specified window. |
| 1719 | + | ]]></error> |
| 1720 | + | <error type="Window"><![CDATA[ |
| 1721 | + | The specified window does not exist. |
| 1722 | + | ]]></error> |
| 1723 | + | <see type="event" name="ReparentNotify" /> |
| 1724 | + | <see type="request" name="MapWindow" /> |
| 1725 | + | <see type="request" name="UnmapWindow" /> |
| 1726 | + | </doc> |
| 1727 | + | </request> |
| 1728 | + | |
| 1729 | + | <request name="MapWindow" opcode="8"> |
| 1730 | + | <pad bytes="1" /> |
| 1731 | + | <field type="WINDOW" name="window" /> |
| 1732 | + | <doc> |
| 1733 | + | <brief>Makes a window visible</brief> |
| 1734 | + | <description><![CDATA[ |
| 1735 | + | Maps the specified window. This means making the window visible (as long as its |
| 1736 | + | parent is visible). |
| 1737 | + | |
| 1738 | + | This MapWindow request will be translated to a MapRequest request if a window |
| 1739 | + | manager is running. The window manager then decides to either map the window or |
| 1740 | + | not. Set the override-redirect window attribute to true if you want to bypass |
| 1741 | + | this mechanism. |
| 1742 | + | |
| 1743 | + | If the window manager decides to map the window (or if no window manager is |
| 1744 | + | running), a MapNotify event is generated. |
| 1745 | + | |
| 1746 | + | If the window becomes viewable and no earlier contents for it are remembered, |
| 1747 | + | the X server tiles the window with its background. If the window's background |
| 1748 | + | is undefined, the existing screen contents are not altered, and the X server |
| 1749 | + | generates zero or more Expose events. |
| 1750 | + | |
| 1751 | + | If the window type is InputOutput, an Expose event will be generated when the |
| 1752 | + | window becomes visible. The normal response to an Expose event should be to |
| 1753 | + | repaint the window. |
| 1754 | + | ]]></description> |
| 1755 | + | <field name="window"><![CDATA[ |
| 1756 | + | The window to make visible. |
| 1757 | + | ]]></field> |
| 1758 | + | <error type="Match"><![CDATA[ |
| 1759 | + | The specified window does not exist. |
| 1760 | + | ]]></error> |
| 1761 | + | <see type="event" name="MapNotify" /> |
| 1762 | + | <see type="event" name="Expose" /> |
| 1763 | + | <see type="request" name="UnmapWindow" /> |
| 1764 | + | </doc> |
| 1765 | + | </request> |
| 1766 | + | |
| 1767 | + | <request name="MapSubwindows" opcode="9"> |
| 1768 | + | <pad bytes="1" /> |
| 1769 | + | <field type="WINDOW" name="window" /> |
| 1770 | + | </request> |
| 1771 | + | |
| 1772 | + | <request name="UnmapWindow" opcode="10"> |
| 1773 | + | <pad bytes="1" /> |
| 1774 | + | <field type="WINDOW" name="window" /> |
| 1775 | + | <doc> |
| 1776 | + | <brief>Makes a window invisible</brief> |
| 1777 | + | <description><![CDATA[ |
| 1778 | + | Unmaps the specified window. This means making the window invisible (and all |
| 1779 | + | its child windows). |
| 1780 | + | |
| 1781 | + | Unmapping a window leads to the `UnmapNotify` event being generated. Also, |
| 1782 | + | `Expose` events are generated for formerly obscured windows. |
| 1783 | + | ]]></description> |
| 1784 | + | <field name="window"><![CDATA[ |
| 1785 | + | The window to make invisible. |
| 1786 | + | ]]></field> |
| 1787 | + | <error type="Window"><![CDATA[ |
| 1788 | + | The specified window does not exist. |
| 1789 | + | ]]></error> |
| 1790 | + | <see type="event" name="UnmapNotify" /> |
| 1791 | + | <see type="event" name="Expose" /> |
| 1792 | + | <see type="request" name="MapWindow" /> |
| 1793 | + | </doc> |
| 1794 | + | </request> |
| 1795 | + | |
| 1796 | + | <request name="UnmapSubwindows" opcode="11"> |
| 1797 | + | <pad bytes="1" /> |
| 1798 | + | <field type="WINDOW" name="window" /> |
| 1799 | + | </request> |
| 1800 | + | |
| 1801 | + | <enum name="ConfigWindow"> |
| 1802 | + | <item name="X"> <bit>0</bit></item> |
| 1803 | + | <item name="Y"> <bit>1</bit></item> |
| 1804 | + | <item name="Width"> <bit>2</bit></item> |
| 1805 | + | <item name="Height"> <bit>3</bit></item> |
| 1806 | + | <item name="BorderWidth"><bit>4</bit></item> |
| 1807 | + | <item name="Sibling"> <bit>5</bit></item> |
| 1808 | + | <item name="StackMode"> <bit>6</bit></item> |
| 1809 | + | </enum> |
| 1810 | + | |
| 1811 | + | <enum name="StackMode"> |
| 1812 | + | <item name="Above"> <value>0</value></item> |
| 1813 | + | <item name="Below"> <value>1</value></item> |
| 1814 | + | <item name="TopIf"> <value>2</value></item> |
| 1815 | + | <item name="BottomIf"><value>3</value></item> |
| 1816 | + | <item name="Opposite"><value>4</value></item> |
| 1817 | + | </enum> |
| 1818 | + | |
| 1819 | + | <request name="ConfigureWindow" opcode="12"> |
| 1820 | + | <pad bytes="1" /> |
| 1821 | + | <field type="WINDOW" name="window" /> |
| 1822 | + | <field type="CARD16" name="value_mask" mask="ConfigWindow" /> |
| 1823 | + | <pad bytes="2" /> |
| 1824 | + | <switch name="value_list"> |
| 1825 | + | <fieldref>value_mask</fieldref> |
| 1826 | + | <bitcase> |
| 1827 | + | <enumref ref="ConfigWindow">X</enumref> |
| 1828 | + | <field type="INT32" name="x" /> |
| 1829 | + | </bitcase> |
| 1830 | + | <bitcase> |
| 1831 | + | <enumref ref="ConfigWindow">Y</enumref> |
| 1832 | + | <field type="INT32" name="y" /> |
| 1833 | + | </bitcase> |
| 1834 | + | <bitcase> |
| 1835 | + | <enumref ref="ConfigWindow">Width</enumref> |
| 1836 | + | <field type="CARD32" name="width" /> |
| 1837 | + | </bitcase> |
| 1838 | + | <bitcase> |
| 1839 | + | <enumref ref="ConfigWindow">Height</enumref> |
| 1840 | + | <field type="CARD32" name="height" /> |
| 1841 | + | </bitcase> |
| 1842 | + | <bitcase> |
| 1843 | + | <enumref ref="ConfigWindow">BorderWidth</enumref> |
| 1844 | + | <field type="CARD32" name="border_width" /> |
| 1845 | + | </bitcase> |
| 1846 | + | <bitcase> |
| 1847 | + | <enumref ref="ConfigWindow">Sibling</enumref> |
| 1848 | + | <field type="WINDOW" name="sibling" altenum="Window"/> |
| 1849 | + | </bitcase> |
| 1850 | + | <bitcase> |
| 1851 | + | <enumref ref="ConfigWindow">StackMode</enumref> |
| 1852 | + | <field type="CARD32" name="stack_mode" enum="StackMode"/> |
| 1853 | + | </bitcase> |
| 1854 | + | </switch> |
| 1855 | + | |
| 1856 | + | <doc> |
| 1857 | + | <brief>Configures window attributes</brief> |
| 1858 | + | <description><![CDATA[ |
| 1859 | + | Configures a window's size, position, border width and stacking order. |
| 1860 | + | ]]></description> |
| 1861 | + | <example><![CDATA[ |
| 1862 | + | /* |
| 1863 | + | * Configures the given window to the left upper corner |
| 1864 | + | * with a size of 1024x768 pixels. |
| 1865 | + | * |
| 1866 | + | */ |
| 1867 | + | void my_example(xcb_connection_t *c, xcb_window_t window) { |
| 1868 | + | uint16_t mask = 0; |
| 1869 | + | |
| 1870 | + | mask |= XCB_CONFIG_WINDOW_X; |
| 1871 | + | mask |= XCB_CONFIG_WINDOW_Y; |
| 1872 | + | mask |= XCB_CONFIG_WINDOW_WIDTH; |
| 1873 | + | mask |= XCB_CONFIG_WINDOW_HEIGHT; |
| 1874 | + | |
| 1875 | + | const uint32_t values[] = { |
| 1876 | + | 0, /* x */ |
| 1877 | + | 0, /* y */ |
| 1878 | + | 1024, /* width */ |
| 1879 | + | 768 /* height */ |
| 1880 | + | }; |
| 1881 | + | |
| 1882 | + | xcb_configure_window(c, window, mask, values); |
| 1883 | + | xcb_flush(c); |
| 1884 | + | } |
| 1885 | + | ]]></example> |
| 1886 | + | <field name="window"><![CDATA[The window to configure.]]></field> |
| 1887 | + | <field name="value_mask"><![CDATA[Bitmask of attributes to change.]]></field> |
| 1888 | + | <field name="value_list"><![CDATA[ |
| 1889 | + | New values, corresponding to the attributes in value_mask. The order has to |
| 1890 | + | correspond to the order of possible `value_mask` bits. See the example. |
| 1891 | + | ]]></field> |
| 1892 | + | <error type="Match"><![CDATA[ |
| 1893 | + | You specified a Sibling without also specifying StackMode or the window is not |
| 1894 | + | actually a Sibling. |
| 1895 | + | ]]></error> |
| 1896 | + | <error type="Window"><![CDATA[ |
| 1897 | + | The specified window does not exist. TODO: any other reason? |
| 1898 | + | ]]></error> |
| 1899 | + | <error type="Value"><![CDATA[ |
| 1900 | + | TODO: reasons? |
| 1901 | + | ]]></error> |
| 1902 | + | <see type="event" name="MapNotify" /> |
| 1903 | + | <see type="event" name="Expose" /> |
| 1904 | + | </doc> |
| 1905 | + | </request> |
| 1906 | + | |
| 1907 | + | <enum name="Circulate"> |
| 1908 | + | <item name="RaiseLowest"> <value>0</value></item> |
| 1909 | + | <item name="LowerHighest"><value>1</value></item> |
| 1910 | + | </enum> |
| 1911 | + | |
| 1912 | + | <request name="CirculateWindow" opcode="13"> |
| 1913 | + | <field type="CARD8" name="direction" enum="Circulate" /> |
| 1914 | + | <field type="WINDOW" name="window" /> |
| 1915 | + | <doc> |
| 1916 | + | <brief>Change window stacking order</brief> |
| 1917 | + | <description><![CDATA[ |
| 1918 | + | If `direction` is `XCB_CIRCULATE_RAISE_LOWEST`, the lowest mapped child (if |
| 1919 | + | any) will be raised to the top of the stack. |
| 1920 | + | |
| 1921 | + | If `direction` is `XCB_CIRCULATE_LOWER_HIGHEST`, the highest mapped child will |
| 1922 | + | be lowered to the bottom of the stack. |
| 1923 | + | ]]></description> |
| 1924 | + | <!-- The enums are documented, we have nothing to add. --> |
| 1925 | + | <field name="direction" /> |
| 1926 | + | <field name="window"><![CDATA[ |
| 1927 | + | The window to raise/lower (depending on `direction`). |
| 1928 | + | ]]></field> |
| 1929 | + | <error type="Window"><![CDATA[ |
| 1930 | + | The specified `window` does not exist. |
| 1931 | + | ]]></error> |
| 1932 | + | <error type="Value"><![CDATA[ |
| 1933 | + | The specified `direction` is invalid. |
| 1934 | + | ]]></error> |
| 1935 | + | </doc> |
| 1936 | + | </request> |
| 1937 | + | |
| 1938 | + | <request name="GetGeometry" opcode="14"> |
| 1939 | + | <pad bytes="1" /> |
| 1940 | + | <field type="DRAWABLE" name="drawable" /> |
| 1941 | + | <reply> |
| 1942 | + | <field type="CARD8" name="depth" /> |
| 1943 | + | <field type="WINDOW" name="root" /> |
| 1944 | + | <field type="INT16" name="x" /> |
| 1945 | + | <field type="INT16" name="y" /> |
| 1946 | + | <field type="CARD16" name="width" /> |
| 1947 | + | <field type="CARD16" name="height" /> |
| 1948 | + | <field type="CARD16" name="border_width" /> |
| 1949 | + | <pad bytes="2" /> |
| 1950 | + | <doc> |
| 1951 | + | <field name="root"><![CDATA[ |
| 1952 | + | Root window of the screen containing `drawable`. |
| 1953 | + | ]]></field> |
| 1954 | + | <field name="x"><![CDATA[ |
| 1955 | + | The X coordinate of `drawable`. If `drawable` is a window, the coordinate |
| 1956 | + | specifies the upper-left outer corner relative to its parent's origin. If |
| 1957 | + | `drawable` is a pixmap, the X coordinate is always 0. |
| 1958 | + | ]]></field> |
| 1959 | + | <field name="y"><![CDATA[ |
| 1960 | + | The Y coordinate of `drawable`. If `drawable` is a window, the coordinate |
| 1961 | + | specifies the upper-left outer corner relative to its parent's origin. If |
| 1962 | + | `drawable` is a pixmap, the Y coordinate is always 0. |
| 1963 | + | ]]></field> |
| 1964 | + | <field name="width"><![CDATA[ |
| 1965 | + | The width of `drawable`. |
| 1966 | + | ]]></field> |
| 1967 | + | <field name="height"><![CDATA[ |
| 1968 | + | The height of `drawable`. |
| 1969 | + | ]]></field> |
| 1970 | + | <field name="border_width"><![CDATA[ |
| 1971 | + | The border width (in pixels). |
| 1972 | + | ]]></field> |
| 1973 | + | <field name="depth"><![CDATA[ |
| 1974 | + | The depth of the drawable (bits per pixel for the object). |
| 1975 | + | ]]></field> |
| 1976 | + | </doc> |
| 1977 | + | </reply> |
| 1978 | + | <doc> |
| 1979 | + | <brief>Get current window geometry</brief> |
| 1980 | + | <description><![CDATA[ |
| 1981 | + | Gets the current geometry of the specified drawable (either `Window` or `Pixmap`). |
| 1982 | + | ]]></description> |
| 1983 | + | <example><![CDATA[ |
| 1984 | + | /* |
| 1985 | + | * Displays the x and y position of the given window. |
| 1986 | + | * |
| 1987 | + | */ |
| 1988 | + | void my_example(xcb_connection_t *c, xcb_window_t window) { |
| 1989 | + | xcb_get_geometry_cookie_t cookie; |
| 1990 | + | xcb_get_geometry_reply_t *reply; |
| 1991 | + | |
| 1992 | + | cookie = xcb_get_geometry(c, window); |
| 1993 | + | /* ... do other work here if possible ... */ |
| 1994 | + | if ((reply = xcb_get_geometry_reply(c, cookie, NULL))) { |
| 1995 | + | printf("This window is at %d, %d\\n", reply->x, reply->y); |
| 1996 | + | } |
| 1997 | + | free(reply); |
| 1998 | + | } |
| 1999 | + | ]]></example> |
| 2000 | + | <field name="drawable"><![CDATA[ |
| 2001 | + | The drawable (`Window` or `Pixmap`) of which the geometry will be received. |
| 2002 | + | ]]></field> |
| 2003 | + | <error type="Drawable"><![CDATA[ |
| 2004 | + | TODO: reasons? |
| 2005 | + | ]]></error> |
| 2006 | + | <error type="Window"><![CDATA[ |
| 2007 | + | TODO: reasons? |
| 2008 | + | ]]></error> |
| 2009 | + | <see type="program" name="xwininfo" /> |
| 2010 | + | </doc> |
| 2011 | + | </request> |
| 2012 | + | |
| 2013 | + | <request name="QueryTree" opcode="15"> |
| 2014 | + | <pad bytes="1" /> |
| 2015 | + | <field type="WINDOW" name="window" /> |
| 2016 | + | <reply> |
| 2017 | + | <pad bytes="1" /> |
| 2018 | + | <field type="WINDOW" name="root" /> |
| 2019 | + | <field type="WINDOW" name="parent" altenum="Window" /> |
| 2020 | + | <field type="CARD16" name="children_len" /> |
| 2021 | + | <pad bytes="14" /> |
| 2022 | + | <list type="WINDOW" name="children"> |
| 2023 | + | <fieldref>children_len</fieldref> |
| 2024 | + | </list> |
| 2025 | + | <doc> |
| 2026 | + | <field name="root"><![CDATA[ |
| 2027 | + | The root window of `window`. |
| 2028 | + | ]]></field> |
| 2029 | + | <field name="parent"><![CDATA[ |
| 2030 | + | The parent window of `window`. |
| 2031 | + | ]]></field> |
| 2032 | + | <field name="children_len"><![CDATA[ |
| 2033 | + | The number of child windows. |
| 2034 | + | ]]></field> |
| 2035 | + | </doc> |
| 2036 | + | </reply> |
| 2037 | + | <doc> |
| 2038 | + | <brief>query the window tree</brief> |
| 2039 | + | <description><![CDATA[ |
| 2040 | + | Gets the root window ID, parent window ID and list of children windows for the |
| 2041 | + | specified `window`. The children are listed in bottom-to-top stacking order. |
| 2042 | + | ]]></description> |
| 2043 | + | <example><![CDATA[ |
| 2044 | + | /* |
| 2045 | + | * Displays the root, parent and children of the specified window. |
| 2046 | + | * |
| 2047 | + | */ |
| 2048 | + | void my_example(xcb_connection_t *conn, xcb_window_t window) { |
| 2049 | + | xcb_query_tree_cookie_t cookie; |
| 2050 | + | xcb_query_tree_reply_t *reply; |
| 2051 | + | |
| 2052 | + | cookie = xcb_query_tree(conn, window); |
| 2053 | + | if ((reply = xcb_query_tree_reply(conn, cookie, NULL))) { |
| 2054 | + | printf("root = 0x%08x\\n", reply->root); |
| 2055 | + | printf("parent = 0x%08x\\n", reply->parent); |
| 2056 | + | |
| 2057 | + | xcb_window_t *children = xcb_query_tree_children(reply); |
| 2058 | + | for (int i = 0; i < xcb_query_tree_children_length(reply); i++) |
| 2059 | + | printf("child window = 0x%08x\\n", children[i]); |
| 2060 | + | |
| 2061 | + | free(reply); |
| 2062 | + | } |
| 2063 | + | } |
| 2064 | + | ]]></example> |
| 2065 | + | <field name="window"><![CDATA[ |
| 2066 | + | The `window` to query. |
| 2067 | + | ]]></field> |
| 2068 | + | <see type="program" name="xwininfo" /> |
| 2069 | + | </doc> |
| 2070 | + | </request> |
| 2071 | + | |
| 2072 | + | <request name="InternAtom" opcode="16"> |
| 2073 | + | <field type="BOOL" name="only_if_exists" /> |
| 2074 | + | <field type="CARD16" name="name_len" /> |
| 2075 | + | <pad bytes="2" /> |
| 2076 | + | <list type="char" name="name"> |
| 2077 | + | <fieldref>name_len</fieldref> |
| 2078 | + | </list> |
| 2079 | + | <reply> |
| 2080 | + | <pad bytes="1" /> |
| 2081 | + | <field type="ATOM" name="atom" altenum="Atom" /> |
| 2082 | + | </reply> |
| 2083 | + | <doc> |
| 2084 | + | <brief>Get atom identifier by name</brief> |
| 2085 | + | <description><![CDATA[ |
| 2086 | + | Retrieves the identifier (xcb_atom_t TODO) for the atom with the specified |
| 2087 | + | name. Atoms are used in protocols like EWMH, for example to store window titles |
| 2088 | + | (`_NET_WM_NAME` atom) as property of a window. |
| 2089 | + | |
| 2090 | + | If `only_if_exists` is 0, the atom will be created if it does not already exist. |
| 2091 | + | If `only_if_exists` is 1, `XCB_ATOM_NONE` will be returned if the atom does |
| 2092 | + | not yet exist. |
| 2093 | + | ]]></description> |
| 2094 | + | <example><![CDATA[ |
| 2095 | + | /* |
| 2096 | + | * Resolves the _NET_WM_NAME atom. |
| 2097 | + | * |
| 2098 | + | */ |
| 2099 | + | void my_example(xcb_connection_t *c) { |
| 2100 | + | xcb_intern_atom_cookie_t cookie; |
| 2101 | + | xcb_intern_atom_reply_t *reply; |
| 2102 | + | |
| 2103 | + | cookie = xcb_intern_atom(c, 0, strlen("_NET_WM_NAME"), "_NET_WM_NAME"); |
| 2104 | + | /* ... do other work here if possible ... */ |
| 2105 | + | if ((reply = xcb_intern_atom_reply(c, cookie, NULL))) { |
| 2106 | + | printf("The _NET_WM_NAME atom has ID %u\n", reply->atom); |
| 2107 | + | free(reply); |
| 2108 | + | } |
| 2109 | + | } |
| 2110 | + | ]]></example> |
| 2111 | + | <field name="name_len"><![CDATA[ |
| 2112 | + | The length of the following `name`. |
| 2113 | + | ]]></field> |
| 2114 | + | <field name="name"><![CDATA[ |
| 2115 | + | The name of the atom. |
| 2116 | + | ]]></field> |
| 2117 | + | <field name="only_if_exists"><![CDATA[ |
| 2118 | + | Return a valid atom id only if the atom already exists. |
| 2119 | + | ]]></field> |
| 2120 | + | <error type="Alloc"><![CDATA[ |
| 2121 | + | TODO: reasons? |
| 2122 | + | ]]></error> |
| 2123 | + | <error type="Value"><![CDATA[ |
| 2124 | + | A value other than 0 or 1 was specified for `only_if_exists`. |
| 2125 | + | ]]></error> |
| 2126 | + | <see type="program" name="xlsatoms" /> |
| 2127 | + | <see type="request" name="GetAtomName" /> |
| 2128 | + | </doc> |
| 2129 | + | |
| 2130 | + | </request> |
| 2131 | + | |
| 2132 | + | <request name="GetAtomName" opcode="17"> |
| 2133 | + | <pad bytes="1" /> |
| 2134 | + | <field type="ATOM" name="atom" /> |
| 2135 | + | <reply> |
| 2136 | + | <pad bytes="1" /> |
| 2137 | + | <field type="CARD16" name="name_len" /> |
| 2138 | + | <pad bytes="22" /> |
| 2139 | + | <list type="char" name="name"> |
| 2140 | + | <fieldref>name_len</fieldref> |
| 2141 | + | </list> |
| 2142 | + | </reply> |
| 2143 | + | </request> |
| 2144 | + | |
| 2145 | + | <enum name="PropMode"> |
| 2146 | + | <item name="Replace"><value>0</value></item> |
| 2147 | + | <item name="Prepend"><value>1</value></item> |
| 2148 | + | <item name="Append"> <value>2</value></item> |
| 2149 | + | <doc> |
| 2150 | + | <field name="Replace"><![CDATA[ |
| 2151 | + | Discard the previous property value and store the new data. |
| 2152 | + | ]]></field> |
| 2153 | + | <field name="Prepend"><![CDATA[ |
| 2154 | + | Insert the new data before the beginning of existing data. The `format` must |
| 2155 | + | match existing property value. If the property is undefined, it is treated as |
| 2156 | + | defined with the correct type and format with zero-length data. |
| 2157 | + | ]]></field> |
| 2158 | + | <field name="Append"><![CDATA[ |
| 2159 | + | Insert the new data after the beginning of existing data. The `format` must |
| 2160 | + | match existing property value. If the property is undefined, it is treated as |
| 2161 | + | defined with the correct type and format with zero-length data. |
| 2162 | + | ]]></field> |
| 2163 | + | </doc> |
| 2164 | + | </enum> |
| 2165 | + | |
| 2166 | + | <request name="ChangeProperty" opcode="18"> |
| 2167 | + | <field type="CARD8" name="mode" enum="PropMode" /> |
| 2168 | + | <field type="WINDOW" name="window" /> |
| 2169 | + | <field type="ATOM" name="property" /> |
| 2170 | + | <field type="ATOM" name="type" /> |
| 2171 | + | <field type="CARD8" name="format" /> |
| 2172 | + | <pad bytes="3" /> |
| 2173 | + | <field type="CARD32" name="data_len" /> |
| 2174 | + | <list type="void" name="data"> |
| 2175 | + | <op op="/"> |
| 2176 | + | <op op="*"> |
| 2177 | + | <fieldref>data_len</fieldref> |
| 2178 | + | <fieldref>format</fieldref> |
| 2179 | + | </op> |
| 2180 | + | <value>8</value> |
| 2181 | + | </op> |
| 2182 | + | </list> |
| 2183 | + | <doc> |
| 2184 | + | <brief>Changes a window property</brief> |
| 2185 | + | <description><![CDATA[ |
| 2186 | + | Sets or updates a property on the specified `window`. Properties are for |
| 2187 | + | example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`). |
| 2188 | + | Protocols such as EWMH also use properties - for example EWMH defines the |
| 2189 | + | window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property. |
| 2190 | + | ]]></description> |
| 2191 | + | <example><![CDATA[ |
| 2192 | + | /* |
| 2193 | + | * Sets the WM_NAME property of the window to "XCB Example". |
| 2194 | + | * |
| 2195 | + | */ |
| 2196 | + | void my_example(xcb_connection_t *conn, xcb_window_t window) { |
| 2197 | + | xcb_change_property(conn, |
| 2198 | + | XCB_PROP_MODE_REPLACE, |
| 2199 | + | window, |
| 2200 | + | XCB_ATOM_WM_NAME, |
| 2201 | + | XCB_ATOM_STRING, |
| 2202 | + | 8, |
| 2203 | + | strlen("XCB Example"), |
| 2204 | + | "XCB Example"); |
| 2205 | + | xcb_flush(conn); |
| 2206 | + | } |
| 2207 | + | ]]></example> |
| 2208 | + | <field name="window"><![CDATA[ |
| 2209 | + | The window whose property you want to change. |
| 2210 | + | ]]></field> |
| 2211 | + | <!-- the enum doc is sufficient. --> |
| 2212 | + | <field name="mode" /> |
| 2213 | + | <field name="property"><![CDATA[ |
| 2214 | + | The property you want to change (an atom). |
| 2215 | + | ]]></field> |
| 2216 | + | <field name="type"><![CDATA[ |
| 2217 | + | The type of the property you want to change (an atom). |
| 2218 | + | ]]></field> |
| 2219 | + | <field name="format"><![CDATA[ |
| 2220 | + | Specifies whether the data should be viewed as a list of 8-bit, 16-bit or |
| 2221 | + | 32-bit quantities. Possible values are 8, 16 and 32. This information allows |
| 2222 | + | the X server to correctly perform byte-swap operations as necessary. |
| 2223 | + | ]]></field> |
| 2224 | + | <field name="data_len"><![CDATA[ |
| 2225 | + | Specifies the number of elements (see `format`). |
| 2226 | + | ]]></field> |
| 2227 | + | <field name="data"><![CDATA[ |
| 2228 | + | The property data. |
| 2229 | + | ]]></field> |
| 2230 | + | <error type="Match"><![CDATA[ |
| 2231 | + | TODO: reasons? |
| 2232 | + | ]]></error> |
| 2233 | + | <error type="Value"><![CDATA[ |
| 2234 | + | TODO: reasons? |
| 2235 | + | ]]></error> |
| 2236 | + | <error type="Window"><![CDATA[ |
| 2237 | + | The specified `window` does not exist. |
| 2238 | + | ]]></error> |
| 2239 | + | <error type="Atom"><![CDATA[ |
| 2240 | + | `property` or `type` do not refer to a valid atom. |
| 2241 | + | ]]></error> |
| 2242 | + | <error type="Alloc"><![CDATA[ |
| 2243 | + | The X server could not store the property (no memory?). |
| 2244 | + | ]]></error> |
| 2245 | + | <see type="request" name="InternAtom" /> |
| 2246 | + | <see type="program" name="xprop" /> |
| 2247 | + | </doc> |
| 2248 | + | </request> |
| 2249 | + | |
| 2250 | + | <request name="DeleteProperty" opcode="19"> |
| 2251 | + | <pad bytes="1" /> |
| 2252 | + | <field type="WINDOW" name="window" /> |
| 2253 | + | <field type="ATOM" name="property" /> |
| 2254 | + | </request> |
| 2255 | + | |
| 2256 | + | <enum name="GetPropertyType"> |
| 2257 | + | <item name="Any"><value>0</value></item> |
| 2258 | + | </enum> |
| 2259 | + | |
| 2260 | + | <request name="GetProperty" opcode="20"> |
| 2261 | + | <field type="BOOL" name="delete" /> |
| 2262 | + | <field type="WINDOW" name="window" /> |
| 2263 | + | <field type="ATOM" name="property" /> |
| 2264 | + | <field type="ATOM" name="type" altenum="GetPropertyType" /> |
| 2265 | + | <field type="CARD32" name="long_offset" /> |
| 2266 | + | <field type="CARD32" name="long_length" /> |
| 2267 | + | <reply> |
| 2268 | + | <field type="CARD8" name="format" /> |
| 2269 | + | <field type="ATOM" name="type" /> |
| 2270 | + | <field type="CARD32" name="bytes_after" /> |
| 2271 | + | <field type="CARD32" name="value_len" /> |
| 2272 | + | <pad bytes="12" /> |
| 2273 | + | <list type="void" name="value"> |
| 2274 | + | <op op="*"> |
| 2275 | + | <fieldref>value_len</fieldref> |
| 2276 | + | <op op="/"> |
| 2277 | + | <fieldref>format</fieldref> |
| 2278 | + | <value>8</value> |
| 2279 | + | </op> |
| 2280 | + | </op> |
| 2281 | + | </list> |
| 2282 | + | <doc> |
| 2283 | + | <field name="format"><![CDATA[ |
| 2284 | + | Specifies whether the data should be viewed as a list of 8-bit, 16-bit, or |
| 2285 | + | 32-bit quantities. Possible values are 8, 16, and 32. This information allows |
| 2286 | + | the X server to correctly perform byte-swap operations as necessary. |
| 2287 | + | ]]></field> |
| 2288 | + | <field name="type"><![CDATA[ |
| 2289 | + | The actual type of the property (an atom). |
| 2290 | + | ]]></field> |
| 2291 | + | <field name="bytes_after"><![CDATA[ |
| 2292 | + | The number of bytes remaining to be read in the property if a partial read was |
| 2293 | + | performed. |
| 2294 | + | ]]></field> |
| 2295 | + | <field name="value_len"><![CDATA[ |
| 2296 | + | The length of value. You should use the corresponding accessor instead of this |
| 2297 | + | field. |
| 2298 | + | ]]></field> |
| 2299 | + | </doc> |
| 2300 | + | </reply> |
| 2301 | + | <doc> |
| 2302 | + | <brief>Gets a window property</brief> |
| 2303 | + | <description><![CDATA[ |
| 2304 | + | Gets the specified `property` from the specified `window`. Properties are for |
| 2305 | + | example the window title (`WM_NAME`) or its minimum size (`WM_NORMAL_HINTS`). |
| 2306 | + | Protocols such as EWMH also use properties - for example EWMH defines the |
| 2307 | + | window title, encoded as UTF-8 string, in the `_NET_WM_NAME` property. |
| 2308 | + | |
| 2309 | + | TODO: talk about `type` |
| 2310 | + | |
| 2311 | + | TODO: talk about `delete` |
| 2312 | + | |
| 2313 | + | TODO: talk about the offset/length thing. what's a valid use case? |
| 2314 | + | ]]></description> |
| 2315 | + | <example><![CDATA[ |
| 2316 | + | /* |
| 2317 | + | * Prints the WM_NAME property of the window. |
| 2318 | + | * |
| 2319 | + | */ |
| 2320 | + | void my_example(xcb_connection_t *c, xcb_window_t window) { |
| 2321 | + | xcb_get_property_cookie_t cookie; |
| 2322 | + | xcb_get_property_reply_t *reply; |
| 2323 | + | |
| 2324 | + | /* These atoms are predefined in the X11 protocol. */ |
| 2325 | + | xcb_atom_t property = XCB_ATOM_WM_NAME; |
| 2326 | + | xcb_atom_t type = XCB_ATOM_STRING; |
| 2327 | + | |
| 2328 | + | // TODO: a reasonable long_length for WM_NAME? |
| 2329 | + | cookie = xcb_get_property(c, 0, window, property, type, 0, 0); |
| 2330 | + | if ((reply = xcb_get_property_reply(c, cookie, NULL))) { |
| 2331 | + | int len = xcb_get_property_value_length(reply); |
| 2332 | + | if (len == 0) { |
| 2333 | + | printf("TODO\\n"); |
| 2334 | + | free(reply); |
| 2335 | + | return; |
| 2336 | + | } |
| 2337 | + | printf("WM_NAME is %.*s\\n", len, |
| 2338 | + | (char*)xcb_get_property_value(reply)); |
| 2339 | + | } |
| 2340 | + | free(reply); |
| 2341 | + | } |
| 2342 | + | ]]></example> |
| 2343 | + | <field name="window"><![CDATA[ |
| 2344 | + | The window whose property you want to get. |
| 2345 | + | ]]></field> |
| 2346 | + | <field name="delete"><![CDATA[ |
| 2347 | + | Whether the property should actually be deleted. For deleting a property, the |
| 2348 | + | specified `type` has to match the actual property type. |
| 2349 | + | ]]></field> |
| 2350 | + | <field name="property"><![CDATA[ |
| 2351 | + | The property you want to get (an atom). |
| 2352 | + | ]]></field> |
| 2353 | + | <field name="type"><![CDATA[ |
| 2354 | + | The type of the property you want to get (an atom). |
| 2355 | + | ]]></field> |
| 2356 | + | <field name="long_offset"><![CDATA[ |
| 2357 | + | Specifies the offset (in 32-bit multiples) in the specified property where the |
| 2358 | + | data is to be retrieved. |
| 2359 | + | ]]></field> |
| 2360 | + | <field name="long_length"><![CDATA[ |
| 2361 | + | Specifies how many 32-bit multiples of data should be retrieved (e.g. if you |
| 2362 | + | set `long_length` to 4, you will receive 16 bytes of data). |
| 2363 | + | ]]></field> |
| 2364 | + | <error type="Window"><![CDATA[ |
| 2365 | + | The specified `window` does not exist. |
| 2366 | + | ]]></error> |
| 2367 | + | <error type="Atom"><![CDATA[ |
| 2368 | + | `property` or `type` do not refer to a valid atom. |
| 2369 | + | ]]></error> |
| 2370 | + | <error type="Value"><![CDATA[ |
| 2371 | + | The specified `long_offset` is beyond the actual property length (e.g. the |
| 2372 | + | property has a length of 3 bytes and you are setting `long_offset` to 1, |
| 2373 | + | resulting in a byte offset of 4). |
| 2374 | + | ]]></error> |
| 2375 | + | <see type="request" name="InternAtom" /> |
| 2376 | + | <see type="program" name="xprop" /> |
| 2377 | + | </doc> |
| 2378 | + | </request> |
| 2379 | + | |
| 2380 | + | <request name="ListProperties" opcode="21"> |
| 2381 | + | <pad bytes="1" /> |
| 2382 | + | <field type="WINDOW" name="window" /> |
| 2383 | + | <reply> |
| 2384 | + | <pad bytes="1" /> |
| 2385 | + | <field type="CARD16" name="atoms_len" /> |
| 2386 | + | <pad bytes="22" /> |
| 2387 | + | <list type="ATOM" name="atoms"> |
| 2388 | + | <fieldref>atoms_len</fieldref> |
| 2389 | + | </list> |
| 2390 | + | </reply> |
| 2391 | + | </request> |
| 2392 | + | |
| 2393 | + | <request name="SetSelectionOwner" opcode="22"> |
| 2394 | + | <pad bytes="1" /> |
| 2395 | + | <field type="WINDOW" name="owner" altenum="Window" /> |
| 2396 | + | <field type="ATOM" name="selection" /> |
| 2397 | + | <field type="TIMESTAMP" name="time" altenum="Time" /> |
| 2398 | + | <doc> |
| 2399 | + | <brief>Sets the owner of a selection</brief> |
| 2400 | + | <description><![CDATA[ |
| 2401 | + | Makes `window` the owner of the selection `selection` and updates the |
| 2402 | + | last-change time of the specified selection. |
| 2403 | + | |
| 2404 | + | TODO: briefly explain what a selection is. |
| 2405 | + | ]]></description> |
| 2406 | + | <field name="selection"><![CDATA[ |
| 2407 | + | The selection. |
| 2408 | + | ]]></field> |
| 2409 | + | <field name="owner"><![CDATA[ |
| 2410 | + | The new owner of the selection. |
| 2411 | + | |
| 2412 | + | The special value `XCB_NONE` means that the selection will have no owner. |
| 2413 | + | ]]></field> |
| 2414 | + | <field name="time"><![CDATA[ |
| 2415 | + | Timestamp to avoid race conditions when running X over the network. |
| 2416 | + | |
| 2417 | + | The selection will not be changed if `time` is earlier than the current |
| 2418 | + | last-change time of the `selection` or is later than the current X server time. |
| 2419 | + | Otherwise, the last-change time is set to the specified time. |
| 2420 | + | |
| 2421 | + | The special value `XCB_CURRENT_TIME` will be replaced with the current server |
| 2422 | + | time. |
| 2423 | + | ]]></field> |
| 2424 | + | <error type="Atom"><![CDATA[ |
| 2425 | + | `selection` does not refer to a valid atom. |
| 2426 | + | ]]></error> |
| 2427 | + | <see type="request" name="SetSelectionOwner" /> |
| 2428 | + | </doc> |
| 2429 | + | |
| 2430 | + | </request> |
| 2431 | + | |
| 2432 | + | <request name="GetSelectionOwner" opcode="23"> |
| 2433 | + | <pad bytes="1" /> |
| 2434 | + | <field type="ATOM" name="selection" /> |
| 2435 | + | <reply> |
| 2436 | + | <pad bytes="1" /> |
| 2437 | + | <field type="WINDOW" name="owner" altenum="Window" /> |
| 2438 | + | <doc> |
| 2439 | + | <field name="owner"><![CDATA[ |
| 2440 | + | The current selection owner window. |
| 2441 | + | ]]></field> |
| 2442 | + | </doc> |
| 2443 | + | </reply> |
| 2444 | + | <doc> |
| 2445 | + | <brief>Gets the owner of a selection</brief> |
| 2446 | + | <description><![CDATA[ |
| 2447 | + | Gets the owner of the specified selection. |
| 2448 | + | |
| 2449 | + | TODO: briefly explain what a selection is. |
| 2450 | + | ]]></description> |
| 2451 | + | <field name="selection"><![CDATA[ |
| 2452 | + | The selection. |
| 2453 | + | ]]></field> |
| 2454 | + | <error type="Atom"><![CDATA[ |
| 2455 | + | `selection` does not refer to a valid atom. |
| 2456 | + | ]]></error> |
| 2457 | + | <see type="request" name="SetSelectionOwner" /> |
| 2458 | + | </doc> |
| 2459 | + | </request> |
| 2460 | + | |
| 2461 | + | <request name="ConvertSelection" opcode="24"> |
| 2462 | + | <pad bytes="1" /> |
| 2463 | + | <field type="WINDOW" name="requestor" /> |
| 2464 | + | <field type="ATOM" name="selection" /> |
| 2465 | + | <field type="ATOM" name="target" /> |
| 2466 | + | <field type="ATOM" name="property" altenum="Atom" /> |
| 2467 | + | <field type="TIMESTAMP" name="time" altenum="Time" /> |
| 2468 | + | </request> |
| 2469 | + | |
| 2470 | + | <enum name="SendEventDest"> |
| 2471 | + | <item name="PointerWindow"><value>0</value></item> |
| 2472 | + | <item name="ItemFocus"> <value>1</value></item> |
| 2473 | + | </enum> |
| 2474 | + | |
| 2475 | + | <request name="SendEvent" opcode="25"> |
| 2476 | + | <field type="BOOL" name="propagate" /> |
| 2477 | + | <field type="WINDOW" name="destination" altenum="SendEventDest" /> |
| 2478 | + | <field type="CARD32" name="event_mask" mask="EventMask" /> |
| 2479 | + | <list type="char" name="event"><value>32</value></list> |
| 2480 | + | <doc> |
| 2481 | + | <brief>send an event</brief> |
| 2482 | + | <description><![CDATA[ |
| 2483 | + | Identifies the `destination` window, determines which clients should receive |
| 2484 | + | the specified event and ignores any active grabs. |
| 2485 | + | |
| 2486 | + | The `event` must be one of the core events or an event defined by an extension, |
| 2487 | + | so that the X server can correctly byte-swap the contents as necessary. The |
| 2488 | + | contents of `event` are otherwise unaltered and unchecked except for the |
| 2489 | + | `send_event` field which is forced to 'true'. |
| 2490 | + | ]]></description> |
| 2491 | + | <example><![CDATA[ |
| 2492 | + | /* |
| 2493 | + | * Tell the given window that it was configured to a size of 800x600 pixels. |
| 2494 | + | * |
| 2495 | + | */ |
| 2496 | + | void my_example(xcb_connection_t *conn, xcb_window_t window) { |
| 2497 | + | /* Every X11 event is 32 bytes long. Therefore, XCB will copy 32 bytes. |
| 2498 | + | * In order to properly initialize these bytes, we allocate 32 bytes even |
| 2499 | + | * though we only need less for an xcb_configure_notify_event_t */ |
| 2500 | + | xcb_configure_notify_event_t *event = calloc(32, 1); |
| 2501 | + | |
| 2502 | + | event->event = window; |
| 2503 | + | event->window = window; |
| 2504 | + | event->response_type = XCB_CONFIGURE_NOTIFY; |
| 2505 | + | |
| 2506 | + | event->x = 0; |
| 2507 | + | event->y = 0; |
| 2508 | + | event->width = 800; |
| 2509 | + | event->height = 600; |
| 2510 | + | |
| 2511 | + | event->border_width = 0; |
| 2512 | + | event->above_sibling = XCB_NONE; |
| 2513 | + | event->override_redirect = false; |
| 2514 | + | |
| 2515 | + | xcb_send_event(conn, false, window, XCB_EVENT_MASK_STRUCTURE_NOTIFY, |
| 2516 | + | (char*)event); |
| 2517 | + | xcb_flush(conn); |
| 2518 | + | free(event); |
| 2519 | + | } |
| 2520 | + | ]]></example> |
| 2521 | + | <field name="destination"><![CDATA[ |
| 2522 | + | The window to send this event to. Every client which selects any event within |
| 2523 | + | `event_mask` on `destination` will get the event. |
| 2524 | + | |
| 2525 | + | The special value `XCB_SEND_EVENT_DEST_POINTER_WINDOW` refers to the window |
| 2526 | + | that contains the mouse pointer. |
| 2527 | + | |
| 2528 | + | The special value `XCB_SEND_EVENT_DEST_ITEM_FOCUS` refers to the window which |
| 2529 | + | has the keyboard focus. |
| 2530 | + | ]]></field> |
| 2531 | + | <field name="event_mask"><![CDATA[ |
| 2532 | + | Event_mask for determining which clients should receive the specified event. |
| 2533 | + | See `destination` and `propagate`. |
| 2534 | + | ]]></field> |
| 2535 | + | <field name="propagate"><![CDATA[ |
| 2536 | + | If `propagate` is true and no clients have selected any event on `destination`, |
| 2537 | + | the destination is replaced with the closest ancestor of `destination` for |
| 2538 | + | which some client has selected a type in `event_mask` and for which no |
| 2539 | + | intervening window has that type in its do-not-propagate-mask. If no such |
| 2540 | + | window exists or if the window is an ancestor of the focus window and |
| 2541 | + | `InputFocus` was originally specified as the destination, the event is not sent |
| 2542 | + | to any clients. Otherwise, the event is reported to every client selecting on |
| 2543 | + | the final destination any of the types specified in `event_mask`. |
| 2544 | + | ]]></field> |
| 2545 | + | <field name="event"><![CDATA[ |
| 2546 | + | The event to send to the specified `destination`. |
| 2547 | + | ]]></field> |
| 2548 | + | <error type="Window"><![CDATA[ |
| 2549 | + | The specified `destination` window does not exist. |
| 2550 | + | ]]></error> |
| 2551 | + | <error type="Value"><![CDATA[ |
| 2552 | + | The given `event` is neither a core event nor an event defined by an extension. |
| 2553 | + | ]]></error> |
| 2554 | + | <see type="event" name="ConfigureNotify" /> |
| 2555 | + | </doc> |
| 2556 | + | </request> |
| 2557 | + | |
| 2558 | + | <enum name="GrabMode"> |
| 2559 | + | <item name="Sync"> <value>0</value></item> |
| 2560 | + | <item name="Async"><value>1</value></item> |
| 2561 | + | <doc> |
| 2562 | + | <field name="Sync"><![CDATA[ |
| 2563 | + | The state of the keyboard appears to freeze: No further keyboard events are |
| 2564 | + | generated by the server until the grabbing client issues a releasing |
| 2565 | + | `AllowEvents` request or until the keyboard grab is released. |
| 2566 | + | ]]></field> |
| 2567 | + | <field name="Async"><![CDATA[ |
| 2568 | + | Keyboard event processing continues normally. |
| 2569 | + | ]]></field> |
| 2570 | + | </doc> |
| 2571 | + | </enum> |
| 2572 | + | |
| 2573 | + | <enum name="GrabStatus"> |
| 2574 | + | <item name="Success"> <value>0</value></item> |
| 2575 | + | <item name="AlreadyGrabbed"><value>1</value></item> |
| 2576 | + | <item name="InvalidTime"> <value>2</value></item> |
| 2577 | + | <item name="NotViewable"> <value>3</value></item> |
| 2578 | + | <item name="Frozen"> <value>4</value></item> |
| 2579 | + | </enum> |
| 2580 | + | |
| 2581 | + | <enum name="Cursor"> |
| 2582 | + | <item name="None"> <value>0</value></item> |
| 2583 | + | </enum> |
| 2584 | + | |
| 2585 | + | <request name="GrabPointer" opcode="26"> |
| 2586 | + | <field type="BOOL" name="owner_events" /> |
| 2587 | + | <field type="WINDOW" name="grab_window" /> |
| 2588 | + | <field type="CARD16" name="event_mask" mask="EventMask" /> |
| 2589 | + | <field type="BYTE" name="pointer_mode" enum="GrabMode" /> |
| 2590 | + | <field type="BYTE" name="keyboard_mode" enum="GrabMode" /> |
| 2591 | + | <field type="WINDOW" name="confine_to" altenum="Window" /> |
| 2592 | + | <field type="CURSOR" name="cursor" altenum="Cursor" /> |
| 2593 | + | <field type="TIMESTAMP" name="time" altenum="Time" /> |
| 2594 | + | <reply> |
| 2595 | + | <field type="BYTE" name="status" enum="GrabStatus" /> |
| 2596 | + | </reply> |
| 2597 | + | <doc> |
| 2598 | + | <brief>Grab the pointer</brief> |
| 2599 | + | <description><![CDATA[ |
| 2600 | + | Actively grabs control of the pointer. Further pointer events are reported only to the grabbing client. Overrides any active pointer grab by this client. |
| 2601 | + | |
| 2602 | + | ]]></description> |
| 2603 | + | <example><![CDATA[ |
| 2604 | + | /* |
| 2605 | + | * Grabs the pointer actively |
| 2606 | + | * |
| 2607 | + | */ |
| 2608 | + | void my_example(xcb_connection_t *conn, xcb_screen_t *screen, xcb_cursor_t cursor) { |
| 2609 | + | xcb_grab_pointer_cookie_t cookie; |
| 2610 | + | xcb_grab_pointer_reply_t *reply; |
| 2611 | + | |
| 2612 | + | cookie = xcb_grab_pointer( |
| 2613 | + | conn, |
| 2614 | + | false, /* get all pointer events specified by the following mask */ |
| 2615 | + | screen->root, /* grab the root window */ |
| 2616 | + | XCB_NONE, /* which events to let through */ |
| 2617 | + | XCB_GRAB_MODE_ASYNC, /* pointer events should continue as normal */ |
| 2618 | + | XCB_GRAB_MODE_ASYNC, /* keyboard mode */ |
| 2619 | + | XCB_NONE, /* confine_to = in which window should the cursor stay */ |
| 2620 | + | cursor, /* we change the cursor to whatever the user wanted */ |
| 2621 | + | XCB_CURRENT_TIME |
| 2622 | + | ); |
| 2623 | + | |
| 2624 | + | if ((reply = xcb_grab_pointer_reply(conn, cookie, NULL))) { |
| 2625 | + | if (reply->status == XCB_GRAB_STATUS_SUCCESS) |
| 2626 | + | printf("successfully grabbed the pointer\\n"); |
| 2627 | + | free(reply); |
| 2628 | + | } |
| 2629 | + | } |
| 2630 | + | ]]></example> |
| 2631 | + | <field name="event_mask"><![CDATA[ |
| 2632 | + | Specifies which pointer events are reported to the client. |
| 2633 | + | |
| 2634 | + | TODO: which values? |
| 2635 | + | ]]></field> |
| 2636 | + | <field name="confine_to"><![CDATA[ |
| 2637 | + | Specifies the window to confine the pointer in (the user will not be able to |
| 2638 | + | move the pointer out of that window). |
| 2639 | + | |
| 2640 | + | The special value `XCB_NONE` means don't confine the pointer. |
| 2641 | + | ]]></field> |
| 2642 | + | <field name="cursor"><![CDATA[ |
| 2643 | + | Specifies the cursor that should be displayed or `XCB_NONE` to not change the |
| 2644 | + | cursor. |
| 2645 | + | ]]></field> |
| 2646 | + | <field name="owner_events"><![CDATA[ |
| 2647 | + | If 1, the `grab_window` will still get the pointer events. If 0, events are not |
| 2648 | + | reported to the `grab_window`. |
| 2649 | + | ]]></field> |
| 2650 | + | <field name="grab_window"><![CDATA[ |
| 2651 | + | Specifies the window on which the pointer should be grabbed. |
| 2652 | + | ]]></field> |
| 2653 | + | <field name="time"><![CDATA[ |
| 2654 | + | The time argument allows you to avoid certain circumstances that come up if |
| 2655 | + | applications take a long time to respond or if there are long network delays. |
| 2656 | + | Consider a situation where you have two applications, both of which normally |
| 2657 | + | grab the pointer when clicked on. If both applications specify the timestamp |
| 2658 | + | from the event, the second application may wake up faster and successfully grab |
| 2659 | + | the pointer before the first application. The first application then will get |
| 2660 | + | an indication that the other application grabbed the pointer before its request |
| 2661 | + | was processed. |
| 2662 | + | |
| 2663 | + | The special value `XCB_CURRENT_TIME` will be replaced with the current server |
| 2664 | + | time. |
| 2665 | + | ]]></field> |
| 2666 | + | <!-- the enum doc is sufficient. --> |
| 2667 | + | <field name="pointer_mode" /> |
| 2668 | + | <field name="keyboard_mode" /> |
| 2669 | + | <error type="Value"><![CDATA[ |
| 2670 | + | TODO: reasons? |
| 2671 | + | ]]></error> |
| 2672 | + | <error type="Window"><![CDATA[ |
| 2673 | + | The specified `window` does not exist. |
| 2674 | + | ]]></error> |
| 2675 | + | |
| 2676 | + | <see type="request" name="GrabKeyboard" /> |
| 2677 | + | </doc> |
| 2678 | + | </request> |
| 2679 | + | |
| 2680 | + | <request name="UngrabPointer" opcode="27"> |
| 2681 | + | <pad bytes="1" /> |
| 2682 | + | <field type="TIMESTAMP" name="time" altenum="Time" /> |
| 2683 | + | <doc> |
| 2684 | + | <brief>release the pointer</brief> |
| 2685 | + | <description><![CDATA[ |
| 2686 | + | Releases the pointer and any queued events if you actively grabbed the pointer |
| 2687 | + | before using `xcb_grab_pointer`, `xcb_grab_button` or within a normal button |
| 2688 | + | press. |
| 2689 | + | |
| 2690 | + | EnterNotify and LeaveNotify events are generated. |
| 2691 | + | ]]></description> |
| 2692 | + | <field name="time"><![CDATA[ |
| 2693 | + | Timestamp to avoid race conditions when running X over the network. |
| 2694 | + | |
| 2695 | + | The pointer will not be released if `time` is earlier than the |
| 2696 | + | last-pointer-grab time or later than the current X server time. |
| 2697 | + | ]]></field> |
| 2698 | + | <field name="name_len"><![CDATA[ |
| 2699 | + | Length (in bytes) of `name`. |
| 2700 | + | ]]></field> |
| 2701 | + | <field name="name"><![CDATA[ |
| 2702 | + | A pattern describing an X core font. |
| 2703 | + | ]]></field> |
| 2704 | + | <see type="request" name="GrabPointer" /> |
| 2705 | + | <see type="request" name="GrabButton" /> |
| 2706 | + | <see type="event" name="EnterNotify" /> |
| 2707 | + | <see type="event" name="LeaveNotify" /> |
| 2708 | + | </doc> |
| 2709 | + | </request> |
| 2710 | + | |
| 2711 | + | <enum name="ButtonIndex"> |
| 2712 | + | <item name="Any"><value>0</value></item> |
| 2713 | + | <item name="1"> <value>1</value></item> |
| 2714 | + | <item name="2"> <value>2</value></item> |
| 2715 | + | <item name="3"> <value>3</value></item> |
| 2716 | + | <item name="4"> <value>4</value></item> |
| 2717 | + | <item name="5"> <value>5</value></item> |
| 2718 | + | <doc> |
| 2719 | + | <field name="Any"><![CDATA[ |
| 2720 | + | Any of the following (or none): |
| 2721 | + | ]]></field> |
| 2722 | + | <field name="1"><![CDATA[ |
| 2723 | + | The left mouse button. |
| 2724 | + | ]]></field> |
| 2725 | + | <field name="2"><![CDATA[ |
| 2726 | + | The right mouse button. |
| 2727 | + | ]]></field> |
| 2728 | + | <field name="3"><![CDATA[ |
| 2729 | + | The middle mouse button. |
| 2730 | + | ]]></field> |
| 2731 | + | <field name="4"><![CDATA[ |
| 2732 | + | Scroll wheel. TODO: direction? |
| 2733 | + | ]]></field> |
| 2734 | + | <field name="5"><![CDATA[ |
| 2735 | + | Scroll wheel. TODO: direction? |
| 2736 | + | ]]></field> |
| 2737 | + | </doc> |
| 2738 | + | </enum> |
| 2739 | + | |
| 2740 | + | <request name="GrabButton" opcode="28"> |
| 2741 | + | <field type="BOOL" name="owner_events" /> |
| 2742 | + | <field type="WINDOW" name="grab_window" /> |
| 2743 | + | <field type="CARD16" name="event_mask" mask="EventMask" /> |
| 2744 | + | <field type="CARD8" name="pointer_mode" enum="GrabMode" /> |
| 2745 | + | <field type="CARD8" name="keyboard_mode" enum="GrabMode" /> |
| 2746 | + | <field type="WINDOW" name="confine_to" altenum="Window" /> |
| 2747 | + | <field type="CURSOR" name="cursor" altenum="Cursor" /> |
| 2748 | + | <field type="CARD8" name="button" enum="ButtonIndex" /> |
| 2749 | + | <pad bytes="1" /> |
| 2750 | + | <field type="CARD16" name="modifiers" mask="ModMask" /> |
| 2751 | + | <doc> |
| 2752 | + | <brief>Grab pointer button(s)</brief> |
| 2753 | + | <description><![CDATA[ |
| 2754 | + | This request establishes a passive grab. The pointer is actively grabbed as |
| 2755 | + | described in GrabPointer, the last-pointer-grab time is set to the time at |
| 2756 | + | which the button was pressed (as transmitted in the ButtonPress event), and the |
| 2757 | + | ButtonPress event is reported if all of the following conditions are true: |
| 2758 | + | |
| 2759 | + | The pointer is not grabbed and the specified button is logically pressed when |
| 2760 | + | the specified modifier keys are logically down, and no other buttons or |
| 2761 | + | modifier keys are logically down. |
| 2762 | + | |
| 2763 | + | The grab-window contains the pointer. |
| 2764 | + | |
| 2765 | + | The confine-to window (if any) is viewable. |
| 2766 | + | |
| 2767 | + | A passive grab on the same button/key combination does not exist on any |
| 2768 | + | ancestor of grab-window. |
| 2769 | + | |
| 2770 | + | The interpretation of the remaining arguments is the same as for GrabPointer. |
| 2771 | + | The active grab is terminated automatically when the logical state of the |
| 2772 | + | pointer has all buttons released, independent of the logical state of modifier |
| 2773 | + | keys. Note that the logical state of a device (as seen by means of the |
| 2774 | + | protocol) may lag the physical state if device event processing is frozen. This |
| 2775 | + | request overrides all previous passive grabs by the same client on the same |
| 2776 | + | button/key combinations on the same window. A modifier of AnyModifier is |
| 2777 | + | equivalent to issuing the request for all possible modifier combinations |
| 2778 | + | (including the combination of no modifiers). It is not required that all |
| 2779 | + | specified modifiers have currently assigned keycodes. A button of AnyButton is |
| 2780 | + | equivalent to issuing the request for all possible buttons. Otherwise, it is |
| 2781 | + | not required that the button specified currently be assigned to a physical |
| 2782 | + | button. |
| 2783 | + | |
| 2784 | + | An Access error is generated if some other client has already issued a |
| 2785 | + | GrabButton request with the same button/key combination on the same window. |
| 2786 | + | When using AnyModifier or AnyButton, the request fails completely (no grabs are |
| 2787 | + | established), and an Access error is generated if there is a conflicting grab |
| 2788 | + | for any combination. The request has no effect on an active grab. |
| 2789 | + | |
| 2790 | + | ]]></description> |
| 2791 | + | <field name="owner_events"><![CDATA[ |
| 2792 | + | If 1, the `grab_window` will still get the pointer events. If 0, events are not |
| 2793 | + | reported to the `grab_window`. |
| 2794 | + | ]]></field> |
| 2795 | + | <field name="grab_window"><![CDATA[ |
| 2796 | + | Specifies the window on which the pointer should be grabbed. |
| 2797 | + | ]]></field> |
| 2798 | + | <field name="event_mask"><![CDATA[ |
| 2799 | + | Specifies which pointer events are reported to the client. |
| 2800 | + | |
| 2801 | + | TODO: which values? |
| 2802 | + | ]]></field> |
| 2803 | + | <field name="confine_to"><![CDATA[ |
| 2804 | + | Specifies the window to confine the pointer in (the user will not be able to |
| 2805 | + | move the pointer out of that window). |
| 2806 | + | |
| 2807 | + | The special value `XCB_NONE` means don't confine the pointer. |
| 2808 | + | ]]></field> |
| 2809 | + | <field name="cursor"><![CDATA[ |
| 2810 | + | Specifies the cursor that should be displayed or `XCB_NONE` to not change the |
| 2811 | + | cursor. |
| 2812 | + | ]]></field> |
| 2813 | + | <field name="modifiers"><![CDATA[ |
| 2814 | + | The modifiers to grab. |
| 2815 | + | |
| 2816 | + | Using the special value `XCB_MOD_MASK_ANY` means grab the pointer with all |
| 2817 | + | possible modifier combinations. |
| 2818 | + | ]]></field> |
| 2819 | + | <!-- the enum doc is sufficient. --> |
| 2820 | + | <field name="pointer_mode" /> |
| 2821 | + | <field name="keyboard_mode" /> |
| 2822 | + | <field name="button" /> |
| 2823 | + | <error type="Access"><![CDATA[ |
| 2824 | + | Another client has already issued a GrabButton with the same button/key |
| 2825 | + | combination on the same window. |
| 2826 | + | ]]></error> |
| 2827 | + | <error type="Value"><![CDATA[ |
| 2828 | + | TODO: reasons? |
| 2829 | + | ]]></error> |
| 2830 | + | <error type="Cursor"><![CDATA[ |
| 2831 | + | The specified `cursor` does not exist. |
| 2832 | + | ]]></error> |
| 2833 | + | <error type="Window"><![CDATA[ |
| 2834 | + | The specified `window` does not exist. |
| 2835 | + | ]]></error> |
| 2836 | + | </doc> |
| 2837 | + | </request> |
| 2838 | + | |
| 2839 | + | <request name="UngrabButton" opcode="29"> |
| 2840 | + | <field type="CARD8" name="button" enum="ButtonIndex" /> |
| 2841 | + | <field type="WINDOW" name="grab_window" /> |
| 2842 | + | <field type="CARD16" name="modifiers" mask="ModMask" /> |
| 2843 | + | <pad bytes="2" /> |
| 2844 | + | </request> |
| 2845 | + | |
| 2846 | + | <request name="ChangeActivePointerGrab" opcode="30"> |
| 2847 | + | <pad bytes="1" /> |
| 2848 | + | <field type="CURSOR" name="cursor" altenum="Cursor" /> |
| 2849 | + | <field type="TIMESTAMP" name="time" altenum="Time" /> |
| 2850 | + | <field type="CARD16" name="event_mask" mask="EventMask" /> |
| 2851 | + | <pad bytes="2" /> |
| 2852 | + | </request> |
| 2853 | + | |
| 2854 | + | <request name="GrabKeyboard" opcode="31"> |
| 2855 | + | <field type="BOOL" name="owner_events" /> |
| 2856 | + | <field type="WINDOW" name="grab_window" /> |
| 2857 | + | <field type="TIMESTAMP" name="time" altenum="Time" /> |
| 2858 | + | <field type="BYTE" name="pointer_mode" enum="GrabMode" /> |
| 2859 | + | <field type="BYTE" name="keyboard_mode" enum="GrabMode" /> |
| 2860 | + | <pad bytes="2" /> |
| 2861 | + | <reply> |
| 2862 | + | <field type="BYTE" name="status" enum="GrabStatus" /> |
| 2863 | + | </reply> |
| 2864 | + | <doc> |
| 2865 | + | <brief>Grab the keyboard</brief> |
| 2866 | + | <description><![CDATA[ |
| 2867 | + | Actively grabs control of the keyboard and generates FocusIn and FocusOut |
| 2868 | + | events. Further key events are reported only to the grabbing client. |
| 2869 | + | |
| 2870 | + | Any active keyboard grab by this client is overridden. If the keyboard is |
| 2871 | + | actively grabbed by some other client, `AlreadyGrabbed` is returned. If |
| 2872 | + | `grab_window` is not viewable, `GrabNotViewable` is returned. If the keyboard |
| 2873 | + | is frozen by an active grab of another client, `GrabFrozen` is returned. If the |
| 2874 | + | specified `time` is earlier than the last-keyboard-grab time or later than the |
| 2875 | + | current X server time, `GrabInvalidTime` is returned. Otherwise, the |
| 2876 | + | last-keyboard-grab time is set to the specified time. |
| 2877 | + | ]]></description> |
| 2878 | + | <example><![CDATA[ |
| 2879 | + | /* |
| 2880 | + | * Grabs the keyboard actively |
| 2881 | + | * |
| 2882 | + | */ |
| 2883 | + | void my_example(xcb_connection_t *conn, xcb_screen_t *screen) { |
| 2884 | + | xcb_grab_keyboard_cookie_t cookie; |
| 2885 | + | xcb_grab_keyboard_reply_t *reply; |
| 2886 | + | |
| 2887 | + | cookie = xcb_grab_keyboard( |
| 2888 | + | conn, |
| 2889 | + | true, /* report events */ |
| 2890 | + | screen->root, /* grab the root window */ |
| 2891 | + | XCB_CURRENT_TIME, |
| 2892 | + | XCB_GRAB_MODE_ASYNC, /* process events as normal, do not require sync */ |
| 2893 | + | XCB_GRAB_MODE_ASYNC |
| 2894 | + | ); |
| 2895 | + | |
| 2896 | + | if ((reply = xcb_grab_keyboard_reply(conn, cookie, NULL))) { |
| 2897 | + | if (reply->status == XCB_GRAB_STATUS_SUCCESS) |
| 2898 | + | printf("successfully grabbed the keyboard\\n"); |
| 2899 | + | |
| 2900 | + | free(reply); |
| 2901 | + | } |
| 2902 | + | } |
| 2903 | + | ]]></example> |
| 2904 | + | <field name="owner_events"><![CDATA[ |
| 2905 | + | If 1, the `grab_window` will still get the pointer events. If 0, events are not |
| 2906 | + | reported to the `grab_window`. |
| 2907 | + | ]]></field> |
| 2908 | + | <field name="grab_window"><![CDATA[ |
| 2909 | + | Specifies the window on which the pointer should be grabbed. |
| 2910 | + | ]]></field> |
| 2911 | + | <field name="time"><![CDATA[ |
| 2912 | + | Timestamp to avoid race conditions when running X over the network. |
| 2913 | + | |
| 2914 | + | The special value `XCB_CURRENT_TIME` will be replaced with the current server |
| 2915 | + | time. |
| 2916 | + | ]]></field> |
| 2917 | + | <!-- the enum doc is sufficient. --> |
| 2918 | + | <field name="pointer_mode" /> |
| 2919 | + | <field name="keyboard_mode" /> |
| 2920 | + | <error type="Value"><![CDATA[ |
| 2921 | + | TODO: reasons? |
| 2922 | + | ]]></error> |
| 2923 | + | <error type="Window"><![CDATA[ |
| 2924 | + | The specified `window` does not exist. |
| 2925 | + | ]]></error> |
| 2926 | + | <see type="request" name="GrabPointer" /> |
| 2927 | + | </doc> |
| 2928 | + | </request> |
| 2929 | + | |
| 2930 | + | <request name="UngrabKeyboard" opcode="32"> |
| 2931 | + | <pad bytes="1" /> |
| 2932 | + | <field type="TIMESTAMP" name="time" altenum="Time" /> |
| 2933 | + | </request> |
| 2934 | + | |
| 2935 | + | <!-- Use KEYCODE any = { XCBGrabAny }; to grab any key --> |
| 2936 | + | <enum name="Grab"> |
| 2937 | + | <item name="Any"><value>0</value></item> |
| 2938 | + | </enum> |
| 2939 | + | |
| 2940 | + | <request name="GrabKey" opcode="33"> |
| 2941 | + | <field type="BOOL" name="owner_events" /> |
| 2942 | + | <field type="WINDOW" name="grab_window" /> |
| 2943 | + | <field type="CARD16" name="modifiers" mask="ModMask" /> |
| 2944 | + | <field type="KEYCODE" name="key" altenum="Grab" /> |
| 2945 | + | <field type="CARD8" name="pointer_mode" enum="GrabMode" /> |
| 2946 | + | <field type="CARD8" name="keyboard_mode" enum="GrabMode" /> |
| 2947 | + | <pad bytes="3" /> |
| 2948 | + | <doc> |
| 2949 | + | <brief>Grab keyboard key(s)</brief> |
| 2950 | + | <description><![CDATA[ |
| 2951 | + | Establishes a passive grab on the keyboard. In the future, the keyboard is |
| 2952 | + | actively grabbed (as for `GrabKeyboard`), the last-keyboard-grab time is set to |
| 2953 | + | the time at which the key was pressed (as transmitted in the KeyPress event), |
| 2954 | + | and the KeyPress event is reported if all of the following conditions are true: |
| 2955 | + | |
| 2956 | + | The keyboard is not grabbed and the specified key (which can itself be a |
| 2957 | + | modifier key) is logically pressed when the specified modifier keys are |
| 2958 | + | logically down, and no other modifier keys are logically down. |
| 2959 | + | |
| 2960 | + | Either the grab_window is an ancestor of (or is) the focus window, or the |
| 2961 | + | grab_window is a descendant of the focus window and contains the pointer. |
| 2962 | + | |
| 2963 | + | A passive grab on the same key combination does not exist on any ancestor of |
| 2964 | + | grab_window. |
| 2965 | + | |
| 2966 | + | The interpretation of the remaining arguments is as for XGrabKeyboard. The active grab is terminated |
| 2967 | + | automatically when the logical state of the keyboard has the specified key released (independent of the |
| 2968 | + | logical state of the modifier keys), at which point a KeyRelease event is reported to the grabbing window. |
| 2969 | + | |
| 2970 | + | Note that the logical state of a device (as seen by client applications) may lag the physical state if |
| 2971 | + | device event processing is frozen. |
| 2972 | + | |
| 2973 | + | A modifiers argument of AnyModifier is equivalent to issuing the request for all possible modifier combinations (including the combination of no modifiers). It is not required that all modifiers specified |
| 2974 | + | have currently assigned KeyCodes. A keycode argument of AnyKey is equivalent to issuing the request for |
| 2975 | + | all possible KeyCodes. Otherwise, the specified keycode must be in the range specified by min_keycode |
| 2976 | + | and max_keycode in the connection setup, or a BadValue error results. |
| 2977 | + | |
| 2978 | + | If some other client has issued a XGrabKey with the same key combination on the same window, a BadAccess |
| 2979 | + | error results. When using AnyModifier or AnyKey, the request fails completely, and a BadAccess error |
| 2980 | + | results (no grabs are established) if there is a conflicting grab for any combination. |
| 2981 | + | |
| 2982 | + | ]]></description> |
| 2983 | + | <field name="owner_events"><![CDATA[ |
| 2984 | + | If 1, the `grab_window` will still get the key events. If 0, events are not |
| 2985 | + | reported to the `grab_window`. |
| 2986 | + | ]]></field> |
| 2987 | + | <field name="grab_window"><![CDATA[ |
| 2988 | + | Specifies the window on which the key should be grabbed. |
| 2989 | + | ]]></field> |
| 2990 | + | <field name="key"><![CDATA[ |
| 2991 | + | The keycode of the key to grab. |
| 2992 | + | |
| 2993 | + | The special value `XCB_GRAB_ANY` means grab any key. |
| 2994 | + | ]]></field> |
| 2995 | + | <field name="modifiers"><![CDATA[ |
| 2996 | + | The modifiers to grab. |
| 2997 | + | |
| 2998 | + | Using the special value `XCB_MOD_MASK_ANY` means grab the key with all |
| 2999 | + | possible modifier combinations. |
| 3000 | + | ]]></field> |
| 3001 | + | <!-- the enum doc is sufficient. --> |
| 3002 | + | <field name="pointer_mode" /> |
| 3003 | + | <field name="keyboard_mode" /> |
| 3004 | + | <error type="Access"><![CDATA[ |
| 3005 | + | Another client has already issued a GrabKey with the same button/key |
| 3006 | + | combination on the same window. |
| 3007 | + | ]]></error> |
| 3008 | + | <error type="Value"><![CDATA[ |
| 3009 | + | The key is not `XCB_GRAB_ANY` and not in the range specified by `min_keycode` |
| 3010 | + | and `max_keycode` in the connection setup. |
| 3011 | + | ]]></error> |
| 3012 | + | <error type="Window"><![CDATA[ |
| 3013 | + | The specified `window` does not exist. |
| 3014 | + | ]]></error> |
| 3015 | + | <see type="request" name="GrabKeyboard" /> |
| 3016 | + | </doc> |
| 3017 | + | </request> |
| 3018 | + | |
| 3019 | + | <request name="UngrabKey" opcode="34"> |
| 3020 | + | <field type="KEYCODE" name="key" altenum="Grab" /> |
| 3021 | + | <field type="WINDOW" name="grab_window" /> |
| 3022 | + | <field type="CARD16" name="modifiers" mask="ModMask" /> |
| 3023 | + | <pad bytes="2" /> |
| 3024 | + | <doc> |
| 3025 | + | <brief>release a key combination</brief> |
| 3026 | + | <description><![CDATA[ |
| 3027 | + | Releases the key combination on `grab_window` if you grabbed it using |
| 3028 | + | `xcb_grab_key` before. |
| 3029 | + | ]]></description> |
| 3030 | + | <field name="key"><![CDATA[ |
| 3031 | + | The keycode of the specified key combination. |
| 3032 | + | |
| 3033 | + | Using the special value `XCB_GRAB_ANY` means releasing all possible key codes. |
| 3034 | + | ]]></field> |
| 3035 | + | <field name="grab_window"><![CDATA[ |
| 3036 | + | The window on which the grabbed key combination will be released. |
| 3037 | + | ]]></field> |
| 3038 | + | <field name="modifiers"><![CDATA[ |
| 3039 | + | The modifiers of the specified key combination. |
| 3040 | + | |
| 3041 | + | Using the special value `XCB_MOD_MASK_ANY` means releasing the key combination |
| 3042 | + | with every possible modifier combination. |
| 3043 | + | ]]></field> |
| 3044 | + | <error type="Window"><![CDATA[ |
| 3045 | + | The specified `grab_window` does not exist. |
| 3046 | + | ]]></error> |
| 3047 | + | <error type="Value"><![CDATA[ |
| 3048 | + | TODO: reasons? |
| 3049 | + | ]]></error> |
| 3050 | + | <see type="request" name="GrabKey" /> |
| 3051 | + | <see type="program" name="xev" /> |
| 3052 | + | </doc> |
| 3053 | + | </request> |
| 3054 | + | |
| 3055 | + | <enum name="Allow"> |
| 3056 | + | <item name="AsyncPointer"> <value>0</value></item> |
| 3057 | + | <item name="SyncPointer"> <value>1</value></item> |
| 3058 | + | <item name="ReplayPointer"> <value>2</value></item> |
| 3059 | + | <item name="AsyncKeyboard"> <value>3</value></item> |
| 3060 | + | <item name="SyncKeyboard"> <value>4</value></item> |
| 3061 | + | <item name="ReplayKeyboard"><value>5</value></item> |
| 3062 | + | <item name="AsyncBoth"> <value>6</value></item> |
| 3063 | + | <item name="SyncBoth"> <value>7</value></item> |
| 3064 | + | <doc> |
| 3065 | + | <field name="AsyncPointer"><![CDATA[ |
| 3066 | + | For AsyncPointer, if the pointer is frozen by the client, pointer event |
| 3067 | + | processing continues normally. If the pointer is frozen twice by the client on |
| 3068 | + | behalf of two separate grabs, AsyncPointer thaws for both. AsyncPointer has no |
| 3069 | + | effect if the pointer is not frozen by the client, but the pointer need not be |
| 3070 | + | grabbed by the client. |
| 3071 | + | |
| 3072 | + | TODO: rewrite this in more understandable terms. |
| 3073 | + | ]]></field> |
| 3074 | + | <field name="SyncPointer"><![CDATA[ |
| 3075 | + | For SyncPointer, if the pointer is frozen and actively grabbed by the client, |
| 3076 | + | pointer event processing continues normally until the next ButtonPress or |
| 3077 | + | ButtonRelease event is reported to the client, at which time the pointer again |
| 3078 | + | appears to freeze. However, if the reported event causes the pointer grab to be |
| 3079 | + | released, then the pointer does not freeze. SyncPointer has no effect if the |
| 3080 | + | pointer is not frozen by the client or if the pointer is not grabbed by the |
| 3081 | + | client. |
| 3082 | + | ]]></field> |
| 3083 | + | <field name="ReplayPointer"><![CDATA[ |
| 3084 | + | For ReplayPointer, if the pointer is actively grabbed by the client and is |
| 3085 | + | frozen as the result of an event having been sent to the client (either from |
| 3086 | + | the activation of a GrabButton or from a previous AllowEvents with mode |
| 3087 | + | SyncPointer but not from a GrabPointer), then the pointer grab is released and |
| 3088 | + | that event is completely reprocessed, this time ignoring any passive grabs at |
| 3089 | + | or above (towards the root) the grab-window of the grab just released. The |
| 3090 | + | request has no effect if the pointer is not grabbed by the client or if the |
| 3091 | + | pointer is not frozen as the result of an event. |
| 3092 | + | ]]></field> |
| 3093 | + | <field name="AsyncKeyboard"><![CDATA[ |
| 3094 | + | For AsyncKeyboard, if the keyboard is frozen by the client, keyboard event |
| 3095 | + | processing continues normally. If the keyboard is frozen twice by the client on |
| 3096 | + | behalf of two separate grabs, AsyncKeyboard thaws for both. AsyncKeyboard has |
| 3097 | + | no effect if the keyboard is not frozen by the client, but the keyboard need |
| 3098 | + | not be grabbed by the client. |
| 3099 | + | ]]></field> |
| 3100 | + | <field name="SyncKeyboard"><![CDATA[ |
| 3101 | + | For SyncKeyboard, if the keyboard is frozen and actively grabbed by the client, |
| 3102 | + | keyboard event processing continues normally until the next KeyPress or |
| 3103 | + | KeyRelease event is reported to the client, at which time the keyboard again |
| 3104 | + | appears to freeze. However, if the reported event causes the keyboard grab to |
| 3105 | + | be released, then the keyboard does not freeze. SyncKeyboard has no effect if |
| 3106 | + | the keyboard is not frozen by the client or if the keyboard is not grabbed by |
| 3107 | + | the client. |
| 3108 | + | ]]></field> |
| 3109 | + | <field name="ReplayKeyboard"><![CDATA[ |
| 3110 | + | For ReplayKeyboard, if the keyboard is actively grabbed by the client and is |
| 3111 | + | frozen as the result of an event having been sent to the client (either from |
| 3112 | + | the activation of a GrabKey or from a previous AllowEvents with mode |
| 3113 | + | SyncKeyboard but not from a GrabKeyboard), then the keyboard grab is released |
| 3114 | + | and that event is completely reprocessed, this time ignoring any passive grabs |
| 3115 | + | at or above (towards the root) the grab-window of the grab just released. The |
| 3116 | + | request has no effect if the keyboard is not grabbed by the client or if the |
| 3117 | + | keyboard is not frozen as the result of an event. |
| 3118 | + | ]]></field> |
| 3119 | + | <field name="SyncBoth"><![CDATA[ |
| 3120 | + | For SyncBoth, if both pointer and keyboard are frozen by the client, event |
| 3121 | + | processing (for both devices) continues normally until the next ButtonPress, |
| 3122 | + | ButtonRelease, KeyPress, or KeyRelease event is reported to the client for a |
| 3123 | + | grabbed device (button event for the pointer, key event for the keyboard), at |
| 3124 | + | which time the devices again appear to freeze. However, if the reported event |
| 3125 | + | causes the grab to be released, then the devices do not freeze (but if the |
| 3126 | + | other device is still grabbed, then a subsequent event for it will still cause |
| 3127 | + | both devices to freeze). SyncBoth has no effect unless both pointer and |
| 3128 | + | keyboard are frozen by the client. If the pointer or keyboard is frozen twice |
| 3129 | + | by the client on behalf of two separate grabs, SyncBoth thaws for both (but a |
| 3130 | + | subsequent freeze for SyncBoth will only freeze each device once). |
| 3131 | + | ]]></field> |
| 3132 | + | <field name="AsyncBoth"><![CDATA[ |
| 3133 | + | For AsyncBoth, if the pointer and the keyboard are frozen by the client, event |
| 3134 | + | processing for both devices continues normally. If a device is frozen twice by |
| 3135 | + | the client on behalf of two separate grabs, AsyncBoth thaws for both. AsyncBoth |
| 3136 | + | has no effect unless both pointer and keyboard are frozen by the client. |
| 3137 | + | ]]></field> |
| 3138 | + | </doc> |
| 3139 | + | </enum> |
| 3140 | + | |
| 3141 | + | <request name="AllowEvents" opcode="35"> |
| 3142 | + | <field type="CARD8" name="mode" enum="Allow" /> |
| 3143 | + | <field type="TIMESTAMP" name="time" altenum="Time" /> |
| 3144 | + | <doc> |
| 3145 | + | <brief>release queued events</brief> |
| 3146 | + | <description><![CDATA[ |
| 3147 | + | Releases queued events if the client has caused a device (pointer/keyboard) to |
| 3148 | + | freeze due to grabbing it actively. This request has no effect if `time` is |
| 3149 | + | earlier than the last-grab time of the most recent active grab for this client |
| 3150 | + | or if `time` is later than the current X server time. |
| 3151 | + | ]]></description> |
| 3152 | + | <!-- the enum doc is sufficient. --> |
| 3153 | + | <field name="mode" /> |
| 3154 | + | <field name="time"><![CDATA[ |
| 3155 | + | Timestamp to avoid race conditions when running X over the network. |
| 3156 | + | |
| 3157 | + | The special value `XCB_CURRENT_TIME` will be replaced with the current server |
| 3158 | + | time. |
| 3159 | + | ]]></field> |
| 3160 | + | <error type="Value"><![CDATA[ |
| 3161 | + | You specified an invalid `mode`. |
| 3162 | + | ]]></error> |
| 3163 | + | </doc> |
| 3164 | + | </request> |
| 3165 | + | |
| 3166 | + | <request name="GrabServer" opcode="36" /> |
| 3167 | + | |
| 3168 | + | <request name="UngrabServer" opcode="37" /> |
| 3169 | + | |
| 3170 | + | <request name="QueryPointer" opcode="38"> |
| 3171 | + | <pad bytes="1" /> |
| 3172 | + | <field type="WINDOW" name="window" /> |
| 3173 | + | <reply> |
| 3174 | + | <field type="BOOL" name="same_screen" /> |
| 3175 | + | <field type="WINDOW" name="root" /> |
| 3176 | + | <field type="WINDOW" name="child" altenum="Window" /> |
| 3177 | + | <field type="INT16" name="root_x" /> |
| 3178 | + | <field type="INT16" name="root_y" /> |
| 3179 | + | <field type="INT16" name="win_x" /> |
| 3180 | + | <field type="INT16" name="win_y" /> |
| 3181 | + | <field type="CARD16" name="mask" mask="KeyButMask" /> |
| 3182 | + | <pad bytes="2" /> |
| 3183 | + | <doc> |
| 3184 | + | <field name="same_screen"><![CDATA[ |
| 3185 | + | If `same_screen` is False, then the pointer is not on the same screen as the |
| 3186 | + | argument window, `child` is None, and `win_x` and `win_y` are zero. If |
| 3187 | + | `same_screen` is True, then `win_x` and `win_y` are the pointer coordinates |
| 3188 | + | relative to the argument window's origin, and child is the child containing the |
| 3189 | + | pointer, if any. |
| 3190 | + | ]]></field> |
| 3191 | + | <field name="root"><![CDATA[ |
| 3192 | + | The root window the pointer is logically on. |
| 3193 | + | ]]></field> |
| 3194 | + | <field name="child"><![CDATA[ |
| 3195 | + | The child window containing the pointer, if any, if `same_screen` is true. If |
| 3196 | + | `same_screen` is false, `XCB_NONE` is returned. |
| 3197 | + | ]]></field> |
| 3198 | + | <field name="root_x"><![CDATA[ |
| 3199 | + | The pointer X position, relative to `root`. |
| 3200 | + | ]]></field> |
| 3201 | + | <field name="root_y"><![CDATA[ |
| 3202 | + | The pointer Y position, relative to `root`. |
| 3203 | + | ]]></field> |
| 3204 | + | <field name="win_x"><![CDATA[ |
| 3205 | + | The pointer X coordinate, relative to `child`, if `same_screen` is true. Zero |
| 3206 | + | otherwise. |
| 3207 | + | ]]></field> |
| 3208 | + | <field name="win_y"><![CDATA[ |
| 3209 | + | The pointer Y coordinate, relative to `child`, if `same_screen` is true. Zero |
| 3210 | + | otherwise. |
| 3211 | + | ]]></field> |
| 3212 | + | <field name="mask"><![CDATA[ |
| 3213 | + | The current logical state of the modifier keys and the buttons. Note that the |
| 3214 | + | logical state of a device (as seen by means of the protocol) may lag the |
| 3215 | + | physical state if device event processing is frozen. |
| 3216 | + | ]]></field> |
| 3217 | + | </doc> |
| 3218 | + | </reply> |
| 3219 | + | <doc> |
| 3220 | + | <brief>get pointer coordinates</brief> |
| 3221 | + | <description><![CDATA[ |
| 3222 | + | Gets the root window the pointer is logically on and the pointer coordinates |
| 3223 | + | relative to the root window's origin. |
| 3224 | + | ]]></description> |
| 3225 | + | <field name="window"><![CDATA[ |
| 3226 | + | A window to check if the pointer is on the same screen as `window` (see the |
| 3227 | + | `same_screen` field in the reply). |
| 3228 | + | ]]></field> |
| 3229 | + | <error type="Window"><![CDATA[ |
| 3230 | + | The specified `window` does not exist. |
| 3231 | + | ]]></error> |
| 3232 | + | </doc> |
| 3233 | + | </request> |
| 3234 | + | |
| 3235 | + | <struct name="TIMECOORD"> |
| 3236 | + | <field type="TIMESTAMP" name="time" /> |
| 3237 | + | <field type="INT16" name="x" /> |
| 3238 | + | <field type="INT16" name="y" /> |
| 3239 | + | </struct> |
| 3240 | + | |
| 3241 | + | <request name="GetMotionEvents" opcode="39"> |
| 3242 | + | <pad bytes="1" /> |
| 3243 | + | <field type="WINDOW" name="window" /> |
| 3244 | + | <field type="TIMESTAMP" name="start" altenum="Time" /> |
| 3245 | + | <field type="TIMESTAMP" name="stop" altenum="Time" /> |
| 3246 | + | <reply> |
| 3247 | + | <pad bytes="1" /> |
| 3248 | + | <field type="CARD32" name="events_len" /> |
| 3249 | + | <pad bytes="20" /> |
| 3250 | + | <list type="TIMECOORD" name="events"> |
| 3251 | + | <fieldref>events_len</fieldref> |
| 3252 | + | </list> |
| 3253 | + | </reply> |
| 3254 | + | </request> |
| 3255 | + | |
| 3256 | + | <request name="TranslateCoordinates" opcode="40"> |
| 3257 | + | <pad bytes="1" /> |
| 3258 | + | <field type="WINDOW" name="src_window" /> |
| 3259 | + | <field type="WINDOW" name="dst_window" /> |
| 3260 | + | <field type="INT16" name="src_x" /> |
| 3261 | + | <field type="INT16" name="src_y" /> |
| 3262 | + | <reply> |
| 3263 | + | <field type="BOOL" name="same_screen" /> |
| 3264 | + | <field type="WINDOW" name="child" altenum="Window" /> |
| 3265 | + | <field type="INT16" name="dst_x" /> |
| 3266 | + | <field type="INT16" name="dst_y" /> |
| 3267 | + | </reply> |
| 3268 | + | </request> |
| 3269 | + | |
| 3270 | + | <request name="WarpPointer" opcode="41"> |
| 3271 | + | <pad bytes="1" /> |
| 3272 | + | <field type="WINDOW" name="src_window" altenum="Window" /> |
| 3273 | + | <field type="WINDOW" name="dst_window" altenum="Window" /> |
| 3274 | + | <field type="INT16" name="src_x" /> |
| 3275 | + | <field type="INT16" name="src_y" /> |
| 3276 | + | <field type="CARD16" name="src_width" /> |
| 3277 | + | <field type="CARD16" name="src_height" /> |
| 3278 | + | <field type="INT16" name="dst_x" /> |
| 3279 | + | <field type="INT16" name="dst_y" /> |
| 3280 | + | <doc> |
| 3281 | + | <brief>move mouse pointer</brief> |
| 3282 | + | <description><![CDATA[ |
| 3283 | + | Moves the mouse pointer to the specified position. |
| 3284 | + | |
| 3285 | + | If `src_window` is not `XCB_NONE` (TODO), the move will only take place if the |
| 3286 | + | pointer is inside `src_window` and within the rectangle specified by (`src_x`, |
| 3287 | + | `src_y`, `src_width`, `src_height`). The rectangle coordinates are relative to |
| 3288 | + | `src_window`. |
| 3289 | + | |
| 3290 | + | If `dst_window` is not `XCB_NONE` (TODO), the pointer will be moved to the |
| 3291 | + | offsets (`dst_x`, `dst_y`) relative to `dst_window`. If `dst_window` is |
| 3292 | + | `XCB_NONE` (TODO), the pointer will be moved by the offsets (`dst_x`, `dst_y`) |
| 3293 | + | relative to the current position of the pointer. |
| 3294 | + | ]]></description> |
| 3295 | + | <field name="src_window"><![CDATA[ |
| 3296 | + | If `src_window` is not `XCB_NONE` (TODO), the move will only take place if the |
| 3297 | + | pointer is inside `src_window` and within the rectangle specified by (`src_x`, |
| 3298 | + | `src_y`, `src_width`, `src_height`). The rectangle coordinates are relative to |
| 3299 | + | `src_window`. |
| 3300 | + | ]]></field> |
| 3301 | + | <field name="dst_window"><![CDATA[ |
| 3302 | + | If `dst_window` is not `XCB_NONE` (TODO), the pointer will be moved to the |
| 3303 | + | offsets (`dst_x`, `dst_y`) relative to `dst_window`. If `dst_window` is |
| 3304 | + | `XCB_NONE` (TODO), the pointer will be moved by the offsets (`dst_x`, `dst_y`) |
| 3305 | + | relative to the current position of the pointer. |
| 3306 | + | ]]></field> |
| 3307 | + | <error type="Window"><![CDATA[ |
| 3308 | + | TODO: reasons? |
| 3309 | + | ]]></error> |
| 3310 | + | <see type="request" name="SetInputFocus" /> |
| 3311 | + | </doc> |
| 3312 | + | </request> |
| 3313 | + | |
| 3314 | + | <!-- used for revert_to and focus --> |
| 3315 | + | <enum name="InputFocus"> |
| 3316 | + | <item name="None"> <value>0</value></item> |
| 3317 | + | <item name="PointerRoot"><value>1</value></item> |
| 3318 | + | <item name="Parent"> <value>2</value></item> <!-- revert_to only --> |
| 3319 | + | <item name="FollowKeyboard"><value>3</value></item> <!-- xinput extension only --> |
| 3320 | + | <doc> |
| 3321 | + | <field name="None"><![CDATA[ |
| 3322 | + | The focus reverts to `XCB_NONE`, so no window will have the input focus. |
| 3323 | + | ]]></field> |
| 3324 | + | <field name="PointerRoot"><![CDATA[ |
| 3325 | + | The focus reverts to `XCB_POINTER_ROOT` respectively. When the focus reverts, |
| 3326 | + | FocusIn and FocusOut events are generated, but the last-focus-change time is |
| 3327 | + | not changed. |
| 3328 | + | ]]></field> |
| 3329 | + | <field name="Parent"><![CDATA[ |
| 3330 | + | The focus reverts to the parent (or closest viewable ancestor) and the new |
| 3331 | + | revert_to value is `XCB_INPUT_FOCUS_NONE`. |
| 3332 | + | ]]></field> |
| 3333 | + | <field name="FollowKeyboard"><![CDATA[ |
| 3334 | + | NOT YET DOCUMENTED. Only relevant for the xinput extension. |
| 3335 | + | ]]></field> |
| 3336 | + | </doc> |
| 3337 | + | </enum> |
| 3338 | + | |
| 3339 | + | <request name="SetInputFocus" opcode="42"> |
| 3340 | + | <field type="CARD8" name="revert_to" enum="InputFocus" /> |
| 3341 | + | <field type="WINDOW" name="focus" altenum="InputFocus" /> |
| 3342 | + | <field type="TIMESTAMP" name="time" altenum="Time" /> |
| 3343 | + | <doc> |
| 3344 | + | <brief>Sets input focus</brief> |
| 3345 | + | <description><![CDATA[ |
| 3346 | + | Changes the input focus and the last-focus-change time. If the specified `time` |
| 3347 | + | is earlier than the current last-focus-change time, the request is ignored (to |
| 3348 | + | avoid race conditions when running X over the network). |
| 3349 | + | |
| 3350 | + | A FocusIn and FocusOut event is generated when focus is changed. |
| 3351 | + | ]]></description> |
| 3352 | + | <field name="focus"><![CDATA[ |
| 3353 | + | The window to focus. All keyboard events will be reported to this window. The |
| 3354 | + | window must be viewable (TODO), or a `xcb_match_error_t` occurs (TODO). |
| 3355 | + | |
| 3356 | + | If `focus` is `XCB_NONE` (TODO), all keyboard events are |
| 3357 | + | discarded until a new focus window is set. |
| 3358 | + | |
| 3359 | + | If `focus` is `XCB_POINTER_ROOT` (TODO), focus is on the root window of the |
| 3360 | + | screen on which the pointer is on currently. |
| 3361 | + | ]]></field> |
| 3362 | + | <field name="time"><![CDATA[ |
| 3363 | + | Timestamp to avoid race conditions when running X over the network. |
| 3364 | + | |
| 3365 | + | The special value `XCB_CURRENT_TIME` will be replaced with the current server |
| 3366 | + | time. |
| 3367 | + | ]]></field> |
| 3368 | + | <field name="revert_to"><![CDATA[ |
| 3369 | + | Specifies what happens when the `focus` window becomes unviewable (if `focus` |
| 3370 | + | is neither `XCB_NONE` nor `XCB_POINTER_ROOT`). |
| 3371 | + | ]]></field> |
| 3372 | + | <error type="Window"><![CDATA[ |
| 3373 | + | The specified `focus` window does not exist. |
| 3374 | + | ]]></error> |
| 3375 | + | <error type="Match"><![CDATA[ |
| 3376 | + | The specified `focus` window is not viewable. |
| 3377 | + | ]]></error> |
| 3378 | + | <error type="Value"><![CDATA[ |
| 3379 | + | TODO: Reasons? |
| 3380 | + | ]]></error> |
| 3381 | + | <see type="event" name="FocusIn" /> |
| 3382 | + | <see type="event" name="FocusOut" /> |
| 3383 | + | </doc> |
| 3384 | + | |
| 3385 | + | </request> |
| 3386 | + | |
| 3387 | + | <request name="GetInputFocus" opcode="43"> |
| 3388 | + | <reply> |
| 3389 | + | <field type="CARD8" name="revert_to" enum="InputFocus" /> |
| 3390 | + | <field type="WINDOW" name="focus" altenum="InputFocus" /> |
| 3391 | + | </reply> |
| 3392 | + | </request> |
| 3393 | + | |
| 3394 | + | <request name="QueryKeymap" opcode="44"> |
| 3395 | + | <reply> |
| 3396 | + | <pad bytes="1" /> |
| 3397 | + | <list type="CARD8" name="keys"><value>32</value></list> |
| 3398 | + | </reply> |
| 3399 | + | </request> |
| 3400 | + | |
| 3401 | + | <request name="OpenFont" opcode="45"> |
| 3402 | + | <pad bytes="1" /> |
| 3403 | + | <field type="FONT" name="fid" /> |
| 3404 | + | <field type="CARD16" name="name_len" /> |
| 3405 | + | <pad bytes="2" /> |
| 3406 | + | <list type="char" name="name"> |
| 3407 | + | <fieldref>name_len</fieldref> |
| 3408 | + | </list> |
| 3409 | + | <doc> |
| 3410 | + | <brief>opens a font</brief> |
| 3411 | + | <description><![CDATA[ |
| 3412 | + | Opens any X core font matching the given `name` (for example "-misc-fixed-*"). |
| 3413 | + | |
| 3414 | + | Note that X core fonts are deprecated (but still supported) in favor of |
| 3415 | + | client-side rendering using Xft. |
| 3416 | + | ]]></description> |
| 3417 | + | <field name="fid"><![CDATA[ |
| 3418 | + | The ID with which you will refer to the font, created by `xcb_generate_id`. |
| 3419 | + | ]]></field> |
| 3420 | + | <field name="name_len"><![CDATA[ |
| 3421 | + | Length (in bytes) of `name`. |
| 3422 | + | ]]></field> |
| 3423 | + | <field name="name"><![CDATA[ |
| 3424 | + | A pattern describing an X core font. |
| 3425 | + | ]]></field> |
| 3426 | + | <error type="Name"><![CDATA[ |
| 3427 | + | No font matches the given `name`. |
| 3428 | + | ]]></error> |
| 3429 | + | <see type="function" name="xcb_generate_id" /> |
| 3430 | + | </doc> |
| 3431 | + | </request> |
| 3432 | + | |
| 3433 | + | <request name="CloseFont" opcode="46"> |
| 3434 | + | <pad bytes="1" /> |
| 3435 | + | <field type="FONT" name="font" /> |
| 3436 | + | </request> |
| 3437 | + | |
| 3438 | + | <enum name="FontDraw"> |
| 3439 | + | <item name="LeftToRight"><value>0</value></item> |
| 3440 | + | <item name="RightToLeft"><value>1</value></item> |
| 3441 | + | </enum> |
| 3442 | + | |
| 3443 | + | <struct name="FONTPROP"> |
| 3444 | + | <field type="ATOM" name="name" /> |
| 3445 | + | <field type="CARD32" name="value" /> |
| 3446 | + | </struct> |
| 3447 | + | |
| 3448 | + | <struct name="CHARINFO"> |
| 3449 | + | <field type="INT16" name="left_side_bearing" /> |
| 3450 | + | <field type="INT16" name="right_side_bearing" /> |
| 3451 | + | <field type="INT16" name="character_width" /> |
| 3452 | + | <field type="INT16" name="ascent" /> |
| 3453 | + | <field type="INT16" name="descent" /> |
| 3454 | + | <field type="CARD16" name="attributes" /> |
| 3455 | + | </struct> |
| 3456 | + | |
| 3457 | + | <request name="QueryFont" opcode="47"> |
| 3458 | + | <pad bytes="1" /> |
| 3459 | + | <field type="FONTABLE" name="font" /> |
| 3460 | + | <reply> |
| 3461 | + | <pad bytes="1" /> |
| 3462 | + | <field type="CHARINFO" name="min_bounds" /> |
| 3463 | + | <pad bytes="4" /> |
| 3464 | + | <field type="CHARINFO" name="max_bounds" /> |
| 3465 | + | <pad bytes="4" /> |
| 3466 | + | <field type="CARD16" name="min_char_or_byte2" /> |
| 3467 | + | <field type="CARD16" name="max_char_or_byte2" /> |
| 3468 | + | <field type="CARD16" name="default_char" /> |
| 3469 | + | <field type="CARD16" name="properties_len" /> |
| 3470 | + | <field type="BYTE" name="draw_direction" enum="FontDraw" /> |
| 3471 | + | <field type="CARD8" name="min_byte1" /> |
| 3472 | + | <field type="CARD8" name="max_byte1" /> |
| 3473 | + | <field type="BOOL" name="all_chars_exist" /> |
| 3474 | + | <field type="INT16" name="font_ascent" /> |
| 3475 | + | <field type="INT16" name="font_descent" /> |
| 3476 | + | <field type="CARD32" name="char_infos_len" /> |
| 3477 | + | <list type="FONTPROP" name="properties"> |
| 3478 | + | <fieldref>properties_len</fieldref> |
| 3479 | + | </list> |
| 3480 | + | <list type="CHARINFO" name="char_infos"> |
| 3481 | + | <fieldref>char_infos_len</fieldref> |
| 3482 | + | </list> |
| 3483 | + | <doc> |
| 3484 | + | <field name="min_bounds"><![CDATA[ |
| 3485 | + | minimum bounds over all existing char |
| 3486 | + | ]]></field> |
| 3487 | + | <field name="max_bounds"><![CDATA[ |
| 3488 | + | maximum bounds over all existing char |
| 3489 | + | ]]></field> |
| 3490 | + | <field name="min_char_or_byte2"><![CDATA[ |
| 3491 | + | first character |
| 3492 | + | ]]></field> |
| 3493 | + | <field name="max_char_or_byte2"><![CDATA[ |
| 3494 | + | last character |
| 3495 | + | ]]></field> |
| 3496 | + | <field name="default_char"><![CDATA[ |
| 3497 | + | char to print for undefined character |
| 3498 | + | ]]></field> |
| 3499 | + | <field name="properties_len"><![CDATA[ |
| 3500 | + | how many properties there are |
| 3501 | + | ]]></field> |
| 3502 | + | <field name="all_chars_exist"><![CDATA[ |
| 3503 | + | flag if all characters have nonzero size |
| 3504 | + | ]]></field> |
| 3505 | + | <field name="font_ascent"><![CDATA[ |
| 3506 | + | baseline to top edge of raster |
| 3507 | + | ]]></field> |
| 3508 | + | <field name="font_descent"><![CDATA[ |
| 3509 | + | baseline to bottom edge of raster |
| 3510 | + | ]]></field> |
| 3511 | + | <!-- enum doc is sufficient --> |
| 3512 | + | <field name="draw_direction" /> |
| 3513 | + | </doc> |
| 3514 | + | </reply> |
| 3515 | + | <doc> |
| 3516 | + | <brief>query font metrics</brief> |
| 3517 | + | <description><![CDATA[ |
| 3518 | + | Queries information associated with the font. |
| 3519 | + | ]]></description> |
| 3520 | + | <field name="font"><![CDATA[ |
| 3521 | + | The fontable (Font or Graphics Context) to query. |
| 3522 | + | ]]></field> |
| 3523 | + | <!-- TODO: example --> |
| 3524 | + | </doc> |
| 3525 | + | </request> |
| 3526 | + | |
| 3527 | + | <request name="QueryTextExtents" opcode="48"> |
| 3528 | + | <exprfield type="BOOL" name="odd_length"> |
| 3529 | + | <op op="&"><fieldref>string_len</fieldref><value>1</value></op> |
| 3530 | + | </exprfield> |
| 3531 | + | <field type="FONTABLE" name="font" /> |
| 3532 | + | <list type="CHAR2B" name="string" /> |
| 3533 | + | <reply> |
| 3534 | + | <field type="BYTE" name="draw_direction" enum="FontDraw" /> |
| 3535 | + | <field type="INT16" name="font_ascent" /> |
| 3536 | + | <field type="INT16" name="font_descent" /> |
| 3537 | + | <field type="INT16" name="overall_ascent" /> |
| 3538 | + | <field type="INT16" name="overall_descent" /> |
| 3539 | + | <field type="INT32" name="overall_width" /> |
| 3540 | + | <field type="INT32" name="overall_left" /> |
| 3541 | + | <field type="INT32" name="overall_right" /> |
| 3542 | + | </reply> |
| 3543 | + | <doc> |
| 3544 | + | <brief>get text extents</brief> |
| 3545 | + | <description><![CDATA[ |
| 3546 | + | Query text extents from the X11 server. This request returns the bounding box |
| 3547 | + | of the specified 16-bit character string in the specified `font` or the font |
| 3548 | + | contained in the specified graphics context. |
| 3549 | + | |
| 3550 | + | `font_ascent` is set to the maximum of the ascent metrics of all characters in |
| 3551 | + | the string. `font_descent` is set to the maximum of the descent metrics. |
| 3552 | + | `overall_width` is set to the sum of the character-width metrics of all |
| 3553 | + | characters in the string. For each character in the string, let W be the sum of |
| 3554 | + | the character-width metrics of all characters preceding it in the string. Let L |
| 3555 | + | be the left-side-bearing metric of the character plus W. Let R be the |
| 3556 | + | right-side-bearing metric of the character plus W. The lbearing member is set |
| 3557 | + | to the minimum L of all characters in the string. The rbearing member is set to |
| 3558 | + | the maximum R. |
| 3559 | + | |
| 3560 | + | For fonts defined with linear indexing rather than 2-byte matrix indexing, each |
| 3561 | + | `xcb_char2b_t` structure is interpreted as a 16-bit number with byte1 as the |
| 3562 | + | most significant byte. If the font has no defined default character, undefined |
| 3563 | + | characters in the string are taken to have all zero metrics. |
| 3564 | + | |
| 3565 | + | Characters with all zero metrics are ignored. If the font has no defined |
| 3566 | + | default_char, the undefined characters in the string are also ignored. |
| 3567 | + | ]]></description> |
| 3568 | + | <field name="font"><![CDATA[ |
| 3569 | + | The `font` to calculate text extents in. You can also pass a graphics context. |
| 3570 | + | ]]></field> |
| 3571 | + | <field name="string_len"><![CDATA[ |
| 3572 | + | The number of characters in `string`. |
| 3573 | + | ]]></field> |
| 3574 | + | <field name="string"><![CDATA[ |
| 3575 | + | The text to get text extents for. |
| 3576 | + | ]]></field> |
| 3577 | + | <error type="GContext"><![CDATA[ |
| 3578 | + | The specified graphics context does not exist. |
| 3579 | + | ]]></error> |
| 3580 | + | <error type="Font"><![CDATA[ |
| 3581 | + | The specified `font` does not exist. |
| 3582 | + | ]]></error> |
| 3583 | + | </doc> |
| 3584 | + | </request> |
| 3585 | + | |
| 3586 | + | <struct name="STR"> |
| 3587 | + | <field type="CARD8" name="name_len" /> |
| 3588 | + | <list type="char" name="name"> |
| 3589 | + | <fieldref>name_len</fieldref> |
| 3590 | + | </list> |
| 3591 | + | </struct> |
| 3592 | + | |
| 3593 | + | <request name="ListFonts" opcode="49"> |
| 3594 | + | <pad bytes="1" /> |
| 3595 | + | <field type="CARD16" name="max_names" /> |
| 3596 | + | <field type="CARD16" name="pattern_len" /> |
| 3597 | + | <list type="char" name="pattern"> |
| 3598 | + | <fieldref>pattern_len</fieldref> |
| 3599 | + | </list> |
| 3600 | + | <reply> |
| 3601 | + | <pad bytes="1" /> |
| 3602 | + | <field type="CARD16" name="names_len" /> |
| 3603 | + | <pad bytes="22" /> |
| 3604 | + | <list type="STR" name="names"> |
| 3605 | + | <fieldref>names_len</fieldref> |
| 3606 | + | </list> |
| 3607 | + | <doc> |
| 3608 | + | <field name="names_len"><![CDATA[ |
| 3609 | + | The number of font names. |
| 3610 | + | ]]></field> |
| 3611 | + | </doc> |
| 3612 | + | </reply> |
| 3613 | + | <doc> |
| 3614 | + | <brief>get matching font names</brief> |
| 3615 | + | <description><![CDATA[ |
| 3616 | + | Gets a list of available font names which match the given `pattern`. |
| 3617 | + | ]]></description> |
| 3618 | + | <field name="pattern_len"><![CDATA[ |
| 3619 | + | The length (in bytes) of `pattern`. |
| 3620 | + | ]]></field> |
| 3621 | + | <field name="pattern"><![CDATA[ |
| 3622 | + | A font pattern, for example "-misc-fixed-*". |
| 3623 | + | |
| 3624 | + | The asterisk (*) is a wildcard for any number of characters. The question mark |
| 3625 | + | (?) is a wildcard for a single character. Use of uppercase or lowercase does |
| 3626 | + | not matter. |
| 3627 | + | ]]></field> |
| 3628 | + | <field name="max_names"><![CDATA[ |
| 3629 | + | The maximum number of fonts to be returned. |
| 3630 | + | ]]></field> |
| 3631 | + | </doc> |
| 3632 | + | </request> |
| 3633 | + | |
| 3634 | + | <request name="ListFontsWithInfo" opcode="50"> |
| 3635 | + | <pad bytes="1" /> |
| 3636 | + | <field type="CARD16" name="max_names" /> |
| 3637 | + | <field type="CARD16" name="pattern_len" /> |
| 3638 | + | <list type="char" name="pattern"> |
| 3639 | + | <fieldref>pattern_len</fieldref> |
| 3640 | + | </list> |
| 3641 | + | <reply> |
| 3642 | + | <field type="CARD8" name="name_len" /> |
| 3643 | + | <field type="CHARINFO" name="min_bounds" /> |
| 3644 | + | <pad bytes="4" /> |
| 3645 | + | <field type="CHARINFO" name="max_bounds" /> |
| 3646 | + | <pad bytes="4" /> |
| 3647 | + | <field type="CARD16" name="min_char_or_byte2" /> |
| 3648 | + | <field type="CARD16" name="max_char_or_byte2" /> |
| 3649 | + | <field type="CARD16" name="default_char" /> |
| 3650 | + | <field type="CARD16" name="properties_len" /> |
| 3651 | + | <field type="BYTE" name="draw_direction" enum="FontDraw" /> |
| 3652 | + | <field type="CARD8" name="min_byte1" /> |
| 3653 | + | <field type="CARD8" name="max_byte1" /> |
| 3654 | + | <field type="BOOL" name="all_chars_exist" /> |
| 3655 | + | <field type="INT16" name="font_ascent" /> |
| 3656 | + | <field type="INT16" name="font_descent" /> |
| 3657 | + | <field type="CARD32" name="replies_hint" /> |
| 3658 | + | <list type="FONTPROP" name="properties"> |
| 3659 | + | <fieldref>properties_len</fieldref> |
| 3660 | + | </list> |
| 3661 | + | <list type="char" name="name"> |
| 3662 | + | <fieldref>name_len</fieldref> |
| 3663 | + | </list> |
| 3664 | + | <doc> |
| 3665 | + | <field name="name_len"><![CDATA[ |
| 3666 | + | The number of matched font names. |
| 3667 | + | ]]></field> |
| 3668 | + | <field name="min_bounds"><![CDATA[ |
| 3669 | + | minimum bounds over all existing char |
| 3670 | + | ]]></field> |
| 3671 | + | <field name="max_bounds"><![CDATA[ |
| 3672 | + | maximum bounds over all existing char |
| 3673 | + | ]]></field> |
| 3674 | + | <field name="min_char_or_byte2"><![CDATA[ |
| 3675 | + | first character |
| 3676 | + | ]]></field> |
| 3677 | + | <field name="max_char_or_byte2"><![CDATA[ |
| 3678 | + | last character |
| 3679 | + | ]]></field> |
| 3680 | + | <field name="default_char"><![CDATA[ |
| 3681 | + | char to print for undefined character |
| 3682 | + | ]]></field> |
| 3683 | + | <field name="properties_len"><![CDATA[ |
| 3684 | + | how many properties there are |
| 3685 | + | ]]></field> |
| 3686 | + | <field name="all_chars_exist"><![CDATA[ |
| 3687 | + | flag if all characters have nonzero size |
| 3688 | + | ]]></field> |
| 3689 | + | <field name="font_ascent"><![CDATA[ |
| 3690 | + | baseline to top edge of raster |
| 3691 | + | ]]></field> |
| 3692 | + | <field name="font_descent"><![CDATA[ |
| 3693 | + | baseline to bottom edge of raster |
| 3694 | + | ]]></field> |
| 3695 | + | <field name="replies_hint"><![CDATA[ |
| 3696 | + | An indication of how many more fonts will be returned. This is only a hint and |
| 3697 | + | may be larger or smaller than the number of fonts actually returned. A zero |
| 3698 | + | value does not guarantee that no more fonts will be returned. |
| 3699 | + | ]]></field> |
| 3700 | + | <!-- enum doc is sufficient --> |
| 3701 | + | <field name="draw_direction" /> |
| 3702 | + | </doc> |
| 3703 | + | </reply> |
| 3704 | + | <doc> |
| 3705 | + | <brief>get matching font names and information</brief> |
| 3706 | + | <description><![CDATA[ |
| 3707 | + | Gets a list of available font names which match the given `pattern`. |
| 3708 | + | ]]></description> |
| 3709 | + | <field name="pattern_len"><![CDATA[ |
| 3710 | + | The length (in bytes) of `pattern`. |
| 3711 | + | ]]></field> |
| 3712 | + | <field name="pattern"><![CDATA[ |
| 3713 | + | A font pattern, for example "-misc-fixed-*". |
| 3714 | + | |
| 3715 | + | The asterisk (*) is a wildcard for any number of characters. The question mark |
| 3716 | + | (?) is a wildcard for a single character. Use of uppercase or lowercase does |
| 3717 | + | not matter. |
| 3718 | + | ]]></field> |
| 3719 | + | <field name="max_names"><![CDATA[ |
| 3720 | + | The maximum number of fonts to be returned. |
| 3721 | + | ]]></field> |
| 3722 | + | </doc> |
| 3723 | + | |
| 3724 | + | </request> |
| 3725 | + | |
| 3726 | + | <request name="SetFontPath" opcode="51"> |
| 3727 | + | <pad bytes="1" /> |
| 3728 | + | <field type="CARD16" name="font_qty" /> |
| 3729 | + | <pad bytes="2" /> |
| 3730 | + | <list type="STR" name="font"> |
| 3731 | + | <fieldref>font_qty</fieldref> |
| 3732 | + | </list> |
| 3733 | + | </request> |
| 3734 | + | |
| 3735 | + | <request name="GetFontPath" opcode="52"> |
| 3736 | + | <reply> |
| 3737 | + | <pad bytes="1" /> |
| 3738 | + | <field type="CARD16" name="path_len" /> |
| 3739 | + | <pad bytes="22" /> |
| 3740 | + | <list type="STR" name="path"> |
| 3741 | + | <fieldref>path_len</fieldref> |
| 3742 | + | </list> |
| 3743 | + | </reply> |
| 3744 | + | </request> |
| 3745 | + | |
| 3746 | + | <request name="CreatePixmap" opcode="53"> |
| 3747 | + | <field type="CARD8" name="depth" /> |
| 3748 | + | <field type="PIXMAP" name="pid" /> |
| 3749 | + | <field type="DRAWABLE" name="drawable" /> |
| 3750 | + | <field type="CARD16" name="width" /> |
| 3751 | + | <field type="CARD16" name="height" /> |
| 3752 | + | <doc> |
| 3753 | + | <brief>Creates a pixmap</brief> |
| 3754 | + | <description><![CDATA[ |
| 3755 | + | Creates a pixmap. The pixmap can only be used on the same screen as `drawable` |
| 3756 | + | is on and only with drawables of the same `depth`. |
| 3757 | + | ]]></description> |
| 3758 | + | <field name="depth"><![CDATA[ |
| 3759 | + | TODO |
| 3760 | + | ]]></field> |
| 3761 | + | <field name="pid"><![CDATA[ |
| 3762 | + | The ID with which you will refer to the new pixmap, created by |
| 3763 | + | `xcb_generate_id`. |
| 3764 | + | ]]></field> |
| 3765 | + | <field name="drawable"><![CDATA[ |
| 3766 | + | Drawable to get the screen from. |
| 3767 | + | ]]></field> |
| 3768 | + | <field name="width"><![CDATA[ |
| 3769 | + | The width of the new pixmap. |
| 3770 | + | ]]></field> |
| 3771 | + | <field name="height"><![CDATA[ |
| 3772 | + | The height of the new pixmap. |
| 3773 | + | ]]></field> |
| 3774 | + | <error type="Value"><![CDATA[ |
| 3775 | + | TODO: reasons? |
| 3776 | + | ]]></error> |
| 3777 | + | <error type="Drawable"><![CDATA[ |
| 3778 | + | The specified `drawable` (Window or Pixmap) does not exist. |
| 3779 | + | ]]></error> |
| 3780 | + | <error type="Alloc"><![CDATA[ |
| 3781 | + | The X server could not allocate the requested resources (no memory?). |
| 3782 | + | ]]></error> |
| 3783 | + | <see type="function" name="xcb_generate_id" /> |
| 3784 | + | </doc> |
| 3785 | + | </request> |
| 3786 | + | |
| 3787 | + | <request name="FreePixmap" opcode="54"> |
| 3788 | + | <pad bytes="1" /> |
| 3789 | + | <field type="PIXMAP" name="pixmap" /> |
| 3790 | + | <doc> |
| 3791 | + | <brief>Destroys a pixmap</brief> |
| 3792 | + | <description><![CDATA[ |
| 3793 | + | Deletes the association between the pixmap ID and the pixmap. The pixmap |
| 3794 | + | storage will be freed when there are no more references to it. |
| 3795 | + | ]]></description> |
| 3796 | + | <field name="pixmap"><![CDATA[The pixmap to destroy.]]></field> |
| 3797 | + | <error type="Pixmap"><![CDATA[ |
| 3798 | + | The specified pixmap does not exist. |
| 3799 | + | ]]></error> |
| 3800 | + | </doc> |
| 3801 | + | </request> |
| 3802 | + | |
| 3803 | + | <enum name="GC"> |
| 3804 | + | <item name="Function"> <bit>0</bit></item> |
| 3805 | + | <item name="PlaneMask"> <bit>1</bit></item> |
| 3806 | + | <item name="Foreground"> <bit>2</bit></item> |
| 3807 | + | <item name="Background"> <bit>3</bit></item> |
| 3808 | + | <item name="LineWidth"> <bit>4</bit></item> |
| 3809 | + | <item name="LineStyle"> <bit>5</bit></item> |
| 3810 | + | <item name="CapStyle"> <bit>6</bit></item> |
| 3811 | + | <item name="JoinStyle"> <bit>7</bit></item> |
| 3812 | + | <item name="FillStyle"> <bit>8</bit></item> |
| 3813 | + | <item name="FillRule"> <bit>9</bit></item> |
| 3814 | + | <item name="Tile"> <bit>10</bit></item> |
| 3815 | + | <item name="Stipple"> <bit>11</bit></item> |
| 3816 | + | <item name="TileStippleOriginX"><bit>12</bit></item> |
| 3817 | + | <item name="TileStippleOriginY"><bit>13</bit></item> |
| 3818 | + | <item name="Font"> <bit>14</bit></item> |
| 3819 | + | <item name="SubwindowMode"> <bit>15</bit></item> |
| 3820 | + | <item name="GraphicsExposures"> <bit>16</bit></item> |
| 3821 | + | <item name="ClipOriginX"> <bit>17</bit></item> |
| 3822 | + | <item name="ClipOriginY"> <bit>18</bit></item> |
| 3823 | + | <item name="ClipMask"> <bit>19</bit></item> |
| 3824 | + | <item name="DashOffset"> <bit>20</bit></item> |
| 3825 | + | <item name="DashList"> <bit>21</bit></item> |
| 3826 | + | <item name="ArcMode"> <bit>22</bit></item> |
| 3827 | + | <doc> |
| 3828 | + | <field name="Function"><![CDATA[ |
| 3829 | + | TODO: Refer to GX |
| 3830 | + | ]]></field> |
| 3831 | + | <field name="PlaneMask"><![CDATA[ |
| 3832 | + | In graphics operations, given a source and destination pixel, the result is |
| 3833 | + | computed bitwise on corresponding bits of the pixels; that is, a Boolean |
| 3834 | + | operation is performed in each bit plane. The plane-mask restricts the |
| 3835 | + | operation to a subset of planes, so the result is: |
| 3836 | + | |
| 3837 | + | ((src FUNC dst) AND plane-mask) OR (dst AND (NOT plane-mask)) |
| 3838 | + | ]]></field> |
| 3839 | + | <field name="Foreground"><![CDATA[ |
| 3840 | + | Foreground colorpixel. |
| 3841 | + | ]]></field> |
| 3842 | + | <field name="Background"><![CDATA[ |
| 3843 | + | Background colorpixel. |
| 3844 | + | ]]></field> |
| 3845 | + | <field name="LineWidth"><![CDATA[ |
| 3846 | + | The line-width is measured in pixels and can be greater than or equal to one, a wide line, or the |
| 3847 | + | special value zero, a thin line. |
| 3848 | + | ]]></field> |
| 3849 | + | <field name="LineStyle"><![CDATA[ |
| 3850 | + | The line-style defines which sections of a line are drawn: |
| 3851 | + | Solid The full path of the line is drawn. |
| 3852 | + | DoubleDash The full path of the line is drawn, but the even dashes are filled differently |
| 3853 | + | than the odd dashes (see fill-style), with Butt cap-style used where even and |
| 3854 | + | odd dashes meet. |
| 3855 | + | OnOffDash Only the even dashes are drawn, and cap-style applies to all internal ends of |
| 3856 | + | the individual dashes (except NotLast is treated as Butt). |
| 3857 | + | ]]></field> |
| 3858 | + | <field name="CapStyle"><![CDATA[ |
| 3859 | + | The cap-style defines how the endpoints of a path are drawn: |
| 3860 | + | NotLast The result is equivalent to Butt, except that for a line-width of zero the final |
| 3861 | + | endpoint is not drawn. |
| 3862 | + | Butt The result is square at the endpoint (perpendicular to the slope of the line) |
| 3863 | + | with no projection beyond. |
| 3864 | + | Round The result is a circular arc with its diameter equal to the line-width, centered |
| 3865 | + | on the endpoint; it is equivalent to Butt for line-width zero. |
| 3866 | + | Projecting The result is square at the end, but the path continues beyond the endpoint for |
| 3867 | + | a distance equal to half the line-width; it is equivalent to Butt for line-width |
| 3868 | + | zero. |
| 3869 | + | ]]></field> |
| 3870 | + | <field name="JoinStyle"><![CDATA[ |
| 3871 | + | The join-style defines how corners are drawn for wide lines: |
| 3872 | + | Miter The outer edges of the two lines extend to meet at an angle. However, if the |
| 3873 | + | angle is less than 11 degrees, a Bevel join-style is used instead. |
| 3874 | + | Round The result is a circular arc with a diameter equal to the line-width, centered |
| 3875 | + | on the joinpoint. |
| 3876 | + | Bevel The result is Butt endpoint styles, and then the triangular notch is filled. |
| 3877 | + | ]]></field> |
| 3878 | + | <field name="FillStyle"><![CDATA[ |
| 3879 | + | The fill-style defines the contents of the source for line, text, and fill requests. For all text and fill |
| 3880 | + | requests (for example, PolyText8, PolyText16, PolyFillRectangle, FillPoly, and PolyFillArc) |
| 3881 | + | as well as for line requests with line-style Solid, (for example, PolyLine, PolySegment, |
| 3882 | + | PolyRectangle, PolyArc) and for the even dashes for line requests with line-style OnOffDash |
| 3883 | + | or DoubleDash: |
| 3884 | + | Solid Foreground |
| 3885 | + | Tiled Tile |
| 3886 | + | OpaqueStippled A tile with the same width and height as stipple but with background |
| 3887 | + | everywhere stipple has a zero and with foreground everywhere stipple |
| 3888 | + | has a one |
| 3889 | + | Stippled Foreground masked by stipple |
| 3890 | + | For the odd dashes for line requests with line-style DoubleDash: |
| 3891 | + | Solid Background |
| 3892 | + | Tiled Same as for even dashes |
| 3893 | + | OpaqueStippled Same as for even dashes |
| 3894 | + | Stippled Background masked by stipple |
| 3895 | + | ]]></field> |
| 3896 | + | <field name="FillRule"><![CDATA[ |
| 3897 | + | ]]></field> |
| 3898 | + | <field name="Tile"><![CDATA[ |
| 3899 | + | The tile/stipple represents an infinite two-dimensional plane with the tile/stipple replicated in all |
| 3900 | + | dimensions. When that plane is superimposed on the drawable for use in a graphics operation, |
| 3901 | + | the upper-left corner of some instance of the tile/stipple is at the coordinates within the drawable |
| 3902 | + | specified by the tile/stipple origin. The tile/stipple and clip origins are interpreted relative to the |
| 3903 | + | origin of whatever destination drawable is specified in a graphics request. |
| 3904 | + | The tile pixmap must have the same root and depth as the gcontext (or a Match error results). |
| 3905 | + | The stipple pixmap must have depth one and must have the same root as the gcontext (or a |
| 3906 | + | Match error results). For fill-style Stippled (but not fill-style |
| 3907 | + | OpaqueStippled), the stipple pattern is tiled in a single plane and acts as an |
| 3908 | + | additional clip mask to be ANDed with the clip-mask. |
| 3909 | + | Any size pixmap can be used for tiling or stippling, although some sizes may be faster to use than |
| 3910 | + | others. |
| 3911 | + | ]]></field> |
| 3912 | + | <field name="Stipple"><![CDATA[ |
| 3913 | + | The tile/stipple represents an infinite two-dimensional plane with the tile/stipple replicated in all |
| 3914 | + | dimensions. When that plane is superimposed on the drawable for use in a graphics operation, |
| 3915 | + | the upper-left corner of some instance of the tile/stipple is at the coordinates within the drawable |
| 3916 | + | specified by the tile/stipple origin. The tile/stipple and clip origins are interpreted relative to the |
| 3917 | + | origin of whatever destination drawable is specified in a graphics request. |
| 3918 | + | The tile pixmap must have the same root and depth as the gcontext (or a Match error results). |
| 3919 | + | The stipple pixmap must have depth one and must have the same root as the gcontext (or a |
| 3920 | + | Match error results). For fill-style Stippled (but not fill-style |
| 3921 | + | OpaqueStippled), the stipple pattern is tiled in a single plane and acts as an |
| 3922 | + | additional clip mask to be ANDed with the clip-mask. |
| 3923 | + | Any size pixmap can be used for tiling or stippling, although some sizes may be faster to use than |
| 3924 | + | others. |
| 3925 | + | ]]></field> |
| 3926 | + | <field name="TileStippleOriginX"><![CDATA[ |
| 3927 | + | TODO |
| 3928 | + | ]]></field> |
| 3929 | + | <field name="TileStippleOriginY"><![CDATA[ |
| 3930 | + | TODO |
| 3931 | + | ]]></field> |
| 3932 | + | <field name="Font"><![CDATA[ |
| 3933 | + | Which font to use for the `ImageText8` and `ImageText16` requests. |
| 3934 | + | ]]></field> |
| 3935 | + | <field name="SubwindowMode"><![CDATA[ |
| 3936 | + | For ClipByChildren, both source and destination windows are additionally |
| 3937 | + | clipped by all viewable InputOutput children. For IncludeInferiors, neither |
| 3938 | + | source nor destination window is |
| 3939 | + | clipped by inferiors. This will result in including subwindow contents in the source and drawing |
| 3940 | + | through subwindow boundaries of the destination. The use of IncludeInferiors with a source or |
| 3941 | + | destination window of one depth with mapped inferiors of differing depth is not illegal, but the |
| 3942 | + | semantics is undefined by the core protocol. |
| 3943 | + | ]]></field> |
| 3944 | + | <field name="GraphicsExposures"><![CDATA[ |
| 3945 | + | Whether ExposureEvents should be generated (1) or not (0). |
| 3946 | + | |
| 3947 | + | The default is 1. |
| 3948 | + | ]]></field> |
| 3949 | + | <field name="ClipOriginX"><![CDATA[ |
| 3950 | + | TODO |
| 3951 | + | ]]></field> |
| 3952 | + | <field name="ClipOriginY"><![CDATA[ |
| 3953 | + | TODO |
| 3954 | + | ]]></field> |
| 3955 | + | <field name="ClipMask"><![CDATA[ |
| 3956 | + | The clip-mask restricts writes to the destination drawable. Only pixels where the clip-mask has |
| 3957 | + | bits set to 1 are drawn. Pixels are not drawn outside the area covered by the clip-mask or where |
| 3958 | + | the clip-mask has bits set to 0. The clip-mask affects all graphics requests, but it does not clip |
| 3959 | + | sources. The clip-mask origin is interpreted relative to the origin of whatever destination drawable is specified in a graphics request. If a pixmap is specified as the clip-mask, it must have |
| 3960 | + | depth 1 and have the same root as the gcontext (or a Match error results). If clip-mask is None, |
| 3961 | + | then pixels are always drawn, regardless of the clip origin. The clip-mask can also be set with the |
| 3962 | + | SetClipRectangles request. |
| 3963 | + | ]]></field> |
| 3964 | + | <field name="DashOffset"><![CDATA[ |
| 3965 | + | TODO |
| 3966 | + | ]]></field> |
| 3967 | + | <field name="DashList"><![CDATA[ |
| 3968 | + | TODO |
| 3969 | + | ]]></field> |
| 3970 | + | <field name="ArcMode"><![CDATA[ |
| 3971 | + | TODO |
| 3972 | + | ]]></field> |
| 3973 | + | </doc> |
| 3974 | + | |
| 3975 | + | </enum> |
| 3976 | + | |
| 3977 | + | <!-- GC Function values --> |
| 3978 | + | <enum name="GX"> |
| 3979 | + | <item name="clear"> <value>0</value></item> |
| 3980 | + | <item name="and"> <value>1</value></item> |
| 3981 | + | <item name="andReverse"> <value>2</value></item> |
| 3982 | + | <item name="copy"> <value>3</value></item> |
| 3983 | + | <item name="andInverted"> <value>4</value></item> |
| 3984 | + | <item name="noop"> <value>5</value></item> |
| 3985 | + | <item name="xor"> <value>6</value></item> |
| 3986 | + | <item name="or"> <value>7</value></item> |
| 3987 | + | <item name="nor"> <value>8</value></item> |
| 3988 | + | <item name="equiv"> <value>9</value></item> |
| 3989 | + | <item name="invert"> <value>10</value></item> |
| 3990 | + | <item name="orReverse"> <value>11</value></item> |
| 3991 | + | <item name="copyInverted"><value>12</value></item> |
| 3992 | + | <item name="orInverted"> <value>13</value></item> |
| 3993 | + | <item name="nand"> <value>14</value></item> |
| 3994 | + | <item name="set"> <value>15</value></item> |
| 3995 | + | </enum> |
| 3996 | + | |
| 3997 | + | <enum name="LineStyle"> |
| 3998 | + | <item name="Solid"> <value>0</value></item> |
| 3999 | + | <item name="OnOffDash"> <value>1</value></item> |
| 4000 | + | <item name="DoubleDash"><value>2</value></item> |
| 4001 | + | </enum> |
| 4002 | + | |
| 4003 | + | <enum name="CapStyle"> |
| 4004 | + | <item name="NotLast"> <value>0</value></item> |
| 4005 | + | <item name="Butt"> <value>1</value></item> |
| 4006 | + | <item name="Round"> <value>2</value></item> |
| 4007 | + | <item name="Projecting"><value>3</value></item> |
| 4008 | + | </enum> |
| 4009 | + | |
| 4010 | + | <enum name="JoinStyle"> |
| 4011 | + | <item name="Miter"> <value>0</value></item> |
| 4012 | + | <item name="Round"> <value>1</value></item> |
| 4013 | + | <item name="Bevel"> <value>2</value></item> |
| 4014 | + | </enum> |
| 4015 | + | |
| 4016 | + | <enum name="FillStyle"> |
| 4017 | + | <item name="Solid"> <value>0</value></item> |
| 4018 | + | <item name="Tiled"> <value>1</value></item> |
| 4019 | + | <item name="Stippled"> <value>2</value></item> |
| 4020 | + | <item name="OpaqueStippled"><value>3</value></item> |
| 4021 | + | </enum> |
| 4022 | + | |
| 4023 | + | <enum name="FillRule"> |
| 4024 | + | <item name="EvenOdd"><value>0</value></item> |
| 4025 | + | <item name="Winding"><value>1</value></item> |
| 4026 | + | </enum> |
| 4027 | + | |
| 4028 | + | <enum name="SubwindowMode"> |
| 4029 | + | <item name="ClipByChildren"> <value>0</value></item> |
| 4030 | + | <item name="IncludeInferiors"><value>1</value></item> |
| 4031 | + | </enum> |
| 4032 | + | |
| 4033 | + | <enum name="ArcMode"> |
| 4034 | + | <item name="Chord"> <value>0</value></item> |
| 4035 | + | <item name="PieSlice"><value>1</value></item> |
| 4036 | + | </enum> |
| 4037 | + | |
| 4038 | + | <request name="CreateGC" opcode="55"> |
| 4039 | + | <pad bytes="1" /> |
| 4040 | + | <field type="GCONTEXT" name="cid" /> |
| 4041 | + | <field type="DRAWABLE" name="drawable" /> |
| 4042 | + | <field type="CARD32" name="value_mask" mask="GC" /> |
| 4043 | + | <switch name="value_list"> |
| 4044 | + | <fieldref>value_mask</fieldref> |
| 4045 | + | <bitcase> |
| 4046 | + | <enumref ref="GC">Function</enumref> |
| 4047 | + | <field type="CARD32" name="function" enum="GX"/> |
| 4048 | + | </bitcase> |
| 4049 | + | <bitcase> |
| 4050 | + | <enumref ref="GC">PlaneMask</enumref> |
| 4051 | + | <field type="CARD32" name="plane_mask" /> |
| 4052 | + | </bitcase> |
| 4053 | + | <bitcase> |
| 4054 | + | <enumref ref="GC">Foreground</enumref> |
| 4055 | + | <field type="CARD32" name="foreground" /> |
| 4056 | + | </bitcase> |
| 4057 | + | <bitcase> |
| 4058 | + | <enumref ref="GC">Background</enumref> |
| 4059 | + | <field type="CARD32" name="background" /> |
| 4060 | + | </bitcase> |
| 4061 | + | <bitcase> |
| 4062 | + | <enumref ref="GC">LineWidth</enumref> |
| 4063 | + | <field type="CARD32" name="line_width" /> |
| 4064 | + | </bitcase> |
| 4065 | + | <bitcase> |
| 4066 | + | <enumref ref="GC">LineStyle</enumref> |
| 4067 | + | <field type="CARD32" name="line_style" enum="LineStyle"/> |
| 4068 | + | </bitcase> |
| 4069 | + | <bitcase> |
| 4070 | + | <enumref ref="GC">CapStyle</enumref> |
| 4071 | + | <field type="CARD32" name="cap_style" enum="CapStyle"/> |
| 4072 | + | </bitcase> |
| 4073 | + | <bitcase> |
| 4074 | + | <enumref ref="GC">JoinStyle</enumref> |
| 4075 | + | <field type="CARD32" name="join_style" enum="JoinStyle"/> |
| 4076 | + | </bitcase> |
| 4077 | + | <bitcase> |
| 4078 | + | <enumref ref="GC">FillStyle</enumref> |
| 4079 | + | <field type="CARD32" name="fill_style" enum="FillStyle"/> |
| 4080 | + | </bitcase> |
| 4081 | + | <bitcase> |
| 4082 | + | <enumref ref="GC">FillRule</enumref> |
| 4083 | + | <field type="CARD32" name="fill_rule" enum="FillRule"/> |
| 4084 | + | </bitcase> |
| 4085 | + | <bitcase> |
| 4086 | + | <enumref ref="GC">Tile</enumref> |
| 4087 | + | <field type="PIXMAP" name="tile" altenum="Pixmap"/> |
| 4088 | + | </bitcase> |
| 4089 | + | <bitcase> |
| 4090 | + | <enumref ref="GC">Stipple</enumref> |
| 4091 | + | <field type="PIXMAP" name="stipple" altenum="Pixmap"/> |
| 4092 | + | </bitcase> |
| 4093 | + | <bitcase> |
| 4094 | + | <enumref ref="GC">TileStippleOriginX</enumref> |
| 4095 | + | <field type="INT32" name="tile_stipple_x_origin" /> |
| 4096 | + | </bitcase> |
| 4097 | + | <bitcase> |
| 4098 | + | <enumref ref="GC">TileStippleOriginY</enumref> |
| 4099 | + | <field type="INT32" name="tile_stipple_y_origin" /> |
| 4100 | + | </bitcase> |
| 4101 | + | <bitcase> |
| 4102 | + | <enumref ref="GC">Font</enumref> |
| 4103 | + | <field type="FONT" name="font" altenum="Font"/> |
| 4104 | + | </bitcase> |
| 4105 | + | <bitcase> |
| 4106 | + | <enumref ref="GC">SubwindowMode</enumref> |
| 4107 | + | <field type="CARD32" name="subwindow_mode" enum="SubwindowMode"/> |
| 4108 | + | </bitcase> |
| 4109 | + | <bitcase> |
| 4110 | + | <enumref ref="GC">GraphicsExposures</enumref> |
| 4111 | + | <field type="BOOL32" name="graphics_exposures" /> |
| 4112 | + | </bitcase> |
| 4113 | + | <bitcase> |
| 4114 | + | <enumref ref="GC">ClipOriginX</enumref> |
| 4115 | + | <field type="INT32" name="clip_x_origin" /> |
| 4116 | + | </bitcase> |
| 4117 | + | <bitcase> |
| 4118 | + | <enumref ref="GC">ClipOriginY</enumref> |
| 4119 | + | <field type="INT32" name="clip_y_origin" /> |
| 4120 | + | </bitcase> |
| 4121 | + | <bitcase> |
| 4122 | + | <enumref ref="GC">ClipMask</enumref> |
| 4123 | + | <field type="PIXMAP" name="clip_mask" altenum="Pixmap"/> |
| 4124 | + | </bitcase> |
| 4125 | + | <bitcase> |
| 4126 | + | <enumref ref="GC">DashOffset</enumref> |
| 4127 | + | <field type="CARD32" name="dash_offset" /> |
| 4128 | + | </bitcase> |
| 4129 | + | <bitcase> |
| 4130 | + | <enumref ref="GC">DashList</enumref> |
| 4131 | + | <field type="CARD32" name="dashes" /> |
| 4132 | + | </bitcase> |
| 4133 | + | <bitcase> |
| 4134 | + | <enumref ref="GC">ArcMode</enumref> |
| 4135 | + | <field type="CARD32" name="arc_mode" enum="ArcMode"/> |
| 4136 | + | </bitcase> |
| 4137 | + | </switch> |
| 4138 | + | <doc> |
| 4139 | + | <brief>Creates a graphics context</brief> |
| 4140 | + | <description><![CDATA[ |
| 4141 | + | Creates a graphics context. The graphics context can be used with any drawable |
| 4142 | + | that has the same root and depth as the specified drawable. |
| 4143 | + | ]]></description> |
| 4144 | + | <field name="cid"><![CDATA[ |
| 4145 | + | The ID with which you will refer to the graphics context, created by |
| 4146 | + | `xcb_generate_id`. |
| 4147 | + | ]]></field> |
| 4148 | + | <field name="drawable"><![CDATA[ |
| 4149 | + | Drawable to get the root/depth from. |
| 4150 | + | ]]></field> |
| 4151 | + | <error type="Drawable"><![CDATA[ |
| 4152 | + | The specified `drawable` (Window or Pixmap) does not exist. |
| 4153 | + | ]]></error> |
| 4154 | + | <error type="Match"><![CDATA[ |
| 4155 | + | TODO: reasons? |
| 4156 | + | ]]></error> |
| 4157 | + | <error type="Font"><![CDATA[ |
| 4158 | + | TODO: reasons? |
| 4159 | + | ]]></error> |
| 4160 | + | <error type="Pixmap"><![CDATA[ |
| 4161 | + | TODO: reasons? |
| 4162 | + | ]]></error> |
| 4163 | + | <error type="Value"><![CDATA[ |
| 4164 | + | TODO: reasons? |
| 4165 | + | ]]></error> |
| 4166 | + | <error type="Alloc"><![CDATA[ |
| 4167 | + | The X server could not allocate the requested resources (no memory?). |
| 4168 | + | ]]></error> |
| 4169 | + | <see type="function" name="xcb_generate_id" /> |
| 4170 | + | </doc> |
| 4171 | + | </request> |
| 4172 | + | |
| 4173 | + | <request name="ChangeGC" opcode="56"> |
| 4174 | + | <pad bytes="1" /> |
| 4175 | + | <field type="GCONTEXT" name="gc" /> |
| 4176 | + | <field type="CARD32" name="value_mask" mask="GC" /> |
| 4177 | + | <switch name="value_list"> |
| 4178 | + | <fieldref>value_mask</fieldref> |
| 4179 | + | <bitcase> |
| 4180 | + | <enumref ref="GC">Function</enumref> |
| 4181 | + | <field type="CARD32" name="function" enum="GX"/> |
| 4182 | + | </bitcase> |
| 4183 | + | <bitcase> |
| 4184 | + | <enumref ref="GC">PlaneMask</enumref> |
| 4185 | + | <field type="CARD32" name="plane_mask" /> |
| 4186 | + | </bitcase> |
| 4187 | + | <bitcase> |
| 4188 | + | <enumref ref="GC">Foreground</enumref> |
| 4189 | + | <field type="CARD32" name="foreground" /> |
| 4190 | + | </bitcase> |
| 4191 | + | <bitcase> |
| 4192 | + | <enumref ref="GC">Background</enumref> |
| 4193 | + | <field type="CARD32" name="background" /> |
| 4194 | + | </bitcase> |
| 4195 | + | <bitcase> |
| 4196 | + | <enumref ref="GC">LineWidth</enumref> |
| 4197 | + | <field type="CARD32" name="line_width" /> |
| 4198 | + | </bitcase> |
| 4199 | + | <bitcase> |
| 4200 | + | <enumref ref="GC">LineStyle</enumref> |
| 4201 | + | <field type="CARD32" name="line_style" enum="LineStyle"/> |
| 4202 | + | </bitcase> |
| 4203 | + | <bitcase> |
| 4204 | + | <enumref ref="GC">CapStyle</enumref> |
| 4205 | + | <field type="CARD32" name="cap_style" enum="CapStyle"/> |
| 4206 | + | </bitcase> |
| 4207 | + | <bitcase> |
| 4208 | + | <enumref ref="GC">JoinStyle</enumref> |
| 4209 | + | <field type="CARD32" name="join_style" enum="JoinStyle"/> |
| 4210 | + | </bitcase> |
| 4211 | + | <bitcase> |
| 4212 | + | <enumref ref="GC">FillStyle</enumref> |
| 4213 | + | <field type="CARD32" name="fill_style" enum="FillStyle"/> |
| 4214 | + | </bitcase> |
| 4215 | + | <bitcase> |
| 4216 | + | <enumref ref="GC">FillRule</enumref> |
| 4217 | + | <field type="CARD32" name="fill_rule" enum="FillRule"/> |
| 4218 | + | </bitcase> |
| 4219 | + | <bitcase> |
| 4220 | + | <enumref ref="GC">Tile</enumref> |
| 4221 | + | <field type="PIXMAP" name="tile" altenum="Pixmap"/> |
| 4222 | + | </bitcase> |
| 4223 | + | <bitcase> |
| 4224 | + | <enumref ref="GC">Stipple</enumref> |
| 4225 | + | <field type="PIXMAP" name="stipple" altenum="Pixmap"/> |
| 4226 | + | </bitcase> |
| 4227 | + | <bitcase> |
| 4228 | + | <enumref ref="GC">TileStippleOriginX</enumref> |
| 4229 | + | <field type="INT32" name="tile_stipple_x_origin" /> |
| 4230 | + | </bitcase> |
| 4231 | + | <bitcase> |
| 4232 | + | <enumref ref="GC">TileStippleOriginY</enumref> |
| 4233 | + | <field type="INT32" name="tile_stipple_y_origin" /> |
| 4234 | + | </bitcase> |
| 4235 | + | <bitcase> |
| 4236 | + | <enumref ref="GC">Font</enumref> |
| 4237 | + | <field type="FONT" name="font" altenum="Font"/> |
| 4238 | + | </bitcase> |
| 4239 | + | <bitcase> |
| 4240 | + | <enumref ref="GC">SubwindowMode</enumref> |
| 4241 | + | <field type="CARD32" name="subwindow_mode" enum="SubwindowMode"/> |
| 4242 | + | </bitcase> |
| 4243 | + | <bitcase> |
| 4244 | + | <enumref ref="GC">GraphicsExposures</enumref> |
| 4245 | + | <field type="BOOL32" name="graphics_exposures" /> |
| 4246 | + | </bitcase> |
| 4247 | + | <bitcase> |
| 4248 | + | <enumref ref="GC">ClipOriginX</enumref> |
| 4249 | + | <field type="INT32" name="clip_x_origin" /> |
| 4250 | + | </bitcase> |
| 4251 | + | <bitcase> |
| 4252 | + | <enumref ref="GC">ClipOriginY</enumref> |
| 4253 | + | <field type="INT32" name="clip_y_origin" /> |
| 4254 | + | </bitcase> |
| 4255 | + | <bitcase> |
| 4256 | + | <enumref ref="GC">ClipMask</enumref> |
| 4257 | + | <field type="PIXMAP" name="clip_mask" altenum="Pixmap"/> |
| 4258 | + | </bitcase> |
| 4259 | + | <bitcase> |
| 4260 | + | <enumref ref="GC">DashOffset</enumref> |
| 4261 | + | <field type="CARD32" name="dash_offset" /> |
| 4262 | + | </bitcase> |
| 4263 | + | <bitcase> |
| 4264 | + | <enumref ref="GC">DashList</enumref> |
| 4265 | + | <field type="CARD32" name="dashes" /> |
| 4266 | + | </bitcase> |
| 4267 | + | <bitcase> |
| 4268 | + | <enumref ref="GC">ArcMode</enumref> |
| 4269 | + | <field type="CARD32" name="arc_mode" enum="ArcMode"/> |
| 4270 | + | </bitcase> |
| 4271 | + | </switch> |
| 4272 | + | <doc> |
| 4273 | + | <brief>change graphics context components</brief> |
| 4274 | + | <description><![CDATA[ |
| 4275 | + | Changes the components specified by `value_mask` for the specified graphics context. |
| 4276 | + | ]]></description> |
| 4277 | + | <example><![CDATA[ |
| 4278 | + | /* |
| 4279 | + | * Changes the foreground color component of the specified graphics context. |
| 4280 | + | * |
| 4281 | + | */ |
| 4282 | + | void my_example(xcb_connection_t *conn, xcb_gcontext_t gc, uint32_t fg, uint32_t bg) { |
| 4283 | + | /* C99 allows us to use a compact way of changing a single component: */ |
| 4284 | + | xcb_change_gc(conn, gc, XCB_GC_FOREGROUND, (uint32_t[]){ fg }); |
| 4285 | + | |
| 4286 | + | /* The more explicit way. Beware that the order of values is important! */ |
| 4287 | + | uint32_t mask = 0; |
| 4288 | + | mask |= XCB_GC_FOREGROUND; |
| 4289 | + | mask |= XCB_GC_BACKGROUND; |
| 4290 | + | |
| 4291 | + | uint32_t values[] = { |
| 4292 | + | fg, |
| 4293 | + | bg |
| 4294 | + | }; |
| 4295 | + | xcb_change_gc(conn, gc, mask, values); |
| 4296 | + | xcb_flush(conn); |
| 4297 | + | } |
| 4298 | + | ]]></example> |
| 4299 | + | <field name="gc"><![CDATA[ |
| 4300 | + | The graphics context to change. |
| 4301 | + | ]]></field> |
| 4302 | + | <!-- the enum documentation is good enough. --> |
| 4303 | + | <field name="value_mask" /> |
| 4304 | + | <field name="value_list"><![CDATA[ |
| 4305 | + | Values for each of the components specified in the bitmask `value_mask`. The |
| 4306 | + | order has to correspond to the order of possible `value_mask` bits. See the |
| 4307 | + | example. |
| 4308 | + | ]]></field> |
| 4309 | + | <error type="Font"><![CDATA[ |
| 4310 | + | TODO: reasons? |
| 4311 | + | ]]></error> |
| 4312 | + | <error type="GContext"><![CDATA[ |
| 4313 | + | TODO: reasons? |
| 4314 | + | ]]></error> |
| 4315 | + | <error type="Match"><![CDATA[ |
| 4316 | + | TODO: reasons? |
| 4317 | + | ]]></error> |
| 4318 | + | <error type="Pixmap"><![CDATA[ |
| 4319 | + | TODO: reasons? |
| 4320 | + | ]]></error> |
| 4321 | + | <error type="Value"><![CDATA[ |
| 4322 | + | TODO: reasons? |
| 4323 | + | ]]></error> |
| 4324 | + | <error type="Alloc"><![CDATA[ |
| 4325 | + | The X server could not allocate the requested resources (no memory?). |
| 4326 | + | ]]></error> |
| 4327 | + | </doc> |
| 4328 | + | </request> |
| 4329 | + | |
| 4330 | + | <request name="CopyGC" opcode="57"> |
| 4331 | + | <pad bytes="1" /> |
| 4332 | + | <field type="GCONTEXT" name="src_gc" /> |
| 4333 | + | <field type="GCONTEXT" name="dst_gc" /> |
| 4334 | + | <field type="CARD32" name="value_mask" mask="GC" /> |
| 4335 | + | </request> |
| 4336 | + | |
| 4337 | + | <request name="SetDashes" opcode="58"> |
| 4338 | + | <pad bytes="1" /> |
| 4339 | + | <field type="GCONTEXT" name="gc" /> |
| 4340 | + | <field type="CARD16" name="dash_offset" /> |
| 4341 | + | <field type="CARD16" name="dashes_len" /> |
| 4342 | + | <list type="CARD8" name="dashes"> |
| 4343 | + | <fieldref>dashes_len</fieldref> |
| 4344 | + | </list> |
| 4345 | + | </request> |
| 4346 | + | |
| 4347 | + | <enum name="ClipOrdering"> |
| 4348 | + | <item name="Unsorted"><value>0</value></item> |
| 4349 | + | <item name="YSorted"> <value>1</value></item> |
| 4350 | + | <item name="YXSorted"><value>2</value></item> |
| 4351 | + | <item name="YXBanded"><value>3</value></item> |
| 4352 | + | </enum> |
| 4353 | + | |
| 4354 | + | <request name="SetClipRectangles" opcode="59"> |
| 4355 | + | <field type="BYTE" name="ordering" enum="ClipOrdering" /> |
| 4356 | + | <field type="GCONTEXT" name="gc" /> |
| 4357 | + | <field type="INT16" name="clip_x_origin" /> |
| 4358 | + | <field type="INT16" name="clip_y_origin" /> |
| 4359 | + | <list type="RECTANGLE" name="rectangles" /> |
| 4360 | + | </request> |
| 4361 | + | |
| 4362 | + | <request name="FreeGC" opcode="60"> |
| 4363 | + | <pad bytes="1" /> |
| 4364 | + | <field type="GCONTEXT" name="gc" /> |
| 4365 | + | <doc> |
| 4366 | + | <brief>Destroys a graphics context</brief> |
| 4367 | + | <description><![CDATA[ |
| 4368 | + | Destroys the specified `gc` and all associated storage. |
| 4369 | + | ]]></description> |
| 4370 | + | <field name="gc"><![CDATA[The graphics context to destroy.]]></field> |
| 4371 | + | <error type="GContext"><![CDATA[ |
| 4372 | + | The specified graphics context does not exist. |
| 4373 | + | ]]></error> |
| 4374 | + | </doc> |
| 4375 | + | </request> |
| 4376 | + | |
| 4377 | + | <request name="ClearArea" opcode="61"> |
| 4378 | + | <field type="BOOL" name="exposures" /> |
| 4379 | + | <field type="WINDOW" name="window" /> |
| 4380 | + | <field type="INT16" name="x" /> |
| 4381 | + | <field type="INT16" name="y" /> |
| 4382 | + | <field type="CARD16" name="width" /> |
| 4383 | + | <field type="CARD16" name="height" /> |
| 4384 | + | </request> |
| 4385 | + | |
| 4386 | + | <request name="CopyArea" opcode="62"> |
| 4387 | + | <pad bytes="1" /> |
| 4388 | + | <field type="DRAWABLE" name="src_drawable" /> |
| 4389 | + | <field type="DRAWABLE" name="dst_drawable" /> |
| 4390 | + | <field type="GCONTEXT" name="gc" /> |
| 4391 | + | <field type="INT16" name="src_x" /> |
| 4392 | + | <field type="INT16" name="src_y" /> |
| 4393 | + | <field type="INT16" name="dst_x" /> |
| 4394 | + | <field type="INT16" name="dst_y" /> |
| 4395 | + | <field type="CARD16" name="width" /> |
| 4396 | + | <field type="CARD16" name="height" /> |
| 4397 | + | <doc> |
| 4398 | + | <brief>copy areas</brief> |
| 4399 | + | <description><![CDATA[ |
| 4400 | + | Copies the specified rectangle from `src_drawable` to `dst_drawable`. |
| 4401 | + | ]]></description> |
| 4402 | + | <field name="dst_drawable"><![CDATA[ |
| 4403 | + | The destination drawable (Window or Pixmap). |
| 4404 | + | ]]></field> |
| 4405 | + | <field name="src_drawable"><![CDATA[ |
| 4406 | + | The source drawable (Window or Pixmap). |
| 4407 | + | ]]></field> |
| 4408 | + | <field name="gc"><![CDATA[ |
| 4409 | + | The graphics context to use. |
| 4410 | + | ]]></field> |
| 4411 | + | <field name="src_x"><![CDATA[ |
| 4412 | + | The source X coordinate. |
| 4413 | + | ]]></field> |
| 4414 | + | <field name="src_y"><![CDATA[ |
| 4415 | + | The source Y coordinate. |
| 4416 | + | ]]></field> |
| 4417 | + | <field name="dst_x"><![CDATA[ |
| 4418 | + | The destination X coordinate. |
| 4419 | + | ]]></field> |
| 4420 | + | <field name="dst_y"><![CDATA[ |
| 4421 | + | The destination Y coordinate. |
| 4422 | + | ]]></field> |
| 4423 | + | <field name="width"><![CDATA[ |
| 4424 | + | The width of the area to copy (in pixels). |
| 4425 | + | ]]></field> |
| 4426 | + | <field name="height"><![CDATA[ |
| 4427 | + | The height of the area to copy (in pixels). |
| 4428 | + | ]]></field> |
| 4429 | + | <error type="Drawable"><![CDATA[ |
| 4430 | + | The specified `drawable` (Window or Pixmap) does not exist. |
| 4431 | + | ]]></error> |
| 4432 | + | <error type="GContext"><![CDATA[ |
| 4433 | + | The specified graphics context does not exist. |
| 4434 | + | ]]></error> |
| 4435 | + | <error type="Match"><![CDATA[ |
| 4436 | + | `src_drawable` has a different root or depth than `dst_drawable`. |
| 4437 | + | ]]></error> |
| 4438 | + | </doc> |
| 4439 | + | </request> |
| 4440 | + | |
| 4441 | + | <request name="CopyPlane" opcode="63"> |
| 4442 | + | <pad bytes="1" /> |
| 4443 | + | <field type="DRAWABLE" name="src_drawable" /> |
| 4444 | + | <field type="DRAWABLE" name="dst_drawable" /> |
| 4445 | + | <field type="GCONTEXT" name="gc" /> |
| 4446 | + | <field type="INT16" name="src_x" /> |
| 4447 | + | <field type="INT16" name="src_y" /> |
| 4448 | + | <field type="INT16" name="dst_x" /> |
| 4449 | + | <field type="INT16" name="dst_y" /> |
| 4450 | + | <field type="CARD16" name="width" /> |
| 4451 | + | <field type="CARD16" name="height" /> |
| 4452 | + | <field type="CARD32" name="bit_plane" /> |
| 4453 | + | </request> |
| 4454 | + | |
| 4455 | + | <enum name="CoordMode"> |
| 4456 | + | <item name="Origin"> <value>0</value></item> |
| 4457 | + | <item name="Previous"><value>1</value></item> |
| 4458 | + | <doc> |
| 4459 | + | <field name="Origin"><![CDATA[ |
| 4460 | + | Treats all coordinates as relative to the origin. |
| 4461 | + | ]]></field> |
| 4462 | + | <field name="Previous"><![CDATA[ |
| 4463 | + | Treats all coordinates after the first as relative to the previous coordinate. |
| 4464 | + | ]]></field> |
| 4465 | + | </doc> |
| 4466 | + | </enum> |
| 4467 | + | |
| 4468 | + | <!-- combine-adjacent doesn't work for mode==Relative --> |
| 4469 | + | <request name="PolyPoint" opcode="64"> |
| 4470 | + | <field type="BYTE" name="coordinate_mode" enum="CoordMode" /> |
| 4471 | + | <field type="DRAWABLE" name="drawable" /> |
| 4472 | + | <field type="GCONTEXT" name="gc" /> |
| 4473 | + | <list type="POINT" name="points" /> |
| 4474 | + | </request> |
| 4475 | + | |
| 4476 | + | <request name="PolyLine" opcode="65" combine-adjacent="true"> |
| 4477 | + | <field type="BYTE" name="coordinate_mode" enum="CoordMode" /> |
| 4478 | + | <field type="DRAWABLE" name="drawable" /> |
| 4479 | + | <field type="GCONTEXT" name="gc" /> |
| 4480 | + | <list type="POINT" name="points" /> |
| 4481 | + | <doc> |
| 4482 | + | <brief>draw lines</brief> |
| 4483 | + | <description><![CDATA[ |
| 4484 | + | Draws `points_len`-1 lines between each pair of points (point[i], point[i+1]) |
| 4485 | + | in the `points` array. The lines are drawn in the order listed in the array. |
| 4486 | + | They join correctly at all intermediate points, and if the first and last |
| 4487 | + | points coincide, the first and last lines also join correctly. For any given |
| 4488 | + | line, a pixel is not drawn more than once. If thin (zero line-width) lines |
| 4489 | + | intersect, the intersecting pixels are drawn multiple times. If wide lines |
| 4490 | + | intersect, the intersecting pixels are drawn only once, as though the entire |
| 4491 | + | request were a single, filled shape. |
| 4492 | + | ]]></description> |
| 4493 | + | <example><![CDATA[ |
| 4494 | + | /* |
| 4495 | + | * Draw a straight line. |
| 4496 | + | * |
| 4497 | + | */ |
| 4498 | + | void my_example(xcb_connection_t *conn, xcb_drawable_t drawable, xcb_gcontext_t gc) { |
| 4499 | + | xcb_poly_line(conn, XCB_COORD_MODE_ORIGIN, drawable, gc, 2, |
| 4500 | + | (xcb_point_t[]) { {10, 10}, {100, 10} }); |
| 4501 | + | xcb_flush(conn); |
| 4502 | + | } |
| 4503 | + | ]]></example> |
| 4504 | + | <field name="drawable"><![CDATA[ |
| 4505 | + | The drawable to draw the line(s) on. |
| 4506 | + | ]]></field> |
| 4507 | + | <field name="gc"><![CDATA[ |
| 4508 | + | The graphics context to use. |
| 4509 | + | ]]></field> |
| 4510 | + | <field name="points_len"><![CDATA[ |
| 4511 | + | The number of `xcb_point_t` structures in `points`. |
| 4512 | + | ]]></field> |
| 4513 | + | <field name="points"><![CDATA[ |
| 4514 | + | An array of points. |
| 4515 | + | ]]></field> |
| 4516 | + | <!-- the enum doc is sufficient. --> |
| 4517 | + | <field name="coordinate_mode" /> |
| 4518 | + | <error type="Drawable"><![CDATA[ |
| 4519 | + | TODO: reasons? |
| 4520 | + | ]]></error> |
| 4521 | + | <error type="GContext"><![CDATA[ |
| 4522 | + | TODO: reasons? |
| 4523 | + | ]]></error> |
| 4524 | + | <error type="Match"><![CDATA[ |
| 4525 | + | TODO: reasons? |
| 4526 | + | ]]></error> |
| 4527 | + | <error type="Value"><![CDATA[ |
| 4528 | + | TODO: reasons? |
| 4529 | + | ]]></error> |
| 4530 | + | </doc> |
| 4531 | + | </request> |
| 4532 | + | |
| 4533 | + | <struct name="SEGMENT"> |
| 4534 | + | <field type="INT16" name="x1" /> |
| 4535 | + | <field type="INT16" name="y1" /> |
| 4536 | + | <field type="INT16" name="x2" /> |
| 4537 | + | <field type="INT16" name="y2" /> |
| 4538 | + | </struct> |
| 4539 | + | |
| 4540 | + | <request name="PolySegment" opcode="66" combine-adjacent="true"> |
| 4541 | + | <pad bytes="1" /> |
| 4542 | + | <field type="DRAWABLE" name="drawable" /> |
| 4543 | + | <field type="GCONTEXT" name="gc" /> |
| 4544 | + | <list type="SEGMENT" name="segments" /> |
| 4545 | + | <doc> |
| 4546 | + | <brief>draw lines</brief> |
| 4547 | + | <description><![CDATA[ |
| 4548 | + | Draws multiple, unconnected lines. For each segment, a line is drawn between |
| 4549 | + | (x1, y1) and (x2, y2). The lines are drawn in the order listed in the array of |
| 4550 | + | `xcb_segment_t` structures and does not perform joining at coincident |
| 4551 | + | endpoints. For any given line, a pixel is not drawn more than once. If lines |
| 4552 | + | intersect, the intersecting pixels are drawn multiple times. |
| 4553 | + | |
| 4554 | + | TODO: include the xcb_segment_t data structure |
| 4555 | + | |
| 4556 | + | TODO: an example |
| 4557 | + | ]]></description> |
| 4558 | + | <field name="drawable"><![CDATA[ |
| 4559 | + | A drawable (Window or Pixmap) to draw on. |
| 4560 | + | ]]></field> |
| 4561 | + | <field name="gc"><![CDATA[ |
| 4562 | + | The graphics context to use. |
| 4563 | + | |
| 4564 | + | TODO: document which attributes of a gc are used |
| 4565 | + | ]]></field> |
| 4566 | + | <field name="segments_len"><![CDATA[ |
| 4567 | + | The number of `xcb_segment_t` structures in `segments`. |
| 4568 | + | ]]></field> |
| 4569 | + | <field name="segments"><![CDATA[ |
| 4570 | + | An array of `xcb_segment_t` structures. |
| 4571 | + | ]]></field> |
| 4572 | + | <error type="Drawable"><![CDATA[ |
| 4573 | + | The specified `drawable` does not exist. |
| 4574 | + | ]]></error> |
| 4575 | + | <error type="GContext"><![CDATA[ |
| 4576 | + | The specified `gc` does not exist. |
| 4577 | + | ]]></error> |
| 4578 | + | <error type="Match"><![CDATA[ |
| 4579 | + | TODO: reasons? |
| 4580 | + | ]]></error> |
| 4581 | + | </doc> |
| 4582 | + | </request> |
| 4583 | + | |
| 4584 | + | <request name="PolyRectangle" opcode="67" combine-adjacent="true"> |
| 4585 | + | <pad bytes="1" /> |
| 4586 | + | <field type="DRAWABLE" name="drawable" /> |
| 4587 | + | <field type="GCONTEXT" name="gc" /> |
| 4588 | + | <list type="RECTANGLE" name="rectangles" /> |
| 4589 | + | </request> |
| 4590 | + | |
| 4591 | + | <!-- |
| 4592 | + | The semantics of PolyArc change after the first arc: the GC's |
| 4593 | + | join style may be applied to successive arcs under some circumstances. |
| 4594 | + | So using combine-adjacent here is bad. |
| 4595 | + | --> |
| 4596 | + | <request name="PolyArc" opcode="68"> |
| 4597 | + | <pad bytes="1" /> |
| 4598 | + | <field type="DRAWABLE" name="drawable" /> |
| 4599 | + | <field type="GCONTEXT" name="gc" /> |
| 4600 | + | <list type="ARC" name="arcs" /> |
| 4601 | + | </request> |
| 4602 | + | |
| 4603 | + | <enum name="PolyShape"> |
| 4604 | + | <item name="Complex"> <value>0</value></item> |
| 4605 | + | <item name="Nonconvex"><value>1</value></item> |
| 4606 | + | <item name="Convex"> <value>2</value></item> |
| 4607 | + | </enum> |
| 4608 | + | |
| 4609 | + | <request name="FillPoly" opcode="69"> |
| 4610 | + | <pad bytes="1" /> |
| 4611 | + | <field type="DRAWABLE" name="drawable" /> |
| 4612 | + | <field type="GCONTEXT" name="gc" /> |
| 4613 | + | <field type="CARD8" name="shape" enum="PolyShape" /> |
| 4614 | + | <field type="CARD8" name="coordinate_mode" enum="CoordMode" /> |
| 4615 | + | <pad bytes="2" /> |
| 4616 | + | <list type="POINT" name="points" /> |
| 4617 | + | </request> |
| 4618 | + | |
| 4619 | + | <request name="PolyFillRectangle" opcode="70" combine-adjacent="true"> |
| 4620 | + | <pad bytes="1" /> |
| 4621 | + | <field type="DRAWABLE" name="drawable" /> |
| 4622 | + | <field type="GCONTEXT" name="gc" /> |
| 4623 | + | <list type="RECTANGLE" name="rectangles" /> |
| 4624 | + | <doc> |
| 4625 | + | <brief>Fills rectangles</brief> |
| 4626 | + | <description><![CDATA[ |
| 4627 | + | Fills the specified rectangle(s) in the order listed in the array. For any |
| 4628 | + | given rectangle, each pixel is not drawn more than once. If rectangles |
| 4629 | + | intersect, the intersecting pixels are drawn multiple times. |
| 4630 | + | ]]></description> |
| 4631 | + | <field name="drawable"><![CDATA[ |
| 4632 | + | The drawable (Window or Pixmap) to draw on. |
| 4633 | + | ]]></field> |
| 4634 | + | <field name="gc"><![CDATA[ |
| 4635 | + | The graphics context to use. |
| 4636 | + | |
| 4637 | + | The following graphics context components are used: function, plane-mask, |
| 4638 | + | fill-style, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. |
| 4639 | + | |
| 4640 | + | The following graphics context mode-dependent components are used: |
| 4641 | + | foreground, background, tile, stipple, tile-stipple-x-origin, and |
| 4642 | + | tile-stipple-y-origin. |
| 4643 | + | ]]></field> |
| 4644 | + | <field name="rectangles_len"><![CDATA[ |
| 4645 | + | The number of `xcb_rectangle_t` structures in `rectangles`. |
| 4646 | + | ]]></field> |
| 4647 | + | <field name="rectangles"><![CDATA[ |
| 4648 | + | The rectangles to fill. |
| 4649 | + | ]]></field> |
| 4650 | + | <error type="Drawable"><![CDATA[ |
| 4651 | + | The specified `drawable` (Window or Pixmap) does not exist. |
| 4652 | + | ]]></error> |
| 4653 | + | <error type="GContext"><![CDATA[ |
| 4654 | + | The specified graphics context does not exist. |
| 4655 | + | ]]></error> |
| 4656 | + | <error type="Match"><![CDATA[ |
| 4657 | + | TODO: reasons? |
| 4658 | + | ]]></error> |
| 4659 | + | </doc> |
| 4660 | + | </request> |
| 4661 | + | |
| 4662 | + | <request name="PolyFillArc" opcode="71" combine-adjacent="true"> |
| 4663 | + | <pad bytes="1" /> |
| 4664 | + | <field type="DRAWABLE" name="drawable" /> |
| 4665 | + | <field type="GCONTEXT" name="gc" /> |
| 4666 | + | <list type="ARC" name="arcs" /> |
| 4667 | + | </request> |
| 4668 | + | |
| 4669 | + | <enum name="ImageFormat"> |
| 4670 | + | <item name="XYBitmap"><value>0</value></item> |
| 4671 | + | <item name="XYPixmap"><value>1</value></item> |
| 4672 | + | <item name="ZPixmap"> <value>2</value></item> |
| 4673 | + | </enum> |
| 4674 | + | |
| 4675 | + | <request name="PutImage" opcode="72"> |
| 4676 | + | <field type="CARD8" name="format" enum="ImageFormat" /> |
| 4677 | + | <field type="DRAWABLE" name="drawable" /> |
| 4678 | + | <field type="GCONTEXT" name="gc" /> |
| 4679 | + | <field type="CARD16" name="width" /> |
| 4680 | + | <field type="CARD16" name="height" /> |
| 4681 | + | <field type="INT16" name="dst_x" /> |
| 4682 | + | <field type="INT16" name="dst_y" /> |
| 4683 | + | <field type="CARD8" name="left_pad" /> |
| 4684 | + | <field type="CARD8" name="depth" /> |
| 4685 | + | <pad bytes="2" /> |
| 4686 | + | <list type="BYTE" name="data" /> |
| 4687 | + | </request> |
| 4688 | + | |
| 4689 | + | <!-- FIXME: data array in reply will include padding, but ought not to. --> |
| 4690 | + | <request name="GetImage" opcode="73"> |
| 4691 | + | <field type="CARD8" name="format" enum="ImageFormat" /> |
| 4692 | + | <field type="DRAWABLE" name="drawable" /> |
| 4693 | + | <field type="INT16" name="x" /> |
| 4694 | + | <field type="INT16" name="y" /> |
| 4695 | + | <field type="CARD16" name="width" /> |
| 4696 | + | <field type="CARD16" name="height" /> |
| 4697 | + | <field type="CARD32" name="plane_mask" /> |
| 4698 | + | <reply> |
| 4699 | + | <field type="CARD8" name="depth" /> |
| 4700 | + | <field type="VISUALID" name="visual" /> |
| 4701 | + | <pad bytes="20" /> |
| 4702 | + | <list type="BYTE" name="data"> |
| 4703 | + | <op op="*"> |
| 4704 | + | <fieldref>length</fieldref> |
| 4705 | + | <value>4</value> |
| 4706 | + | </op> |
| 4707 | + | </list> |
| 4708 | + | </reply> |
| 4709 | + | </request> |
| 4710 | + | |
| 4711 | + | <request name="PolyText8" opcode="74"> |
| 4712 | + | <pad bytes="1" /> |
| 4713 | + | <field type="DRAWABLE" name="drawable" /> |
| 4714 | + | <field type="GCONTEXT" name="gc" /> |
| 4715 | + | <field type="INT16" name="x" /> |
| 4716 | + | <field type="INT16" name="y" /> |
| 4717 | + | <list type="BYTE" name="items" /> |
| 4718 | + | </request> |
| 4719 | + | |
| 4720 | + | <request name="PolyText16" opcode="75"> |
| 4721 | + | <pad bytes="1" /> |
| 4722 | + | <field type="DRAWABLE" name="drawable" /> |
| 4723 | + | <field type="GCONTEXT" name="gc" /> |
| 4724 | + | <field type="INT16" name="x" /> |
| 4725 | + | <field type="INT16" name="y" /> |
| 4726 | + | <list type="BYTE" name="items" /> |
| 4727 | + | </request> |
| 4728 | + | |
| 4729 | + | <request name="ImageText8" opcode="76"> |
| 4730 | + | <field type="BYTE" name="string_len" /> |
| 4731 | + | <field type="DRAWABLE" name="drawable" /> |
| 4732 | + | <field type="GCONTEXT" name="gc" /> |
| 4733 | + | <field type="INT16" name="x" /> |
| 4734 | + | <field type="INT16" name="y" /> |
| 4735 | + | <list type="char" name="string"> |
| 4736 | + | <fieldref>string_len</fieldref> |
| 4737 | + | </list> |
| 4738 | + | <doc> |
| 4739 | + | <brief>Draws text</brief> |
| 4740 | + | <description><![CDATA[ |
| 4741 | + | Fills the destination rectangle with the background pixel from `gc`, then |
| 4742 | + | paints the text with the foreground pixel from `gc`. The upper-left corner of |
| 4743 | + | the filled rectangle is at [x, y - font-ascent]. The width is overall-width, |
| 4744 | + | the height is font-ascent + font-descent. The overall-width, font-ascent and |
| 4745 | + | font-descent are as returned by `xcb_query_text_extents` (TODO). |
| 4746 | + | |
| 4747 | + | Note that using X core fonts is deprecated (but still supported) in favor of |
| 4748 | + | client-side rendering using Xft. |
| 4749 | + | ]]></description> |
| 4750 | + | <field name="drawable"><![CDATA[ |
| 4751 | + | The drawable (Window or Pixmap) to draw text on. |
| 4752 | + | ]]></field> |
| 4753 | + | <field name="string_len"><![CDATA[ |
| 4754 | + | The length of the `string`. Note that this parameter limited by 255 due to |
| 4755 | + | using 8 bits! |
| 4756 | + | ]]></field> |
| 4757 | + | <field name="string"><![CDATA[ |
| 4758 | + | The string to draw. Only the first 255 characters are relevant due to the data |
| 4759 | + | type of `string_len`. |
| 4760 | + | ]]></field> |
| 4761 | + | <field name="x"><![CDATA[ |
| 4762 | + | The x coordinate of the first character, relative to the origin of `drawable`. |
| 4763 | + | ]]></field> |
| 4764 | + | <field name="y"><![CDATA[ |
| 4765 | + | The y coordinate of the first character, relative to the origin of `drawable`. |
| 4766 | + | ]]></field> |
| 4767 | + | <field name="gc"><![CDATA[ |
| 4768 | + | The graphics context to use. |
| 4769 | + | |
| 4770 | + | The following graphics context components are used: plane-mask, foreground, |
| 4771 | + | background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. |
| 4772 | + | ]]></field> |
| 4773 | + | <error type="Drawable"><![CDATA[ |
| 4774 | + | The specified `drawable` (Window or Pixmap) does not exist. |
| 4775 | + | ]]></error> |
| 4776 | + | <error type="GContext"><![CDATA[ |
| 4777 | + | The specified graphics context does not exist. |
| 4778 | + | ]]></error> |
| 4779 | + | <error type="Match"><![CDATA[ |
| 4780 | + | TODO: reasons? |
| 4781 | + | ]]></error> |
| 4782 | + | <see type="request" name="ImageText16" /> |
| 4783 | + | </doc> |
| 4784 | + | </request> |
| 4785 | + | |
| 4786 | + | <request name="ImageText16" opcode="77"> |
| 4787 | + | <field type="BYTE" name="string_len" /> |
| 4788 | + | <field type="DRAWABLE" name="drawable" /> |
| 4789 | + | <field type="GCONTEXT" name="gc" /> |
| 4790 | + | <field type="INT16" name="x" /> |
| 4791 | + | <field type="INT16" name="y" /> |
| 4792 | + | <list type="CHAR2B" name="string"> |
| 4793 | + | <fieldref>string_len</fieldref> |
| 4794 | + | </list> |
| 4795 | + | <doc> |
| 4796 | + | <brief>Draws text</brief> |
| 4797 | + | <description><![CDATA[ |
| 4798 | + | Fills the destination rectangle with the background pixel from `gc`, then |
| 4799 | + | paints the text with the foreground pixel from `gc`. The upper-left corner of |
| 4800 | + | the filled rectangle is at [x, y - font-ascent]. The width is overall-width, |
| 4801 | + | the height is font-ascent + font-descent. The overall-width, font-ascent and |
| 4802 | + | font-descent are as returned by `xcb_query_text_extents` (TODO). |
| 4803 | + | |
| 4804 | + | Note that using X core fonts is deprecated (but still supported) in favor of |
| 4805 | + | client-side rendering using Xft. |
| 4806 | + | ]]></description> |
| 4807 | + | <field name="drawable"><![CDATA[ |
| 4808 | + | The drawable (Window or Pixmap) to draw text on. |
| 4809 | + | ]]></field> |
| 4810 | + | <field name="string_len"><![CDATA[ |
| 4811 | + | The length of the `string` in characters. Note that this parameter limited by |
| 4812 | + | 255 due to using 8 bits! |
| 4813 | + | ]]></field> |
| 4814 | + | <field name="string"><![CDATA[ |
| 4815 | + | The string to draw. Only the first 255 characters are relevant due to the data |
| 4816 | + | type of `string_len`. Every character uses 2 bytes (hence the 16 in this |
| 4817 | + | request's name). |
| 4818 | + | ]]></field> |
| 4819 | + | <field name="x"><![CDATA[ |
| 4820 | + | The x coordinate of the first character, relative to the origin of `drawable`. |
| 4821 | + | ]]></field> |
| 4822 | + | <field name="y"><![CDATA[ |
| 4823 | + | The y coordinate of the first character, relative to the origin of `drawable`. |
| 4824 | + | ]]></field> |
| 4825 | + | <field name="gc"><![CDATA[ |
| 4826 | + | The graphics context to use. |
| 4827 | + | |
| 4828 | + | The following graphics context components are used: plane-mask, foreground, |
| 4829 | + | background, font, subwindow-mode, clip-x-origin, clip-y-origin, and clip-mask. |
| 4830 | + | ]]></field> |
| 4831 | + | <error type="Drawable"><![CDATA[ |
| 4832 | + | The specified `drawable` (Window or Pixmap) does not exist. |
| 4833 | + | ]]></error> |
| 4834 | + | <error type="GContext"><![CDATA[ |
| 4835 | + | The specified graphics context does not exist. |
| 4836 | + | ]]></error> |
| 4837 | + | <error type="Match"><![CDATA[ |
| 4838 | + | TODO: reasons? |
| 4839 | + | ]]></error> |
| 4840 | + | <see type="request" name="ImageText8" /> |
| 4841 | + | </doc> |
| 4842 | + | </request> |
| 4843 | + | |
| 4844 | + | <enum name= "ColormapAlloc"> |
| 4845 | + | <item name="None"><value>0</value></item> |
| 4846 | + | <item name="All"> <value>1</value></item> |
| 4847 | + | </enum> |
| 4848 | + | |
| 4849 | + | <request name="CreateColormap" opcode="78"> |
| 4850 | + | <field type="BYTE" name="alloc" enum="ColormapAlloc" /> |
| 4851 | + | <field type="COLORMAP" name="mid" /> |
| 4852 | + | <field type="WINDOW" name="window" /> |
| 4853 | + | <field type="VISUALID" name="visual" /> |
| 4854 | + | </request> |
| 4855 | + | |
| 4856 | + | <request name="FreeColormap" opcode="79"> |
| 4857 | + | <pad bytes="1" /> |
| 4858 | + | <field type="COLORMAP" name="cmap" /> |
| 4859 | + | </request> |
| 4860 | + | |
| 4861 | + | <request name="CopyColormapAndFree" opcode="80"> |
| 4862 | + | <pad bytes="1" /> |
| 4863 | + | <field type="COLORMAP" name="mid" /> |
| 4864 | + | <field type="COLORMAP" name="src_cmap" /> |
| 4865 | + | </request> |
| 4866 | + | |
| 4867 | + | <request name="InstallColormap" opcode="81"> |
| 4868 | + | <pad bytes="1" /> |
| 4869 | + | <field type="COLORMAP" name="cmap" /> |
| 4870 | + | </request> |
| 4871 | + | |
| 4872 | + | <request name="UninstallColormap" opcode="82"> |
| 4873 | + | <pad bytes="1" /> |
| 4874 | + | <field type="COLORMAP" name="cmap" /> |
| 4875 | + | </request> |
| 4876 | + | |
| 4877 | + | <request name="ListInstalledColormaps" opcode="83"> |
| 4878 | + | <pad bytes="1" /> |
| 4879 | + | <field type="WINDOW" name="window" /> |
| 4880 | + | <reply> |
| 4881 | + | <pad bytes="1" /> |
| 4882 | + | <field type="CARD16" name="cmaps_len" /> |
| 4883 | + | <pad bytes="22" /> |
| 4884 | + | <list type="COLORMAP" name="cmaps"> |
| 4885 | + | <fieldref>cmaps_len</fieldref> |
| 4886 | + | </list> |
| 4887 | + | </reply> |
| 4888 | + | </request> |
| 4889 | + | |
| 4890 | + | <request name="AllocColor" opcode="84"> |
| 4891 | + | <pad bytes="1" /> |
| 4892 | + | <field type="COLORMAP" name="cmap" /> |
| 4893 | + | <field type="CARD16" name="red" /> |
| 4894 | + | <field type="CARD16" name="green" /> |
| 4895 | + | <field type="CARD16" name="blue" /> |
| 4896 | + | <pad bytes="2" /> |
| 4897 | + | <reply> |
| 4898 | + | <pad bytes="1" /> |
| 4899 | + | <field type="CARD16" name="red" /> |
| 4900 | + | <field type="CARD16" name="green" /> |
| 4901 | + | <field type="CARD16" name="blue" /> |
| 4902 | + | <pad bytes="2" /> |
| 4903 | + | <field type="CARD32" name="pixel" /> |
| 4904 | + | </reply> |
| 4905 | + | <doc> |
| 4906 | + | <brief>Allocate a color</brief> |
| 4907 | + | <description><![CDATA[ |
| 4908 | + | Allocates a read-only colormap entry corresponding to the closest RGB value |
| 4909 | + | supported by the hardware. If you are using TrueColor, you can take a shortcut |
| 4910 | + | and directly calculate the color pixel value to avoid the round trip. But, for |
| 4911 | + | example, on 16-bit color setups (VNC), you can easily get the closest supported |
| 4912 | + | RGB value to the RGB value you are specifying. |
| 4913 | + | ]]></description> |
| 4914 | + | <field name="cmap"><![CDATA[ |
| 4915 | + | TODO |
| 4916 | + | ]]></field> |
| 4917 | + | <field name="red"><![CDATA[ |
| 4918 | + | The red value of your color. |
| 4919 | + | ]]></field> |
| 4920 | + | <field name="green"><![CDATA[ |
| 4921 | + | The green value of your color. |
| 4922 | + | ]]></field> |
| 4923 | + | <field name="blue"><![CDATA[ |
| 4924 | + | The blue value of your color. |
| 4925 | + | ]]></field> |
| 4926 | + | <error type="Colormap"><![CDATA[ |
| 4927 | + | The specified colormap `cmap` does not exist. |
| 4928 | + | ]]></error> |
| 4929 | + | </doc> |
| 4930 | + | </request> |
| 4931 | + | |
| 4932 | + | <request name="AllocNamedColor" opcode="85"> |
| 4933 | + | <pad bytes="1" /> |
| 4934 | + | <field type="COLORMAP" name="cmap" /> |
| 4935 | + | <field type="CARD16" name="name_len" /> |
| 4936 | + | <pad bytes="2" /> |
| 4937 | + | <list type="char" name="name"> |
| 4938 | + | <fieldref>name_len</fieldref> |
| 4939 | + | </list> |
| 4940 | + | <reply> |
| 4941 | + | <pad bytes="1" /> |
| 4942 | + | <field type="CARD32" name="pixel" /> |
| 4943 | + | <field type="CARD16" name="exact_red" /> |
| 4944 | + | <field type="CARD16" name="exact_green" /> |
| 4945 | + | <field type="CARD16" name="exact_blue" /> |
| 4946 | + | <field type="CARD16" name="visual_red" /> |
| 4947 | + | <field type="CARD16" name="visual_green" /> |
| 4948 | + | <field type="CARD16" name="visual_blue" /> |
| 4949 | + | </reply> |
| 4950 | + | </request> |
| 4951 | + | |
| 4952 | + | <request name="AllocColorCells" opcode="86"> |
| 4953 | + | <field type="BOOL" name="contiguous" /> |
| 4954 | + | <field type="COLORMAP" name="cmap" /> |
| 4955 | + | <field type="CARD16" name="colors" /> |
| 4956 | + | <field type="CARD16" name="planes" /> |
| 4957 | + | <reply> |
| 4958 | + | <pad bytes="1" /> |
| 4959 | + | <field type="CARD16" name="pixels_len" /> |
| 4960 | + | <field type="CARD16" name="masks_len" /> |
| 4961 | + | <pad bytes="20" /> |
| 4962 | + | <list type="CARD32" name="pixels"> |
| 4963 | + | <fieldref>pixels_len</fieldref> |
| 4964 | + | </list> |
| 4965 | + | <list type="CARD32" name="masks"> |
| 4966 | + | <fieldref>masks_len</fieldref> |
| 4967 | + | </list> |
| 4968 | + | </reply> |
| 4969 | + | </request> |
| 4970 | + | |
| 4971 | + | <request name="AllocColorPlanes" opcode="87"> |
| 4972 | + | <field type="BOOL" name="contiguous" /> |
| 4973 | + | <field type="COLORMAP" name="cmap" /> |
| 4974 | + | <field type="CARD16" name="colors" /> |
| 4975 | + | <field type="CARD16" name="reds" /> |
| 4976 | + | <field type="CARD16" name="greens" /> |
| 4977 | + | <field type="CARD16" name="blues" /> |
| 4978 | + | <reply> |
| 4979 | + | <pad bytes="1" /> |
| 4980 | + | <field type="CARD16" name="pixels_len" /> |
| 4981 | + | <pad bytes="2" /> |
| 4982 | + | <field type="CARD32" name="red_mask" /> |
| 4983 | + | <field type="CARD32" name="green_mask" /> |
| 4984 | + | <field type="CARD32" name="blue_mask" /> |
| 4985 | + | <pad bytes="8" /> |
| 4986 | + | <list type="CARD32" name="pixels"> |
| 4987 | + | <fieldref>pixels_len</fieldref> |
| 4988 | + | </list> |
| 4989 | + | </reply> |
| 4990 | + | </request> |
| 4991 | + | |
| 4992 | + | <request name="FreeColors" opcode="88"> |
| 4993 | + | <pad bytes="1" /> |
| 4994 | + | <field type="COLORMAP" name="cmap" /> |
| 4995 | + | <field type="CARD32" name="plane_mask" /> |
| 4996 | + | <list type="CARD32" name="pixels" /> |
| 4997 | + | </request> |
| 4998 | + | |
| 4999 | + | <enum name="ColorFlag"> |
| 5000 | + | <item name="Red"> <bit>0</bit></item> |
| 5001 | + | <item name="Green"><bit>1</bit></item> |
| 5002 | + | <item name="Blue"> <bit>2</bit></item> |
| 5003 | + | </enum> |
| 5004 | + | |
| 5005 | + | <struct name="COLORITEM"> |
| 5006 | + | <field type="CARD32" name="pixel" /> |
| 5007 | + | <field type="CARD16" name="red" /> |
| 5008 | + | <field type="CARD16" name="green" /> |
| 5009 | + | <field type="CARD16" name="blue" /> |
| 5010 | + | <field type="BYTE" name="flags" mask="ColorFlag" /> |
| 5011 | + | <pad bytes="1" /> |
| 5012 | + | </struct> |
| 5013 | + | |
| 5014 | + | <request name="StoreColors" opcode="89" combine-adjacent="true"> |
| 5015 | + | <pad bytes="1" /> |
| 5016 | + | <field type="COLORMAP" name="cmap" /> |
| 5017 | + | <list type="COLORITEM" name="items" /> |
| 5018 | + | </request> |
| 5019 | + | |
| 5020 | + | <request name="StoreNamedColor" opcode="90"> |
| 5021 | + | <field type="CARD8" name="flags" mask="ColorFlag" /> |
| 5022 | + | <field type="COLORMAP" name="cmap" /> |
| 5023 | + | <field type="CARD32" name="pixel" /> |
| 5024 | + | <field type="CARD16" name="name_len" /> |
| 5025 | + | <pad bytes="2" /> |
| 5026 | + | <list type="char" name="name"> |
| 5027 | + | <fieldref>name_len</fieldref> |
| 5028 | + | </list> |
| 5029 | + | </request> |
| 5030 | + | |
| 5031 | + | <struct name="RGB"> |
| 5032 | + | <field type="CARD16" name="red" /> |
| 5033 | + | <field type="CARD16" name="green" /> |
| 5034 | + | <field type="CARD16" name="blue" /> |
| 5035 | + | <pad bytes="2" /> |
| 5036 | + | </struct> |
| 5037 | + | |
| 5038 | + | <request name="QueryColors" opcode="91"> |
| 5039 | + | <pad bytes="1" /> |
| 5040 | + | <field type="COLORMAP" name="cmap" /> |
| 5041 | + | <list type="CARD32" name="pixels" /> |
| 5042 | + | <reply> |
| 5043 | + | <pad bytes="1" /> |
| 5044 | + | <field type="CARD16" name="colors_len" /> |
| 5045 | + | <pad bytes="22" /> |
| 5046 | + | <list type="RGB" name="colors"> |
| 5047 | + | <fieldref>colors_len</fieldref> |
| 5048 | + | </list> |
| 5049 | + | </reply> |
| 5050 | + | </request> |
| 5051 | + | |
| 5052 | + | <request name="LookupColor" opcode="92"> |
| 5053 | + | <pad bytes="1" /> |
| 5054 | + | <field type="COLORMAP" name="cmap" /> |
| 5055 | + | <field type="CARD16" name="name_len" /> |
| 5056 | + | <pad bytes="2" /> |
| 5057 | + | <list type="char" name="name"> |
| 5058 | + | <fieldref>name_len</fieldref> |
| 5059 | + | </list> |
| 5060 | + | <reply> |
| 5061 | + | <pad bytes="1" /> |
| 5062 | + | <field type="CARD16" name="exact_red" /> |
| 5063 | + | <field type="CARD16" name="exact_green" /> |
| 5064 | + | <field type="CARD16" name="exact_blue" /> |
| 5065 | + | <field type="CARD16" name="visual_red" /> |
| 5066 | + | <field type="CARD16" name="visual_green" /> |
| 5067 | + | <field type="CARD16" name="visual_blue" /> |
| 5068 | + | </reply> |
| 5069 | + | </request> |
| 5070 | + | |
| 5071 | + | <enum name="Pixmap"> |
| 5072 | + | <item name="None"> <value>0</value></item> |
| 5073 | + | </enum> |
| 5074 | + | |
| 5075 | + | <request name="CreateCursor" opcode="93"> |
| 5076 | + | <pad bytes="1" /> |
| 5077 | + | <field type="CURSOR" name="cid" /> |
| 5078 | + | <field type="PIXMAP" name="source" /> |
| 5079 | + | <field type="PIXMAP" name="mask" altenum="Pixmap" /> |
| 5080 | + | <field type="CARD16" name="fore_red" /> |
| 5081 | + | <field type="CARD16" name="fore_green" /> |
| 5082 | + | <field type="CARD16" name="fore_blue" /> |
| 5083 | + | <field type="CARD16" name="back_red" /> |
| 5084 | + | <field type="CARD16" name="back_green" /> |
| 5085 | + | <field type="CARD16" name="back_blue" /> |
| 5086 | + | <field type="CARD16" name="x" /> |
| 5087 | + | <field type="CARD16" name="y" /> |
| 5088 | + | </request> |
| 5089 | + | |
| 5090 | + | <enum name="Font"> |
| 5091 | + | <item name="None"> <value>0</value></item> |
| 5092 | + | </enum> |
| 5093 | + | |
| 5094 | + | <request name="CreateGlyphCursor" opcode="94"> |
| 5095 | + | <pad bytes="1" /> |
| 5096 | + | <field type="CURSOR" name="cid" /> |
| 5097 | + | <field type="FONT" name="source_font" /> |
| 5098 | + | <field type="FONT" name="mask_font" altenum="Font" /> |
| 5099 | + | <field type="CARD16" name="source_char" /> |
| 5100 | + | <field type="CARD16" name="mask_char" /> |
| 5101 | + | <field type="CARD16" name="fore_red" /> |
| 5102 | + | <field type="CARD16" name="fore_green" /> |
| 5103 | + | <field type="CARD16" name="fore_blue" /> |
| 5104 | + | <field type="CARD16" name="back_red" /> |
| 5105 | + | <field type="CARD16" name="back_green" /> |
| 5106 | + | <field type="CARD16" name="back_blue" /> |
| 5107 | + | <doc> |
| 5108 | + | <brief>create cursor</brief> |
| 5109 | + | <description><![CDATA[ |
| 5110 | + | Creates a cursor from a font glyph. X provides a set of standard cursor shapes |
| 5111 | + | in a special font named cursor. Applications are encouraged to use this |
| 5112 | + | interface for their cursors because the font can be customized for the |
| 5113 | + | individual display type. |
| 5114 | + | |
| 5115 | + | All pixels which are set to 1 in the source will use the foreground color (as |
| 5116 | + | specified by `fore_red`, `fore_green` and `fore_blue`). All pixels set to 0 |
| 5117 | + | will use the background color (as specified by `back_red`, `back_green` and |
| 5118 | + | `back_blue`). |
| 5119 | + | ]]></description> |
| 5120 | + | <field name="cid"><![CDATA[ |
| 5121 | + | The ID with which you will refer to the cursor, created by `xcb_generate_id`. |
| 5122 | + | ]]></field> |
| 5123 | + | <field name="source_font"><![CDATA[ |
| 5124 | + | In which font to look for the cursor glyph. |
| 5125 | + | ]]></field> |
| 5126 | + | <field name="mask_font"><![CDATA[ |
| 5127 | + | In which font to look for the mask glyph. |
| 5128 | + | ]]></field> |
| 5129 | + | <field name="source_char"><![CDATA[ |
| 5130 | + | The glyph of `source_font` to use. |
| 5131 | + | ]]></field> |
| 5132 | + | <field name="mask_char"><![CDATA[ |
| 5133 | + | The glyph of `mask_font` to use as a mask: Pixels which are set to 1 define |
| 5134 | + | which source pixels are displayed. All pixels which are set to 0 are not |
| 5135 | + | displayed. |
| 5136 | + | ]]></field> |
| 5137 | + | <field name="fore_red"><![CDATA[ |
| 5138 | + | The red value of the foreground color. |
| 5139 | + | ]]></field> |
| 5140 | + | <field name="fore_green"><![CDATA[ |
| 5141 | + | The green value of the foreground color. |
| 5142 | + | ]]></field> |
| 5143 | + | <field name="fore_blue"><![CDATA[ |
| 5144 | + | The blue value of the foreground color. |
| 5145 | + | ]]></field> |
| 5146 | + | <field name="back_red"><![CDATA[ |
| 5147 | + | The red value of the background color. |
| 5148 | + | ]]></field> |
| 5149 | + | <field name="back_green"><![CDATA[ |
| 5150 | + | The green value of the background color. |
| 5151 | + | ]]></field> |
| 5152 | + | <field name="back_blue"><![CDATA[ |
| 5153 | + | The blue value of the background color. |
| 5154 | + | ]]></field> |
| 5155 | + | <error type="Alloc"><![CDATA[ |
| 5156 | + | The X server could not allocate the requested resources (no memory?). |
| 5157 | + | ]]></error> |
| 5158 | + | <error type="Font"><![CDATA[ |
| 5159 | + | The specified `source_font` or `mask_font` does not exist. |
| 5160 | + | ]]></error> |
| 5161 | + | <error type="Value"><![CDATA[ |
| 5162 | + | Either `source_char` or `mask_char` are not defined in `source_font` or `mask_font`, respectively. |
| 5163 | + | ]]></error> |
| 5164 | + | <!-- TODO: example --> |
| 5165 | + | </doc> |
| 5166 | + | </request> |
| 5167 | + | |
| 5168 | + | <request name="FreeCursor" opcode="95"> |
| 5169 | + | <pad bytes="1" /> |
| 5170 | + | <field type="CURSOR" name="cursor" /> |
| 5171 | + | <doc> |
| 5172 | + | <brief>Deletes a cursor</brief> |
| 5173 | + | <description><![CDATA[ |
| 5174 | + | Deletes the association between the cursor resource ID and the specified |
| 5175 | + | cursor. The cursor is freed when no other resource references it. |
| 5176 | + | ]]></description> |
| 5177 | + | <field name="cursor"><![CDATA[The cursor to destroy.]]></field> |
| 5178 | + | <error type="Cursor"><![CDATA[ |
| 5179 | + | The specified cursor does not exist. |
| 5180 | + | ]]></error> |
| 5181 | + | </doc> |
| 5182 | + | |
| 5183 | + | </request> |
| 5184 | + | |
| 5185 | + | <request name="RecolorCursor" opcode="96"> |
| 5186 | + | <pad bytes="1" /> |
| 5187 | + | <field type="CURSOR" name="cursor" /> |
| 5188 | + | <field type="CARD16" name="fore_red" /> |
| 5189 | + | <field type="CARD16" name="fore_green" /> |
| 5190 | + | <field type="CARD16" name="fore_blue" /> |
| 5191 | + | <field type="CARD16" name="back_red" /> |
| 5192 | + | <field type="CARD16" name="back_green" /> |
| 5193 | + | <field type="CARD16" name="back_blue" /> |
| 5194 | + | </request> |
| 5195 | + | |
| 5196 | + | <enum name="QueryShapeOf"> |
| 5197 | + | <item name="LargestCursor"> <value>0</value></item> |
| 5198 | + | <item name="FastestTile"> <value>1</value></item> |
| 5199 | + | <item name="FastestStipple"><value>2</value></item> |
| 5200 | + | </enum> |
| 5201 | + | |
| 5202 | + | <request name="QueryBestSize" opcode="97"> |
| 5203 | + | <field type="CARD8" name="class" enum="QueryShapeOf" /> |
| 5204 | + | <field type="DRAWABLE" name="drawable" /> |
| 5205 | + | <field type="CARD16" name="width" /> |
| 5206 | + | <field type="CARD16" name="height" /> |
| 5207 | + | <reply> |
| 5208 | + | <pad bytes="1" /> |
| 5209 | + | <field type="CARD16" name="width" /> |
| 5210 | + | <field type="CARD16" name="height" /> |
| 5211 | + | </reply> |
| 5212 | + | </request> |
| 5213 | + | |
| 5214 | + | <request name="QueryExtension" opcode="98"> |
| 5215 | + | <pad bytes="1" /> |
| 5216 | + | <field type="CARD16" name="name_len" /> |
| 5217 | + | <pad bytes="2" /> |
| 5218 | + | <list type="char" name="name"> |
| 5219 | + | <fieldref>name_len</fieldref> |
| 5220 | + | </list> |
| 5221 | + | <reply> |
| 5222 | + | <pad bytes="1" /> |
| 5223 | + | <field type="BOOL" name="present" /> |
| 5224 | + | <field type="CARD8" name="major_opcode" /> |
| 5225 | + | <field type="CARD8" name="first_event" /> |
| 5226 | + | <field type="CARD8" name="first_error" /> |
| 5227 | + | <doc> |
| 5228 | + | <field name="present"><![CDATA[ |
| 5229 | + | Whether the extension is present on this X11 server. |
| 5230 | + | ]]></field> |
| 5231 | + | <field name="major_opcode"><![CDATA[ |
| 5232 | + | The major opcode for requests. |
| 5233 | + | ]]></field> |
| 5234 | + | <field name="first_event"><![CDATA[ |
| 5235 | + | The first event code, if any. |
| 5236 | + | ]]></field> |
| 5237 | + | <field name="first_error"><![CDATA[ |
| 5238 | + | The first error code, if any. |
| 5239 | + | ]]></field> |
| 5240 | + | </doc> |
| 5241 | + | </reply> |
| 5242 | + | <doc> |
| 5243 | + | <brief>check if extension is present</brief> |
| 5244 | + | <description><![CDATA[ |
| 5245 | + | Determines if the specified extension is present on this X11 server. |
| 5246 | + | |
| 5247 | + | Every extension has a unique `major_opcode` to identify requests, the minor |
| 5248 | + | opcodes and request formats are extension-specific. If the extension provides |
| 5249 | + | events and errors, the `first_event` and `first_error` fields in the reply are |
| 5250 | + | set accordingly. |
| 5251 | + | |
| 5252 | + | There should rarely be a need to use this request directly, XCB provides the |
| 5253 | + | `xcb_get_extension_data` function instead. |
| 5254 | + | ]]></description> |
| 5255 | + | <field name="name_len"><![CDATA[ |
| 5256 | + | The length of `name` in bytes. |
| 5257 | + | ]]></field> |
| 5258 | + | <field name="name"><![CDATA[ |
| 5259 | + | The name of the extension to query, for example "RANDR". This is case |
| 5260 | + | sensitive! |
| 5261 | + | ]]></field> |
| 5262 | + | <see type="program" name="xdpyinfo" /> |
| 5263 | + | <see type="function" name="xcb_get_extension_data" /> |
| 5264 | + | </doc> |
| 5265 | + | </request> |
| 5266 | + | |
| 5267 | + | <request name="ListExtensions" opcode="99"> |
| 5268 | + | <reply> |
| 5269 | + | <field type="CARD8" name="names_len" /> |
| 5270 | + | <pad bytes="24" /> |
| 5271 | + | <list type="STR" name="names"> |
| 5272 | + | <fieldref>names_len</fieldref> |
| 5273 | + | </list> |
| 5274 | + | </reply> |
| 5275 | + | </request> |
| 5276 | + | |
| 5277 | + | <request name="ChangeKeyboardMapping" opcode="100"> |
| 5278 | + | <field type="CARD8" name="keycode_count" /> |
| 5279 | + | <field type="KEYCODE" name="first_keycode" /> |
| 5280 | + | <field type="CARD8" name="keysyms_per_keycode" /> |
| 5281 | + | <pad bytes="2" /> |
| 5282 | + | <list type="KEYSYM" name="keysyms"> |
| 5283 | + | <op op="*"> |
| 5284 | + | <fieldref>keycode_count</fieldref> |
| 5285 | + | <fieldref>keysyms_per_keycode</fieldref> |
| 5286 | + | </op> |
| 5287 | + | </list> |
| 5288 | + | </request> |
| 5289 | + | |
| 5290 | + | <request name="GetKeyboardMapping" opcode="101"> |
| 5291 | + | <pad bytes="1" /> |
| 5292 | + | <field type="KEYCODE" name="first_keycode" /> |
| 5293 | + | <field type="CARD8" name="count" /> |
| 5294 | + | <reply> |
| 5295 | + | <field type="BYTE" name="keysyms_per_keycode" /> |
| 5296 | + | <pad bytes="24" /> |
| 5297 | + | <list type="KEYSYM" name="keysyms"> |
| 5298 | + | <fieldref>length</fieldref> |
| 5299 | + | </list> |
| 5300 | + | </reply> |
| 5301 | + | </request> |
| 5302 | + | |
| 5303 | + | <enum name="KB"> |
| 5304 | + | <item name="KeyClickPercent"><bit>0</bit></item> |
| 5305 | + | <item name="BellPercent"> <bit>1</bit></item> |
| 5306 | + | <item name="BellPitch"> <bit>2</bit></item> |
| 5307 | + | <item name="BellDuration"> <bit>3</bit></item> |
| 5308 | + | <item name="Led"> <bit>4</bit></item> |
| 5309 | + | <item name="LedMode"> <bit>5</bit></item> |
| 5310 | + | <item name="Key"> <bit>6</bit></item> |
| 5311 | + | <item name="AutoRepeatMode"> <bit>7</bit></item> |
| 5312 | + | </enum> |
| 5313 | + | |
| 5314 | + | <enum name="LedMode"> |
| 5315 | + | <item name="Off"><value>0</value></item> |
| 5316 | + | <item name="On"> <value>1</value></item> |
| 5317 | + | </enum> |
| 5318 | + | |
| 5319 | + | <enum name="AutoRepeatMode"> |
| 5320 | + | <item name="Off"> <value>0</value></item> |
| 5321 | + | <item name="On"> <value>1</value></item> |
| 5322 | + | <item name="Default"><value>2</value></item> |
| 5323 | + | </enum> |
| 5324 | + | |
| 5325 | + | <request name="ChangeKeyboardControl" opcode="102"> |
| 5326 | + | <pad bytes="1" /> |
| 5327 | + | <field type="CARD32" name="value_mask" mask="KB" /> |
| 5328 | + | <switch name="value_list"> |
| 5329 | + | <fieldref>value_mask</fieldref> |
| 5330 | + | <bitcase> |
| 5331 | + | <enumref ref="KB">KeyClickPercent</enumref> |
| 5332 | + | <field type="INT32" name="key_click_percent" /> |
| 5333 | + | </bitcase> |
| 5334 | + | <bitcase> |
| 5335 | + | <enumref ref="KB">BellPercent</enumref> |
| 5336 | + | <field type="INT32" name="bell_percent" /> |
| 5337 | + | </bitcase> |
| 5338 | + | <bitcase> |
| 5339 | + | <enumref ref="KB">BellPitch</enumref> |
| 5340 | + | <field type="INT32" name="bell_pitch" /> |
| 5341 | + | </bitcase> |
| 5342 | + | <bitcase> |
| 5343 | + | <enumref ref="KB">BellDuration</enumref> |
| 5344 | + | <field type="INT32" name="bell_duration" /> |
| 5345 | + | </bitcase> |
| 5346 | + | <bitcase> |
| 5347 | + | <enumref ref="KB">Led</enumref> |
| 5348 | + | <field type="CARD32" name="led" /> |
| 5349 | + | </bitcase> |
| 5350 | + | <bitcase> |
| 5351 | + | <enumref ref="KB">LedMode</enumref> |
| 5352 | + | <field type="CARD32" name="led_mode" enum="LedMode"/> |
| 5353 | + | </bitcase> |
| 5354 | + | <bitcase> |
| 5355 | + | <enumref ref="KB">Key</enumref> |
| 5356 | + | <field type="KEYCODE32" name="key" /> |
| 5357 | + | </bitcase> |
| 5358 | + | <bitcase> |
| 5359 | + | <enumref ref="KB">AutoRepeatMode</enumref> |
| 5360 | + | <field type="CARD32" name="auto_repeat_mode" enum="AutoRepeatMode"/> |
| 5361 | + | </bitcase> |
| 5362 | + | </switch> |
| 5363 | + | |
| 5364 | + | </request> |
| 5365 | + | |
| 5366 | + | <request name="GetKeyboardControl" opcode="103"> |
| 5367 | + | <reply> |
| 5368 | + | <field type="BYTE" name="global_auto_repeat" enum="AutoRepeatMode" /> |
| 5369 | + | <field type="CARD32" name="led_mask" /> |
| 5370 | + | <field type="CARD8" name="key_click_percent" /> |
| 5371 | + | <field type="CARD8" name="bell_percent" /> |
| 5372 | + | <field type="CARD16" name="bell_pitch" /> |
| 5373 | + | <field type="CARD16" name="bell_duration" /> |
| 5374 | + | <pad bytes="2" /> |
| 5375 | + | <list type="CARD8" name="auto_repeats"><value>32</value></list> |
| 5376 | + | </reply> |
| 5377 | + | </request> |
| 5378 | + | |
| 5379 | + | <request name="Bell" opcode="104"> |
| 5380 | + | <field type="INT8" name="percent" /> |
| 5381 | + | </request> |
| 5382 | + | |
| 5383 | + | <request name="ChangePointerControl" opcode="105"> |
| 5384 | + | <pad bytes="1" /> |
| 5385 | + | <field type="INT16" name="acceleration_numerator" /> |
| 5386 | + | <field type="INT16" name="acceleration_denominator" /> |
| 5387 | + | <field type="INT16" name="threshold" /> |
| 5388 | + | <field type="BOOL" name="do_acceleration" /> |
| 5389 | + | <field type="BOOL" name="do_threshold" /> |
| 5390 | + | </request> |
| 5391 | + | |
| 5392 | + | <request name="GetPointerControl" opcode="106"> |
| 5393 | + | <reply> |
| 5394 | + | <pad bytes="1" /> |
| 5395 | + | <field type="CARD16" name="acceleration_numerator" /> |
| 5396 | + | <field type="CARD16" name="acceleration_denominator" /> |
| 5397 | + | <field type="CARD16" name="threshold" /> |
| 5398 | + | <pad bytes="18" /> |
| 5399 | + | </reply> |
| 5400 | + | </request> |
| 5401 | + | |
| 5402 | + | <!-- Screen saver timeout and interval can be set to -1 to restore defaults |
| 5403 | + | and set to 0 to disable the screen saver. --> |
| 5404 | + | |
| 5405 | + | <enum name="Blanking"> |
| 5406 | + | <item name="NotPreferred"><value>0</value></item> |
| 5407 | + | <item name="Preferred"> <value>1</value></item> |
| 5408 | + | <item name="Default"> <value>2</value></item> |
| 5409 | + | </enum> |
| 5410 | + | |
| 5411 | + | <enum name="Exposures"> |
| 5412 | + | <item name="NotAllowed"><value>0</value></item> |
| 5413 | + | <item name="Allowed"> <value>1</value></item> |
| 5414 | + | <item name="Default"> <value>2</value></item> |
| 5415 | + | </enum> |
| 5416 | + | |
| 5417 | + | <request name="SetScreenSaver" opcode="107"> |
| 5418 | + | <pad bytes="1" /> |
| 5419 | + | <field type="INT16" name="timeout" /> |
| 5420 | + | <field type="INT16" name="interval" /> |
| 5421 | + | <field type="CARD8" name="prefer_blanking" enum="Blanking" /> |
| 5422 | + | <field type="CARD8" name="allow_exposures" enum="Exposures" /> |
| 5423 | + | </request> |
| 5424 | + | |
| 5425 | + | <request name="GetScreenSaver" opcode="108"> |
| 5426 | + | <reply> |
| 5427 | + | <pad bytes="1" /> |
| 5428 | + | <field type="CARD16" name="timeout" /> |
| 5429 | + | <field type="CARD16" name="interval" /> |
| 5430 | + | <field type="BYTE" name="prefer_blanking" enum="Blanking" /> |
| 5431 | + | <field type="BYTE" name="allow_exposures" enum="Exposures" /> |
| 5432 | + | <pad bytes="18" /> |
| 5433 | + | </reply> |
| 5434 | + | </request> |
| 5435 | + | |
| 5436 | + | <enum name="HostMode"> |
| 5437 | + | <item name="Insert"><value>0</value></item> |
| 5438 | + | <item name="Delete"><value>1</value></item> |
| 5439 | + | </enum> |
| 5440 | + | |
| 5441 | + | <!-- also used and extended for Xau authentication --> |
| 5442 | + | <enum name="Family"> |
| 5443 | + | <item name="Internet"> <value>0</value></item> |
| 5444 | + | <item name="DECnet"> <value>1</value></item> |
| 5445 | + | <item name="Chaos"> <value>2</value></item> |
| 5446 | + | <item name="ServerInterpreted"><value>5</value></item> |
| 5447 | + | <item name="Internet6"> <value>6</value></item> |
| 5448 | + | </enum> |
| 5449 | + | |
| 5450 | + | <request name="ChangeHosts" opcode="109"> |
| 5451 | + | <field type="CARD8" name="mode" enum="HostMode" /> |
| 5452 | + | <field type="CARD8" name="family" enum="Family" /> |
| 5453 | + | <pad bytes="1" /> |
| 5454 | + | <field type="CARD16" name="address_len" /> |
| 5455 | + | <list type="BYTE" name="address"> |
| 5456 | + | <fieldref>address_len</fieldref> |
| 5457 | + | </list> |
| 5458 | + | </request> |
| 5459 | + | |
| 5460 | + | <struct name="HOST"> |
| 5461 | + | <field type="CARD8" name="family" enum="Family" /> |
| 5462 | + | <pad bytes="1" /> |
| 5463 | + | <field type="CARD16" name="address_len" /> |
| 5464 | + | <list type="BYTE" name="address"> |
| 5465 | + | <fieldref>address_len</fieldref> |
| 5466 | + | </list> |
| 5467 | + | <pad align="4" /> |
| 5468 | + | </struct> |
| 5469 | + | |
| 5470 | + | <request name="ListHosts" opcode="110"> |
| 5471 | + | <reply> |
| 5472 | + | <field type="BYTE" name="mode" enum="AccessControl" /> |
| 5473 | + | <field type="CARD16" name="hosts_len" /> |
| 5474 | + | <pad bytes="22" /> |
| 5475 | + | <list type="HOST" name="hosts"> |
| 5476 | + | <fieldref>hosts_len</fieldref> |
| 5477 | + | </list> |
| 5478 | + | </reply> |
| 5479 | + | </request> |
| 5480 | + | |
| 5481 | + | <enum name="AccessControl"> |
| 5482 | + | <item name="Disable"><value>0</value></item> |
| 5483 | + | <item name="Enable"> <value>1</value></item> |
| 5484 | + | </enum> |
| 5485 | + | |
| 5486 | + | <request name="SetAccessControl" opcode="111"> |
| 5487 | + | <field type="CARD8" name="mode" enum="AccessControl" /> |
| 5488 | + | </request> |
| 5489 | + | |
| 5490 | + | <enum name="CloseDown"> |
| 5491 | + | <item name="DestroyAll"> <value>0</value></item> |
| 5492 | + | <item name="RetainPermanent"><value>1</value></item> |
| 5493 | + | <item name="RetainTemporary"><value>2</value></item> |
| 5494 | + | </enum> |
| 5495 | + | |
| 5496 | + | <request name="SetCloseDownMode" opcode="112"> |
| 5497 | + | <field type="CARD8" name="mode" enum="CloseDown" /> |
| 5498 | + | </request> |
| 5499 | + | |
| 5500 | + | <enum name="Kill"> |
| 5501 | + | <item name="AllTemporary"><value>0</value></item> |
| 5502 | + | </enum> |
| 5503 | + | |
| 5504 | + | <request name="KillClient" opcode="113"> |
| 5505 | + | <pad bytes="1" /> |
| 5506 | + | <field type="CARD32" name="resource" altenum="Kill" /> |
| 5507 | + | <doc> |
| 5508 | + | <brief>kills a client</brief> |
| 5509 | + | <description><![CDATA[ |
| 5510 | + | Forces a close down of the client that created the specified `resource`. |
| 5511 | + | ]]></description> |
| 5512 | + | <field name="resource"><![CDATA[ |
| 5513 | + | Any resource belonging to the client (for example a Window), used to identify |
| 5514 | + | the client connection. |
| 5515 | + | |
| 5516 | + | The special value of `XCB_KILL_ALL_TEMPORARY`, the resources of all clients |
| 5517 | + | that have terminated in `RetainTemporary` (TODO) are destroyed. |
| 5518 | + | ]]></field> |
| 5519 | + | <error type="Value"><![CDATA[ |
| 5520 | + | The specified `resource` does not exist. |
| 5521 | + | ]]></error> |
| 5522 | + | <see type="program" name="xkill" /> |
| 5523 | + | </doc> |
| 5524 | + | |
| 5525 | + | </request> |
| 5526 | + | |
| 5527 | + | <request name="RotateProperties" opcode="114"> |
| 5528 | + | <pad bytes="1" /> |
| 5529 | + | <field type="WINDOW" name="window" /> |
| 5530 | + | <field type="CARD16" name="atoms_len" /> |
| 5531 | + | <field type="INT16" name="delta" /> |
| 5532 | + | <list type="ATOM" name="atoms"> |
| 5533 | + | <fieldref>atoms_len</fieldref> |
| 5534 | + | </list> |
| 5535 | + | </request> |
| 5536 | + | |
| 5537 | + | <enum name="ScreenSaver"> |
| 5538 | + | <item name="Reset"> <value>0</value></item> |
| 5539 | + | <item name="Active"><value>1</value></item> |
| 5540 | + | </enum> |
| 5541 | + | |
| 5542 | + | <request name="ForceScreenSaver" opcode="115"> |
| 5543 | + | <field type="CARD8" name="mode" enum="ScreenSaver" /> |
| 5544 | + | </request> |
| 5545 | + | |
| 5546 | + | <!-- Reply from SetPointerMapping or SetModifierMapping --> |
| 5547 | + | <enum name="MappingStatus"> |
| 5548 | + | <item name="Success"><value>0</value></item> |
| 5549 | + | <item name="Busy"> <value>1</value></item> |
| 5550 | + | <item name="Failure"><value>2</value></item> |
| 5551 | + | </enum> |
| 5552 | + | |
| 5553 | + | <request name="SetPointerMapping" opcode="116"> |
| 5554 | + | <field type="CARD8" name="map_len" /> |
| 5555 | + | <list type="CARD8" name="map"> |
| 5556 | + | <fieldref>map_len</fieldref> |
| 5557 | + | </list> |
| 5558 | + | <reply> |
| 5559 | + | <field type="BYTE" name="status" enum="MappingStatus" /> |
| 5560 | + | </reply> |
| 5561 | + | </request> |
| 5562 | + | |
| 5563 | + | <request name="GetPointerMapping" opcode="117"> |
| 5564 | + | <reply> |
| 5565 | + | <field type="CARD8" name="map_len" /> |
| 5566 | + | <pad bytes="24" /> |
| 5567 | + | <list type="CARD8" name="map"> |
| 5568 | + | <fieldref>map_len</fieldref> |
| 5569 | + | </list> |
| 5570 | + | </reply> |
| 5571 | + | </request> |
| 5572 | + | |
| 5573 | + | <enum name="MapIndex"> |
| 5574 | + | <item name="Shift"> <value>0</value></item> |
| 5575 | + | <item name="Lock"> <value>1</value></item> |
| 5576 | + | <item name="Control"><value>2</value></item> |
| 5577 | + | <item name="1"> <value>3</value></item> |
| 5578 | + | <item name="2"> <value>4</value></item> |
| 5579 | + | <item name="3"> <value>5</value></item> |
| 5580 | + | <item name="4"> <value>6</value></item> |
| 5581 | + | <item name="5"> <value>7</value></item> |
| 5582 | + | </enum> |
| 5583 | + | |
| 5584 | + | <request name="SetModifierMapping" opcode="118"> |
| 5585 | + | <field type="CARD8" name="keycodes_per_modifier" /> |
| 5586 | + | <list type="KEYCODE" name="keycodes"> |
| 5587 | + | <op op="*"> |
| 5588 | + | <fieldref>keycodes_per_modifier</fieldref> |
| 5589 | + | <value>8</value> |
| 5590 | + | </op> |
| 5591 | + | </list> |
| 5592 | + | <reply> |
| 5593 | + | <field type="BYTE" name="status" enum="MappingStatus" /> |
| 5594 | + | </reply> |
| 5595 | + | </request> |
| 5596 | + | |
| 5597 | + | <request name="GetModifierMapping" opcode="119"> |
| 5598 | + | <reply> |
| 5599 | + | <field type="CARD8" name="keycodes_per_modifier" /> |
| 5600 | + | <pad bytes="24" /> |
| 5601 | + | <list type="KEYCODE" name="keycodes"> |
| 5602 | + | <op op="*"> |
| 5603 | + | <fieldref>keycodes_per_modifier</fieldref> |
| 5604 | + | <value>8</value> |
| 5605 | + | </op> |
| 5606 | + | </list> |
| 5607 | + | </reply> |
| 5608 | + | </request> |
| 5609 | + | |
| 5610 | + | <!-- |
| 5611 | + | FIXME: NoOperation should allow specifying payload length |
| 5612 | + | but geez, malloc()ing a 262140 byte buffer just so I have something |
| 5613 | + | to hand to write(2) seems silly...! |
| 5614 | + | --> |
| 5615 | + | <request name="NoOperation" opcode="127" /> |
| 5616 | + | |
| 5617 | + | </xcb> |