MCPcopy Index your code
hub / github.com/Smithay/client-toolkit

github.com/Smithay/client-toolkit @v0.20.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.20.0 ↗ · + Follow
1,004 symbols 1,925 edges 62 files 175 documented · 17%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

crates.io docs.rs Build Status

Smithay's Client Toolkit

This crate is a toolkit for writing wayland clients in rust, on top of wayland-client.

Currently a work in progress, it currently provides the following utilities:

  • Automatic binding of general wayland globals (wl_compositor, wl_shm, etc..)
  • Abstraction to create windows (aka toplevel surfaces), abstracting the interaction with the shell (xdg_shell or wl_shell) and the drawing of decorations
  • Wrapper for wl_keyboard for automatic keymap interpretation using libxkbcommon.so.
  • Utilites for creating dpi aware surfaces.

Documentation

The documentation for the master branch is available online.

The documentation for the releases can be found on docs.rs.

Requirements

Requires at least rust 1.65 to be used and version 1.15 of the wayland system libraries if using the system backend.

Extension points exported contracts — how you extend this code

OutputHandler (Interface)
Simplified event handler for [`wl_output::WlOutput`]. See [`OutputState`]. [11 implementers]
src/output.rs
ProvidesBoundGlobal (Interface)
A trait implemented by types that provide access to capability globals. The returned global must be fully compatible wi [13 …
src/globals.rs
ProvidesRegistryState (Interface)
Trait which asserts a data type may provide a mutable reference to the registry state. Typically this trait will be req [15 …
src/registry.rs
WindowHandler (Interface)
Handler for toplevel operations on a [`Window`]. [8 implementers]
src/shell/xdg/window/mod.rs
KeyboardHandler (Interface)
Handler trait for keyboard input. The functions defined in this trait are called as keyboard events are received from t [5 …
src/seat/keyboard/mod.rs
CompositorHandler (Interface)
(no doc) [10 implementers]
src/compositor.rs
ShmHandler (Interface)
(no doc) [10 implementers]
src/shm/mod.rs
ForeignToplevelListHandler (Interface)
Handler trait for foreign toplevel list protocol. [1 implementers]
src/foreign_toplevel_list.rs

Core symbols most depended-on inside this repo

clone
called by 161
src/shm/slot.rs
lock
called by 93
src/session_lock/mod.rs
wl_surface
called by 59
src/compositor.rs
destroy
called by 37
src/shm/multi.rs
get
called by 35
src/registry.rs
version
called by 33
src/dmabuf.rs
commit
called by 22
src/seat/input_method.rs
is_none
called by 20
src/seat/pointer/mod.rs

Shape

Method 733
Class 166
Interface 40
Function 35
Enum 30

Languages

Rust100%

Modules by API surface

src/seat/input_method_v3.rs53 symbols
examples/data_device.rs41 symbols
src/shell/xdg/window/mod.rs36 symbols
src/shm/slot.rs33 symbols
src/seat/input_method.rs31 symbols
examples/relative_pointer.rs31 symbols
examples/generic_simple_window.rs31 symbols
src/shell/xdg/fallback_frame.rs30 symbols
src/data_device_manager/data_offer.rs30 symbols
src/compositor.rs30 symbols
examples/themed_window.rs29 symbols
examples/simple_window.rs29 symbols

For agents

$ claude mcp add client-toolkit \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact