libdom
Loading...
Searching...
No Matches
mutation_event.h
Go to the documentation of this file.
1/*
2 * This file is part of libdom.
3 * Licensed under the MIT License,
4 * http://www.opensource.org/licenses/mit-license.php
5 * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
6 */
7
8#ifndef dom_events_mutation_event_h_
9#define dom_events_mutation_event_h_
10
11#include <stdbool.h>
12#include <dom/core/exceptions.h>
13#include <dom/core/string.h>
14
15struct dom_node;
16
22
24
26 struct dom_node **node);
27#define dom_mutation_event_get_related_node(e, n) \
28 _dom_mutation_event_get_related_node(\
29 (dom_mutation_event *) (e), (struct dom_node **) (n))
30
32 dom_string **ret);
33#define dom_mutation_event_get_prev_value(e, r) \
34 _dom_mutation_event_get_prev_value((dom_mutation_event *) (e), \
35 (dom_string **) (r))
36
38 dom_string **ret);
39#define dom_mutation_event_get_new_value(e, r) \
40 _dom_mutation_event_get_new_value((dom_mutation_event *) (e), \
41 (dom_string **) (r))
42
44 dom_string **ret);
45#define dom_mutation_event_get_attr_name(e, r) \
46 _dom_mutation_event_get_attr_name((dom_mutation_event *) (e), \
47 (dom_string **) (r))
48
50 dom_mutation_type *type);
51#define dom_mutation_event_get_attr_change(e, t) \
52 _dom_mutation_event_get_attr_change((dom_mutation_event *) (e),\
53 (dom_mutation_type *) (t))
54
56 dom_string *type, bool bubble, bool cancelable,
57 struct dom_node *node, dom_string *prev_value,
60#define dom_mutation_event_init(e, t, b, c, n, p, nv, a, ch) \
61 _dom_mutation_event_init((dom_mutation_event *) (e), \
62 (dom_string *) (t), (bool) (b), (bool) (c), \
63 (struct dom_node *) (n), (dom_string *) (p), \
64 (dom_string *) (nv), (dom_string *) (a), \
65 (dom_mutation_type) (ch))
66
68 dom_string *namespace, dom_string *type,
69 bool bubble, bool cancelable, struct dom_node *node,
72#define dom_mutation_event_init_ns(e, n, t, b, c, nd, p, nv, a, ch) \
73 _dom_mutation_event_init_ns((dom_mutation_event *) (e), \
74 (dom_string *) (n), (dom_string *) (t),\
75 (bool) (b), (bool) (c), (struct dom_node *) (nd), \
76 (dom_string *) (p), (dom_string *) (nv),\
77 (dom_string *) (a), (dom_mutation_type) (ch))
78
79#endif
80
dom_exception
Definition exceptions.h:24
dom_exception _dom_mutation_event_get_attr_name(dom_mutation_event *evt, dom_string **ret)
Definition mutation_event.c:129
dom_exception _dom_mutation_event_init(dom_mutation_event *evt, dom_string *type, bool bubble, bool cancelable, struct dom_node *node, dom_string *prev_value, dom_string *new_value, dom_string *attr_name, dom_mutation_type change)
Definition mutation_event.c:167
dom_exception _dom_mutation_event_get_new_value(dom_mutation_event *evt, dom_string **ret)
Definition mutation_event.c:113
dom_mutation_type
Definition mutation_event.h:17
@ DOM_MUTATION_MODIFICATION
Definition mutation_event.h:18
@ DOM_MUTATION_REMOVAL
Definition mutation_event.h:20
@ DOM_MUTATION_ADDITION
Definition mutation_event.h:19
dom_exception _dom_mutation_event_get_attr_change(dom_mutation_event *evt, dom_mutation_type *type)
Definition mutation_event.c:145
dom_exception _dom_mutation_event_init_ns(dom_mutation_event *evt, dom_string *namespace, dom_string *type, bool bubble, bool cancelable, struct dom_node *node, dom_string *prev_value, dom_string *new_value, dom_string *attr_name, dom_mutation_type change)
Definition mutation_event.c:205
dom_exception _dom_mutation_event_get_prev_value(dom_mutation_event *evt, dom_string **ret)
Definition mutation_event.c:97
dom_exception _dom_mutation_event_get_related_node(dom_mutation_event *evt, struct dom_node **node)
Definition mutation_event.c:81
Definition mutation_event.h:18
dom_mutation_type change
Definition mutation_event.h:25
dom_string * new_value
Definition mutation_event.h:23
dom_string * prev_value
Definition mutation_event.h:22
dom_string * attr_name
Definition mutation_event.h:24
Definition node.h:79
Definition string.h:19