1 module libwasm.bindings.Grid;
2 
3 import libwasm.types;
4 
5 import memutils.ct: tuple;
6 @safe:
7 nothrow:
8 
9 struct Grid {
10   nothrow:
11   JsHandle handle;
12   alias handle this;
13   this(Handle h) {
14     this.handle = JsHandle(h);
15   }
16   auto rows()() {
17     return GridDimension(Object_Getter__Handle(this.handle, "rows"));
18   }
19   auto cols()() {
20     return GridDimension(Object_Getter__Handle(this.handle, "cols"));
21   }
22   auto areas()() {
23     return Sequence!(GridArea)(Object_Getter__Handle(this.handle, "areas"));
24   }
25 }
26 struct GridArea {
27   nothrow:
28   JsHandle handle;
29   alias handle this;
30   this(Handle h) {
31     this.handle = JsHandle(h);
32   }
33   string name()() {
34     return Object_Getter__string(this.handle, "name");
35   }
36   GridDeclaration type()() {
37     return Object_Getter__int(this.handle, "type");
38   }
39   uint rowStart()() {
40     return Object_Getter__uint(this.handle, "rowStart");
41   }
42   uint rowEnd()() {
43     return Object_Getter__uint(this.handle, "rowEnd");
44   }
45   uint columnStart()() {
46     return Object_Getter__uint(this.handle, "columnStart");
47   }
48   uint columnEnd()() {
49     return Object_Getter__uint(this.handle, "columnEnd");
50   }
51 }
52 enum GridDeclaration {
53   explicit,
54   implicit
55 }
56 struct GridDimension {
57   nothrow:
58   JsHandle handle;
59   alias handle this;
60   this(Handle h) {
61     this.handle = JsHandle(h);
62   }
63   auto lines()() {
64     return GridLines(Object_Getter__Handle(this.handle, "lines"));
65   }
66   auto tracks()() {
67     return GridTracks(Object_Getter__Handle(this.handle, "tracks"));
68   }
69 }
70 struct GridLine {
71   nothrow:
72   JsHandle handle;
73   alias handle this;
74   this(Handle h) {
75     this.handle = JsHandle(h);
76   }
77   auto names()() {
78     return Sequence!(string)(Object_Getter__Handle(this.handle, "names"));
79   }
80   double start()() {
81     return Object_Getter__double(this.handle, "start");
82   }
83   double breadth()() {
84     return Object_Getter__double(this.handle, "breadth");
85   }
86   GridDeclaration type()() {
87     return Object_Getter__int(this.handle, "type");
88   }
89   uint number()() {
90     return Object_Getter__uint(this.handle, "number");
91   }
92   int negativeNumber()() {
93     return Object_Getter__int(this.handle, "negativeNumber");
94   }
95 }
96 struct GridLines {
97   nothrow:
98   JsHandle handle;
99   alias handle this;
100   this(Handle h) {
101     this.handle = JsHandle(h);
102   }
103   uint length()() {
104     return Object_Getter__uint(this.handle, "length");
105   }
106   auto item()(uint index) {
107     return recastOpt!(GridLine)(Object_Call_uint__OptionalHandle(this.handle, "item", index));
108   }
109 }
110 struct GridTrack {
111   nothrow:
112   JsHandle handle;
113   alias handle this;
114   this(Handle h) {
115     this.handle = JsHandle(h);
116   }
117   double start()() {
118     return Object_Getter__double(this.handle, "start");
119   }
120   double breadth()() {
121     return Object_Getter__double(this.handle, "breadth");
122   }
123   GridDeclaration type()() {
124     return Object_Getter__int(this.handle, "type");
125   }
126   GridTrackState state()() {
127     return Object_Getter__int(this.handle, "state");
128   }
129 }
130 enum GridTrackState {
131   static_,
132   repeat,
133   removed
134 }
135 struct GridTracks {
136   nothrow:
137   JsHandle handle;
138   alias handle this;
139   this(Handle h) {
140     this.handle = JsHandle(h);
141   }
142   uint length()() {
143     return Object_Getter__uint(this.handle, "length");
144   }
145   auto item()(uint index) {
146     return recastOpt!(GridTrack)(Object_Call_uint__OptionalHandle(this.handle, "item", index));
147   }
148 }
149 
150