|
| 1 | +package libxml2 |
| 2 | + |
| 3 | +import ( |
| 4 | + "github.com/goplus/llgo/c" |
| 5 | + "unsafe" |
| 6 | +) |
| 7 | + |
| 8 | +type HtmlParserCtxt ParserCtxt |
| 9 | +type HtmlParserCtxtPtr ParserCtxtPtr |
| 10 | +type HtmlParserNodeInfo ParserNodeInfo |
| 11 | +type HtmlSAXHandler SAXHandler |
| 12 | +type HtmlSAXHandlerPtr SAXHandlerPtr |
| 13 | +type HtmlParserInput ParserInput |
| 14 | +type HtmlParserInputPtr ParserInputPtr |
| 15 | +type HtmlDocPtr DocPtr |
| 16 | +type HtmlNodePtr NodePtr |
| 17 | + |
| 18 | +type X_htmlElemDesc struct { |
| 19 | + Name *int8 |
| 20 | + StartTag int8 |
| 21 | + EndTag int8 |
| 22 | + SaveEndTag int8 |
| 23 | + Empty int8 |
| 24 | + Depr int8 |
| 25 | + Dtd int8 |
| 26 | + Isinline int8 |
| 27 | + Desc *int8 |
| 28 | + Subelts **int8 |
| 29 | + Defaultsubelt *int8 |
| 30 | + AttrsOpt **int8 |
| 31 | + AttrsDepr **int8 |
| 32 | + AttrsReq **int8 |
| 33 | +} |
| 34 | +type HtmlElemDesc X_htmlElemDesc |
| 35 | +type HtmlElemDescPtr *HtmlElemDesc |
| 36 | + |
| 37 | +type X_htmlEntityDesc struct { |
| 38 | + Value c.Uint |
| 39 | + Name *int8 |
| 40 | + Desc *int8 |
| 41 | +} |
| 42 | +type HtmlEntityDesc X_htmlEntityDesc |
| 43 | +type HtmlEntityDescPtr *HtmlEntityDesc |
| 44 | + |
| 45 | +//go:linkname X__htmlDefaultSAXHandler C.__htmlDefaultSAXHandler |
| 46 | +func X__htmlDefaultSAXHandler() *SAXHandlerV1 |
| 47 | + |
| 48 | +//go:linkname HtmlInitAutoClose C.htmlInitAutoClose |
| 49 | +func HtmlInitAutoClose() |
| 50 | + |
| 51 | +// llgo:link (*Char).HtmlTagLookup C.htmlTagLookup |
| 52 | +func (recv_ *Char) HtmlTagLookup() *HtmlElemDesc { |
| 53 | + return nil |
| 54 | +} |
| 55 | + |
| 56 | +// llgo:link (*Char).HtmlEntityLookup C.htmlEntityLookup |
| 57 | +func (recv_ *Char) HtmlEntityLookup() *HtmlEntityDesc { |
| 58 | + return nil |
| 59 | +} |
| 60 | + |
| 61 | +//go:linkname HtmlEntityValueLookup C.htmlEntityValueLookup |
| 62 | +func HtmlEntityValueLookup(value c.Uint) *HtmlEntityDesc |
| 63 | + |
| 64 | +//go:linkname HtmlIsAutoClosed C.htmlIsAutoClosed |
| 65 | +func HtmlIsAutoClosed(doc HtmlDocPtr, elem HtmlNodePtr) c.Int |
| 66 | + |
| 67 | +//go:linkname HtmlAutoCloseTag C.htmlAutoCloseTag |
| 68 | +func HtmlAutoCloseTag(doc HtmlDocPtr, name *Char, elem HtmlNodePtr) c.Int |
| 69 | + |
| 70 | +//go:linkname HtmlParseEntityRef C.htmlParseEntityRef |
| 71 | +func HtmlParseEntityRef(ctxt HtmlParserCtxtPtr, str **Char) *HtmlEntityDesc |
| 72 | + |
| 73 | +//go:linkname HtmlParseCharRef C.htmlParseCharRef |
| 74 | +func HtmlParseCharRef(ctxt HtmlParserCtxtPtr) c.Int |
| 75 | + |
| 76 | +//go:linkname HtmlParseElement C.htmlParseElement |
| 77 | +func HtmlParseElement(ctxt HtmlParserCtxtPtr) |
| 78 | + |
| 79 | +//go:linkname HtmlNewParserCtxt C.htmlNewParserCtxt |
| 80 | +func HtmlNewParserCtxt() HtmlParserCtxtPtr |
| 81 | + |
| 82 | +// llgo:link (*HtmlSAXHandler).HtmlNewSAXParserCtxt C.htmlNewSAXParserCtxt |
| 83 | +func (recv_ *HtmlSAXHandler) HtmlNewSAXParserCtxt(userData unsafe.Pointer) HtmlParserCtxtPtr { |
| 84 | + return nil |
| 85 | +} |
| 86 | + |
| 87 | +//go:linkname HtmlCreateMemoryParserCtxt C.htmlCreateMemoryParserCtxt |
| 88 | +func HtmlCreateMemoryParserCtxt(buffer *int8, size c.Int) HtmlParserCtxtPtr |
| 89 | + |
| 90 | +//go:linkname HtmlParseDocument C.htmlParseDocument |
| 91 | +func HtmlParseDocument(ctxt HtmlParserCtxtPtr) c.Int |
| 92 | + |
| 93 | +// llgo:link (*Char).HtmlSAXParseDoc C.htmlSAXParseDoc |
| 94 | +func (recv_ *Char) HtmlSAXParseDoc(encoding *int8, sax HtmlSAXHandlerPtr, userData unsafe.Pointer) HtmlDocPtr { |
| 95 | + return nil |
| 96 | +} |
| 97 | + |
| 98 | +// llgo:link (*Char).HtmlParseDoc C.htmlParseDoc |
| 99 | +func (recv_ *Char) HtmlParseDoc(encoding *int8) HtmlDocPtr { |
| 100 | + return nil |
| 101 | +} |
| 102 | + |
| 103 | +//go:linkname HtmlCreateFileParserCtxt C.htmlCreateFileParserCtxt |
| 104 | +func HtmlCreateFileParserCtxt(filename *int8, encoding *int8) HtmlParserCtxtPtr |
| 105 | + |
| 106 | +//go:linkname HtmlSAXParseFile C.htmlSAXParseFile |
| 107 | +func HtmlSAXParseFile(filename *int8, encoding *int8, sax HtmlSAXHandlerPtr, userData unsafe.Pointer) HtmlDocPtr |
| 108 | + |
| 109 | +//go:linkname HtmlParseFile C.htmlParseFile |
| 110 | +func HtmlParseFile(filename *int8, encoding *int8) HtmlDocPtr |
| 111 | + |
| 112 | +//go:linkname UTF8ToHtml C.UTF8ToHtml |
| 113 | +func UTF8ToHtml(out *int8, outlen *c.Int, in *int8, inlen *c.Int) c.Int |
| 114 | + |
| 115 | +//go:linkname HtmlEncodeEntities C.htmlEncodeEntities |
| 116 | +func HtmlEncodeEntities(out *int8, outlen *c.Int, in *int8, inlen *c.Int, quoteChar c.Int) c.Int |
| 117 | + |
| 118 | +// llgo:link (*Char).HtmlIsScriptAttribute C.htmlIsScriptAttribute |
| 119 | +func (recv_ *Char) HtmlIsScriptAttribute() c.Int { |
| 120 | + return 0 |
| 121 | +} |
| 122 | + |
| 123 | +//go:linkname HtmlHandleOmittedElem C.htmlHandleOmittedElem |
| 124 | +func HtmlHandleOmittedElem(val c.Int) c.Int |
| 125 | + |
| 126 | +/** |
| 127 | + * Interfaces for the Push mode. |
| 128 | + */ |
| 129 | +//go:linkname HtmlCreatePushParserCtxt C.htmlCreatePushParserCtxt |
| 130 | +func HtmlCreatePushParserCtxt(sax HtmlSAXHandlerPtr, user_data unsafe.Pointer, chunk *int8, size c.Int, filename *int8, enc CharEncoding) HtmlParserCtxtPtr |
| 131 | + |
| 132 | +//go:linkname HtmlParseChunk C.htmlParseChunk |
| 133 | +func HtmlParseChunk(ctxt HtmlParserCtxtPtr, chunk *int8, size c.Int, terminate c.Int) c.Int |
| 134 | + |
| 135 | +//go:linkname HtmlFreeParserCtxt C.htmlFreeParserCtxt |
| 136 | +func HtmlFreeParserCtxt(ctxt HtmlParserCtxtPtr) |
| 137 | + |
| 138 | +type HtmlParserOption c.Int |
| 139 | + |
| 140 | +const ( |
| 141 | + HTMLPARSERECOVER HtmlParserOption = 1 |
| 142 | + HTMLPARSENODEFDTD HtmlParserOption = 4 |
| 143 | + HTMLPARSENOERROR HtmlParserOption = 32 |
| 144 | + HTMLPARSENOWARNING HtmlParserOption = 64 |
| 145 | + HTMLPARSEPEDANTIC HtmlParserOption = 128 |
| 146 | + HTMLPARSENOBLANKS HtmlParserOption = 256 |
| 147 | + HTMLPARSENONET HtmlParserOption = 2048 |
| 148 | + HTMLPARSENOIMPLIED HtmlParserOption = 8192 |
| 149 | + HTMLPARSECOMPACT HtmlParserOption = 65536 |
| 150 | + HTMLPARSEIGNOREENC HtmlParserOption = 2097152 |
| 151 | +) |
| 152 | + |
| 153 | +//go:linkname HtmlCtxtReset C.htmlCtxtReset |
| 154 | +func HtmlCtxtReset(ctxt HtmlParserCtxtPtr) |
| 155 | + |
| 156 | +//go:linkname HtmlCtxtUseOptions C.htmlCtxtUseOptions |
| 157 | +func HtmlCtxtUseOptions(ctxt HtmlParserCtxtPtr, options c.Int) c.Int |
| 158 | + |
| 159 | +// llgo:link (*Char).HtmlReadDoc C.htmlReadDoc |
| 160 | +func (recv_ *Char) HtmlReadDoc(URL *int8, encoding *int8, options c.Int) HtmlDocPtr { |
| 161 | + return nil |
| 162 | +} |
| 163 | + |
| 164 | +//go:linkname HtmlReadFile C.htmlReadFile |
| 165 | +func HtmlReadFile(URL *int8, encoding *int8, options c.Int) HtmlDocPtr |
| 166 | + |
| 167 | +//go:linkname HtmlReadMemory C.htmlReadMemory |
| 168 | +func HtmlReadMemory(buffer *int8, size c.Int, URL *int8, encoding *int8, options c.Int) HtmlDocPtr |
| 169 | + |
| 170 | +//go:linkname HtmlReadFd C.htmlReadFd |
| 171 | +func HtmlReadFd(fd c.Int, URL *int8, encoding *int8, options c.Int) HtmlDocPtr |
| 172 | + |
| 173 | +//go:linkname HtmlReadIO C.htmlReadIO |
| 174 | +func HtmlReadIO(ioread InputReadCallback, ioclose InputCloseCallback, ioctx unsafe.Pointer, URL *int8, encoding *int8, options c.Int) HtmlDocPtr |
| 175 | + |
| 176 | +//go:linkname HtmlCtxtParseDocument C.htmlCtxtParseDocument |
| 177 | +func HtmlCtxtParseDocument(ctxt HtmlParserCtxtPtr, input ParserInputPtr) HtmlDocPtr |
| 178 | + |
| 179 | +//go:linkname HtmlCtxtReadDoc C.htmlCtxtReadDoc |
| 180 | +func HtmlCtxtReadDoc(ctxt ParserCtxtPtr, cur *Char, URL *int8, encoding *int8, options c.Int) HtmlDocPtr |
| 181 | + |
| 182 | +//go:linkname HtmlCtxtReadFile C.htmlCtxtReadFile |
| 183 | +func HtmlCtxtReadFile(ctxt ParserCtxtPtr, filename *int8, encoding *int8, options c.Int) HtmlDocPtr |
| 184 | + |
| 185 | +//go:linkname HtmlCtxtReadMemory C.htmlCtxtReadMemory |
| 186 | +func HtmlCtxtReadMemory(ctxt ParserCtxtPtr, buffer *int8, size c.Int, URL *int8, encoding *int8, options c.Int) HtmlDocPtr |
| 187 | + |
| 188 | +//go:linkname HtmlCtxtReadFd C.htmlCtxtReadFd |
| 189 | +func HtmlCtxtReadFd(ctxt ParserCtxtPtr, fd c.Int, URL *int8, encoding *int8, options c.Int) HtmlDocPtr |
| 190 | + |
| 191 | +//go:linkname HtmlCtxtReadIO C.htmlCtxtReadIO |
| 192 | +func HtmlCtxtReadIO(ctxt ParserCtxtPtr, ioread InputReadCallback, ioclose InputCloseCallback, ioctx unsafe.Pointer, URL *int8, encoding *int8, options c.Int) HtmlDocPtr |
| 193 | + |
| 194 | +type HtmlStatus c.Int |
| 195 | + |
| 196 | +const ( |
| 197 | + HTMLNA HtmlStatus = 0 |
| 198 | + HTMLINVALID HtmlStatus = 1 |
| 199 | + HTMLDEPRECATED HtmlStatus = 2 |
| 200 | + HTMLVALID HtmlStatus = 4 |
| 201 | + HTMLREQUIRED HtmlStatus = 12 |
| 202 | +) |
| 203 | + |
| 204 | +// llgo:link (*HtmlElemDesc).HtmlAttrAllowed C.htmlAttrAllowed |
| 205 | +func (recv_ *HtmlElemDesc) HtmlAttrAllowed(*Char, c.Int) HtmlStatus { |
| 206 | + return 0 |
| 207 | +} |
| 208 | + |
| 209 | +// llgo:link (*HtmlElemDesc).HtmlElementAllowedHere C.htmlElementAllowedHere |
| 210 | +func (recv_ *HtmlElemDesc) HtmlElementAllowedHere(*Char) c.Int { |
| 211 | + return 0 |
| 212 | +} |
| 213 | + |
| 214 | +// llgo:link (*HtmlElemDesc).HtmlElementStatusHere C.htmlElementStatusHere |
| 215 | +func (recv_ *HtmlElemDesc) HtmlElementStatusHere(*HtmlElemDesc) HtmlStatus { |
| 216 | + return 0 |
| 217 | +} |
| 218 | + |
| 219 | +//go:linkname HtmlNodeStatus C.htmlNodeStatus |
| 220 | +func HtmlNodeStatus(HtmlNodePtr, c.Int) HtmlStatus |
0 commit comments