Remove dead stuff from the selection_ api surface.

This commit is contained in:
Michael Drake 2013-04-29 21:55:32 +01:00
parent 98369b74e2
commit e92dd5bf6a
2 changed files with 2 additions and 32 deletions

View File

@ -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));
}
}

View File

@ -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