From e92dd5bf6a3c692ba155773f65b61b3cfce27c29 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 29 Apr 2013 21:55:32 +0100 Subject: Remove dead stuff from the selection_ api surface. --- desktop/selection.c | 28 +--------------------------- desktop/selection.h | 6 +----- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/desktop/selection.c b/desktop/selection.c index 6a93c6133..e8978d448 100644 --- a/desktop/selection.c +++ b/desktop/selection.c @@ -83,7 +83,7 @@ static bool traverse_tree(struct box *box, unsigned start_idx, unsigned end_idx, seln_traverse_handler handler, void *handle, save_text_whitespace *before, bool *first, bool do_marker); - +static unsigned selection_label_subtree(struct box *box, unsigned idx); /** * Get the browser window containing the content a selection object belongs to. @@ -990,29 +990,3 @@ bool selection_highlighted(const struct selection *s, return true; } - - -/** - * Adjust the selection to reflect a change in the selected text, - * eg. editing in a text area/input field. - * - * \param s selection object - * \param byte_offset byte offset of insertion/removal point - * \param change byte size of change, +ve = insertion, -ve = removal - * \param redraw true iff the screen should be updated - */ - -void selection_update(struct selection *s, size_t byte_offset, - int change, bool redraw) -{ - if (selection_defined(s) && - byte_offset >= s->start_idx && - byte_offset < s->end_idx) - { - if (change > 0) - s->end_idx += change; - else - s->end_idx += - max(change, (int)(byte_offset - s->end_idx)); - } -} diff --git a/desktop/selection.h b/desktop/selection.h index 68f60b9be..5e3286fc5 100644 --- a/desktop/selection.h +++ b/desktop/selection.h @@ -99,11 +99,7 @@ bool selection_highlighted(const struct selection *s, unsigned start, unsigned end, unsigned *start_idx, unsigned *end_idx); -bool selection_save_text(struct selection *s, const char *path); - void selection_update(struct selection *s, size_t byte_offset, int change, - bool redraw); - -unsigned selection_label_subtree(struct box *box, unsigned idx); + bool redraw); #endif -- cgit v1.2.3