protocol docs

This commit is contained in:
Raphael Robatsch 2021-10-26 18:39:05 +02:00
parent 06f344c8fb
commit d5c4349a3f

View File

@ -27,18 +27,30 @@
<interface name="znet_tapesoftware_dwl_wm_v1" version="1"> <interface name="znet_tapesoftware_dwl_wm_v1" version="1">
<description summary="control the dwl state"> <description summary="control the dwl state">
Clients can use this protcol to receive updates of the window manager This interface is exposed as a global in the wl_registry.
Clients can use this protocol to receive updates of the window manager
state (active tags, active layout, and focused window). state (active tags, active layout, and focused window).
Clients can also control this state. Clients can also control this state.
After binding, the client will receive the available tags and layouts
with the 'tag' and 'layout' events. These can be used in subsequent
dwl_wm_monitor_v1.set_tags/set_layout requests, and to interpret the
dwl_wm_monitor_v1.layout/tag events.
</description> </description>
<request name="release" type="destructor"> <request name="release" type="destructor">
<description summary="release dwl_wm"> <description summary="release dwl_wm">
This request indicates that the client will not use the dwl_wm
object any more. Objects that have been created through this instance
are not affected.
</description> </description>
</request> </request>
<request name="get_monitor"> <request name="get_monitor">
<description summary="gets a dwl monitor from an output"> <description summary="gets a dwl monitor from an output">
Gets a dwl monitor for the specified output. The window manager
state on the output can be controlled using the monitor.
</description> </description>
<arg name="id" type="new_id" interface="znet_tapesoftware_dwl_wm_monitor_v1" /> <arg name="id" type="new_id" interface="znet_tapesoftware_dwl_wm_monitor_v1" />
<arg name="output" type="object" interface="wl_output" /> <arg name="output" type="object" interface="wl_output" />
@ -46,12 +58,16 @@
<event name="tag"> <event name="tag">
<description summary="announces the presence of a tag"> <description summary="announces the presence of a tag">
This event is sent immediately after binding.
A roundtrip after binding guarantees that the client has received all tags.
</description> </description>
<arg name="name" type="string"/> <arg name="name" type="string"/>
</event> </event>
<event name="layout"> <event name="layout">
<description summary="announces the presence of a layout"> <description summary="announces the presence of a layout">
This event is sent immediately after binding.
A roundtrip after binding guarantees that the client has received all layouts.
</description> </description>
<arg name="name" type="string"/> <arg name="name" type="string"/>
</event> </event>
@ -59,6 +75,13 @@
<interface name="znet_tapesoftware_dwl_wm_monitor_v1" version="1"> <interface name="znet_tapesoftware_dwl_wm_monitor_v1" version="1">
<description summary="control one monitor"> <description summary="control one monitor">
Observes and controls one monitor.
Events are double-buffered: Clients should cache all events and only
redraw themselves once the 'frame' event is sent.
Requests are not double-buffered: The compositor will update itself
immediately.
</description> </description>
<enum name="tag_state"> <enum name="tag_state">
@ -69,61 +92,74 @@
<request name="release" type="destructor"> <request name="release" type="destructor">
<description summary="release dwl_monitor"> <description summary="release dwl_monitor">
This request indicates that the client is done with this dwl_monitor.
All further requests are ignored.
</description> </description>
</request> </request>
<event name="selected"> <event name="selected">
<description summary="updates the selected state of the monitor"> <description summary="updates the selected state of the monitor">
If 'selected' is nonzero, this monitor is the currently selected one.
</description> </description>
<arg name="selected" type="uint"/> <arg name="selected" type="uint"/>
</event> </event>
<event name="tag"> <event name="tag">
<description summary="updates the state of one tag"> <description summary="updates the state of one tag">
Announces the update of a tag. num_clients and focused_client can be
used to draw client indicators.
</description> </description>
<arg name="tag" type="uint"/> <arg name="tag" type="uint" summary="index of a tag received by the dwl_wm_v1.tag event." />
<arg name="state" type="uint" enum="tag_state"/> <arg name="state" type="uint" enum="tag_state"/>
<arg name="num_clients" type="uint"/> <arg name="num_clients" type="uint" summary="number of clients on this tag"/>
<arg name="focused_client" type="int" summary="-1 if there is no focused client"/> <arg name="focused_client" type="int" summary="out of num_clients. -1 if there is no focused client"/>
</event> </event>
<event name="layout"> <event name="layout">
<description summary="updates the selected layout"> <description summary="updates the selected layout">
Announces the update of the selected layout.
</description> </description>
<arg name="layout" type="uint"/> <arg name="layout" type="uint" summary="index of a layout received by the dwl_wm_v1.layout event."/>
</event> </event>
<event name="title"> <event name="title">
<description summary="updates the focused client"> <description summary="updates the focused client">
Announces the update of the selected client.
</description> </description>
<arg name="title" type="string"/> <arg name="title" type="string"/>
</event> </event>
<event name="frame"> <event name="frame">
<description summary="sent after all other events have been sent. allows for atomic updates."> <description summary="end of status update sequence">
Sent after all other events belonging to the status update has been sent.
Clients should redraw themselves now.
</description> </description>
</event> </event>
<request name="set_tags"> <request name="set_tags">
<description summary="sets the active tags on this monitor. changes are applied immediately."> <description summary="sets the active tags on this monitor.">
Changes are applied immediately.
</description> </description>
<arg name="tagmask" type="uint"/> <arg name="tagmask" type="uint" summary="bitmask of the tags that should be set."/>
<arg name="toggle_tagset" type="uint"/> <arg name="toggle_tagset" type="uint"/>
</request> </request>
<request name="set_client_tags"> <request name="set_client_tags">
<description summary="updates the tags of the focused client. changes are applied immediately."> <description summary="updates the tags of the focused client.">
tags are updated as follows: tags are updated as follows:
new_tags = (current_tags AND and_tags) XOR xor_tags new_tags = (current_tags AND and_tags) XOR xor_tags
Changes are applied immediately.
</description> </description>
<arg name="and_tags" type="uint"/> <arg name="and_tags" type="uint"/>
<arg name="xor_tags" type="uint"/> <arg name="xor_tags" type="uint"/>
</request> </request>
<request name="set_layout"> <request name="set_layout">
<description summary="sets the active layout on this monitor. changes are applied immediately."> <description summary="sets the active layout on this monitor.">
Changes are applied immediately.
</description> </description>
<arg name="layout" type="uint"/> <arg name="layout" type="uint" summary="index of a layout received by the dwl_wm_v1.layout event."/>
</request> </request>
</interface> </interface>
</protocol> </protocol>