117ca54c3Smrg DRAFT FOR REVIEW 217ca54c3Smrg The X Resource Extension 317ca54c3Smrg Version 1.2 417ca54c3Smrg Rami Ylimäki 517ca54c3Smrg rami.ylimaki@vincit.fi 617ca54c3Smrg 717ca54c3Smrg ❧❧❧❧❧❧❧❧❧❧❧ 817ca54c3Smrg 917ca54c3Smrg1. Introduction 1017ca54c3Smrg 1117ca54c3SmrgThe protocol description of X Resource Extension version 1.1 has been 1217ca54c3Smrgeither lost or has never been written. This specification documents 1317ca54c3Smrgversion 1.0 based on reverse engineered library and server 1417ca54c3Smrgcode. Version 1.1 has been accidentally released from the version 1517ca54c3Smrgcontrol and while it doesn't have differences to version 1.0, this 1617ca54c3Smrgversion is labeled 1.2 in order to remove the risk of confusion. In 1717ca54c3Smrgaddition to the 1.0 description, this document introduces a new 1.2 1817ca54c3Smrgversion of the extension. 1917ca54c3Smrg 2017ca54c3SmrgVersion 1.2 is a minor release and therefore the changes are 2117ca54c3Smrgcompatible with the previous version. Main enhancements over version 2217ca54c3Smrg1.0 are: 2317ca54c3Smrg 2417ca54c3Smrg- Client identification is now possible. For example, servers 2517ca54c3Smrg supporting version 1.2 may report PID of local clients. 2617ca54c3Smrg 2717ca54c3Smrg- Size of any resource can be queried from the server. Servers may not 2817ca54c3Smrg necessarily support size calculation for every resource. However, 2917ca54c3Smrg clients have now at least the chance to let the server do resource 3017ca54c3Smrg size estimation for them. 3117ca54c3Smrg 3217ca54c3Smrg ❧❧❧❧❧❧❧❧❧❧❧ 3317ca54c3Smrg 3417ca54c3Smrg2. Notations used in this document 3517ca54c3Smrg 3617ca54c3SmrgNotation for data types and requests follows the guidelines set in 3717ca54c3Smrgsections 2-4 of X Window System Protocol standard. 3817ca54c3Smrg 3917ca54c3Smrg ❧❧❧❧❧❧❧❧❧❧❧ 4017ca54c3Smrg 4117ca54c3Smrg3. Interoperability between version 1.1 and 1.2 4217ca54c3Smrg 4317ca54c3SmrgVersion 1.2 only introduces two new requests. However, these requests 4417ca54c3Smrgcould be seen as generalized versions of existing requests. Even 4517ca54c3Smrgthough we aren't deprecating any old requests, libraries could 4617ca54c3Smrgimplement some old requests using the new ones. 4717ca54c3Smrg 4817ca54c3SmrgThe new XResQueryClientIds request could be used instead of 4917ca54c3SmrgXResQueryClients. 5017ca54c3Smrg 5117ca54c3SmrgThe new XResQueryResourceBytes request could be used instead of 5217ca54c3SmrgXResQueryClientPixmapBytes. 5317ca54c3Smrg 5417ca54c3SmrgUsing the old requests is still acceptable because we don't want to 5517ca54c3Smrgchange the semantics of existing requests between version 1.1 and 1.2. 5617ca54c3Smrg 5717ca54c3Smrg ❧❧❧❧❧❧❧❧❧❧❧ 5817ca54c3Smrg 5917ca54c3Smrg4. Data types 6017ca54c3Smrg 6117ca54c3Smrg4.1 Types in version 1.0 6217ca54c3Smrg 6317ca54c3SmrgCLIENTXIDRANGE [ resource_base: CARD32 6417ca54c3Smrg resource_mask: CARD32 ] 6517ca54c3Smrg 6617ca54c3SmrgThis type is used for reply of XResQueryClients in version 1.1. It 6717ca54c3Smrgrepresents the range of resource allocated for a client and can be 6817ca54c3Smrgalso used for client identification. 6917ca54c3Smrg 7017ca54c3Smrgresource_base 7117ca54c3Smrg First resource ID reserved for a client. Used also to identify the 7217ca54c3Smrg clients themselves. 7317ca54c3Smrgresource_mask 7417ca54c3Smrg Mask that can be used to identify a client from some resource 7517ca54c3Smrg ID. Just zero the bits indicated by this mask from any resource ID 7617ca54c3Smrg to identify the client that owns the resource. 7717ca54c3Smrg 7817ca54c3SmrgCLIENTXID [ client: XID ] 7917ca54c3Smrg 8017ca54c3SmrgThis type identifies a single client by a resource owned by that 8117ca54c3Smrgclient or by the first resource ID allocated for the client 8217ca54c3Smrg(resource_base of CLIENTXIDRANGE). Whenever a resource ID is used, it 8317ca54c3Smrgis masked by resource_mask of CLIENTXIDRANGE to find out the client 8417ca54c3Smrgthat owns the resource. 8517ca54c3Smrg 8617ca54c3SmrgCLIENTRESOURCETYPECOUNT [ resource_type: ATOM 8717ca54c3Smrg count: CARD32 ] 8817ca54c3Smrg 8917ca54c3SmrgThis type is used for reply of XResQueryClientResources in version 9017ca54c3Smrg1.1. It represents the number of certain type of resources that are 9117ca54c3Smrgowned by some client. 9217ca54c3Smrg 9317ca54c3Smrgresource_type 9417ca54c3Smrg Atom specifying the type of a resource. 9517ca54c3Smrgcount 9617ca54c3Smrg Number of resources of the given type owned by a client. 9717ca54c3Smrg 9817ca54c3Smrg4.2 Types in version 1.2 9917ca54c3Smrg 10017ca54c3Smrg4.2.1 Types used by XResQueryClientIds 10117ca54c3Smrg 10217ca54c3SmrgCLIENTIDMASK { ClientXid = 0x1, LocalClientPid = 0x2 } 10317ca54c3Smrg 10417ca54c3SmrgA bitmask specifying a client identification method. Currently only 10517ca54c3Smrgthe PID of local clients is supported in the form of 10617ca54c3SmrgLocalClientPid. ClientXid is provided for backward compatibility with 10717ca54c3Smrgversion 1.0 so that the new 1.2 requests (XResQueryClientIds) can be 10817ca54c3Smrgused in place of the older ones (XResQueryClients). 10917ca54c3Smrg 11017ca54c3SmrgCLIENTIDSPEC [ client: CLIENTXID or None 11117ca54c3Smrg mask: SETofCLIENTIDMASK or None ] 11217ca54c3Smrg 11317ca54c3SmrgA data structure for selecting client IDs. 11417ca54c3Smrg 11517ca54c3Smrgclient 11617ca54c3Smrg ID of a resource allocated for some client. Only the part 11717ca54c3Smrg identifying a client is actually used. The resource_base of 11817ca54c3Smrg CLIENTXIDRANGE can be used if the client doesn't own any 11917ca54c3Smrg resources. However, any resource ID is accepted because that makes 12017ca54c3Smrg identifying the owners of existing resources easy. The null 12117ca54c3Smrg resource None can be used to select all clients. 12217ca54c3Smrgmask 12317ca54c3Smrg Collection of identification methods that should be applied on the 12417ca54c3Smrg client. The special value None can be used to apply all supported 12517ca54c3Smrg identification methods. 12617ca54c3Smrg 12717ca54c3SmrgCLIENTIDVALUE [ spec: CLIENTIDSPEC 12817ca54c3Smrg length: CARD32 12917ca54c3Smrg value: LISTofCARD32 ] 13017ca54c3Smrg 13117ca54c3SmrgA data structure specifying a single client ID. 13217ca54c3Smrg 13317ca54c3Smrgspec 13417ca54c3Smrg A unique identifier for a specific ID of some client. Wildcards 13517ca54c3Smrg such as None and bitmask unions aren't allowed. The data structure 13617ca54c3Smrg must always identify a single client and single ID type. However, 13717ca54c3Smrg the client doesn't have to be specified as the resource_base of 13817ca54c3Smrg CLIENTXIDRANGE and can be any resource owned by the client. 13917ca54c3Smrglength 14017ca54c3Smrg Specifies the length of an ID in units of CARD32. The length 14117ca54c3Smrg depends on the ID type. In version 1.2 the lengths are 0 for 14217ca54c3Smrg ClientXid and 4 for LocalClientPid. The length of ClientXid is 0 14317ca54c3Smrg because that is already stored in the spec field. 14417ca54c3Smrgvalue 14517ca54c3Smrg Actual ID data. In version 1.2 this is missing for ClientXid and 14617ca54c3Smrg consists of a single CARD32 for LocalClientPid. 14717ca54c3Smrg 14817ca54c3Smrg4.2.2 Types used by XResQueryResourceBytes 14917ca54c3Smrg 15017ca54c3SmrgTo better understand how resources are related to each other, it's 15117ca54c3Smrguseful to introduce the concepts of main resource and cross 15217ca54c3Smrgreference. By main resource we just mean a normal resource that has a 15317ca54c3Smrgvalid XID. By cross reference we mean a resource that is used by some 15417ca54c3Smrgother resource. 15517ca54c3Smrg 15617ca54c3SmrgThe same resource may have both of these roles depending on the 15717ca54c3Smrgcontext. For example, there could be an ordinary pixmap resource. When 15817ca54c3Smrgwe talk about this resource in isolation the term main resource is 15917ca54c3Smrgused. We call the exact same resource a cross reference when we are 16017ca54c3Smrgconcentrating on some higher level resource, such as window or 16117ca54c3Smrggraphics context, that is using the lower level resource. Cross 16217ca54c3Smrgreferences may also be internal server resources that don't have a 16317ca54c3Smrgvalid XID. 16417ca54c3Smrg 16517ca54c3SmrgRESOURCEIDSPEC [ resource: XID or None 16617ca54c3Smrg type: ATOM or None/AnyPropertyType ] 16717ca54c3Smrg 16817ca54c3SmrgA data structure for selecting or identifying resources. The 16917ca54c3Smrginterpretation of fields changes depending on the context. The 17017ca54c3Smrgdifferences in interpretation are described below. 17117ca54c3Smrg 17217ca54c3Smrgresource 17317ca54c3Smrg An XID of a resource. The null resource None can be used to select 17417ca54c3Smrg all resources matching some type if the data structure is used in 17517ca54c3Smrg XResQueryResourceBytes request. The null resource None can be used 17617ca54c3Smrg to mark private server resources if the data structure is used in 17717ca54c3Smrg a cross reference of XResQueryResourceBytes reply. 17817ca54c3Smrgtype 17917ca54c3Smrg An atom identifying the resource type. The null atom 18017ca54c3Smrg None/AnyPropertyType can be used to select all resource types 18117ca54c3Smrg matching some resource ID if the data structure is used in 18217ca54c3Smrg XResQueryResourceBytes request. 18317ca54c3Smrg 18417ca54c3SmrgRESOURCESIZESPEC [ spec: RESOURCEIDSPEC 18517ca54c3Smrg bytes: CARD32 18617ca54c3Smrg ref_count: CARD32 18717ca54c3Smrg use_count: CARD32 ] 18817ca54c3Smrg 18917ca54c3SmrgA data structure specifying the size of a single resource. 19017ca54c3Smrg 19117ca54c3Smrgspec 19217ca54c3Smrg Uniquely identifies a single resource. Wildcards such as None and 19317ca54c3Smrg AnyPropertyType aren't allowed for main resources. In cross 19417ca54c3Smrg references, None is used to mark internal server resources. 19517ca54c3Smrgbytes 19617ca54c3Smrg Number of bytes allocated for the resource. The size of a resource 19717ca54c3Smrg is never divided by a reference count. This is the number of bytes 19817ca54c3Smrg released in server when there are no more references left to the 19917ca54c3Smrg resource. 20017ca54c3Smrgref_count 20117ca54c3Smrg Number of total users of the resource. Typically the reference 20217ca54c3Smrg count is 1 but for pixmaps and other resources used from different 20317ca54c3Smrg contexts the count may be larger. 20417ca54c3Smrguse_count 20517ca54c3Smrg Number of times the resource is used by some other resource. For 20617ca54c3Smrg main resources this is typically 1, because a resource doesn't 20717ca54c3Smrg usually use itself recursively. For cross references this is the 20817ca54c3Smrg number of times the resource is used and is also 1 usually. 20917ca54c3Smrg 21017ca54c3SmrgRESOURCESIZEVALUE [ size: RESOURCESIZESPEC 21117ca54c3Smrg num_cross_references: CARD32 21217ca54c3Smrg cross_references: LISTofRESOURCESIZESPEC ] 21317ca54c3Smrg 21417ca54c3SmrgA data structure specifying sizes of cross references to other 21517ca54c3Smrgresources in addition to the main resource size. 21617ca54c3Smrg 21717ca54c3Smrgsize 21817ca54c3Smrg Size of a main resource. 21917ca54c3Smrgnum_cross_references 22017ca54c3Smrg Number of cross references to other resources from the main 22117ca54c3Smrg resource. Currently resources can only have pixmaps as cross 22217ca54c3Smrg references but this can be extended to other types in the 22317ca54c3Smrg future. For simple resources this field is therefore 0 and the 22417ca54c3Smrg cross_references list is missing. 22517ca54c3Smrgcross_references: 22617ca54c3Smrg Size specifications for cross references. Note that cross 22717ca54c3Smrg references may contain resources that don't have a valid XID. For 22817ca54c3Smrg example, a DRI2 drawable might have a cross reference to a private 22917ca54c3Smrg pixmap that is used internally in the server only. These private 23017ca54c3Smrg cross references are contained in this list also. This makes it 23117ca54c3Smrg possible to emulate XResGetClientPixmapBytes with 23217ca54c3Smrg XResGetResourceBytes. 23317ca54c3Smrg 23417ca54c3Smrg ❧❧❧❧❧❧❧❧❧❧❧ 23517ca54c3Smrg 23617ca54c3Smrg5. Requests 23717ca54c3Smrg 23817ca54c3Smrg5.1 Requests in version 1.0 23917ca54c3Smrg 24017ca54c3Smrg┌─── 24117ca54c3Smrg XResQueryVersion 24217ca54c3Smrg client_major: CARD8 24317ca54c3Smrg client_minor: CARD8 24417ca54c3Smrg ▶ 24517ca54c3Smrg server_major: CARD16 24617ca54c3Smrg server_minor: CARD16 24717ca54c3Smrg└─── 24817ca54c3Smrg 24917ca54c3SmrgThe client sends the highest supported version to the server and the 25017ca54c3Smrgserver sends the highest version it supports, but no higher than the 25117ca54c3Smrgrequested version. Major version changes can introduce 25217ca54c3Smrgincompatibilities in existing functionality, minor version changes 25317ca54c3Smrgintroduce only backward compatible changes. It is the client's 25417ca54c3Smrgresponsibility to ensure that the server supports a version which is 25517ca54c3Smrgcompatible with its expectations. 25617ca54c3Smrg 25717ca54c3Smrgclient_major 25817ca54c3Smrg Major X Resource Extension version supported by client. 25917ca54c3Smrgclient_minor 26017ca54c3Smrg Minor X Resource Extension version supported by client. 26117ca54c3Smrgserver_major 26217ca54c3Smrg Highest version supported by server that is compatible with 26317ca54c3Smrg client. 26417ca54c3Smrgserver_minor 26517ca54c3Smrg Highest version supported by server that is compatible with 26617ca54c3Smrg client. 26717ca54c3Smrg 26817ca54c3Smrg┌─── 26917ca54c3Smrg XResQueryClients 27017ca54c3Smrg ▶ 27117ca54c3Smrg num_clients: CARD32 27217ca54c3Smrg clients: LISTofCLIENTXIDRANGE 27317ca54c3Smrg└─── 27417ca54c3Smrg 27517ca54c3SmrgThe request asks X server to return the list of all currently 27617ca54c3Smrgconnected clients. 27717ca54c3Smrg 27817ca54c3Smrgnum_clients 27917ca54c3Smrg Number of currently connected clients. 28017ca54c3Smrgclients 28117ca54c3Smrg List of XID ranges allocated for the connected clients. 28217ca54c3Smrg 28317ca54c3Smrg┌─── 28417ca54c3Smrg XResQueryClientResources 28517ca54c3Smrg client: CLIENTXID 28617ca54c3Smrg ▶ 28717ca54c3Smrg num_types: CARD32 28817ca54c3Smrg types: LISTofCLIENTRESOURCETYPECOUNT 28917ca54c3Smrg 29017ca54c3Smrg Errors: Value 29117ca54c3Smrg└─── 29217ca54c3Smrg 29317ca54c3SmrgThis request can be used to ask the number of resources owned by a 29417ca54c3Smrgclient. The server will return the counts of each type of resource. 29517ca54c3Smrg 29617ca54c3Smrgclient 29717ca54c3Smrg An XID in the resource range of a client. This identifies the 29817ca54c3Smrg client and not some specific resource. 29917ca54c3Smrgnum_types 30017ca54c3Smrg Number of different resource types owned by the client. 30117ca54c3Smrgtypes 30217ca54c3Smrg A list of counts for each resource type. 30317ca54c3Smrg 30417ca54c3SmrgA value error is generated if invalid resource or client XID is given 30517ca54c3Smrgin the request. 30617ca54c3Smrg 30717ca54c3Smrg┌─── 30817ca54c3Smrg XResQueryClientPixmapBytes 30917ca54c3Smrg client: CLIENTXID 31017ca54c3Smrg ▶ 31117ca54c3Smrg bytes: CARD32 31217ca54c3Smrg bytes_overflow: CARD32 31317ca54c3Smrg 31417ca54c3Smrg Errors: Value 31517ca54c3Smrg└─── 31617ca54c3Smrg 31717ca54c3SmrgThis request is used to get the pixmap usage of some client. The 31817ca54c3Smrgreturned number is a sum of memory usage of each pixmap that can be 31917ca54c3Smrgattributed to the given client. Ideally the server goes through all 32017ca54c3Smrgpixmaps and divides each pixmap size by the pixmap reference count to 32117ca54c3Smrgget a pixmap reference size. The reference size is then added to the 32217ca54c3Smrgreturned sum if the client happens to be referencing that pixmap. In 32317ca54c3Smrgpractice some pixmap references may be missed, because it would be too 32417ca54c3Smrgdifficult to keep track of all pixmap references. However, the server 32517ca54c3Smrgwill check the most important client resources that are using pixmaps 32617ca54c3Smrgand tries to estimate the pixmap usage as well as is possible. In 32717ca54c3Smrgother words, the server need only make a best-effort attempt to 32817ca54c3Smrgcalculate resource source, so actual resource size may differ from 32917ca54c3Smrgthat reported in practice. 33017ca54c3Smrg 33117ca54c3Smrgclient 33217ca54c3Smrg Identifies a client by an ID in its resource ID range. 33317ca54c3Smrgbytes: 33417ca54c3Smrg Number of bytes attributed to pixmap references from the client 33517ca54c3Smrg resources. 33617ca54c3Smrgbytes_overflow: 33717ca54c3Smrg Higher order word for the bytes field in case the sum of pixmap 33817ca54c3Smrg reference sizes doesn't fit in CARD32. 33917ca54c3Smrg 34017ca54c3SmrgA value error is generated if invalid resource or client XID is given 34117ca54c3Smrgin the request. 34217ca54c3Smrg 34317ca54c3Smrg5.2 Requests in version 1.2 34417ca54c3Smrg 34517ca54c3Smrg┌─── 34617ca54c3Smrg XResQueryClientIds 34717ca54c3Smrg num_specs: CARD32 34817ca54c3Smrg client_specs: LISTofCLIENTIDSPEC 34917ca54c3Smrg ▶ 35017ca54c3Smrg num_ids: CARD32 35117ca54c3Smrg client_ids: LISTofCLIENTIDVALUE 35217ca54c3Smrg 35317ca54c3Smrg Errors: Value 35417ca54c3Smrg└─── 35517ca54c3Smrg 35617ca54c3SmrgXResQueryClientIds can be used to identify a given set of clients with 35717ca54c3Smrgsome identification method. The request sends a list of specifiers 35817ca54c3Smrgthat select clients and identification methods to server. The server 35917ca54c3Smrgthen tries to identify the chosen clients using the identification 36017ca54c3Smrgmethods specified for each client. The server returns IDs for those 36117ca54c3Smrgclients that were successfully identified. It's not an error condition 36217ca54c3Smrgif some identification method couldn't be applied to a client. If the 36317ca54c3Smrgserver is unable to identify some clients, they simply aren't included 36417ca54c3Smrgin the returned list. 36517ca54c3Smrg 36617ca54c3SmrgThe request supports wildcards in the client specifications so that in 36717ca54c3Smrgthe most general case all IDs of all clients can be queried with a 36817ca54c3Smrgsingle CLIENTIDSPEC. 36917ca54c3Smrg 37017ca54c3SmrgThe CLIENTIDSPEC of request and CLIENTIDSPEC of CLIENTIDVALUE in reply 37117ca54c3Smrgusually match each other. For example, if a request selected a client 37217ca54c3Smrgby a resource ID owned by the client, then the client is identified by 37317ca54c3Smrgthe same resource ID in the reply. This has been done so that it would 37417ca54c3Smrgbe easy to identify an owner of some resource. 37517ca54c3Smrg 37617ca54c3SmrgHowever, the CLIENTIDSPEC of returned CLIENTIDVALUE never contains any 37717ca54c3Smrgwildcards. If the request used a wildcard to specify all clients in a 37817ca54c3Smrgsingle CLIENTIDSPEC, then the reply has expanded the wildcard and 37917ca54c3Smrgreturns separate CLIENTIDVALUE records for each client. In this case 38017ca54c3Smrgwildcarded clients are identified by resource_base of CLIENTXIDRANGE. 38117ca54c3Smrg 38217ca54c3SmrgThe LocalClientPid type of IDs are included in the reply list only if 38317ca54c3Smrgthe client executing the request asked for it and was also a local 38417ca54c3Smrgclient itself. It doesn't make sense for remote clients to ask PIDs of 38517ca54c3Smrglocal clients. 38617ca54c3Smrg 38717ca54c3Smrgnum_specs 38817ca54c3Smrg Number of client ID specifications. 38917ca54c3Smrgclient_specs 39017ca54c3Smrg A list specifying identification methods for clients. Supports 39117ca54c3Smrg multiple identification methods and clients in a single 39217ca54c3Smrg specification. See CLIENTIDSPEC for details. 39317ca54c3Smrgnum_ids 39417ca54c3Smrg Number of IDs that were successfully determined. Can be different 39517ca54c3Smrg from num_specs or even zero if the server didn't support any 39617ca54c3Smrg identification methods for the given clients. 39717ca54c3Smrgclient_ids 39817ca54c3Smrg A list specifying ID information for successfully identified 39917ca54c3Smrg clients. If wildcards were used in a single CLIENTIDSPEC of 40017ca54c3Smrg client_specs, then multiple CLIENTIDVALUE records may be returned 40117ca54c3Smrg for that CLIENTIDSPEC. See CLIENTIDVALUE for details. 40217ca54c3Smrg 40317ca54c3SmrgA Value error is returned if the request specifies an invalid client 40417ca54c3SmrgXID or invalid identification method type. 40517ca54c3Smrg 40617ca54c3Smrg┌─── 40717ca54c3Smrg XResQueryResourceBytes 40817ca54c3Smrg client: CLIENTXID or None 40917ca54c3Smrg num_specs: CARD32 41017ca54c3Smrg resource_specs: LISTofRESOURCEIDSPEC 41117ca54c3Smrg ▶ 41217ca54c3Smrg num_sizes: CARD32 41317ca54c3Smrg sizes: LISTofRESOURCESIZEVALUE 41417ca54c3Smrg 41517ca54c3Smrg Errors: Atom, Value 41617ca54c3Smrg└─── 41717ca54c3Smrg 41817ca54c3SmrgXResQueryResourceBytes can be used to ask the sizes of resources from 41917ca54c3SmrgX server. The request sends a list of specifiers that selects 42017ca54c3Smrgresources for size calculation. The server tries to calculate the 42117ca54c3Smrgsizes of chosen resources and returns an estimate for a resource only 42217ca54c3Smrgif the size could be determined. It's not an error condition if a size 42317ca54c3Smrgcouldn't be calculated. In that case the resources simply aren't 42417ca54c3Smrgincluded in the returned list. 42517ca54c3Smrg 42617ca54c3SmrgThe request supports wildcards so that in the most general case sizes 42717ca54c3Smrgof all resources of all clients can be queried with a single 42817ca54c3SmrgRESOURCEIDSPEC. However, the reply has all wildcards expanded and 42917ca54c3Smrgreports a size of a single resource in each RESOURCESIZEVALUE. 43017ca54c3Smrg 43117ca54c3Smrgclient 43217ca54c3Smrg An ID of a client can be given to limit the query to resources of 43317ca54c3Smrg that client. Just like in CLIENTIDSPEC, any resource ID can be 43417ca54c3Smrg given to identify a client and None can be used if the query 43517ca54c3Smrg shouldn't be limited to a specific client. Note that in some cases 43617ca54c3Smrg this field is redundant because resource_specs already fully 43717ca54c3Smrg determines which resources are selected. If the client ID doesn't 43817ca54c3Smrg match the owner of any resource in resource_specs, no sizes are 43917ca54c3Smrg returned and no error is generated. 44017ca54c3Smrgnum_specs 44117ca54c3Smrg Number of resource specifications. 44217ca54c3Smrgresource_specs 44317ca54c3Smrg A list of resource specifications. Each specification can either 44417ca54c3Smrg uniquely identify a single resource or multiple resources if 44517ca54c3Smrg wildcarding is used. See RESOURCEIDSPEC for details. 44617ca54c3Smrgnum_sizes 44717ca54c3Smrg Number of resources whose size could be determined. Can be 44817ca54c3Smrg different from num_specs or even zero if the server didn't support 44917ca54c3Smrg size calculation for the given resources. 45017ca54c3Smrgsizes 45117ca54c3Smrg A list of resource sizes. Each resource size is linked to a unique 45217ca54c3Smrg resource. Wildcards are never used in the returned size 45317ca54c3Smrg records. For example, it's not possible to receive a single 45417ca54c3Smrg RESOURCESIZEVALUE that would specify the size of all pixmaps if 45517ca54c3Smrg the sizes of pixmap type resources were asked. Instead, a single 45617ca54c3Smrg RESOURCESIZEVALUE would be returned for each pixmap in that case. 45717ca54c3Smrg 45817ca54c3SmrgAn Atom error is returned if the request specifies an invalid resource 45917ca54c3Smrgtype. A Value error is returned if the request specifies an invalid 46017ca54c3SmrgXID for a client or a resource. 46117ca54c3Smrg 46217ca54c3Smrg ❧❧❧❧❧❧❧❧❧❧❧ 463