From 121c41a730c257e59fd69eec0b80fe2b905a46f7 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 23 May 2020 23:40:29 +0100 Subject: remove unused text selection interface --- desktop/selection.c | 19 +++++-------------- desktop/selection.h | 10 ---------- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/desktop/selection.c b/desktop/selection.c index 4d3d335ef..417a504b3 100644 --- a/desktop/selection.c +++ b/desktop/selection.c @@ -255,26 +255,17 @@ struct selection *selection_create(struct content *c) struct selection *sel; sel = calloc(1, sizeof(struct selection)); if (sel) { - selection_prepare(sel, c); + sel->c = c; + sel->root = NULL; + sel->drag_state = DRAG_NONE; + sel->max_idx = 0; + selection_clear(sel, false); } return sel; } -/* exported interface documented in desktop/selection.h */ -void selection_prepare(struct selection *s, struct content *c) -{ - if (s) { - s->c = c; - s->root = NULL; - s->drag_state = DRAG_NONE; - s->max_idx = 0; - selection_clear(s, false); - } -} - - /* exported interface documented in desktop/selection.h */ void selection_destroy(struct selection *s) { diff --git a/desktop/selection.h b/desktop/selection.h index 1b8d91c08..8cd523fd8 100644 --- a/desktop/selection.h +++ b/desktop/selection.h @@ -56,16 +56,6 @@ void selection_drag_end(struct selection *s); */ struct selection *selection_create(struct content *c); -/** - * Prepare a newly created selection object for use. - * - * Used from text and html content handlers, riscos frontend - * - * \param s selection object - * \param c content - */ -void selection_prepare(struct selection *s, struct content *c); - /** * Destroys a selection object clearing it if nesessary * -- cgit v1.2.3