compat.mtdev
#includemtdev 1.1.7 — kernel multitouch protocol A to B translation, for libinput
#include <mtdev.h>
mcpp add compat.mtdev@1.1.7
用法
來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。
// compat.mtdev — behavioral test, no input device required.
//
// mtdev translates kernel multitouch protocol A into protocol B. The test
// exercises the translator's own state machine rather than a device: the
// interesting failure is a package that links but whose slot machinery was
// compiled out, and that shows up here rather than on a touchscreen.
#ifdef __linux__
#include <mtdev.h>
#include <mtdev-plumbing.h>
#include <linux/input.h>
#include <cstdio>
#include <cstring>
namespace {
int failures = 0;
void check(bool ok, const char *what)
{
std::printf("%-58s %s\n", what, ok ? "ok" : "FAILED");
if (!ok) ++failures;
// …
tests/examples/mtdev/tests/mtdev.cpp · 專案 tests/examples/mtdev
建置
- targets
mtdev (lib)- language
c++23- C standard
c11- import std
- no
- include dirs
*/include, */src
原始檔 (5)
*/src/caps.c*/src/core.c*/src/iobuf.c*/src/match.c*/src/match_four.c