summaryrefslogtreecommitdiff
path: root/desktop/browser.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-07-13 13:20:26 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-07-13 13:20:26 +0000
commit9c918930289b18dbfd4bb44081891d5780105bfd (patch)
tree372de7dbf3d8393550e46ab1f8de6e9a97cf2140 /desktop/browser.h
parent1832155b7c64e0a977541930fc78f47bbd675ab2 (diff)
downloadnetsurf-9c918930289b18dbfd4bb44081891d5780105bfd.tar.gz
netsurf-9c918930289b18dbfd4bb44081891d5780105bfd.tar.bz2
Fix selection for non-gui browser windows (iframes).
Selection no longer uses current_redraw_browser. Fix long-standing selection bugs on platforms that use action on release behaviour. svn path=/trunk/netsurf/; revision=12598
Diffstat (limited to 'desktop/browser.h')
-rw-r--r--desktop/browser.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/desktop/browser.h b/desktop/browser.h
index d0695f295..f008cfc00 100644
--- a/desktop/browser.h
+++ b/desktop/browser.h
@@ -78,9 +78,6 @@ struct browser_window {
/** Window history structure. */
struct history *history;
- /** Selection state */
- struct selection *sel;
-
/** Handler for keyboard input, or 0. */
browser_caret_callback caret_callback;
/** Handler for pasting text, or 0. */
@@ -193,6 +190,9 @@ struct browser_window {
/** search context for free text search */
struct search_context *search_context;
+ /** Content with current selection, or NULL if none */
+ struct selection *cur_sel;
+
/** cache of the currently displayed status text. */
char *status_text; /**< Current status bar text. */
int status_text_len; /**< Length of the ::status_text buffer. */
@@ -365,6 +365,23 @@ struct browser_window * browser_window_get_root(struct browser_window *bw);
*/
bool browser_window_has_selection(struct browser_window *bw);
+/**
+ * Set pointer to current selection. Clears any existing selection.
+ *
+ * \param bw The browser window
+ * \param s The new selection
+ */
+void browser_window_set_selection(struct browser_window *bw,
+ struct selection *s);
+
+/**
+ * Get the current selection context from a root browser window
+ *
+ * \param bw The browser window
+ * \return the selection context, or NULL
+ */
+struct selection *browser_window_get_selection(struct browser_window *bw);
+
/* In platform specific hotlist.c. */
void hotlist_visited(struct hlcache_handle *c);