mcpp index

gnome.pangocairo

import

PangoCairo 1.56.1 — pango's cairo rendering backend, the usual entry point

import gnome.pangocairo;
#include <pango/pangocairo.h>

Module name taken from this index's own test project for the package.

mcpp add gnome.pangocairo@1.56.1

Usage

From this repository's own test project — built and run by CI, not written for the website.

// ⭐ THE MODULE, WHICH IS WHAT THE NAMESPACE PROMISES.
//
// In this index the namespace is the contract: `compat.xxx` is consumed with
// `#include`, an owner namespace like `gnome.xxx` exposes `import`. The test
// next to this file takes the header route; this one takes the module, so both
// doors are tested rather than assumed.
//
// ⚠️ THE TWO DOORS DO NOT COMPOSE. A TU that imports the module AND textually
// includes a pango or glib header reaches <time.h> twice — once through the
// module's global fragment, once directly — and the same `struct tm` becomes
// two entities. So a consumer picks ONE, and which one is decided by macros:
// a module cannot carry them. Code using `PANGO_TYPE_*` or `G_OBJECT` takes
// the header route; code using the function API imports and includes nothing.
#ifdef __linux__

import gnome.pangocairo;   // re-exports gnome.pango and gnome.pangoft2

int main()
{
    int failures = 0;
    auto check = [&](bool ok, const char *what) {
        g_print("%-58s %s\n", what, ok ? "ok" : "FAILED");
// …

tests/examples/pangocairo/tests/module.cpp · project tests/examples/pangocairo

Build · upstream manifest

targets
pangocairo-1_0 (lib), pangocairo (lib)
language
c++23
manifest version
1.56.1
dependencies
gnome, freedesktop
source
https://raw.githubusercontent.com/mcpplibs/pango/1.56.1/mcpp/pangocairo/mcpp.toml

Versions

VersionPlatforms Mirrorssha256
1.56.1 latest Linux GLOBAL CN e9a1c28defa0…