Hubbub $Id$
types.h
Go to the documentation of this file.
1/*
2 * This file is part of Hubbub.
3 * Licensed under the MIT License,
4 * http://www.opensource.org/licenses/mit-license.php
5 * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org>
6 */
7
8#ifndef hubbub_types_h_
9#define hubbub_types_h_
10
11#ifdef __cplusplus
12extern "C"
13{
14#endif
15
16#include <stdbool.h>
17#include <inttypes.h>
18
28
38
47
59
72
76typedef struct hubbub_string {
77 const uint8_t *ptr;
78 size_t len;
80
89
104
115
132
133#ifdef __cplusplus
134}
135#endif
136
137#endif
Tag attribute data.
Definition types.h:84
hubbub_ns ns
Attribute namespace.
Definition types.h:85
hubbub_string value
Attribute value.
Definition types.h:87
hubbub_string name
Attribute name.
Definition types.h:86
Data for doctype token.
Definition types.h:93
bool system_missing
Whether the system id is missing.
Definition types.h:99
hubbub_string system_id
Doctype system identifier.
Definition types.h:100
hubbub_string name
Doctype name.
Definition types.h:94
bool public_missing
Whether the public id is missing.
Definition types.h:96
hubbub_string public_id
Doctype public identifier.
Definition types.h:97
bool force_quirks
Doctype force-quirks flag.
Definition types.h:102
Tokeniser string type.
Definition types.h:76
const uint8_t * ptr
Pointer to data.
Definition types.h:77
size_t len
Byte length of string.
Definition types.h:78
Data for a tag.
Definition types.h:108
bool self_closing
Whether the tag can have children.
Definition types.h:113
uint32_t n_attributes
Count of attributes.
Definition types.h:111
hubbub_ns ns
Tag namespace.
Definition types.h:109
hubbub_attribute * attributes
Array of attribute data.
Definition types.h:112
hubbub_string name
Tag name.
Definition types.h:110
Token data.
Definition types.h:119
hubbub_tag tag
Definition types.h:125
hubbub_string character
Definition types.h:129
hubbub_token_type type
The token type.
Definition types.h:120
union hubbub_token::@15 data
Type-specific data.
hubbub_doctype doctype
Definition types.h:123
hubbub_string comment
Definition types.h:127
hubbub_charset_source
Source of charset information, in order of importance A client-dictated charset will override all oth...
Definition types.h:22
@ HUBBUB_CHARSET_CONFIDENT
Charset definite.
Definition types.h:26
@ HUBBUB_CHARSET_UNKNOWN
Unknown.
Definition types.h:23
@ HUBBUB_CHARSET_TENTATIVE
Charset may be changed with further data.
Definition types.h:24
hubbub_token_type
Type of an emitted token.
Definition types.h:51
@ HUBBUB_TOKEN_COMMENT
Definition types.h:55
@ HUBBUB_TOKEN_CHARACTER
Definition types.h:56
@ HUBBUB_TOKEN_DOCTYPE
Definition types.h:52
@ HUBBUB_TOKEN_EOF
Definition types.h:57
@ HUBBUB_TOKEN_START_TAG
Definition types.h:53
@ HUBBUB_TOKEN_END_TAG
Definition types.h:54
hubbub_content_model
Content model flag.
Definition types.h:32
@ HUBBUB_CONTENT_MODEL_PCDATA
Definition types.h:33
@ HUBBUB_CONTENT_MODEL_PLAINTEXT
Definition types.h:36
@ HUBBUB_CONTENT_MODEL_CDATA
Definition types.h:35
@ HUBBUB_CONTENT_MODEL_RCDATA
Definition types.h:34
hubbub_quirks_mode
Quirks mode flag.
Definition types.h:42
@ HUBBUB_QUIRKS_MODE_FULL
Definition types.h:45
@ HUBBUB_QUIRKS_MODE_LIMITED
Definition types.h:44
@ HUBBUB_QUIRKS_MODE_NONE
Definition types.h:43
hubbub_ns
Possible namespaces.
Definition types.h:63
@ HUBBUB_NS_XMLNS
Definition types.h:70
@ HUBBUB_NS_XLINK
Definition types.h:68
@ HUBBUB_NS_HTML
Definition types.h:65
@ HUBBUB_NS_XML
Definition types.h:69
@ HUBBUB_NS_MATHML
Definition types.h:66
@ HUBBUB_NS_NULL
Definition types.h:64
@ HUBBUB_NS_SVG
Definition types.h:67