Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/8066d1c8b4ef4e8e19d22aa2d92950339271b351
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/8066d1c8b4ef4e8e19d22aa2d92950339271b351
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/8066d1c8b4ef4e8e19d22aa2d92950339271b351

The branch, master has been updated
       via  8066d1c8b4ef4e8e19d22aa2d92950339271b351 (commit)
      from  0758af6631674d2ca88ca127c4b42842821ab7d0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=8066d1c8b4ef4e8e19d22aa2d92950339271b351
commit 8066d1c8b4ef4e8e19d22aa2d92950339271b351
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    move key press enums and operations to their own header

diff --git a/desktop/textarea.c b/desktop/textarea.c
index 80a2acf..203c28e 100644
--- a/desktop/textarea.c
+++ b/desktop/textarea.c
@@ -29,16 +29,16 @@
 #include "utils/log.h"
 #include "utils/utf8.h"
 #include "utils/utils.h"
-#include "css/utils.h"
-
 #include "netsurf/browser_window.h"
-#include "netsurf/mouse.h"
-#include "desktop/textarea.h"
-#include "desktop/textinput.h"
 #include "netsurf/plotters.h"
-#include "desktop/scrollbar.h"
+#include "netsurf/mouse.h"
+#include "netsurf/keypress.h"
 #include "netsurf/clipboard.h"
 #include "netsurf/layout.h"
+#include "css/utils.h"
+
+#include "desktop/textarea.h"
+#include "desktop/scrollbar.h"
 #include "desktop/gui_internal.h"
 
 #define CARET_COLOR 0x0000FF
diff --git a/desktop/textinput.c b/desktop/textinput.c
index d4a8bf8..c0e0ba8 100644
--- a/desktop/textinput.c
+++ b/desktop/textinput.c
@@ -33,15 +33,16 @@
 #include "utils/talloc.h"
 #include "utils/utf8.h"
 #include "utils/utils.h"
+#include "netsurf/mouse.h"
 #include "netsurf/form.h"
+#include "netsurf/window.h"
+#include "netsurf/keypress.h"
 #include "render/box.h"
 #include "render/html_internal.h"
 #include "render/layout.h"
 
-#include "netsurf/mouse.h"
 #include "desktop/browser_private.h"
 #include "desktop/textinput.h"
-#include "netsurf/window.h"
 #include "desktop/gui_internal.h"
 
 /* Define to enable textinput debug */
@@ -101,7 +102,7 @@ void browser_window_remove_caret(struct browser_window *bw, 
bool only_hide)
        }
 }
 
