mcpp index

freedesktop.wayland-util

import

wayland's macros as a C++23 module — constants, container_of, list/array ranges

import freedesktop.wayland.util;

模組名讀自上游 src/wayland-util.cppm 裡的 `export module` 宣告。

mcpp add freedesktop.wayland-util@1.26.0

用法

來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。

// The module wrappers, used the way a consumer would.
//
// The claim they make is narrow and testable: `import freedesktop.wayland.client;` gives
// you the same entities `#include <wayland-client.h>` does, spelled the same
// way. So this file includes NOTHING from wayland — no header — and still
// calls the stock API. If an export were missing, this would not compile; if a
// name had been renamed or wrapped, it would not compile either.
//
// tests/wayland.cpp is the header-based sibling. Both must pass: the module
// layer is an addition, not a replacement.

#ifdef __linux__

#include <cstdio>
#include <string>
#include <vector>

import freedesktop.wayland.client;
import freedesktop.wayland.server;
import freedesktop.wayland.util;

namespace {
// …

tests/examples/wayland/tests/modules.cpp · 專案 tests/examples/wayland

建置 · 上游資訊清單

modules
freedesktop.wayland.util
targets
wayland-util (lib)
language
c++23
manifest version
1.26.0
來源
https://raw.githubusercontent.com/mcpplibs/wayland/v1.26.0/mcpp/util/mcpp.toml

版本

版本平台 鏡像sha256
1.26.0 最新 Linux GLOBAL CN 9bce2cc00c61…