2005-04-15 22:00:21 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2003 Phil Mellor <monkeyson@users.sourceforge.net>
|
|
|
|
* Copyright 2004 James Bursa <bursa@users.sourceforge.net>
|
|
|
|
* Copyright 2004 Andrew Timmins <atimmins@blueyonder.co.uk>
|
2008-08-05 05:30:31 +04:00
|
|
|
* Copyright 2004 John Tytgat <joty@netsurf-browser.org>
|
2007-08-08 20:16:03 +04:00
|
|
|
*
|
|
|
|
* This file is part of NetSurf, http://www.netsurf-browser.org/
|
|
|
|
*
|
|
|
|
* NetSurf is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* NetSurf is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2005-04-15 22:00:21 +04:00
|
|
|
*/
|
|
|
|
|
2016-07-01 16:27:04 +03:00
|
|
|
/**
|
|
|
|
* \file
|
|
|
|
* Textual input handling interface
|
2005-04-15 22:00:21 +04:00
|
|
|
*/
|
|
|
|
|
2017-03-01 15:50:30 +03:00
|
|
|
#ifndef NETSURF_DESKTOP_TEXTINPUT_H
|
|
|
|
#define NETSURF_DESKTOP_TEXTINPUT_H
|
2005-04-20 16:24:41 +04:00
|
|
|
|
2014-10-19 22:12:55 +04:00
|
|
|
struct browser_window;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Position the caret and assign a callback for key presses.
|
|
|
|
*
|
2017-03-01 15:50:30 +03:00
|
|
|
* \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
|
2014-10-19 22:12:55 +04:00
|
|
|
*/
|
|
|
|
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.
|
|
|
|
*
|
2014-11-10 19:05:22 +03:00
|
|
|
* \param bw The browser window from which to remove caret.
|
2014-11-18 20:16:26 +03:00
|
|
|
* \param only_hide Revove the caret but leave the textinput editable.
|
2014-10-19 22:12:55 +04:00
|
|
|
*/
|
|
|
|
void browser_window_remove_caret(struct browser_window *bw, bool only_hide);
|
|
|
|
|
|
|
|
|
2005-04-20 16:24:41 +04:00
|
|
|
#endif
|