blob: 2b92366616543552c76f1196a643eafcd8270d62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#ifndef PANGO_HH
#define PANGO_HH
#include <memory>
#include <pango/pangocairo.h>
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<PangoLayout, priv::GObjectDelete> unique_layout;
typedef std::unique_ptr<PangoFontDescription, priv::PangoFontDescriptionDelete>
unique_font_description;
typedef std::unique_ptr<PangoFontMetrics, priv::PangoFontMetricsDelete>
unique_font_metrics;
} // namespace pango
#endif // PANGO_HH
|