rotulus 0.2.2

A GTK4 scrollback view for text-stream chat
Documentation
[package]
name = "rotulus"
rust-version.workspace = true
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
description = "A GTK4 scrollback view for text-stream chat"
readme = "../../README.md"
keywords = ["gtk4", "chat", "scrollback", "widget", "irc"]
categories = ["gui"]

[lib]
# rlib only. An application that links its Rust statically bundles this
# into its own staticlib, as GtkHx does, and a second staticlib here would
# define the #[no_mangle] C exports twice at that application's final link.
# The C shared library is Meson's to build: it asks cargo for a staticlib
# of this crate for that build alone (see meson.build).
crate-type = ["rlib"]

[features]
default = ["mirc"]
# rotulus_mirc_parse, the C entry point to rotulus-mirc.
mirc = ["dep:rotulus-mirc"]
# GtkAccessibleText, so a screen reader can read the transcript. The
# interface arrived in GTK 4.14; without the feature the view builds
# against 4.10 and exposes only its role.
v4_14 = ["gtk4/v4_14"]
# GtkAccessibleText's extents and offset, so a screen reader can find
# text on screen and magnifiers can follow it. GTK 4.16.
v4_16 = ["v4_14", "gtk4/v4_16"]
# For the C shared library that Meson builds, and nothing else. Its caller
# initializes GTK, as any C program does, so gtk4-rs's check that Rust did
# is switched off. The introspection scanner needs that too: it builds the
# widget's class without ever initializing GTK, and the check aborts it.
capi = ["gtk4/unsafe-assume-initialized"]

[dependencies]
rotulus-mirc = { workspace = true, optional = true }
# The layout engine. All the interesting logic lives there and is tested
# headless; this crate is the GTK skin over it.
rotulus-layout = { workspace = true }
glib = { workspace = true }
gtk4 = { workspace = true, features = ["v4_10"] }
# Pango directly, for the TextMeasure implementation and the shaped
# layouts the snapshot pass hands to GSK.
pango = "0.22"
pangocairo = "0.22"

# docs.rs builds without GTK installed, which the gtk-rs crates allow for;
# the feature shows the accessibility interface in the docs.
[package.metadata.docs.rs]
features = ["v4_14"]

[[test]]
name = "render"
# The single-column scene builds its lines through the mIRC parser.
required-features = ["mirc"]