From c453d5c3ba41af61975a83ea553b41e410d88ae2 Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Thu, 20 Aug 2026 23:16:01 +0200 Subject: colitur-mu: an editable microui front-end, and its Xlib backend Same data as colitur-x, but the invocation is editable: year, language, book-name form and numbering tradition are buttons that re-run colitur. No calendar logic is reimplemented; the status line shows the exact command that produced what is on screen. microui (MIT, rxi) is vendored rather than packaged -- a copied-in dependency cannot rot, which is the whole reason to prefer it over a toolkit here. mu_x11.c carries one bug worth recording: microui resets its scissor with an unclipped rect of 0x1000000, and XRectangle's w/h are unsigned short, so it truncated to 0 and turned 'clip nothing' into 'clip everything'. A panel drew its first screenful and the rest vanished. --- mu_x11.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 mu_x11.h (limited to 'mu_x11.h') diff --git a/mu_x11.h b/mu_x11.h new file mode 100644 index 0000000..056fcd5 --- /dev/null +++ b/mu_x11.h @@ -0,0 +1,9 @@ +#ifndef MU_X11_H +#define MU_X11_H +#include +#include "vendor/microui.h" +void mux_init(Display *d, Window w, const char *fontname); +int mux_text_width(mu_Font font, const char *s, int len); +int mux_text_height(mu_Font font); +void mux_present(mu_Context *ctx, int w, int h, mu_Color bg); +#endif -- cgit v1.3