mirror of
https://github.com/hyprwm/hyprland-protocols.git
synced 2025-12-20 13:10:02 +01:00
Compare commits
No commits in common. "main" and "v0.4.0" have entirely different histories.
10 changed files with 74 additions and 586 deletions
|
|
@ -1,41 +0,0 @@
|
||||||
cmake_minimum_required(VERSION 3.20)
|
|
||||||
|
|
||||||
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" HYPRLAND_PROTOCOLS_VERSION
|
|
||||||
LIMIT_COUNT 1)
|
|
||||||
string(STRIP "${HYPRLAND_PROTOCOLS_VERSION}" HYPRLAND_PROTOCOLS_VERSION)
|
|
||||||
|
|
||||||
project(
|
|
||||||
hyprland-protocols
|
|
||||||
VERSION ${HYPRLAND_PROTOCOLS_VERSION}
|
|
||||||
LANGUAGES NONE)
|
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
|
||||||
|
|
||||||
set(PROTOCOL_FILES
|
|
||||||
protocols/hyprland-toplevel-export-v1.xml
|
|
||||||
protocols/hyprland-global-shortcuts-v1.xml
|
|
||||||
protocols/hyprland-focus-grab-v1.xml
|
|
||||||
protocols/hyprland-ctm-control-v1.xml
|
|
||||||
protocols/hyprland-surface-v1.xml
|
|
||||||
protocols/hyprland-lock-notify-v1.xml
|
|
||||||
protocols/hyprland-toplevel-mapping-v1.xml
|
|
||||||
protocols/hyprland-input-capture-v1.xml)
|
|
||||||
|
|
||||||
foreach(PROTOCOL_FILE ${PROTOCOL_FILES})
|
|
||||||
get_filename_component(PROTOCOL_DIR ${PROTOCOL_FILE} DIRECTORY)
|
|
||||||
install(
|
|
||||||
FILES ${PROTOCOL_FILE}
|
|
||||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/hyprland-protocols/${PROTOCOL_DIR}")
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
# Configure pkg-config file
|
|
||||||
set(prefix "${CMAKE_INSTALL_PREFIX}")
|
|
||||||
set(datarootdir "\${prefix}/${CMAKE_INSTALL_DATADIR}")
|
|
||||||
set(abs_top_srcdir "${CMAKE_CURRENT_SOURCE_DIR}")
|
|
||||||
set(PACKAGE "hyprland-protocols")
|
|
||||||
|
|
||||||
configure_file(hyprland-protocols.pc.in hyprland-protocols.pc @ONLY)
|
|
||||||
|
|
||||||
# Install pkg-config file
|
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/hyprland-protocols.pc"
|
|
||||||
DESTINATION "${CMAKE_INSTALL_DATADIR}/pkgconfig")
|
|
||||||
33
README.md
33
README.md
|
|
@ -1,40 +1,21 @@
|
||||||
# hyprland-protocols
|
# hyprland-protocols
|
||||||
|
|
||||||
Wayland protocol extensions for Hyprland.
|
Wayland protocol extensions for Hyprland.
|
||||||
|
|
||||||
This repository exists in an effort to bridge the gap between Hyprland and KDE/Gnome's functionality,
|
This repository exists in an effort to bridge the gap between Hyprland and KDE/Gnome's functionality.
|
||||||
as well as allow apps for some extra neat functionality under Hyprland.
|
|
||||||
|
|
||||||
Since `wayland-protocols` is slow to change (on top of Hyprland not being allowed to contribute), we have to maintain
|
Since `wayland-protocols` is slow to change (on top of Hyprland not being allowed to contribute), we have to maintain
|
||||||
a set of protocols Hyprland uses to plumb some things / add some useful features.
|
a set of protocols Hyprland uses to plumb some things / add a few minor features. Most of the protocols here are small,
|
||||||
|
hyprland-exclusive plumbing protocols anyways.
|
||||||
Some of the protocols here also do not belong in w-p, as they are specific to Hyprland.
|
|
||||||
|
|
||||||
## Finished protocols
|
|
||||||
|
|
||||||
|
# Finished protocols
|
||||||
- `hyprland_toplevel_export` -> for exporting toplevel buffers (aka. windows) for screensharing
|
- `hyprland_toplevel_export` -> for exporting toplevel buffers (aka. windows) for screensharing
|
||||||
- `hyprland_global_keybindings` -> for managing global keybinds via D-Bus.
|
- `hyprland_global_keybindings` -> for managing global keybinds via D-Bus.
|
||||||
- `hyprland_focus_grab` -> for grabbing input focus, primarily for complex context menus.
|
- `hyprland_focus_grab` -> for grabbing input focus, primarily for complex context menus.
|
||||||
- `hyprland_ctm_control` -> for managing CTMs of displays. See [hyprsunset](https://github.com/hyprwm/hyprsunset)
|
|
||||||
- `hyprland_surface` -> for setting hyprland specific wl_surface properties.
|
|
||||||
- `hyprland_lock_notify` -> for notifying a client about the screen being locked and unlocked.
|
|
||||||
- `hyprland_toplevel_mapping` -> for mapping toplevels to hyprland IDs.
|
|
||||||
- `hyprland_input_capture` -> for EIS input capture.
|
|
||||||
|
|
||||||
## Building
|
# Contributing
|
||||||
|
Adding new protocols is *discouraged*. If the protocol has a good reason to be, and you have an impl ready, feel free to make a PR.
|
||||||
```sh
|
|
||||||
git clone https://github.com/hyprwm/hyprland-protocols && cd hyprland-protocols
|
|
||||||
cmake -S . -B ./build
|
|
||||||
cmake --build ./build
|
|
||||||
```
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
Adding new protocols is *discouraged*, as most things you think of can already be done one way or another.
|
|
||||||
However, if the protocol has a good reason to be, and you have an impl ready, feel free to make a PR.
|
|
||||||
We're always up for a discussion to improve things!
|
|
||||||
|
|
||||||
Fixing typos / adding explanations to existing protocols - welcome.
|
Fixing typos / adding explanations to existing protocols - welcome.
|
||||||
|
|
||||||
Adding functionality to protocols / new revisions - welcome, if accompanied with a reason and an impl.
|
Adding functionality to protocols / new revisions - welcome, if accompanied with a reason and an impl.
|
||||||
|
|
||||||
|
|
|
||||||
2
VERSION
2
VERSION
|
|
@ -1 +1 @@
|
||||||
0.7.0
|
0.4.0
|
||||||
|
|
|
||||||
62
meson.build
Normal file
62
meson.build
Normal file
|
|
@ -0,0 +1,62 @@
|
||||||
|
project('hyprland-protocols',
|
||||||
|
version: run_command('cat', 'VERSION', check: true).stdout().strip(),
|
||||||
|
meson_version: '>= 0.60.3',
|
||||||
|
)
|
||||||
|
|
||||||
|
hyprland_protocols_version = meson.project_version()
|
||||||
|
|
||||||
|
fs = import('fs')
|
||||||
|
|
||||||
|
protocols = {
|
||||||
|
'hyprland-toplevel-export': ['v1'],
|
||||||
|
'hyprland-global-shortcuts': ['v1'],
|
||||||
|
'hyprland-focus-grab': ['v1'],
|
||||||
|
'hyprland-ctm-control': ['v1'],
|
||||||
|
}
|
||||||
|
|
||||||
|
protocol_files = []
|
||||||
|
|
||||||
|
foreach name : protocols.keys()
|
||||||
|
foreach version : protocols.get(name)
|
||||||
|
protocol_files += [
|
||||||
|
'protocols/@0@-@1@.xml'.format(name, version)
|
||||||
|
]
|
||||||
|
endforeach
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
foreach protocol_file : protocol_files
|
||||||
|
protocol_install_dir = fs.parent(join_paths(
|
||||||
|
get_option('datadir'),
|
||||||
|
'hyprland-protocols',
|
||||||
|
protocol_file,
|
||||||
|
))
|
||||||
|
install_data(
|
||||||
|
protocol_file,
|
||||||
|
install_dir: protocol_install_dir,
|
||||||
|
)
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
hyprland_protocols_srcdir = meson.current_source_dir()
|
||||||
|
|
||||||
|
pkgconfig_configuration = configuration_data()
|
||||||
|
pkgconfig_configuration.set('prefix', get_option('prefix'))
|
||||||
|
pkgconfig_configuration.set('datarootdir', '${prefix}/@0@'.format(get_option('datadir')))
|
||||||
|
pkgconfig_configuration.set('abs_top_srcdir', hyprland_protocols_srcdir)
|
||||||
|
pkgconfig_configuration.set('PACKAGE', 'hyprland-protocols')
|
||||||
|
pkgconfig_configuration.set('HYPRLAND_PROTOCOLS_VERSION', hyprland_protocols_version)
|
||||||
|
|
||||||
|
pkg_install_dir = join_paths(get_option('datadir'), 'pkgconfig')
|
||||||
|
configure_file(
|
||||||
|
input: 'hyprland-protocols.pc.in',
|
||||||
|
output: 'hyprland-protocols.pc',
|
||||||
|
configuration: pkgconfig_configuration,
|
||||||
|
install_dir: pkg_install_dir,
|
||||||
|
)
|
||||||
|
|
||||||
|
hyprland_protocols = declare_dependency(
|
||||||
|
variables: {
|
||||||
|
'pkgdatadir': hyprland_protocols_srcdir,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
meson.override_dependency('hyprland-protocols', hyprland_protocols)
|
||||||
|
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
cmake,
|
meson,
|
||||||
|
ninja,
|
||||||
version,
|
version,
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
|
|
@ -10,7 +11,7 @@ stdenv.mkDerivation {
|
||||||
|
|
||||||
src = ../.;
|
src = ../.;
|
||||||
|
|
||||||
nativeBuildInputs = [cmake];
|
nativeBuildInputs = [meson ninja];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "https://github.com/hyprwm/hyprland-protocols";
|
homepage = "https://github.com/hyprwm/hyprland-protocols";
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
This protocol is privileged and should not be exposed to unprivileged clients.
|
This protocol is privileged and should not be exposed to unprivileged clients.
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<interface name="hyprland_ctm_control_manager_v1" version="2">
|
<interface name="hyprland_ctm_control_manager_v1" version="1">
|
||||||
<description summary="manager to control CTMs">
|
<description summary="manager to control CTMs">
|
||||||
This object is a manager which offers requests to control CTMs.
|
This object is a manager which offers requests to control CTMs.
|
||||||
|
|
||||||
|
|
@ -91,16 +91,5 @@
|
||||||
<entry name="invalid_matrix" value="0"
|
<entry name="invalid_matrix" value="0"
|
||||||
summary="the matrix values are invalid."/>
|
summary="the matrix values are invalid."/>
|
||||||
</enum>
|
</enum>
|
||||||
|
|
||||||
<event name="blocked" version="2">
|
|
||||||
<description>
|
|
||||||
This event is sent if another manager was bound by any client
|
|
||||||
at the time the current manager was bound.
|
|
||||||
Any set_ctm_for_output requests from a blocked manager will be
|
|
||||||
silently ignored by the compositor.
|
|
||||||
|
|
||||||
The client should destroy the manager after receiving this event.
|
|
||||||
</description>
|
|
||||||
</event>
|
|
||||||
</interface>
|
</interface>
|
||||||
</protocol>
|
</protocol>
|
||||||
|
|
|
||||||
|
|
@ -1,155 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<protocol name="hyprland_input_capture_v1">
|
|
||||||
<copyright>
|
|
||||||
Copyright © 2025 Fl0w
|
|
||||||
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its
|
|
||||||
contributors may be used to endorse or promote products derived from
|
|
||||||
this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
</copyright>
|
|
||||||
|
|
||||||
<description summary="Bridge input capture to the compositor">
|
|
||||||
This protocol is a bridge of the XDG input capture to the compositor.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<interface name="hyprland_input_capture_manager_v1" version="1">
|
|
||||||
<description summary="manage input capture sessions">
|
|
||||||
This interface allows to create an input capture session.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<request name="create_session">
|
|
||||||
<description summary="create a input capture session">
|
|
||||||
Create a input capture session.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<arg name="session" type="new_id" interface="hyprland_input_capture_v1"/>
|
|
||||||
<arg name="handle" type="string"/>
|
|
||||||
</request>
|
|
||||||
</interface>
|
|
||||||
|
|
||||||
<interface name="hyprland_input_capture_v1" version="1">
|
|
||||||
<description summary="close reproduction of the xdg input capture portal">
|
|
||||||
Interface that is used to create barrier, and trigger capture and release of the pointer.
|
|
||||||
The inputs are sent through an EIS socket, when the cursor hit a barrier.
|
|
||||||
Barriers can only be placed on screen edges and need to be a straight line that cover one corner to another.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<request name="clear_barriers">
|
|
||||||
<description summary="clear every barriers registered">
|
|
||||||
Remove every barriers from the session, new barriers need to be send before calling enable again.
|
|
||||||
</description>
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<request name="add_barrier">
|
|
||||||
<description summary="add one barrier">
|
|
||||||
Add one barrier to the current session, the barrier need to a line placed on the edge of the screen, and is a straight line from one corner to another.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<arg name="zone_set" type="uint" summary="The current zone_set" />
|
|
||||||
<arg name="id" type="uint" summary="The zone id" />
|
|
||||||
<arg name="x1" type="uint"/>
|
|
||||||
<arg name="y1" type="uint"/>
|
|
||||||
<arg name="x2" type="uint"/>
|
|
||||||
<arg name="y2" type="uint"/>
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<request name="enable">
|
|
||||||
<description summary="enable input capturing">
|
|
||||||
Enable the input capturing to be triggered by the cursor crossing a barrier.
|
|
||||||
</description>
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<request name="disable">
|
|
||||||
<description summary="disable input capturing">
|
|
||||||
Disable input capturing, the crossing of a barrier will not trigger anymore input capture.
|
|
||||||
</description>
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<request name="release">
|
|
||||||
<description summary="release input capturing">
|
|
||||||
Release input capturing, the input are not intercepted anymore and barrier crossing will activate it again.
|
|
||||||
If x != -1 and y != -1 then the cursor is warped to the x and y coordinates.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<arg name="activation_id" type="uint" summary="The activation id provided when activated is called" />
|
|
||||||
<arg name="x"
|
|
||||||
type="fixed"
|
|
||||||
summary="the x position of the cursor" />
|
|
||||||
<arg name="y" type="fixed"
|
|
||||||
summary="the y position of the cursor" />
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<event name="eis_fd">
|
|
||||||
<description summary="eis file descriptor">
|
|
||||||
This event provide the file descriptor of an eis socket where inputs will be sent when input capturing is active
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<arg name="fd" type="fd" summary="eis socket file descriptor" />
|
|
||||||
</event>
|
|
||||||
|
|
||||||
<event name="disabled">
|
|
||||||
<description summary="disable the session">
|
|
||||||
Called when the application will not receive captured input. The application can call enable to request future input capturing
|
|
||||||
</description>
|
|
||||||
</event>
|
|
||||||
|
|
||||||
<event name="activated">
|
|
||||||
<description summary="inputs has been captured">
|
|
||||||
Called when the application is about to receive inputs
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<arg name="activation_id"
|
|
||||||
type="uint"
|
|
||||||
summary="Same number used in eis start_emulating to allow synchronisation" />
|
|
||||||
<arg name="x"
|
|
||||||
type="fixed"
|
|
||||||
summary="the x position of the cursor" />
|
|
||||||
<arg name="y" type="fixed"
|
|
||||||
summary="the y position of the cursor" />
|
|
||||||
<arg name="barrier_id"
|
|
||||||
type="uint"
|
|
||||||
summary="the is of the barrier that have been triggered" />
|
|
||||||
</event>
|
|
||||||
|
|
||||||
<event name="deactivated">
|
|
||||||
<description summary="pointer motion">
|
|
||||||
Called when input capture is stopped, and inputs are no longer sent to the application
|
|
||||||
</description>
|
|
||||||
<arg name="activation_id"
|
|
||||||
type="uint"
|
|
||||||
summary="same activation id of the latest activated event" />
|
|
||||||
</event>
|
|
||||||
|
|
||||||
<enum name="error">
|
|
||||||
<entry name="invalid_barrier_id" value="0"
|
|
||||||
summary="The barrier id already exist"/>
|
|
||||||
<entry name="invalid_barrier" value="1"
|
|
||||||
summary="The barrier coordinates are invalid"/>
|
|
||||||
<entry name="invalid_activation_id" value="2"
|
|
||||||
summary="The activation id provided is invalid"/>
|
|
||||||
</enum>
|
|
||||||
</interface>
|
|
||||||
</protocol>
|
|
||||||
|
|
@ -1,99 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<protocol name="hyprland_lock_notify_v1">
|
|
||||||
<copyright>
|
|
||||||
Copyright © 2025 Maximilian Seidler
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its
|
|
||||||
contributors may be used to endorse or promote products derived from
|
|
||||||
this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
</copyright>
|
|
||||||
|
|
||||||
<interface name="hyprland_lock_notifier_v1" version="1">
|
|
||||||
<description summary="lock notification manager">
|
|
||||||
This interface allows clients to monitor whether the wayland session is
|
|
||||||
locked or unlocked.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<request name="destroy" type="destructor">
|
|
||||||
<description summary="destroy the manager">
|
|
||||||
Destroy the manager object. All objects created via this interface
|
|
||||||
remain valid.
|
|
||||||
</description>
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<request name="get_lock_notification">
|
|
||||||
<description summary="create a notification object">
|
|
||||||
Create a new lock notification object.
|
|
||||||
|
|
||||||
If the session is already locked when calling this method,
|
|
||||||
the locked event shall be sent immediately.
|
|
||||||
</description>
|
|
||||||
<arg name="id" type="new_id" interface="hyprland_lock_notification_v1"/>
|
|
||||||
</request>
|
|
||||||
</interface>
|
|
||||||
|
|
||||||
<interface name="hyprland_lock_notification_v1" version="1">
|
|
||||||
<description summary="lock notification">
|
|
||||||
This interface is used by the compositor to send lock notification events
|
|
||||||
to clients.
|
|
||||||
|
|
||||||
Typically the "locked" and "unlocked" events are emitted when a client
|
|
||||||
locks/unlocks the session via ext-session-lock, but the compositor may
|
|
||||||
choose to send notifications for any other locking mechanisms.
|
|
||||||
|
|
||||||
The compositor must notfiy after possible transition periods
|
|
||||||
between locked and unlocked states of the session.
|
|
||||||
In the context of ext-session-lock, that means the "locked" event is
|
|
||||||
expected to be sent after the session-lock client has presented
|
|
||||||
a lock screen frame on every output, which corresponds to the "locked"
|
|
||||||
event of ext-session-lock.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<request name="destroy" type="destructor">
|
|
||||||
<description summary="destroy the notification object">
|
|
||||||
Destroy the notification object.
|
|
||||||
</description>
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<event name="locked">
|
|
||||||
<description summary="session is locked">
|
|
||||||
This event is sent when the wayland session is locked.
|
|
||||||
|
|
||||||
It's a compositor protocol error to send this event twice without an
|
|
||||||
unlock event in-between.
|
|
||||||
</description>
|
|
||||||
</event>
|
|
||||||
|
|
||||||
<event name="unlocked">
|
|
||||||
<description summary="session is no longer locked">
|
|
||||||
This event is sent when the wayland session is unlocked.
|
|
||||||
|
|
||||||
It's a compositor protocol error to send this event twice without an
|
|
||||||
locked event in-between. It's a compositor protocol error to send this
|
|
||||||
event prior to any locked event.
|
|
||||||
</description>
|
|
||||||
</event>
|
|
||||||
</interface>
|
|
||||||
</protocol>
|
|
||||||
|
|
@ -1,126 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<protocol name="hyprland_surface_v1">
|
|
||||||
<copyright>
|
|
||||||
Copyright © 2025 outfoxxed
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its
|
|
||||||
contributors may be used to endorse or promote products derived from
|
|
||||||
this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
</copyright>
|
|
||||||
|
|
||||||
<description summary="hyprland-specific wl_surface extensions">
|
|
||||||
This protocol exposes hyprland-specific wl_surface properties.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<interface name="hyprland_surface_manager_v1" version="2">
|
|
||||||
<description summary="manager for hyprland surface objects">
|
|
||||||
This interface allows a client to create hyprland surface objects.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<request name="get_hyprland_surface">
|
|
||||||
<description summary="create a hyprland surface object">
|
|
||||||
Create a hyprland surface object for the given wayland surface.
|
|
||||||
|
|
||||||
If the wl_surface already has an associated hyprland_surface_v1 object,
|
|
||||||
even from a different manager, creation is a protocol error.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<arg name="id" type="new_id" interface="hyprland_surface_v1"/>
|
|
||||||
<arg name="surface" type="object" interface="wl_surface"/>
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<request name="destroy" type="destructor">
|
|
||||||
<description summary="destroy the hyprland surface manager">
|
|
||||||
Destroy the surface manager.
|
|
||||||
This does not destroy existing surface objects.
|
|
||||||
</description>
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<enum name="error">
|
|
||||||
<entry name="already_constructed" value="0" summary="wl_surface already has a hyprland surface object"/>
|
|
||||||
</enum>
|
|
||||||
</interface>
|
|
||||||
|
|
||||||
<interface name="hyprland_surface_v1" version="2">
|
|
||||||
<description summary="hyprland-specific wl_surface properties">
|
|
||||||
This interface allows access to hyprland-specific properties of a wl_surface.
|
|
||||||
|
|
||||||
Once the wl_surface has been destroyed, the hyprland surface object must be
|
|
||||||
destroyed as well. All other operations are a protocol error.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<request name="set_opacity">
|
|
||||||
<description summary="set the overall opacity of the surface">
|
|
||||||
Sets a multiplier for the overall opacity of the surface.
|
|
||||||
This multiplier applies to visual effects such as blur behind the surface
|
|
||||||
in addition to the surface's content.
|
|
||||||
|
|
||||||
The default value is 1.0.
|
|
||||||
Setting a value outside of the range 0.0 - 1.0 (inclusive) is a protocol error.
|
|
||||||
Does not take effect until wl_surface.commit is called.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<arg name="opacity" type="fixed"/>
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<request name="destroy" type="destructor">
|
|
||||||
<description summary="destroy the hyprland surface interface">
|
|
||||||
Destroy the hyprland surface object, resetting properties provided
|
|
||||||
by this interface to their default values on the next wl_surface.commit.
|
|
||||||
</description>
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<enum name="error">
|
|
||||||
<entry name="no_surface" value="0" summary="wl_surface was destroyed"/>
|
|
||||||
<entry name="out_of_range" value="1" summary="given opacity was not in the range 0.0 - 1.0 (inclusive)"/>
|
|
||||||
</enum>
|
|
||||||
|
|
||||||
<request name="set_visible_region" since="2">
|
|
||||||
<description summary="set the visible region of the surface">
|
|
||||||
This request sets the region of the surface that contains visible content.
|
|
||||||
Visible content refers to content that has an alpha value greater than zero.
|
|
||||||
|
|
||||||
The visible region is an optimization hint for the compositor that lets it
|
|
||||||
avoid drawing parts of the surface that are not visible. Setting a visible region
|
|
||||||
that does not contain all content in the surface may result in missing content
|
|
||||||
not being drawn.
|
|
||||||
|
|
||||||
The visible region is specified in buffer-local coordinates.
|
|
||||||
|
|
||||||
The compositor ignores the parts of the visible region that fall outside of the surface.
|
|
||||||
When all parts of the region fall outside of the buffer geometry, the compositor may
|
|
||||||
avoid rendering the surface entirely.
|
|
||||||
|
|
||||||
The initial value for the visible region is empty. Setting the
|
|
||||||
visible region has copy semantics, and the wl_region object can be destroyed immediately.
|
|
||||||
A NULL wl_region causes the visible region to be set to empty.
|
|
||||||
|
|
||||||
Does not take effect until wl_surface.commit is called.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<arg name="region" type="object" interface="wl_region" allow-null="true"/>
|
|
||||||
</request>
|
|
||||||
</interface>
|
|
||||||
</protocol>
|
|
||||||
|
|
@ -1,124 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<protocol name="hyprland_toplevel_mapping_v1">
|
|
||||||
<copyright>
|
|
||||||
Copyright © 2025 WhySoBad
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
3. Neither the name of the copyright holder nor the names of its
|
|
||||||
contributors may be used to endorse or promote products derived from
|
|
||||||
this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
</copyright>
|
|
||||||
|
|
||||||
<description summary="mapping of toplevels to windows">
|
|
||||||
This protocol allows clients to retrieve the mapping of toplevels to hyprland window addresses.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<interface name="hyprland_toplevel_mapping_manager_v1" version="1">
|
|
||||||
<description summary="manager to request toplevel mappings">
|
|
||||||
This object is a manager which offers requests to retrieve a window address
|
|
||||||
for a toplevel.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<request name="get_window_for_toplevel">
|
|
||||||
<description summary="get window address for toplevel">
|
|
||||||
Get the window address for a toplevel.
|
|
||||||
</description>
|
|
||||||
<arg
|
|
||||||
name="handle"
|
|
||||||
type="new_id"
|
|
||||||
interface="hyprland_toplevel_window_mapping_handle_v1"
|
|
||||||
/>
|
|
||||||
<arg
|
|
||||||
name="toplevel"
|
|
||||||
type="object"
|
|
||||||
interface="ext_foreign_toplevel_handle_v1"
|
|
||||||
summary="toplevel to get the window address for"
|
|
||||||
/>
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<request name="get_window_for_toplevel_wlr">
|
|
||||||
<description summary="get window address for wlr toplevel">
|
|
||||||
Get the window address for a wlr toplevel.
|
|
||||||
</description>
|
|
||||||
<arg
|
|
||||||
name="handle"
|
|
||||||
type="new_id"
|
|
||||||
interface="hyprland_toplevel_window_mapping_handle_v1"
|
|
||||||
/>
|
|
||||||
<arg
|
|
||||||
name="toplevel"
|
|
||||||
type="object"
|
|
||||||
interface="zwlr_foreign_toplevel_handle_v1"
|
|
||||||
summary="wlr toplevel to get the window address for"
|
|
||||||
/>
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<request name="destroy" type="destructor">
|
|
||||||
<description summary="destroy the manager">
|
|
||||||
All objects created by the manager will still remain valid, until their appropriate destroy
|
|
||||||
request has been called.
|
|
||||||
</description>
|
|
||||||
</request>
|
|
||||||
</interface>
|
|
||||||
|
|
||||||
<interface name="hyprland_toplevel_window_mapping_handle_v1" version="1">
|
|
||||||
<description summary="toplevel to window mapping">
|
|
||||||
This object represents a mapping of a (wlr) toplevel to a window address.
|
|
||||||
|
|
||||||
Once created, the `window_address` event will be sent containing the address of the window
|
|
||||||
associated with the toplevel.
|
|
||||||
Should the mapping fail, the `failed` event will be sent.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<event name="window_address">
|
|
||||||
<description summary="address of the window">
|
|
||||||
The full 64bit window address. The `address` field contains the lower 32 bits whilst the
|
|
||||||
`address_hi` contains the upper 32 bits
|
|
||||||
</description>
|
|
||||||
<arg
|
|
||||||
name="address_hi"
|
|
||||||
type="uint"
|
|
||||||
summary="upper 32 bits of the window address"
|
|
||||||
/>
|
|
||||||
<arg
|
|
||||||
name="address"
|
|
||||||
type="uint"
|
|
||||||
summary="lower 32 bits of the window address"
|
|
||||||
/>
|
|
||||||
</event>
|
|
||||||
|
|
||||||
<event name="failed">
|
|
||||||
<description summary="mapping failed">
|
|
||||||
The mapping of the toplevel to a window address failed. Most likely the window does not
|
|
||||||
exist (anymore).
|
|
||||||
</description>
|
|
||||||
</event>
|
|
||||||
|
|
||||||
<request name="destroy" type="destructor">
|
|
||||||
<description summary="destroy handle">
|
|
||||||
Destroy the handle. This request can be sent at any time by the client.
|
|
||||||
</description>
|
|
||||||
</request>
|
|
||||||
</interface>
|
|
||||||
</protocol>
|
|
||||||
Loading…
Add table
Reference in a new issue