Code

920e28475adab90837032a7ca94a0d8405c3a8e2
[inkscape.git] / src / xml / node-event-vector.h
1 #ifndef SEEN_INKSCAPE_XML_SP_REPR_EVENT_VECTOR
2 #define SEEN_INKSCAPE_XML_SP_REPR_EVENT_VECTOR
4 /*
5  * Fuzzy DOM-like tree implementation
6  *
7  * Authors:
8  *   Lauris Kaplinski <lauris@kaplinski.com>
9  *   Frank Felfe <innerspace@iname.com>
10  *
11  * Copyright (C) 1999-2002 Lauris Kaplinski and Frank Felfe
12  * Copyright (C) 2000-2002 Ximian, Inc.
13  *
14  * Released under GNU GPL, read the file 'COPYING' for more information
15  */
17 #include <glib/gtypes.h>
19 #include "xml/node.h"
21 namespace Inkscape {
22 namespace XML {
24 struct NodeEventVector {
25         /* Immediate signals */
26         void (* child_added) (Node *repr, Node *child, Node *ref, void * data);
27         void (* child_removed) (Node *repr, Node *child, Node *ref, void * data);
28         void (* attr_changed) (Node *repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive, void * data);
29         void (* content_changed) (Node *repr, const gchar *oldcontent, const gchar *newcontent, void * data);
30         void (* order_changed) (Node *repr, Node *child, Node *oldref, Node *newref, void * data);
31 };
33 }
34 }
36 inline void sp_repr_synthesize_events (Inkscape::XML::Node *repr, const Inkscape::XML::NodeEventVector *vector, void * data) {
37         repr->synthesizeEvents(vector, data);
38 }
39                                                                                 
40 inline void sp_repr_add_listener (Inkscape::XML::Node *repr, const Inkscape::XML::NodeEventVector *vector, void * data) {
41         repr->addListener(vector, data);
42 }
43 inline void sp_repr_remove_listener_by_data (Inkscape::XML::Node *repr, void * data) {
44         repr->removeListenerByData(data);
45 }
47 #endif