Skip to content

Commit 641b247

Browse files
committed
feat: add treeland-ddm communication protocol
1 parent b087c56 commit 641b247

2 files changed

Lines changed: 56 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ set(XML
2020
xml/treeland-foreign-toplevel-manager-v1.xml
2121
xml/treeland-shortcut-manager-v1.xml
2222
xml/treeland-window-management-v1.xml
23+
xml/treeland-ddm-v1.xml
2324
)
2425

2526
install(FILES ${XML} DESTINATION ${CMAKE_INSTALL_DATADIR}/treeland-protocols)

xml/treeland-ddm-v1.xml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
This is the treeland - ddm private communication protocol.
4+
-->
5+
<protocol name="treeland_ddm">
6+
<copyright><![CDATA[
7+
SPDX-FileCopyrightText: 2025 UnionTech Software Technology Co., Ltd.
8+
SPDX-License-Identifier: MIT
9+
]]></copyright>
10+
<interface name="treeland_ddm" version="1">
11+
<description summary="core global for treeland - ddm connection">
12+
This object is primarily used for establish connection between
13+
treeland and ddm.
14+
</description>
15+
<!-- Requests -->
16+
<request name="switch_to_greeter">
17+
<description summary="send treeland to greeter mode">
18+
Send treeland to Greeter mode.
19+
</description>
20+
</request>
21+
<request name="switch_to_user">
22+
<description summary="call treeland to switch lockscreen user">
23+
Set lockscreen user to username. Ignore when username is "ddm".
24+
</description>
25+
<arg name="username" type="string"/>
26+
</request>
27+
<request name="activate_session">
28+
<description summary="activate wayland session">
29+
Activate treeland session. This will makes treeland try to take
30+
control of screen.
31+
</description>
32+
</request>
33+
<request name="deactivate_session">
34+
<description summary="deactivate wayland session">
35+
Deactivate treeland session. This will release control of the
36+
screen, but not to close the current seats.
37+
</description>
38+
</request>
39+
<!-- Events -->
40+
<event name="switch_to_vt">
41+
<description summary="switch to virtual terminal">
42+
Call ddm to switch current virtual terminal to vtnr. ddm should
43+
take care of the switch and call ioctl respectively.
44+
</description>
45+
<arg name="vtnr" type="int"/>
46+
</event>
47+
<event name="acquire_vt">
48+
<description summary="acquire control of virtual terminal">
49+
Call ddm to acquire control of VT at vtnr. ddm should call
50+
VT_SETMODE respectively.
51+
</description>
52+
<arg name="vtnr" type="int"/>
53+
</event>
54+
</interface>
55+
</protocol>

0 commit comments

Comments
 (0)