diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/hubbub/functypes.h | 35 | ||||
-rw-r--r-- | include/hubbub/tree.h | 6 |
2 files changed, 34 insertions, 7 deletions
diff --git a/include/hubbub/functypes.h b/include/hubbub/functypes.h index ddc307a..80c8388 100644 --- a/include/hubbub/functypes.h +++ b/include/hubbub/functypes.h @@ -9,6 +9,7 @@ #define hubbub_functypes_h_ #include <stdbool.h> +#include <stdint.h> #include <stdlib.h> #include <hubbub/types.h> @@ -53,12 +54,6 @@ typedef int (*hubbub_tree_create_element)(void *ctx, const hubbub_tag *tag, void **result); /** - * Type of tree element node creation function (verbatim name) - */ -typedef int (*hubbub_tree_create_element_verbatim)(void *ctx, - const uint8_t *name, size_t name_len, void **result); - -/** * Type of tree text node creation function */ typedef int (*hubbub_tree_create_text)(void *ctx, const hubbub_string *data, @@ -99,6 +94,34 @@ typedef int (*hubbub_tree_clone_node)(void *ctx, void *node, bool deep, void **result); /** + * Type of child reparenting function + */ +typedef int (*hubbub_tree_reparent_children)(void *ctx, void *node, + void *new_parent); + +/** + * Type of parent node acquisition function + */ +typedef int (*hubbub_tree_get_parent)(void *ctx, void *node, bool element_only, + void **result); + +/** + * Type of child presence query function + */ +typedef int (*hubbub_tree_has_children)(void *ctx, void *node, bool *result); + +/** + * Type of form association function + */ +typedef int (*hubbub_tree_form_associate)(void *ctx, void *form, void *node); + +/** + * Type of attribute addition function + */ +typedef int (*hubbub_tree_add_attributes)(void *ctx, void *node, + const hubbub_attribute *attributes, uint32_t n_attributes); + +/** * Type of tree quirks mode notification function */ typedef int (*hubbub_tree_set_quirks_mode)(void *ctx, hubbub_quirks_mode mode); diff --git a/include/hubbub/tree.h b/include/hubbub/tree.h index cc66acf..7e2e11f 100644 --- a/include/hubbub/tree.h +++ b/include/hubbub/tree.h @@ -17,7 +17,6 @@ typedef struct hubbub_tree_handler { hubbub_tree_create_comment create_comment; hubbub_tree_create_doctype create_doctype; hubbub_tree_create_element create_element; - hubbub_tree_create_element_verbatim create_element_verbatim; hubbub_tree_create_text create_text; hubbub_tree_ref_node ref_node; hubbub_tree_unref_node unref_node; @@ -25,6 +24,11 @@ typedef struct hubbub_tree_handler { hubbub_tree_insert_before insert_before; hubbub_tree_remove_child remove_child; hubbub_tree_clone_node clone_node; + hubbub_tree_reparent_children reparent_children; + hubbub_tree_get_parent get_parent; + hubbub_tree_has_children has_children; + hubbub_tree_form_associate form_associate; + hubbub_tree_add_attributes add_attributes; hubbub_tree_set_quirks_mode set_quirks_mode; void *ctx; } hubbub_tree_handler; |