feat: add gtk and kde appmenu protocols

This commit is contained in:
81reap 2026-04-06 23:47:12 -04:00
parent e83a9dff82
commit f620b2f4ba
3 changed files with 142 additions and 0 deletions

51
protocols/kde-appmenu.xml Normal file
View file

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<protocol name="appmenu">
<copyright><![CDATA[
SPDX-FileCopyrightText: 2017 David Edmundson <davidedmundson@kde.org>
SPDX-License-Identifier: MIT
]]></copyright>
<!--
Vendored verbatim from plasma-wayland-protocols:
https://invent.kde.org/libraries/plasma-wayland-protocols
src/protocols/appmenu.xml
Used by mango to support global application menus on Wayland
(mangowm/mango#832). The compositor stores the per-surface DBus
address published by clients and re-broadcasts it to external
panels via the dwl-ipc-unstable-v2 protocol.
-->
<interface name="org_kde_kwin_appmenu_manager" version="2">
<description summary="appmenu dbus address interface">
This interface allows a client to link a window (or wl_surface) to an com.canonical.dbusmenu
interface registered on DBus.
</description>
<request name="create">
<arg name="id" type="new_id" interface="org_kde_kwin_appmenu"/>
<arg name="surface" type="object" interface="wl_surface"/>
</request>
<!-- version 2 additions-->
<request name="release" type="destructor" since="2">
<description summary="destroy the org_kde_kwin_appmenu_manager object" />
</request>
</interface>
<interface name="org_kde_kwin_appmenu" version="2">
<description summary="appmenu dbus address interface">
The DBus service name and object path where the appmenu interface is present
The object should be registered on the session bus before sending this request.
If not applicable, clients should remove this object.
</description>
<request name="set_address">
<description summary="initialise or update the location of the AppMenu interface">
Set or update the service name and object path.
Strings should be formatted in Latin-1 matching the relevant DBus specifications.
</description>
<arg name="service_name" type="string" />
<arg name="object_path" type="string" />
</request>
<request name="release" type="destructor">
<description summary="release the appmenu object"/>
</request>
</interface>
</protocol>