From 1180d1932480234619163d57a4dc2629c9309f38 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sun, 19 Oct 2014 19:12:55 +0100 Subject: improve documentation in headers --- desktop/textinput.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'desktop/textinput.h') 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 -- cgit v1.2.3