|
XenevaOS
|
#include <assert.h>#include <stdlib.h>#include <libwapcaplet/libwapcaplet.h>#include "html/html_collection.h"#include "html/html_document.h"#include "core/node.h"#include "core/element.h"#include "core/string.h"
Functions | |
| dom_exception | _dom_html_collection_create (struct dom_html_document *doc, struct dom_node_internal *root, dom_callback_is_in_collection ic, void *ctx, struct dom_html_collection **col) |
| dom_exception | _dom_html_collection_initialise (struct dom_html_document *doc, struct dom_html_collection *col, struct dom_node_internal *root, dom_callback_is_in_collection ic, void *ctx) |
| void | _dom_html_collection_finalise (struct dom_html_collection *col) |
| void | _dom_html_collection_destroy (struct dom_html_collection *col) |
| dom_exception | dom_html_collection_get_length (dom_html_collection *col, uint32_t *len) |
| dom_exception | dom_html_collection_item (dom_html_collection *col, uint32_t index, struct dom_node **node) |
| dom_exception | dom_html_collection_named_item (dom_html_collection *col, dom_string *name, struct dom_node **node) |
| void | dom_html_collection_ref (dom_html_collection *col) |
| void | dom_html_collection_unref (dom_html_collection *col) |
| dom_exception _dom_html_collection_create | ( | struct dom_html_document * | doc, |
| struct dom_node_internal * | root, | ||
| dom_callback_is_in_collection | ic, | ||
| void * | ctx, | ||
| struct dom_html_collection ** | col | ||
| ) |
Create a dom_html_collection
| doc | The document |
| root | The root element of the collection |
| ic | The callback function used to determin whether certain node belongs to the collection |
| col | The result collection object |
| void _dom_html_collection_destroy | ( | struct dom_html_collection * | col | ) |
Destroy a dom_html_collection object
| col | The dom_html_collection object |
| void _dom_html_collection_finalise | ( | struct dom_html_collection * | col | ) |
Finalise a dom_html_collection object
| col | The dom_html_collection object |
| dom_exception _dom_html_collection_initialise | ( | struct dom_html_document * | doc, |
| struct dom_html_collection * | col, | ||
| struct dom_node_internal * | root, | ||
| dom_callback_is_in_collection | ic, | ||
| void * | ctx | ||
| ) |
Intialiase a dom_html_collection
| doc | The document |
| col | The collection object to be initialised |
| root | The root element of the collection |
| ic | The callback function used to determin whether certain node beint32_ts to the collection |
| dom_exception dom_html_collection_get_length | ( | dom_html_collection * | col, |
| uint32_t * | len | ||
| ) |
Get the length of this dom_html_collection
| col | The dom_html_collection object |
| len | The returned length of this collection |
| dom_exception dom_html_collection_item | ( | dom_html_collection * | col, |
| uint32_t | index, | ||
| struct dom_node ** | node | ||
| ) |
Get the node with certain index
| col | The dom_html_collection object |
| index | The index number based on zero |
| node | The returned node object |
| dom_exception dom_html_collection_named_item | ( | dom_html_collection * | col, |
| dom_string * | name, | ||
| struct dom_node ** | node | ||
| ) |
Get the node in the collection according name
| col | The collection |
| name | The name of target node |
| node | The returned node object |
| void dom_html_collection_ref | ( | dom_html_collection * | col | ) |
Claim a reference on this collection
| col | The collection object |
| void dom_html_collection_unref | ( | dom_html_collection * | col | ) |
Relese a reference on this collection
| col | The collection object |