|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<protocol name="hyprpaper_core" version="1"> |
| 3 | + <copyright> |
| 4 | + BSD 3-Clause License |
| 5 | + |
| 6 | + Copyright (c) 2025, Hypr Development |
| 7 | + |
| 8 | + Redistribution and use in source and binary forms, with or without |
| 9 | + modification, are permitted provided that the following conditions are met: |
| 10 | + |
| 11 | + 1. Redistributions of source code must retain the above copyright notice, this |
| 12 | + list of conditions and the following disclaimer. |
| 13 | + |
| 14 | + 2. Redistributions in binary form must reproduce the above copyright notice, |
| 15 | + this list of conditions and the following disclaimer in the documentation |
| 16 | + and/or other materials provided with the distribution. |
| 17 | + |
| 18 | + 3. Neither the name of the copyright holder nor the names of its |
| 19 | + contributors may be used to endorse or promote products derived from |
| 20 | + this software without specific prior written permission. |
| 21 | + |
| 22 | + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 23 | + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 24 | + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 25 | + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| 26 | + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 27 | + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 28 | + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 29 | + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 30 | + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 31 | + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 32 | + </copyright> |
| 33 | + |
| 34 | + <object name="hyprpaper_core_manager" version="1"> |
| 35 | + <description summary="manager object"> |
| 36 | + This is the core manager object for hyprpaper operations |
| 37 | + </description> |
| 38 | + |
| 39 | + <c2s name="get_wallpaper_object"> |
| 40 | + <description summary="Get a wallpaper object"> |
| 41 | + Creates a wallpaper object |
| 42 | + </description> |
| 43 | + <returns iface="hyprpaper_wallpaper"/> |
| 44 | + </c2s> |
| 45 | + |
| 46 | + <s2c name="add_monitor"> |
| 47 | + <description summary="New monitor added"> |
| 48 | + Emitted when a new monitor is added. |
| 49 | + </description> |
| 50 | + <arg name="monitor_name" type="varchar" summary="the monitor's name"/> |
| 51 | + </s2c> |
| 52 | + |
| 53 | + <s2c name="remove_monitor"> |
| 54 | + <description summary="A monitor was removed"> |
| 55 | + Emitted when a monitor is removed. |
| 56 | + </description> |
| 57 | + <arg name="monitor_name" type="varchar" summary="the monitor's name"/> |
| 58 | + </s2c> |
| 59 | + |
| 60 | + <c2s name="destroy" destructor="true"> |
| 61 | + <description summary="Destroy this object"> |
| 62 | + Destroys this object. Children remain alive until destroyed. |
| 63 | + </description> |
| 64 | + </c2s> |
| 65 | + </object> |
| 66 | + |
| 67 | + <enum name="wallpaper_fit_mode"> |
| 68 | + <value idx="0" name="stretch"/> |
| 69 | + <value idx="1" name="cover"/> |
| 70 | + <value idx="2" name="contain"/> |
| 71 | + <value idx="3" name="tile"/> |
| 72 | + </enum> |
| 73 | + |
| 74 | + <enum name="wallpaper_errors"> |
| 75 | + <value idx="0" name="inert_wallpaper_object" description="attempted to use an inert wallpaper object"/> |
| 76 | + </enum> |
| 77 | + |
| 78 | + <enum name="applying_error"> |
| 79 | + <value idx="0" name="invalid_path" description="path provided was invalid"/> |
| 80 | + <value idx="1" name="invalid_monitor" description="monitor provided was invalid"/> |
| 81 | + <value idx="2" name="unknown_error" description="unknown error"/> |
| 82 | + </enum> |
| 83 | + |
| 84 | + <object name="hyprpaper_wallpaper" version="1"> |
| 85 | + <description summary="wallpaper object"> |
| 86 | + This is an object describing a wallpaper |
| 87 | + </description> |
| 88 | + |
| 89 | + <c2s name="path"> |
| 90 | + <description summary="Set a path"> |
| 91 | + Set a file path for the wallpaper. This has to be an absolute path from the fs root. |
| 92 | + This is required. |
| 93 | + </description> |
| 94 | + <arg name="wallpaper" type="varchar" summary="path"/> |
| 95 | + </c2s> |
| 96 | + |
| 97 | + <c2s name="fit_mode"> |
| 98 | + <description summary="Set a fit mode"> |
| 99 | + Set a fit mode for the wallpaper. This is set to cover by default. |
| 100 | + </description> |
| 101 | + <arg name="fit_mode" type="enum" interface="wallpaper_fit_mode" summary="path"/> |
| 102 | + </c2s> |
| 103 | + |
| 104 | + <c2s name="monitor_name"> |
| 105 | + <description summary="Set the monitor name"> |
| 106 | + Set a monitor for the wallpaper. Setting this to empty (or not setting at all) will |
| 107 | + treat this as a wildcard fallback. |
| 108 | + |
| 109 | + See hyprpaper_core_manager.add_monitor and hyprpaper_core_manager.remove_monitor |
| 110 | + for tracking monitor names. |
| 111 | + </description> |
| 112 | + <arg name="monitor_name" type="varchar" summary="monitor name"/> |
| 113 | + </c2s> |
| 114 | + |
| 115 | + <c2s name="apply"> |
| 116 | + <description summary="Apply this wallpaper"> |
| 117 | + Applies this object's state to the wallpaper state. Will emit .success on success, |
| 118 | + and .failed on failure. |
| 119 | + |
| 120 | + This object becomes inert after .succeess or .failed, the only valid operation |
| 121 | + is to destroy it afterwards. |
| 122 | + </description> |
| 123 | + </c2s> |
| 124 | + |
| 125 | + <s2c name="success"> |
| 126 | + <description summary="Operation succeeded"> |
| 127 | + Wallpaper was applied successfully. |
| 128 | + </description> |
| 129 | + </s2c> |
| 130 | + |
| 131 | + <s2c name="failed"> |
| 132 | + <description summary="Operation failed"> |
| 133 | + Wallpaper was not applied. See the error field for more information. |
| 134 | + </description> |
| 135 | + <arg name="error" type="enum" interface="hyprpaper_wallpaper_application_error" summary="path"/> |
| 136 | + </s2c> |
| 137 | + |
| 138 | + <c2s name="destroy" destructor="true"> |
| 139 | + <description summary="Destroy this object"> |
| 140 | + Destroys this object. |
| 141 | + </description> |
| 142 | + </c2s> |
| 143 | + </object> |
| 144 | +</protocol> |
0 commit comments