| Crates.io | wayland-protocols-treeland |
| lib.rs | wayland-protocols-treeland |
| version | 0.1.1 |
| created_at | 2026-01-11 14:47:18.583135+00 |
| updated_at | 2026-01-13 05:49:52.730622+00 |
| description | Generated API for the Treeland wayland protocol extensions |
| homepage | |
| repository | https://github.com/dwapp/treeland-protocols-rs |
| max_upload_size | |
| id | 2035921 |
| size | 122,136 |
Rust bindings for Treeland Wayland protocol extensions.
This crate provides Rust bindings to the Treeland Wayland protocol extensions. Treeland is a Wayland compositor developed by UnionTech/Deepin for DDE (Deepin Desktop Environment).
These bindings are built on top of wayland-client and wayland-server.
treeland-protocols-rs/
├── src/ # Rust binding source code
│ ├── lib.rs # Main library entry
│ └── protocol_macro.rs # Protocol generation macro
├── treeland-protocols/ # Git submodule - protocol definitions
│ └── xml/ # XML protocol files
├── Cargo.toml
└── README.md
| Protocol | Status | Description |
|---|---|---|
app_id_resolver |
✅ | Application ID resolver for window identification |
capture |
✅ | Screen/window capture |
dde_shell |
✅ | DDE shell integration (multitask view, window picker, etc.) |
ddm |
✅ | Display Device Manager |
foreign_toplevel_manager |
✅ | Foreign toplevel window management |
output_manager |
✅ | Output/display management |
personalization_manager |
✅ | Desktop personalization (wallpaper, cursor, theme) |
prelaunch_splash |
✅ | Pre-launch splash screen |
screensaver |
✅ | Screensaver control |
shortcut_manager |
✅ | Global shortcut registration (v1 & v2) |
virtual_output_manager |
✅ | Virtual output management |
wallpaper_color |
✅ | Wallpaper color extraction |
window_management |
✅ | Window management operations |
All listed protocols are currently enabled and verified; if upstream protocol definitions change, they will be updated here.
Add this to your Cargo.toml:
[dependencies]
wayland-protocols-treeland = { git = "https://github.com/dwapp/treeland-protocols-rs" }
client (default): Enable client-side bindingsserver: Enable server-side bindings# Client only (default)
wayland-protocols-treeland = { git = "..." }
# Server only
wayland-protocols-treeland = { git = "...", default-features = false, features = ["server"] }
# Both client and server
wayland-protocols-treeland = { git = "...", features = ["client", "server"] }
use wayland_client::{Connection, Dispatch, QueueHandle};
use wayland_protocols_treeland::shortcut_manager::v1::client::{
treeland_shortcut_context_v1,
treeland_shortcut_manager_v1,
};
struct AppData;
impl Dispatch<treeland_shortcut_manager_v1::TreelandShortcutManagerV1, ()> for AppData {
fn event(
_state: &mut Self,
_proxy: &treeland_shortcut_manager_v1::TreelandShortcutManagerV1,
_event: treeland_shortcut_manager_v1::Event,
_data: &(),
_conn: &Connection,
_qh: &QueueHandle<Self>,
) {
// Handle manager events
}
}
impl Dispatch<treeland_shortcut_context_v1::TreelandShortcutContextV1, ()> for AppData {
fn event(
_state: &mut Self,
_proxy: &treeland_shortcut_context_v1::TreelandShortcutContextV1,
event: treeland_shortcut_context_v1::Event,
_data: &(),
_conn: &Connection,
_qh: &QueueHandle<Self>,
) {
match event {
treeland_shortcut_context_v1::Event::Shortcut => {
println!("Shortcut triggered!");
}
_ => {}
}
}
}
use wayland_protocols_treeland::wallpaper_color::v1::client::treeland_wallpaper_color_manager_v1;
// After binding the global...
// let color_manager = globals.bind::<treeland_wallpaper_color_manager_v1::TreelandWallpaperColorManagerV1, _, _>(...);
# Clone with submodules
git clone --recursive https://github.com/dwapp/treeland-protocols-rs
cd treeland-protocols-rs
# Build
cargo build
# Run tests
cargo test
# Check all features
cargo check --all-features
Contributions are welcome! Please note:
treeland-protocols/ directory is a git submodule pointing to the upstream protocol definitionsThis project is licensed under the MIT License - see the LICENSE file for details.
The protocol definitions in treeland-protocols/ are licensed separately, see that repository for details.