summaryrefslogtreecommitdiffstats
path: root/src/libcroco/cr-libxml-node-iface.c
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc.jeanmougin@telecom-paristech.fr>2018-04-29 12:35:15 +0000
committerMarc Jeanmougin <marc.jeanmougin@telecom-paristech.fr>2018-04-29 12:35:15 +0000
commite4a6c1b52c721147bbda48d623879178a89b7b62 (patch)
tree557de694d44231c03a3e4d5364c30e6229684971 /src/libcroco/cr-libxml-node-iface.c
parentMake the CMS toggle button update the canvas (diff)
downloadinkscape-e4a6c1b52c721147bbda48d623879178a89b7b62.tar.gz
inkscape-e4a6c1b52c721147bbda48d623879178a89b7b62.zip
moved libcroco, libuemf, libdepixelize to 3rdparty folder
Diffstat (limited to 'src/libcroco/cr-libxml-node-iface.c')
-rw-r--r--src/libcroco/cr-libxml-node-iface.c81
1 files changed, 0 insertions, 81 deletions
diff --git a/src/libcroco/cr-libxml-node-iface.c b/src/libcroco/cr-libxml-node-iface.c
deleted file mode 100644
index bc860f974..000000000
--- a/src/libcroco/cr-libxml-node-iface.c
+++ /dev/null
@@ -1,81 +0,0 @@
-#include <libxml/tree.h>
-#include <string.h>
-#include "cr-libxml-node-iface.h"
-
-static CRXMLNodePtr
-libxml_getParentNode(CRXMLNodePtr cnode)
-{
- xmlNode const *xnode = (xmlNode const *) cnode;
- return xnode->parent;
-}
-
-static CRXMLNodePtr
-libxml_getFirstChild(CRXMLNodePtr cnode)
-{
- xmlNode const *xnode = (xmlNode const *) cnode;
- return xnode->children;
-}
-
-static CRXMLNodePtr
-libxml_getNextSibling(CRXMLNodePtr cnode)
-{
- xmlNode const *xnode = (xmlNode const *) cnode;
- return xnode->next;
-}
-
-static CRXMLNodePtr
-libxml_getPrevSibling(CRXMLNodePtr cnode)
-{
- xmlNode const *xnode = (xmlNode const *) cnode;
- return xnode->prev;
-}
-
-static char const *
-local_part(char const *const qname)
-{
- char const *ret = strrchr(qname, ':');
- if (ret)
- return ++ret;
- else
- return qname;
-}
-
-static char const *
-libxml_getLocalName(CRXMLNodePtr cnode)
-{
- xmlNode const *xnode = (xmlNode const *) cnode;
- return local_part((char *)xnode->name);
-}
-
-static char *
-libxml_getProp(CRXMLNodePtr cnode, char const *cprop)
-{
- xmlNodePtr xnode = (xmlNodePtr) cnode;
- xmlChar const *xprop = (xmlChar const *) cprop;
- return (char *)xmlGetProp(xnode, xprop);
-}
-
-static gboolean
-libxml_isElementNode(CRXMLNodePtr cnode)
-{
- xmlNode const *xnode = (xmlNode const *) cnode;
- return xnode->type == XML_ELEMENT_NODE;
-}
-
-static void
-libxml_freePropVal(void *const cval)
-{
- xmlFree(cval);
-}
-
-CRNodeIface const cr_libxml_node_iface = {
- libxml_getParentNode,
- libxml_getFirstChild,
- libxml_getNextSibling,
- libxml_getPrevSibling,
- libxml_getLocalName,
- libxml_getProp, /* fixme: Check whether we want xmlGetNoNsProp instead. */
-
- libxml_freePropVal,
- libxml_isElementNode
-};