NetSurf
Functions
textinput.h File Reference

Textual input handling interface. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void browser_window_place_caret (struct browser_window *bw, int x, int y, int height, const struct rect *clip)
 Position the caret and assign a callback for key presses. More...
 
void browser_window_remove_caret (struct browser_window *bw, bool only_hide)
 Removes the caret and callback for key process. More...
 

Detailed Description

Textual input handling interface.

Definition in file textinput.h.

Function Documentation

◆ browser_window_place_caret()

void browser_window_place_caret ( struct browser_window bw,
int  x,
int  y,
int  height,
const struct rect clip 
)

Position the caret and assign a callback for key presses.

Parameters
bwThe browser window in which to place the caret
xX coordinate of the caret
yY coordinate
heightHeight of caret
clipClip rectangle for caret, or NULL if none
Todo:
intersect with bw viewport

Definition at line 53 of file textinput.c.

References browser_window_get_position(), browser_window_get_root(), browser_window::can_edit, clip(), browser_window::focus, guit, height, gui_window_table::place_caret, browser_window::scale, browser_window::window, netsurf_table::window, rect::x0, rect::x1, rect::y0, and rect::y1.

Referenced by browser_window_callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ browser_window_remove_caret()

void browser_window_remove_caret ( struct browser_window bw,
bool  only_hide 
)

Removes the caret and callback for key process.

Parameters
bwThe browser window from which to remove caret.
only_hideRevove the caret but leave the textinput editable.

Definition at line 88 of file textinput.c.

References browser_window_get_root(), browser_window::bw, browser_window::can_edit, gui_window_table::event, guit, GW_EVENT_REMOVE_CARET, browser_window::window, and netsurf_table::window.

Referenced by browser_window__handle_error(), browser_window__handle_ssl_query_response(), browser_window__handle_userpass_response(), browser_window_callback(), browser_window_content_ready(), browser_window_mouse_click_internal(), browser_window_navigate(), nsgtk_window_button_press_event(), and nsgtk_window_focus_out_event().

Here is the call graph for this function:
Here is the caller graph for this function: