Upload Tizen:Base source
[toolchains/python-lxml.git] / src / lxml / lxml.etree.h
1 #ifndef __PYX_HAVE__lxml__etree
2 #define __PYX_HAVE__lxml__etree
3 #ifdef __cplusplus
4 #define __PYX_EXTERN_C extern "C"
5 #else
6 #define __PYX_EXTERN_C extern
7 #endif
8
9 typedef xmlNode *(*_node_to_node_function)(xmlNode *);
10
11 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.etree.pyx":234
12  * 
13  * # forward declarations
14  * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]             # <<<<<<<<<<<<<<
15  * cdef public class _Element [ type LxmlElementType, object LxmlElement ]
16  * cdef class _BaseParser
17  */
18
19 struct LxmlDocument {
20   PyObject_HEAD
21   struct __pyx_vtabstruct_4lxml_5etree__Document *__pyx_vtab;
22   int _ns_counter;
23   PyObject *_prefix_tail;
24   xmlDoc *_c_doc;
25   struct __pyx_obj_4lxml_5etree__BaseParser *_parser;
26 };
27
28 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.etree.pyx":235
29  * # forward declarations
30  * cdef public class _Document [ type LxmlDocumentType, object LxmlDocument ]
31  * cdef public class _Element [ type LxmlElementType, object LxmlElement ]             # <<<<<<<<<<<<<<
32  * cdef class _BaseParser
33  * cdef class QName
34  */
35
36 struct LxmlElement {
37   PyObject_HEAD
38   PyObject *_gc_doc;
39   struct LxmlDocument *_doc;
40   xmlNode *_c_node;
41   PyObject *_tag;
42   PyObject *_attrib;
43 };
44
45 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.etree.pyx":1535
46  * 
47  * 
48  * cdef public class _ElementTree [ type LxmlElementTreeType,             # <<<<<<<<<<<<<<
49  *                                  object LxmlElementTree ]:
50  *     cdef _Document _doc
51  */
52
53 struct LxmlElementTree {
54   PyObject_HEAD
55   struct __pyx_vtabstruct_4lxml_5etree__ElementTree *__pyx_vtab;
56   struct LxmlDocument *_doc;
57   struct LxmlElement *_context_node;
58 };
59
60 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.etree.pyx":2097
61  * 
62  * 
63  * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher,             # <<<<<<<<<<<<<<
64  *                                        type LxmlElementTagMatcherType ]:
65  *     cdef object _pystrings
66  */
67
68 struct LxmlElementTagMatcher {
69   PyObject_HEAD
70   struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher *__pyx_vtab;
71   PyObject *_pystrings;
72   int _node_type;
73   char *_href;
74   char *_name;
75 };
76
77 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/lxml.etree.pyx":2125
78  *                 self._name = NULL
79  * 
80  * cdef public class _ElementIterator(_ElementTagMatcher) [             # <<<<<<<<<<<<<<
81  *     object LxmlElementIterator, type LxmlElementIteratorType ]:
82  *     # we keep Python references here to control GC
83  */
84
85 struct LxmlElementIterator {
86   struct LxmlElementTagMatcher __pyx_base;
87   struct LxmlElement *_node;
88   _node_to_node_function _next_element;
89 };
90
91 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/classlookup.pxi":6
92  * # Custom Element classes
93  * 
94  * cdef public class ElementBase(_Element) [ type LxmlElementBaseType,             # <<<<<<<<<<<<<<
95  *                                           object LxmlElementBase ]:
96  *     u"""ElementBase(*children, attrib=None, nsmap=None, **_extra)
97  */
98
99 struct LxmlElementBase {
100   struct LxmlElement __pyx_base;
101 };
102
103 typedef PyObject *(*_element_class_lookup_function)(PyObject *, struct LxmlDocument *, xmlNode *);
104
105 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/classlookup.pxi":148
106  * 
107  * # class to store element class lookup functions
108  * cdef public class ElementClassLookup [ type LxmlElementClassLookupType,             # <<<<<<<<<<<<<<
109  *                                        object LxmlElementClassLookup ]:
110  *     u"""ElementClassLookup(self)
111  */
112
113 struct LxmlElementClassLookup {
114   PyObject_HEAD
115   _element_class_lookup_function _lookup_function;
116 };
117
118 /* "/home/sbehnel/source/Python/lxml/lxml-2.2/src/lxml/classlookup.pxi":157
119  *         self._lookup_function = NULL # use default lookup
120  * 
121  * cdef public class FallbackElementClassLookup(ElementClassLookup) \             # <<<<<<<<<<<<<<
122  *          [ type LxmlFallbackElementClassLookupType,
123  *            object LxmlFallbackElementClassLookup ]:
124  */
125
126 struct LxmlFallbackElementClassLookup {
127   struct LxmlElementClassLookup __pyx_base;
128   struct __pyx_vtabstruct_4lxml_5etree_FallbackElementClassLookup *__pyx_vtab;
129   struct LxmlElementClassLookup *fallback;
130   _element_class_lookup_function _fallback_function;
131 };
132
133 #ifndef __PYX_HAVE_API__lxml__etree
134
135 __PYX_EXTERN_C DL_IMPORT(struct LxmlElement) *deepcopyNodeToDocument(struct LxmlDocument *, xmlNode *);
136 __PYX_EXTERN_C DL_IMPORT(struct LxmlElementTree) *elementTreeFactory(struct LxmlElement *);
137 __PYX_EXTERN_C DL_IMPORT(struct LxmlElementTree) *newElementTree(struct LxmlElement *, PyObject *);
138 __PYX_EXTERN_C DL_IMPORT(struct LxmlElement) *elementFactory(struct LxmlDocument *, xmlNode *);
139 __PYX_EXTERN_C DL_IMPORT(struct LxmlElement) *makeElement(PyObject *, struct LxmlDocument *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *);
140 __PYX_EXTERN_C DL_IMPORT(struct LxmlElement) *makeSubElement(struct LxmlElement *, PyObject *, PyObject *, PyObject *, PyObject *, PyObject *);
141 __PYX_EXTERN_C DL_IMPORT(void) setElementClassLookupFunction(_element_class_lookup_function, PyObject *);
142 __PYX_EXTERN_C DL_IMPORT(PyObject) *lookupDefaultElementClass(PyObject *, PyObject *, xmlNode *);
143 __PYX_EXTERN_C DL_IMPORT(PyObject) *lookupNamespaceElementClass(PyObject *, PyObject *, xmlNode *);
144 __PYX_EXTERN_C DL_IMPORT(PyObject) *callLookupFallback(struct LxmlFallbackElementClassLookup *, struct LxmlDocument *, xmlNode *);
145 __PYX_EXTERN_C DL_IMPORT(int) tagMatches(xmlNode *, char *, char *);
146 __PYX_EXTERN_C DL_IMPORT(struct LxmlDocument) *documentOrRaise(PyObject *);
147 __PYX_EXTERN_C DL_IMPORT(struct LxmlElement) *rootNodeOrRaise(PyObject *);
148 __PYX_EXTERN_C DL_IMPORT(int) hasText(xmlNode *);
149 __PYX_EXTERN_C DL_IMPORT(int) hasTail(xmlNode *);
150 __PYX_EXTERN_C DL_IMPORT(PyObject) *textOf(xmlNode *);
151 __PYX_EXTERN_C DL_IMPORT(PyObject) *tailOf(xmlNode *);
152 __PYX_EXTERN_C DL_IMPORT(int) setNodeText(xmlNode *, PyObject *);
153 __PYX_EXTERN_C DL_IMPORT(int) setTailText(xmlNode *, PyObject *);
154 __PYX_EXTERN_C DL_IMPORT(PyObject) *attributeValue(xmlNode *, xmlAttr *);
155 __PYX_EXTERN_C DL_IMPORT(PyObject) *attributeValueFromNsName(xmlNode *, char *, char *);
156 __PYX_EXTERN_C DL_IMPORT(PyObject) *getAttributeValue(struct LxmlElement *, PyObject *, PyObject *);
157 __PYX_EXTERN_C DL_IMPORT(PyObject) *iterattributes(struct LxmlElement *, int);
158 __PYX_EXTERN_C DL_IMPORT(PyObject) *collectAttributes(xmlNode *, int);
159 __PYX_EXTERN_C DL_IMPORT(int) setAttributeValue(struct LxmlElement *, PyObject *, PyObject *);
160 __PYX_EXTERN_C DL_IMPORT(int) delAttribute(struct LxmlElement *, PyObject *);
161 __PYX_EXTERN_C DL_IMPORT(int) delAttributeFromNsName(xmlNode *, char *, char *);
162 __PYX_EXTERN_C DL_IMPORT(int) hasChild(xmlNode *);
163 __PYX_EXTERN_C DL_IMPORT(xmlNode) *findChild(xmlNode *, Py_ssize_t);
164 __PYX_EXTERN_C DL_IMPORT(xmlNode) *findChildForwards(xmlNode *, Py_ssize_t);
165 __PYX_EXTERN_C DL_IMPORT(xmlNode) *findChildBackwards(xmlNode *, Py_ssize_t);
166 __PYX_EXTERN_C DL_IMPORT(xmlNode) *nextElement(xmlNode *);
167 __PYX_EXTERN_C DL_IMPORT(xmlNode) *previousElement(xmlNode *);
168 __PYX_EXTERN_C DL_IMPORT(void) appendChild(struct LxmlElement *, struct LxmlElement *);
169 __PYX_EXTERN_C DL_IMPORT(PyObject) *pyunicode(char *);
170 __PYX_EXTERN_C DL_IMPORT(PyObject) *utf8(PyObject *);
171 __PYX_EXTERN_C DL_IMPORT(PyObject) *getNsTag(PyObject *);
172 __PYX_EXTERN_C DL_IMPORT(PyObject) *namespacedName(xmlNode *);
173 __PYX_EXTERN_C DL_IMPORT(PyObject) *namespacedNameFromNsName(char *, char *);
174 __PYX_EXTERN_C DL_IMPORT(void) iteratorStoreNext(struct LxmlElementIterator *, struct LxmlElement *);
175 __PYX_EXTERN_C DL_IMPORT(void) initTagMatch(struct LxmlElementTagMatcher *, PyObject *);
176 __PYX_EXTERN_C DL_IMPORT(xmlNs) *findOrBuildNodeNsPrefix(struct LxmlDocument *, xmlNode *, char *, char *);
177
178 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlDocumentType;
179 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementType;
180 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementTreeType;
181 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementTagMatcherType;
182 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementIteratorType;
183 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementBaseType;
184 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlElementClassLookupType;
185 __PYX_EXTERN_C DL_IMPORT(PyTypeObject) LxmlFallbackElementClassLookupType;
186
187 #endif
188
189 PyMODINIT_FUNC initetree(void);
190
191 #endif