From 564d18c8e56cd6f271a928f1dc835b40e1f5a181 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Mon, 1 Oct 2018 16:58:30 +0300 Subject: Add DPMSInfoNotify event This will allow applications to respond to changes of power level of a monitor, e.g. an application may stop rendering and related calculations when the monitor is off. Bump DPMS version to 1.2, install dpmsproto.pc. Signed-off-by: Alexander Volkov --- specs/xextproto/dpms.xml | 104 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 100 insertions(+), 4 deletions(-) (limited to 'specs') diff --git a/specs/xextproto/dpms.xml b/specs/xextproto/dpms.xml index f504ab7..823344d 100644 --- a/specs/xextproto/dpms.xml +++ b/specs/xextproto/dpms.xml @@ -175,7 +175,7 @@ increment for small, upward-compatible changes. Servers that support the protocol defined in this document will return a server_major_version of one (1), and a server_minor_version -of one (1). +of two (2). @@ -435,13 +435,81 @@ of DPMSModeOn, DPMSModeStandby, DPMSModeSuspend or DPMSModeOff, otherwise it is undefined. + +DPMSSelectInput + + + + + + + + + +event_mask: CARD32 + + + + => + + + + + + +This request specifies whether DPMS extension events should be generated for this client. +If DPMSInfoNotifyMask is set in event-mask, then DPMSInfoNotifyEvent +events will be generated whenever the current DPMS on/off state or power level changes. +If no bits are set, then no events will be generated. + + - -Events and Errors + + +Events + +The DPMS extension adds one event: + -No new events or errors are defined by this extension. +DPMSInfoNotifyEvent + + + + + + + + +timestamp: TIMESTAMP + + + + +power_level: CARD16 + + + + +state: BOOL + + + + + + + +This event is delivered to clients that have requested +DPMSInfoNotifyMask events using the DPMSSelectInput request +whenever the current DPMS on/off state or power level changes. +state is one of DPMSEnabled or DPMSDisabled. +If state is DPMSEnabled, +power_level is one +of DPMSModeOn, DPMSModeStandby, DPMSModeSuspend or DPMSModeOff, otherwise +it is undefined. + + @@ -563,5 +631,33 @@ The name of this extension is "DPMS". 21 unused + + +DPMSSelectInput + 1 CARD8 opcode + 1 8 DPMS opcode + 2 2 request length + 4 event mask + 0 no events + 1 DPMSInfoNotifyMask + + + +DPMSInfoNotifyEvent + 1 GenericEvent type + 1 CARD8 DPMS extension offset + 2 CARD16 sequence number + 4 0 length + 2 DPMSInfoNotify evtype + 2 unused + 4 TIMESTAMP timestamp + 2 power_level + 0 DPMSModeOn + 1 DPMSModeStandby + 2 DPMSModeSuspend + 3 DPMSModeOff + 1 BOOL state + 13 unused + -- cgit v1.2.3