blob: ed7aa697275a07e907e07121a1b11381b935f85d (
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
36
37
38
39
40
41
42
43
|
/*
* This file is part of libdom.
* Licensed under the MIT License,
* http://www.opensource.org/licenses/mit-license.php
* Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
*/
#ifndef dom_html_element_h_
#define dom_html_element_h_
#include <dom/core/element.h>
typedef struct dom_html_element dom_html_element;
typedef struct dom_html_element_vtable {
struct dom_element_vtable base;
dom_exception (*dom_html_element_get_id)(struct dom_html_element *element,
struct dom_string **id);
dom_exception (*dom_html_element_set_id)(struct dom_html_element *element,
struct dom_string *id);
};
static inline dom_exception dom_html_element_get_id(struct dom_html_element *element,
struct dom_string **id)
{
return ((dom_html_element_vtable *) ((dom_node *) element)->vtable)->
dom_html_element_get_id(element, id);
}
#define dom_html_element_get_id(e, id) dom_html_element_get_id( \
(dom_html_element *) (e), (struct dom_string **) (id))
static inline dom_exception dom_html_element_set_id(struct dom_html_element *element,
struct dom_string *id)
{
return ((dom_html_element_vtable *) ((dom_node *) element)->vtable)->
dom_html_element_set_id(element, id);
}
#define dom_html_element_set_id(e, id) dom_html_element_set_id( \
(dom_html_element *) (e), (struct dom_string *) (id))
#endif
|