[gtk/f16c.msvc: 18/61] textlayout: Remove an unused function
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/f16c.msvc: 18/61] textlayout: Remove an unused function
- Date: Mon, 12 Apr 2021 10:13:26 +0000 (UTC)
commit 569c3ac2de5366263d1aabf93f3967ca9124e958
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Apr 5 08:47:02 2021 -0400
textlayout: Remove an unused function
gtk/gtktextlayout.c | 57 ----------------------------------------------
gtk/gtktextlayoutprivate.h | 4 ----
2 files changed, 61 deletions(-)
---
diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c
index 2f53d945fa..0d808d6bfb 100644
--- a/gtk/gtktextlayout.c
+++ b/gtk/gtktextlayout.c
@@ -671,63 +671,6 @@ gtk_text_layout_cursors_changed (GtkTextLayout *layout,
gtk_text_layout_emit_changed (layout, y, old_height, new_height);
}
-
-/*
- * gtk_text_layout_get_lines:
- *
- * Returns: (element-type GtkTextLine) (transfer container):
- */
-GPtrArray *
-gtk_text_layout_get_lines (GtkTextLayout *layout,
- /* [top_y, bottom_y) */
- int top_y,
- int bottom_y,
- int *first_line_y)
-{
- GtkTextBTree *btree;
- GtkTextLine *first_btree_line;
- GtkTextLine *last_btree_line;
- GtkTextLine *line;
- GPtrArray *lines;
-
- g_return_val_if_fail (GTK_IS_TEXT_LAYOUT (layout), NULL);
-
- if (top_y >= bottom_y)
- return NULL;
-
- btree = _gtk_text_buffer_get_btree (layout->buffer);
-
- first_btree_line = _gtk_text_btree_find_line_by_y (btree, layout, top_y, first_line_y);
- if (first_btree_line == NULL)
- {
- /* off the bottom */
- return NULL;
- }
-
- /* -1 since bottom_y is one past */
- last_btree_line = _gtk_text_btree_find_line_by_y (btree, layout, bottom_y - 1, NULL);
-
- if (!last_btree_line)
- last_btree_line = _gtk_text_btree_get_end_iter_line (btree);
-
- g_assert (last_btree_line != NULL);
-
- lines = g_ptr_array_sized_new (32);
-
- line = first_btree_line;
- while (TRUE)
- {
- g_ptr_array_add (lines, line);
-
- if (line == last_btree_line)
- break;
-
- line = _gtk_text_line_next_excluding_last (line);
- }
-
- return lines;
-}
-
static void
invalidate_cached_style (GtkTextLayout *layout)
{
diff --git a/gtk/gtktextlayoutprivate.h b/gtk/gtktextlayoutprivate.h
index fc07fcbb6f..66676c7e7a 100644
--- a/gtk/gtktextlayoutprivate.h
+++ b/gtk/gtktextlayoutprivate.h
@@ -254,10 +254,6 @@ gboolean gtk_text_layout_get_cursor_visible (GtkTextLayout *layout);
void gtk_text_layout_get_size (GtkTextLayout *layout,
int *width,
int *height);
-GPtrArray *gtk_text_layout_get_lines (GtkTextLayout *layout,
- int top_y,
- int bottom_y,
- int *first_line_y);
void gtk_text_layout_wrap_loop_start (GtkTextLayout *layout);
void gtk_text_layout_wrap_loop_end (GtkTextLayout *layout);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]