libdom
|
#include <stdbool.h>
#include <dom/core/exceptions.h>
#include <dom/core/text.h>
#include "core/characterdata.h"
Go to the source code of this file.
Classes | |
struct | dom_text |
Macros | |
#define | DOM_TEXT_VTABLE |
#define | DOM_TEXT_PROTECT_VTABLE |
#define | dom_text_copy_internal(o, n) _dom_text_copy_internal((dom_text *) (o), (dom_text *) (n)) |
Functions | |
dom_exception | _dom_text_create (struct dom_document *doc, dom_string *name, dom_string *value, dom_text **result) |
void | _dom_text_destroy (dom_text *text) |
dom_exception | _dom_text_initialise (dom_text *text, struct dom_document *doc, dom_node_type type, dom_string *name, dom_string *value) |
void | _dom_text_finalise (dom_text *text) |
dom_exception | _dom_text_split_text (dom_text *text, uint32_t offset, dom_text **result) |
dom_exception | _dom_text_get_is_element_content_whitespace (dom_text *text, bool *result) |
dom_exception | _dom_text_get_whole_text (dom_text *text, dom_string **result) |
dom_exception | _dom_text_replace_whole_text (dom_text *text, dom_string *content, dom_text **result) |
void | __dom_text_destroy (struct dom_node_internal *node) |
dom_exception | _dom_text_copy (dom_node_internal *old, dom_node_internal **copy) |
dom_exception | _dom_text_copy_internal (dom_text *old, dom_text *new) |
Variables | |
const struct dom_text_vtable | text_vtable |
#define dom_text_copy_internal | ( | o, | |
n ) _dom_text_copy_internal((dom_text *) (o), (dom_text *) (n)) |
#define DOM_TEXT_PROTECT_VTABLE |
#define DOM_TEXT_VTABLE |
void __dom_text_destroy | ( | struct dom_node_internal * | node | ) |
dom_exception _dom_text_copy | ( | dom_node_internal * | old, |
dom_node_internal ** | copy ) |
dom_exception _dom_text_copy_internal | ( | dom_text * | old, |
dom_text * | new ) |
dom_exception _dom_text_create | ( | dom_document * | doc, |
dom_string * | name, | ||
dom_string * | value, | ||
dom_text ** | result ) |
Create a text node
doc | The owning document |
name | The name of the node to create |
value | The text content of the node |
result | Pointer to location to receive created node |
::doc, ::name and ::value will have their reference counts increased.
The returned node will already be referenced.
void _dom_text_destroy | ( | dom_text * | text | ) |
Destroy a text node
doc | The owning document |
text | The text node to destroy |
The contents of ::text will be destroyed and ::text will be freed.
void _dom_text_finalise | ( | dom_text * | text | ) |
Finalise a text node
doc | The owning document |
text | The text node to finalise |
The contents of ::text will be cleaned up. ::text will not be freed.
dom_exception _dom_text_get_is_element_content_whitespace | ( | dom_text * | text, |
bool * | result ) |
Determine if a text node contains element content whitespace
text | The node to consider |
result | Pointer to location to receive result |
dom_exception _dom_text_get_whole_text | ( | dom_text * | text, |
dom_string ** | result ) |
Retrieve all text in Text nodes logically adjacent to a Text node
text | Text node to consider |
result | Pointer to location to receive result |
dom_exception _dom_text_initialise | ( | dom_text * | text, |
dom_document * | doc, | ||
dom_node_type | type, | ||
dom_string * | name, | ||
dom_string * | value ) |
Initialise a text node
text | The node to initialise |
doc | The owning document |
type | The type of the node |
name | The name of the node to create |
value | The text content of the node |
::doc, ::name and ::value will have their reference counts increased.
dom_exception _dom_text_replace_whole_text | ( | dom_text * | text, |
dom_string * | content, | ||
dom_text ** | result ) |
Replace the text of a Text node and all logically adjacent Text nodes
text | Text node to consider |
content | Replacement content |
result | Pointer to location to receive Text node |
The returned node will be referenced. The client should unref the node once it has finished with it.
dom_exception _dom_text_split_text | ( | dom_text * | text, |
uint32_t | offset, | ||
dom_text ** | result ) |
Split a text node at a given character offset
text | The node to split |
offset | Character offset to split at |
result | Pointer to location to receive new node |
The returned node will be referenced. The client should unref the node once it has finished with it.
|
extern |