litehtml-sys 0.2.4

Raw FFI bindings for litehtml (C++ HTML/CSS rendering engine)
Documentation
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
/* automatically generated by rust-bindgen 0.71.1 */

#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_position {
    pub x: f32,
    pub y: f32,
    pub width: f32,
    pub height: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_position"][::std::mem::size_of::<lh_position>() - 16usize];
    ["Alignment of lh_position"][::std::mem::align_of::<lh_position>() - 4usize];
    ["Offset of field: lh_position::x"][::std::mem::offset_of!(lh_position, x) - 0usize];
    ["Offset of field: lh_position::y"][::std::mem::offset_of!(lh_position, y) - 4usize];
    ["Offset of field: lh_position::width"][::std::mem::offset_of!(lh_position, width) - 8usize];
    ["Offset of field: lh_position::height"][::std::mem::offset_of!(lh_position, height) - 12usize];
};
pub type lh_position_t = lh_position;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_size {
    pub width: f32,
    pub height: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_size"][::std::mem::size_of::<lh_size>() - 8usize];
    ["Alignment of lh_size"][::std::mem::align_of::<lh_size>() - 4usize];
    ["Offset of field: lh_size::width"][::std::mem::offset_of!(lh_size, width) - 0usize];
    ["Offset of field: lh_size::height"][::std::mem::offset_of!(lh_size, height) - 4usize];
};
pub type lh_size_t = lh_size;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_web_color {
    pub red: ::std::os::raw::c_uchar,
    pub green: ::std::os::raw::c_uchar,
    pub blue: ::std::os::raw::c_uchar,
    pub alpha: ::std::os::raw::c_uchar,
    pub is_current_color: ::std::os::raw::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_web_color"][::std::mem::size_of::<lh_web_color>() - 8usize];
    ["Alignment of lh_web_color"][::std::mem::align_of::<lh_web_color>() - 4usize];
    ["Offset of field: lh_web_color::red"][::std::mem::offset_of!(lh_web_color, red) - 0usize];
    ["Offset of field: lh_web_color::green"][::std::mem::offset_of!(lh_web_color, green) - 1usize];
    ["Offset of field: lh_web_color::blue"][::std::mem::offset_of!(lh_web_color, blue) - 2usize];
    ["Offset of field: lh_web_color::alpha"][::std::mem::offset_of!(lh_web_color, alpha) - 3usize];
    ["Offset of field: lh_web_color::is_current_color"]
        [::std::mem::offset_of!(lh_web_color, is_current_color) - 4usize];
};
pub type lh_web_color_t = lh_web_color;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_font_metrics {
    pub font_size: f32,
    pub height: f32,
    pub ascent: f32,
    pub descent: f32,
    pub x_height: f32,
    pub ch_width: f32,
    pub draw_spaces: ::std::os::raw::c_int,
    pub sub_shift: f32,
    pub super_shift: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_font_metrics"][::std::mem::size_of::<lh_font_metrics>() - 36usize];
    ["Alignment of lh_font_metrics"][::std::mem::align_of::<lh_font_metrics>() - 4usize];
    ["Offset of field: lh_font_metrics::font_size"]
        [::std::mem::offset_of!(lh_font_metrics, font_size) - 0usize];
    ["Offset of field: lh_font_metrics::height"]
        [::std::mem::offset_of!(lh_font_metrics, height) - 4usize];
    ["Offset of field: lh_font_metrics::ascent"]
        [::std::mem::offset_of!(lh_font_metrics, ascent) - 8usize];
    ["Offset of field: lh_font_metrics::descent"]
        [::std::mem::offset_of!(lh_font_metrics, descent) - 12usize];
    ["Offset of field: lh_font_metrics::x_height"]
        [::std::mem::offset_of!(lh_font_metrics, x_height) - 16usize];
    ["Offset of field: lh_font_metrics::ch_width"]
        [::std::mem::offset_of!(lh_font_metrics, ch_width) - 20usize];
    ["Offset of field: lh_font_metrics::draw_spaces"]
        [::std::mem::offset_of!(lh_font_metrics, draw_spaces) - 24usize];
    ["Offset of field: lh_font_metrics::sub_shift"]
        [::std::mem::offset_of!(lh_font_metrics, sub_shift) - 28usize];
    ["Offset of field: lh_font_metrics::super_shift"]
        [::std::mem::offset_of!(lh_font_metrics, super_shift) - 32usize];
};
pub type lh_font_metrics_t = lh_font_metrics;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_border_radiuses {
    pub top_left_x: f32,
    pub top_left_y: f32,
    pub top_right_x: f32,
    pub top_right_y: f32,
    pub bottom_right_x: f32,
    pub bottom_right_y: f32,
    pub bottom_left_x: f32,
    pub bottom_left_y: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_border_radiuses"][::std::mem::size_of::<lh_border_radiuses>() - 32usize];
    ["Alignment of lh_border_radiuses"][::std::mem::align_of::<lh_border_radiuses>() - 4usize];
    ["Offset of field: lh_border_radiuses::top_left_x"]
        [::std::mem::offset_of!(lh_border_radiuses, top_left_x) - 0usize];
    ["Offset of field: lh_border_radiuses::top_left_y"]
        [::std::mem::offset_of!(lh_border_radiuses, top_left_y) - 4usize];
    ["Offset of field: lh_border_radiuses::top_right_x"]
        [::std::mem::offset_of!(lh_border_radiuses, top_right_x) - 8usize];
    ["Offset of field: lh_border_radiuses::top_right_y"]
        [::std::mem::offset_of!(lh_border_radiuses, top_right_y) - 12usize];
    ["Offset of field: lh_border_radiuses::bottom_right_x"]
        [::std::mem::offset_of!(lh_border_radiuses, bottom_right_x) - 16usize];
    ["Offset of field: lh_border_radiuses::bottom_right_y"]
        [::std::mem::offset_of!(lh_border_radiuses, bottom_right_y) - 20usize];
    ["Offset of field: lh_border_radiuses::bottom_left_x"]
        [::std::mem::offset_of!(lh_border_radiuses, bottom_left_x) - 24usize];
    ["Offset of field: lh_border_radiuses::bottom_left_y"]
        [::std::mem::offset_of!(lh_border_radiuses, bottom_left_y) - 28usize];
};
pub type lh_border_radiuses_t = lh_border_radiuses;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_border {
    pub width: f32,
    pub style: ::std::os::raw::c_int,
    pub color: lh_web_color_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_border"][::std::mem::size_of::<lh_border>() - 16usize];
    ["Alignment of lh_border"][::std::mem::align_of::<lh_border>() - 4usize];
    ["Offset of field: lh_border::width"][::std::mem::offset_of!(lh_border, width) - 0usize];
    ["Offset of field: lh_border::style"][::std::mem::offset_of!(lh_border, style) - 4usize];
    ["Offset of field: lh_border::color"][::std::mem::offset_of!(lh_border, color) - 8usize];
};
pub type lh_border_t = lh_border;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_borders {
    pub left: lh_border_t,
    pub top: lh_border_t,
    pub right: lh_border_t,
    pub bottom: lh_border_t,
    pub radius: lh_border_radiuses_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_borders"][::std::mem::size_of::<lh_borders>() - 96usize];
    ["Alignment of lh_borders"][::std::mem::align_of::<lh_borders>() - 4usize];
    ["Offset of field: lh_borders::left"][::std::mem::offset_of!(lh_borders, left) - 0usize];
    ["Offset of field: lh_borders::top"][::std::mem::offset_of!(lh_borders, top) - 16usize];
    ["Offset of field: lh_borders::right"][::std::mem::offset_of!(lh_borders, right) - 32usize];
    ["Offset of field: lh_borders::bottom"][::std::mem::offset_of!(lh_borders, bottom) - 48usize];
    ["Offset of field: lh_borders::radius"][::std::mem::offset_of!(lh_borders, radius) - 64usize];
};
pub type lh_borders_t = lh_borders;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_media_features {
    pub type_: ::std::os::raw::c_int,
    pub width: f32,
    pub height: f32,
    pub device_width: f32,
    pub device_height: f32,
    pub color: ::std::os::raw::c_int,
    pub color_index: ::std::os::raw::c_int,
    pub monochrome: ::std::os::raw::c_int,
    pub resolution: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_media_features"][::std::mem::size_of::<lh_media_features>() - 36usize];
    ["Alignment of lh_media_features"][::std::mem::align_of::<lh_media_features>() - 4usize];
    ["Offset of field: lh_media_features::type_"]
        [::std::mem::offset_of!(lh_media_features, type_) - 0usize];
    ["Offset of field: lh_media_features::width"]
        [::std::mem::offset_of!(lh_media_features, width) - 4usize];
    ["Offset of field: lh_media_features::height"]
        [::std::mem::offset_of!(lh_media_features, height) - 8usize];
    ["Offset of field: lh_media_features::device_width"]
        [::std::mem::offset_of!(lh_media_features, device_width) - 12usize];
    ["Offset of field: lh_media_features::device_height"]
        [::std::mem::offset_of!(lh_media_features, device_height) - 16usize];
    ["Offset of field: lh_media_features::color"]
        [::std::mem::offset_of!(lh_media_features, color) - 20usize];
    ["Offset of field: lh_media_features::color_index"]
        [::std::mem::offset_of!(lh_media_features, color_index) - 24usize];
    ["Offset of field: lh_media_features::monochrome"]
        [::std::mem::offset_of!(lh_media_features, monochrome) - 28usize];
    ["Offset of field: lh_media_features::resolution"]
        [::std::mem::offset_of!(lh_media_features, resolution) - 32usize];
};
pub type lh_media_features_t = lh_media_features;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_point {
    pub x: f32,
    pub y: f32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_point"][::std::mem::size_of::<lh_point>() - 8usize];
    ["Alignment of lh_point"][::std::mem::align_of::<lh_point>() - 4usize];
    ["Offset of field: lh_point::x"][::std::mem::offset_of!(lh_point, x) - 0usize];
    ["Offset of field: lh_point::y"][::std::mem::offset_of!(lh_point, y) - 4usize];
};
pub type lh_point_t = lh_point;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lh_document {
    _unused: [u8; 0],
}
pub type lh_document_t = lh_document;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lh_background_layer {
    _unused: [u8; 0],
}
pub type lh_background_layer_t = lh_background_layer;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lh_linear_gradient {
    _unused: [u8; 0],
}
pub type lh_linear_gradient_t = lh_linear_gradient;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lh_radial_gradient {
    _unused: [u8; 0],
}
pub type lh_radial_gradient_t = lh_radial_gradient;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lh_conic_gradient {
    _unused: [u8; 0],
}
pub type lh_conic_gradient_t = lh_conic_gradient;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lh_font_description {
    _unused: [u8; 0],
}
pub type lh_font_description_t = lh_font_description;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lh_list_marker {
    _unused: [u8; 0],
}
pub type lh_list_marker_t = lh_list_marker;
unsafe extern "C" {
    pub fn lh_font_description_family(
        fd: *const lh_font_description_t,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn lh_font_description_size(fd: *const lh_font_description_t) -> f32;
}
unsafe extern "C" {
    pub fn lh_font_description_style(fd: *const lh_font_description_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_font_description_weight(fd: *const lh_font_description_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_font_description_decoration_line(
        fd: *const lh_font_description_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_font_description_decoration_thickness_is_predefined(
        fd: *const lh_font_description_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_font_description_decoration_thickness_predef(
        fd: *const lh_font_description_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_font_description_decoration_thickness_value(fd: *const lh_font_description_t) -> f32;
}
unsafe extern "C" {
    pub fn lh_font_description_decoration_style(
        fd: *const lh_font_description_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_font_description_decoration_color(fd: *const lh_font_description_t)
        -> lh_web_color_t;
}
unsafe extern "C" {
    pub fn lh_font_description_emphasis_style(
        fd: *const lh_font_description_t,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn lh_font_description_emphasis_color(fd: *const lh_font_description_t) -> lh_web_color_t;
}
unsafe extern "C" {
    pub fn lh_font_description_emphasis_position(
        fd: *const lh_font_description_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_list_marker_image(m: *const lh_list_marker_t) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn lh_list_marker_baseurl(m: *const lh_list_marker_t) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn lh_list_marker_type(m: *const lh_list_marker_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_list_marker_color(m: *const lh_list_marker_t) -> lh_web_color_t;
}
unsafe extern "C" {
    pub fn lh_list_marker_pos(m: *const lh_list_marker_t) -> lh_position_t;
}
unsafe extern "C" {
    pub fn lh_list_marker_index(m: *const lh_list_marker_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_list_marker_font(m: *const lh_list_marker_t) -> usize;
}
unsafe extern "C" {
    pub fn lh_background_layer_border_box(layer: *const lh_background_layer_t) -> lh_position_t;
}
unsafe extern "C" {
    pub fn lh_background_layer_border_radius(
        layer: *const lh_background_layer_t,
    ) -> lh_border_radiuses_t;
}
unsafe extern "C" {
    pub fn lh_background_layer_clip_box(layer: *const lh_background_layer_t) -> lh_position_t;
}
unsafe extern "C" {
    pub fn lh_background_layer_origin_box(layer: *const lh_background_layer_t) -> lh_position_t;
}
unsafe extern "C" {
    pub fn lh_background_layer_attachment(
        layer: *const lh_background_layer_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_background_layer_repeat(layer: *const lh_background_layer_t)
        -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_background_layer_is_root(
        layer: *const lh_background_layer_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_linear_gradient_start(g: *const lh_linear_gradient_t) -> lh_point_t;
}
unsafe extern "C" {
    pub fn lh_linear_gradient_end(g: *const lh_linear_gradient_t) -> lh_point_t;
}
unsafe extern "C" {
    pub fn lh_linear_gradient_color_points_count(
        g: *const lh_linear_gradient_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_linear_gradient_color_point_offset(
        g: *const lh_linear_gradient_t,
        idx: ::std::os::raw::c_int,
    ) -> f32;
}
unsafe extern "C" {
    pub fn lh_linear_gradient_color_point_color(
        g: *const lh_linear_gradient_t,
        idx: ::std::os::raw::c_int,
    ) -> lh_web_color_t;
}
unsafe extern "C" {
    pub fn lh_linear_gradient_color_space(g: *const lh_linear_gradient_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_linear_gradient_hue_interpolation(
        g: *const lh_linear_gradient_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_radial_gradient_position(g: *const lh_radial_gradient_t) -> lh_point_t;
}
unsafe extern "C" {
    pub fn lh_radial_gradient_radius(g: *const lh_radial_gradient_t) -> lh_point_t;
}
unsafe extern "C" {
    pub fn lh_radial_gradient_color_points_count(
        g: *const lh_radial_gradient_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_radial_gradient_color_point_offset(
        g: *const lh_radial_gradient_t,
        idx: ::std::os::raw::c_int,
    ) -> f32;
}
unsafe extern "C" {
    pub fn lh_radial_gradient_color_point_color(
        g: *const lh_radial_gradient_t,
        idx: ::std::os::raw::c_int,
    ) -> lh_web_color_t;
}
unsafe extern "C" {
    pub fn lh_radial_gradient_color_space(g: *const lh_radial_gradient_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_radial_gradient_hue_interpolation(
        g: *const lh_radial_gradient_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_conic_gradient_position(g: *const lh_conic_gradient_t) -> lh_point_t;
}
unsafe extern "C" {
    pub fn lh_conic_gradient_angle(g: *const lh_conic_gradient_t) -> f32;
}
unsafe extern "C" {
    pub fn lh_conic_gradient_radius(g: *const lh_conic_gradient_t) -> f32;
}
unsafe extern "C" {
    pub fn lh_conic_gradient_color_points_count(
        g: *const lh_conic_gradient_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_conic_gradient_color_point_offset(
        g: *const lh_conic_gradient_t,
        idx: ::std::os::raw::c_int,
    ) -> f32;
}
unsafe extern "C" {
    pub fn lh_conic_gradient_color_point_color(
        g: *const lh_conic_gradient_t,
        idx: ::std::os::raw::c_int,
    ) -> lh_web_color_t;
}
unsafe extern "C" {
    pub fn lh_conic_gradient_color_space(g: *const lh_conic_gradient_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_conic_gradient_hue_interpolation(
        g: *const lh_conic_gradient_t,
    ) -> ::std::os::raw::c_int;
}
pub type lh_set_string_fn = ::std::option::Option<
    unsafe extern "C" fn(ctx: *mut ::std::os::raw::c_void, text: *const ::std::os::raw::c_char),
>;
pub type lh_set_language_fn = ::std::option::Option<
    unsafe extern "C" fn(
        ctx: *mut ::std::os::raw::c_void,
        language: *const ::std::os::raw::c_char,
        culture: *const ::std::os::raw::c_char,
    ),
>;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lh_container_vtable {
    pub create_font: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            descr: *const lh_font_description_t,
            fm: *mut lh_font_metrics_t,
        ) -> usize,
    >,
    pub delete_font: ::std::option::Option<
        unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, hFont: usize),
    >,
    pub text_width: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            text: *const ::std::os::raw::c_char,
            hFont: usize,
        ) -> f32,
    >,
    pub draw_text: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            hdc: usize,
            text: *const ::std::os::raw::c_char,
            hFont: usize,
            color: lh_web_color_t,
            pos: lh_position_t,
        ),
    >,
    pub pt_to_px: ::std::option::Option<
        unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, pt: f32) -> f32,
    >,
    pub get_default_font_size:
        ::std::option::Option<unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void) -> f32>,
    pub get_default_font_name: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
        ) -> *const ::std::os::raw::c_char,
    >,
    pub draw_list_marker: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            hdc: usize,
            marker: *const lh_list_marker_t,
        ),
    >,
    pub load_image: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            src: *const ::std::os::raw::c_char,
            baseurl: *const ::std::os::raw::c_char,
            redraw_on_ready: ::std::os::raw::c_int,
        ),
    >,
    pub get_image_size: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            src: *const ::std::os::raw::c_char,
            baseurl: *const ::std::os::raw::c_char,
            sz: *mut lh_size_t,
        ),
    >,
    pub draw_image: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            hdc: usize,
            layer: *const lh_background_layer_t,
            url: *const ::std::os::raw::c_char,
            base_url: *const ::std::os::raw::c_char,
        ),
    >,
    pub draw_solid_fill: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            hdc: usize,
            layer: *const lh_background_layer_t,
            color: lh_web_color_t,
        ),
    >,
    pub draw_linear_gradient: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            hdc: usize,
            layer: *const lh_background_layer_t,
            gradient: *const lh_linear_gradient_t,
        ),
    >,
    pub draw_radial_gradient: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            hdc: usize,
            layer: *const lh_background_layer_t,
            gradient: *const lh_radial_gradient_t,
        ),
    >,
    pub draw_conic_gradient: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            hdc: usize,
            layer: *const lh_background_layer_t,
            gradient: *const lh_conic_gradient_t,
        ),
    >,
    pub draw_borders: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            hdc: usize,
            borders: lh_borders_t,
            draw_pos: lh_position_t,
            root: ::std::os::raw::c_int,
        ),
    >,
    pub set_caption: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            caption: *const ::std::os::raw::c_char,
        ),
    >,
    pub set_base_url: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            base_url: *const ::std::os::raw::c_char,
        ),
    >,
    pub link: ::std::option::Option<unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void)>,
    pub on_anchor_click: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            url: *const ::std::os::raw::c_char,
        ),
    >,
    pub on_mouse_event: ::std::option::Option<
        unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, event: ::std::os::raw::c_int),
    >,
    pub set_cursor: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            cursor: *const ::std::os::raw::c_char,
        ),
    >,
    pub transform_text: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            text: *const ::std::os::raw::c_char,
            tt: ::std::os::raw::c_int,
            set_result: lh_set_string_fn,
            ctx: *mut ::std::os::raw::c_void,
        ),
    >,
    pub import_css: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            url: *const ::std::os::raw::c_char,
            baseurl: *const ::std::os::raw::c_char,
            set_result: lh_set_string_fn,
            result_ctx: *mut ::std::os::raw::c_void,
            set_baseurl: lh_set_string_fn,
            baseurl_ctx: *mut ::std::os::raw::c_void,
        ),
    >,
    pub set_clip: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            pos: lh_position_t,
            bdr_radius: lh_border_radiuses_t,
        ),
    >,
    pub del_clip:
        ::std::option::Option<unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void)>,
    pub get_viewport: ::std::option::Option<
        unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, viewport: *mut lh_position_t),
    >,
    pub get_media_features: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            media: *mut lh_media_features_t,
        ),
    >,
    pub get_language: ::std::option::Option<
        unsafe extern "C" fn(
            user_data: *mut ::std::os::raw::c_void,
            set_result: lh_set_language_fn,
            ctx: *mut ::std::os::raw::c_void,
        ),
    >,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lh_container_vtable"][::std::mem::size_of::<lh_container_vtable>() - 232usize];
    ["Alignment of lh_container_vtable"][::std::mem::align_of::<lh_container_vtable>() - 8usize];
    ["Offset of field: lh_container_vtable::create_font"]
        [::std::mem::offset_of!(lh_container_vtable, create_font) - 0usize];
    ["Offset of field: lh_container_vtable::delete_font"]
        [::std::mem::offset_of!(lh_container_vtable, delete_font) - 8usize];
    ["Offset of field: lh_container_vtable::text_width"]
        [::std::mem::offset_of!(lh_container_vtable, text_width) - 16usize];
    ["Offset of field: lh_container_vtable::draw_text"]
        [::std::mem::offset_of!(lh_container_vtable, draw_text) - 24usize];
    ["Offset of field: lh_container_vtable::pt_to_px"]
        [::std::mem::offset_of!(lh_container_vtable, pt_to_px) - 32usize];
    ["Offset of field: lh_container_vtable::get_default_font_size"]
        [::std::mem::offset_of!(lh_container_vtable, get_default_font_size) - 40usize];
    ["Offset of field: lh_container_vtable::get_default_font_name"]
        [::std::mem::offset_of!(lh_container_vtable, get_default_font_name) - 48usize];
    ["Offset of field: lh_container_vtable::draw_list_marker"]
        [::std::mem::offset_of!(lh_container_vtable, draw_list_marker) - 56usize];
    ["Offset of field: lh_container_vtable::load_image"]
        [::std::mem::offset_of!(lh_container_vtable, load_image) - 64usize];
    ["Offset of field: lh_container_vtable::get_image_size"]
        [::std::mem::offset_of!(lh_container_vtable, get_image_size) - 72usize];
    ["Offset of field: lh_container_vtable::draw_image"]
        [::std::mem::offset_of!(lh_container_vtable, draw_image) - 80usize];
    ["Offset of field: lh_container_vtable::draw_solid_fill"]
        [::std::mem::offset_of!(lh_container_vtable, draw_solid_fill) - 88usize];
    ["Offset of field: lh_container_vtable::draw_linear_gradient"]
        [::std::mem::offset_of!(lh_container_vtable, draw_linear_gradient) - 96usize];
    ["Offset of field: lh_container_vtable::draw_radial_gradient"]
        [::std::mem::offset_of!(lh_container_vtable, draw_radial_gradient) - 104usize];
    ["Offset of field: lh_container_vtable::draw_conic_gradient"]
        [::std::mem::offset_of!(lh_container_vtable, draw_conic_gradient) - 112usize];
    ["Offset of field: lh_container_vtable::draw_borders"]
        [::std::mem::offset_of!(lh_container_vtable, draw_borders) - 120usize];
    ["Offset of field: lh_container_vtable::set_caption"]
        [::std::mem::offset_of!(lh_container_vtable, set_caption) - 128usize];
    ["Offset of field: lh_container_vtable::set_base_url"]
        [::std::mem::offset_of!(lh_container_vtable, set_base_url) - 136usize];
    ["Offset of field: lh_container_vtable::link"]
        [::std::mem::offset_of!(lh_container_vtable, link) - 144usize];
    ["Offset of field: lh_container_vtable::on_anchor_click"]
        [::std::mem::offset_of!(lh_container_vtable, on_anchor_click) - 152usize];
    ["Offset of field: lh_container_vtable::on_mouse_event"]
        [::std::mem::offset_of!(lh_container_vtable, on_mouse_event) - 160usize];
    ["Offset of field: lh_container_vtable::set_cursor"]
        [::std::mem::offset_of!(lh_container_vtable, set_cursor) - 168usize];
    ["Offset of field: lh_container_vtable::transform_text"]
        [::std::mem::offset_of!(lh_container_vtable, transform_text) - 176usize];
    ["Offset of field: lh_container_vtable::import_css"]
        [::std::mem::offset_of!(lh_container_vtable, import_css) - 184usize];
    ["Offset of field: lh_container_vtable::set_clip"]
        [::std::mem::offset_of!(lh_container_vtable, set_clip) - 192usize];
    ["Offset of field: lh_container_vtable::del_clip"]
        [::std::mem::offset_of!(lh_container_vtable, del_clip) - 200usize];
    ["Offset of field: lh_container_vtable::get_viewport"]
        [::std::mem::offset_of!(lh_container_vtable, get_viewport) - 208usize];
    ["Offset of field: lh_container_vtable::get_media_features"]
        [::std::mem::offset_of!(lh_container_vtable, get_media_features) - 216usize];
    ["Offset of field: lh_container_vtable::get_language"]
        [::std::mem::offset_of!(lh_container_vtable, get_language) - 224usize];
};
pub type lh_container_vtable_t = lh_container_vtable;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lh_element {
    _unused: [u8; 0],
}
pub type lh_element_t = lh_element;
unsafe extern "C" {
    pub fn lh_document_create_from_string(
        html: *const ::std::os::raw::c_char,
        vtable: *mut lh_container_vtable_t,
        user_data: *mut ::std::os::raw::c_void,
        master_css: *const ::std::os::raw::c_char,
        user_styles: *const ::std::os::raw::c_char,
    ) -> *mut lh_document_t;
}
unsafe extern "C" {
    pub fn lh_document_destroy(doc: *mut lh_document_t);
}
unsafe extern "C" {
    pub fn lh_document_render(doc: *mut lh_document_t, max_width: f32) -> f32;
}
unsafe extern "C" {
    pub fn lh_document_draw(
        doc: *mut lh_document_t,
        hdc: usize,
        x: f32,
        y: f32,
        clip: *const lh_position_t,
    );
}
unsafe extern "C" {
    pub fn lh_document_width(doc: *const lh_document_t) -> f32;
}
unsafe extern "C" {
    pub fn lh_document_height(doc: *const lh_document_t) -> f32;
}
unsafe extern "C" {
    pub fn lh_document_add_stylesheet(
        doc: *mut lh_document_t,
        css_text: *const ::std::os::raw::c_char,
        baseurl: *const ::std::os::raw::c_char,
        media: *const ::std::os::raw::c_char,
    );
}
unsafe extern "C" {
    pub fn lh_document_root(doc: *mut lh_document_t) -> *mut lh_element_t;
}
unsafe extern "C" {
    pub fn lh_element_parent(el: *mut lh_element_t) -> *mut lh_element_t;
}
unsafe extern "C" {
    pub fn lh_element_children_count(el: *mut lh_element_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_element_child_at(
        el: *mut lh_element_t,
        index: ::std::os::raw::c_int,
    ) -> *mut lh_element_t;
}
unsafe extern "C" {
    pub fn lh_element_is_text(el: *mut lh_element_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_element_get_font(el: *mut lh_element_t) -> usize;
}
unsafe extern "C" {
    pub fn lh_element_get_font_size(el: *mut lh_element_t) -> f32;
}
unsafe extern "C" {
    pub fn lh_element_get_placement(el: *mut lh_element_t, pos: *mut lh_position_t);
}
unsafe extern "C" {
    pub fn lh_element_get_text(
        el: *mut lh_element_t,
        cb: ::std::option::Option<
            unsafe extern "C" fn(
                ctx: *mut ::std::os::raw::c_void,
                text: *const ::std::os::raw::c_char,
            ),
        >,
        ctx: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    pub fn lh_document_get_element_by_point(
        doc: *mut lh_document_t,
        x: f32,
        y: f32,
        client_x: f32,
        client_y: f32,
    ) -> *mut lh_element_t;
}
unsafe extern "C" {
    pub fn lh_element_get_inline_boxes_count(el: *mut lh_element_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_element_get_inline_box_at(
        el: *mut lh_element_t,
        index: ::std::os::raw::c_int,
        pos: *mut lh_position_t,
    );
}
pub type lh_inline_box_callback = ::std::option::Option<
    unsafe extern "C" fn(pos: *const lh_position_t, ctx: *mut ::std::os::raw::c_void),
>;
unsafe extern "C" {
    pub fn lh_element_get_inline_boxes(
        el: *mut lh_element_t,
        cb: lh_inline_box_callback,
        ctx: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    pub fn lh_element_select_one(
        el: *mut lh_element_t,
        selector: *const ::std::os::raw::c_char,
    ) -> *mut lh_element_t;
}
unsafe extern "C" {
    pub fn lh_element_get_text_align(el: *mut lh_element_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_element_get_line_height(el: *mut lh_element_t) -> f32;
}
unsafe extern "C" {
    pub fn lh_document_append_children_from_string(
        doc: *mut lh_document_t,
        parent: *mut lh_element_t,
        html: *const ::std::os::raw::c_char,
        replace_existing: ::std::os::raw::c_int,
    );
}
unsafe extern "C" {
    pub fn lh_document_on_mouse_over(
        doc: *mut lh_document_t,
        x: f32,
        y: f32,
        client_x: f32,
        client_y: f32,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_document_on_lbutton_down(
        doc: *mut lh_document_t,
        x: f32,
        y: f32,
        client_x: f32,
        client_y: f32,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_document_on_lbutton_up(
        doc: *mut lh_document_t,
        x: f32,
        y: f32,
        client_x: f32,
        client_y: f32,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_document_on_mouse_leave(doc: *mut lh_document_t) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn lh_document_media_changed(doc: *mut lh_document_t) -> ::std::os::raw::c_int;
}