xenocara/lib/libXRes/man/XRes.man

138 lines
4.0 KiB
Groff
Raw Normal View History

2006-11-25 09:46:32 -07:00
.\"
.\" Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved.
2012-03-10 04:50:24 -07:00
.\"
2006-11-25 09:46:32 -07:00
.\" 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:
2012-03-10 04:50:24 -07:00
.\"
2006-11-25 09:46:32 -07:00
.\" The above copyright notice and this permission notice shall be
.\" included in all copies or substantial portions of the Software.
2012-03-10 04:50:24 -07:00
.\"
2006-11-25 09:46:32 -07:00
.\" 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.
2012-03-10 04:50:24 -07:00
.\"
2006-11-25 09:46:32 -07:00
.\" 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.
2012-03-10 04:50:24 -07:00
.\"
2009-10-31 11:40:00 -06:00
.TH XRes __libmansuffix__ __vendorversion__
2006-11-25 09:46:32 -07:00
.SH NAME
XRes \- X-Resource extension client library
.SH SYNOPSIS
.B #include <X11/extensions/XRes.h>
.PP
.nf
.ta .5i 2i
typedef struct {
XID resource_base;
XID resource_mask;
} XResClient;
typedef struct {
Atom resource_type;
unsigned int count;
} XResType;
.fi
.HP
2012-03-10 04:50:24 -07:00
Bool XResQueryExtension(Display *\fIdpy\fP,
2009-10-31 11:40:00 -06:00
int *\fIevent_base_return\fP, int *\fIerror_base_return\fP\^);
2006-11-25 09:46:32 -07:00
.HP
2009-10-31 11:40:00 -06:00
Status XResQueryVersion(Display *\fIdpy\fP, int *\fImajor_version_return\fP,
int *\fIminor_version_return\fP\^);
2006-11-25 09:46:32 -07:00
.HP
2012-03-10 04:50:24 -07:00
Status XResQueryClients(Display *\fIdpy\fP, int *\fInum_clients\fP,
2006-11-25 09:46:32 -07:00
XResClient **\fIclients\fP\^);
.HP
2012-03-10 04:50:24 -07:00
Status XResQueryClientResources(Display *\fIdpy\fP, XID \fIxid\fP,
2006-11-25 09:46:32 -07:00
int *\fInum_types\fP, XResType **\fItypes\fP\^);
.HP
2012-03-10 04:50:24 -07:00
Status XResQueryClientPixmapBytes(Display *\fIdpy\fP, XID \fIxid\fP,
2006-11-25 09:46:32 -07:00
unsigned long *\fIbytes\fP\^);
.PP
.SH DESCRIPTION
.B X-Resource
is an extension that allows a client to query the X
2009-10-31 11:40:00 -06:00
server about its usage of various resources. It should not be confused
2006-11-25 09:46:32 -07:00
with the X resource database access functions.
.PP
.B XResQueryExtension
returns
.B True
2012-03-10 04:50:24 -07:00
if the
2006-11-25 09:46:32 -07:00
.I XRes
extension is available on the given display.
2012-03-10 04:50:24 -07:00
A client must call
2006-11-25 09:46:32 -07:00
.B 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).
.PP
.B XResQueryVersion
returns
.B True
if the request succeeded; the values of the major and minor protocol
2012-03-10 04:50:24 -07:00
versions supported by the server are returned in
2009-10-31 11:40:00 -06:00
.I major_version_return
2012-03-10 04:50:24 -07:00
and
2009-10-31 11:40:00 -06:00
.I minor_version_return .
2006-11-25 09:46:32 -07:00
.PP
.PP
2012-03-10 04:50:24 -07:00
.B XResQueryClients
2006-11-25 09:46:32 -07:00
fills a list of clients of the given display. For each client it
2012-03-10 04:50:24 -07:00
returns in the
2006-11-25 09:46:32 -07:00
.I XResClient
structure a mask and a base value of the resources used by these
2012-03-10 04:50:24 -07:00
clients.
Returns
2006-11-25 09:46:32 -07:00
.B True
2012-03-10 04:50:24 -07:00
on success or
2006-11-25 09:46:32 -07:00
.B False
2012-03-10 04:50:24 -07:00
on failure.
2006-11-25 09:46:32 -07:00
.PP
.B XResQueryClientResources
2012-03-10 04:50:24 -07:00
fills a list of
2006-11-25 09:46:32 -07:00
XResType
structures, indicating for each resource type allocated by the client its
2012-03-10 04:50:24 -07:00
name (as an Atom) and the number of resources of this type allocated.
Returns
2006-11-25 09:46:32 -07:00
.B True
2012-03-10 04:50:24 -07:00
on success or
2006-11-25 09:46:32 -07:00
.B False
2012-03-10 04:50:24 -07:00
on failure.
2006-11-25 09:46:32 -07:00
.PP
2009-10-31 11:40:00 -06:00
.B XResQueryClientPixmapBytes
2012-03-10 04:50:24 -07:00
gives, for resources of type
2006-11-25 09:46:32 -07:00
.I PIXMAP
the total number of bytes allocated in the X server by the given
2012-03-10 04:50:24 -07:00
client.
Returns
2006-11-25 09:46:32 -07:00
.B True
2012-03-10 04:50:24 -07:00
on success or
2006-11-25 09:46:32 -07:00
.B False
2012-03-10 04:50:24 -07:00
on failure.
2006-11-25 09:46:32 -07:00
.SH "ERRORS"
.B XResQueryClientResources
and
.B XResQueryClientPixmapBytes
2012-03-10 04:50:24 -07:00
will return
2006-11-25 09:46:32 -07:00
.I BadValue
2012-03-10 04:50:24 -07:00
if passed an illegal client identifier.
2006-11-25 09:46:32 -07:00
.SH "SEE ALSO"
X(__miscmansuffix__)
.SH AUTHOR
2012-03-10 04:50:24 -07:00
Mark Vojkovich, originally for The XFree86 Project Inc.
2006-11-25 09:46:32 -07:00
.SH STABILITY
This API is considered as experimental. The XRes library major
revision may be incremented whenever incompatible changes are done to
2012-03-10 04:50:24 -07:00
the API without notice. Use with care.