mcpp index

freedesktop.libdisplay-info

import

libdisplay-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

版本

版本平台 鏡像sha256
0.2.0 最新 Linux GLOBAL CN 8b2238a7b275…