[xserver,v2] dpms: Add support for DPMSInfoNotify event

Submitted by Alexander Volkov on Oct. 2, 2018, 5:05 p.m.

Details

Message ID 81998486-548a-eb6d-7baf-f025f9cd947c@astralinux.ru
State New
Headers show
Series "Add DPMSInfoNotify event" ( rev: 9 ) in X.org

Not browsing as part of any series.

Commit Message

Alexander Volkov Oct. 2, 2018, 5:05 p.m.
Patch for xcb-proto and a test program are applied.
The test program can be compiled by gcc -o dpmsnotify dpmsnotify.c -lxcb 
-lxcb-dpms

Patch hide | download patch | download mbox

From 00f7947121181fc98cb09e4b86e14bd4738958d0 Mon Sep 17 00:00:00 2001
From: Alexander Volkov <a.volkov@rusbitech.ru>
Date: Mon, 1 Oct 2018 19:41:18 +0300
Subject: [PATCH] dpms: Add DPMSInfoNotify event

See the description in xorgproto repository.

Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
---
 src/dpms.xml | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/src/dpms.xml b/src/dpms.xml
index 5581284..814a14e 100644
--- a/src/dpms.xml
+++ b/src/dpms.xml
@@ -26,7 +26,8 @@  sale, use or other dealings in this Software without prior written
 authorization from the authors.
 -->
 <xcb header="dpms" extension-xname="DPMS" extension-name="DPMS"
-    major-version="0" minor-version="0">
+    major-version="1" minor-version="2">
+  <import>xproto</import>
   <request name="GetVersion" opcode="0">
     <field type="CARD16" name="client_major_version" />
     <field type="CARD16" name="client_minor_version" />
@@ -84,4 +85,20 @@  authorization from the authors.
       <pad bytes="21" />
     </reply>
   </request>
+
+  <enum name="EventMask" >
+    <item name="InfoNotify"> <bit>0</bit> </item>
+  </enum>
+
+  <request name="SelectInput" opcode="8">
+    <field type="CARD32" name="event_mask" mask="EventMask"/>
+  </request>
+
+  <event name="InfoNotify" number="0" xge="true">
+    <pad bytes="2" />
+    <field type="TIMESTAMP" name="timestamp"/>
+    <field type="CARD16" name="power_level" enum="DPMSMode" />
+    <field type="BOOL" name="state" />
+    <pad bytes="21"/>
+  </event>
 </xcb>
-- 
2.17.0