diff options
Diffstat (limited to 'pango/pango-line-breaker.c')
-rw-r--r-- | pango/pango-line-breaker.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/pango/pango-line-breaker.c b/pango/pango-line-breaker.c index 8a2a9bd9..3461e021 100644 --- a/pango/pango-line-breaker.c +++ b/pango/pango-line-breaker.c @@ -1,7 +1,7 @@ #include "config.h" #include "pango-line-breaker.h" -#include "pango-layout-line-private.h" +#include "pango-line-private.h" #include "pango-tabs.h" #include "pango-impl-utils.h" @@ -28,7 +28,7 @@ * to influence the formatting. * * Then you can call [method@Pango.LineBreaker.next_line] repeatedly to obtain - * `PangoLayoutLine` objects for the text, one by one. The parameters that are + * `PangoLine` objects for the text, one by one. The parameters that are * passed to `pango_line_breaker_next_line`, as well as properties of the * `PangoLineBreaker` can be changed from call to call. For example, you can * pass `PANGO_ELLIPSIZE_END` to consume the remaining text with a single, @@ -39,7 +39,7 @@ * is to add them to a [class@Pango.Lines] object, together with positioning * information. Before doing so, you can tweak the line or its offset, for * example to implement alignment and justification (for the latter, see - * [method@Pango.LayoutLine.justify]). + * [method@Pango.Line.justify]). * * `PangoLineBreaker` is meant to enable use cases like flowing text around * images, shaped paragraphs or multi-column layout. For simple formatting @@ -412,7 +412,7 @@ get_resolved_dir (PangoLineBreaker *self) static gboolean should_ellipsize_current_line (PangoLineBreaker *self, - PangoLayoutLine *line) + PangoLine *line) { return self->line_ellipsize != PANGO_ELLIPSIZE_NONE && self->line_width >= 0; } @@ -453,7 +453,7 @@ get_decimal_prefix_width (PangoItem *item, } static int -pango_line_compute_width (PangoLayoutLine *line) +pango_line_compute_width (PangoLine *line) { int width = 0; @@ -471,7 +471,7 @@ pango_line_compute_width (PangoLayoutLine *line) static inline int get_line_width (PangoLineBreaker *self, - PangoLayoutLine *line) + PangoLine *line) { if (self->remaining_width > -1) return self->line_width - self->remaining_width; @@ -610,7 +610,7 @@ pad_glyphstring_left (PangoLineBreaker *self, } static gboolean -is_tab_run (PangoLayoutLine *line, +is_tab_run (PangoLine *line, PangoGlyphItem *run) { return line->data->text[run->item->offset] == '\t'; @@ -686,7 +686,7 @@ reorder_runs_recurse (GSList *items, } static void -pango_line_reorder (PangoLayoutLine *line) +pango_line_reorder (PangoLine *line) { GSList *logical_runs = line->runs; GSList *tmp_list; @@ -724,7 +724,7 @@ pango_line_reorder (PangoLayoutLine *line) } static int -compute_n_chars (PangoLayoutLine *line) +compute_n_chars (PangoLine *line) { int n_chars = 0; @@ -742,7 +742,7 @@ compute_n_chars (PangoLayoutLine *line) static void get_tab_pos (PangoLineBreaker *self, - PangoLayoutLine *line, + PangoLine *line, int index, int *tab_pos, PangoTabAlign *alignment, @@ -818,7 +818,7 @@ get_tab_pos (PangoLineBreaker *self, static void shape_tab (PangoLineBreaker *self, - PangoLayoutLine *line, + PangoLine *line, int current_width, PangoItem *item, PangoGlyphString *glyphs) @@ -921,7 +921,7 @@ distribute_letter_spacing (int letter_spacing, static PangoGlyphString * shape_run (PangoLineBreaker *self, - PangoLayoutLine *line, + PangoLine *line, PangoItem *item) { PangoGlyphString *glyphs = pango_glyph_string_new (); @@ -1010,7 +1010,7 @@ free_run (PangoGlyphItem *run, } static PangoItem * -uninsert_run (PangoLayoutLine *line) +uninsert_run (PangoLine *line) { PangoGlyphItem *run; PangoItem *item; @@ -1031,7 +1031,7 @@ uninsert_run (PangoLayoutLine *line) static void insert_run (PangoLineBreaker *self, - PangoLayoutLine *line, + PangoLine *line, PangoItem *run_item, PangoGlyphString *glyphs, gboolean last_run) @@ -1250,10 +1250,10 @@ typedef enum static BreakResult process_item (PangoLineBreaker *self, - PangoLayoutLine *line, - gboolean force_fit, - gboolean no_break_at_end, - gboolean is_last_item) + PangoLine *line, + gboolean force_fit, + gboolean no_break_at_end, + gboolean is_last_item) { PangoItem *item = self->items->data; gboolean shape_set = FALSE; @@ -1596,7 +1596,7 @@ retry_break: static void process_line (PangoLineBreaker *self, - PangoLayoutLine *line) + PangoLine *line) { gboolean have_break = FALSE; /* If we've seen a possible break yet */ int break_remaining_width = 0; /* Remaining width before adding run with break */ @@ -1711,7 +1711,7 @@ done: static void add_missing_hyphen (PangoLineBreaker *self, - PangoLayoutLine *line) + PangoLine *line) { PangoGlyphItem *run; PangoItem *item; @@ -1754,7 +1754,7 @@ add_missing_hyphen (PangoLineBreaker *self, static void zero_line_final_space (PangoLineBreaker *self, - PangoLayoutLine *line) + PangoLine *line) { PangoGlyphItem *run; PangoItem *item; @@ -1813,7 +1813,7 @@ zero_line_final_space (PangoLineBreaker *self, */ static void adjust_line_letter_spacing (PangoLineBreaker *self, - PangoLayoutLine *line) + PangoLine *line) { gboolean reversed; PangoGlyphItem *last_run; @@ -2024,7 +2024,7 @@ collect_baseline_shift (PangoLineBreaker *self, static void apply_baseline_shift (PangoLineBreaker *self, - PangoLayoutLine *line) + PangoLine *line) { int y_offset = 0; PangoItem *prev = NULL; @@ -2052,7 +2052,7 @@ apply_baseline_shift (PangoLineBreaker *self, static void apply_render_attributes (PangoLineBreaker *self, - PangoLayoutLine *line) + PangoLine *line) { GSList *runs; @@ -2079,7 +2079,7 @@ apply_render_attributes (PangoLineBreaker *self, static void postprocess_line (PangoLineBreaker *self, - PangoLayoutLine *line) + PangoLine *line) { add_missing_hyphen (self, line); @@ -2092,7 +2092,7 @@ postprocess_line (PangoLineBreaker *self, apply_baseline_shift (self, line); if (should_ellipsize_current_line (self, line)) - pango_layout_line_ellipsize (line, self->context, self->line_ellipsize, self->line_width); + pango_line_ellipsize (line, self->context, self->line_ellipsize, self->line_width); /* Now convert logical to visual order */ pango_line_reorder (line); @@ -2485,14 +2485,14 @@ pango_line_breaker_has_line (PangoLineBreaker *self) * Returns: (transfer full) (nullable): the next line, or `NULL` * if @self has no more input */ -PangoLayoutLine * +PangoLine * pango_line_breaker_next_line (PangoLineBreaker *self, int x, int width, PangoWrapMode wrap, PangoEllipsizeMode ellipsize) { - PangoLayoutLine *line; + PangoLine *line; g_return_val_if_fail (PANGO_IS_LINE_BREAKER (self), NULL); @@ -2501,7 +2501,7 @@ pango_line_breaker_next_line (PangoLineBreaker *self, if (!self->items) return NULL; - line = pango_layout_line_new (self->context, self->data); + line = pango_line_new (self->context, self->data); line->start_index = self->line_start_index; line->start_offset = self->line_start_offset; @@ -2544,7 +2544,7 @@ pango_line_breaker_next_line (PangoLineBreaker *self, g_clear_pointer (&self->render_attrs, pango_attr_list_unref); } - pango_layout_line_check_invariants (line); + pango_line_check_invariants (line); return line; } @@ -2570,7 +2570,7 @@ pango_line_breaker_next_line (PangoLineBreaker *self, */ gboolean pango_line_breaker_undo_line (PangoLineBreaker *self, - PangoLayoutLine *line) + PangoLine *line) { if (self->data == NULL && line->start_index == 0 && line->length == line->data->length) |