git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

protocol/upstream/wlr-output-power-management-unstable-v1.xml (5.5K)

  1 <!-- SPDX-License-Identifier: MIT -->
  2 <?xml version="1.0" encoding="UTF-8"?>
  3 <protocol name="wlr_output_power_management_unstable_v1">
  4   <copyright>
  5     Copyright © 2019 Purism SPC
  6 
  7     Permission is hereby granted, free of charge, to any person obtaining a
  8     copy of this software and associated documentation files (the "Software"),
  9     to deal in the Software without restriction, including without limitation
 10     the rights to use, copy, modify, merge, publish, distribute, sublicense,
 11     and/or sell copies of the Software, and to permit persons to whom the
 12     Software is furnished to do so, subject to the following conditions:
 13 
 14     The above copyright notice and this permission notice (including the next
 15     paragraph) shall be included in all copies or substantial portions of the
 16     Software.
 17 
 18     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 19     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 20     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 21     THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 22     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 23     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 24     DEALINGS IN THE SOFTWARE.
 25   </copyright>
 26 
 27   <description summary="Control power management modes of outputs">
 28     This protocol allows clients to control power management modes
 29     of outputs that are currently part of the compositor space. The
 30     intent is to allow special clients like desktop shells to power
 31     down outputs when the system is idle.
 32 
 33     To modify outputs not currently part of the compositor space see
 34     wlr-output-management.
 35 
 36     Warning! The protocol described in this file is experimental and
 37     backward incompatible changes may be made. Backward compatible changes
 38     may be added together with the corresponding interface version bump.
 39     Backward incompatible changes are done by bumping the version number in
 40     the protocol and interface names and resetting the interface version.
 41     Once the protocol is to be declared stable, the 'z' prefix and the
 42     version number in the protocol and interface names are removed and the
 43     interface version number is reset.
 44   </description>
 45 
 46   <interface name="zwlr_output_power_manager_v1" version="1">
 47     <description summary="manager to create per-output power management">
 48       This interface is a manager that allows creating per-output power
 49       management mode controls.
 50     </description>
 51 
 52     <request name="get_output_power">
 53       <description summary="get a power management for an output">
 54         Create an output power management mode control that can be used to
 55         adjust the power management mode for a given output.
 56       </description>
 57       <arg name="id" type="new_id" interface="zwlr_output_power_v1"/>
 58       <arg name="output" type="object" interface="wl_output"/>
 59     </request>
 60 
 61     <request name="destroy" type="destructor">
 62       <description summary="destroy the manager">
 63         All objects created by the manager will still remain valid, until their
 64         appropriate destroy request has been called.
 65       </description>
 66     </request>
 67   </interface>
 68 
 69   <interface name="zwlr_output_power_v1" version="1">
 70     <description summary="adjust power management mode for an output">
 71       This object offers requests to set the power management mode of
 72       an output.
 73     </description>
 74 
 75     <enum name="mode">
 76       <entry name="off" value="0"
 77              summary="Output is turned off."/>
 78       <entry name="on" value="1"
 79              summary="Output is turned on, no power saving"/>
 80     </enum>
 81 
 82     <enum name="error">
 83       <entry name="invalid_mode" value="1" summary="nonexistent power save mode"/>
 84     </enum>
 85 
 86     <request name="set_mode">
 87       <description summary="Set an outputs power save mode">
 88         Set an output's power save mode to the given mode. The mode change
 89         is effective immediately. If the output does not support the given
 90         mode a failed event is sent.
 91       </description>
 92       <arg name="mode" type="uint" enum="mode" summary="the power save mode to set"/>
 93     </request>
 94 
 95     <event name="mode">
 96       <description summary="Report a power management mode change">
 97         Report the power management mode change of an output.
 98 
 99         The mode event is sent after an output changed its power
100         management mode. The reason can be a client using set_mode or the
101         compositor deciding to change an output's mode.
102         This event is also sent immediately when the object is created
103         so the client is informed about the current power management mode.
104       </description>
105       <arg name="mode" type="uint" enum="mode"
106            summary="the output's new power management mode"/>
107     </event>
108 
109     <event name="failed">
110       <description summary="object no longer valid">
111         This event indicates that the output power management mode control
112         is no longer valid. This can happen for a number of reasons,
113         including:
114         - The output doesn't support power management
115         - Another client already has exclusive power management mode control
116           for this output
117         - The output disappeared
118 
119         Upon receiving this event, the client should destroy this object.
120       </description>
121     </event>
122 
123     <request name="destroy" type="destructor">
124       <description summary="destroy this power management">
125         Destroys the output power management mode control object.
126       </description>
127     </request>
128   </interface>
129 </protocol>