diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-10-19 19:12:55 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-10-19 19:12:55 +0100 |
commit | 1180d1932480234619163d57a4dc2629c9309f38 (patch) | |
tree | d1857aabc48620223606b4e45dfecb1d6f586f20 /desktop/textinput.h | |
parent | 686fd09ad805ab961cf8c24f7c172ba15a45a2d1 (diff) | |
download | netsurf-1180d1932480234619163d57a4dc2629c9309f38.tar.gz netsurf-1180d1932480234619163d57a4dc2629c9309f38.tar.bz2 |
improve documentation in headers
Diffstat (limited to 'desktop/textinput.h')
-rw-r--r-- | desktop/textinput.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/desktop/textinput.h b/desktop/textinput.h index a1ee504c4..4bf8abdb6 100644 --- a/desktop/textinput.h +++ b/desktop/textinput.h @@ -26,6 +26,8 @@ #ifndef _NETSURF_DESKTOP_TEXTINPUT_H_ #define _NETSURF_DESKTOP_TEXTINPUT_H_ +struct browser_window; + enum input_key { KEY_SELECT_ALL = 1, @@ -69,4 +71,32 @@ 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 + */ +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 |