summaryrefslogtreecommitdiff
path: root/include/X11/extensions
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2018-02-05 12:39:10 -0800
committerAdam Jackson <ajax@redhat.com>2018-02-12 13:54:13 -0500
commit14f68c7b006dbc11fa2134ccd48a107f97fd8f2a (patch)
treea7dd10448c8dc8c953a8739c52883e4290272dc1 /include/X11/extensions
parent0da777811bd6b03344b371e39bf897ff4bd6f399 (diff)
randr: Add Leases. [v4]
A "lease" is a set of crtc and output resources granted to another application for use outside of X. These will not be usable through the X protocol until the lease terminates. Leased outputs will be seen as disconnected, leased CRTCs will be seen as not usable with any output. v2: Delete output grabs Add LeaseNotify events Add FreeLease with option to terminate v3: Clarify a couple of lease behaviors: * You can lease an in-use object, it makes the X server stop using it, you don't get an error back. * There's no explicit 'Disabled' state for a crtc, when a crtc is disabled, it just has a set of reported values for GetCrtcInfo. v4: Integrate into merged xorgproto repo Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'include/X11/extensions')
-rw-r--r--include/X11/extensions/randr.h15
-rw-r--r--include/X11/extensions/randrproto.h57
2 files changed, 69 insertions, 3 deletions
diff --git a/include/X11/extensions/randr.h b/include/X11/extensions/randr.h
index 6fcda87..e53cd56 100644
--- a/include/X11/extensions/randr.h
+++ b/include/X11/extensions/randr.h
@@ -40,11 +40,11 @@ typedef unsigned long XRandrModeFlags;
#define RANDR_NAME "RANDR"
#define RANDR_MAJOR 1
-#define RANDR_MINOR 5
+#define RANDR_MINOR 6
-#define RRNumberErrors 4
+#define RRNumberErrors 5
#define RRNumberEvents 2
-#define RRNumberRequests 45
+#define RRNumberRequests 47
#define X_RRQueryVersion 0
/* we skip 1 to make old clients fail pretty immediately */
@@ -109,6 +109,10 @@ typedef unsigned long XRandrModeFlags;
#define X_RRSetMonitor 43
#define X_RRDeleteMonitor 44
+/* v1.6 */
+#define X_RRCreateLease 45
+#define X_RRFreeLease 46
+
/* Event selection bits */
#define RRScreenChangeNotifyMask (1L << 0)
/* V1.2 additions */
@@ -119,6 +123,8 @@ typedef unsigned long XRandrModeFlags;
#define RRProviderChangeNotifyMask (1L << 4)
#define RRProviderPropertyNotifyMask (1L << 5)
#define RRResourceChangeNotifyMask (1L << 6)
+/* V1.6 additions */
+#define RRLeaseNotifyMask (1L << 7)
/* Event codes */
#define RRScreenChangeNotify 0
@@ -131,6 +137,8 @@ typedef unsigned long XRandrModeFlags;
#define RRNotify_ProviderChange 3
#define RRNotify_ProviderProperty 4
#define RRNotify_ResourceChange 5
+/* V1.6 additions */
+#define RRNotify_Lease 6
/* used in the rotation field; rotation and reflection in 0.1 proto. */
#define RR_Rotate_0 1
#define RR_Rotate_90 2
@@ -172,6 +180,7 @@ typedef unsigned long XRandrModeFlags;
#define BadRRCrtc 1
#define BadRRMode 2
#define BadRRProvider 3
+#define BadRRLease 4
/* Conventional RandR output properties */
diff --git a/include/X11/extensions/randrproto.h b/include/X11/extensions/randrproto.h
index 48be7aa..712c8b5 100644
--- a/include/X11/extensions/randrproto.h
+++ b/include/X11/extensions/randrproto.h
@@ -50,6 +50,7 @@
#define RRCrtc CARD32
#define RRProvider CARD32
#define RRModeFlags CARD32
+#define RRLease CARD32
#define Rotation CARD16
#define SizeID CARD16
@@ -836,6 +837,46 @@ typedef struct {
#define sz_xRRGetProviderPropertyReply 32
/*
+ * Additions for V1.6
+ */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ Window window B32;
+ RRLease lid B32;
+ CARD16 nCrtcs B16;
+ CARD16 nOutputs B16;
+} xRRCreateLeaseReq;
+#define sz_xRRCreateLeaseReq 16
+
+typedef struct {
+ BYTE type;
+ CARD8 nfd;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+ CARD32 pad7 B32;
+} xRRCreateLeaseReply;
+#define sz_xRRCreateLeaseReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 randrReqType;
+ CARD16 length B16;
+ RRLease lid B32;
+ BYTE terminate;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xRRFreeLeaseReq;
+#define sz_xRRFreeLeaseReq 12
+
+/*
* event
*/
typedef struct {
@@ -949,6 +990,22 @@ typedef struct {
#define sz_xRRResourceChangeNotifyEvent 32
typedef struct {
+ CARD8 type; /* always evBase + RRNotify */
+ CARD8 subCode; /* RRNotify_Lease */
+ CARD16 sequenceNumber B16;
+ Time timestamp B32; /* time resource was changed */
+ Window window B32; /* window requesting notification */
+ RRLease lease B32;
+ CARD8 created; /* created/deleted */
+ CARD8 pad0;
+ CARD16 pad1 B16;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+} xRRLeaseNotifyEvent;
+#define sz_xRRLeaseNotifyEvent 32
+
+typedef struct {
CARD8 reqType;
CARD8 randrReqType;
CARD16 length B16;