Something went wrong. Try again.
A Wayland client for Zig 0.16 with no libwayland: protocol scanner, sans-I/O wire protocol, and socket client.
Something went wrong. Try again.
951 B · 28 lines
Zig
at main
1234567891011121314151617181920212223242526272829// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us>// SPDX-License-Identifier: MIT
//! A Wayland client connection: the socket, the file descriptors that travel//! over it, and the loop that hands events to listeners.//!//! Everything about the protocol itself -- the wire format, object ids,//! protocol errors -- is the `protocol` module's, and a `Connection` holds a//! `protocol.Session` to do it. What is here is only the I/O.//!//! ```zig//! const client = @import("client");//! const wl = @import("wayland-protocols").wl;//!//! var conn: client.Connection = try .connect(gpa, io, environ_map);//! defer conn.deinit();//!//! const display: wl.Display = .{ .id = .display };//! const registry = try display.getRegistry(&conn.session);//! try conn.setListener(registry, &state, onRegistryEvent);//! try conn.roundtrip();//! ```
pub const Connection = @import("Connection.zig");
test { _ = Connection;}