bufferino 0.0.1

Rusty wrapper around gbm
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
/* automatically generated by rust-bindgen 0.71.1 */

pub const __GBM__: u32 = 1;
pub const _STDINT_H: u32 = 1;
pub const _FEATURES_H: u32 = 1;
pub const _DEFAULT_SOURCE: u32 = 1;
pub const __GLIBC_USE_ISOC2Y: u32 = 0;
pub const __GLIBC_USE_ISOC23: u32 = 0;
pub const __USE_ISOC11: u32 = 1;
pub const __USE_ISOC99: u32 = 1;
pub const __USE_ISOC95: u32 = 1;
pub const __USE_POSIX_IMPLICITLY: u32 = 1;
pub const _POSIX_SOURCE: u32 = 1;
pub const _POSIX_C_SOURCE: u32 = 200809;
pub const __USE_POSIX: u32 = 1;
pub const __USE_POSIX2: u32 = 1;
pub const __USE_POSIX199309: u32 = 1;
pub const __USE_POSIX199506: u32 = 1;
pub const __USE_XOPEN2K: u32 = 1;
pub const __USE_XOPEN2K8: u32 = 1;
pub const _ATFILE_SOURCE: u32 = 1;
pub const __WORDSIZE: u32 = 64;
pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
pub const __SYSCALL_WORDSIZE: u32 = 64;
pub const __TIMESIZE: u32 = 64;
pub const __USE_TIME_BITS64: u32 = 1;
pub const __USE_MISC: u32 = 1;
pub const __USE_ATFILE: u32 = 1;
pub const __USE_FORTIFY_LEVEL: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
pub const __GLIBC_USE_C23_STRTOL: u32 = 0;
pub const _STDC_PREDEF_H: u32 = 1;
pub const __STDC_IEC_559__: u32 = 1;
pub const __STDC_IEC_60559_BFP__: u32 = 201404;
pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
pub const __STDC_ISO_10646__: u32 = 201706;
pub const __GNU_LIBRARY__: u32 = 6;
pub const __GLIBC__: u32 = 2;
pub const __GLIBC_MINOR__: u32 = 41;
pub const _SYS_CDEFS_H: u32 = 1;
pub const __glibc_c99_flexarr_available: u32 = 1;
pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
pub const __HAVE_GENERIC_SELECTION: u32 = 1;
pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT_C23: u32 = 0;
pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C23: u32 = 0;
pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
pub const _BITS_TYPES_H: u32 = 1;
pub const _BITS_TYPESIZES_H: u32 = 1;
pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
pub const __INO_T_MATCHES_INO64_T: u32 = 1;
pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
pub const __STATFS_MATCHES_STATFS64: u32 = 1;
pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
pub const __FD_SETSIZE: u32 = 1024;
pub const _BITS_TIME64_H: u32 = 1;
pub const _BITS_WCHAR_H: u32 = 1;
pub const _BITS_STDINT_INTN_H: u32 = 1;
pub const _BITS_STDINT_UINTN_H: u32 = 1;
pub const _BITS_STDINT_LEAST_H: u32 = 1;
pub const INT8_MIN: i32 = -128;
pub const INT16_MIN: i32 = -32768;
pub const INT32_MIN: i32 = -2147483648;
pub const INT8_MAX: u32 = 127;
pub const INT16_MAX: u32 = 32767;
pub const INT32_MAX: u32 = 2147483647;
pub const UINT8_MAX: u32 = 255;
pub const UINT16_MAX: u32 = 65535;
pub const UINT32_MAX: u32 = 4294967295;
pub const INT_LEAST8_MIN: i32 = -128;
pub const INT_LEAST16_MIN: i32 = -32768;
pub const INT_LEAST32_MIN: i32 = -2147483648;
pub const INT_LEAST8_MAX: u32 = 127;
pub const INT_LEAST16_MAX: u32 = 32767;
pub const INT_LEAST32_MAX: u32 = 2147483647;
pub const UINT_LEAST8_MAX: u32 = 255;
pub const UINT_LEAST16_MAX: u32 = 65535;
pub const UINT_LEAST32_MAX: u32 = 4294967295;
pub const INT_FAST8_MIN: i32 = -128;
pub const INT_FAST16_MIN: i64 = -9223372036854775808;
pub const INT_FAST32_MIN: i64 = -9223372036854775808;
pub const INT_FAST8_MAX: u32 = 127;
pub const INT_FAST16_MAX: u64 = 9223372036854775807;
pub const INT_FAST32_MAX: u64 = 9223372036854775807;
pub const UINT_FAST8_MAX: u32 = 255;
pub const UINT_FAST16_MAX: i32 = -1;
pub const UINT_FAST32_MAX: i32 = -1;
pub const INTPTR_MIN: i64 = -9223372036854775808;
pub const INTPTR_MAX: u64 = 9223372036854775807;
pub const UINTPTR_MAX: i32 = -1;
pub const PTRDIFF_MIN: i64 = -9223372036854775808;
pub const PTRDIFF_MAX: u64 = 9223372036854775807;
pub const SIG_ATOMIC_MIN: i32 = -2147483648;
pub const SIG_ATOMIC_MAX: u32 = 2147483647;
pub const SIZE_MAX: i32 = -1;
pub const WINT_MIN: u32 = 0;
pub const WINT_MAX: u32 = 4294967295;
pub const GBM_FORMAT_BIG_ENDIAN: u32 = 2147483648;
pub const GBM_BO_FIXED_COMPRESSION_MASK: u32 = 1920;
pub const GBM_BO_IMPORT_WL_BUFFER: u32 = 21761;
pub const GBM_BO_IMPORT_EGL_IMAGE: u32 = 21762;
pub const GBM_BO_IMPORT_FD: u32 = 21763;
pub const GBM_BO_IMPORT_FD_MODIFIER: u32 = 21764;
pub const GBM_MAX_PLANES: u32 = 4;
pub type wchar_t = ::core::ffi::c_int;
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct max_align_t {
    pub __clang_max_align_nonce1: ::core::ffi::c_longlong,
    pub __bindgen_padding_0: u64,
    pub __clang_max_align_nonce2: u128,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of max_align_t"][::core::mem::size_of::<max_align_t>() - 32usize];
    ["Alignment of max_align_t"][::core::mem::align_of::<max_align_t>() - 16usize];
    ["Offset of field: max_align_t::__clang_max_align_nonce1"]
        [::core::mem::offset_of!(max_align_t, __clang_max_align_nonce1) - 0usize];
    ["Offset of field: max_align_t::__clang_max_align_nonce2"]
        [::core::mem::offset_of!(max_align_t, __clang_max_align_nonce2) - 16usize];
};
pub type __u_char = ::core::ffi::c_uchar;
pub type __u_short = ::core::ffi::c_ushort;
pub type __u_int = ::core::ffi::c_uint;
pub type __u_long = ::core::ffi::c_ulong;
pub type __int8_t = ::core::ffi::c_schar;
pub type __uint8_t = ::core::ffi::c_uchar;
pub type __int16_t = ::core::ffi::c_short;
pub type __uint16_t = ::core::ffi::c_ushort;
pub type __int32_t = ::core::ffi::c_int;
pub type __uint32_t = ::core::ffi::c_uint;
pub type __int64_t = ::core::ffi::c_long;
pub type __uint64_t = ::core::ffi::c_ulong;
pub type __int_least8_t = __int8_t;
pub type __uint_least8_t = __uint8_t;
pub type __int_least16_t = __int16_t;
pub type __uint_least16_t = __uint16_t;
pub type __int_least32_t = __int32_t;
pub type __uint_least32_t = __uint32_t;
pub type __int_least64_t = __int64_t;
pub type __uint_least64_t = __uint64_t;
pub type __quad_t = ::core::ffi::c_long;
pub type __u_quad_t = ::core::ffi::c_ulong;
pub type __intmax_t = ::core::ffi::c_long;
pub type __uintmax_t = ::core::ffi::c_ulong;
pub type __dev_t = ::core::ffi::c_ulong;
pub type __uid_t = ::core::ffi::c_uint;
pub type __gid_t = ::core::ffi::c_uint;
pub type __ino_t = ::core::ffi::c_ulong;
pub type __ino64_t = ::core::ffi::c_ulong;
pub type __mode_t = ::core::ffi::c_uint;
pub type __nlink_t = ::core::ffi::c_ulong;
pub type __off_t = ::core::ffi::c_long;
pub type __off64_t = ::core::ffi::c_long;
pub type __pid_t = ::core::ffi::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __fsid_t {
    pub __val: [::core::ffi::c_int; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of __fsid_t"][::core::mem::size_of::<__fsid_t>() - 8usize];
    ["Alignment of __fsid_t"][::core::mem::align_of::<__fsid_t>() - 4usize];
    ["Offset of field: __fsid_t::__val"][::core::mem::offset_of!(__fsid_t, __val) - 0usize];
};
pub type __clock_t = ::core::ffi::c_long;
pub type __rlim_t = ::core::ffi::c_ulong;
pub type __rlim64_t = ::core::ffi::c_ulong;
pub type __id_t = ::core::ffi::c_uint;
pub type __time_t = ::core::ffi::c_long;
pub type __useconds_t = ::core::ffi::c_uint;
pub type __suseconds_t = ::core::ffi::c_long;
pub type __suseconds64_t = ::core::ffi::c_long;
pub type __daddr_t = ::core::ffi::c_int;
pub type __key_t = ::core::ffi::c_int;
pub type __clockid_t = ::core::ffi::c_int;
pub type __timer_t = *mut ::core::ffi::c_void;
pub type __blksize_t = ::core::ffi::c_long;
pub type __blkcnt_t = ::core::ffi::c_long;
pub type __blkcnt64_t = ::core::ffi::c_long;
pub type __fsblkcnt_t = ::core::ffi::c_ulong;
pub type __fsblkcnt64_t = ::core::ffi::c_ulong;
pub type __fsfilcnt_t = ::core::ffi::c_ulong;
pub type __fsfilcnt64_t = ::core::ffi::c_ulong;
pub type __fsword_t = ::core::ffi::c_long;
pub type __ssize_t = ::core::ffi::c_long;
pub type __syscall_slong_t = ::core::ffi::c_long;
pub type __syscall_ulong_t = ::core::ffi::c_ulong;
pub type __loff_t = __off64_t;
pub type __caddr_t = *mut ::core::ffi::c_char;
pub type __intptr_t = ::core::ffi::c_long;
pub type __socklen_t = ::core::ffi::c_uint;
pub type __sig_atomic_t = ::core::ffi::c_int;
pub type int_least8_t = __int_least8_t;
pub type int_least16_t = __int_least16_t;
pub type int_least32_t = __int_least32_t;
pub type int_least64_t = __int_least64_t;
pub type uint_least8_t = __uint_least8_t;
pub type uint_least16_t = __uint_least16_t;
pub type uint_least32_t = __uint_least32_t;
pub type uint_least64_t = __uint_least64_t;
pub type int_fast8_t = ::core::ffi::c_schar;
pub type int_fast16_t = ::core::ffi::c_long;
pub type int_fast32_t = ::core::ffi::c_long;
pub type int_fast64_t = ::core::ffi::c_long;
pub type uint_fast8_t = ::core::ffi::c_uchar;
pub type uint_fast16_t = ::core::ffi::c_ulong;
pub type uint_fast32_t = ::core::ffi::c_ulong;
pub type uint_fast64_t = ::core::ffi::c_ulong;
pub type intmax_t = __intmax_t;
pub type uintmax_t = __uintmax_t;
#[doc = " \\file gbm.h\n \\brief Generic Buffer Manager"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gbm_device {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gbm_bo {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gbm_surface {
    _unused: [u8; 0],
}
#[doc = " Abstraction representing the handle to a buffer allocated by the\n manager"]
#[repr(C)]
#[derive(Copy, Clone)]
pub union gbm_bo_handle {
    pub ptr: *mut ::core::ffi::c_void,
    pub s32: i32,
    pub u32_: u32,
    pub s64: i64,
    pub u64_: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of gbm_bo_handle"][::core::mem::size_of::<gbm_bo_handle>() - 8usize];
    ["Alignment of gbm_bo_handle"][::core::mem::align_of::<gbm_bo_handle>() - 8usize];
    ["Offset of field: gbm_bo_handle::ptr"][::core::mem::offset_of!(gbm_bo_handle, ptr) - 0usize];
    ["Offset of field: gbm_bo_handle::s32"][::core::mem::offset_of!(gbm_bo_handle, s32) - 0usize];
    ["Offset of field: gbm_bo_handle::u32_"][::core::mem::offset_of!(gbm_bo_handle, u32_) - 0usize];
    ["Offset of field: gbm_bo_handle::s64"][::core::mem::offset_of!(gbm_bo_handle, s64) - 0usize];
    ["Offset of field: gbm_bo_handle::u64_"][::core::mem::offset_of!(gbm_bo_handle, u64_) - 0usize];
};
#[doc = " RGB with 8 bits per channel in a 32 bit value"]
pub const gbm_bo_format_GBM_BO_FORMAT_XRGB8888: gbm_bo_format = 0;
#[doc = " ARGB with 8 bits per channel in a 32 bit value"]
pub const gbm_bo_format_GBM_BO_FORMAT_ARGB8888: gbm_bo_format = 1;
#[doc = " Format of the allocated buffer"]
pub type gbm_bo_format = ::core::ffi::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gbm_format_name_desc {
    pub name: [::core::ffi::c_char; 5usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of gbm_format_name_desc"][::core::mem::size_of::<gbm_format_name_desc>() - 5usize];
    ["Alignment of gbm_format_name_desc"][::core::mem::align_of::<gbm_format_name_desc>() - 1usize];
    ["Offset of field: gbm_format_name_desc::name"]
        [::core::mem::offset_of!(gbm_format_name_desc, name) - 0usize];
};
#[doc = " Buffer is going to be presented to the screen using an API such as KMS"]
pub const gbm_bo_flags_GBM_BO_USE_SCANOUT: gbm_bo_flags = 1;
#[doc = " Buffer is going to be used as cursor"]
pub const gbm_bo_flags_GBM_BO_USE_CURSOR: gbm_bo_flags = 2;
#[doc = " Deprecated"]
pub const gbm_bo_flags_GBM_BO_USE_CURSOR_64X64: gbm_bo_flags = 2;
#[doc = " Buffer is to be used for rendering - for example it is going to be used\n as the storage for a color buffer"]
pub const gbm_bo_flags_GBM_BO_USE_RENDERING: gbm_bo_flags = 4;
#[doc = " Buffer can be used for gbm_bo_write.  This is guaranteed to work\n with GBM_BO_USE_CURSOR, but may not work for other combinations."]
pub const gbm_bo_flags_GBM_BO_USE_WRITE: gbm_bo_flags = 8;
#[doc = " Buffer is linear, i.e. not tiled."]
pub const gbm_bo_flags_GBM_BO_USE_LINEAR: gbm_bo_flags = 16;
#[doc = " Buffer is protected, i.e. encrypted and not readable by CPU or any\n other non-secure / non-trusted components nor by non-trusted OpenGL,\n OpenCL, and Vulkan applications."]
pub const gbm_bo_flags_GBM_BO_USE_PROTECTED: gbm_bo_flags = 32;
#[doc = " The buffer will be used for front buffer rendering.  On some\n platforms this may (for example) disable framebuffer compression\n to avoid problems with compression flags data being out of sync\n with pixel data."]
pub const gbm_bo_flags_GBM_BO_USE_FRONT_RENDERING: gbm_bo_flags = 64;
#[doc = " Allow the driver to select fixed-rate compression parameters."]
pub const gbm_bo_flags_GBM_BO_FIXED_COMPRESSION_DEFAULT: gbm_bo_flags = 128;
#[doc = " Fixed-rate compression: at least 1bpc, less than 2bpc"]
pub const gbm_bo_flags_GBM_BO_FIXED_COMPRESSION_1BPC: gbm_bo_flags = 256;
#[doc = " Fixed-rate compression: at least 2bpc, less than 3bpc"]
pub const gbm_bo_flags_GBM_BO_FIXED_COMPRESSION_2BPC: gbm_bo_flags = 384;
#[doc = " Fixed-rate compression: at least 3bpc, less than 4bpc"]
pub const gbm_bo_flags_GBM_BO_FIXED_COMPRESSION_3BPC: gbm_bo_flags = 512;
#[doc = " Fixed-rate compression: at least 4bpc, less than 5bpc"]
pub const gbm_bo_flags_GBM_BO_FIXED_COMPRESSION_4BPC: gbm_bo_flags = 640;
#[doc = " Fixed-rate compression: at least 5bpc, less than 6bpc"]
pub const gbm_bo_flags_GBM_BO_FIXED_COMPRESSION_5BPC: gbm_bo_flags = 768;
#[doc = " Fixed-rate compression: at least 6bpc, less than 7bpc"]
pub const gbm_bo_flags_GBM_BO_FIXED_COMPRESSION_6BPC: gbm_bo_flags = 896;
#[doc = " Fixed-rate compression: at least 7bpc, less than 8bpc"]
pub const gbm_bo_flags_GBM_BO_FIXED_COMPRESSION_7BPC: gbm_bo_flags = 1024;
#[doc = " Fixed-rate compression: at least 8bpc, less than 9bpc"]
pub const gbm_bo_flags_GBM_BO_FIXED_COMPRESSION_8BPC: gbm_bo_flags = 1152;
#[doc = " Fixed-rate compression: at least 9bpc, less than 10bpc"]
pub const gbm_bo_flags_GBM_BO_FIXED_COMPRESSION_9BPC: gbm_bo_flags = 1280;
#[doc = " Fixed-rate compression: at least 10bpc, less than 11bpc"]
pub const gbm_bo_flags_GBM_BO_FIXED_COMPRESSION_10BPC: gbm_bo_flags = 1408;
#[doc = " Fixed-rate compression: at least 11bpc, less than 12bpc"]
pub const gbm_bo_flags_GBM_BO_FIXED_COMPRESSION_11BPC: gbm_bo_flags = 1536;
#[doc = " Fixed-rate compression: at least 12bpc, no maximum rate"]
pub const gbm_bo_flags_GBM_BO_FIXED_COMPRESSION_12BPC: gbm_bo_flags = 1664;
#[doc = " Flags to indicate the intended use for the buffer - these are passed into\n gbm_bo_create(). The caller must set the union of all the flags that are\n appropriate\n\n \\sa Use gbm_device_is_format_supported() to check if the combination of format\n and use flags are supported"]
pub type gbm_bo_flags = ::core::ffi::c_uint;
unsafe extern "C" {
    pub fn gbm_device_get_fd(gbm: *mut gbm_device) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn gbm_device_get_backend_name(gbm: *mut gbm_device) -> *const ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn gbm_device_is_format_supported(
        gbm: *mut gbm_device,
        format: u32,
        flags: u32,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn gbm_device_get_format_modifier_plane_count(
        gbm: *mut gbm_device,
        format: u32,
        modifier: u64,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn gbm_device_destroy(gbm: *mut gbm_device);
}
unsafe extern "C" {
    pub fn gbm_create_device(fd: ::core::ffi::c_int) -> *mut gbm_device;
}
unsafe extern "C" {
    pub fn gbm_bo_create(
        gbm: *mut gbm_device,
        width: u32,
        height: u32,
        format: u32,
        flags: u32,
    ) -> *mut gbm_bo;
}
unsafe extern "C" {
    pub fn gbm_bo_create_with_modifiers(
        gbm: *mut gbm_device,
        width: u32,
        height: u32,
        format: u32,
        modifiers: *const u64,
        count: ::core::ffi::c_uint,
    ) -> *mut gbm_bo;
}
unsafe extern "C" {
    pub fn gbm_bo_create_with_modifiers2(
        gbm: *mut gbm_device,
        width: u32,
        height: u32,
        format: u32,
        modifiers: *const u64,
        count: ::core::ffi::c_uint,
        flags: u32,
    ) -> *mut gbm_bo;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gbm_import_fd_data {
    pub fd: ::core::ffi::c_int,
    pub width: u32,
    pub height: u32,
    pub stride: u32,
    pub format: u32,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of gbm_import_fd_data"][::core::mem::size_of::<gbm_import_fd_data>() - 20usize];
    ["Alignment of gbm_import_fd_data"][::core::mem::align_of::<gbm_import_fd_data>() - 4usize];
    ["Offset of field: gbm_import_fd_data::fd"]
        [::core::mem::offset_of!(gbm_import_fd_data, fd) - 0usize];
    ["Offset of field: gbm_import_fd_data::width"]
        [::core::mem::offset_of!(gbm_import_fd_data, width) - 4usize];
    ["Offset of field: gbm_import_fd_data::height"]
        [::core::mem::offset_of!(gbm_import_fd_data, height) - 8usize];
    ["Offset of field: gbm_import_fd_data::stride"]
        [::core::mem::offset_of!(gbm_import_fd_data, stride) - 12usize];
    ["Offset of field: gbm_import_fd_data::format"]
        [::core::mem::offset_of!(gbm_import_fd_data, format) - 16usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct gbm_import_fd_modifier_data {
    pub width: u32,
    pub height: u32,
    pub format: u32,
    pub num_fds: u32,
    pub fds: [::core::ffi::c_int; 4usize],
    pub strides: [::core::ffi::c_int; 4usize],
    pub offsets: [::core::ffi::c_int; 4usize],
    pub modifier: u64,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of gbm_import_fd_modifier_data"]
        [::core::mem::size_of::<gbm_import_fd_modifier_data>() - 72usize];
    ["Alignment of gbm_import_fd_modifier_data"]
        [::core::mem::align_of::<gbm_import_fd_modifier_data>() - 8usize];
    ["Offset of field: gbm_import_fd_modifier_data::width"]
        [::core::mem::offset_of!(gbm_import_fd_modifier_data, width) - 0usize];
    ["Offset of field: gbm_import_fd_modifier_data::height"]
        [::core::mem::offset_of!(gbm_import_fd_modifier_data, height) - 4usize];
    ["Offset of field: gbm_import_fd_modifier_data::format"]
        [::core::mem::offset_of!(gbm_import_fd_modifier_data, format) - 8usize];
    ["Offset of field: gbm_import_fd_modifier_data::num_fds"]
        [::core::mem::offset_of!(gbm_import_fd_modifier_data, num_fds) - 12usize];
    ["Offset of field: gbm_import_fd_modifier_data::fds"]
        [::core::mem::offset_of!(gbm_import_fd_modifier_data, fds) - 16usize];
    ["Offset of field: gbm_import_fd_modifier_data::strides"]
        [::core::mem::offset_of!(gbm_import_fd_modifier_data, strides) - 32usize];
    ["Offset of field: gbm_import_fd_modifier_data::offsets"]
        [::core::mem::offset_of!(gbm_import_fd_modifier_data, offsets) - 48usize];
    ["Offset of field: gbm_import_fd_modifier_data::modifier"]
        [::core::mem::offset_of!(gbm_import_fd_modifier_data, modifier) - 64usize];
};
unsafe extern "C" {
    pub fn gbm_bo_import(
        gbm: *mut gbm_device,
        type_: u32,
        buffer: *mut ::core::ffi::c_void,
        flags: u32,
    ) -> *mut gbm_bo;
}
#[doc = " Buffer contents read back (or accessed directly) at transfer\n create time."]
pub const gbm_bo_transfer_flags_GBM_BO_TRANSFER_READ: gbm_bo_transfer_flags = 1;
#[doc = " Buffer contents will be written back at unmap time\n (or modified as a result of being accessed directly)."]
pub const gbm_bo_transfer_flags_GBM_BO_TRANSFER_WRITE: gbm_bo_transfer_flags = 2;
#[doc = " Read/modify/write"]
pub const gbm_bo_transfer_flags_GBM_BO_TRANSFER_READ_WRITE: gbm_bo_transfer_flags = 3;
#[doc = " Flags to indicate the type of mapping for the buffer - these are\n passed into gbm_bo_map(). The caller must set the union of all the\n flags that are appropriate.\n\n These flags are independent of the GBM_BO_USE_* creation flags. However,\n mapping the buffer may require copying to/from a staging buffer.\n\n See also: pipe_map_flags"]
pub type gbm_bo_transfer_flags = ::core::ffi::c_uint;
unsafe extern "C" {
    pub fn gbm_bo_map(
        bo: *mut gbm_bo,
        x: u32,
        y: u32,
        width: u32,
        height: u32,
        flags: u32,
        stride: *mut u32,
        map_data: *mut *mut ::core::ffi::c_void,
    ) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn gbm_bo_unmap(bo: *mut gbm_bo, map_data: *mut ::core::ffi::c_void);
}
unsafe extern "C" {
    pub fn gbm_bo_get_width(bo: *mut gbm_bo) -> u32;
}
unsafe extern "C" {
    pub fn gbm_bo_get_height(bo: *mut gbm_bo) -> u32;
}
unsafe extern "C" {
    pub fn gbm_bo_get_stride(bo: *mut gbm_bo) -> u32;
}
unsafe extern "C" {
    pub fn gbm_bo_get_stride_for_plane(bo: *mut gbm_bo, plane: ::core::ffi::c_int) -> u32;
}
unsafe extern "C" {
    pub fn gbm_bo_get_format(bo: *mut gbm_bo) -> u32;
}
unsafe extern "C" {
    pub fn gbm_bo_get_bpp(bo: *mut gbm_bo) -> u32;
}
unsafe extern "C" {
    pub fn gbm_bo_get_offset(bo: *mut gbm_bo, plane: ::core::ffi::c_int) -> u32;
}
unsafe extern "C" {
    pub fn gbm_bo_get_device(bo: *mut gbm_bo) -> *mut gbm_device;
}
unsafe extern "C" {
    pub fn gbm_bo_get_handle(bo: *mut gbm_bo) -> gbm_bo_handle;
}
unsafe extern "C" {
    pub fn gbm_bo_get_fd(bo: *mut gbm_bo) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn gbm_bo_get_modifier(bo: *mut gbm_bo) -> u64;
}
unsafe extern "C" {
    pub fn gbm_bo_get_plane_count(bo: *mut gbm_bo) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn gbm_bo_get_handle_for_plane(bo: *mut gbm_bo, plane: ::core::ffi::c_int)
        -> gbm_bo_handle;
}
unsafe extern "C" {
    pub fn gbm_bo_get_fd_for_plane(
        bo: *mut gbm_bo,
        plane: ::core::ffi::c_int,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn gbm_bo_write(
        bo: *mut gbm_bo,
        buf: *const ::core::ffi::c_void,
        count: usize,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn gbm_bo_set_user_data(
        bo: *mut gbm_bo,
        data: *mut ::core::ffi::c_void,
        destroy_user_data: ::core::option::Option<
            unsafe extern "C" fn(arg1: *mut gbm_bo, arg2: *mut ::core::ffi::c_void),
        >,
    );
}
unsafe extern "C" {
    pub fn gbm_bo_get_user_data(bo: *mut gbm_bo) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn gbm_bo_destroy(bo: *mut gbm_bo);
}
unsafe extern "C" {
    pub fn gbm_surface_create(
        gbm: *mut gbm_device,
        width: u32,
        height: u32,
        format: u32,
        flags: u32,
    ) -> *mut gbm_surface;
}
unsafe extern "C" {
    pub fn gbm_surface_create_with_modifiers(
        gbm: *mut gbm_device,
        width: u32,
        height: u32,
        format: u32,
        modifiers: *const u64,
        count: ::core::ffi::c_uint,
    ) -> *mut gbm_surface;
}
unsafe extern "C" {
    pub fn gbm_surface_create_with_modifiers2(
        gbm: *mut gbm_device,
        width: u32,
        height: u32,
        format: u32,
        modifiers: *const u64,
        count: ::core::ffi::c_uint,
        flags: u32,
    ) -> *mut gbm_surface;
}
unsafe extern "C" {
    pub fn gbm_surface_lock_front_buffer(surface: *mut gbm_surface) -> *mut gbm_bo;
}
unsafe extern "C" {
    pub fn gbm_surface_release_buffer(surface: *mut gbm_surface, bo: *mut gbm_bo);
}
unsafe extern "C" {
    pub fn gbm_surface_has_free_buffers(surface: *mut gbm_surface) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn gbm_surface_destroy(surface: *mut gbm_surface);
}
unsafe extern "C" {
    pub fn gbm_format_get_name(
        gbm_format: u32,
        desc: *mut gbm_format_name_desc,
    ) -> *mut ::core::ffi::c_char;
}