NetSurf
textselection.h
Go to the documentation of this file.
1/*
2 * Copyright 2020 Vincent Sanders <vince@netsurf-browser.org>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19/**
20 * \file
21 * HTML text selection handling
22 */
23
24#ifndef NETSURF_HTML_TEXTSELECTION_H
25#define NETSURF_HTML_TEXTSELECTION_H
26
27struct content;
28struct selection;
29
30nserror html_textselection_redraw(struct content *c, unsigned start_idx, unsigned end_idx);
31
32nserror html_textselection_copy(struct content *c, unsigned start_idx, unsigned end_idx, struct selection_string *selstr);
33
34/**
35 * get maximum index of text section.
36 *
37 * \param[in] c The content to measure
38 * \param[out] end_idx pointer to value to recive result
39 * \return NSERROR_OK and \a end_idx updated else error code
40 */
42
43#endif
nserror html_textselection_get_end(struct content *c, unsigned *end_idx)
get maximum index of text section.
nserror html_textselection_copy(struct content *c, unsigned start_idx, unsigned end_idx, struct selection_string *selstr)
nserror html_textselection_redraw(struct content *c, unsigned start_idx, unsigned end_idx)
nserror
Enumeration of error codes.
Definition: errors.h:29
Content which corresponds to a single URL.
struct content * c
Definition: selection.c:56
unsigned start_idx
Definition: selection.c:60
unsigned end_idx
Definition: selection.c:61