libdom
Loading...
Searching...
No Matches
dispatch.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_internal_events_dispatch_h_
9#define dom_internal_events_dispatch_h_
10
11#include <dom/core/document.h>
12#include <dom/events/event.h>
14
15/* Dispatch a DOMNodeInserted/DOMNodeRemoved event */
18 dom_mutation_type change, bool *success);
19#define _dom_dispatch_node_change_event(doc, et, related, change, success) \
20 __dom_dispatch_node_change_event((dom_document *) (doc), \
21 (dom_event_target *) (et), \
22 (dom_event_target *) (related), \
23 (dom_mutation_type) (change), \
24 (bool *) (success))
25
26/* Dispatch a DOMNodeInsertedIntoDocument/DOMNodeRemovedFromDocument event */
28 dom_event_target *et, dom_mutation_type change, bool *success);
29#define _dom_dispatch_node_change_document_event(doc, et, change, success) \
30 __dom_dispatch_node_change_document_event((dom_document *) (doc), \
31 (dom_event_target *) (et), \
32 (dom_mutation_type) (change), \
33 (bool *) (success))
34
35/* Dispatch a DOMCharacterDataModified event */
38 dom_string *prev, dom_string *new, bool *success);
39#define _dom_dispatch_characterdata_modified_event(doc, et, \
40 prev, new, success) \
41 __dom_dispatch_characterdata_modified_event((dom_document *) (doc), \
42 (dom_event_target *) (et), \
43 (dom_string *) (prev), \
44 (dom_string *) (new), \
45 (bool *) (success))
46
47/* Dispatch a DOMAttrModified event */
50 dom_string *new, dom_event_target *related,
51 dom_string *attr_name, dom_mutation_type change,
52 bool *success);
53#define _dom_dispatch_attr_modified_event(doc, et, prev, new, \
54 related, attr_name, change, success) \
55 __dom_dispatch_attr_modified_event((dom_document *) (doc), \
56 (dom_event_target *) (et), \
57 (dom_string *) (prev), \
58 (dom_string *) (new), \
59 (dom_event_target *) (related), \
60 (dom_string *) (attr_name), \
61 (dom_mutation_type) (change), \
62 (bool *) (success))
63
64/* Dispatch a DOMSubtreeModified event */
66 dom_event_target *et, bool *success);
67#define _dom_dispatch_subtree_modified_event(doc, et, success) \
68 __dom_dispatch_subtree_modified_event((dom_document *) (doc), \
69 (dom_event_target *) (et), \
70 (bool *) (success))
71
72/* Dispatch a generic event */
74 dom_event_target *et, dom_string *event_name,
75 bool bubble, bool cancelable, bool *success);
76
77#endif
dom_exception __dom_dispatch_node_change_document_event(dom_document *doc, dom_event_target *et, dom_mutation_type change, bool *success)
Definition dispatch.c:73
dom_exception __dom_dispatch_subtree_modified_event(dom_document *doc, dom_event_target *et, bool *success)
Definition dispatch.c:204
dom_exception _dom_dispatch_generic_event(dom_document *doc, dom_event_target *et, dom_string *event_name, bool bubble, bool cancelable, bool *success)
Definition dispatch.c:244
dom_exception __dom_dispatch_characterdata_modified_event(dom_document *doc, dom_event_target *et, dom_string *prev, dom_string *new, bool *success)
Definition dispatch.c:167
dom_exception __dom_dispatch_attr_modified_event(dom_document *doc, dom_event_target *et, dom_string *prev, dom_string *new, dom_event_target *related, dom_string *attr_name, dom_mutation_type change, bool *success)
Definition dispatch.c:122
dom_exception __dom_dispatch_node_change_event(dom_document *doc, dom_event_target *et, dom_event_target *related, dom_mutation_type change, bool *success)
Definition dispatch.c:26
dom_exception
Definition exceptions.h:24
dom_mutation_type
Definition mutation_event.h:17
Definition document.h:43
Definition event_target.h:20
Definition string.h:19