mirror of
https://github.com/swaywm/sway.git
synced 2024-11-14 06:24:20 +01:00
2b0765b464
For full context, read
https://gitlab.freedesktop.org/cairo/cairo/-/issues/479
TL;DR, cairo’s pc file adds `/cairo` to CFLAGS.
So namespace cairo shouldn’t be used.
(cherry picked from commit d45623c2db
)
24 lines
768 B
C
24 lines
768 B
C
#ifndef _SWAY_PANGO_H
|
|
#define _SWAY_PANGO_H
|
|
#include <stdarg.h>
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <cairo.h>
|
|
#include <pango/pangocairo.h>
|
|
|
|
/**
|
|
* Utility function which escape characters a & < > ' ".
|
|
*
|
|
* The function returns the length of the escaped string, optionally writing the
|
|
* escaped string to dest if provided.
|
|
*/
|
|
size_t escape_markup_text(const char *src, char *dest);
|
|
PangoLayout *get_pango_layout(cairo_t *cairo, const char *font,
|
|
const char *text, double scale, bool markup);
|
|
void get_text_size(cairo_t *cairo, const char *font, int *width, int *height,
|
|
int *baseline, double scale, bool markup, const char *fmt, ...);
|
|
void pango_printf(cairo_t *cairo, const char *font,
|
|
double scale, bool markup, const char *fmt, ...);
|
|
|
|
#endif
|