mcpp index

freedesktop.cairo

import

cairo 1.18.2 — 2D vector drawing, backends as features with X11 off by default

import freedesktop.cairo;
#include <cairo.h>

模組名讀自上游 src/cairo.cppm 裡的 `export module` 宣告。

mcpp add freedesktop.cairo@1.18.2

用法

來自本倉庫自己的測試專案 —— CI 真的編譯並執行過,不是為了網站寫的。

// cairo, via its MODULE — and this is the route that had never been checked.
//
// ⭐ WHY THIS FILE EXISTS
//
// The package exposed `import freedesktop.cairo;` and the only test that named
// it also wrote `#include <cairo.h>`. So the header supplied whatever the
// module lacked, and what it lacked was substantial:
//
//     470 names exported, and among the missing:
//       cairo_t              the single most-used type in the library
//       192 enumerators      every CAIRO_FORMAT_*, CAIRO_STATUS_*, CAIRO_OPERATOR_*
//
// It was found from OUTSIDE, by gnome.pangocairo — which cannot mix the two
// routes (pangocairo.h reaches glib and therefore <stdio.h>, so a textual
// include alongside the import makes `struct _IO_FILE` two entities) and
// therefore had to ask the module for `cairo_t` and got nothing.
//
// This file includes NOTHING. That is the whole point: if a name is missing
// from the module, this fails to compile.

#ifdef __linux__

// …

tests/examples/cairo/tests/module.cpp · 專案 tests/examples/cairo

建置 · 上游資訊清單

modules
freedesktop.cairo
targets
cairo (lib)
language
c++23
manifest version
1.18.2
dependencies
compat
來源
https://raw.githubusercontent.com/mcpplibs/cairo/v1.18.2/mcpp/cairo/mcpp.toml

版本

版本平台 鏡像sha256
1.18.2 最新 Linux GLOBAL CN 5a82cfb52365…