Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
IN NO EVENT SHALL THE XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the name of the XFree86 Project
shall not be used in advertising or otherwise to promote the sale, use
or other dealings in this Software without prior written authorization
from the XFree86 Project.

XRes __libmansuffix__ __vendorversion__
NAME
XRes - X-Resource extension client library
SYNOPSIS
#include <X11/extensions/XRes.h>

typedef struct {
 XID resource_base;
 XID resource_mask;
} XResClient;

typedef struct {
 Atom resource_type;
 unsigned int count;
} XResType;

Bool XResQueryExtension(Display *dpy, int *event_base_return, int *error_base_return\^);

Status XResQueryVersion(Display *dpy, int *major_version_return, int *minor_version_return\^);

Status XResQueryClients(Display *dpy, int *num_clients, XResClient **clients\^);

Status XResQueryClientResources(Display *dpy, XID xid, int *num_types, XResType **types\^);

Status XResQueryClientPixmapBytes(Display *dpy, XID xid, unsigned long *bytes\^);

DESCRIPTION
X-Resource is an extension that allows a client to query the X server about its usage of various resources. It should not be confused with the X resource database access functions.

XResQueryExtension returns True if the XRes extension is available on the given display. A client must call XResQueryExtension before calling any other XRes function in order to negotiate a compatible protocol version; otherwise the client will get undefined behavior (XRes may or may not work).

XResQueryVersion returns True if the request succeeded; the values of the major and minor protocol versions supported by the server are returned in major_version_return and minor_version_return .

XResQueryClients fills a list of clients of the given display. For each client it returns in the XResClient structure a mask and a base value of the resources used by these clients. Returns True on success or False on failure.

XResQueryClientResources fills a list of XResType structures, indicating for each resource type allocated by the client its name (as an Atom) and the number of resources of this type allocated. Returns True on success or False on failure.

XResQueryClientPixmapBytes gives, for resources of type PIXMAP the total number of bytes allocated in the X server by the given client. Returns True on success or False on failure.

"ERRORS"
XResQueryClientResources and XResQueryClientPixmapBytes will return BadValue if passed an illegal client identifier.
"SEE ALSO"
X(__miscmansuffix__)
AUTHOR
Mark Vojkovich, originally for The XFree86 Project Inc.
STABILITY
This API is considered as experimental. The XRes library major revision may be incremented whenever incompatible changes are done to the API without notice. Use with care.