-/* exported interface documented in desktop/textinput.h */
+/* exported interface documented in netsurf/keypress.h */
 bool browser_window_key_press(struct browser_window *bw, uint32_t key)
 {
        struct browser_window *focus = bw->focus;
diff --git a/desktop/textinput.h b/desktop/textinput.h
index 0b35931..5859ea8 100644
--- a/desktop/textinput.h
+++ b/desktop/textinput.h
@@ -19,8 +19,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-/** \file
- * Textual input handling (interface)
+/**
+ * \file
+ * Textual input handling interface
  */
 
 #ifndef _NETSURF_DESKTOP_TEXTINPUT_H_
@@ -28,49 +29,6 @@
 
 struct browser_window;
 
-enum input_key {
-
-       NS_KEY_SELECT_ALL = 1,
-       NS_KEY_COPY_SELECTION = 3,
-
-       NS_KEY_DELETE_LEFT = 8,
-       NS_KEY_TAB = 9,
-
-       NS_KEY_NL = 10,
-       NS_KEY_SHIFT_TAB = 11,
-       NS_KEY_CR = 13,
-
-       NS_KEY_DELETE_LINE = 21,
-       NS_KEY_PASTE = 22,
-       NS_KEY_CUT_SELECTION = 24,
-       NS_KEY_CLEAR_SELECTION = 26,
-
-       NS_KEY_ESCAPE = 27,
-
-       /* cursor movement keys */
-       NS_KEY_LEFT = 28,
-       NS_KEY_RIGHT,
-       NS_KEY_UP,
-       NS_KEY_DOWN,
-
-       NS_KEY_DELETE_RIGHT = 127,
-
-       NS_KEY_LINE_START = 128,
-       NS_KEY_LINE_END,
-       NS_KEY_TEXT_START,
-       NS_KEY_TEXT_END,
-       NS_KEY_WORD_LEFT,
-       NS_KEY_WORD_RIGHT,
-       NS_KEY_PAGE_UP,
-       NS_KEY_PAGE_DOWN,
-       NS_KEY_DELETE_LINE_END,
-       NS_KEY_DELETE_LINE_START,
-
-       NS_KEY_UNDO,
-       NS_KEY_REDO
-};
-
-
 /**
  * Position the caret and assign a callback for key presses.
  *
@@ -91,13 +49,5 @@ void browser_window_place_caret(struct browser_window *bw, 
int x, int y,
  */
 void browser_window_remove_caret(struct browser_window *bw, bool only_hide);
 
-/**
- * Handle key presses in a browser window.
- *
- * \param bw   The root browser window
- * \param key  The UCS4 character codepoint
- * \return true if key handled, false otherwise
- */
-bool browser_window_key_press(struct browser_window *bw, uint32_t key);
 
 #endif
diff --git a/desktop/treeview.c b/desktop/treeview.c
index 8f0afcb..f2af5e8 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -29,6 +29,7 @@
 #include "netsurf/plotters.h"
 #include "netsurf/clipboard.h"
 #include "netsurf/layout.h"
+#include "netsurf/keypress.h"
 #include "content/hlcache.h"
 #include "css/utils.h"
 
@@ -37,7 +38,6 @@
 #include "desktop/textarea.h"
 #include "desktop/treeview.h"
 #include "desktop/gui_internal.h"
-#include "desktop/textinput.h"
 #include "desktop/core_window.h"
 
 /** @todo get rid of REDRAW_MAX -- need to be able to know window size */
diff --git a/frontends/amiga/clipboard.c b/frontends/amiga/clipboard.c
index 1b87f5b..2dce068 100644
--- a/frontends/amiga/clipboard.c
+++ b/frontends/amiga/clipboard.c
@@ -33,7 +33,7 @@
 #include "netsurf/content.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/plotters.h"
-#include "desktop/textinput.h"
+#include "netsurf/keypress.h"
 #include "netsurf/window.h"
 #include "netsurf/clipboard.h"
 
diff --git a/frontends/amiga/ctxmenu.c b/frontends/amiga/ctxmenu.c
index a688192..717096f 100644
--- a/frontends/amiga/ctxmenu.c
+++ b/frontends/amiga/ctxmenu.c
@@ -43,9 +43,9 @@
 #include "netsurf/content.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/mouse.h"
+#include "netsurf/keypress.h"
 #include "desktop/browser_history.h"
 #include "desktop/searchweb.h"
-#include "desktop/textinput.h"
 
 #include "amiga/bitmap.h"
 #include "amiga/clipboard.h"
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index ba7f979..4cfb398 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -107,6 +107,7 @@
 #include "netsurf/browser_window.h"
 #include "netsurf/cookie_db.h"
 #include "netsurf/url_db.h"
+#include "netsurf/keypress.h"
 #include "content/backing_store.h"
 #include "content/fetch.h"
 #include "desktop/browser_history.h"
@@ -115,7 +116,6 @@
 #include "desktop/save_complete.h"
 #include "desktop/scrollbar.h"
 #include "desktop/searchweb.h"
-#include "desktop/textinput.h"
 #include "desktop/tree.h"
 
 /* NetSurf Amiga platform includes */
diff --git a/frontends/amiga/menu.c b/frontends/amiga/menu.c
index 636951e..58ea27e 100644
--- a/frontends/amiga/menu.c
+++ b/frontends/amiga/menu.c
@@ -51,8 +51,8 @@
 #include "netsurf/mouse.h"
 #include "netsurf/window.h"
 #include "netsurf/content.h"
+#include "netsurf/keypress.h"
 #include "desktop/hotlist.h"
-#include "desktop/textinput.h"
 #include "desktop/version.h"
 
 #include "amiga/arexx.h"
diff --git a/frontends/amiga/tree.c b/frontends/amiga/tree.c
index c46eee4..f02fdcd 100644
--- a/frontends/amiga/tree.c
+++ b/frontends/amiga/tree.c
@@ -55,12 +55,12 @@
 #include "utils/messages.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/window.h"
+#include "netsurf/keypress.h"
 #include "content/llcache.h"
 #include "desktop/cookie_manager.h"
 #include "desktop/global_history.h"
 #include "desktop/hotlist.h"
 #include "desktop/sslcert_viewer.h"
-#include "desktop/textinput.h"
 
 #include "amiga/gui.h"
 #include "amiga/tree.h"
diff --git a/frontends/atari/ctxmenu.c b/frontends/atari/ctxmenu.c
index f3f5f6d..e25d8e5 100644
--- a/frontends/atari/ctxmenu.c
+++ b/frontends/atari/ctxmenu.c
@@ -22,7 +22,7 @@
 #include "utils/nsurl.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/content.h"
-#include "desktop/textinput.h"
+#include "netsurf/keypress.h"
 
 #include "atari/gui.h"
 #include "atari/misc.h"
diff --git a/frontends/atari/deskmenu.c b/frontends/atari/deskmenu.c
index 2bb65cf..77df4e5 100644
--- a/frontends/atari/deskmenu.c
+++ b/frontends/atari/deskmenu.c
@@ -24,8 +24,8 @@
 #include "utils/messages.h"
 #include "utils/nsoption.h"
 #include "netsurf/browser_window.h"
+#include "netsurf/keypress.h"
 #include "desktop/save_complete.h"
-#include "desktop/textinput.h"
 
 #include "atari/res/netsurf.rsh"
 #include "atari/gemtk/gemtk.h"
diff --git a/frontends/atari/download.c b/frontends/atari/download.c
index e475a15..3e7a685 100644
--- a/frontends/atari/download.c
+++ b/frontends/atari/download.c
@@ -31,11 +31,10 @@
 #include "utils/utils.h"
 #include "utils/nsoption.h"
 #include "utils/string.h"
-#include "desktop/save_complete.h"
-#include "desktop/textinput.h"
-#include "desktop/download.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/download.h"
+#include "desktop/save_complete.h"
+#include "desktop/download.h"
 
 #include "atari/gui.h"
 #include "atari/misc.h"
diff --git a/frontends/atari/hotlist.c b/frontends/atari/hotlist.c
index 577344f..d552230 100644
--- a/frontends/atari/hotlist.c
+++ b/frontends/atari/hotlist.c
@@ -28,10 +28,10 @@
 #include "utils/utils.h"
 #include "utils/nsoption.h"
 #include "utils/nsurl.h"
+#include "netsurf/keypress.h"
 #include "content/content.h"
 #include "desktop/hotlist.h"
 #include "desktop/tree.h"
-#include "desktop/textinput.h"
 
 #include "atari/gui.h"
 #include "atari/misc.h"
diff --git a/frontends/atari/misc.c b/frontends/atari/misc.c
index 013304b..81c0b95 100644
--- a/frontends/atari/misc.c
+++ b/frontends/atari/misc.c
@@ -32,9 +32,9 @@
 #include "utils/file.h"
 #include "utils/dirent.h"
 #include "netsurf/mouse.h"
+#include "netsurf/keypress.h"
 #include "content/content.h"
 #include "content/hlcache.h"
-#include "desktop/textinput.h"
 #include "desktop/cookie_manager.h"
 #include "desktop/tree.h"
 
diff --git a/frontends/atari/rootwin.c b/frontends/atari/rootwin.c
index d492009..dd41e17 100644
--- a/frontends/atari/rootwin.c
+++ b/frontends/atari/rootwin.c
@@ -14,10 +14,11 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- * Module Description:
- *
- * This File implements the NetSurf Browser window, or passed functionality to
+ */
+
+/**
+ * \file
+ * Implements the NetSurf Browser window, or passed functionality to
  * the appropriate widget's.
  *
  */
@@ -41,7 +42,7 @@
 #include "netsurf/browser_window.h"
 #include "netsurf/mouse.h"
 #include "netsurf/plotters.h"
-#include "desktop/textinput.h"
+#include "netsurf/keypress.h"
 
 #include "atari/res/netsurf.rsh"
 #include "atari/gemtk/gemtk.h"
diff --git a/frontends/atari/toolbar.c b/frontends/atari/toolbar.c
index caf1d66..84f0b3f 100644
--- a/frontends/atari/toolbar.c
+++ b/frontends/atari/toolbar.c
@@ -31,15 +31,15 @@
 #include "utils/nsoption.h"
 #include "utils/nsurl.h"
 #include "utils/utf8.h"
-#include "desktop/browser_history.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/mouse.h"
-#include "desktop/plot_style.h"
 #include "netsurf/plotters.h"
+#include "netsurf/keypress.h"
+#include "desktop/plot_style.h"
+#include "desktop/browser_history.h"
 #include "desktop/tree.h"
 #include "desktop/hotlist.h"
 #include "desktop/textarea.h"
-#include "desktop/textinput.h"
 
 #include "atari/clipboard.h"
 #include "atari/gui.h"
diff --git a/frontends/beos/cookies.cpp b/frontends/beos/cookies.cpp
index 8e6801e..66cf8bb 100644
--- a/frontends/beos/cookies.cpp
+++ b/frontends/beos/cookies.cpp
@@ -25,9 +25,9 @@ extern "C" {
 #include "netsurf/mouse.h"
 #include "netsurf/plotters.h"
 #include "netsurf/cookie_db.h"
+#include "netsurf/keypress.h"
 #include "desktop/cookie_manager.h"
 #include "desktop/tree.h"
-#include "desktop/textinput.h"
 }
 #include "beos/cookies.h"
 
diff --git a/frontends/beos/scaffolding.cpp b/frontends/beos/scaffolding.cpp
index 8f3baac..47f18c9 100644
--- a/frontends/beos/scaffolding.cpp
+++ b/frontends/beos/scaffolding.cpp
@@ -65,11 +65,11 @@ extern "C" {
 #include "netsurf/content_type.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/form.h"
+#include "netsurf/keypress.h"
 #include "desktop/browser_history.h"
 #include "desktop/version.h"
 #include "desktop/searchweb.h"
 #include "desktop/search.h"
-#include "desktop/textinput.h"
 }
 
 #include "beos/about.h"
diff --git a/frontends/beos/window.cpp b/frontends/beos/window.cpp
index 2944033..07d6af2 100644
--- a/frontends/beos/window.cpp
+++ b/frontends/beos/window.cpp
@@ -47,7 +47,7 @@ extern "C" {
 #include "netsurf/window.h"
 #include "netsurf/clipboard.h"
 #include "netsurf/url_db.h"
-#include "desktop/textinput.h"
+#include "netsurf/keypress.h"
 }
 
 #include "beos/about.h"
diff --git a/frontends/cocoa/BookmarksController.m 
b/frontends/cocoa/BookmarksController.m
index f04a084..07b2c50 100644
--- a/frontends/cocoa/BookmarksController.m
+++ b/frontends/cocoa/BookmarksController.m
@@ -20,9 +20,9 @@
 #import "utils/utils.h"
 #import "utils/nsurl.h"
 #import "netsurf/browser_window.h"
+#import "netsurf/keypress.h"
 #import "desktop/hotlist.h"
 #import "desktop/tree.h"
-#import "desktop/textinput.h"
 
 #import "cocoa/BookmarksController.h"
 #import "cocoa/Tree.h"
diff --git a/frontends/cocoa/BrowserView.m b/frontends/cocoa/BrowserView.m
index 2d19128..f1259d8 100644
--- a/frontends/cocoa/BrowserView.m
+++ b/frontends/cocoa/BrowserView.m
@@ -23,7 +23,7 @@
 #import "netsurf/browser_window.h"
 #import "netsurf/plotters.h"
 #import "netsurf/content.h"
-#import "desktop/textinput.h"
+#import "netsurf/keypress.h"
 
 #import "cocoa/gui.h"
 #import "cocoa/BrowserView.h"
diff --git a/frontends/cocoa/BrowserViewController.m 
b/frontends/cocoa/BrowserViewController.m
index 777f4bc..4cac57e 100644
--- a/frontends/cocoa/BrowserViewController.m
+++ b/frontends/cocoa/BrowserViewController.m
@@ -25,7 +25,6 @@
 #import "netsurf/content.h"
 #import "netsurf/browser_window.h"
 #import "desktop/browser_history.h"
-#import "desktop/textinput.h"
 
 #import "cocoa/gui.h"
 #import "cocoa/BrowserViewController.h"
diff --git a/frontends/cocoa/NetsurfApp.m b/frontends/cocoa/NetsurfApp.m
index 5206591..54a1a82 100644
--- a/frontends/cocoa/NetsurfApp.m
+++ b/frontends/cocoa/NetsurfApp.m
@@ -40,7 +40,6 @@
 #import "netsurf/cookie_db.h"
 #import "netsurf/url_db.h"
 #import "desktop/save_complete.h"
-#import "desktop/textinput.h"
 #import "desktop/tree.h"
 
 #ifndef NETSURF_HOMEPAGE
diff --git a/frontends/cocoa/TreeView.m b/frontends/cocoa/TreeView.m
index 71f5af4..949c3c2 100644
--- a/frontends/cocoa/TreeView.m
+++ b/frontends/cocoa/TreeView.m
@@ -20,7 +20,7 @@
 #import "cocoa/Tree.h"
 
 #import "netsurf/plotters.h"
-#import "desktop/textinput.h"
+#import "netsurf/keypress.h"
 
 @interface TreeView () <TreeDelegate>
 @end
diff --git a/frontends/cocoa/gui.m b/frontends/cocoa/gui.m
index 7e6c996..b1847eb 100644
--- a/frontends/cocoa/gui.m
+++ b/frontends/cocoa/gui.m
@@ -27,7 +27,6 @@
 #import "netsurf/misc.h"
 #import "netsurf/browser_window.h"
 #import "netsurf/content.h"
-#import "desktop/textinput.h"
 
 #import "cocoa/gui.h"
 #import "cocoa/coordinates.h"
diff --git a/frontends/framebuffer/fbtk/event.c 
b/frontends/framebuffer/fbtk/event.c
index dab0355..a48e638 100644
--- a/frontends/framebuffer/fbtk/event.c
+++ b/frontends/framebuffer/fbtk/event.c
@@ -32,7 +32,7 @@
 #include "utils/utils.h"
 #include "utils/log.h"
 #include "netsurf/browser_window.h"
-#include "desktop/textinput.h"
+#include "netsurf/keypress.h"
 
 #include "framebuffer/gui.h"
 #include "framebuffer/fbtk.h"
diff --git a/frontends/framebuffer/gui.c b/frontends/framebuffer/gui.c
index 6879886..4936116 100644
--- a/frontends/framebuffer/gui.c
+++ b/frontends/framebuffer/gui.c
@@ -35,7 +35,7 @@
 #include "utils/log.h"
 #include "utils/messages.h"
 #include "netsurf/browser_window.h"
-#include "desktop/textinput.h"
+#include "netsurf/keypress.h"
 #include "desktop/browser_history.h"
 #include "netsurf/plotters.h"
 #include "netsurf/window.h"
diff --git a/frontends/gtk/cookies.c b/frontends/gtk/cookies.c
index f8f9893..514c826 100644
--- a/frontends/gtk/cookies.c
+++ b/frontends/gtk/cookies.c
@@ -21,12 +21,13 @@
  */
 
 #include <gtk/gtk.h>
+#include <stdint.h>
 
 #include "utils/log.h"
+#include "netsurf/keypress.h"
 #include "desktop/cookie_manager.h"
 #include "desktop/plot_style.h"
 #include "desktop/tree.h"
-#include "desktop/textinput.h"
 
 #include "gtk/cookies.h"
 #include "gtk/plotters.h"
diff --git a/frontends/gtk/gui.c b/frontends/gtk/gui.c
index d358b43..e0044b5 100644
--- a/frontends/gtk/gui.c
+++ b/frontends/gtk/gui.c
@@ -38,18 +38,18 @@
 #include "utils/utils.h"
 #include "utils/file.h"
 #include "utils/nsoption.h"
-#include "content/fetch.h"
+#include "netsurf/keypress.h"
 #include "netsurf/url_db.h"
 #include "netsurf/cookie_db.h"
-#include "content/backing_store.h"
 #include "netsurf/browser_window.h"
+#include "netsurf/misc.h"
+#include "netsurf/netsurf.h"
+#include "content/fetch.h"
+#include "content/backing_store.h"
 #include "desktop/save_complete.h"
 #include "desktop/save_pdf.h"
 #include "desktop/searchweb.h"
-#include "desktop/textinput.h"
 #include "desktop/tree.h"
-#include "netsurf/misc.h"
-#include "netsurf/netsurf.h"
 
 #include "gtk/compat.h"
 #include "gtk/warn.h"
diff --git a/frontends/gtk/history.c b/frontends/gtk/history.c
index 9c5c0b5..fb805d6 100644
--- a/frontends/gtk/history.c
+++ b/frontends/gtk/history.c
@@ -18,13 +18,14 @@
  */
 
 #include <stdlib.h>
+#include <stdint.h>
 #include <gtk/gtk.h>
 
 #include "utils/log.h"
+#include "netsurf/keypress.h"
 #include "desktop/global_history.h"
 #include "desktop/plot_style.h"
 #include "desktop/tree.h"
-#include "desktop/textinput.h"
 
 #include "gtk/plotters.h"
 #include "gtk/scaffolding.h"
diff --git a/frontends/gtk/hotlist.c b/frontends/gtk/hotlist.c
index 82ea3e3..fa89956 100644
--- a/frontends/gtk/hotlist.c
+++ b/frontends/gtk/hotlist.c
@@ -21,9 +21,9 @@
 
 #include "utils/log.h"
 #include "utils/nsoption.h"
+#include "netsurf/keypress.h"
 #include "desktop/hotlist.h"
 #include "desktop/tree.h"
-#include "desktop/textinput.h"
 
 #include "gtk/plotters.h"
 #include "gtk/scaffolding.h"
diff --git a/frontends/gtk/scaffolding.c b/frontends/gtk/scaffolding.c
index dc0595a..cd3779e 100644
--- a/frontends/gtk/scaffolding.c
+++ b/frontends/gtk/scaffolding.c
@@ -36,10 +36,11 @@
 #include "utils/file.h"
 #include "utils/nsurl.h"
 #include "netsurf/content.h"
-#include "desktop/browser_history.h"
+#include "netsurf/keypress.h"
 #include "netsurf/browser_window.h"
-#include "desktop/hotlist.h"
 #include "netsurf/plotters.h"
+#include "desktop/browser_history.h"
+#include "desktop/hotlist.h"
 #include "desktop/print.h"
 #include "desktop/save_complete.h"
 #ifdef WITH_PDF_EXPORT
@@ -48,7 +49,6 @@
 #endif
 #include "desktop/save_text.h"
 #include "desktop/searchweb.h"
-#include "desktop/textinput.h"
 #include "desktop/search.h"
 
 #include "gtk/compat.h"
diff --git a/frontends/gtk/window.c b/frontends/gtk/window.c
index b4af648..ce2644e 100644
--- a/frontends/gtk/window.c
+++ b/frontends/gtk/window.c
@@ -42,6 +42,8 @@
 #include "netsurf/window.h"
 #include "netsurf/plotters.h"
 #include "netsurf/form.h"
+#include "netsurf/keypress.h"
+#include "desktop/textarea.h"
 #include "desktop/searchweb.h"
 #include "desktop/textinput.h"
 
diff --git a/frontends/riscos/cookies.c b/frontends/riscos/cookies.c
index d5eab99..26374a5 100644
--- a/frontends/riscos/cookies.c
+++ b/frontends/riscos/cookies.c
@@ -33,9 +33,9 @@
 #include "utils/nsoption.h"
 #include "utils/messages.h"
 #include "utils/log.h"
+#include "netsurf/keypress.h"
 #include "desktop/cookie_manager.h"
 #include "desktop/tree.h"
-#include "desktop/textinput.h"
 
 #include "riscos/cookies.h"
 #include "riscos/dialog.h"
diff --git a/frontends/riscos/global_history.c 
b/frontends/riscos/global_history.c
index 8e339e6..e893630 100644
--- a/frontends/riscos/global_history.c
+++ b/frontends/riscos/global_history.c
@@ -35,9 +35,9 @@
 #include "utils/messages.h"
 #include "utils/log.h"
 #include "netsurf/window.h"
+#include "netsurf/keypress.h"
 #include "desktop/global_history.h"
 #include "desktop/tree.h"
-#include "desktop/textinput.h"
 
 #include "riscos/dialog.h"
 #include "riscos/global_history.h"
diff --git a/frontends/riscos/hotlist.c b/frontends/riscos/hotlist.c
index f3daad0..d477020 100644
--- a/frontends/riscos/hotlist.c
+++ b/frontends/riscos/hotlist.c
@@ -38,9 +38,9 @@
 #include "utils/nsurl.h"
 #include "netsurf/url_db.h"
 #include "netsurf/window.h"
+#include "netsurf/keypress.h"
 #include "desktop/hotlist.h"
 #include "desktop/tree.h"
-#include "desktop/textinput.h"
 
 #include "riscos/gui.h"
 #include "riscos/dialog.h"
diff --git a/frontends/riscos/menus.c b/frontends/riscos/menus.c
index 9807079..c123a0f 100644
--- a/frontends/riscos/menus.c
+++ b/frontends/riscos/menus.c
@@ -38,7 +38,6 @@
 #include "utils/messages.h"
 #include "utils/utf8.h"
 #include "desktop/cookie_manager.h"
-#include "desktop/textinput.h"
 
 #include "riscos/dialog.h"
 #include "riscos/configure.h"
diff --git a/frontends/riscos/textselection.c b/frontends/riscos/textselection.c
index e4d498d..bce3575 100644
--- a/frontends/riscos/textselection.c
+++ b/frontends/riscos/textselection.c
@@ -33,7 +33,6 @@
 #include "utils/utils.h"
 #include "netsurf/clipboard.h"
 #include "netsurf/window.h"
-#include "desktop/textinput.h"
 #include "netsurf/browser_window.h"
 
 #include "riscos/gui.h"
diff --git a/frontends/riscos/treeview.c b/frontends/riscos/treeview.c
index a675283..1798146 100644
--- a/frontends/riscos/treeview.c
+++ b/frontends/riscos/treeview.c
@@ -40,7 +40,7 @@
 #include "utils/messages.h"
 #include "utils/utils.h"
 #include "netsurf/plotters.h"
-#include "desktop/textinput.h"
+#include "netsurf/keypress.h"
 #include "desktop/tree.h"
 
 #include "riscos/bitmap.h"
diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c
index fe36da5..58cd86e 100644
--- a/frontends/riscos/window.c
+++ b/frontends/riscos/window.c
@@ -59,10 +59,10 @@
 #include "netsurf/bitmap.h"
 #include "netsurf/url_db.h"
 #include "netsurf/form.h"
+#include "netsurf/keypress.h"
 #include "desktop/browser_history.h"
 #include "desktop/cookie_manager.h"
 #include "desktop/scrollbar.h"
-#include "desktop/textinput.h"
 
 #include "riscos/bitmap.h"
 #include "riscos/buffer.h"
diff --git a/frontends/windows/drawable.c b/frontends/windows/drawable.c
index 74aca15..ee1c695 100644
--- a/frontends/windows/drawable.c
+++ b/frontends/windows/drawable.c
@@ -29,7 +29,7 @@
 #include "utils/utils.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/plotters.h"
-#include "desktop/textinput.h"
+#include "netsurf/keypress.h"
 
 #include "windows/windbg.h"
 #include "windows/plot.h"
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index bbe0e96..5db464a 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -32,8 +32,8 @@
 #include "content/content.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/window.h"
+#include "netsurf/keypress.h"
 #include "desktop/browser_history.h"
-#include "desktop/textinput.h"
 
 #include "windows/gui.h"
 #include "windows/pointers.h"
diff --git a/include/netsurf/keypress.h b/include/netsurf/keypress.h
new file mode 100644
index 0000000..604d2dd
--- /dev/null
+++ b/include/netsurf/keypress.h
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2016 Vincent Sanders <[email protected]>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * \file
+ *
+ * Interface to key press operations.
+ */
+
+#ifndef _NETSURF_KEYPRESS_H_
+#define _NETSURF_KEYPRESS_H_
+
+struct browser_window;
+
+enum input_key {
+
+       NS_KEY_SELECT_ALL = 1,
+       NS_KEY_COPY_SELECTION = 3,
+
+       NS_KEY_DELETE_LEFT = 8,
+       NS_KEY_TAB = 9,
+
+       NS_KEY_NL = 10,
+       NS_KEY_SHIFT_TAB = 11,
+       NS_KEY_CR = 13,
+
+       NS_KEY_DELETE_LINE = 21,
+       NS_KEY_PASTE = 22,
+       NS_KEY_CUT_SELECTION = 24,
+       NS_KEY_CLEAR_SELECTION = 26,
+
+       NS_KEY_ESCAPE = 27,
+
+       /* cursor movement keys */
+       NS_KEY_LEFT = 28,
+       NS_KEY_RIGHT,
+       NS_KEY_UP,
+       NS_KEY_DOWN,
+
+       NS_KEY_DELETE_RIGHT = 127,
+
+       NS_KEY_LINE_START = 128,
+       NS_KEY_LINE_END,
+       NS_KEY_TEXT_START,
+       NS_KEY_TEXT_END,
+       NS_KEY_WORD_LEFT,
+       NS_KEY_WORD_RIGHT,
+       NS_KEY_PAGE_UP,
+       NS_KEY_PAGE_DOWN,
+       NS_KEY_DELETE_LINE_END,
+       NS_KEY_DELETE_LINE_START,
+
+       NS_KEY_UNDO,
+       NS_KEY_REDO
+};
+
+
+/**
+ * Handle key presses in a browser window.
+ *
+ * \param bw The root browser window
+ * \param key The UCS4 character codepoint
+ * \return true if key handled, false otherwise
+ */
+bool browser_window_key_press(struct browser_window *bw, uint32_t key);
+
+
+#endif
diff --git a/render/box_textarea.c b/render/box_textarea.c
index 79ace8d..44f5c0b 100644
--- a/render/box_textarea.c
+++ b/render/box_textarea.c
@@ -24,8 +24,8 @@
 
 #include "utils/config.h"
 #include "utils/log.h"
+#include "netsurf/keypress.h"
 #include "desktop/textarea.h"
-#include "desktop/textinput.h"
 
 #include "render/box_textarea.h"
 #include "render/font.h"
diff --git a/render/html_interaction.c b/render/html_interaction.c
index f0b50f8..e727a9f 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -39,12 +39,12 @@
 #include "netsurf/mouse.h"
 #include "netsurf/misc.h"
 #include "netsurf/layout.h"
+#include "netsurf/keypress.h"
 #include "content/hlcache.h"
 #include "desktop/frames.h"
 #include "desktop/scrollbar.h"
 #include "desktop/selection.h"
 #include "desktop/textarea.h"
-#include "desktop/textinput.h"
 #include "javascript/js.h"
 #include "desktop/gui_internal.h"
 
diff --git a/render/textplain.c b/render/textplain.c
index b008ab8..ae14869 100644
--- a/render/textplain.c
+++ b/render/textplain.c
@@ -38,16 +38,16 @@
 #include "utils/utils.h"
 #include "utils/utf8.h"
 #include "netsurf/content.h"
+#include "netsurf/keypress.h"
+#include "netsurf/browser_window.h"
+#include "netsurf/plotters.h"
+#include "netsurf/layout.h"
 #include "content/content_protected.h"
 #include "content/hlcache.h"
 #include "css/utils.h"
-#include "netsurf/browser_window.h"
 #include "utils/nsoption.h"
-#include "netsurf/plotters.h"
 #include "desktop/search.h"
 #include "desktop/selection.h"
-#include "desktop/textinput.h"
-#include "netsurf/layout.h"
 #include "desktop/gui_internal.h"
 
 #include "render/search.h"


-----------------------------------------------------------------------

Summary of changes:
 desktop/textarea.c                                |   12 ++---
 desktop/textinput.c                               |    7 +--
 desktop/textinput.h                               |   56 ++-------------------
 desktop/treeview.c                                |    2 +-
 frontends/amiga/clipboard.c                       |    2 +-
 frontends/amiga/ctxmenu.c                         |    2 +-
 frontends/amiga/gui.c                             |    2 +-
 frontends/amiga/menu.c                            |    2 +-
 frontends/amiga/tree.c                            |    2 +-
 frontends/atari/ctxmenu.c                         |    2 +-
 frontends/atari/deskmenu.c                        |    2 +-
 frontends/atari/download.c                        |    5 +-
 frontends/atari/hotlist.c                         |    2 +-
 frontends/atari/misc.c                            |    2 +-
 frontends/atari/rootwin.c                         |   11 ++--
 frontends/atari/toolbar.c                         |    6 +--
 frontends/beos/cookies.cpp                        |    2 +-
 frontends/beos/scaffolding.cpp                    |    2 +-
 frontends/beos/window.cpp                         |    2 +-
 frontends/cocoa/BookmarksController.m             |    2 +-
 frontends/cocoa/BrowserView.m                     |    2 +-
 frontends/cocoa/BrowserViewController.m           |    1 -
 frontends/cocoa/NetsurfApp.m                      |    1 -
 frontends/cocoa/TreeView.m                        |    2 +-
 frontends/cocoa/gui.m                             |    1 -
 frontends/framebuffer/fbtk/event.c                |    2 +-
 frontends/framebuffer/gui.c                       |    2 +-
 frontends/gtk/cookies.c                           |    3 +-
 frontends/gtk/gui.c                               |   10 ++--
 frontends/gtk/history.c                           |    3 +-
 frontends/gtk/hotlist.c                           |    2 +-
 frontends/gtk/scaffolding.c                       |    6 +--
 frontends/gtk/window.c                            |    2 +
 frontends/riscos/cookies.c                        |    2 +-
 frontends/riscos/global_history.c                 |    2 +-
 frontends/riscos/hotlist.c                        |    2 +-
 frontends/riscos/menus.c                          |    1 -
 frontends/riscos/textselection.c                  |    1 -
 frontends/riscos/treeview.c                       |    2 +-
 frontends/riscos/window.c                         |    2 +-
 frontends/windows/drawable.c                      |    2 +-
 frontends/windows/window.c                        |    2 +-
 desktop/textinput.h => include/netsurf/keypress.h |   40 ++++-----------
 render/box_textarea.c                             |    2 +-
 render/html_interaction.c                         |    2 +-
 render/textplain.c                                |    8 +--
 46 files changed, 80 insertions(+), 150 deletions(-)
 copy desktop/textinput.h => include/netsurf/keypress.h (58%)

diff --git a/desktop/textarea.c b/desktop/textarea.c
index 80a2acf..203c28e 100644
--- a/desktop/textarea.c
+++ b/desktop/textarea.c
@@ -29,16 +29,16 @@
 #include "utils/log.h"
 #include "utils/utf8.h"
 #include "utils/utils.h"
-#include "css/utils.h"
-
 #include "netsurf/browser_window.h"
-#include "netsurf/mouse.h"
-#include "desktop/textarea.h"
-#include "desktop/textinput.h"
 #include "netsurf/plotters.h"
-#include "desktop/scrollbar.h"
+#include "netsurf/mouse.h"
+#include "netsurf/keypress.h"
 #include "netsurf/clipboard.h"
 #include "netsurf/layout.h"
+#include "css/utils.h"
+
+#include "desktop/textarea.h"
+#include "desktop/scrollbar.h"
 #include "desktop/gui_internal.h"
 
 #define CARET_COLOR 0x0000FF
diff --git a/desktop/textinput.c b/desktop/textinput.c
index d4a8bf8..c0e0ba8 100644
--- a/desktop/textinput.c
+++ b/desktop/textinput.c
@@ -33,15 +33,16 @@
 #include "utils/talloc.h"
 #include "utils/utf8.h"
 #include "utils/utils.h"
+#include "netsurf/mouse.h"
 #include "netsurf/form.h"
+#include "netsurf/window.h"
+#include "netsurf/keypress.h"
 #include "render/box.h"
 #include "render/html_internal.h"
 #include "render/layout.h"
 
-#include "netsurf/mouse.h"
 #include "desktop/browser_private.h"
 #include "desktop/textinput.h"
-#include "netsurf/window.h"
 #include "desktop/gui_internal.h"
 
 /* Define to enable textinput debug */
@@ -101,7 +102,7 @@ void browser_window_remove_caret(struct browser_window *bw, 
bool only_hide)
        }
 }
 
