diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-11-29 13:59:31 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-11-29 13:59:31 +0000 |
commit | 7b8d9efa987435a5214092157f032f9d65285d7e (patch) | |
tree | 10258cfd4975ec782c26942ca7bffbfedd396ec0 /pango/pango-tabs.h | |
parent | edebfaed39a41f815319fdc925fbf81c36a92f90 (diff) | |
parent | 52b1d2aa246e71642d2b3a1388899ce0e23bcbdd (diff) | |
download | pango-7b8d9efa987435a5214092157f032f9d65285d7e.tar.gz |
Merge branch 'tab-align' into 'main'
Support tab alignment
Closes #34
See merge request GNOME/pango!527
Diffstat (limited to 'pango/pango-tabs.h')
-rw-r--r-- | pango/pango-tabs.h | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/pango/pango-tabs.h b/pango/pango-tabs.h index d2a68d5a..0792a36a 100644 --- a/pango/pango-tabs.h +++ b/pango/pango-tabs.h @@ -30,21 +30,27 @@ typedef struct _PangoTabArray PangoTabArray; /** * PangoTabAlign: - * @PANGO_TAB_LEFT: the tab stop appears to the left of the text. + * @PANGO_TAB_LEFT: the text appears to the right of the tab stop position + * @PANGO_TAB_RIGHT: the text appears to the left of the tab stop position + * until the available space is filled + * @PANGO_TAB_CENTER: the text is centered at the tab stop position + * until the available space is filled + * @PANGO_TAB_DECIMAL: text before the first '.' appears to the left of the + * tab stop position (until the available space is filled), the rest to + * the right * - * `PangoTabAlign` specifies where a tab stop appears relative to the text. + * `PangoTabAlign` specifies where the text appears relative to the tab stop + * position. + * + * Support for tab alignments other than %PANGO_TAB_LEFT was added + * in Pango 1.50. */ typedef enum { - PANGO_TAB_LEFT - - /* These are not supported now, but may be in the - * future. - * - * PANGO_TAB_RIGHT, - * PANGO_TAB_CENTER, - * PANGO_TAB_NUMERIC - */ + PANGO_TAB_LEFT, + PANGO_TAB_RIGHT, + PANGO_TAB_CENTER, + PANGO_TAB_DECIMAL } PangoTabAlign; #define PANGO_TYPE_TAB_ARRAY (pango_tab_array_get_type ()) @@ -92,6 +98,13 @@ char * pango_tab_array_to_string (PangoTabArray *tab_array); PANGO_AVAILABLE_IN_1_50 PangoTabArray * pango_tab_array_from_string (const char *text); +PANGO_AVAILABLE_IN_1_50 +void pango_tab_array_set_decimal_point (PangoTabArray *tab_array, + int tab_index, + gunichar decimal_point); +PANGO_AVAILABLE_IN_1_50 +gunichar pango_tab_array_get_decimal_point (PangoTabArray *tab_array, + int tab_index); G_DEFINE_AUTOPTR_CLEANUP_FUNC(PangoTabArray, pango_tab_array_free) |