jabcode 1.1.0

Bindings for the JAB code reference implementation
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
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
#![allow(clippy::missing_safety_doc)]
/* automatically generated by rust-bindgen 0.59.2 */

#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
impl<T> __IncompleteArrayField<T> {
    #[inline]
    pub const fn new() -> Self {
        __IncompleteArrayField(::std::marker::PhantomData, [])
    }
    #[inline]
    pub fn as_ptr(&self) -> *const T {
        self as *const _ as *const T
    }
    #[inline]
    pub fn as_mut_ptr(&mut self) -> *mut T {
        self as *mut _ as *mut T
    }
    #[inline]
    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
        ::std::slice::from_raw_parts(self.as_ptr(), len)
    }
    #[inline]
    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
        ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
    }
}
impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        fmt.write_str("__IncompleteArrayField")
    }
}
pub const VERSION: &[u8; 6usize] = b"2.0.0\0";
pub const MAX_SYMBOL_NUMBER: u32 = 61;
pub const MAX_COLOR_NUMBER: u32 = 256;
pub const MAX_SIZE_ENCODING_MODE: u32 = 256;
pub const JAB_ENCODING_MODES: u32 = 6;
pub const ENC_MAX: u32 = 1000000;
pub const NUMBER_OF_MASK_PATTERNS: u32 = 8;
pub const DEFAULT_SYMBOL_NUMBER: u32 = 1;
pub const DEFAULT_MODULE_SIZE: u32 = 12;
pub const DEFAULT_COLOR_NUMBER: u32 = 8;
pub const DEFAULT_MODULE_COLOR_MODE: u32 = 2;
pub const DEFAULT_ECC_LEVEL: u32 = 3;
pub const DEFAULT_MASKING_REFERENCE: u32 = 7;
pub const DISTANCE_TO_BORDER: u32 = 4;
pub const MAX_ALIGNMENT_NUMBER: u32 = 9;
pub const COLOR_PALETTE_NUMBER: u32 = 4;
pub const BITMAP_BITS_PER_PIXEL: u32 = 32;
pub const BITMAP_BITS_PER_CHANNEL: u32 = 8;
pub const BITMAP_CHANNEL_COUNT: u32 = 4;
pub const JAB_SUCCESS: u32 = 1;
pub const JAB_FAILURE: u32 = 0;
pub const NORMAL_DECODE: u32 = 0;
pub const COMPATIBLE_DECODE: u32 = 1;
pub type jab_byte = ::std::os::raw::c_uchar;
pub type jab_char = ::std::os::raw::c_char;
pub type jab_boolean = ::std::os::raw::c_uchar;
pub type jab_int32 = ::std::os::raw::c_int;
pub type jab_uint32 = ::std::os::raw::c_uint;
pub type jab_int16 = ::std::os::raw::c_short;
pub type jab_uint16 = ::std::os::raw::c_ushort;
pub type jab_int64 = ::std::os::raw::c_longlong;
pub type jab_uint64 = ::std::os::raw::c_ulonglong;
pub type jab_float = f32;
pub type jab_double = f64;
#[doc = " @brief 2-dimensional integer vector"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct jab_vector2d {
    pub x: jab_int32,
    pub y: jab_int32,
}
#[test]
fn bindgen_test_layout_jab_vector2d() {
    assert_eq!(
        ::std::mem::size_of::<jab_vector2d>(),
        8usize,
        concat!("Size of: ", stringify!(jab_vector2d))
    );
    assert_eq!(
        ::std::mem::align_of::<jab_vector2d>(),
        4usize,
        concat!("Alignment of ", stringify!(jab_vector2d))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_vector2d>())).x as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_vector2d),
            "::",
            stringify!(x)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_vector2d>())).y as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_vector2d),
            "::",
            stringify!(y)
        )
    );
}
#[doc = " @brief 2-dimensional float vector"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct jab_point {
    pub x: jab_float,
    pub y: jab_float,
}
#[test]
fn bindgen_test_layout_jab_point() {
    assert_eq!(
        ::std::mem::size_of::<jab_point>(),
        8usize,
        concat!("Size of: ", stringify!(jab_point))
    );
    assert_eq!(
        ::std::mem::align_of::<jab_point>(),
        4usize,
        concat!("Alignment of ", stringify!(jab_point))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_point>())).x as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_point),
            "::",
            stringify!(x)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_point>())).y as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_point),
            "::",
            stringify!(y)
        )
    );
}
#[doc = " @brief Data structure"]
#[repr(C)]
#[derive(Debug)]
pub struct jab_data {
    pub length: jab_int32,
    pub data: __IncompleteArrayField<jab_char>,
}
#[test]
fn bindgen_test_layout_jab_data() {
    assert_eq!(
        ::std::mem::size_of::<jab_data>(),
        4usize,
        concat!("Size of: ", stringify!(jab_data))
    );
    assert_eq!(
        ::std::mem::align_of::<jab_data>(),
        4usize,
        concat!("Alignment of ", stringify!(jab_data))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_data>())).length as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_data),
            "::",
            stringify!(length)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_data>())).data as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_data),
            "::",
            stringify!(data)
        )
    );
}
#[doc = " @brief Code bitmap"]
#[repr(C)]
#[derive(Debug)]
pub struct jab_bitmap {
    pub width: jab_int32,
    pub height: jab_int32,
    pub bits_per_pixel: jab_int32,
    pub bits_per_channel: jab_int32,
    pub channel_count: jab_int32,
    pub pixel: __IncompleteArrayField<jab_byte>,
}
#[test]
fn bindgen_test_layout_jab_bitmap() {
    assert_eq!(
        ::std::mem::size_of::<jab_bitmap>(),
        20usize,
        concat!("Size of: ", stringify!(jab_bitmap))
    );
    assert_eq!(
        ::std::mem::align_of::<jab_bitmap>(),
        4usize,
        concat!("Alignment of ", stringify!(jab_bitmap))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_bitmap>())).width as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_bitmap),
            "::",
            stringify!(width)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_bitmap>())).height as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_bitmap),
            "::",
            stringify!(height)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_bitmap>())).bits_per_pixel as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_bitmap),
            "::",
            stringify!(bits_per_pixel)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_bitmap>())).bits_per_channel as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_bitmap),
            "::",
            stringify!(bits_per_channel)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_bitmap>())).channel_count as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_bitmap),
            "::",
            stringify!(channel_count)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_bitmap>())).pixel as *const _ as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_bitmap),
            "::",
            stringify!(pixel)
        )
    );
}
#[doc = " @brief Symbol parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct jab_symbol {
    pub index: jab_int32,
    pub side_size: jab_vector2d,
    pub host: jab_int32,
    pub slaves: [jab_int32; 4usize],
    pub wcwr: [jab_int32; 2usize],
    pub data: *mut jab_data,
    pub data_map: *mut jab_byte,
    pub metadata: *mut jab_data,
    pub matrix: *mut jab_byte,
}
#[test]
fn bindgen_test_layout_jab_symbol() {
    assert_eq!(
        ::std::mem::size_of::<jab_symbol>(),
        72usize,
        concat!("Size of: ", stringify!(jab_symbol))
    );
    assert_eq!(
        ::std::mem::align_of::<jab_symbol>(),
        8usize,
        concat!("Alignment of ", stringify!(jab_symbol))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_symbol>())).index as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_symbol),
            "::",
            stringify!(index)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_symbol>())).side_size as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_symbol),
            "::",
            stringify!(side_size)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_symbol>())).host as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_symbol),
            "::",
            stringify!(host)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_symbol>())).slaves as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_symbol),
            "::",
            stringify!(slaves)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_symbol>())).wcwr as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_symbol),
            "::",
            stringify!(wcwr)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_symbol>())).data as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_symbol),
            "::",
            stringify!(data)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_symbol>())).data_map as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_symbol),
            "::",
            stringify!(data_map)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_symbol>())).metadata as *const _ as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_symbol),
            "::",
            stringify!(metadata)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_symbol>())).matrix as *const _ as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_symbol),
            "::",
            stringify!(matrix)
        )
    );
}
#[doc = " @brief Encode parameters"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct jab_encode {
    pub color_number: jab_int32,
    pub symbol_number: jab_int32,
    pub module_size: jab_int32,
    pub master_symbol_width: jab_int32,
    pub master_symbol_height: jab_int32,
    #[doc = "< Palette holding used module colors in format RGB"]
    pub palette: *mut jab_byte,
    pub symbol_versions: *mut jab_vector2d,
    pub symbol_ecc_levels: *mut jab_byte,
    pub symbol_positions: *mut jab_int32,
    #[doc = "< Pointer to internal representation of JAB Code symbols"]
    pub symbols: *mut jab_symbol,
    pub bitmap: *mut jab_bitmap,
}
#[test]
fn bindgen_test_layout_jab_encode() {
    assert_eq!(
        ::std::mem::size_of::<jab_encode>(),
        72usize,
        concat!("Size of: ", stringify!(jab_encode))
    );
    assert_eq!(
        ::std::mem::align_of::<jab_encode>(),
        8usize,
        concat!("Alignment of ", stringify!(jab_encode))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_encode>())).color_number as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_encode),
            "::",
            stringify!(color_number)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_encode>())).symbol_number as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_encode),
            "::",
            stringify!(symbol_number)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_encode>())).module_size as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_encode),
            "::",
            stringify!(module_size)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_encode>())).master_symbol_width as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_encode),
            "::",
            stringify!(master_symbol_width)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_encode>())).master_symbol_height as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_encode),
            "::",
            stringify!(master_symbol_height)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_encode>())).palette as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_encode),
            "::",
            stringify!(palette)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_encode>())).symbol_versions as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_encode),
            "::",
            stringify!(symbol_versions)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_encode>())).symbol_ecc_levels as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_encode),
            "::",
            stringify!(symbol_ecc_levels)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_encode>())).symbol_positions as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_encode),
            "::",
            stringify!(symbol_positions)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_encode>())).symbols as *const _ as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_encode),
            "::",
            stringify!(symbols)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_encode>())).bitmap as *const _ as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_encode),
            "::",
            stringify!(bitmap)
        )
    );
}
#[doc = " @brief Decoded metadata"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct jab_metadata {
    pub default_mode: jab_boolean,
    pub Nc: jab_byte,
    pub mask_type: jab_byte,
    pub docked_position: jab_byte,
    pub side_version: jab_vector2d,
    pub ecl: jab_vector2d,
}
#[test]
fn bindgen_test_layout_jab_metadata() {
    assert_eq!(
        ::std::mem::size_of::<jab_metadata>(),
        20usize,
        concat!("Size of: ", stringify!(jab_metadata))
    );
    assert_eq!(
        ::std::mem::align_of::<jab_metadata>(),
        4usize,
        concat!("Alignment of ", stringify!(jab_metadata))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_metadata>())).default_mode as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_metadata),
            "::",
            stringify!(default_mode)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_metadata>())).Nc as *const _ as usize },
        1usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_metadata),
            "::",
            stringify!(Nc)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_metadata>())).mask_type as *const _ as usize },
        2usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_metadata),
            "::",
            stringify!(mask_type)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_metadata>())).docked_position as *const _ as usize },
        3usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_metadata),
            "::",
            stringify!(docked_position)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_metadata>())).side_version as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_metadata),
            "::",
            stringify!(side_version)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_metadata>())).ecl as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_metadata),
            "::",
            stringify!(ecl)
        )
    );
}
#[doc = " @brief Decoded symbol"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct jab_decoded_symbol {
    pub index: jab_int32,
    pub host_index: jab_int32,
    pub host_position: jab_int32,
    pub side_size: jab_vector2d,
    pub module_size: jab_float,
    pub pattern_positions: [jab_point; 4usize],
    pub metadata: jab_metadata,
    pub slave_metadata: [jab_metadata; 4usize],
    pub palette: *mut jab_byte,
    pub data: *mut jab_data,
}
#[test]
fn bindgen_test_layout_jab_decoded_symbol() {
    assert_eq!(
        ::std::mem::size_of::<jab_decoded_symbol>(),
        176usize,
        concat!("Size of: ", stringify!(jab_decoded_symbol))
    );
    assert_eq!(
        ::std::mem::align_of::<jab_decoded_symbol>(),
        8usize,
        concat!("Alignment of ", stringify!(jab_decoded_symbol))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_decoded_symbol>())).index as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_decoded_symbol),
            "::",
            stringify!(index)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_decoded_symbol>())).host_index as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_decoded_symbol),
            "::",
            stringify!(host_index)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<jab_decoded_symbol>())).host_position as *const _ as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_decoded_symbol),
            "::",
            stringify!(host_position)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_decoded_symbol>())).side_size as *const _ as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_decoded_symbol),
            "::",
            stringify!(side_size)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_decoded_symbol>())).module_size as *const _ as usize },
        20usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_decoded_symbol),
            "::",
            stringify!(module_size)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<jab_decoded_symbol>())).pattern_positions as *const _ as usize
        },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_decoded_symbol),
            "::",
            stringify!(pattern_positions)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_decoded_symbol>())).metadata as *const _ as usize },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_decoded_symbol),
            "::",
            stringify!(metadata)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<jab_decoded_symbol>())).slave_metadata as *const _ as usize
        },
        76usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_decoded_symbol),
            "::",
            stringify!(slave_metadata)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_decoded_symbol>())).palette as *const _ as usize },
        160usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_decoded_symbol),
            "::",
            stringify!(palette)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<jab_decoded_symbol>())).data as *const _ as usize },
        168usize,
        concat!(
            "Offset of field: ",
            stringify!(jab_decoded_symbol),
            "::",
            stringify!(data)
        )
    );
}
extern "C" {
    pub fn createEncode(color_number: jab_int32, symbol_number: jab_int32) -> *mut jab_encode;
}
extern "C" {
    pub fn destroyEncode(enc: *mut jab_encode);
}
extern "C" {
    pub fn generateJABCode(enc: *mut jab_encode, data: *mut jab_data) -> jab_int32;
}
extern "C" {
    pub fn decodeJABCode(
        bitmap: *mut jab_bitmap,
        mode: jab_int32,
        status: *mut jab_int32,
    ) -> *mut jab_data;
}
extern "C" {
    pub fn decodeJABCodeEx(
        bitmap: *mut jab_bitmap,
        mode: jab_int32,
        status: *mut jab_int32,
        symbols: *mut jab_decoded_symbol,
        max_symbol_number: jab_int32,
    ) -> *mut jab_data;
}
extern "C" {
    pub fn saveImage(bitmap: *mut jab_bitmap, filename: *mut jab_char) -> jab_boolean;
}
extern "C" {
    pub fn saveImageCMYK(
        bitmap: *mut jab_bitmap,
        isCMYK: jab_boolean,
        filename: *mut jab_char,
    ) -> jab_boolean;
}
extern "C" {
    pub fn readImage(filename: *mut jab_char) -> *mut jab_bitmap;
}
extern "C" {
    pub fn reportError(message: *mut jab_char);
}