summaryrefslogtreecommitdiff
path: root/desktop/selection.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-07-26 13:53:42 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-07-26 13:53:42 +0000
commit16b92d1613e245919743be5f168abe77712ec84b (patch)
tree5f2516ecf29989bd4fffeb56ef6b4a02410ec8c1 /desktop/selection.h
parentd97e99b02b40114c584661541805704006ffefee (diff)
downloadnetsurf-16b92d1613e245919743be5f168abe77712ec84b.tar.gz
netsurf-16b92d1613e245919743be5f168abe77712ec84b.tar.bz2
Selection is now subordinate to html and text content types, and disassociated from browser windows. Note: search currently uses hlcache_handle_get_content() to go from bw to h to get at c for search highlighting via selection.
svn path=/trunk/netsurf/; revision=12626
Diffstat (limited to 'desktop/selection.h')
-rw-r--r--desktop/selection.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/desktop/selection.h b/desktop/selection.h
index 4b8bd8ec8..b4e4b31e9 100644
--- a/desktop/selection.h
+++ b/desktop/selection.h
@@ -40,7 +40,7 @@ typedef enum {
struct selection
{
- struct browser_window *bw;
+ struct content *c;
struct box *root;
unsigned max_idx; /* total bytes in text representation */
@@ -49,6 +49,7 @@ struct selection
unsigned end_idx;
bool defined;
+ bool is_html;
seln_drag_state drag_state;
};
@@ -59,16 +60,13 @@ typedef bool (*seln_traverse_handler)(const char *text, size_t length,
size_t whitespace_length);
-struct selection *selection_create(void);
-void selection_prepare(struct selection *s);
+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);
void selection_init(struct selection *s, struct box *root);
void selection_reinit(struct selection *s, struct box *root);
-void selection_set_browser_window(struct selection *s,
- struct browser_window *bw);
-
/* struct box *selection_root(struct selection *s); */
#define selection_root(s) ((s)->root)