From eb5fd01c5aa7759bc626b9604bc786ea6c492a35 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Fri, 17 Jul 2020 11:45:25 +0200 Subject: Break out MonMon parts that are unrelated to Icecc to a separate class --- src/pango.hh | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/pango.hh (limited to 'src/pango.hh') diff --git a/src/pango.hh b/src/pango.hh new file mode 100644 index 0000000..2b92366 --- /dev/null +++ b/src/pango.hh @@ -0,0 +1,41 @@ +#ifndef PANGO_HH +#define PANGO_HH + +#include +#include + +namespace pango { + +namespace priv { + +struct GObjectDelete { + void operator()(gpointer ptr) const { + g_object_unref(ptr); + } +}; + +struct PangoFontMetricsDelete { + void operator()(PangoFontMetrics* ptr) const { + pango_font_metrics_unref(ptr); + } +}; + +struct PangoFontDescriptionDelete { + void operator()(PangoFontDescription* ptr) const { + pango_font_description_free(ptr); + } +}; + +} // namespace priv + +typedef std::unique_ptr unique_layout; + +typedef std::unique_ptr + unique_font_description; + +typedef std::unique_ptr + unique_font_metrics; + +} // namespace pango + +#endif // PANGO_HH -- cgit v1.3