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