summaryrefslogtreecommitdiff
path: root/pango/pango-attributes.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-07-20 10:34:15 -0700
committerMatthias Clasen <mclasen@redhat.com>2019-07-20 11:56:18 -0700
commit62580f2fa5e46d51bb2377d4028471926108bab3 (patch)
tree7472f8a4fb33d6822b4cb853e43e0b38124af542 /pango/pango-attributes.h
parente8f20b6116cca605115b42d5e0a15112193a3bad (diff)
downloadpango-62580f2fa5e46d51bb2377d4028471926108bab3.tar.gz
Add an allow-breaks attribute
Add a new attribute type, and parse allow_breaks="false" in markup. This is useful to prevent hyphenation of words.
Diffstat (limited to 'pango/pango-attributes.h')
-rw-r--r--pango/pango-attributes.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h
index cff495b2..4249f8f4 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -147,6 +147,7 @@ typedef struct _PangoAttrIterator PangoAttrIterator;
* @PANGO_ATTR_FONT_FEATURES: OpenType font features (#PangoAttrString). Since 1.38
* @PANGO_ATTR_FOREGROUND_ALPHA: foreground alpha (#PangoAttrInt). Since 1.38
* @PANGO_ATTR_BACKGROUND_ALPHA: background alpha (#PangoAttrInt). Since 1.38
+ * @PANGO_ATTR_ALLOW_BREAKS: whether breaks are allowed (#PangoAttrInt). Since 1.44
*
* The #PangoAttrType
* distinguishes between different types of attributes. Along with the
@@ -182,7 +183,8 @@ typedef enum
PANGO_ATTR_GRAVITY_HINT, /* PangoAttrInt */
PANGO_ATTR_FONT_FEATURES, /* PangoAttrString */
PANGO_ATTR_FOREGROUND_ALPHA, /* PangoAttrInt */
- PANGO_ATTR_BACKGROUND_ALPHA /* PangoAttrInt */
+ PANGO_ATTR_BACKGROUND_ALPHA, /* PangoAttrInt */
+ PANGO_ATTR_ALLOW_BREAKS /* PangoAttrInt */
} PangoAttrType;
/**
@@ -522,6 +524,8 @@ PANGO_AVAILABLE_IN_1_38
PangoAttribute *pango_attr_foreground_alpha_new (guint16 alpha);
PANGO_AVAILABLE_IN_1_38
PangoAttribute *pango_attr_background_alpha_new (guint16 alpha);
+PANGO_AVAILABLE_IN_1_44
+PangoAttribute *pango_attr_allow_breaks_new (gboolean allow_breaks);
PANGO_AVAILABLE_IN_ALL
GType pango_attr_list_get_type (void) G_GNUC_CONST;