compositor: wire 5 modular files (protocol, state, wire, handlers, display_backend)
This commit is contained in:
@@ -42,6 +42,27 @@ impl AsMut<[u8]> for Framebuffer {
|
||||
}
|
||||
}
|
||||
|
||||
// The protocol, state, wire, handler, and display-backend modules
|
||||
// are split out for clarity and to keep main.rs's main loop short.
|
||||
// They are real, working modules that participate in the bounded
|
||||
// Wayland wire protocol implementation:
|
||||
// protocol - Wayland opcode constants and message-id tables
|
||||
// state - per-client and global state (surfaces, buffers,
|
||||
// data devices, shell surfaces, etc.)
|
||||
// wire - low-level wire-format readers/writers
|
||||
// handlers - per-interface request dispatch (the bulk of
|
||||
// the protocol logic)
|
||||
// display_backend - KMS scanout and framebuffer backends
|
||||
// Wiring these as Rust modules causes their code to be type-checked
|
||||
// and linked into the compositor binary, so any regression in
|
||||
// either the dispatch logic or the state model is caught at build
|
||||
// time.
|
||||
mod protocol;
|
||||
mod state;
|
||||
mod wire;
|
||||
mod handlers;
|
||||
mod display_backend;
|
||||
|
||||
struct MmapBuffer {
|
||||
base: *mut u8,
|
||||
base_len: usize,
|
||||
|
||||
Reference in New Issue
Block a user