summaryrefslogtreecommitdiff
path: root/pango/pango-attributes.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-08-22 11:44:25 +0200
committerMatthias Clasen <mclasen@redhat.com>2019-10-31 21:23:59 -0400
commit27ede8c45f011d5351a38019332f6f3f85c83a32 (patch)
tree05636f340e78aa75e42dc3b17187781e7fc29759 /pango/pango-attributes.h
parent85bdfead1b36945db251df22b2db6789cbf4cd6c (diff)
downloadpango-27ede8c45f011d5351a38019332f6f3f85c83a32.tar.gz
Add an overline attribute
Add a new PangoOverline enum, and overline and overline_color attributes, which parallel the attributes we have for underlines and strikethrough. For now, the enum just has 'none' and 'single' values.
Diffstat (limited to 'pango/pango-attributes.h')
-rw-r--r--pango/pango-attributes.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h
index ceb3236a..7def13ab 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -150,6 +150,8 @@ typedef struct _PangoAttrIterator PangoAttrIterator;
* @PANGO_ATTR_ALLOW_BREAKS: whether breaks are allowed (#PangoAttrInt). Since 1.44
* @PANGO_ATTR_SHOW: how to render invisible characters (#PangoAttrInt). Since 1.44
* @PANGO_ATTR_INSERT_HYPHENS: whether to insert hyphens at intra-word line breaks (#PangoAttrInt). Since 1.44
+ * @PANGO_ATTR_OVERLINE: whether the text has an overline (#PangoAttrInt). Sincd 1.46
+ * @PANGO_ATTR_OVERLINE_COLOR: overline color (#PangoAttrColor). Since 1.46
*
* The #PangoAttrType
* distinguishes between different types of attributes. Along with the
@@ -189,6 +191,8 @@ typedef enum
PANGO_ATTR_ALLOW_BREAKS, /* PangoAttrInt */
PANGO_ATTR_SHOW, /* PangoAttrInt */
PANGO_ATTR_INSERT_HYPHENS, /* PangoAttrInt */
+ PANGO_ATTR_OVERLINE, /* PangoAttrInt */
+ PANGO_ATTR_OVERLINE_COLOR, /* PangoAttrColor */
} PangoAttrType;
/**
@@ -232,6 +236,24 @@ typedef enum {
PANGO_UNDERLINE_ERROR_LINE
} PangoUnderline;
+
+/**
+ * PangoOverline:
+ * @PANGO_OVERLINE_NONE: no overline should be drawn
+ * @PANGO_OVERLINE_SINGLE: Draw a single line above the ink
+ * extents of the text being underlined.
+ *
+ * The #PangoOverline enumeration is used to specify
+ * whether text should be overlined, and if so, the type
+ * of line.
+ *
+ * Since: 1.46
+ */
+typedef enum {
+ PANGO_OVERLINE_NONE,
+ PANGO_OVERLINE_SINGLE
+} PangoOverline;
+
/**
* PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING:
*
@@ -545,6 +567,13 @@ PangoAttribute *pango_attr_allow_breaks_new (gboolean allow_breaks);
PANGO_AVAILABLE_IN_1_44
PangoAttribute *pango_attr_insert_hyphens_new (gboolean insert_hyphens);
+PANGO_AVAILABLE_IN_1_46
+PangoAttribute *pango_attr_overline_new (PangoOverline overline);
+PANGO_AVAILABLE_IN_1_46
+PangoAttribute *pango_attr_overline_color_new (guint16 red,
+ guint16 green,
+ guint16 blue);
+
/**
* PangoShowFlags:
* @PANGO_SHOW_NONE: No special treatment for invisible characters