1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3Copyright (C) 2006 Jeremy Kolb 4All Rights Reserved. 5 6Permission is hereby granted, free of charge, to any person obtaining a copy 7of this software and associated documentation files (the "Software"), to deal 8in the Software without restriction, including without limitation the rights 9to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10copies of the Software, and to permit persons to whom the Software is 11furnished to do so, subject to the following conditions: 12 13The above copyright notice and this permission notice shall be included in all 14copies or substantial portions of the Software. 15 16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 20ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 21WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 23Except as contained in this notice, the names of the authors or their 24institutions shall not be used in advertising or otherwise to promote the 25sale, use or other dealings in this Software without prior written 26authorization from the authors. 27--> 28<xcb header="res" extension-xname="X-Resource" extension-name="Res" 29 major-version="1" minor-version="2"> 30 <import>xproto</import> 31 32 <!-- v1.0 --> 33 <struct name="Client"> 34 <field type="CARD32" name="resource_base" /> 35 <field type="CARD32" name="resource_mask" /> 36 </struct> 37 38 <struct name="Type"> 39 <field type="ATOM" name="resource_type" /> 40 <field type="CARD32" name="count" /> 41 </struct> 42 43 <!-- v1.2 --> 44 <enum name="ClientIdMask"> 45 <item name="ClientXID"> <bit>0</bit> </item> 46 <item name="LocalClientPID"> <bit>1</bit> </item> 47 </enum> 48 49 <struct name="ClientIdSpec"> 50 <field type="CARD32" name="client" /> 51 <field type="CARD32" name="mask" mask="ClientIdMask" /> 52 </struct> 53 54 <struct name="ClientIdValue"> 55 <field type="ClientIdSpec" name="spec" /> 56 <field type="CARD32" name="length" /> 57 <list type="CARD32" name="value"> 58 <!-- The specification says that the length is in units of CARD32, 59 but the specification also says that the length is 4 when a 60 single LocalClientPid is present (ie. the length is in bytes). 61 The current server implementation sets the length to 4 when a 62 single CARD32 is present on the wire (length is in bytes). --> 63 <op op="/"> 64 <fieldref>length</fieldref> 65 <value>4</value> 66 </op> 67 </list> 68 </struct> 69 70 <struct name="ResourceIdSpec"> 71 <field type="CARD32" name="resource" /> 72 <field type="CARD32" name="type" /> 73 </struct> 74 75 <struct name="ResourceSizeSpec"> 76 <field type="ResourceIdSpec" name="spec" /> 77 <field type="CARD32" name="bytes" /> 78 <field type="CARD32" name="ref_count" /> 79 <field type="CARD32" name="use_count" /> 80 </struct> 81 82 <struct name="ResourceSizeValue"> 83 <field type="ResourceSizeSpec" name="size" /> 84 <field type="CARD32" name="num_cross_references" /> 85 <list type="ResourceSizeSpec" name="cross_references"> 86 <fieldref>num_cross_references</fieldref> 87 </list> 88 </struct> 89 90 <!-- v1.0 --> 91 <request name="QueryVersion" opcode="0"> 92 <field type="CARD8" name="client_major" /> 93 <field type="CARD8" name="client_minor" /> 94 <reply> 95 <pad bytes="1" /> 96 <field type="CARD16" name="server_major" /> 97 <field type="CARD16" name="server_minor" /> 98 </reply> 99 </request> 100 101 <request name="QueryClients" opcode="1"> 102 <reply> 103 <pad bytes="1" /> 104 <field type="CARD32" name="num_clients" /> 105 <pad bytes="20" /> 106 <list type="Client" name="clients"> 107 <fieldref>num_clients</fieldref> 108 </list> 109 </reply> 110 </request> 111 112 <request name="QueryClientResources" opcode="2"> 113 <field type="CARD32" name="xid" /> 114 <reply> 115 <pad bytes="1" /> 116 <field type="CARD32" name="num_types" /> 117 <pad bytes="20" /> 118 <list type="Type" name="types"> 119 <fieldref>num_types</fieldref> 120 </list> 121 </reply> 122 </request> 123 124 <request name="QueryClientPixmapBytes" opcode="3"> 125 <field type="CARD32" name="xid" /> 126 <reply> 127 <pad bytes="1" /> 128 <field type="CARD32" name="bytes" /> 129 <field type="CARD32" name="bytes_overflow" /> 130 </reply> 131 </request> 132 133 <!-- v1.2 --> 134 <request name="QueryClientIds" opcode="4"> 135 <field type="CARD32" name="num_specs" /> 136 <list type="ClientIdSpec" name="specs"> 137 <fieldref>num_specs</fieldref> 138 </list> 139 <reply> 140 <pad bytes="1" /> 141 <field type="CARD32" name="num_ids" /> 142 <pad bytes="20" /> 143 <list type="ClientIdValue" name="ids"> 144 <fieldref>num_ids</fieldref> 145 </list> 146 </reply> 147 </request> 148 149 <request name="QueryResourceBytes" opcode="5"> 150 <field type="CARD32" name="client" /> 151 <field type="CARD32" name="num_specs" /> 152 <list type="ResourceIdSpec" name="specs"> 153 <fieldref>num_specs</fieldref> 154 </list> 155 <reply> 156 <pad bytes="1" /> 157 <field type="CARD32" name="num_sizes" /> 158 <pad bytes="20" /> 159 <list type="ResourceSizeValue" name="sizes"> 160 <fieldref>num_sizes</fieldref> 161 </list> 162 </reply> 163 </request> 164</xcb> 165