-/* exported interface documented in desktop/textinput.h */
+/* exported interface documented in netsurf/keypress.h */
 bool browser_window_key_press(struct browser_window *bw, uint32_t key)
 {
        struct browser_window *focus = bw->focus;
diff --git a/desktop/textinput.h b/desktop/textinput.h
index 0b35931..5859ea8 100644
--- a/desktop/textinput.h
+++ b/desktop/textinput.h
@@ -19,8 +19,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-/** \file
- * Textual input handling (interface)
+/**
+ * \file
+ * Textual input handling interface
  */
 
 #ifndef _NETSURF_DESKTOP_TEXTINPUT_H_
@@ -28,49 +29,6 @@
 
 struct browser_window;
 
-enum input_key {
-
-       NS_KEY_SELECT_ALL = 1,
-       NS_KEY_COPY_SELECTION = 3,
-
-       NS_KEY_DELETE_LEFT = 8,
-       NS_KEY_TAB = 9,
-
-       NS_KEY_NL = 10,
-       NS_KEY_SHIFT_TAB = 11,
-       NS_KEY_CR = 13,
-
-       NS_KEY_DELETE_LINE = 21,
-       NS_KEY_PASTE = 22,
-       NS_KEY_CUT_SELECTION = 24,
-       NS_KEY_CLEAR_SELECTION = 26,
-
-       NS_KEY_ESCAPE = 27,
-
-       /* cursor movement keys */
-       NS_KEY_LEFT = 28,
-       NS_KEY_RIGHT,
-       NS_KEY_UP,
-       NS_KEY_DOWN,
-
-       NS_KEY_DELETE_RIGHT = 127,
-
-       NS_KEY_LINE_START = 128,
-       NS_KEY_LINE_END,
-       NS_KEY_TEXT_START,
-       NS_KEY_TEXT_END,
-       NS_KEY_WORD_LEFT,
-       NS_KEY_WORD_RIGHT,
-       NS_KEY_PAGE_UP,
-       NS_KEY_PAGE_DOWN,
-       NS_KEY_DELETE_LINE_END,
-       NS_KEY_DELETE_LINE_START,
-
-       NS_KEY_UNDO,
-       NS_KEY_REDO
-};
-
-
 /**
  * Position the caret and assign a callback for key presses.
  *
@@ -91,13 +49,5 @@ void browser_window_place_caret(struct browser_window *bw, 
int x, int y,
  */
 void browser_window_remove_caret(struct browser_window *bw, bool only_hide);
 
-/**
- * Handle key presses in a browser window.
- *
- * \param bw   The root browser window
- * \param key  The UCS4 character codepoint
- * \return true if key handled, false otherwise
- */
-bool browser_window_key_press(struct browser_window *bw, uint32_t key);
 
 #endif
diff --git a/desktop/treeview.c b/desktop/treeview.c
index 8f0afcb..f2af5e8 100644
--- a/desktop/treeview.c
+++ b/desktop/treeview.c
@@ -29,6 +29,7 @@
 #include "netsurf/plotters.h"
 #include "netsurf/clipboard.h"
 #include "netsurf/layout.h"
+#include "netsurf/keypress.h"
 #include "content/hlcache.h"
 #include "css/utils.h"
 
@@ -37,7 +38,6 @@
 #include "desktop/textarea.h"
 #include "desktop/treeview.h"
 #include "desktop/gui_internal.h"
-#include "desktop/textinput.h"
 #include "desktop/core_window.h"
 
 /** @todo get rid of REDRAW_MAX -- need to be able to know window size */
diff --git a/frontends/amiga/clipboard.c b/frontends/amiga/clipboard.c
index 1b87f5b..2dce068 100644
--- a/frontends/amiga/clipboard.c
+++ b/frontends/amiga/clipboard.c
@@ -33,7 +33,7 @@
 #include "netsurf/content.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/plotters.h"
-#include "desktop/textinput.h"
+#include "netsurf/keypress.h"
 #include "netsurf/window.h"
 #include "netsurf/clipboard.h"
 
diff --git a/frontends/amiga/ctxmenu.c b/frontends/amiga/ctxmenu.c
index a688192..717096f 100644
--- a/frontends/amiga/ctxmenu.c
+++ b/frontends/amiga/ctxmenu.c
@@ -43,9 +43,9 @@
 #include "netsurf/content.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/mouse.h"
+#include "netsurf/keypress.h"
 #include "desktop/browser_history.h"
 #include "desktop/searchweb.h"
-#include "desktop/textinput.h"
 
 #include "amiga/bitmap.h"
 #include "amiga/clipboard.h"
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index ba7f979..4cfb398 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -107,6 +107,7 @@
 #include "netsurf/browser_window.h"
 #include "netsurf/cookie_db.h"
 #include "netsurf/url_db.h"
+#include "netsurf/keypress.h"
 #include "content/backing_store.h"
 #include "content/fetch.h"
 #include "desktop/browser_history.h"
@@ -115,7 +116,6 @@
 #include "desktop/save_complete.h"
 #include "desktop/scrollbar.h"
 #include "desktop/searchweb.h"
-#include "desktop/textinput.h"
 #include "desktop/tree.h"
 
 /* NetSurf Amiga platform includes */
diff --git a/frontends/amiga/menu.c b/frontends/amiga/menu.c
index 636951e..58ea27e 100644
--- a/frontends/amiga/menu.c
+++ b/frontends/amiga/menu.c
@@ -51,8 +51,8 @@
 #include "netsurf/mouse.h"
 #include "netsurf/window.h"
 #include "netsurf/content.h"
+#include "netsurf/keypress.h"
 #include "desktop/hotlist.h"
-#include "desktop/textinput.h"
 #include "desktop/version.h"
 
 #include "amiga/arexx.h"
diff --git a/frontends/amiga/tree.c b/frontends/amiga/tree.c
index c46eee4..f02fdcd 100644
--- a/frontends/amiga/tree.c
+++ b/frontends/amiga/tree.c
@@ -55,12 +55,12 @@
 #include "utils/messages.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/window.h"
+#include "netsurf/keypress.h"
 #include "content/llcache.h"
 #include "desktop/cookie_manager.h"
 #include "desktop/global_history.h"
 #include "desktop/hotlist.h"
 #include "desktop/sslcert_viewer.h"
-#include "desktop/textinput.h"
 
 #include "amiga/gui.h"
 #include "amiga/tree.h"
diff --git a/frontends/atari/ctxmenu.c b/frontends/atari/ctxmenu.c
index f3f5f6d..e25d8e5 100644
--- a/frontends/atari/ctxmenu.c
+++ b/frontends/atari/ctxmenu.c
@@ -22,7 +22,7 @@
 #include "utils/nsurl.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/content.h"
-#include "desktop/textinput.h"
+#include "netsurf/keypress.h"
 
 #include "atari/gui.h"
 #include "atari/misc.h"
diff --git a/frontends/atari/deskmenu.c b/frontends/atari/deskmenu.c
index 2bb65cf..77df4e5 100644
--- a/frontends/atari/deskmenu.c
+++ b/frontends/atari/deskmenu.c
@@ -24,8 +24,8 @@
 #include "utils/messages.h"
 #include "utils/nsoption.h"
 #include "netsurf/browser_window.h"
+#include "netsurf/keypress.h"
 #include "desktop/save_complete.h"
-#include "desktop/textinput.h"
 
 #include "atari/res/netsurf.rsh"
 #include "atari/gemtk/gemtk.h"
diff --git a/frontends/atari/download.c b/frontends/atari/download.c
index e475a15..3e7a685 100644
--- a/frontends/atari/download.c
+++ b/frontends/atari/download.c
@@ -31,11 +31,10 @@
 #include "utils/utils.h"
 #include "utils/nsoption.h"
 #include "utils/string.h"
-#include "desktop/save_complete.h"
-#include "desktop/textinput.h"
-#include "desktop/download.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/download.h"
+#include "desktop/save_complete.h"
+#include "desktop/download.h"
 
 #include "atari/gui.h"
 #include "atari/misc.h"
diff --git a/frontends/atari/hotlist.c b/frontends/atari/hotlist.c
index 577344f..d552230 100644
--- a/frontends/atari/hotlist.c
+++ b/frontends/atari/hotlist.c
@@ -28,10 +28,10 @@
 #include "utils/utils.h"
 #include "utils/nsoption.h"
 #include "utils/nsurl.h"
+#include "netsurf/keypress.h"
 #include "content/content.h"
 #include "desktop/hotlist.h"
 #include "desktop/tree.h"
-#include "desktop/textinput.h"
 
 #include "atari/gui.h"
 #include "atari/misc.h"
diff --git a/frontends/atari/misc.c b/frontends/atari/misc.c
index 013304b..81c0b95 100644
--- a/frontends/atari/misc.c
+++ b/frontends/atari/misc.c
@@ -32,9 +32,9 @@
 #include "utils/file.h"
 #include "utils/dirent.h"
 #include "netsurf/mouse.h"
+#include "netsurf/keypress.h"
 #include "content/content.h"
 #include "content/hlcache.h"
-#include "desktop/textinput.h"
 #include "desktop/cookie_manager.h"
 #include "desktop/tree.h"
 
diff --git a/frontends/atari/rootwin.c b/frontends/atari/rootwin.c
index d492009..dd41e17 100644
--- a/frontends/atari/rootwin.c
+++ b/frontends/atari/rootwin.c
@@ -14,10 +14,11 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- * Module Description:
- *
- * This File implements the NetSurf Browser window, or passed functionality to
+ */
+
+/**
+ * \file
+ * Implements the NetSurf Browser window, or passed functionality to
  * the appropriate widget's.
  *
  */
@@ -41,7 +42,7 @@
 #include "netsurf/browser_window.h"
 #include "netsurf/mouse.h"
 #include "netsurf/plotters.h"
-#include "desktop/textinput.h"
+#include "netsurf/keypress.h"
 
 #include "atari/res/netsurf.rsh"
 #include "atari/gemtk/gemtk.h"
diff --git a/frontends/atari/toolbar.c b/frontends/atari/toolbar.c
index caf1d66..84f0b3f 100644
--- a/frontends/atari/toolbar.c
+++ b/frontends/atari/toolbar.c
@@ -31,15 +31,15 @@
 #include "utils/nsoption.h"
 #include "utils/nsurl.h"
 #include "utils/utf8.h"
-#include "desktop/browser_history.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/mouse.h"
-#include "desktop/plot_style.h"
 #include "netsurf/plotters.h"
+#include "netsurf/keypress.h"
+#include "desktop/plot_style.h"
+#include "desktop/browser_history.h"
 #include "desktop/tree.h"
 #include "desktop/hotlist.h"
 #include "desktop/textarea.h"
-#include "desktop/textinput.h"
 
 #include "atari/clipboard.h"
 #include "atari/gui.h"
diff --git a/frontends/beos/cookies.cpp b/frontends/beos/cookies.cpp
index 8e6801e..66cf8bb 100644
--- a/frontends/beos/cookies.cpp
+++ b/frontends/beos/cookies.cpp
@@ -25,9 +25,9 @@ extern "C" {
 #include "netsurf/mouse.h"
 #include "netsurf/plotters.h"
 #include "netsurf/cookie_db.h"
+#include "netsurf/keypress.h"
 #include "desktop/cookie_manager.h"
 #include "desktop/tree.h"
-#include "desktop/textinput.h"
 }
 #include "beos/cookies.h"
 
diff --git a/frontends/beos/scaffolding.cpp b/frontends/beos/scaffolding.cpp
index 8f3baac..47f18c9 100644
--- a/frontends/beos/scaffolding.cpp
+++ b/frontends/beos/scaffolding.cpp
@@ -65,11 +65,11 @@ extern "C" {
 #include "netsurf/content_type.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/form.h"
+#include "netsurf/keypress.h"
 #include "desktop/browser_history.h"
 #include "desktop/version.h"
 #include "desktop/searchweb.h"
 #include "desktop/search.h"
-#include "desktop/textinput.h"
 }
 
 #include "beos/about.h"
diff --git a/frontends/beos/window.cpp b/frontends/beos/window.cpp
index 2944033..07d6af2 100644
--- a/frontends/beos/window.cpp
+++ b/frontends/beos/window.cpp
@@ -47,7 +47,7 @@ extern "C" {
 #include "netsurf/window.h"
 #include "netsurf/clipboard.h"
 #include "netsurf/url_db.h"
-#include "desktop/textinput.h"
+#include "netsurf/keypress.h"
 }
 
 #include "beos/about.h"
diff --git a/frontends/cocoa/BookmarksController.m 
b/frontends/cocoa/BookmarksController.m
index f04a084..07b2c50 100644
--- a/frontends/cocoa/BookmarksController.m
+++ b/frontends/cocoa/BookmarksController.m
@@ -20,9 +20,9 @@
 #import "utils/utils.h"
 #import "utils/nsurl.h"
 #import "netsurf/browser_window.h"
+#import "netsurf/keypress.h"
 #import "desktop/hotlist.h"
 #import "desktop/tree.h"
-#import "desktop/textinput.h"
 
 #import "cocoa/BookmarksController.h"
 #import "cocoa/Tree.h"
diff --git a/frontends/cocoa/BrowserView.m b/frontends/cocoa/BrowserView.m
index 2d19128..f1259d8 100644
--- a/frontends/cocoa/BrowserView.m
+++ b/frontends/cocoa/BrowserView.m
@@ -23,7 +23,7 @@
 #import "netsurf/browser_window.h"
 #import "netsurf/plotters.h"
 #import "netsurf/content.h"
-#import "desktop/textinput.h"
+#import "netsurf/keypress.h"
 
 #import "cocoa/gui.h"
 #import "cocoa/BrowserView.h"
diff --git a/frontends/cocoa/BrowserViewController.m 
b/frontends/cocoa/BrowserViewController.m
index 777f4bc..4cac57e 100644
--- a/frontends/cocoa/BrowserViewController.m
+++ b/frontends/cocoa/BrowserViewController.m
@@ -25,7 +25,6 @@
 #import "netsurf/content.h"
 #import "netsurf/browser_window.h"
 #import "desktop/browser_history.h"
-#import "desktop/textinput.h"
 
 #import "cocoa/gui.h"
 #import "cocoa/BrowserViewController.h"
diff --git a/frontends/cocoa/NetsurfApp.m b/frontends/cocoa/NetsurfApp.m
index 5206591..54a1a82 100644
--- a/frontends/cocoa/NetsurfApp.m
+++ b/frontends/cocoa/NetsurfApp.m
@@ -40,7 +40,6 @@
 #import "netsurf/cookie_db.h"
 #import "netsurf/url_db.h"
 #import "desktop/save_complete.h"
-#import "desktop/textinput.h"
 #import "desktop/tree.h"
 
 #ifndef NETSURF_HOMEPAGE
diff --git a/frontends/cocoa/TreeView.m b/frontends/cocoa/TreeView.m
index 71f5af4..949c3c2 100644
--- a/frontends/cocoa/TreeView.m
+++ b/frontends/cocoa/TreeView.m
@@ -20,7 +20,7 @@
 #import "cocoa/Tree.h"
 
 #import "netsurf/plotters.h"
-#import "desktop/textinput.h"
+#import "netsurf/keypress.h"
 
 @interface TreeView () <TreeDelegate>
 @end
diff --git a/frontends/cocoa/gui.m b/frontends/cocoa/gui.m
index 7e6c996..b1847eb 100644
--- a/frontends/cocoa/gui.m
+++ b/frontends/cocoa/gui.m
@@ -27,7 +27,6 @@
 #import "netsurf/misc.h"
 #import "netsurf/browser_window.h"
 #import "netsurf/content.h"
-#import "desktop/textinput.h"
 
 #import "cocoa/gui.h"
 #import "cocoa/coordinates.h"
diff --git a/frontends/framebuffer/fbtk/event.c 
b/frontends/framebuffer/fbtk/event.c
index dab0355..a48e638 100644
--- a/frontends/framebuffer/fbtk/event.c
+++ b/frontends/framebuffer/fbtk/event.c
@@ -32,7 +32,7 @@
 #include "utils/utils.h"
 #include "utils/log.h"
 #include "netsurf/browser_window.h"
-#include "desktop/textinput.h"
+#include "netsurf/keypress.h"
 
 #include "framebuffer/gui.h"
 #include "framebuffer/fbtk.h"
diff --git a/frontends/framebuffer/gui.c b/frontends/framebuffer/gui.c
index 6879886..4936116 100644
--- a/frontends/framebuffer/gui.c
+++ b/frontends/framebuffer/gui.c
@@ -35,7 +35,7 @@
 #include "utils/log.h"
 #include "utils/messages.h"
 #include "netsurf/browser_window.h"
-#include "desktop/textinput.h"
+#include "netsurf/keypress.h"
 #include "desktop/browser_history.h"
 #include "netsurf/plotters.h"
 #include "netsurf/window.h"
diff --git a/frontends/gtk/cookies.c b/frontends/gtk/cookies.c
index f8f9893..514c826 100644
--- a/frontends/gtk/cookies.c
+++ b/frontends/gtk/cookies.c
@@ -21,12 +21,13 @@
  */
 
 #include <gtk/gtk.h>
+#include <stdint.h>
 
 #include "utils/log.h"
+#include "netsurf/keypress.h"
 #include "desktop/cookie_manager.h"
 #include "desktop/plot_style.h"
 #include "desktop/tree.h"
-#include "desktop/textinput.h"
 
 #include "gtk/cookies.h"
 #include "gtk/plotters.h"
diff --git a/frontends/gtk/gui.c b/frontends/gtk/gui.c
index d358b43..e0044b5 100644
--- a/frontends/gtk/gui.c
+++ b/frontends/gtk/gui.c
@@ -38,18 +38,18 @@
 #include "utils/utils.h"
 #include "utils/file.h"
 #include "utils/nsoption.h"
-#include "content/fetch.h"
+#include "netsurf/keypress.h"
 #include "netsurf/url_db.h"
 #include "netsurf/cookie_db.h"
-#include "content/backing_store.h"
 #include "netsurf/browser_window.h"
+#include "netsurf/misc.h"
+#include "netsurf/netsurf.h"
+#include "content/fetch.h"
+#include "content/backing_store.h"
 #include "desktop/save_complete.h"
 #include "desktop/save_pdf.h"
 #include "desktop/searchweb.h"
-#include "desktop/textinput.h"
 #include "desktop/tree.h"
-#include "netsurf/misc.h"
-#include "netsurf/netsurf.h"
 
 #include "gtk/compat.h"
 #include "gtk/warn.h"
diff --git a/frontends/gtk/history.c b/frontends/gtk/history.c
index 9c5c0b5..fb805d6 100644
--- a/frontends/gtk/history.c
+++ b/frontends/gtk/history.c
@@ -18,13 +18,14 @@
  */
 
 #include <stdlib.h>
+#include <stdint.h>
 #include <gtk/gtk.h>
 
 #include "utils/log.h"
+#include "netsurf/keypress.h"
 #include "desktop/global_history.h"
 #include "desktop/plot_style.h"
 #include "desktop/tree.h"
-#include "desktop/textinput.h"
 
 #include "gtk/plotters.h"
 #include "gtk/scaffolding.h"
diff --git a/frontends/gtk/hotlist.c b/frontends/gtk/hotlist.c
index 82ea3e3..fa89956 100644
--- a/frontends/gtk/hotlist.c
+++ b/frontends/gtk/hotlist.c
@@ -21,9 +21,9 @@
 
 #include "utils/log.h"
 #include "utils/nsoption.h"
+#include "netsurf/keypress.h"
 #include "desktop/hotlist.h"
 #include "desktop/tree.h"
-#include "desktop/textinput.h"
 
 #include "gtk/plotters.h"
 #include "gtk/scaffolding.h"
diff --git a/frontends/gtk/scaffolding.c b/frontends/gtk/scaffolding.c
index dc0595a..cd3779e 100644
--- a/frontends/gtk/scaffolding.c
+++ b/frontends/gtk/scaffolding.c
@@ -36,10 +36,11 @@
 #include "utils/file.h"
 #include "utils/nsurl.h"
 #include "netsurf/content.h"
-#include "desktop/browser_history.h"
+#include "netsurf/keypress.h"
 #include "netsurf/browser_window.h"
-#include "desktop/hotlist.h"
 #include "netsurf/plotters.h"
+#include "desktop/browser_history.h"
+#include "desktop/hotlist.h"
 #include "desktop/print.h"
 #include "desktop/save_complete.h"
 #ifdef WITH_PDF_EXPORT
@@ -48,7 +49,6 @@
 #endif
 #include "desktop/save_text.h"
 #include "desktop/searchweb.h"
-#include "desktop/textinput.h"
 #include "desktop/search.h"
 
 #include "gtk/compat.h"
diff --git a/frontends/gtk/window.c b/frontends/gtk/window.c
index b4af648..ce2644e 100644
--- a/frontends/gtk/window.c
+++ b/frontends/gtk/window.c
@@ -42,6 +42,8 @@
 #include "netsurf/window.h"
 #include "netsurf/plotters.h"
 #include "netsurf/form.h"
+#include "netsurf/keypress.h"
+#include "desktop/textarea.h"
 #include "desktop/searchweb.h"
 #include "desktop/textinput.h"
 
diff --git a/frontends/riscos/cookies.c b/frontends/riscos/cookies.c
index d5eab99..26374a5 100644
--- a/frontends/riscos/cookies.c
+++ b/frontends/riscos/cookies.c
@@ -33,9 +33,9 @@
 #include "utils/nsoption.h"
 #include "utils/messages.h"
 #include "utils/log.h"
+#include "netsurf/keypress.h"
 #include "desktop/cookie_manager.h"
 #include "desktop/tree.h"
-#include "desktop/textinput.h"
 
 #include "riscos/cookies.h"
 #include "riscos/dialog.h"
diff --git a/frontends/riscos/global_history.c 
b/frontends/riscos/global_history.c
index 8e339e6..e893630 100644
--- a/frontends/riscos/global_history.c
+++ b/frontends/riscos/global_history.c
@@ -35,9 +35,9 @@
 #include "utils/messages.h"
 #include "utils/log.h"
 #include "netsurf/window.h"
+#include "netsurf/keypress.h"
 #include "desktop/global_history.h"
 #include "desktop/tree.h"
-#include "desktop/textinput.h"
 
 #include "riscos/dialog.h"
 #include "riscos/global_history.h"
diff --git a/frontends/riscos/hotlist.c b/frontends/riscos/hotlist.c
index f3daad0..d477020 100644
--- a/frontends/riscos/hotlist.c
+++ b/frontends/riscos/hotlist.c
@@ -38,9 +38,9 @@
 #include "utils/nsurl.h"
 #include "netsurf/url_db.h"
 #include "netsurf/window.h"
+#include "netsurf/keypress.h"
 #include "desktop/hotlist.h"
 #include "desktop/tree.h"
-#include "desktop/textinput.h"
 
 #include "riscos/gui.h"
 #include "riscos/dialog.h"
diff --git a/frontends/riscos/menus.c b/frontends/riscos/menus.c
index 9807079..c123a0f 100644
--- a/frontends/riscos/menus.c
+++ b/frontends/riscos/menus.c
@@ -38,7 +38,6 @@
 #include "utils/messages.h"
 #include "utils/utf8.h"
 #include "desktop/cookie_manager.h"
-#include "desktop/textinput.h"
 
 #include "riscos/dialog.h"
 #include "riscos/configure.h"
diff --git a/frontends/riscos/textselection.c b/frontends/riscos/textselection.c
index e4d498d..bce3575 100644
--- a/frontends/riscos/textselection.c
+++ b/frontends/riscos/textselection.c
@@ -33,7 +33,6 @@
 #include "utils/utils.h"
 #include "netsurf/clipboard.h"
 #include "netsurf/window.h"
-#include "desktop/textinput.h"
 #include "netsurf/browser_window.h"
 
 #include "riscos/gui.h"
diff --git a/frontends/riscos/treeview.c b/frontends/riscos/treeview.c
index a675283..1798146 100644
--- a/frontends/riscos/treeview.c
+++ b/frontends/riscos/treeview.c
@@ -40,7 +40,7 @@
 #include "utils/messages.h"
 #include "utils/utils.h"
 #include "netsurf/plotters.h"
-#include "desktop/textinput.h"
+#include "netsurf/keypress.h"
 #include "desktop/tree.h"
 
 #include "riscos/bitmap.h"
diff --git a/frontends/riscos/window.c b/frontends/riscos/window.c
index fe36da5..58cd86e 100644
--- a/frontends/riscos/window.c
+++ b/frontends/riscos/window.c
@@ -59,10 +59,10 @@
 #include "netsurf/bitmap.h"
 #include "netsurf/url_db.h"
 #include "netsurf/form.h"
+#include "netsurf/keypress.h"
 #include "desktop/browser_history.h"
 #include "desktop/cookie_manager.h"
 #include "desktop/scrollbar.h"
-#include "desktop/textinput.h"
 
 #include "riscos/bitmap.h"
 #include "riscos/buffer.h"
diff --git a/frontends/windows/drawable.c b/frontends/windows/drawable.c
index 74aca15..ee1c695 100644
--- a/frontends/windows/drawable.c
+++ b/frontends/windows/drawable.c
@@ -29,7 +29,7 @@
 #include "utils/utils.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/plotters.h"
-#include "desktop/textinput.h"
+#include "netsurf/keypress.h"
 
 #include "windows/windbg.h"
 #include "windows/plot.h"
diff --git a/frontends/windows/window.c b/frontends/windows/window.c
index bbe0e96..5db464a 100644
--- a/frontends/windows/window.c
+++ b/frontends/windows/window.c
@@ -32,8 +32,8 @@
 #include "content/content.h"
 #include "netsurf/browser_window.h"
 #include "netsurf/window.h"
+#include "netsurf/keypress.h"
 #include "desktop/browser_history.h"
-#include "desktop/textinput.h"
 
 #include "windows/gui.h"
 #include "windows/pointers.h"
diff --git a/desktop/textinput.h b/include/netsurf/keypress.h
similarity index 58%
copy from desktop/textinput.h
copy to include/netsurf/keypress.h
index 0b35931..604d2dd 100644
--- a/desktop/textinput.h
+++ b/include/netsurf/keypress.h
@@ -1,8 +1,5 @@
 /*
- * Copyright 2003 Phil Mellor <[email protected]>
- * Copyright 2004 James Bursa <[email protected]>
- * Copyright 2004 Andrew Timmins <[email protected]>
- * Copyright 2004 John Tytgat <[email protected]>
+ * Copyright 2016 Vincent Sanders <[email protected]>
  *
  * This file is part of NetSurf, http://www.netsurf-browser.org/
  *
@@ -19,12 +16,14 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-/** \file
- * Textual input handling (interface)
+/**
+ * \file
+ *
+ * Interface to key press operations.
  */
 
-#ifndef _NETSURF_DESKTOP_TEXTINPUT_H_
-#define _NETSURF_DESKTOP_TEXTINPUT_H_
+#ifndef _NETSURF_KEYPRESS_H_
+#define _NETSURF_KEYPRESS_H_
 
 struct browser_window;
 
@@ -72,32 +71,13 @@ enum input_key {
 
 
 /**
- * Position the caret and assign a callback for key presses.
- *
- * \param bw           The browser window in which to place the caret
- * \param x            X coordinate of the caret
- * \param y            Y coordinate
- * \param height       Height of caret
- * \param clip         Clip rectangle for caret, or NULL if none
- */
-void browser_window_place_caret(struct browser_window *bw, int x, int y,
-               int height, const struct rect *clip);
-
-/**
- * Removes the caret and callback for key process.
- *
- * \param bw The browser window from which to remove caret.
- * \param only_hide Revove the caret but leave the textinput editable.
- */
-void browser_window_remove_caret(struct browser_window *bw, bool only_hide);
-
-/**
  * Handle key presses in a browser window.
  *
- * \param bw   The root browser window
- * \param key  The UCS4 character codepoint
+ * \param bw The root browser window
+ * \param key The UCS4 character codepoint
  * \return true if key handled, false otherwise
  */
 bool browser_window_key_press(struct browser_window *bw, uint32_t key);
 
+
 #endif
diff --git a/render/box_textarea.c b/render/box_textarea.c
index 79ace8d..44f5c0b 100644
--- a/render/box_textarea.c
+++ b/render/box_textarea.c
@@ -24,8 +24,8 @@
 
 #include "utils/config.h"
 #include "utils/log.h"
+#include "netsurf/keypress.h"
 #include "desktop/textarea.h"
-#include "desktop/textinput.h"
 
 #include "render/box_textarea.h"
 #include "render/font.h"
diff --git a/render/html_interaction.c b/render/html_interaction.c
index f0b50f8..e727a9f 100644
--- a/render/html_interaction.c
+++ b/render/html_interaction.c
@@ -39,12 +39,12 @@
 #include "netsurf/mouse.h"
 #include "netsurf/misc.h"
 #include "netsurf/layout.h"
+#include "netsurf/keypress.h"
 #include "content/hlcache.h"
 #include "desktop/frames.h"
 #include "desktop/scrollbar.h"
 #include "desktop/selection.h"
 #include "desktop/textarea.h"
-#include "desktop/textinput.h"
 #include "javascript/js.h"
 #include "desktop/gui_internal.h"
 
diff --git a/render/textplain.c b/render/textplain.c
index b008ab8..ae14869 100644
--- a/render/textplain.c
+++ b/render/textplain.c
@@ -38,16 +38,16 @@
 #include "utils/utils.h"
 #include "utils/utf8.h"
 #include "netsurf/content.h"
+#include "netsurf/keypress.h"
+#include "netsurf/browser_window.h"
+#include "netsurf/plotters.h"
+#include "netsurf/layout.h"
 #include "content/content_protected.h"
 #include "content/hlcache.h"
 #include "css/utils.h"
-#include "netsurf/browser_window.h"
 #include "utils/nsoption.h"
-#include "netsurf/plotters.h"
 #include "desktop/search.h"
 #include "desktop/selection.h"
-#include "desktop/textinput.h"
-#include "netsurf/layout.h"
 #include "desktop/gui_internal.h"
 
 #include "render/search.h"


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to