summaryrefslogtreecommitdiff
path: root/desktop/browser_private.h
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-02-22 12:19:35 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2013-02-22 12:19:35 +0000
commitc2a718075ad321a9cf4678e72645acda5c3471a9 (patch)
treea634c4c47c579aab35839ee3861ef90f92d89b48 /desktop/browser_private.h
parent2b0cc398bb5b8e5dc90fcc0a71a9a154dd9f2d74 (diff)
downloadnetsurf-c2a718075ad321a9cf4678e72645acda5c3471a9.tar.gz
netsurf-c2a718075ad321a9cf4678e72645acda5c3471a9.tar.bz2
A load of refactoring of how content selection and input work.
Keypresses now go via content interface. Contents don't shove the selection object into browser windows any more. Contents report selection existence by sending message. HTML content keeps track of where selections in it exist. Contents report whether they have input focus via caret setting msg. Caret can be hidden (can still input/paste) or removed. Consolidate textarea selection handling. Make textarea report its selection status changes to client. Various textarea fixes. Changed how we decide when to clear selections, and give focus.
Diffstat (limited to 'desktop/browser_private.h')
-rw-r--r--desktop/browser_private.h20
1 files changed, 6 insertions, 14 deletions
diff --git a/desktop/browser_private.h b/desktop/browser_private.h
index 91372acc3..4c14b1700 100644
--- a/desktop/browser_private.h
+++ b/desktop/browser_private.h
@@ -52,18 +52,6 @@ struct browser_window {
/** Window history structure. */
struct history *history;
- /** Handler for keyboard input, or 0. */
- browser_caret_callback caret_callback;
- /** Handler for pasting text, or 0. */
- browser_paste_callback paste_callback;
- /** Handler for repositioning caret, or 0. */
- browser_move_callback move_callback;
-
- /** User parameters for caret_callback, paste_callback, and
- * move_callback */
- void *caret_p1;
- void *caret_p2;
-
/** Platform specific window data. */
struct gui_window *window;
@@ -158,8 +146,12 @@ struct browser_window {
/** Last time a link was followed in this window */
unsigned int last_action;
- /** Current selection, or NULL if none */
- struct selection *cur_sel;
+ /** Current selection */
+ struct {
+ struct browser_window *bw;
+ bool read_only;
+ } selection;
+ bool can_edit;
/** Current context for free text search, or NULL if none */
struct search_context *cur_search;