diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-07-13 15:49:25 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-07-25 00:40:33 -0400 |
commit | 3c1a325fca4867cdc7fabfab3a804c0798ce8cb2 (patch) | |
tree | f1e888f03cbad4c450cf8b006888fadbf1939c23 /pango/pango-attributes.c | |
parent | fd009f03a1263aa30cdf574664e6180dacbf31d7 (diff) | |
download | pango-3c1a325fca4867cdc7fabfab3a804c0798ce8cb2.tar.gz |
Add an attribute for showing invisible chars
Allow to opt-in to showing spaces, line breaks,
and default-ignorable chars, separately.
Diffstat (limited to 'pango/pango-attributes.c')
-rw-r--r-- | pango/pango-attributes.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c index 4db959fd..9acd6cf8 100644 --- a/pango/pango-attributes.c +++ b/pango/pango-attributes.c @@ -1206,6 +1206,31 @@ pango_attr_allow_breaks_new (gboolean allow_breaks) return pango_attr_int_new (&klass, (int)allow_breaks); } +/** + * pango_attr_show_new: + * @show: #PangoShowFlags to apply + * + * Create a new attribute that influences how invisible + * characters are rendered. + * + * Return value: (transfer full): the newly allocated #PangoAttribute, + * which should be freed with pango_attribute_destroy(). + * + * Since: 1.44 + **/ +PangoAttribute * +pango_attr_show_new (PangoShowFlags flags) +{ + static const PangoAttrClass klass = { + PANGO_ATTR_SHOW, + pango_attr_int_copy, + pango_attr_int_destroy, + pango_attr_int_equal, + }; + + return pango_attr_int_new (&klass, (int)flags); +} + /* * Attribute List */ |