<?xml version="1.0" encoding="UTF-8"?>
<protocol name="cont8nuum_settings_v1">
<copyright>
Written by lowtide, 2026. To the extent possible under law, the
author has dedicated all copyright and related and neighbouring
rights to this file to the public domain worldwide (CC0 1.0, see
the LICENSE file or https://creativecommons.org/publicdomain/zero/1.0/).
It is distributed without any warranty.
</copyright>
<description summary="read and change the cont8nuum configuration">
This protocol lets the PC settings app read the compositor's settings
and change them while it runs.
The global is only advertised to the settings app, which the
compositor starts itself over a private connection. Other clients
never see it.
Settings are addressed like the configuration files: a section
("keyboard", "output DP-1") and a key. A key can have several
entries, in order (autostart commands, key bindings).
</description>
<interface name="c8_settings_manager_v1" version="1">
<request name="destroy" type="destructor">
<description summary="destroy the manager"/>
</request>
<request name="get_settings">
<description summary="start reading and changing settings">
The new object immediately receives the current settings.
</description>
<arg name="id" type="new_id" interface="c8_settings_v1"/>
</request>
</interface>
<interface name="c8_settings_v1" version="1">
<description summary="a view of the settings">
The compositor sends every setting as a series of entry events
followed by done. It sends the whole series again whenever anything
changes, whoever changed it: a client replaces what it knows with
each series.
Changes are made with set, add and remove, and take effect together
on commit. The compositor applies them, saves them, and sends the
new settings.
Read-only sections ("palette") describe choices the compositor
offers; changes to them are ignored.
</description>
<request name="destroy" type="destructor">
<description summary="destroy the settings object">
Uncommitted changes are discarded.
</description>
</request>
<request name="set">
<description summary="replace a setting">
Replace every entry of the key with this one value.
</description>
<arg name="section" type="string"/>
<arg name="key" type="string"/>
<arg name="value" type="string"/>
</request>
<request name="add">
<description summary="add an entry">
Add an entry after the existing entries of the key.
</description>
<arg name="section" type="string"/>
<arg name="key" type="string"/>
<arg name="value" type="string"/>
</request>
<request name="remove">
<description summary="remove entries">
Remove every entry of the key. An empty key removes every entry in
the section.
</description>
<arg name="section" type="string"/>
<arg name="key" type="string"/>
</request>
<request name="commit">
<description summary="apply the changes">
Apply and save the changes made since the last commit. Changes the
compositor cannot make are reported with failed and skipped; the
rest still apply. A new series of entries follows.
</description>
</request>
<event name="entry">
<description summary="one setting"/>
<arg name="section" type="string"/>
<arg name="key" type="string"/>
<arg name="value" type="string"/>
</event>
<event name="done">
<description summary="the series of entries is complete"/>
</event>
<event name="failed">
<description summary="a change was not made">
Sent during commit for each change that was skipped.
</description>
<arg name="section" type="string"/>
<arg name="key" type="string"/>
<arg name="reason" type="string" summary="for people to read"/>
</event>
</interface>
</protocol>