summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-08-13 17:48:03 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2012-08-13 17:48:03 +0100
commit3f9565753f4c7d658ea2d9f3d4f6ea1223e2e73e (patch)
tree9756a4a5eeee241f28f1af4ff716bdca3401ef30 /desktop
parent4d6ada8c9afbc3aed902e4fb1f7ac93b95d2b30c (diff)
downloadnetsurf-3f9565753f4c7d658ea2d9f3d4f6ea1223e2e73e.tar.gz
netsurf-3f9565753f4c7d658ea2d9f3d4f6ea1223e2e73e.tar.bz2
Make selection_traverse internal to desktop/selection.c.
Diffstat (limited to 'desktop')
-rw-r--r--desktop/selection.c10
-rw-r--r--desktop/selection.h8
2 files changed, 8 insertions, 10 deletions
diff --git a/desktop/selection.c b/desktop/selection.c
index cd19afd16..15f82bfd6 100644
--- a/desktop/selection.c
+++ b/desktop/selection.c
@@ -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;
diff --git a/desktop/selection.h b/desktop/selection.h
index 30024743d..7ece4bd85 100644
--- a/desktop/selection.h
+++ b/desktop/selection.h
@@ -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);