mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-16 09:12:44 +03:00
3afd9c9731
Added content interface for search. Removed bw->cur_search search context. Desktop layer now does nothing except pass search requests from front end onto the bw's current_content via the content interface. Search API reduced to a pair of functions at each level: {desktop|content|html|textplain}_search and {desktop|content|html|textplain}_search_clear Updated front ends to use simplified search API. Only tested GTK and RO builds. These confine the search stuff to render/. However search still uses struct selection. The handling for which is still spread over desktop/ and render/. Also the render/search code itself still fiddles inside html and textplain privates.
52 lines
1.7 KiB
C
52 lines
1.7 KiB
C
/*
|
|
* Copyright 2006 James Bursa <bursa@users.sourceforge.net>
|
|
* Copyright 2006 Adrian Lees <adrianl@users.sourceforge.net>
|
|
*
|
|
* 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/>.
|
|
*/
|
|
|
|
/** \file
|
|
* Content for text/plain (interface).
|
|
*/
|
|
|
|
#ifndef _NETSURF_RENDER_TEXTPLAIN_H_
|
|
#define _NETSURF_RENDER_TEXTPLAIN_H_
|
|
|
|
#include <stddef.h>
|
|
#include "desktop/mouse.h"
|
|
|
|
struct content;
|
|
struct hlcache_handle;
|
|
struct http_parameter;
|
|
struct rect;
|
|
|
|
nserror textplain_init(void);
|
|
|
|
/* access to lines for text selection and searching */
|
|
unsigned long textplain_line_count(struct content *c);
|
|
size_t textplain_size(struct content *c);
|
|
|
|
size_t textplain_offset_from_coords(struct content *c, int x, int y, int dir);
|
|
void textplain_coords_from_range(struct content *c,
|
|
unsigned start, unsigned end, struct rect *r);
|
|
char *textplain_get_line(struct content *c, unsigned lineno,
|
|
size_t *poffset, size_t *plen);
|
|
int textplain_find_line(struct content *c, unsigned offset);
|
|
char *textplain_get_raw_data(struct content *c,
|
|
unsigned start, unsigned end, size_t *plen);
|
|
struct browser_window *textplain_get_browser_window(struct content *c);
|
|
|
|
#endif
|