NetSurf
|
Textual input handling implementation. More...
#include <assert.h>
#include <ctype.h>
#include <string.h>
#include <dom/dom.h>
#include "utils/log.h"
#include "utils/talloc.h"
#include "utils/utf8.h"
#include "utils/utils.h"
#include "netsurf/types.h"
#include "netsurf/mouse.h"
#include "netsurf/form.h"
#include "netsurf/window.h"
#include "netsurf/browser_window.h"
#include "netsurf/keypress.h"
#include "content/content.h"
#include "desktop/browser_private.h"
#include "desktop/textinput.h"
#include "desktop/gui_internal.h"
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... | |
bool | browser_window_key_press (struct browser_window *bw, uint32_t key) |
Handle key presses in a browser window. More... | |
Textual input handling implementation.
Definition in file textinput.c.
bool browser_window_key_press | ( | struct browser_window * | bw, |
uint32_t | key | ||
) |
Handle key presses in a browser window.
bw | The root browser window |
key | The UCS4 character codepoint |
Definition at line 107 of file textinput.c.
References browser_window::bw, content_keypress(), browser_window::current_content, browser_window::focus, and browser_window::window.
Referenced by ami_drag_selection(), ami_gui_event(), context_popup(), copy_button_clicked_cb(), cut_button_clicked_cb(), delete_button_clicked_cb(), fb_browser_window_input(), HOOKF(), menu_copy(), menu_cut(), menu_paste(), nsbeos_scaffolding_dispatch_event(), nsbeos_window_keypress_event(), nsgtk_window_input_method_commit(), nsgtk_window_keypress_event(), nsws_drawable_char(), nsws_drawable_keydown(), nsws_drawable_unichar(), nsws_window_command(), nsws_window_drawable_event_callback(), on_content_keypress(), paste_button_clicked_cb(), ro_gui_window_keypress(), ro_gui_window_menu_select(), ro_gui_window_paste_cb(), and selectall_button_clicked_cb().
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.
bw | The browser window in which to place the caret |
x | X coordinate of the caret |
y | Y coordinate |
height | Height of caret |
clip | Clip rectangle for caret, or NULL if none |
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().
void browser_window_remove_caret | ( | struct browser_window * | bw, |
bool | only_hide | ||
) |
Removes the caret and callback for key process.
bw | The browser window from which to remove caret. |
only_hide | Revove 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().