summaryrefslogtreecommitdiff
path: root/pango/ellipsize.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/ellipsize.c')
-rw-r--r--pango/ellipsize.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/pango/ellipsize.c b/pango/ellipsize.c
index 7f121a80..ebe8a684 100644
--- a/pango/ellipsize.c
+++ b/pango/ellipsize.c
@@ -23,7 +23,6 @@
#include <string.h>
#include "pango-glyph-item.h"
-#include "pango-layout-private.h"
#include "pango-font-private.h"
#include "pango-attributes-private.h"
#include "pango-impl-utils.h"
@@ -744,58 +743,6 @@ current_width (EllipsizeState *state)
return state->total_width - (state->gap_end_x - state->gap_start_x) + state->ellipsis_width;
}
-/**
- * _pango_layout_line_ellipsize:
- * @line: a `PangoLayoutLine`
- * @attrs: Attributes being used for itemization/shaping
- * @shape_flags: Flags to use when shaping
- *
- * Given a `PangoLayoutLine` with the runs still in logical order, ellipsize
- * it according the layout's policy to fit within the set width of the layout.
- *
- * Return value: whether the line had to be ellipsized
- **/
-gboolean
-_pango_layout_line_ellipsize (PangoLayoutLine *line,
- PangoAttrList *attrs,
- PangoShapeFlags shape_flags,
- int goal_width)
-{
- PangoLayout *layout = line->layout;
- PangoContext *context = layout->context;
- const char *text = layout->text;
- PangoLogAttr *log_attrs = layout->log_attrs;
- PangoEllipsizeMode ellipsize = layout->ellipsize;
- EllipsizeState state;
- gboolean is_ellipsized = FALSE;
-
- g_return_val_if_fail (ellipsize != PANGO_ELLIPSIZE_NONE && goal_width >= 0, is_ellipsized);
-
- init_state (&state, context, text, line->start_index, log_attrs, ellipsize, line->runs, attrs, shape_flags);
-
- if (state.total_width <= goal_width)
- goto out;
-
- find_initial_span (&state);
-
- while (current_width (&state) > goal_width)
- {
- if (!remove_one_span (&state))
- break;
- }
-
- fixup_ellipsis_run (&state, MAX (goal_width - current_width (&state), 0));
-
- g_slist_free (line->runs);
- line->runs = get_run_list (&state);
- is_ellipsized = TRUE;
-
- out:
- free_state (&state);
-
- return is_ellipsized;
-}
-
void
pango_line_ellipsize (PangoLine *line,
PangoContext *context,