|
typedef hubbub_error(* | hubbub_tree_create_comment )(void *ctx, const hubbub_string *data, void **result) |
| Create a comment node. More...
|
|
typedef hubbub_error(* | hubbub_tree_create_doctype )(void *ctx, const hubbub_doctype *doctype, void **result) |
| Create a doctype node. More...
|
|
typedef hubbub_error(* | hubbub_tree_create_element )(void *ctx, const hubbub_tag *tag, void **result) |
| Create an element node. More...
|
|
typedef hubbub_error(* | hubbub_tree_create_text )(void *ctx, const hubbub_string *data, void **result) |
| Create a text node. More...
|
|
typedef hubbub_error(* | hubbub_tree_ref_node )(void *ctx, void *node) |
| Increase a node's reference count. More...
|
|
typedef hubbub_error(* | hubbub_tree_unref_node )(void *ctx, void *node) |
| Decrease a node's reference count. More...
|
|
typedef hubbub_error(* | hubbub_tree_append_child )(void *ctx, void *parent, void *child, void **result) |
| Append a node to the end of another's child list. More...
|
|
typedef hubbub_error(* | hubbub_tree_insert_before )(void *ctx, void *parent, void *child, void *ref_child, void **result) |
| Insert a node into another's child list. More...
|
|
typedef hubbub_error(* | hubbub_tree_remove_child )(void *ctx, void *parent, void *child, void **result) |
| Remove a node from another's child list. More...
|
|
typedef hubbub_error(* | hubbub_tree_clone_node )(void *ctx, void *node, bool deep, void **result) |
| Clone a node. More...
|
|
typedef hubbub_error(* | hubbub_tree_reparent_children )(void *ctx, void *node, void *new_parent) |
| Move all the children of one node to another. More...
|
|
typedef hubbub_error(* | hubbub_tree_get_parent )(void *ctx, void *node, bool element_only, void **result) |
| Retrieve the parent of a node. More...
|
|
typedef hubbub_error(* | hubbub_tree_has_children )(void *ctx, void *node, bool *result) |
| Determine if a node has children. More...
|
|
typedef hubbub_error(* | hubbub_tree_form_associate )(void *ctx, void *form, void *node) |
| Associate a node with a form. More...
|
|
typedef hubbub_error(* | hubbub_tree_add_attributes )(void *ctx, void *node, const hubbub_attribute *attributes, uint32_t n_attributes) |
| Add attributes to a node. More...
|
|
typedef hubbub_error(* | hubbub_tree_set_quirks_mode )(void *ctx, hubbub_quirks_mode mode) |
| Notification of the quirks mode of a document. More...
|
|
typedef hubbub_error(* | hubbub_tree_encoding_change )(void *ctx, const char *encname) |
| Notification that a potential encoding change is required. More...
|
|
typedef hubbub_error(* | hubbub_tree_complete_script )(void *ctx, void *script) |
| Complete script processing. More...
|
|
typedef struct hubbub_tree_handler | hubbub_tree_handler |
| Hubbub tree handler. More...
|
|
typedef hubbub_error(* hubbub_tree_append_child)(void *ctx, void *parent, void *child, void **result) |
Append a node to the end of another's child list.
- Parameters
-
ctx | Client's context |
parent | The node to append to |
child | The node to append |
result | Pointer to location to receive appended node |
- Returns
- HUBBUB_OK on success, appropriate error otherwise.
Postcondition: if successful, result's reference count is increased by 1
Important: *result may not == child (e.g. if text nodes got coalesced)
Definition at line 111 of file tree.h.
typedef hubbub_error(* hubbub_tree_get_parent)(void *ctx, void *node, bool element_only, void **result) |
Retrieve the parent of a node.
- Parameters
-
ctx | Client context |
node | Node to retrieve the parent of |
element_only | True if the parent must be an element, false otherwise |
result | Pointer to location to receive parent node |
- Returns
- HUBBUB_OK on success, appropriate error otherwise.
If there is a parent node, but it is not an element node and element_only is true, then act as if no parent existed.
Postcondition: if there is a parent, then result's reference count must be increased.
Definition at line 195 of file tree.h.
typedef hubbub_error(* hubbub_tree_insert_before)(void *ctx, void *parent, void *child, void *ref_child, void **result) |
Insert a node into another's child list.
- Parameters
-
ctx | Client's context |
parent | The node to insert into |
child | The node to insert |
ref_child | The node to insert before |
result | Pointer to location to receive inserted node |
- Returns
- HUBBUB_OK on success, appropriate error otherwise.
Postcondition: if successful, result's reference count is increased by 1
Important: *result may not == child (e.g. if text nodes got coalesced)
Definition at line 130 of file tree.h.
typedef hubbub_error(* hubbub_tree_unref_node)(void *ctx, void *node) |
Decrease a node's reference count.
- Parameters
-
ctx | Client's context |
node | Node to reference |
- Returns
- HUBBUB_OK on success, appropriate error otherwise.
Postcondition: If the node's reference count becomes zero, and it has no parent, and it is not the document node, then it is destroyed. Otherwise, the reference count is one less than before.
Definition at line 96 of file tree.h.