Make selection_traverse internal to desktop/selection.c.
This commit is contained in:
parent
4d6ada8c9a
commit
3f9565753f
|
@ -78,6 +78,12 @@ struct selection_string {
|
|||
size_t length;
|
||||
};
|
||||
|
||||
|
||||
typedef bool (*seln_traverse_handler)(const char *text, size_t length,
|
||||
struct box *box, void *handle, const char *whitespace_text,
|
||||
size_t whitespace_length);
|
||||
|
||||
|
||||
static bool redraw_handler(const char *text, size_t length, struct box *box,
|
||||
void *handle, const char *whitespace_text,
|
||||
size_t whitespace_length);
|
||||
|
@ -618,8 +624,8 @@ bool traverse_tree(struct box *box, unsigned start_idx, unsigned end_idx,
|
|||
* \return false iff traversal abandoned part-way through
|
||||
*/
|
||||
|
||||
bool selection_traverse(struct selection *s, seln_traverse_handler handler,
|
||||
void *handle)
|
||||
static bool selection_traverse(struct selection *s,
|
||||
seln_traverse_handler handler, void *handle)
|
||||
{
|
||||
save_text_whitespace before = WHITESPACE_NONE;
|
||||
bool first = true;
|
||||
|
|
|
@ -55,11 +55,6 @@ struct selection
|
|||
};
|
||||
|
||||
|
||||
typedef bool (*seln_traverse_handler)(const char *text, size_t length,
|
||||
struct box *box, void *handle, const char *whitespace_text,
|
||||
size_t whitespace_length);
|
||||
|
||||
|
||||
struct selection *selection_create(struct content *c, bool is_html);
|
||||
void selection_prepare(struct selection *s, struct content *c, bool is_html);
|
||||
void selection_destroy(struct selection *s);
|
||||
|
@ -102,9 +97,6 @@ char * selection_get_copy(struct selection *s);
|
|||
/* void selection_drag_end(struct selection *s); */
|
||||
#define selection_drag_end(s) ((s)->drag_state = DRAG_NONE)
|
||||
|
||||
bool selection_traverse(struct selection *s, seln_traverse_handler handler,
|
||||
void *handle);
|
||||
|
||||
bool selection_highlighted(const struct selection *s,
|
||||
unsigned start, unsigned end,
|
||||
unsigned *start_idx, unsigned *end_idx);
|
||||
|
|
Loading…
Reference in New Issue