NetSurf
textinput.h
Go to the documentation of this file.
1/*
2 * Copyright 2003 Phil Mellor <monkeyson@users.sourceforge.net>
3 * Copyright 2004 James Bursa <bursa@users.sourceforge.net>
4 * Copyright 2004 Andrew Timmins <atimmins@blueyonder.co.uk>
5 * Copyright 2004 John Tytgat <joty@netsurf-browser.org>
6 *
7 * This file is part of NetSurf, http://www.netsurf-browser.org/
8 *
9 * NetSurf is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; version 2 of the License.
12 *
13 * NetSurf is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22/**
23 * \file
24 * Textual input handling interface
25 */
26
27#ifndef NETSURF_DESKTOP_TEXTINPUT_H
28#define NETSURF_DESKTOP_TEXTINPUT_H
29
30struct browser_window;
31
32/**
33 * Position the caret and assign a callback for key presses.
34 *
35 * \param bw The browser window in which to place the caret
36 * \param x X coordinate of the caret
37 * \param y Y coordinate
38 * \param height Height of caret
39 * \param clip Clip rectangle for caret, or NULL if none
40 */
41void browser_window_place_caret(struct browser_window *bw, int x, int y,
42 int height, const struct rect *clip);
43
44/**
45 * Removes the caret and callback for key process.
46 *
47 * \param bw The browser window from which to remove caret.
48 * \param only_hide Revove the caret but leave the textinput editable.
49 */
50void browser_window_remove_caret(struct browser_window *bw, bool only_hide);
51
52
53#endif
int height
Definition: gui.c:160
Browser window data.
int x
Window dimensions.
struct browser_window * bw
Rectangle coordinates.
Definition: types.h:40
void browser_window_remove_caret(struct browser_window *bw, bool only_hide)
Removes the caret and callback for key process.
Definition: textinput.c:88
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.
Definition: textinput.c:53
static nserror clip(const struct redraw_context *ctx, const struct rect *clip)
Sets a clip rectangle for subsequent plot operations.
Definition: plot.c:357