mcpp index

gnome.pango

import

Pango 1.56.1 — international text layout: itemisation, shaping, bidi and line breaking

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

模块名取自本索引给这个包写的测试项目。

mcpp add gnome.pango@1.56.1

用法

来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。

// ⭐ 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.pango;   // re-exports gnome.gio, and glib/gobject behind it

// ⚠️ NO <cstdio> AND NO <cstring>. The module's global fragment already saw
// <stdio.h> and <string.h> through pango.h, and reaching them TEXTUALLY as
// well makes the same `struct _IO_FILE` two entities:
//
//     error: conflicting declaration 'struct _IO_FILE'
// …

tests/examples/pango/tests/module.cpp · 项目 tests/examples/pango

构建 · 上游清单

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

版本

版本平台 镜像sha256
1.56.1 最新 Linux GLOBAL CN e9a1c28defa0…