summaryrefslogtreecommitdiff
path: root/src/core/document.h
blob: a51d1e14ff4bcfb67cc20aa64f5d40dafd5f6784 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * This file is part of libdom.
 * Licensed under the MIT License,
 *                http://www.opensource.org/licenses/mit-license.php
 * Copyright 2007 John-Mark Bell <jmb@netsurf-browser.org>
 */

#ifndef dom_internal_document_h_
#define dom_internal_document_h_

#include <inttypes.h>
#include <stddef.h>

struct dom_document;
struct dom_node;
struct dom_nodelist;
struct dom_string;

/* Get base of document buffer */
const uint8_t *dom_document_get_base(struct dom_document *doc);

/* (De)allocate memory */
void *dom_document_alloc(struct dom_document *doc, void *ptr, size_t size);

/* Get a nodelist, creating one if necessary */
dom_exception dom_document_get_nodelist(struct dom_document *doc,
		struct dom_node *root, struct dom_string *tagname,
		struct dom_string *namespace, struct dom_string *localname,
		struct dom_nodelist **list);

/* Remove a nodelist */
void dom_document_remove_nodelist(struct dom_document *doc,
		struct dom_nodelist *list);

#endif