|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<protocol name="hyprland_surface_v1"> |
| 3 | + <copyright> |
| 4 | + Copyright © 2025 outfoxxed |
| 5 | + All rights reserved. |
| 6 | + |
| 7 | + Redistribution and use in source and binary forms, with or without |
| 8 | + modification, are permitted provided that the following conditions are met: |
| 9 | + |
| 10 | + 1. Redistributions of source code must retain the above copyright notice, this |
| 11 | + list of conditions and the following disclaimer. |
| 12 | + |
| 13 | + 2. Redistributions in binary form must reproduce the above copyright notice, |
| 14 | + this list of conditions and the following disclaimer in the documentation |
| 15 | + and/or other materials provided with the distribution. |
| 16 | + |
| 17 | + 3. Neither the name of the copyright holder nor the names of its |
| 18 | + contributors may be used to endorse or promote products derived from |
| 19 | + this software without specific prior written permission. |
| 20 | + |
| 21 | + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 22 | + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 23 | + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 24 | + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| 25 | + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 26 | + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 27 | + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 28 | + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 29 | + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 30 | + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 31 | + </copyright> |
| 32 | + |
| 33 | + <description summary="hyprland-specific wl_surface extensions"> |
| 34 | + This protocol exposes hyprland-specific wl_surface properties. |
| 35 | + </description> |
| 36 | + |
| 37 | + <interface name="hyprland_surface_manager_v1" version="1"> |
| 38 | + <description summary="manager for hyprland surface objects"> |
| 39 | + This interface allows a client to create hyprland surface objects. |
| 40 | + </description> |
| 41 | + |
| 42 | + <request name="get_hyprland_surface"> |
| 43 | + <description summary="create a hyprland surface object"> |
| 44 | + Create a hyprland surface object for the given wayland surface. |
| 45 | + |
| 46 | + If the wl_surface already has an associated hyprland_surface_v1 object, |
| 47 | + even from a different manager, creation is a protocol error. |
| 48 | + </description> |
| 49 | + |
| 50 | + <arg name="id" type="new_id" interface="hyprland_surface_v1"/> |
| 51 | + <arg name="surface" type="object" interface="wl_surface"/> |
| 52 | + </request> |
| 53 | + |
| 54 | + <request name="destroy" type="destructor"> |
| 55 | + <description summary="destroy the hyprland surface manager"> |
| 56 | + Destroy the surface manager. |
| 57 | + This does not destroy existing surface objects. |
| 58 | + </description> |
| 59 | + </request> |
| 60 | + |
| 61 | + <enum name="error"> |
| 62 | + <entry name="already_constructed" value="0" summary="wl_surface already has a hyprland surface object"/> |
| 63 | + </enum> |
| 64 | + </interface> |
| 65 | + |
| 66 | + <interface name="hyprland_surface_v1" version="1"> |
| 67 | + <description summary="hyprland-specific wl_surface properties"> |
| 68 | + This interface allows access to hyprland-specific properties of a wl_surface. |
| 69 | + |
| 70 | + Once the wl_surface has been destroyed, the hyprland surface object must be |
| 71 | + destroyed as well. All other operations are a protocol error. |
| 72 | + </description> |
| 73 | + |
| 74 | + <request name="set_opacity"> |
| 75 | + <description summary="set the overall opacity of the surface"> |
| 76 | + Sets a multiplier for the overall opacity of the surface. |
| 77 | + This multiplier applies to visual effects such as blur behind the surface |
| 78 | + in addition to the surface's content. |
| 79 | + |
| 80 | + The default value is 1.0. |
| 81 | + Setting a value outside of the range 0.0 - 1.0 (inclusive) is a protocol error. |
| 82 | + Does not take effect until wl_surface.commit is called. |
| 83 | + </description> |
| 84 | + |
| 85 | + <arg name="opacity" type="fixed"/> |
| 86 | + </request> |
| 87 | + |
| 88 | + <request name="destroy" type="destructor"> |
| 89 | + <description summary="destroy the hyprland surface interface"> |
| 90 | + Destroy the hyprland surface object, resetting properties provided |
| 91 | + by this interface to their default values on the next wl_surface.commit. |
| 92 | + </description> |
| 93 | + </request> |
| 94 | + |
| 95 | + <enum name="error"> |
| 96 | + <entry name="no_surface" value="0" summary="wl_surface was destroyed"/> |
| 97 | + <entry name="out_of_range" value="1" summary="given opacity was not in the range 0.0 - 1.0 (inclusive)"/> |
| 98 | + </enum> |
| 99 | + </interface> |
| 100 | +</protocol> |
0 commit comments