summaryrefslogtreecommitdiff
path: root/include/X11/extensions/XRes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/X11/extensions/XRes.h')
-rw-r--r--include/X11/extensions/XRes.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/include/X11/extensions/XRes.h b/include/X11/extensions/XRes.h
index ed4b2b8..b9759e3 100644
--- a/include/X11/extensions/XRes.h
+++ b/include/X11/extensions/XRes.h
@@ -7,6 +7,8 @@
#include <X11/Xfuncproto.h>
+/* v1.0 */
+
typedef struct {
XID resource_base;
XID resource_mask;
@@ -17,8 +19,33 @@ typedef struct {
unsigned int count;
} XResType;
+/* v1.2 */
+
+typedef enum {
+ XRES_CLIENT_ID_XID,
+ XRES_CLIENT_ID_PID,
+ XRES_CLIENT_ID_NR
+} XResClientIdType;
+
+typedef enum {
+ XRES_CLIENT_ID_XID_MASK = 1 << XRES_CLIENT_ID_XID,
+ XRES_CLIENT_ID_PID_MASK = 1 << XRES_CLIENT_ID_PID
+} XResClientIdMask;
+
+typedef struct {
+ XID client;
+ unsigned int mask;
+} XResClientIdSpec;
+
+typedef struct {
+ XResClientIdSpec spec;
+ long length;
+ void *value;
+} XResClientIdValue;
+
_XFUNCPROTOBEGIN
+/* v1.0 */
Bool XResQueryExtension (
Display *dpy,
@@ -51,6 +78,26 @@ Status XResQueryClientPixmapBytes (
unsigned long *bytes
);
+/* v1.2 */
+
+Status XResQueryClientIds (
+ Display *dpy,
+ long num_specs,
+ XResClientIdSpec *client_specs, /* in */
+ long *num_ids, /* out */
+ XResClientIdValue **client_ids /* out */
+);
+
+XResClientIdType XResGetClientIdType(XResClientIdValue* value);
+
+/* return -1 if no pid associated to the value */
+pid_t XResGetClientPid(XResClientIdValue* value);
+
+void XResClientIdsDestroy (
+ long num_ids,
+ XResClientIdValue *client_ids
+);
+
_XFUNCPROTOEND
#endif /* _XRES_H */