freedesktop.libdisplay-info
importlibdisplay-info 0.2.0 — EDID and DisplayID parsing, with the PNP vendor table pre-generated from a pinned hwdata
import displayinfo;
模块名取自本索引给这个包写的测试项目。
mcpp add freedesktop.libdisplay-info@0.2.0
用法
来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。
// freedesktop.libdisplay-info — parse a real monitor's EDID.
//
// EDID parsing needs no device, no compositor and no permissions: it is a
// function from 128 bytes to a struct. So unlike most of this stack, the whole
// library is honestly testable on a CI runner.
//
// THE BLOB IS INLINE, not read from the package's own test data. A test member
// resolves its dependency into the mcpp store, and reaching into that tree by
// relative path would tie this file to a layout that is mcpp's business. 256
// bytes of a real Acer P1276's EDID, taken from upstream's
// `test/data/acer-p1276.edid`, is cheaper than that coupling.
//
// THE EXPECTED VALUES ARE UPSTREAM'S, from the `.ref` beside that blob:
//
// EDID Structure Version & Revision: 1.3
// Manufacturer: ACR
// Model: 5654 (0x1616)
//
// WHAT IS ACTUALLY UNDER TEST is the generated PNP table. "ACR" is the raw
// vendor id in the blob; turning it into "Acer Technologies" is what
// `pnp-id-table.c` does — the file this package is a fork in order to
// pre-generate. A build that used the host's pnp.ids instead of the pinned one
// …
tests/examples/libdisplay-info/tests/libdisplay-info.cpp · 项目 tests/examples/libdisplay-info
构建 · 上游清单
- targets
display-info (lib)- language
c++23- manifest version
0.2.0- 来源
https://raw.githubusercontent.com/mcpplibs/libdisplay-info/v0.2.0/mcpp/displayinfo/mcpp.toml