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
12 extern "C"
13 {
14 #endif
15 
16 #include <stdbool.h>
17 #include <inttypes.h>
18 
22 typedef enum hubbub_charset_source {
28 
32 typedef enum hubbub_content_model {
38 
42 typedef enum hubbub_quirks_mode {
47 
51 typedef enum hubbub_token_type {
59 
63 typedef enum hubbub_ns {
71 } hubbub_ns;
72 
76 typedef struct hubbub_string {
77  const uint8_t *ptr;
78  size_t len;
80 
84 typedef struct hubbub_attribute {
89 
93 typedef struct hubbub_doctype {
104 
108 typedef struct hubbub_tag {
111  uint32_t n_attributes;
114 } hubbub_tag;
115 
119 typedef struct hubbub_token {
122  union {
124 
126 
128 
130  } data;
131 } hubbub_token;
132 
133 #ifdef __cplusplus
134 }
135 #endif
136 
137 #endif
Charset may be changed with further data.
Definition: types.h:24
hubbub_token_type type
The token type.
Definition: types.h:120
hubbub_ns ns
Tag namespace.
Definition: types.h:109
Definition: types.h:43
Definition: types.h:57
Data for a tag.
Definition: types.h:108
Token data.
Definition: types.h:119
Definition: types.h:35
hubbub_string name
Tag name.
Definition: types.h:110
const uint8_t * ptr
Pointer to data.
Definition: types.h:77
Tokeniser string type.
Definition: types.h:76
Data for doctype token.
Definition: types.h:93
Definition: types.h:68
hubbub_string value
Attribute value.
Definition: types.h:87
Definition: types.h:70
hubbub_string public_id
Doctype public identifier.
Definition: types.h:97
hubbub_string name
Attribute name.
Definition: types.h:86
hubbub_charset_source
Source of charset information, in order of importance A client-dictated charset will override all oth...
Definition: types.h:22
Definition: types.h:65
Charset definite.
Definition: types.h:26
bool system_missing
Whether the system id is missing.
Definition: types.h:99
Definition: types.h:54
Unknown.
Definition: types.h:23
hubbub_doctype doctype
Definition: types.h:123
Definition: types.h:52
size_t len
Byte length of string.
Definition: types.h:78
Definition: types.h:34
bool self_closing
Whether the tag can have children.
Definition: types.h:113
Definition: types.h:67
struct hubbub_token hubbub_token
Token data.
hubbub_quirks_mode
Quirks mode flag.
Definition: types.h:42
hubbub_token_type
Type of an emitted token.
Definition: types.h:51
Definition: types.h:56
hubbub_attribute * attributes
Array of attribute data.
Definition: types.h:112
Definition: types.h:44
hubbub_string system_id
Doctype system identifier.
Definition: types.h:100
Definition: types.h:64
struct hubbub_string hubbub_string
Tokeniser string type.
hubbub_string comment
Definition: types.h:127
hubbub_string name
Doctype name.
Definition: types.h:94
Definition: types.h:45
hubbub_string character
Definition: types.h:129
struct hubbub_doctype hubbub_doctype
Data for doctype token.
hubbub_content_model
Content model flag.
Definition: types.h:32
hubbub_tag tag
Definition: types.h:125
Tag attribute data.
Definition: types.h:84
hubbub_ns
Possible namespaces.
Definition: types.h:63
hubbub_ns ns
Attribute namespace.
Definition: types.h:85
Definition: types.h:69
Definition: types.h:33
struct hubbub_tag hubbub_tag
Data for a tag.
union hubbub_token::@15 data
Type-specific data.
Definition: types.h:53
Definition: types.h:55
bool force_quirks
Doctype force-quirks flag.
Definition: types.h:102
struct hubbub_attribute hubbub_attribute
Tag attribute data.
Definition: types.h:66
Definition: types.h:36
uint32_t n_attributes
Count of attributes.
Definition: types.h:111
bool public_missing
Whether the public id is missing.
Definition: types.h:96