[pango/attribute-boxes] Make PangoAttribute a boxed type
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/attribute-boxes] Make PangoAttribute a boxed type
- Date: Thu, 11 Jul 2019 04:38:27 +0000 (UTC)
commit 3d5b7c10fbe63c069af4c140126c2295d1b75016
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Jul 11 00:37:24 2019 -0400
Make PangoAttribute a boxed type
Based on a patch by Matijs van Zuijlen <matijs matijs net>.
Closes https://gitlab.gnome.org/GNOME/pango/issues/259
pango/pango-attributes.c | 4 ++++
pango/pango-attributes.h | 3 +++
2 files changed, 7 insertions(+)
---
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c
index df3104f0..85e5a240 100644
--- a/pango/pango-attributes.c
+++ b/pango/pango-attributes.c
@@ -192,6 +192,10 @@ pango_attribute_destroy (PangoAttribute *attr)
attr->klass->destroy (attr);
}
+G_DEFINE_BOXED_TYPE (PangoAttribute, pango_attribute,
+ pango_attribute_copy,
+ pango_attribute_destroy);
+
/**
* pango_attribute_equal:
* @attr1: a #PangoAttribute
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h
index e9b19571..cff495b2 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -56,6 +56,9 @@ struct _PangoColor
PANGO_AVAILABLE_IN_ALL
GType pango_color_get_type (void) G_GNUC_CONST;
+PANGO_AVAILABLE_IN_ALL
+GType pango_attribute_get_type (void) G_GNUC_CONST;
+
PANGO_AVAILABLE_IN_ALL
PangoColor *pango_color_copy (const PangoColor *src);
PANGO_AVAILABLE_IN_ALL
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]