mcpp index

freedesktop.wayland

import

libwayland-client — the client side of the Wayland protocol, with a C++23 module wrapper

import freedesktop.wayland.client;
#include <wayland-client.h>

Module name read from the upstream `export module` declaration in src/wayland-client.cppm.

mcpp add freedesktop.wayland@1.26.0

Usage

From this repository's own test project — built and run by CI, not written for the website.

// compat.wayland — behavioral test, runnable with no compositor.
//
// Two seams, and the second is the one a compositor author depends on.
//
//   1. THE CLIENT LIBRARY, which the package puts on the link line itself.
//      `wl_display_connect` on a machine with no compositor must return NULL
//      cleanly -- that exercises the real library (it reads WAYLAND_DISPLAY,
//      builds a socket path and fails to connect) without needing a server.
//
//   2. THE LIBRARIES THE PACKAGE DELIBERATELY DOES NOT LINK. libwayland-server
//      is harvested into the farm but kept off `ldflags`, so a consumer reaches
//      it by adding `-lwayland-server` to its own build — which this member's
//      mcpp.toml does. If the farm ever stops carrying the server library, the
//      documented escape hatch silently stops working; this file is what turns
//      that into a link error here instead.

#ifdef __linux__

#include <wayland-client.h>
#include <wayland-server-core.h>

#include <dlfcn.h>
// …

tests/examples/wayland/tests/wayland.cpp · project tests/examples/wayland

Build · upstream manifest

modules
freedesktop.wayland.client
targets
wayland-client (shared), wayland (lib)
language
c++23
manifest version
1.26.0
dependencies
compat
source
https://raw.githubusercontent.com/mcpplibs/wayland/v1.26.0/mcpp/client/mcpp.toml

Versions

VersionPlatforms Mirrorssha256
1.26.0 latest Linux GLOBAL CN 9bce2cc00c61…