-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathlexbor.nelua
3297 lines (3297 loc) · 235 KB
/
lexbor.nelua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
##[[
cinclude '<lexbor/core/core.h>'
cinclude '<lexbor/html/html.h>'
cinclude '<lexbor/dom/dom.h>'
cinclude '<lexbor/css/css.h>'
cinclude '<lexbor/encoding/encoding.h>'
cinclude '<lexbor/selectors/selectors.h>'
cinclude '<lexbor/tag/tag.h>'
cinclude '<lexbor/ns/ns.h>'
cinclude '<lexbor/utils/utils.h>'
linklib 'lexbor'
]]
global FILE: type <cimport,nodecl,forwarddecl> = @record{}
global lexbor_callback_f: type <cimport,nodecl> = @function(*cuchar, csize, pointer): cuint
global function lexbor_malloc(size: csize): pointer <cimport,nodecl> end
global function lexbor_realloc(dst: pointer, size: csize): pointer <cimport,nodecl> end
global function lexbor_calloc(num: csize, size: csize): pointer <cimport,nodecl> end
global function lexbor_free(dst: pointer): pointer <cimport,nodecl> end
global lexbor_status_t: type <cimport,nodecl,using> = @enum(cint){
LXB_STATUS_OK = 0,
LXB_STATUS_ERROR = 1,
LXB_STATUS_ERROR_MEMORY_ALLOCATION = 2,
LXB_STATUS_ERROR_OBJECT_IS_NULL = 3,
LXB_STATUS_ERROR_SMALL_BUFFER = 4,
LXB_STATUS_ERROR_INCOMPLETE_OBJECT = 5,
LXB_STATUS_ERROR_NO_FREE_SLOT = 6,
LXB_STATUS_ERROR_TOO_SMALL_SIZE = 7,
LXB_STATUS_ERROR_NOT_EXISTS = 8,
LXB_STATUS_ERROR_WRONG_ARGS = 9,
LXB_STATUS_ERROR_WRONG_STAGE = 10,
LXB_STATUS_ERROR_UNEXPECTED_RESULT = 11,
LXB_STATUS_ERROR_UNEXPECTED_DATA = 12,
LXB_STATUS_ERROR_OVERFLOW = 13,
LXB_STATUS_CONTINUE = 14,
LXB_STATUS_SMALL_BUFFER = 15,
LXB_STATUS_ABORTED = 16,
LXB_STATUS_STOPPED = 17,
LXB_STATUS_NEXT = 18,
LXB_STATUS_STOP = 19
}
global lexbor_action_t: type <cimport,nodecl,using> = @enum(cint){
LEXBOR_ACTION_OK = 0,
LEXBOR_ACTION_STOP = 1,
LEXBOR_ACTION_NEXT = 2
}
global lexbor_serialize_cb_f: type <cimport,nodecl> = @function(*cuchar, csize, pointer): cuint
global lexbor_array_t: type <cimport,nodecl> = @record{
list: *pointer,
size: csize,
length: csize
}
global function lexbor_array_create(): *lexbor_array_t <cimport,nodecl> end
global function lexbor_array_init(array: *lexbor_array_t, size: csize): cuint <cimport,nodecl> end
global function lexbor_array_clean(array: *lexbor_array_t): void <cimport,nodecl> end
global function lexbor_array_destroy(array: *lexbor_array_t, self_destroy: boolean): *lexbor_array_t <cimport,nodecl> end
global function lexbor_array_expand(array: *lexbor_array_t, up_to: csize): *pointer <cimport,nodecl> end
global function lexbor_array_push(array: *lexbor_array_t, value: pointer): cuint <cimport,nodecl> end
global function lexbor_array_pop(array: *lexbor_array_t): pointer <cimport,nodecl> end
global function lexbor_array_insert(array: *lexbor_array_t, idx: csize, value: pointer): cuint <cimport,nodecl> end
global function lexbor_array_set(array: *lexbor_array_t, idx: csize, value: pointer): cuint <cimport,nodecl> end
global function lexbor_array_delete(array: *lexbor_array_t, begin: csize, length: csize): void <cimport,nodecl> end
global function lexbor_array_get(array: *lexbor_array_t, idx: csize): pointer <cimport,nodecl> end
global function lexbor_array_length(array: *lexbor_array_t): csize <cimport,nodecl> end
global function lexbor_array_size(array: *lexbor_array_t): csize <cimport,nodecl> end
global function lexbor_array_get_noi(array: *lexbor_array_t, idx: csize): pointer <cimport,nodecl> end
global function lexbor_array_length_noi(array: *lexbor_array_t): csize <cimport,nodecl> end
global function lexbor_array_size_noi(array: *lexbor_array_t): csize <cimport,nodecl> end
global lexbor_array_obj_t: type <cimport,nodecl> = @record{
list: *uint8,
size: csize,
length: csize,
struct_size: csize
}
global function lexbor_array_obj_create(): *lexbor_array_obj_t <cimport,nodecl> end
global function lexbor_array_obj_init(array: *lexbor_array_obj_t, size: csize, struct_size: csize): cuint <cimport,nodecl> end
global function lexbor_array_obj_clean(array: *lexbor_array_obj_t): void <cimport,nodecl> end
global function lexbor_array_obj_destroy(array: *lexbor_array_obj_t, self_destroy: boolean): *lexbor_array_obj_t <cimport,nodecl> end
global function lexbor_array_obj_expand(array: *lexbor_array_obj_t, up_to: csize): *uint8 <cimport,nodecl> end
global function lexbor_array_obj_push(array: *lexbor_array_obj_t): pointer <cimport,nodecl> end
global function lexbor_array_obj_push_wo_cls(array: *lexbor_array_obj_t): pointer <cimport,nodecl> end
global function lexbor_array_obj_push_n(array: *lexbor_array_obj_t, count: csize): pointer <cimport,nodecl> end
global function lexbor_array_obj_pop(array: *lexbor_array_obj_t): pointer <cimport,nodecl> end
global function lexbor_array_obj_delete(array: *lexbor_array_obj_t, begin: csize, length: csize): void <cimport,nodecl> end
global function lexbor_array_obj_erase(array: *lexbor_array_obj_t): void <cimport,nodecl> end
global function lexbor_array_obj_get(array: *lexbor_array_obj_t, idx: csize): pointer <cimport,nodecl> end
global function lexbor_array_obj_length(array: *lexbor_array_obj_t): csize <cimport,nodecl> end
global function lexbor_array_obj_size(array: *lexbor_array_obj_t): csize <cimport,nodecl> end
global function lexbor_array_obj_struct_size(array: *lexbor_array_obj_t): csize <cimport,nodecl> end
global function lexbor_array_obj_last(array: *lexbor_array_obj_t): pointer <cimport,nodecl> end
global function lexbor_array_obj_erase_noi(array: *lexbor_array_obj_t): void <cimport,nodecl> end
global function lexbor_array_obj_get_noi(array: *lexbor_array_obj_t, idx: csize): pointer <cimport,nodecl> end
global function lexbor_array_obj_length_noi(array: *lexbor_array_obj_t): csize <cimport,nodecl> end
global function lexbor_array_obj_size_noi(array: *lexbor_array_obj_t): csize <cimport,nodecl> end
global function lexbor_array_obj_struct_size_noi(array: *lexbor_array_obj_t): csize <cimport,nodecl> end
global function lexbor_array_obj_last_noi(array: *lexbor_array_obj_t): pointer <cimport,nodecl> end
global lexbor_mem_chunk: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lexbor_mem_chunk_t: type = @lexbor_mem_chunk
global lexbor_mem: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lexbor_mem_t: type = @lexbor_mem
lexbor_mem_chunk = @record{
data: *uint8,
length: csize,
size: csize,
next: *lexbor_mem_chunk_t,
prev: *lexbor_mem_chunk_t
}
lexbor_mem = @record{
chunk: *lexbor_mem_chunk_t,
chunk_first: *lexbor_mem_chunk_t,
chunk_min_size: csize,
chunk_length: csize
}
global function lexbor_mem_create(): *lexbor_mem_t <cimport,nodecl> end
global function lexbor_mem_init(mem: *lexbor_mem_t, min_chunk_size: csize): cuint <cimport,nodecl> end
global function lexbor_mem_clean(mem: *lexbor_mem_t): void <cimport,nodecl> end
global function lexbor_mem_destroy(mem: *lexbor_mem_t, destroy_self: boolean): *lexbor_mem_t <cimport,nodecl> end
global function lexbor_mem_chunk_init(mem: *lexbor_mem_t, chunk: *lexbor_mem_chunk_t, length: csize): *uint8 <cimport,nodecl> end
global function lexbor_mem_chunk_make(mem: *lexbor_mem_t, length: csize): *lexbor_mem_chunk_t <cimport,nodecl> end
global function lexbor_mem_chunk_destroy(mem: *lexbor_mem_t, chunk: *lexbor_mem_chunk_t, self_destroy: boolean): *lexbor_mem_chunk_t <cimport,nodecl> end
global function lexbor_mem_alloc(mem: *lexbor_mem_t, length: csize): pointer <cimport,nodecl> end
global function lexbor_mem_calloc(mem: *lexbor_mem_t, length: csize): pointer <cimport,nodecl> end
global function lexbor_mem_current_length(mem: *lexbor_mem_t): csize <cimport,nodecl> end
global function lexbor_mem_current_size(mem: *lexbor_mem_t): csize <cimport,nodecl> end
global function lexbor_mem_chunk_length(mem: *lexbor_mem_t): csize <cimport,nodecl> end
global function lexbor_mem_align(size: csize): csize <cimport,nodecl> end
global function lexbor_mem_align_floor(size: csize): csize <cimport,nodecl> end
global function lexbor_mem_current_length_noi(mem: *lexbor_mem_t): csize <cimport,nodecl> end
global function lexbor_mem_current_size_noi(mem: *lexbor_mem_t): csize <cimport,nodecl> end
global function lexbor_mem_chunk_length_noi(mem: *lexbor_mem_t): csize <cimport,nodecl> end
global function lexbor_mem_align_noi(size: csize): csize <cimport,nodecl> end
global function lexbor_mem_align_floor_noi(size: csize): csize <cimport,nodecl> end
global lexbor_dobject_t: type <cimport,nodecl> = @record{
mem: *lexbor_mem_t,
cache: *lexbor_array_t,
allocated: csize,
struct_size: csize
}
global function lexbor_dobject_create(): *lexbor_dobject_t <cimport,nodecl> end
global function lexbor_dobject_init(dobject: *lexbor_dobject_t, chunk_size: csize, struct_size: csize): cuint <cimport,nodecl> end
global function lexbor_dobject_clean(dobject: *lexbor_dobject_t): void <cimport,nodecl> end
global function lexbor_dobject_destroy(dobject: *lexbor_dobject_t, destroy_self: boolean): *lexbor_dobject_t <cimport,nodecl> end
global function lexbor_dobject_init_list_entries(dobject: *lexbor_dobject_t, pos: csize): *uint8 <cimport,nodecl> end
global function lexbor_dobject_alloc(dobject: *lexbor_dobject_t): pointer <cimport,nodecl> end
global function lexbor_dobject_calloc(dobject: *lexbor_dobject_t): pointer <cimport,nodecl> end
global function lexbor_dobject_free(dobject: *lexbor_dobject_t, data: pointer): pointer <cimport,nodecl> end
global function lexbor_dobject_by_absolute_position(dobject: *lexbor_dobject_t, pos: csize): pointer <cimport,nodecl> end
global function lexbor_dobject_allocated(dobject: *lexbor_dobject_t): csize <cimport,nodecl> end
global function lexbor_dobject_cache_length(dobject: *lexbor_dobject_t): csize <cimport,nodecl> end
global function lexbor_dobject_allocated_noi(dobject: *lexbor_dobject_t): csize <cimport,nodecl> end
global function lexbor_dobject_cache_length_noi(dobject: *lexbor_dobject_t): csize <cimport,nodecl> end
global lexbor_avl_node: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lexbor_avl_node_t: type = @lexbor_avl_node
global lexbor_avl_node_f: type <cimport,nodecl> = @function(*lexbor_avl_node_t, pointer): void
lexbor_avl_node = @record{
type: csize,
height: cshort,
value: pointer,
left: *lexbor_avl_node_t,
right: *lexbor_avl_node_t,
parent: *lexbor_avl_node_t
}
global lexbor_avl_t: type <cimport,nodecl> = @record{
nodes: *lexbor_dobject_t
}
global function lexbor_avl_create(): *lexbor_avl_t <cimport,nodecl> end
global function lexbor_avl_init(avl: *lexbor_avl_t, chunk_len: csize): cuint <cimport,nodecl> end
global function lexbor_avl_clean(avl: *lexbor_avl_t): void <cimport,nodecl> end
global function lexbor_avl_destroy(avl: *lexbor_avl_t, self_destroy: boolean): *lexbor_avl_t <cimport,nodecl> end
global function lexbor_avl_node_make(avl: *lexbor_avl_t, type: csize, value: pointer): *lexbor_avl_node_t <cimport,nodecl> end
global function lexbor_avl_node_clean(node: *lexbor_avl_node_t): void <cimport,nodecl> end
global function lexbor_avl_node_destroy(avl: *lexbor_avl_t, node: *lexbor_avl_node_t, self_destroy: boolean): *lexbor_avl_node_t <cimport,nodecl> end
global function lexbor_avl_insert(avl: *lexbor_avl_t, scope: **lexbor_avl_node_t, type: csize, value: pointer): *lexbor_avl_node_t <cimport,nodecl> end
global function lexbor_avl_search(avl: *lexbor_avl_t, scope: *lexbor_avl_node_t, type: csize): *lexbor_avl_node_t <cimport,nodecl> end
global function lexbor_avl_remove(avl: *lexbor_avl_t, scope: **lexbor_avl_node_t, type: csize): pointer <cimport,nodecl> end
global function lexbor_avl_foreach_recursion(avl: *lexbor_avl_t, scope: *lexbor_avl_node_t, callback: lexbor_avl_node_f, ctx: pointer): void <cimport,nodecl> end
global lexbor_bst_entry: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lexbor_bst_entry_t: type = @lexbor_bst_entry
global lexbor_bst: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lexbor_bst_t: type = @lexbor_bst
global lexbor_bst_entry_f: type <cimport,nodecl> = @function(*lexbor_bst_t, *lexbor_bst_entry_t, pointer): boolean
lexbor_bst_entry = @record{
value: pointer,
right: *lexbor_bst_entry_t,
left: *lexbor_bst_entry_t,
next: *lexbor_bst_entry_t,
parent: *lexbor_bst_entry_t,
size: csize
}
lexbor_bst = @record{
dobject: *lexbor_dobject_t,
root: *lexbor_bst_entry_t,
tree_length: csize
}
global function lexbor_bst_create(): *lexbor_bst_t <cimport,nodecl> end
global function lexbor_bst_init(bst: *lexbor_bst_t, size: csize): cuint <cimport,nodecl> end
global function lexbor_bst_clean(bst: *lexbor_bst_t): void <cimport,nodecl> end
global function lexbor_bst_destroy(bst: *lexbor_bst_t, self_destroy: boolean): *lexbor_bst_t <cimport,nodecl> end
global function lexbor_bst_entry_make(bst: *lexbor_bst_t, size: csize): *lexbor_bst_entry_t <cimport,nodecl> end
global function lexbor_bst_insert(bst: *lexbor_bst_t, scope: **lexbor_bst_entry_t, size: csize, value: pointer): *lexbor_bst_entry_t <cimport,nodecl> end
global function lexbor_bst_insert_not_exists(bst: *lexbor_bst_t, scope: **lexbor_bst_entry_t, size: csize): *lexbor_bst_entry_t <cimport,nodecl> end
global function lexbor_bst_search(bst: *lexbor_bst_t, scope: *lexbor_bst_entry_t, size: csize): *lexbor_bst_entry_t <cimport,nodecl> end
global function lexbor_bst_search_close(bst: *lexbor_bst_t, scope: *lexbor_bst_entry_t, size: csize): *lexbor_bst_entry_t <cimport,nodecl> end
global function lexbor_bst_remove(bst: *lexbor_bst_t, root: **lexbor_bst_entry_t, size: csize): pointer <cimport,nodecl> end
global function lexbor_bst_remove_close(bst: *lexbor_bst_t, root: **lexbor_bst_entry_t, size: csize, found_size: *csize): pointer <cimport,nodecl> end
global function lexbor_bst_remove_by_pointer(bst: *lexbor_bst_t, entry: *lexbor_bst_entry_t, root: **lexbor_bst_entry_t): pointer <cimport,nodecl> end
global function lexbor_bst_serialize(bst: *lexbor_bst_t, callback: lexbor_callback_f, ctx: pointer): void <cimport,nodecl> end
global function lexbor_bst_serialize_entry(entry: *lexbor_bst_entry_t, callback: lexbor_callback_f, ctx: pointer, tabs: csize): void <cimport,nodecl> end
global lexbor_mraw_t: type <cimport,nodecl> = @record{
mem: *lexbor_mem_t,
cache: *lexbor_bst_t,
ref_count: csize
}
global function lexbor_mraw_create(): *lexbor_mraw_t <cimport,nodecl> end
global function lexbor_mraw_init(mraw: *lexbor_mraw_t, chunk_size: csize): cuint <cimport,nodecl> end
global function lexbor_mraw_clean(mraw: *lexbor_mraw_t): void <cimport,nodecl> end
global function lexbor_mraw_destroy(mraw: *lexbor_mraw_t, destroy_self: boolean): *lexbor_mraw_t <cimport,nodecl> end
global function lexbor_mraw_alloc(mraw: *lexbor_mraw_t, size: csize): pointer <cimport,nodecl> end
global function lexbor_mraw_calloc(mraw: *lexbor_mraw_t, size: csize): pointer <cimport,nodecl> end
global function lexbor_mraw_realloc(mraw: *lexbor_mraw_t, data: pointer, new_size: csize): pointer <cimport,nodecl> end
global function lexbor_mraw_free(mraw: *lexbor_mraw_t, data: pointer): pointer <cimport,nodecl> end
global function lexbor_mraw_data_size(data: pointer): csize <cimport,nodecl> end
global function lexbor_mraw_data_size_set(data: pointer, size: csize): void <cimport,nodecl> end
global function lexbor_mraw_dup(mraw: *lexbor_mraw_t, src: pointer, size: csize): pointer <cimport,nodecl> end
global function lexbor_mraw_reference_count(mraw: *lexbor_mraw_t): csize <cimport,nodecl> end
global function lexbor_mraw_data_size_noi(data: pointer): csize <cimport,nodecl> end
global function lexbor_mraw_data_size_set_noi(data: pointer, size: csize): void <cimport,nodecl> end
global function lexbor_mraw_dup_noi(mraw: *lexbor_mraw_t, src: pointer, size: csize): pointer <cimport,nodecl> end
global function lexbor_utils_power(t: csize, k: csize): csize <cimport,nodecl> end
global function lexbor_utils_hash_hash(key: *cuchar, key_size: csize): csize <cimport,nodecl> end
global lexbor_str_t: type <cimport,nodecl> = @record{
data: *cuchar,
length: csize
}
global function lexbor_str_create(): *lexbor_str_t <cimport,nodecl> end
global function lexbor_str_init(str: *lexbor_str_t, mraw: *lexbor_mraw_t, size: csize): *cuchar <cimport,nodecl> end
global function lexbor_str_clean(str: *lexbor_str_t): void <cimport,nodecl> end
global function lexbor_str_clean_all(str: *lexbor_str_t): void <cimport,nodecl> end
global function lexbor_str_destroy(str: *lexbor_str_t, mraw: *lexbor_mraw_t, destroy_obj: boolean): *lexbor_str_t <cimport,nodecl> end
global function lexbor_str_realloc(str: *lexbor_str_t, mraw: *lexbor_mraw_t, new_size: csize): *cuchar <cimport,nodecl> end
global function lexbor_str_check_size(str: *lexbor_str_t, mraw: *lexbor_mraw_t, plus_len: csize): *cuchar <cimport,nodecl> end
global function lexbor_str_append(str: *lexbor_str_t, mraw: *lexbor_mraw_t, data: *cuchar, length: csize): *cuchar <cimport,nodecl> end
global function lexbor_str_append_before(str: *lexbor_str_t, mraw: *lexbor_mraw_t, buff: *cuchar, length: csize): *cuchar <cimport,nodecl> end
global function lexbor_str_append_one(str: *lexbor_str_t, mraw: *lexbor_mraw_t, data: cuchar): *cuchar <cimport,nodecl> end
global function lexbor_str_append_lowercase(str: *lexbor_str_t, mraw: *lexbor_mraw_t, data: *cuchar, length: csize): *cuchar <cimport,nodecl> end
global function lexbor_str_append_with_rep_null_chars(str: *lexbor_str_t, mraw: *lexbor_mraw_t, buff: *cuchar, length: csize): *cuchar <cimport,nodecl> end
global function lexbor_str_copy(dest: *lexbor_str_t, target: *lexbor_str_t, mraw: *lexbor_mraw_t): *cuchar <cimport,nodecl> end
global function lexbor_str_stay_only_whitespace(target: *lexbor_str_t): void <cimport,nodecl> end
global function lexbor_str_strip_collapse_whitespace(target: *lexbor_str_t): void <cimport,nodecl> end
global function lexbor_str_crop_whitespace_from_begin(target: *lexbor_str_t): csize <cimport,nodecl> end
global function lexbor_str_whitespace_from_begin(target: *lexbor_str_t): csize <cimport,nodecl> end
global function lexbor_str_whitespace_from_end(target: *lexbor_str_t): csize <cimport,nodecl> end
global function lexbor_str_data_ncasecmp_first(first: *cuchar, sec: *cuchar, sec_size: csize): *cuchar <cimport,nodecl> end
global function lexbor_str_data_ncasecmp_end(first: *cuchar, sec: *cuchar, size: csize): boolean <cimport,nodecl> end
global function lexbor_str_data_ncasecmp_contain(where: *cuchar, where_size: csize, what: *cuchar, what_size: csize): boolean <cimport,nodecl> end
global function lexbor_str_data_ncasecmp(first: *cuchar, sec: *cuchar, size: csize): boolean <cimport,nodecl> end
global function lexbor_str_data_nlocmp_right(first: *cuchar, sec: *cuchar, size: csize): boolean <cimport,nodecl> end
global function lexbor_str_data_nupcmp_right(first: *cuchar, sec: *cuchar, size: csize): boolean <cimport,nodecl> end
global function lexbor_str_data_casecmp(first: *cuchar, sec: *cuchar): boolean <cimport,nodecl> end
global function lexbor_str_data_ncmp_end(first: *cuchar, sec: *cuchar, size: csize): boolean <cimport,nodecl> end
global function lexbor_str_data_ncmp_contain(where: *cuchar, where_size: csize, what: *cuchar, what_size: csize): boolean <cimport,nodecl> end
global function lexbor_str_data_ncmp(first: *cuchar, sec: *cuchar, size: csize): boolean <cimport,nodecl> end
global function lexbor_str_data_cmp(first: *cuchar, sec: *cuchar): boolean <cimport,nodecl> end
global function lexbor_str_data_cmp_ws(first: *cuchar, sec: *cuchar): boolean <cimport,nodecl> end
global function lexbor_str_data_to_lowercase(to: *cuchar, from: *cuchar, len: csize): void <cimport,nodecl> end
global function lexbor_str_data_to_uppercase(to: *cuchar, from: *cuchar, len: csize): void <cimport,nodecl> end
global function lexbor_str_data_find_lowercase(data: *cuchar, len: csize): *cuchar <cimport,nodecl> end
global function lexbor_str_data_find_uppercase(data: *cuchar, len: csize): *cuchar <cimport,nodecl> end
global function lexbor_str_data(str: *lexbor_str_t): *cuchar <cimport,nodecl> end
global function lexbor_str_length(str: *lexbor_str_t): csize <cimport,nodecl> end
global function lexbor_str_size(str: *lexbor_str_t): csize <cimport,nodecl> end
global function lexbor_str_data_set(str: *lexbor_str_t, data: *cuchar): void <cimport,nodecl> end
global function lexbor_str_length_set(str: *lexbor_str_t, mraw: *lexbor_mraw_t, length: csize): *cuchar <cimport,nodecl> end
global function lexbor_str_data_noi(str: *lexbor_str_t): *cuchar <cimport,nodecl> end
global function lexbor_str_length_noi(str: *lexbor_str_t): csize <cimport,nodecl> end
global function lexbor_str_size_noi(str: *lexbor_str_t): csize <cimport,nodecl> end
global function lexbor_str_data_set_noi(str: *lexbor_str_t, data: *cuchar): void <cimport,nodecl> end
global function lexbor_str_length_set_noi(str: *lexbor_str_t, mraw: *lexbor_mraw_t, length: csize): *cuchar <cimport,nodecl> end
global lexbor_bst_map_entry_t: type <cimport,nodecl> = @record{
str: lexbor_str_t,
value: pointer
}
global lexbor_bst_map_t: type <cimport,nodecl> = @record{
bst: *lexbor_bst_t,
mraw: *lexbor_mraw_t,
entries: *lexbor_dobject_t
}
global function lexbor_bst_map_create(): *lexbor_bst_map_t <cimport,nodecl> end
global function lexbor_bst_map_init(bst_map: *lexbor_bst_map_t, size: csize): cuint <cimport,nodecl> end
global function lexbor_bst_map_clean(bst_map: *lexbor_bst_map_t): void <cimport,nodecl> end
global function lexbor_bst_map_destroy(bst_map: *lexbor_bst_map_t, self_destroy: boolean): *lexbor_bst_map_t <cimport,nodecl> end
global function lexbor_bst_map_search(bst_map: *lexbor_bst_map_t, scope: *lexbor_bst_entry_t, key: *cuchar, key_len: csize): *lexbor_bst_map_entry_t <cimport,nodecl> end
global function lexbor_bst_map_insert(bst_map: *lexbor_bst_map_t, scope: **lexbor_bst_entry_t, key: *cuchar, key_len: csize, value: pointer): *lexbor_bst_map_entry_t <cimport,nodecl> end
global function lexbor_bst_map_insert_not_exists(bst_map: *lexbor_bst_map_t, scope: **lexbor_bst_entry_t, key: *cuchar, key_len: csize): *lexbor_bst_map_entry_t <cimport,nodecl> end
global function lexbor_bst_map_remove(bst_map: *lexbor_bst_map_t, scope: **lexbor_bst_entry_t, key: *cuchar, key_len: csize): pointer <cimport,nodecl> end
global function lexbor_bst_map_mraw(bst_map: *lexbor_bst_map_t): *lexbor_mraw_t <cimport,nodecl> end
global function lexbor_bst_map_mraw_noi(bst_map: *lexbor_bst_map_t): *lexbor_mraw_t <cimport,nodecl> end
global lexbor_fs_dir_file_f: type <cimport,nodecl> = @function(*cuchar, csize, *cuchar, csize, pointer): lexbor_action_t
global lexbor_fs_dir_opt: type <cimport,nodecl,using,ctypedef> = @enum(cint){
LEXBOR_FS_DIR_OPT_UNDEF = 0,
LEXBOR_FS_DIR_OPT_WITHOUT_DIR = 1,
LEXBOR_FS_DIR_OPT_WITHOUT_FILE = 2,
LEXBOR_FS_DIR_OPT_WITHOUT_HIDDEN = 4
}
global lexbor_fs_file_type_t: type <cimport,nodecl,using> = @enum(cint){
LEXBOR_FS_FILE_TYPE_UNDEF = 0,
LEXBOR_FS_FILE_TYPE_FILE = 1,
LEXBOR_FS_FILE_TYPE_DIRECTORY = 2,
LEXBOR_FS_FILE_TYPE_BLOCK_DEVICE = 3,
LEXBOR_FS_FILE_TYPE_CHARACTER_DEVICE = 4,
LEXBOR_FS_FILE_TYPE_PIPE = 5,
LEXBOR_FS_FILE_TYPE_SYMLINK = 6,
LEXBOR_FS_FILE_TYPE_SOCKET = 7
}
global function lexbor_fs_dir_read(dirpath: *cuchar, opt: cint, callback: lexbor_fs_dir_file_f, ctx: pointer): cuint <cimport,nodecl> end
global function lexbor_fs_file_type(full_path: *cuchar): lexbor_fs_file_type_t <cimport,nodecl> end
global function lexbor_fs_file_easy_read(full_path: *cuchar, len: *csize): *cuchar <cimport,nodecl> end
global lexbor_in_node: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lexbor_in_node_t: type = @lexbor_in_node
global lexbor_in_opt: type <cimport,nodecl,using,ctypedef> = @enum(cint){
LEXBOR_IN_OPT_UNDEF = 0,
LEXBOR_IN_OPT_READONLY = 1,
LEXBOR_IN_OPT_DONE = 2,
LEXBOR_IN_OPT_FAKE = 4,
LEXBOR_IN_OPT_ALLOC = 8
}
global lexbor_in_t: type <cimport,nodecl> = @record{
nodes: *lexbor_dobject_t
}
lexbor_in_node = @record{
offset: csize,
opt: cint,
begin: *cuchar,
End: *cuchar,
use: *cuchar,
next: *lexbor_in_node_t,
prev: *lexbor_in_node_t,
incoming: *lexbor_in_t
}
global function lexbor_in_create(): *lexbor_in_t <cimport,nodecl> end
global function lexbor_in_init(incoming: *lexbor_in_t, chunk_size: csize): cuint <cimport,nodecl> end
global function lexbor_in_clean(incoming: *lexbor_in_t): void <cimport,nodecl> end
global function lexbor_in_destroy(incoming: *lexbor_in_t, self_destroy: boolean): *lexbor_in_t <cimport,nodecl> end
global function lexbor_in_node_make(incoming: *lexbor_in_t, last_node: *lexbor_in_node_t, buf: *cuchar, buf_size: csize): *lexbor_in_node_t <cimport,nodecl> end
global function lexbor_in_node_clean(node: *lexbor_in_node_t): void <cimport,nodecl> end
global function lexbor_in_node_destroy(incoming: *lexbor_in_t, node: *lexbor_in_node_t, self_destroy: boolean): *lexbor_in_node_t <cimport,nodecl> end
global function lexbor_in_node_split(node: *lexbor_in_node_t, pos: *cuchar): *lexbor_in_node_t <cimport,nodecl> end
global function lexbor_in_node_find(node: *lexbor_in_node_t, pos: *cuchar): *lexbor_in_node_t <cimport,nodecl> end
global function lexbor_in_node_pos_up(node: *lexbor_in_node_t, return_node: **lexbor_in_node_t, pos: *cuchar, offset: csize): *cuchar <cimport,nodecl> end
global function lexbor_in_node_pos_down(node: *lexbor_in_node_t, return_node: **lexbor_in_node_t, pos: *cuchar, offset: csize): *cuchar <cimport,nodecl> end
global function lexbor_in_node_begin(node: *lexbor_in_node_t): *cuchar <cimport,nodecl> end
global function lexbor_in_node_end(node: *lexbor_in_node_t): *cuchar <cimport,nodecl> end
global function lexbor_in_node_offset(node: *lexbor_in_node_t): csize <cimport,nodecl> end
global function lexbor_in_node_next(node: *lexbor_in_node_t): *lexbor_in_node_t <cimport,nodecl> end
global function lexbor_in_node_prev(node: *lexbor_in_node_t): *lexbor_in_node_t <cimport,nodecl> end
global function lexbor_in_node_in(node: *lexbor_in_node_t): *lexbor_in_t <cimport,nodecl> end
global function lexbor_in_segment(node: *lexbor_in_node_t, data: *cuchar): boolean <cimport,nodecl> end
global function lexbor_in_node_begin_noi(node: *lexbor_in_node_t): *cuchar <cimport,nodecl> end
global function lexbor_in_node_end_noi(node: *lexbor_in_node_t): *cuchar <cimport,nodecl> end
global function lexbor_in_node_offset_noi(node: *lexbor_in_node_t): csize <cimport,nodecl> end
global function lexbor_in_node_next_noi(node: *lexbor_in_node_t): *lexbor_in_node_t <cimport,nodecl> end
global function lexbor_in_node_prev_noi(node: *lexbor_in_node_t): *lexbor_in_node_t <cimport,nodecl> end
global function lexbor_in_node_in_noi(node: *lexbor_in_node_t): *lexbor_in_t <cimport,nodecl> end
global function lexbor_in_segment_noi(node: *lexbor_in_node_t, data: *cuchar): boolean <cimport,nodecl> end
global lexbor_sbst_entry_static_t: type <cimport,nodecl> = @record{
key: cuchar,
value: pointer,
value_len: csize,
left: csize,
right: csize,
next: csize
}
global function lexbor_sbst_entry_static_find(strt: *lexbor_sbst_entry_static_t, root: *lexbor_sbst_entry_static_t, key: cuchar): *lexbor_sbst_entry_static_t <cimport,nodecl> end
global lexbor_shs_entry_t: type <cimport,nodecl> = @record{
key: cstring,
value: pointer,
key_len: csize,
next: csize
}
global lexbor_shs_hash_t: type <cimport,nodecl> = @record{
key: uint32,
value: pointer,
next: csize
}
global function lexbor_shs_entry_get_static(tree: *lexbor_shs_entry_t, key: *cuchar, size: csize): *lexbor_shs_entry_t <cimport,nodecl> end
global function lexbor_shs_entry_get_lower_static(root: *lexbor_shs_entry_t, key: *cuchar, key_len: csize): *lexbor_shs_entry_t <cimport,nodecl> end
global function lexbor_shs_entry_get_upper_static(root: *lexbor_shs_entry_t, key: *cuchar, key_len: csize): *lexbor_shs_entry_t <cimport,nodecl> end
global function lexbor_shs_hash_get_static(table: *lexbor_shs_hash_t, table_size: csize, key: uint32): *lexbor_shs_hash_t <cimport,nodecl> end
global function lexbor_conv_float_to_data(num: float64, buf: *cuchar, len: csize): csize <cimport,nodecl> end
global function lexbor_conv_data_to_double(start: **cuchar, len: csize): float64 <cimport,nodecl> end
global function lexbor_conv_data_to_ulong(data: **cuchar, length: csize): culong <cimport,nodecl> end
global function lexbor_conv_data_to_long(data: **cuchar, length: csize): clong <cimport,nodecl> end
global function lexbor_conv_data_to_uint(data: **cuchar, length: csize): cuint <cimport,nodecl> end
global function lexbor_conv_double_to_long(number: float64): clong <cimport,nodecl> end
global lexbor_diyfp_t: type <cimport,nodecl> = @record{
significand: uint64,
exp: cint
}
global function lexbor_cached_power_dec(exp: cint, dec_exp: *cint): lexbor_diyfp_t <cimport,nodecl> end
global function lexbor_cached_power_bin(exp: cint, dec_exp: *cint): lexbor_diyfp_t <cimport,nodecl> end
global function lexbor_diyfp_leading_zeros64(x: uint64): uint64 <cimport,nodecl> end
global function lexbor_diyfp_from_d2(d: float64): lexbor_diyfp_t <cimport,nodecl> end
global function lexbor_diyfp_2d(v: lexbor_diyfp_t): float64 <cimport,nodecl> end
global function lexbor_diyfp_shift_left(v: lexbor_diyfp_t, shift: cuint): lexbor_diyfp_t <cimport,nodecl> end
global function lexbor_diyfp_shift_right(v: lexbor_diyfp_t, shift: cuint): lexbor_diyfp_t <cimport,nodecl> end
global function lexbor_diyfp_sub(lhs: lexbor_diyfp_t, rhs: lexbor_diyfp_t): lexbor_diyfp_t <cimport,nodecl> end
global function lexbor_diyfp_mul(lhs: lexbor_diyfp_t, rhs: lexbor_diyfp_t): lexbor_diyfp_t <cimport,nodecl> end
global function lexbor_diyfp_normalize(v: lexbor_diyfp_t): lexbor_diyfp_t <cimport,nodecl> end
global function lexbor_dtoa(value: float64, begin: *cuchar, len: csize): csize <cimport,nodecl> end
global function lexbor_strtod_internal(start: *cuchar, length: csize, exp: cint): float64 <cimport,nodecl> end
global function lexbor_serialize_length_cb(data: *cuchar, length: csize, ctx: pointer): cuint <cimport,nodecl> end
global function lexbor_serialize_copy_cb(data: *cuchar, length: csize, ctx: pointer): cuint <cimport,nodecl> end
global lxb_html_tokenizer: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lxb_html_tokenizer_t: type = @lxb_html_tokenizer
global lxb_html_tree: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lxb_html_tree_t: type = @lxb_html_tree
global lxb_html_status_t: type <cimport,nodecl,using> = @enum(cint){
LXB_HTML_STATUS_OK = 0
}
global lexbor_hash_search: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lexbor_hash_search_t: type = @lexbor_hash_search
global lexbor_hash_insert: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lexbor_hash_insert_t: type = @lexbor_hash_insert
global lexbor_hash_insert_raw: *lexbor_hash_insert_t <cimport,nodecl>
global lexbor_hash_insert_lower: *lexbor_hash_insert_t <cimport,nodecl>
global lexbor_hash_insert_upper: *lexbor_hash_insert_t <cimport,nodecl>
global lexbor_hash_search_raw: *lexbor_hash_search_t <cimport,nodecl>
global lexbor_hash_search_lower: *lexbor_hash_search_t <cimport,nodecl>
global lexbor_hash_search_upper: *lexbor_hash_search_t <cimport,nodecl>
global lexbor_hash: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lexbor_hash_t: type = @lexbor_hash
global lexbor_hash_entry: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lexbor_hash_entry_t: type = @lexbor_hash_entry
global lexbor_hash_id_f: type <cimport,nodecl> = @function(*cuchar, csize): uint32
global lexbor_hash_copy_f: type <cimport,nodecl> = @function(*lexbor_hash_t, *lexbor_hash_entry_t, *cuchar, csize): cuint
global lexbor_hash_cmp_f: type <cimport,nodecl> = @function(*cuchar, *cuchar, csize): boolean
lexbor_hash_entry = @record{
u: union{
long_str: *cuchar,
short_str: [17]cuchar
},
length: csize,
next: *lexbor_hash_entry_t
}
lexbor_hash = @record{
entries: *lexbor_dobject_t,
mraw: *lexbor_mraw_t,
table: **lexbor_hash_entry_t,
table_size: csize,
struct_size: csize
}
lexbor_hash_insert = @record{
hash: lexbor_hash_id_f,
cmp: lexbor_hash_cmp_f,
copy: lexbor_hash_copy_f
}
lexbor_hash_search = @record{
hash: lexbor_hash_id_f,
cmp: lexbor_hash_cmp_f
}
global function lexbor_hash_create(): *lexbor_hash_t <cimport,nodecl> end
global function lexbor_hash_init(hash: *lexbor_hash_t, table_size: csize, struct_size: csize): cuint <cimport,nodecl> end
global function lexbor_hash_clean(hash: *lexbor_hash_t): void <cimport,nodecl> end
global function lexbor_hash_destroy(hash: *lexbor_hash_t, destroy_obj: boolean): *lexbor_hash_t <cimport,nodecl> end
global function lexbor_hash_insert_by_entry(hash: *lexbor_hash_t, entry: *lexbor_hash_entry_t, search: *lexbor_hash_search_t, key: *cuchar, length: csize): pointer <cimport,nodecl> end
global function lexbor_hash_remove(hash: *lexbor_hash_t, search: *lexbor_hash_search_t, key: *cuchar, length: csize): void <cimport,nodecl> end
global function lexbor_hash_remove_by_hash_id(hash: *lexbor_hash_t, hash_id: uint32, key: *cuchar, length: csize, cmp_func: lexbor_hash_cmp_f): void <cimport,nodecl> end
global function lexbor_hash_search_by_hash_id(hash: *lexbor_hash_t, hash_id: uint32, key: *cuchar, length: csize, cmp_func: lexbor_hash_cmp_f): pointer <cimport,nodecl> end
global function lexbor_hash_make_id(key: *cuchar, length: csize): uint32 <cimport,nodecl> end
global function lexbor_hash_make_id_lower(key: *cuchar, length: csize): uint32 <cimport,nodecl> end
global function lexbor_hash_make_id_upper(key: *cuchar, length: csize): uint32 <cimport,nodecl> end
global function lexbor_hash_copy(hash: *lexbor_hash_t, entry: *lexbor_hash_entry_t, key: *cuchar, length: csize): cuint <cimport,nodecl> end
global function lexbor_hash_copy_lower(hash: *lexbor_hash_t, entry: *lexbor_hash_entry_t, key: *cuchar, length: csize): cuint <cimport,nodecl> end
global function lexbor_hash_copy_upper(hash: *lexbor_hash_t, entry: *lexbor_hash_entry_t, key: *cuchar, length: csize): cuint <cimport,nodecl> end
global function lexbor_hash_mraw(hash: *lexbor_hash_t): *lexbor_mraw_t <cimport,nodecl> end
global function lexbor_hash_entry_str(entry: *lexbor_hash_entry_t): *cuchar <cimport,nodecl> end
global function lexbor_hash_entry_str_set(entry: *lexbor_hash_entry_t, data: *cuchar, length: csize): *cuchar <cimport,nodecl> end
global function lexbor_hash_entry_str_free(hash: *lexbor_hash_t, entry: *lexbor_hash_entry_t): void <cimport,nodecl> end
global function lexbor_hash_entry_create(hash: *lexbor_hash_t): *lexbor_hash_entry_t <cimport,nodecl> end
global function lexbor_hash_entry_destroy(hash: *lexbor_hash_t, entry: *lexbor_hash_entry_t): *lexbor_hash_entry_t <cimport,nodecl> end
global function lexbor_hash_entries_count(hash: *lexbor_hash_t): csize <cimport,nodecl> end
global lxb_ns_id_enum_t: type <cimport,nodecl,using> = @enum(cint){
LXB_NS__UNDEF = 0,
LXB_NS__ANY = 1,
LXB_NS_HTML = 2,
LXB_NS_MATH = 3,
LXB_NS_SVG = 4,
LXB_NS_XLINK = 5,
LXB_NS_XML = 6,
LXB_NS_XMLNS = 7,
LXB_NS__LAST_ENTRY = 8
}
global lxb_ns_data_t: type <cimport,nodecl> = @record{
entry: lexbor_hash_entry_t,
ns_id: culong,
ref_count: csize,
read_only: boolean
}
global lxb_ns_prefix_data_t: type <cimport,nodecl> = @record{
entry: lexbor_hash_entry_t,
prefix_id: culong,
ref_count: csize,
read_only: boolean
}
global function lxb_ns_by_id(hash: *lexbor_hash_t, ns_id: culong, length: *csize): *cuchar <cimport,nodecl> end
global function lxb_ns_data_by_id(hash: *lexbor_hash_t, ns_id: culong): *lxb_ns_data_t <cimport,nodecl> end
global function lxb_ns_data_by_link(hash: *lexbor_hash_t, name: *cuchar, length: csize): *lxb_ns_data_t <cimport,nodecl> end
global function lxb_ns_prefix_append(hash: *lexbor_hash_t, prefix: *cuchar, length: csize): *lxb_ns_prefix_data_t <cimport,nodecl> end
global function lxb_ns_prefix_data_by_id(hash: *lexbor_hash_t, prefix_id: culong): *lxb_ns_prefix_data_t <cimport,nodecl> end
global function lxb_ns_prefix_data_by_name(hash: *lexbor_hash_t, name: *cuchar, length: csize): *lxb_ns_prefix_data_t <cimport,nodecl> end
global lxb_tag_id_enum_t: type <cimport,nodecl,using> = @enum(cint){
LXB_TAG__UNDEF = 0,
LXB_TAG__END_OF_FILE = 1,
LXB_TAG__TEXT = 2,
LXB_TAG__DOCUMENT = 3,
LXB_TAG__EM_COMMENT = 4,
LXB_TAG__EM_DOCTYPE = 5,
LXB_TAG_A = 6,
LXB_TAG_ABBR = 7,
LXB_TAG_ACRONYM = 8,
LXB_TAG_ADDRESS = 9,
LXB_TAG_ALTGLYPH = 10,
LXB_TAG_ALTGLYPHDEF = 11,
LXB_TAG_ALTGLYPHITEM = 12,
LXB_TAG_ANIMATECOLOR = 13,
LXB_TAG_ANIMATEMOTION = 14,
LXB_TAG_ANIMATETRANSFORM = 15,
LXB_TAG_ANNOTATION_XML = 16,
LXB_TAG_APPLET = 17,
LXB_TAG_AREA = 18,
LXB_TAG_ARTICLE = 19,
LXB_TAG_ASIDE = 20,
LXB_TAG_AUDIO = 21,
LXB_TAG_B = 22,
LXB_TAG_BASE = 23,
LXB_TAG_BASEFONT = 24,
LXB_TAG_BDI = 25,
LXB_TAG_BDO = 26,
LXB_TAG_BGSOUND = 27,
LXB_TAG_BIG = 28,
LXB_TAG_BLINK = 29,
LXB_TAG_BLOCKQUOTE = 30,
LXB_TAG_BODY = 31,
LXB_TAG_BR = 32,
LXB_TAG_BUTTON = 33,
LXB_TAG_CANVAS = 34,
LXB_TAG_CAPTION = 35,
LXB_TAG_CENTER = 36,
LXB_TAG_CITE = 37,
LXB_TAG_CLIPPATH = 38,
LXB_TAG_CODE = 39,
LXB_TAG_COL = 40,
LXB_TAG_COLGROUP = 41,
LXB_TAG_DATA = 42,
LXB_TAG_DATALIST = 43,
LXB_TAG_DD = 44,
LXB_TAG_DEL = 45,
LXB_TAG_DESC = 46,
LXB_TAG_DETAILS = 47,
LXB_TAG_DFN = 48,
LXB_TAG_DIALOG = 49,
LXB_TAG_DIR = 50,
LXB_TAG_DIV = 51,
LXB_TAG_DL = 52,
LXB_TAG_DT = 53,
LXB_TAG_EM = 54,
LXB_TAG_EMBED = 55,
LXB_TAG_FEBLEND = 56,
LXB_TAG_FECOLORMATRIX = 57,
LXB_TAG_FECOMPONENTTRANSFER = 58,
LXB_TAG_FECOMPOSITE = 59,
LXB_TAG_FECONVOLVEMATRIX = 60,
LXB_TAG_FEDIFFUSELIGHTING = 61,
LXB_TAG_FEDISPLACEMENTMAP = 62,
LXB_TAG_FEDISTANTLIGHT = 63,
LXB_TAG_FEDROPSHADOW = 64,
LXB_TAG_FEFLOOD = 65,
LXB_TAG_FEFUNCA = 66,
LXB_TAG_FEFUNCB = 67,
LXB_TAG_FEFUNCG = 68,
LXB_TAG_FEFUNCR = 69,
LXB_TAG_FEGAUSSIANBLUR = 70,
LXB_TAG_FEIMAGE = 71,
LXB_TAG_FEMERGE = 72,
LXB_TAG_FEMERGENODE = 73,
LXB_TAG_FEMORPHOLOGY = 74,
LXB_TAG_FEOFFSET = 75,
LXB_TAG_FEPOINTLIGHT = 76,
LXB_TAG_FESPECULARLIGHTING = 77,
LXB_TAG_FESPOTLIGHT = 78,
LXB_TAG_FETILE = 79,
LXB_TAG_FETURBULENCE = 80,
LXB_TAG_FIELDSET = 81,
LXB_TAG_FIGCAPTION = 82,
LXB_TAG_FIGURE = 83,
LXB_TAG_FONT = 84,
LXB_TAG_FOOTER = 85,
LXB_TAG_FOREIGNOBJECT = 86,
LXB_TAG_FORM = 87,
LXB_TAG_FRAME = 88,
LXB_TAG_FRAMESET = 89,
LXB_TAG_GLYPHREF = 90,
LXB_TAG_H1 = 91,
LXB_TAG_H2 = 92,
LXB_TAG_H3 = 93,
LXB_TAG_H4 = 94,
LXB_TAG_H5 = 95,
LXB_TAG_H6 = 96,
LXB_TAG_HEAD = 97,
LXB_TAG_HEADER = 98,
LXB_TAG_HGROUP = 99,
LXB_TAG_HR = 100,
LXB_TAG_HTML = 101,
LXB_TAG_I = 102,
LXB_TAG_IFRAME = 103,
LXB_TAG_IMAGE = 104,
LXB_TAG_IMG = 105,
LXB_TAG_INPUT = 106,
LXB_TAG_INS = 107,
LXB_TAG_ISINDEX = 108,
LXB_TAG_KBD = 109,
LXB_TAG_KEYGEN = 110,
LXB_TAG_LABEL = 111,
LXB_TAG_LEGEND = 112,
LXB_TAG_LI = 113,
LXB_TAG_LINEARGRADIENT = 114,
LXB_TAG_LINK = 115,
LXB_TAG_LISTING = 116,
LXB_TAG_MAIN = 117,
LXB_TAG_MALIGNMARK = 118,
LXB_TAG_MAP = 119,
LXB_TAG_MARK = 120,
LXB_TAG_MARQUEE = 121,
LXB_TAG_MATH = 122,
LXB_TAG_MENU = 123,
LXB_TAG_META = 124,
LXB_TAG_METER = 125,
LXB_TAG_MFENCED = 126,
LXB_TAG_MGLYPH = 127,
LXB_TAG_MI = 128,
LXB_TAG_MN = 129,
LXB_TAG_MO = 130,
LXB_TAG_MS = 131,
LXB_TAG_MTEXT = 132,
LXB_TAG_MULTICOL = 133,
LXB_TAG_NAV = 134,
LXB_TAG_NEXTID = 135,
LXB_TAG_NOBR = 136,
LXB_TAG_NOEMBED = 137,
LXB_TAG_NOFRAMES = 138,
LXB_TAG_NOSCRIPT = 139,
LXB_TAG_OBJECT = 140,
LXB_TAG_OL = 141,
LXB_TAG_OPTGROUP = 142,
LXB_TAG_OPTION = 143,
LXB_TAG_OUTPUT = 144,
LXB_TAG_P = 145,
LXB_TAG_PARAM = 146,
LXB_TAG_PATH = 147,
LXB_TAG_PICTURE = 148,
LXB_TAG_PLAINTEXT = 149,
LXB_TAG_PRE = 150,
LXB_TAG_PROGRESS = 151,
LXB_TAG_Q = 152,
LXB_TAG_RADIALGRADIENT = 153,
LXB_TAG_RB = 154,
LXB_TAG_RP = 155,
LXB_TAG_RT = 156,
LXB_TAG_RTC = 157,
LXB_TAG_RUBY = 158,
LXB_TAG_S = 159,
LXB_TAG_SAMP = 160,
LXB_TAG_SCRIPT = 161,
LXB_TAG_SECTION = 162,
LXB_TAG_SELECT = 163,
LXB_TAG_SLOT = 164,
LXB_TAG_SMALL = 165,
LXB_TAG_SOURCE = 166,
LXB_TAG_SPACER = 167,
LXB_TAG_SPAN = 168,
LXB_TAG_STRIKE = 169,
LXB_TAG_STRONG = 170,
LXB_TAG_STYLE = 171,
LXB_TAG_SUB = 172,
LXB_TAG_SUMMARY = 173,
LXB_TAG_SUP = 174,
LXB_TAG_SVG = 175,
LXB_TAG_TABLE = 176,
LXB_TAG_TBODY = 177,
LXB_TAG_TD = 178,
LXB_TAG_TEMPLATE = 179,
LXB_TAG_TEXTAREA = 180,
LXB_TAG_TEXTPATH = 181,
LXB_TAG_TFOOT = 182,
LXB_TAG_TH = 183,
LXB_TAG_THEAD = 184,
LXB_TAG_TIME = 185,
LXB_TAG_TITLE = 186,
LXB_TAG_TR = 187,
LXB_TAG_TRACK = 188,
LXB_TAG_TT = 189,
LXB_TAG_U = 190,
LXB_TAG_UL = 191,
LXB_TAG_VAR = 192,
LXB_TAG_VIDEO = 193,
LXB_TAG_WBR = 194,
LXB_TAG_XMP = 195,
LXB_TAG__LAST_ENTRY = 196
}
global lxb_dom_exception_code_t: type <cimport,nodecl,using> = @enum(cint){
LXB_DOM_INDEX_SIZE_ERR = 0,
LXB_DOM_DOMSTRING_SIZE_ERR = 1,
LXB_DOM_HIERARCHY_REQUEST_ERR = 2,
LXB_DOM_WRONG_DOCUMENT_ERR = 3,
LXB_DOM_INVALID_CHARACTER_ERR = 4,
LXB_DOM_NO_DATA_ALLOWED_ERR = 5,
LXB_DOM_NO_MODIFICATION_ALLOWED_ERR = 6,
LXB_DOM_NOT_FOUND_ERR = 7,
LXB_DOM_NOT_SUPPORTED_ERR = 8,
LXB_DOM_INUSE_ATTRIBUTE_ERR = 9,
LXB_DOM_INVALID_STATE_ERR = 10,
LXB_DOM_SYNTAX_ERR = 11,
LXB_DOM_INVALID_MODIFICATION_ERR = 12,
LXB_DOM_NAMESPACE_ERR = 13,
LXB_DOM_INVALID_ACCESS_ERR = 14,
LXB_DOM_VALIDATION_ERR = 15,
LXB_DOM_TYPE_MISMATCH_ERR = 16,
LXB_DOM_SECURITY_ERR = 17,
LXB_DOM_NETWORK_ERR = 18,
LXB_DOM_ABORT_ERR = 19,
LXB_DOM_URL_MISMATCH_ERR = 20,
LXB_DOM_QUOTA_EXCEEDED_ERR = 21,
LXB_DOM_TIMEOUT_ERR = 22,
LXB_DOM_INVALID_NODE_TYPE_ERR = 23,
LXB_DOM_DATA_CLONE_ERR = 24
}
global function lxb_dom_exception_code_ref_set(var: *lxb_dom_exception_code_t, code: lxb_dom_exception_code_t): pointer <cimport,nodecl> end
global function lxb_dom_exception_code_ref_set_noi(var: *lxb_dom_exception_code_t, code: lxb_dom_exception_code_t): pointer <cimport,nodecl> end
global lxb_dom_event_target: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lxb_dom_event_target_t: type = @lxb_dom_event_target
global lxb_dom_node: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lxb_dom_node_t: type = @lxb_dom_node
global lxb_dom_element: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lxb_dom_element_t: type = @lxb_dom_element
global lxb_dom_attr: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lxb_dom_attr_t: type = @lxb_dom_attr
global lxb_dom_document: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lxb_dom_document_t: type = @lxb_dom_document
global lxb_dom_document_type: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lxb_dom_document_type_t: type = @lxb_dom_document_type
global lxb_dom_document_fragment: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lxb_dom_document_fragment_t: type = @lxb_dom_document_fragment
global lxb_dom_shadow_root: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lxb_dom_shadow_root_t: type = @lxb_dom_shadow_root
global lxb_dom_character_data: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lxb_dom_character_data_t: type = @lxb_dom_character_data
global lxb_dom_text: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lxb_dom_text_t: type = @lxb_dom_text
global lxb_dom_cdata_section: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lxb_dom_cdata_section_t: type = @lxb_dom_cdata_section
global lxb_dom_processing_instruction: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lxb_dom_processing_instruction_t: type = @lxb_dom_processing_instruction
global lxb_dom_comment: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lxb_dom_comment_t: type = @lxb_dom_comment
global lxb_dom_interface_constructor_f: type <cimport,nodecl> = @function(pointer): pointer
global lxb_dom_interface_destructor_f: type <cimport,nodecl> = @function(pointer): pointer
global lxb_dom_interface_create_f: type <cimport,nodecl> = @function(*lxb_dom_document_t, culong, culong): pointer
global lxb_dom_interface_clone_f: type <cimport,nodecl> = @function(*lxb_dom_document_t, pointer): pointer
global lxb_dom_interface_destroy_f: type <cimport,nodecl> = @function(pointer): pointer
global function lxb_dom_interface_create(document: *lxb_dom_document_t, tag_id: culong, ns: culong): pointer <cimport,nodecl> end
global function lxb_dom_interface_clone(document: *lxb_dom_document_t, intrfc: pointer): pointer <cimport,nodecl> end
global function lxb_dom_interface_destroy(intrfc: pointer): pointer <cimport,nodecl> end
lxb_dom_event_target = @record{
events: pointer
}
global function lxb_dom_event_target_create(document: *lxb_dom_document_t): *lxb_dom_event_target_t <cimport,nodecl> end
global function lxb_dom_event_target_destroy(event_target: *lxb_dom_event_target_t, document: *lxb_dom_document_t): *lxb_dom_event_target_t <cimport,nodecl> end
global lxb_dom_node_simple_walker_f: type <cimport,nodecl> = @function(*lxb_dom_node_t, pointer): lexbor_action_t
global lxb_dom_node_type_t: type <cimport,nodecl,using> = @enum(cint){
LXB_DOM_NODE_TYPE_UNDEF = 0,
LXB_DOM_NODE_TYPE_ELEMENT = 1,
LXB_DOM_NODE_TYPE_ATTRIBUTE = 2,
LXB_DOM_NODE_TYPE_TEXT = 3,
LXB_DOM_NODE_TYPE_CDATA_SECTION = 4,
LXB_DOM_NODE_TYPE_ENTITY_REFERENCE = 5,
LXB_DOM_NODE_TYPE_ENTITY = 6,
LXB_DOM_NODE_TYPE_PROCESSING_INSTRUCTION = 7,
LXB_DOM_NODE_TYPE_COMMENT = 8,
LXB_DOM_NODE_TYPE_DOCUMENT = 9,
LXB_DOM_NODE_TYPE_DOCUMENT_TYPE = 10,
LXB_DOM_NODE_TYPE_DOCUMENT_FRAGMENT = 11,
LXB_DOM_NODE_TYPE_NOTATION = 12,
LXB_DOM_NODE_TYPE_LAST_ENTRY = 13
}
lxb_dom_node = @record{
event_target: lxb_dom_event_target_t,
local_name: usize,
prefix: usize,
ns: usize,
owner_document: *lxb_dom_document_t,
next: *lxb_dom_node_t,
prev: *lxb_dom_node_t,
parent: *lxb_dom_node_t,
first_child: *lxb_dom_node_t,
last_child: *lxb_dom_node_t,
user: pointer,
type: lxb_dom_node_type_t
}
global function lxb_dom_node_interface_create(document: *lxb_dom_document_t): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_node_interface_clone(document: *lxb_dom_document_t, node: *lxb_dom_node_t, is_attr: boolean): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_node_interface_destroy(node: *lxb_dom_node_t): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_node_interface_copy(dst: *lxb_dom_node_t, src: *lxb_dom_node_t, is_attr: boolean): cuint <cimport,nodecl> end
global function lxb_dom_node_destroy(node: *lxb_dom_node_t): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_node_destroy_deep(root: *lxb_dom_node_t): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_node_clone(node: *lxb_dom_node_t, deep: boolean): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_node_name(node: *lxb_dom_node_t, len: *csize): *cuchar <cimport,nodecl> end
global function lxb_dom_node_insert_child(to: *lxb_dom_node_t, node: *lxb_dom_node_t): void <cimport,nodecl> end
global function lxb_dom_node_insert_before(to: *lxb_dom_node_t, node: *lxb_dom_node_t): void <cimport,nodecl> end
global function lxb_dom_node_insert_after(to: *lxb_dom_node_t, node: *lxb_dom_node_t): void <cimport,nodecl> end
global function lxb_dom_node_remove(node: *lxb_dom_node_t): void <cimport,nodecl> end
global function lxb_dom_node_replace_all(parent: *lxb_dom_node_t, node: *lxb_dom_node_t): cuint <cimport,nodecl> end
global function lxb_dom_node_simple_walk(root: *lxb_dom_node_t, walker_cb: lxb_dom_node_simple_walker_f, ctx: pointer): void <cimport,nodecl> end
global function lxb_dom_node_text_content(node: *lxb_dom_node_t, len: *csize): *cuchar <cimport,nodecl> end
global function lxb_dom_node_text_content_set(node: *lxb_dom_node_t, content: *cuchar, len: csize): cuint <cimport,nodecl> end
global function lxb_dom_node_is_empty(root: *lxb_dom_node_t): boolean <cimport,nodecl> end
global function lxb_dom_node_tag_id(node: *lxb_dom_node_t): culong <cimport,nodecl> end
global function lxb_dom_node_next(node: *lxb_dom_node_t): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_node_prev(node: *lxb_dom_node_t): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_node_parent(node: *lxb_dom_node_t): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_node_first_child(node: *lxb_dom_node_t): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_node_last_child(node: *lxb_dom_node_t): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_node_tag_id_noi(node: *lxb_dom_node_t): culong <cimport,nodecl> end
global function lxb_dom_node_next_noi(node: *lxb_dom_node_t): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_node_prev_noi(node: *lxb_dom_node_t): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_node_parent_noi(node: *lxb_dom_node_t): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_node_first_child_noi(node: *lxb_dom_node_t): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_node_last_child_noi(node: *lxb_dom_node_t): *lxb_dom_node_t <cimport,nodecl> end
global lxb_dom_attr_id_enum_t: type <cimport,nodecl,using> = @enum(cint){
LXB_DOM_ATTR__UNDEF = 0,
LXB_DOM_ATTR_ACTIVE = 1,
LXB_DOM_ATTR_ALT = 2,
LXB_DOM_ATTR_CHARSER = 3,
LXB_DOM_ATTR_CHECKED = 4,
LXB_DOM_ATTR_CLASS = 5,
LXB_DOM_ATTR_COLOR = 6,
LXB_DOM_ATTR_CONTENT = 7,
LXB_DOM_ATTR_DIR = 8,
LXB_DOM_ATTR_DISABLED = 9,
LXB_DOM_ATTR_FACE = 10,
LXB_DOM_ATTR_FOCUS = 11,
LXB_DOM_ATTR_FOR = 12,
LXB_DOM_ATTR_HEIGHT = 13,
LXB_DOM_ATTR_HOVER = 14,
LXB_DOM_ATTR_HREF = 15,
LXB_DOM_ATTR_HTML = 16,
LXB_DOM_ATTR_HTTP_EQUIV = 17,
LXB_DOM_ATTR_ID = 18,
LXB_DOM_ATTR_IS = 19,
LXB_DOM_ATTR_MAXLENGTH = 20,
LXB_DOM_ATTR_PLACEHOLDER = 21,
LXB_DOM_ATTR_POOL = 22,
LXB_DOM_ATTR_PUBLIC = 23,
LXB_DOM_ATTR_READONLY = 24,
LXB_DOM_ATTR_REQUIRED = 25,
LXB_DOM_ATTR_SCHEME = 26,
LXB_DOM_ATTR_SELECTED = 27,
LXB_DOM_ATTR_SIZE = 28,
LXB_DOM_ATTR_SLOT = 29,
LXB_DOM_ATTR_SRC = 30,
LXB_DOM_ATTR_STYLE = 31,
LXB_DOM_ATTR_SYSTEM = 32,
LXB_DOM_ATTR_TITLE = 33,
LXB_DOM_ATTR_TYPE = 34,
LXB_DOM_ATTR_WIDTH = 35,
LXB_DOM_ATTR__LAST_ENTRY = 36
}
global lxb_dom_document_cmode_t: type <cimport,nodecl,using> = @enum(cint){
LXB_DOM_DOCUMENT_CMODE_NO_QUIRKS = 0,
LXB_DOM_DOCUMENT_CMODE_QUIRKS = 1,
LXB_DOM_DOCUMENT_CMODE_LIMITED_QUIRKS = 2
}
global lxb_dom_document_dtype_t: type <cimport,nodecl,using> = @enum(cint){
LXB_DOM_DOCUMENT_DTYPE_UNDEF = 0,
LXB_DOM_DOCUMENT_DTYPE_HTML = 1,
LXB_DOM_DOCUMENT_DTYPE_XML = 2
}
lxb_dom_document = @record{
node: lxb_dom_node_t,
compat_mode: lxb_dom_document_cmode_t,
type: lxb_dom_document_dtype_t,
doctype: *lxb_dom_document_type_t,
element: *lxb_dom_element_t,
create_interface: lxb_dom_interface_create_f,
clone_interface: lxb_dom_interface_clone_f,
destroy_interface: lxb_dom_interface_destroy_f,
mraw: *lexbor_mraw_t,
text: *lexbor_mraw_t,
tags: *lexbor_hash_t,
attrs: *lexbor_hash_t,
prefix: *lexbor_hash_t,
ns: *lexbor_hash_t,
parser: pointer,
user: pointer,
tags_inherited: boolean,
ns_inherited: boolean,
scripting: boolean
}
global function lxb_dom_document_interface_create(document: *lxb_dom_document_t): *lxb_dom_document_t <cimport,nodecl> end
global function lxb_dom_document_interface_clone(document: *lxb_dom_document_t, doc: *lxb_dom_document_t): *lxb_dom_document_t <cimport,nodecl> end
global function lxb_dom_document_interface_destroy(document: *lxb_dom_document_t): *lxb_dom_document_t <cimport,nodecl> end
global function lxb_dom_document_create(owner: *lxb_dom_document_t): *lxb_dom_document_t <cimport,nodecl> end
global function lxb_dom_document_init(document: *lxb_dom_document_t, owner: *lxb_dom_document_t, create_interface: lxb_dom_interface_create_f, clone_interface: lxb_dom_interface_clone_f, destroy_interface: lxb_dom_interface_destroy_f, type: lxb_dom_document_dtype_t, ns: cuint): cuint <cimport,nodecl> end
global function lxb_dom_document_clean(document: *lxb_dom_document_t): cuint <cimport,nodecl> end
global function lxb_dom_document_destroy(document: *lxb_dom_document_t): *lxb_dom_document_t <cimport,nodecl> end
global function lxb_dom_document_attach_doctype(document: *lxb_dom_document_t, doctype: *lxb_dom_document_type_t): void <cimport,nodecl> end
global function lxb_dom_document_attach_element(document: *lxb_dom_document_t, element: *lxb_dom_element_t): void <cimport,nodecl> end
global function lxb_dom_document_create_element(document: *lxb_dom_document_t, local_name: *cuchar, lname_len: csize, reserved_for_opt: pointer): *lxb_dom_element_t <cimport,nodecl> end
global function lxb_dom_document_destroy_element(element: *lxb_dom_element_t): *lxb_dom_element_t <cimport,nodecl> end
global function lxb_dom_document_create_document_fragment(document: *lxb_dom_document_t): *lxb_dom_document_fragment_t <cimport,nodecl> end
global function lxb_dom_document_create_text_node(document: *lxb_dom_document_t, data: *cuchar, len: csize): *lxb_dom_text_t <cimport,nodecl> end
global function lxb_dom_document_create_cdata_section(document: *lxb_dom_document_t, data: *cuchar, len: csize): *lxb_dom_cdata_section_t <cimport,nodecl> end
global function lxb_dom_document_create_processing_instruction(document: *lxb_dom_document_t, target: *cuchar, target_len: csize, data: *cuchar, data_len: csize): *lxb_dom_processing_instruction_t <cimport,nodecl> end
global function lxb_dom_document_create_comment(document: *lxb_dom_document_t, data: *cuchar, len: csize): *lxb_dom_comment_t <cimport,nodecl> end
global function lxb_dom_document_root(document: *lxb_dom_document_t): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_document_import_node(doc: *lxb_dom_document_t, node: *lxb_dom_node_t, deep: boolean): *lxb_dom_node_t <cimport,nodecl> end
global function lxb_dom_document_create_interface(document: *lxb_dom_document_t, tag_id: culong, ns: culong): pointer <cimport,nodecl> end
global function lxb_dom_document_destroy_interface(intrfc: pointer): pointer <cimport,nodecl> end
global function lxb_dom_document_create_struct(document: *lxb_dom_document_t, struct_size: csize): pointer <cimport,nodecl> end
global function lxb_dom_document_destroy_struct(document: *lxb_dom_document_t, structure: pointer): pointer <cimport,nodecl> end
global function lxb_dom_document_create_text(document: *lxb_dom_document_t, len: csize): *cuchar <cimport,nodecl> end
global function lxb_dom_document_destroy_text(document: *lxb_dom_document_t, text: *cuchar): pointer <cimport,nodecl> end
global function lxb_dom_document_element(document: *lxb_dom_document_t): *lxb_dom_element_t <cimport,nodecl> end
global function lxb_dom_document_scripting(document: *lxb_dom_document_t): boolean <cimport,nodecl> end
global function lxb_dom_document_scripting_set(document: *lxb_dom_document_t, scripting: boolean): void <cimport,nodecl> end
global function lxb_dom_document_owner(document: *lxb_dom_document_t): *lxb_dom_document_t <cimport,nodecl> end
global function lxb_dom_document_is_original(document: *lxb_dom_document_t): boolean <cimport,nodecl> end
global function lxb_dom_document_create_interface_noi(document: *lxb_dom_document_t, tag_id: culong, ns: culong): pointer <cimport,nodecl> end
global function lxb_dom_document_destroy_interface_noi(intrfc: pointer): pointer <cimport,nodecl> end
global function lxb_dom_document_create_struct_noi(document: *lxb_dom_document_t, struct_size: csize): pointer <cimport,nodecl> end
global function lxb_dom_document_destroy_struct_noi(document: *lxb_dom_document_t, structure: pointer): pointer <cimport,nodecl> end
global function lxb_dom_document_create_text_noi(document: *lxb_dom_document_t, len: csize): *cuchar <cimport,nodecl> end
global function lxb_dom_document_destroy_text_noi(document: *lxb_dom_document_t, text: *cuchar): pointer <cimport,nodecl> end
global function lxb_dom_document_element_noi(document: *lxb_dom_document_t): *lxb_dom_element_t <cimport,nodecl> end
global function lxb_dom_document_scripting_noi(document: *lxb_dom_document_t): boolean <cimport,nodecl> end
global function lxb_dom_document_scripting_set_noi(document: *lxb_dom_document_t, scripting: boolean): void <cimport,nodecl> end
global lxb_dom_attr_data_t: type <cimport,nodecl> = @record{
entry: lexbor_hash_entry_t,
attr_id: culong,
ref_count: csize,
read_only: boolean
}
lxb_dom_attr = @record{
node: lxb_dom_node_t,
upper_name: culong,
qualified_name: culong,
value: *lexbor_str_t,
owner: *lxb_dom_element_t,
next: *lxb_dom_attr_t,
prev: *lxb_dom_attr_t
}
global function lxb_dom_attr_interface_create(document: *lxb_dom_document_t): *lxb_dom_attr_t <cimport,nodecl> end
global function lxb_dom_attr_interface_clone(document: *lxb_dom_document_t, attr: *lxb_dom_attr_t): *lxb_dom_attr_t <cimport,nodecl> end
global function lxb_dom_attr_interface_destroy(attr: *lxb_dom_attr_t): *lxb_dom_attr_t <cimport,nodecl> end
global function lxb_dom_attr_set_name(attr: *lxb_dom_attr_t, local_name: *cuchar, local_name_len: csize, to_lowercase: boolean): cuint <cimport,nodecl> end
global function lxb_dom_attr_set_value(attr: *lxb_dom_attr_t, value: *cuchar, value_len: csize): cuint <cimport,nodecl> end
global function lxb_dom_attr_set_value_wo_copy(attr: *lxb_dom_attr_t, value: *cuchar, value_len: csize): cuint <cimport,nodecl> end
global function lxb_dom_attr_set_existing_value(attr: *lxb_dom_attr_t, value: *cuchar, value_len: csize): cuint <cimport,nodecl> end
global function lxb_dom_attr_clone_name_value(attr_from: *lxb_dom_attr_t, attr_to: *lxb_dom_attr_t): cuint <cimport,nodecl> end
global function lxb_dom_attr_compare(first: *lxb_dom_attr_t, second: *lxb_dom_attr_t): boolean <cimport,nodecl> end
global function lxb_dom_attr_data_undef(): *lxb_dom_attr_data_t <cimport,nodecl> end
global function lxb_dom_attr_data_by_id(hash: *lexbor_hash_t, attr_id: culong): *lxb_dom_attr_data_t <cimport,nodecl> end
global function lxb_dom_attr_data_by_local_name(hash: *lexbor_hash_t, name: *cuchar, length: csize): *lxb_dom_attr_data_t <cimport,nodecl> end
global function lxb_dom_attr_data_by_qualified_name(hash: *lexbor_hash_t, name: *cuchar, length: csize): *lxb_dom_attr_data_t <cimport,nodecl> end
global function lxb_dom_attr_qualified_name(attr: *lxb_dom_attr_t, len: *csize): *cuchar <cimport,nodecl> end
global function lxb_dom_attr_local_name(attr: *lxb_dom_attr_t, len: *csize): *cuchar <cimport,nodecl> end
global function lxb_dom_attr_value(attr: *lxb_dom_attr_t, len: *csize): *cuchar <cimport,nodecl> end
global function lxb_dom_attr_local_name_noi(attr: *lxb_dom_attr_t, len: *csize): *cuchar <cimport,nodecl> end
global function lxb_dom_attr_value_noi(attr: *lxb_dom_attr_t, len: *csize): *cuchar <cimport,nodecl> end
global lxb_html_token_attr: type <cimport,nodecl,forwarddecl,ctypedef> = @record{}
global lxb_html_token_attr_t: type = @lxb_html_token_attr
global lxb_html_token_attr_type: type <cimport,nodecl,using,ctypedef> = @enum(cint){
LXB_HTML_TOKEN_ATTR_TYPE_UNDEF = 0,
LXB_HTML_TOKEN_ATTR_TYPE_NAME_NULL = 1,
LXB_HTML_TOKEN_ATTR_TYPE_VALUE_NULL = 2
}
lxb_html_token_attr = @record{
name_begin: *cuchar,
name_end: *cuchar,
value_begin: *cuchar,
value_end: *cuchar,
name: *lxb_dom_attr_data_t,
value: *cuchar,
value_size: csize,
next: *lxb_html_token_attr_t,
prev: *lxb_html_token_attr_t,
type: cint
}
global function lxb_html_token_attr_create(dobj: *lexbor_dobject_t): *lxb_html_token_attr_t <cimport,nodecl> end
global function lxb_html_token_attr_clean(attr: *lxb_html_token_attr_t): void <cimport,nodecl> end
global function lxb_html_token_attr_destroy(attr: *lxb_html_token_attr_t, dobj: *lexbor_dobject_t): *lxb_html_token_attr_t <cimport,nodecl> end
global function lxb_html_token_attr_name(attr: *lxb_html_token_attr_t, length: *csize): *cuchar <cimport,nodecl> end