libdom
Loading...
Searching...
No Matches
mutation_event.h File Reference
#include <stdbool.h>
#include <dom/core/exceptions.h>
#include <dom/core/string.h>

Go to the source code of this file.

Macros

#define dom_mutation_event_get_related_node(e, n)
 
#define dom_mutation_event_get_prev_value(e, r)
 
#define dom_mutation_event_get_new_value(e, r)
 
#define dom_mutation_event_get_attr_name(e, r)
 
#define dom_mutation_event_get_attr_change(e, t)
 
#define dom_mutation_event_init(e, t, b, c, n, p, nv, a, ch)
 
#define dom_mutation_event_init_ns(e, n, t, b, c, nd, p, nv, a, ch)
 

Typedefs

typedef struct dom_mutation_event dom_mutation_event
 

Enumerations

enum  dom_mutation_type { DOM_MUTATION_MODIFICATION = 1 , DOM_MUTATION_ADDITION = 2 , DOM_MUTATION_REMOVAL = 3 }
 

Functions

dom_exception _dom_mutation_event_get_related_node (dom_mutation_event *evt, struct dom_node **node)
 
dom_exception _dom_mutation_event_get_prev_value (dom_mutation_event *evt, dom_string **ret)
 
dom_exception _dom_mutation_event_get_new_value (dom_mutation_event *evt, dom_string **ret)
 
dom_exception _dom_mutation_event_get_attr_name (dom_mutation_event *evt, dom_string **ret)
 
dom_exception _dom_mutation_event_get_attr_change (dom_mutation_event *evt, dom_mutation_type *type)
 
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)
 
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)
 

Macro Definition Documentation

◆ dom_mutation_event_get_attr_change

#define dom_mutation_event_get_attr_change ( e,
t )
Value:
dom_mutation_type
Definition mutation_event.h:17
dom_exception _dom_mutation_event_get_attr_change(dom_mutation_event *evt, dom_mutation_type *type)
Definition mutation_event.c:145
Definition mutation_event.h:18

◆ dom_mutation_event_get_attr_name

#define dom_mutation_event_get_attr_name ( e,
r )
Value:
(dom_string **) (r))
dom_exception _dom_mutation_event_get_attr_name(dom_mutation_event *evt, dom_string **ret)
Definition mutation_event.c:129
Definition string.h:19

◆ dom_mutation_event_get_new_value

#define dom_mutation_event_get_new_value ( e,
r )
Value:
(dom_string **) (r))
dom_exception _dom_mutation_event_get_new_value(dom_mutation_event *evt, dom_string **ret)
Definition mutation_event.c:113

◆ dom_mutation_event_get_prev_value

#define dom_mutation_event_get_prev_value ( e,
r )
Value:
(dom_string **) (r))
dom_exception _dom_mutation_event_get_prev_value(dom_mutation_event *evt, dom_string **ret)
Definition mutation_event.c:97

◆ dom_mutation_event_get_related_node

#define dom_mutation_event_get_related_node ( e,
n )
Value:
(dom_mutation_event *) (e), (struct dom_node **) (n))
dom_exception _dom_mutation_event_get_related_node(dom_mutation_event *evt, struct dom_node **node)
Definition mutation_event.c:81
Definition node.h:79

◆ dom_mutation_event_init

#define dom_mutation_event_init ( e,
t,
b,
c,
n,
p,
nv,
a,
ch )
Value:
(dom_string *) (t), (bool) (b), (bool) (c), \
(struct dom_node *) (n), (dom_string *) (p), \
(dom_string *) (nv), (dom_string *) (a), \
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_mutation_event_init_ns

#define dom_mutation_event_init_ns ( e,
n,
t,
b,
c,
nd,
p,
nv,
a,
ch )
Value:
(dom_string *) (n), (dom_string *) (t),\
(bool) (b), (bool) (c), (struct dom_node *) (nd), \
(dom_string *) (p), (dom_string *) (nv),\
(dom_string *) (a), (dom_mutation_type) (ch))
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

Typedef Documentation

◆ dom_mutation_event

typedef struct dom_mutation_event dom_mutation_event

Enumeration Type Documentation

◆ dom_mutation_type

Enumerator
DOM_MUTATION_MODIFICATION 
DOM_MUTATION_ADDITION 
DOM_MUTATION_REMOVAL 

Function Documentation

◆ _dom_mutation_event_get_attr_change()

dom_exception _dom_mutation_event_get_attr_change ( dom_mutation_event * evt,
dom_mutation_type * type )

Get the way the attribute change

Parameters
evtThe Event object
typeThe change type
Returns
DOM_NO_ERR.

◆ _dom_mutation_event_get_attr_name()

dom_exception _dom_mutation_event_get_attr_name ( dom_mutation_event * evt,
dom_string ** ret )

Get the attr name

Parameters
evtThe Event object
retThe attribute name
Returns
DOM_NO_ERR.

◆ _dom_mutation_event_get_new_value()

dom_exception _dom_mutation_event_get_new_value ( dom_mutation_event * evt,
dom_string ** ret )

Get the new value

Parameters
evtThe Event object
retThe new value
Returns
DOM_NO_ERR.

◆ _dom_mutation_event_get_prev_value()

dom_exception _dom_mutation_event_get_prev_value ( dom_mutation_event * evt,
dom_string ** ret )

Get the old value

Parameters
evtThe Event object
retThe old value
Returns
DOM_NO_ERR.

◆ _dom_mutation_event_get_related_node()

dom_exception _dom_mutation_event_get_related_node ( dom_mutation_event * evt,
struct dom_node ** node )

Get the related node

Parameters
evtThe Event object
nodeThe related node
Returns
DOM_NO_ERR.

◆ _dom_mutation_event_init()

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 )

Initialise the MutationEvent

Parameters
evtThe Event object
typeThe type of this UIEvent
bubbleWhether this event can bubble
cancelableWhether this event is cancelable
nodeThe mutation node
prev_valueThe old value
new_valueThe new value
attr_nameThe attribute's name
changeThe change type
Returns
DOM_NO_ERR on success, appropriate dom_exception on failure.

◆ _dom_mutation_event_init_ns()

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 )

Initialise the MutationEvent with namespace

Parameters
evtThe Event object
namespaceThe namespace
typeThe type of this UIEvent
bubbleWhether this event can bubble
cancelableWhether this event is cancelable
nodeThe mutation node
prev_valueThe old value
new_valueThe new value
attr_nameThe attribute's name
changeThe change type
Returns
DOM_NO_ERR on success, appropriate dom_exception on failure.