summaryrefslogtreecommitdiff
path: root/pango
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-11-30 13:02:08 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-12-02 17:57:42 -0500
commitf15cf8af0b14c6a4c60ce6de8a73f2fe6ac63541 (patch)
treecba1ce4fccc9f955556f810c8bafbe41940c1695 /pango
parent50d630321da94186fe46590574b79c1d7f631605 (diff)
downloadpango-f15cf8af0b14c6a4c60ce6de8a73f2fe6ac63541.tar.gz
tabs: Add a missing setter
Add pango_tab_array_set_positions_in_pixels, to help the serializer out.
Diffstat (limited to 'pango')
-rw-r--r--pango/pango-tabs.c19
-rw-r--r--pango/pango-tabs.h4
2 files changed, 23 insertions, 0 deletions
diff --git a/pango/pango-tabs.c b/pango/pango-tabs.c
index 0665161c..ab01cfe5 100644
--- a/pango/pango-tabs.c
+++ b/pango/pango-tabs.c
@@ -370,6 +370,25 @@ pango_tab_array_get_positions_in_pixels (PangoTabArray *tab_array)
}
/**
+ * pango_tab_array_set_positions_in_pixels:
+ * @tab_array: a `PangoTabArray`
+ * @positions_in_pixels: whether positions are in pixels
+ *
+ * Sets whether positions in this array are specified in
+ * pixels.
+ *
+ * Since: 1.50
+ */
+void
+pango_tab_array_set_positions_in_pixels (PangoTabArray *tab_array,
+ gboolean positions_in_pixels)
+{
+ g_return_if_fail (tab_array != NULL);
+
+ tab_array->positions_in_pixels = positions_in_pixels;
+}
+
+/**
* pango_tab_array_to_string:
* @tab_array: a `PangoTabArray`
*
diff --git a/pango/pango-tabs.h b/pango/pango-tabs.h
index 8ca94fdb..a804977b 100644
--- a/pango/pango-tabs.h
+++ b/pango/pango-tabs.h
@@ -94,6 +94,10 @@ PANGO_AVAILABLE_IN_ALL
gboolean pango_tab_array_get_positions_in_pixels (PangoTabArray *tab_array);
PANGO_AVAILABLE_IN_1_50
+void pango_tab_array_set_positions_in_pixels (PangoTabArray *tab_array,
+ gboolean positions_in_pixels);
+
+PANGO_AVAILABLE_IN_1_50
char * pango_tab_array_to_string (PangoTabArray *tab_array);
PANGO_AVAILABLE_IN_1_50
PangoTabArray * pango_tab_array_from_string (const char *text);