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
#if 0
''' '
#endif
// FIXME: Mis-generated in C mode with enum.prefix_with_name = false, and in
// C++ mode with it set to true...
#if defined(__cplusplus) && !defined(CBINDGEN_CPP_COMPAT)
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#define AXIS_SHIFT 3
#define SELF_WM_SHIFT 6
#define SELF_WM (1 << 6)
/**
* Specifies which tracks(s) on the axis that the position-area span occupies.
* Represented as 3 bits: start, center, end track.
*/
enum PositionAreaTrack {
/**
* First track
*/
Start = 1,
/**
* First and center.
*/
SpanStart = 3,
/**
* Last track.
*/
End = 4,
/**
* Last and center.
*/
SpanEnd = 6,
/**
* Center track.
*/
Center = 2,
/**
* All tracks
*/
SpanAll = 7,
};
typedef uint8_t PositionAreaTrack;
/**
* A three-bit value that represents the axis in which position-area operates on.
* Represented as 3 bits: axis type (physical or logical), direction type (physical or logical),
* axis value.
*/
enum PositionAreaAxis {
Horizontal = 0,
Vertical = 1,
X = 2,
Y = 3,
Inline = 6,
Block = 7,
};
typedef uint8_t PositionAreaAxis;
/**
* Possible values for the `position-area` property's keywords.
* Represented by [0z xxx yyy], where z means "self wm resolution", xxx is the type (as in
* PositionAreaAxis and yyy is the PositionAreaTrack
* https://drafts.csswg.org/css-anchor-position-1/#propdef-position-area
*/
enum PositionAreaKeyword {
None = 0,
Center = (uint8_t)PositionAreaTrack_Center,
SpanAll = (uint8_t)PositionAreaTrack_SpanAll,
Start = (uint8_t)PositionAreaTrack_Start,
End = (uint8_t)PositionAreaTrack_End,
SpanStart = (uint8_t)PositionAreaTrack_SpanStart,
SpanEnd = (uint8_t)PositionAreaTrack_SpanEnd,
Top = (((uint8_t)PositionAreaAxis_Vertical << AXIS_SHIFT) | (uint8_t)PositionAreaTrack_Start),
Bottom = (((uint8_t)PositionAreaAxis_Vertical << AXIS_SHIFT) | (uint8_t)PositionAreaTrack_End),
};
typedef uint8_t PositionAreaKeyword;
void root(PositionAreaKeyword, PositionAreaTrack, PositionAreaAxis);
#endif
#if 0
' '''
#endif