Debian Codegraph @

.cargo/vendor/cbindgen/tests/expectations/bitflags.pyx

raw
1 from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, intptr_t
2 from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t
3 cdef extern from *:
4 ctypedef bint bool
5 ctypedef struct va_list
6
7 cdef extern from *:
8
9 # Constants shared by multiple CSS Box Alignment properties
10 #
11 # These constants match Gecko's `NS_STYLE_ALIGN_*` constants.
12 ctypedef struct AlignFlags:
13 uint8_t bits;
14 # 'auto'
15 const AlignFlags AlignFlags_AUTO # = <AlignFlags>{ <uint8_t>0 }
16 # 'normal'
17 const AlignFlags AlignFlags_NORMAL # = <AlignFlags>{ <uint8_t>1 }
18 # 'start'
19 const AlignFlags AlignFlags_START # = <AlignFlags>{ <uint8_t>(1 << 1) }
20 # 'end'
21 const AlignFlags AlignFlags_END # = <AlignFlags>{ <uint8_t>(1 << 2) }
22 const AlignFlags AlignFlags_ALIAS # = <AlignFlags>{ <uint8_t>(AlignFlags_END).bits }
23 # 'flex-start'
24 const AlignFlags AlignFlags_FLEX_START # = <AlignFlags>{ <uint8_t>(1 << 3) }
25 const AlignFlags AlignFlags_MIXED # = <AlignFlags>{ <uint8_t>(((1 << 4) | (AlignFlags_FLEX_START).bits) | (AlignFlags_END).bits) }
26 const AlignFlags AlignFlags_MIXED_SELF # = <AlignFlags>{ <uint8_t>(((1 << 5) | (AlignFlags_FLEX_START).bits) | (AlignFlags_END).bits) }
27
28 ctypedef struct DebugFlags:
29 uint32_t bits;
30 # Flag with the topmost bit set of the u32
31 const DebugFlags DebugFlags_BIGGEST_ALLOWED # = <DebugFlags>{ <uint32_t>(1 << 31) }
32
33 ctypedef struct LargeFlags:
34 uint64_t bits;
35 # Flag with a very large shift that usually would be narrowed.
36 const LargeFlags LargeFlags_LARGE_SHIFT # = <LargeFlags>{ <uint64_t>(1ull << 44) }
37 const LargeFlags LargeFlags_INVERTED # = <LargeFlags>{ <uint64_t>~(LargeFlags_LARGE_SHIFT).bits }
38
39 void root(AlignFlags flags, DebugFlags bigger_flags, LargeFlags largest_flags);