2003-06-30 16:44:03 +04:00
|
|
|
/*
|
2006-02-13 02:07:28 +03:00
|
|
|
* Copyright 2006 James Bursa <bursa@users.sourceforge.net>
|
2006-02-16 02:09:55 +03:00
|
|
|
* Copyright 2006 Adrian Lees <adrianl@users.sourceforge.net>
|
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/>.
|
2006-02-13 02:07:28 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
/** \file
|
|
|
|
* Content for text/plain (interface).
|
2003-02-09 15:58:15 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _NETSURF_RENDER_TEXTPLAIN_H_
|
|
|
|
#define _NETSURF_RENDER_TEXTPLAIN_H_
|
|
|
|
|
2006-02-16 02:09:55 +03:00
|
|
|
#include <stddef.h>
|
2010-06-04 13:35:08 +04:00
|
|
|
#include "desktop/mouse.h"
|
2006-02-13 03:17:44 +03:00
|
|
|
|
2004-03-11 05:19:14 +03:00
|
|
|
struct content;
|
2010-03-28 16:56:39 +04:00
|
|
|
struct hlcache_handle;
|
|
|
|
struct http_parameter;
|
2011-02-14 01:25:11 +03:00
|
|
|
struct rect;
|
2003-02-09 15:58:15 +03:00
|
|
|
|
2011-05-07 00:40:09 +04:00
|
|
|
nserror textplain_init(void);
|
2003-02-09 15:58:15 +03:00
|
|
|
|
2006-02-16 02:09:55 +03:00
|
|
|
/* access to lines for text selection and searching */
|
2011-07-26 17:53:42 +04:00
|
|
|
unsigned long textplain_line_count(struct content *c);
|
|
|
|
size_t textplain_size(struct content *c);
|
2006-02-16 02:09:55 +03:00
|
|
|
|
2011-07-26 17:53:42 +04:00
|
|
|
size_t textplain_offset_from_coords(struct content *c, int x, int y, int dir);
|
|
|
|
void textplain_coords_from_range(struct content *c,
|
2006-02-16 02:09:55 +03:00
|
|
|
unsigned start, unsigned end, struct rect *r);
|
2011-07-26 17:53:42 +04:00
|
|
|
char *textplain_get_line(struct content *c, unsigned lineno,
|
2006-02-16 02:09:55 +03:00
|
|
|
size_t *poffset, size_t *plen);
|
2011-07-26 17:53:42 +04:00
|
|
|
int textplain_find_line(struct content *c, unsigned offset);
|
|
|
|
char *textplain_get_raw_data(struct content *c,
|
2006-02-16 02:09:55 +03:00
|
|
|
unsigned start, unsigned end, size_t *plen);
|
2011-07-26 17:53:42 +04:00
|
|
|
struct browser_window *textplain_get_browser_window(struct content *c);
|
2011-08-24 16:29:30 +04:00
|
|
|
void textplain_set_search(struct content *c, struct search_context *s);
|
2006-02-16 02:09:55 +03:00
|
|
|
|
2003-02-09 15:58:15 +03:00
|
|
|
#endif
|