diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2018-10-01 16:58:30 +0300 |
---|---|---|
committer | Alexander Volkov <avolkov@astralinux.ru> | 2020-02-26 15:44:33 +0300 |
commit | 564d18c8e56cd6f271a928f1dc835b40e1f5a181 (patch) | |
tree | 287c1a265c9f228ce75cafa92bda5aed0be7217d /specs | |
parent | 032909626b4b4757a4ad10823b199157538a58e9 (diff) |
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 <a.volkov@rusbitech.ru>
Diffstat (limited to 'specs')
-rw-r--r-- | specs/xextproto/dpms.xml | 104 |
1 files changed, 100 insertions, 4 deletions
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 <emphasis remap='I'>server_major_version</emphasis> of one (1), and a <emphasis remap='I'>server_minor_version</emphasis> -of one (1). +of two (2). </para> <para> @@ -435,13 +435,81 @@ of DPMSModeOn, DPMSModeStandby, DPMSModeSuspend or DPMSModeOff, otherwise it is undefined. </para> +<para> +<olink targetdoc='dpmslib' targetptr='DPMSSelectInput'><function>DPMSSelectInput</function></olink> +</para> + +<informaltable frame="none"> + <?dbfo keep-together="always" ?> + <tgroup cols='1' align='left' colsep='0' rowsep='0'> + <colspec colname='c1' colwidth="1.0*"/> + <tbody> + <row> + <entry> +<emphasis remap='I'>event_mask</emphasis>: CARD32 + </entry> + </row> + <row> + <entry>=></entry> + </row> + </tbody> + </tgroup> +</informaltable> + +<para> +This request specifies whether DPMS extension events should be generated for this client. +If DPMSInfoNotifyMask is set in <emphasis remap='I'>event-mask</emphasis>, 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. +</para> + </chapter> -<chapter id="Events_and_Errors"> -<title>Events and Errors</title> +<chapter id="Events"> + +<title>Events</title> +<para> +The DPMS extension adds one event: +</para> <para> -No new events or errors are defined by this extension. +<function>DPMSInfoNotifyEvent</function> </para> + +<informaltable frame="none"> + <?dbfo keep-together="always" ?> + <tgroup cols='1' align='left' colsep='0' rowsep='0'> + <colspec colname='c1' colwidth="1.0*"/> + <tbody> + <row> + <entry> +<emphasis remap='I'>timestamp</emphasis>: TIMESTAMP + </entry> + </row> + <row> + <entry> +<emphasis remap='I'>power_level</emphasis>: CARD16 + </entry> + </row> + <row> + <entry> +<emphasis remap='I'>state</emphasis>: BOOL + </entry> + </row> + </tbody> + </tgroup> +</informaltable> + +<para> +This event is delivered to clients that have requested +DPMSInfoNotifyMask events using the <function>DPMSSelectInput</function> request +whenever the current DPMS on/off state or power level changes. +<emphasis remap='I'>state</emphasis> is one of DPMSEnabled or DPMSDisabled. +If <emphasis remap='I'>state</emphasis> is DPMSEnabled, +<emphasis remap='I'>power_level</emphasis> is one +of DPMSModeOn, DPMSModeStandby, DPMSModeSuspend or DPMSModeOff, otherwise +it is undefined. +</para> + </chapter> <chapter id="Encoding"> @@ -563,5 +631,33 @@ The name of this extension is "DPMS". 21 unused </literallayout> + +<literallayout class="monospaced"> +<olink targetdoc='dpmslib' targetptr='DPMSSelectInput'><function>DPMSSelectInput</function></olink> + 1 CARD8 opcode + 1 8 DPMS opcode + 2 2 request length + 4 event mask + 0 no events + 1 DPMSInfoNotifyMask +</literallayout> + +<literallayout class="monospaced"> +<olink targetdoc='dpmslib' targetptr='DPMSInfoNotifyEvent'><function>DPMSInfoNotifyEvent</function></olink> + 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 +</literallayout> </chapter> </book> |