NetSurf
desktop
search.h
Go to the documentation of this file.
1
/*
2
* Copyright 2009 Mark Benjamin <netsurf-browser.org.MarkBenjamin@dfgh.net>
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
* Browseing window text search interface
22
*/
23
24
#ifndef NETSURF_DESKTOP_SEARCH_H_
25
#define NETSURF_DESKTOP_SEARCH_H_
26
27
struct
browser_window
;
28
29
typedef
enum
{
30
SEARCH_FLAG_NONE
= 0,
31
SEARCH_FLAG_CASE_SENSITIVE
= (1 << 0),
32
SEARCH_FLAG_FORWARDS
= (1 << 1),
33
SEARCH_FLAG_BACKWARDS
= (1 << 2),
34
SEARCH_FLAG_SHOWALL
= (1 << 3)
35
}
search_flags_t
;
36
37
/**
38
* Starts or continues an existing search.
39
*
40
* \param bw The browser_window to search.
41
* \param context A context pointer passed to the callbacks.
42
* \param flags Flags controlling the search operation.
43
* \param string The string being searched for.
44
*/
45
void
browser_window_search
(
struct
browser_window
*
bw
,
void
*context,
search_flags_t
flags,
const
char
*
string
);
46
47
/**
48
* Clear up a search.
49
*
50
* Frees any memory used by the search.
51
*
52
* \param bw The browser window to clean up the search for.
53
*/
54
55
void
browser_window_search_clear
(
struct
browser_window
*
bw
);
56
57
#endif
search_flags_t
search_flags_t
Definition:
search.h:29
SEARCH_FLAG_CASE_SENSITIVE
@ SEARCH_FLAG_CASE_SENSITIVE
Definition:
search.h:31
SEARCH_FLAG_NONE
@ SEARCH_FLAG_NONE
Definition:
search.h:30
SEARCH_FLAG_SHOWALL
@ SEARCH_FLAG_SHOWALL
Definition:
search.h:34
SEARCH_FLAG_BACKWARDS
@ SEARCH_FLAG_BACKWARDS
Definition:
search.h:33
SEARCH_FLAG_FORWARDS
@ SEARCH_FLAG_FORWARDS
Definition:
search.h:32
browser_window_search
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
browser_window_search_clear
void browser_window_search_clear(struct browser_window *bw)
Clear up a search.
Definition:
search.c:47
browser_window
Browser window data.
Definition:
browser_private.h:96
browser_window::bw
struct browser_window * bw
Definition:
browser_private.h:260
Generated on Wed Dec 18 2024 10:31:33 for NetSurf by
1.9.4