117ca54c3Smrg/* 217ca54c3Smrg Copyright (c) 2002 XFree86 Inc 317ca54c3Smrg*/ 417ca54c3Smrg 517ca54c3Smrg#ifndef _XRESPROTO_H 617ca54c3Smrg#define _XRESPROTO_H 717ca54c3Smrg 817ca54c3Smrg#define XRES_MAJOR_VERSION 1 917ca54c3Smrg#define XRES_MINOR_VERSION 2 1017ca54c3Smrg 1117ca54c3Smrg#define XRES_NAME "X-Resource" 1217ca54c3Smrg 1317ca54c3Smrg/* v1.0 */ 1417ca54c3Smrg#define X_XResQueryVersion 0 1517ca54c3Smrg#define X_XResQueryClients 1 1617ca54c3Smrg#define X_XResQueryClientResources 2 1717ca54c3Smrg#define X_XResQueryClientPixmapBytes 3 1817ca54c3Smrg 1917ca54c3Smrg/* Version 1.1 has been accidentally released from the version */ 2017ca54c3Smrg/* control and while it doesn't have differences to version 1.0, the */ 2117ca54c3Smrg/* next version is labeled 1.2 in order to remove the risk of confusion. */ 2217ca54c3Smrg 2317ca54c3Smrg/* v1.2 */ 2417ca54c3Smrg#define X_XResQueryClientIds 4 2517ca54c3Smrg#define X_XResQueryResourceBytes 5 2617ca54c3Smrg 2717ca54c3Smrgtypedef struct { 2817ca54c3Smrg CARD32 resource_base; 2917ca54c3Smrg CARD32 resource_mask; 3017ca54c3Smrg} xXResClient; 3117ca54c3Smrg#define sz_xXResClient 8 3217ca54c3Smrg 3317ca54c3Smrgtypedef struct { 3417ca54c3Smrg CARD32 resource_type; 3517ca54c3Smrg CARD32 count; 3617ca54c3Smrg} xXResType; 3717ca54c3Smrg#define sz_xXResType 8 3817ca54c3Smrg 3917ca54c3Smrg/* XResQueryVersion */ 4017ca54c3Smrg 4117ca54c3Smrgtypedef struct _XResQueryVersion { 4217ca54c3Smrg CARD8 reqType; 43ea1d6981Smrg CARD8 XResReqType; 44ea1d6981Smrg CARD16 length; 4517ca54c3Smrg CARD8 client_major; 4617ca54c3Smrg CARD8 client_minor; 47ea1d6981Smrg CARD16 unused; 4817ca54c3Smrg} xXResQueryVersionReq; 4917ca54c3Smrg#define sz_xXResQueryVersionReq 8 5017ca54c3Smrg 5117ca54c3Smrgtypedef struct { 5217ca54c3Smrg CARD8 type; 5317ca54c3Smrg CARD8 pad1; 54ea1d6981Smrg CARD16 sequenceNumber; 55ea1d6981Smrg CARD32 length; 56ea1d6981Smrg CARD16 server_major; 57ea1d6981Smrg CARD16 server_minor; 58ea1d6981Smrg CARD32 pad2; 59ea1d6981Smrg CARD32 pad3; 60ea1d6981Smrg CARD32 pad4; 61ea1d6981Smrg CARD32 pad5; 62ea1d6981Smrg CARD32 pad6; 6317ca54c3Smrg} xXResQueryVersionReply; 6417ca54c3Smrg#define sz_xXResQueryVersionReply 32 6517ca54c3Smrg 6617ca54c3Smrg/* XResQueryClients */ 6717ca54c3Smrg 6817ca54c3Smrgtypedef struct _XResQueryClients { 6917ca54c3Smrg CARD8 reqType; 70ea1d6981Smrg CARD8 XResReqType; 71ea1d6981Smrg CARD16 length; 7217ca54c3Smrg} xXResQueryClientsReq; 7317ca54c3Smrg#define sz_xXResQueryClientsReq 4 7417ca54c3Smrg 7517ca54c3Smrgtypedef struct { 7617ca54c3Smrg CARD8 type; 77ea1d6981Smrg CARD8 pad1; 78ea1d6981Smrg CARD16 sequenceNumber; 79ea1d6981Smrg CARD32 length; 80ea1d6981Smrg CARD32 num_clients; 81ea1d6981Smrg CARD32 pad2; 82ea1d6981Smrg CARD32 pad3; 83ea1d6981Smrg CARD32 pad4; 84ea1d6981Smrg CARD32 pad5; 85ea1d6981Smrg CARD32 pad6; 8617ca54c3Smrg} xXResQueryClientsReply; 8717ca54c3Smrg#define sz_xXResQueryClientsReply 32 8817ca54c3Smrg 8917ca54c3Smrg/* XResQueryClientResources */ 9017ca54c3Smrg 9117ca54c3Smrgtypedef struct _XResQueryClientResources { 9217ca54c3Smrg CARD8 reqType; 9317ca54c3Smrg CARD8 XResReqType; 94ea1d6981Smrg CARD16 length; 95ea1d6981Smrg CARD32 xid; 9617ca54c3Smrg} xXResQueryClientResourcesReq; 9717ca54c3Smrg#define sz_xXResQueryClientResourcesReq 8 9817ca54c3Smrg 9917ca54c3Smrgtypedef struct { 10017ca54c3Smrg CARD8 type; 101ea1d6981Smrg CARD8 pad1; 102ea1d6981Smrg CARD16 sequenceNumber; 103ea1d6981Smrg CARD32 length; 104ea1d6981Smrg CARD32 num_types; 105ea1d6981Smrg CARD32 pad2; 106ea1d6981Smrg CARD32 pad3; 107ea1d6981Smrg CARD32 pad4; 108ea1d6981Smrg CARD32 pad5; 109ea1d6981Smrg CARD32 pad6; 11017ca54c3Smrg} xXResQueryClientResourcesReply; 11117ca54c3Smrg#define sz_xXResQueryClientResourcesReply 32 11217ca54c3Smrg 11317ca54c3Smrg/* XResQueryClientPixmapBytes */ 11417ca54c3Smrg 11517ca54c3Smrgtypedef struct _XResQueryClientPixmapBytes { 11617ca54c3Smrg CARD8 reqType; 11717ca54c3Smrg CARD8 XResReqType; 118ea1d6981Smrg CARD16 length; 119ea1d6981Smrg CARD32 xid; 12017ca54c3Smrg} xXResQueryClientPixmapBytesReq; 12117ca54c3Smrg#define sz_xXResQueryClientPixmapBytesReq 8 12217ca54c3Smrg 12317ca54c3Smrgtypedef struct { 12417ca54c3Smrg CARD8 type; 12517ca54c3Smrg CARD8 pad1; 126ea1d6981Smrg CARD16 sequenceNumber; 127ea1d6981Smrg CARD32 length; 128ea1d6981Smrg CARD32 bytes; 129ea1d6981Smrg CARD32 bytes_overflow; 130ea1d6981Smrg CARD32 pad2; 131ea1d6981Smrg CARD32 pad3; 132ea1d6981Smrg CARD32 pad4; 133ea1d6981Smrg CARD32 pad5; 13417ca54c3Smrg} xXResQueryClientPixmapBytesReply; 13517ca54c3Smrg#define sz_xXResQueryClientPixmapBytesReply 32 13617ca54c3Smrg 13717ca54c3Smrg/* v1.2 XResQueryClientIds */ 13817ca54c3Smrg 13917ca54c3Smrg#define X_XResClientXIDMask 0x01 14017ca54c3Smrg#define X_XResLocalClientPIDMask 0x02 14117ca54c3Smrg 14217ca54c3Smrgtypedef struct _XResClientIdSpec { 143ea1d6981Smrg CARD32 client; 144ea1d6981Smrg CARD32 mask; 14517ca54c3Smrg} xXResClientIdSpec; 14617ca54c3Smrg#define sz_xXResClientIdSpec 8 14717ca54c3Smrg 14817ca54c3Smrgtypedef struct _XResClientIdValue { 14917ca54c3Smrg xXResClientIdSpec spec; 150ea1d6981Smrg CARD32 length; 15117ca54c3Smrg // followed by length CARD32s 15217ca54c3Smrg} xXResClientIdValue; 15317ca54c3Smrg#define sz_xResClientIdValue (sz_xXResClientIdSpec + 4) 15417ca54c3Smrg 15517ca54c3Smrgtypedef struct _XResQueryClientIds { 15617ca54c3Smrg CARD8 reqType; 15717ca54c3Smrg CARD8 XResReqType; 158ea1d6981Smrg CARD16 length; 159ea1d6981Smrg CARD32 numSpecs; 16017ca54c3Smrg // followed by numSpecs times XResClientIdSpec 16117ca54c3Smrg} xXResQueryClientIdsReq; 16217ca54c3Smrg#define sz_xXResQueryClientIdsReq 8 16317ca54c3Smrg 16417ca54c3Smrgtypedef struct { 16517ca54c3Smrg CARD8 type; 16617ca54c3Smrg CARD8 pad1; 167ea1d6981Smrg CARD16 sequenceNumber; 168ea1d6981Smrg CARD32 length; 169ea1d6981Smrg CARD32 numIds; 170ea1d6981Smrg CARD32 pad2; 171ea1d6981Smrg CARD32 pad3; 172ea1d6981Smrg CARD32 pad4; 173ea1d6981Smrg CARD32 pad5; 174ea1d6981Smrg CARD32 pad6; 17517ca54c3Smrg // followed by numIds times XResClientIdValue 17617ca54c3Smrg} xXResQueryClientIdsReply; 17717ca54c3Smrg#define sz_xXResQueryClientIdsReply 32 17817ca54c3Smrg 17917ca54c3Smrg/* v1.2 XResQueryResourceBytes */ 18017ca54c3Smrg 18117ca54c3Smrgtypedef struct _XResResourceIdSpec { 18217ca54c3Smrg CARD32 resource; 18317ca54c3Smrg CARD32 type; 18417ca54c3Smrg} xXResResourceIdSpec; 18517ca54c3Smrg#define sz_xXResResourceIdSpec 8 18617ca54c3Smrg 18717ca54c3Smrgtypedef struct _XResQueryResourceBytes { 18817ca54c3Smrg CARD8 reqType; 18917ca54c3Smrg CARD8 XResReqType; 190ea1d6981Smrg CARD16 length; 191ea1d6981Smrg CARD32 client; 192ea1d6981Smrg CARD32 numSpecs; 19317ca54c3Smrg // followed by numSpecs times XResResourceIdSpec 19417ca54c3Smrg} xXResQueryResourceBytesReq; 19517ca54c3Smrg#define sz_xXResQueryResourceBytesReq 12 19617ca54c3Smrg 19717ca54c3Smrgtypedef struct _XResResourceSizeSpec { 19817ca54c3Smrg xXResResourceIdSpec spec; 199ea1d6981Smrg CARD32 bytes; 200ea1d6981Smrg CARD32 refCount; 201ea1d6981Smrg CARD32 useCount; 20217ca54c3Smrg} xXResResourceSizeSpec; 20317ca54c3Smrg#define sz_xXResResourceSizeSpec (sz_xXResResourceIdSpec + 12) 20417ca54c3Smrg 20517ca54c3Smrgtypedef struct _XResResourceSizeValue { 20617ca54c3Smrg xXResResourceSizeSpec size; 207ea1d6981Smrg CARD32 numCrossReferences; 20817ca54c3Smrg // followed by numCrossReferences times XResResourceSizeSpec 20917ca54c3Smrg} xXResResourceSizeValue; 21017ca54c3Smrg#define sz_xXResResourceSizeValue (sz_xXResResourceSizeSpec + 4) 21117ca54c3Smrg 21217ca54c3Smrgtypedef struct { 21317ca54c3Smrg CARD8 type; 21417ca54c3Smrg CARD8 pad1; 215ea1d6981Smrg CARD16 sequenceNumber; 216ea1d6981Smrg CARD32 length; 217ea1d6981Smrg CARD32 numSizes; 218ea1d6981Smrg CARD32 pad2; 219ea1d6981Smrg CARD32 pad3; 220ea1d6981Smrg CARD32 pad4; 221ea1d6981Smrg CARD32 pad5; 222ea1d6981Smrg CARD32 pad6; 22317ca54c3Smrg // followed by numSizes times XResResourceSizeValue 22417ca54c3Smrg} xXResQueryResourceBytesReply; 22517ca54c3Smrg#define sz_xXResQueryResourceBytesReply 32 22617ca54c3Smrg 22717ca54c3Smrg#endif /* _XRESPROTO_H */ 228