compat.libinput
#includelibinput 1.31.3 — touchpad, mouse, tablet and keyboard input handling for compositors
#include <libinput.h>
mcpp add compat.libinput@1.31.3
用法
来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。
// compat.libinput — the input chain, exercised without a seat.
//
// libinput needs a udev context and either a seat or explicit device paths.
// A CI runner has /sys (so udev enumeration works) but not the permissions to
// open /dev/input/event*, so what is asserted is everything up to and
// including the udev handoff — which is exactly where a packaging mistake
// lands, because that is the seam between the four packages in this chain:
//
// compat.libinput
// ├── freedesktop.libevdev
// ├── compat.libudev
// └── compat.mtdev
//
// Opening real devices is opt-in (MCPP_RUN_INPUT_DEVICES=1).
#ifdef __linux__
#include <libinput.h>
#include <libudev.h>
#include <fcntl.h>
#include <unistd.h>
// …
tests/examples/libinput/tests/libinput.cpp · 项目 tests/examples/libinput
构建
- targets
input (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
*, */src, */include, mcpp_generated
源文件 (46)
*/src/util-files.c*/src/util-list.c*/src/util-ratelimit.c*/src/util-strings.c*/src/util-prop-parsers.c*/src/filter.c*/src/filter-custom.c*/src/filter-flat.c*/src/filter-low-dpi.c*/src/filter-mouse.c*/src/filter-touchpad.c*/src/filter-touchpad-flat.c*/src/filter-touchpad-x230.c*/src/filter-tablet.c*/src/filter-trackpoint.c*/src/filter-trackpoint-flat.c*/src/quirks.c*/src/libinput.c*/src/libinput-plugin.c*/src/libinput-plugin-button-debounce.c*/src/libinput-plugin-mouse-wheel.c*/src/libinput-plugin-mouse-wheel-lowres.c*/src/libinput-plugin-tablet-double-tool.c*/src/libinput-plugin-tablet-eraser-button.c*/src/libinput-plugin-tablet-forced-tool.c*/src/libinput-plugin-tablet-proximity-timer.c*/src/libinput-private-config.c*/src/evdev.c*/src/evdev-fallback.c*/src/evdev-plugin.c*/src/evdev-totem.c*/src/evdev-middle-button.c*/src/evdev-mt-touchpad.c*/src/evdev-mt-touchpad-tap.c*/src/evdev-mt-touchpad-thumb.c*/src/evdev-mt-touchpad-buttons.c*/src/evdev-mt-touchpad-edge-scroll.c*/src/evdev-mt-touchpad-gestures.c*/src/evdev-tablet.c*/src/evdev-tablet-pad.c*/src/evdev-tablet-pad-leds.c*/src/path-seat.c*/src/udev-seat.c*/src/timer.c*/src/util-libinput.c*/src/libinput-plugin-mtdev.c
生成的文件
mcpp_generated/config.hmcpp_generated/libinput-version.h