NetSurf
search.c
Go to the documentation of this file.
1/*
2 * Copyright 2004 John M Bell <jmb202@ecs.soton.ac.uk>
3 * Copyright 2005 Adrian Lees <adrianl@users.sourceforge.net>
4 * Copyright 2009 Mark Benjamin <netsurf-browser.org.MarkBenjamin@dfgh.net>
5 *
6 * This file is part of NetSurf, http://www.netsurf-browser.org/
7 *
8 * NetSurf is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; version 2 of the License.
11 *
12 * NetSurf is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21/**
22 * \file
23 * Free text search (core)
24 */
25
26#include <stdbool.h>
27
28#include "utils/errors.h"
29#include "content/textsearch.h"
30#include "netsurf/types.h"
32
34#include "desktop/search.h"
35
36/* exported function documented in desktop/search.h */
37void browser_window_search(struct browser_window *bw, void *context,
38 search_flags_t flags, const char *string)
39{
40 if ((bw != NULL) &&
41 (bw->current_content != NULL)) {
42 content_textsearch(bw->current_content, context, flags, string);
43 }
44}
45
46/* exported function documented in desktop/search.h */
48{
49 if ((bw != NULL) &&
50 (bw->current_content != NULL)) {
52 }
53}
Browser window private structure.
Browser window creation and manipulation interface.
void browser_window_search(struct browser_window *bw, void *context, search_flags_t flags, const char *string)
Starts or continues an existing search.
Definition: search.c:37
void browser_window_search_clear(struct browser_window *bw)
Clear up a search.
Definition: search.c:47
Browseing window text search interface.
search_flags_t
Definition: search.h:29
Error codes.
Browser window data.
struct hlcache_handle * current_content
Content handle of page currently displayed which must have READY or DONE status or NULL for no conten...
nserror content_textsearch_clear(struct hlcache_handle *h)
Clear a search.
Definition: textsearch.c:734
nserror content_textsearch(struct hlcache_handle *h, void *context, search_flags_t flags, const char *string)
Free text search a content.
Definition: textsearch.c:682
Interface to HTML searching.
NetSurf types.