summaryrefslogtreecommitdiffstats
path: root/src/xml/node-event-vector.h
blob: 920e28475adab90837032a7ca94a0d8405c3a8e2 (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
44
45
46
47
#ifndef SEEN_INKSCAPE_XML_SP_REPR_EVENT_VECTOR
#define SEEN_INKSCAPE_XML_SP_REPR_EVENT_VECTOR

/*
 * Fuzzy DOM-like tree implementation
 *
 * Authors:
 *   Lauris Kaplinski <lauris@kaplinski.com>
 *   Frank Felfe <innerspace@iname.com>
 *
 * Copyright (C) 1999-2002 Lauris Kaplinski and Frank Felfe
 * Copyright (C) 2000-2002 Ximian, Inc.
 *
 * Released under GNU GPL, read the file 'COPYING' for more information
 */

#include <glib/gtypes.h>

#include "xml/node.h"

namespace Inkscape {
namespace XML {

struct NodeEventVector {
	/* Immediate signals */
	void (* child_added) (Node *repr, Node *child, Node *ref, void * data);
	void (* child_removed) (Node *repr, Node *child, Node *ref, void * data);
	void (* attr_changed) (Node *repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive, void * data);
	void (* content_changed) (Node *repr, const gchar *oldcontent, const gchar *newcontent, void * data);
	void (* order_changed) (Node *repr, Node *child, Node *oldref, Node *newref, void * data);
};

}
}

inline void sp_repr_synthesize_events (Inkscape::XML::Node *repr, const Inkscape::XML::NodeEventVector *vector, void * data) {
	repr->synthesizeEvents(vector, data);
}
                                                                                
inline void sp_repr_add_listener (Inkscape::XML::Node *repr, const Inkscape::XML::NodeEventVector *vector, void * data) {
	repr->addListener(vector, data);
}
inline void sp_repr_remove_listener_by_data (Inkscape::XML::Node *repr, void * data) {
	repr->removeListenerByData(data);
}

#endif