diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-04-29 21:55:32 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-05-02 09:34:01 +0100 |
commit | e92dd5bf6a3c692ba155773f65b61b3cfce27c29 (patch) | |
tree | 8fe5b8e61f8484f6c885ba24a69756d37787febd | |
parent | 98369b74e21fb5cf769fcfdf0e717cf6592736c1 (diff) | |
download | netsurf-e92dd5bf6a3c692ba155773f65b61b3cfce27c29.tar.gz netsurf-e92dd5bf6a3c692ba155773f65b61b3cfce27c29.tar.bz2 |
Remove dead stuff from the selection_ api surface.
-rw-r--r-- | desktop/selection.c | 28 | ||||
-rw-r--r-- | 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 |