freedesktop.libxkbcommon
#includelibxkbcommon 1.13.2 — keymap compilation and keyboard state, xkbcomp parser pre-generated
#include <xkbcommon/xkbcommon.h>
mcpp add freedesktop.libxkbcommon@1.13.2
用法
来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。
// libxkbcommon, exercised through the generated parser.
//
// The package is a fork for exactly one reason: `src/xkbcomp/parser.y` is
// bison's input and the 3,960-line parser is generated. So the test compiles a
// keymap FROM A STRING — that runs the parser end to end and needs no
// xkeyboard-config data on disk, which is what makes it runnable on a CI
// machine and in a sandbox.
//
// A package that linked but whose parser was generated without
// `-p _xkbcommon_`, or not regenerated after a version bump, fails here rather
// than in somebody's compositor.
#ifdef __linux__
#include <xkbcommon/xkbcommon.h>
#include <cstdio>
#include <cstring>
#include <cstdlib>
namespace {
// …
tests/examples/libxkbcommon/tests/libxkbcommon.cpp · 项目 tests/examples/libxkbcommon
构建 · 上游清单
- targets
xkbcommon (lib)- language
c++23- manifest version
1.13.2- 来源
https://raw.githubusercontent.com/mcpplibs/libxkbcommon/1.13.2/mcpp/xkbcommon/mcpp.toml