source: trunk/third/gtkhtml3/src/htmltokenizer.h @ 19539

Revision 19539, 3.0 KB checked in by ghudson, 21 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r19538, 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) 1997 Martin Jones (mjones@kde.org)
5   Copyright (C) 1997 Torben Weis (weis@kde.org)
6   Copyright (C) 2000 Helix Code, Inc.
7   Copyright (C) 2001 Ximian, Inc.
8   
9   This library is free software; you can redistribute it and/or
10   modify it under the terms of the GNU Library General Public
11   License as published by the Free Software Foundation; either
12   version 2 of the License, or (at your option) any later version.
13   
14   This library is distributed in the hope that it will be useful,
15   but WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17   Library General Public License for more details.
18   
19   You should have received a copy of the GNU Library General Public License
20   along with this library; see the file COPYING.LIB.  If not, write to
21   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22   Boston, MA 02111-1307, USA.
23*/
24
25#ifndef _HTMLTOKENIZER_H_
26#define _HTMLTOKENIZER_H_
27
28#include <glib-object.h>
29#include "htmltypes.h"
30
31#define TAG_ESCAPE 13
32#define TAB_SIZE 8
33
34#define HTML_TYPE_TOKENIZER        (html_tokenizer_get_type ())
35#define HTML_TOKENIZER(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), HTML_TYPE_TOKENIZER, HTMLTokenizer))
36#define HTML_TOKENIZER_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST ((k), HTML_TYPE_TOKENIZER, HTMLTokenizerClass))
37#define HTML_IS_TOKENIZER(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), HTML_TYPE_TOKENIZER))
38#define HTML_IS_TOKENIZER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), HTML_TYPE_TOKENIZER))
39
40struct _HTMLTokenizerPrivate;
41
42struct _HTMLTokenizer {
43        GObject parent;
44        struct _HTMLTokenizerPrivate *priv;
45};
46
47struct _HTMLTokenizerClass {
48        GObjectClass parent_class;
49
50        /* signals */
51        void     (*begin)           (HTMLTokenizer *, gchar *content_type);
52        void     (*end)             (HTMLTokenizer *);
53
54        /* virtual functions */
55        void           (*write)      (HTMLTokenizer *, const gchar *string, size_t size);
56        gchar         *(*peek_token) (HTMLTokenizer *);
57        gchar         *(*next_token) (HTMLTokenizer *);
58        gboolean       (*has_more)   (HTMLTokenizer *);
59
60        HTMLTokenizer *(*clone)      (HTMLTokenizer *);
61};
62
63GType          html_tokenizer_get_type        (void);
64
65HTMLTokenizer *html_tokenizer_new             (void);
66void           html_tokenizer_destroy         (HTMLTokenizer *tokenizer);
67
68void           html_tokenizer_begin           (HTMLTokenizer *t,
69                                               gchar *content_type);
70void           html_tokenizer_write           (HTMLTokenizer *t,
71                                               const gchar *string,
72                                               size_t size);
73void           html_tokenizer_end             (HTMLTokenizer *t);
74gchar *        html_tokenizer_peek_token      (HTMLTokenizer *t);
75gchar *        html_tokenizer_next_token      (HTMLTokenizer *t);
76gboolean       html_tokenizer_has_more_tokens (HTMLTokenizer *t);
77
78HTMLTokenizer *html_tokenizer_clone           (HTMLTokenizer *t);
79
80#endif /* _HTMLTOKENIZER_H_ */
Note: See TracBrowser for help on using the repository browser.