summaryrefslogtreecommitdiffstats
path: root/src/xml/node-event-vector.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
commitcca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch)
tree146f39ded1c938019e1ed42d30923c2ac9e86789 /src/xml/node-event-vector.h
parentInitial commit. (diff)
downloadinkscape-upstream.tar.xz
inkscape-upstream.zip
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/xml/node-event-vector.h')
-rw-r--r--src/xml/node-event-vector.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/xml/node-event-vector.h b/src/xml/node-event-vector.h
new file mode 100644
index 0000000..263751e
--- /dev/null
+++ b/src/xml/node-event-vector.h
@@ -0,0 +1,68 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/** @file
+ * @brief Deprecated structure for a set of callbacks for node state changes
+ */
+/* 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 v2+, read the file 'COPYING' for more information.
+ */
+
+#ifndef SEEN_INKSCAPE_XML_SP_REPR_EVENT_VECTOR
+#define SEEN_INKSCAPE_XML_SP_REPR_EVENT_VECTOR
+
+#include "xml/node.h"
+
+namespace Inkscape {
+namespace XML {
+struct NodeEventVector;
+}
+}
+
+/**
+ * @brief Generate events corresponding to the node's state
+ * @deprecated Use Node::synthesizeEvents(NodeObserver &) instead
+ */
+inline void sp_repr_synthesize_events (Inkscape::XML::Node *repr, const Inkscape::XML::NodeEventVector *vector, void* data) {
+ repr->synthesizeEvents(vector, data);
+}
+/**
+ * @brief Add a set of callbacks for node state changes and its associated data
+ * @deprecated Use Node::addObserver() instead
+ */
+inline void sp_repr_add_listener (Inkscape::XML::Node *repr, const Inkscape::XML::NodeEventVector *vector, void* data) {
+ repr->addListener(vector, data);
+}
+/**
+ * @brief Remove a set of callbacks based on associated data
+ * @deprecated Use Node::removeObserver() instead
+ */
+inline void sp_repr_remove_listener_by_data (Inkscape::XML::Node *repr, void* data) {
+ repr->removeListenerByData(data);
+}
+
+namespace Inkscape {
+namespace XML {
+
+/**
+ * @brief Structure holding callbacks for node state changes
+ * @deprecated Derive an observer object from the NodeObserver class instead
+ */
+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, char const *key, char const *oldval, char const *newval, bool is_interactive, void* data);
+ void (* content_changed) (Node *repr, char const *oldcontent, char const *newcontent, void * data);
+ void (* order_changed) (Node *repr, Node *child, Node *oldref, Node *newref, void* data);
+ void (* element_name_changed) (Node* repr, char const* oldname, char const* newname, void* data);
+};
+
+}
+}
+
+#endif