[pango/serializer-rewrite: 1/2] tabs: Add a missing setter
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/serializer-rewrite: 1/2] tabs: Add a missing setter
- Date: Tue, 30 Nov 2021 18:18:32 +0000 (UTC)
commit 249650715f85cabee1968b702b0fa2d1b2c36c43
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Nov 30 13:02:08 2021 -0500
tabs: Add a missing setter
Add pango_tab_array_set_positions_in_pixels, to help
the serializer out.
pango/pango-tabs.c | 19 +++++++++++++++++++
pango/pango-tabs.h | 4 ++++
2 files changed, 23 insertions(+)
---
diff --git a/pango/pango-tabs.c b/pango/pango-tabs.c
index 27ae3be8..c30a7cc2 100644
--- a/pango/pango-tabs.c
+++ b/pango/pango-tabs.c
@@ -369,6 +369,25 @@ pango_tab_array_get_positions_in_pixels (PangoTabArray *tab_array)
return tab_array->positions_in_pixels;
}
+/**
+ * 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 0792a36a..b0e06c1b 100644
--- a/pango/pango-tabs.h
+++ b/pango/pango-tabs.h
@@ -93,6 +93,10 @@ void pango_tab_array_get_tabs (PangoTabArray *tab_array,
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]