freedesktop.cairo
importcairo 1.18.2 — 2D vector drawing, backends as features with X11 off by default
import freedesktop.cairo;
#include <cairo.h>
Module name read from the upstream `export module` declaration in src/cairo.cppm.
mcpp add freedesktop.cairo@1.18.2
Usage
From this repository's own test project — built and run by CI, not written for the website.
// 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 · project tests/examples/cairo
Build · upstream manifest
- modules
freedesktop.cairo- targets
cairo (lib)- language
c++23- manifest version
1.18.2- dependencies
compat- source
https://raw.githubusercontent.com/mcpplibs/cairo/v1.18.2/mcpp/cairo/mcpp.toml