source: trunk/third/gtkhtml/src/htmlsearch.h @ 16767

Revision 16767, 2.1 KB checked in by ghudson, 23 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r16766, which included commits to RCS files with non-trunk default branches.
Line 
1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2/* This file is part of the GtkHTML library
3
4   Copyright (C) 2000 Helix Code, Inc.
5   Authors:           Radek Doulik (rodo@helixcode.com)
6
7   This library is free software; you can redistribute it and/or
8   modify it under the terms of the GNU Library General Public
9   License as published by the Free Software Foundation; either
10   version 2 of the License, or (at your option) any later version.
11
12   This library is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHcANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15   Library General Public License for more details.
16
17   You should have received a copy of the GNU Library General Public License
18   along with this library; see the file COPYING.LIB.  If not, write to
19   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20   Boston, MA 02111-1307, USA.
21*/
22
23#ifndef _HTML_SEARCH_H_
24#define _HTML_SEARCH_H_
25
26#include <sys/types.h>
27#include <regex.h>
28#include "htmltypes.h"
29
30struct _HTMLSearch {
31        HTMLEngine *engine;
32        gchar *trans;
33        gchar *text;
34        guint  text_len;
35        guint  found_len;
36
37        gboolean case_sensitive;
38        gboolean forward;
39        gboolean regular;
40
41        GSList      *stack;
42        GList       *found;
43        HTMLObject *last;
44
45        guint start_pos;
46        guint stop_pos;
47
48        regex_t *reb;        /* regex buffer */
49};
50
51HTMLSearch      *html_search_new            (HTMLEngine *e,
52                                             const gchar *text,
53                                             gboolean case_sensitive,
54                                             gboolean forward,
55                                             gboolean regular);
56void             html_search_destroy        (HTMLSearch *search);
57void             html_search_push           (HTMLSearch *search, HTMLObject *obj);
58HTMLObject      *html_search_pop            (HTMLSearch *search);
59gboolean         html_search_child_on_stack (HTMLSearch *search, HTMLObject *obj);
60gboolean         html_search_next_parent    (HTMLSearch *search);
61void             html_search_set_text       (HTMLSearch *search,
62                                             const gchar *text);
63void             html_search_set_forward    (HTMLSearch *search,
64                                             gboolean    forward);
65#endif
Note: See TracBrowser for help on using the repository browser.