1 module spasm.bindings.cssom;
2 
3 import spasm.types;
4 import spasm.bindings.dom;
5 
6 @safe:
7 nothrow:
8 
9 struct CSSGroupingRule {
10   nothrow:
11   spasm.bindings.cssom.CSSRule _parent;
12   alias _parent this;
13   this(Handle h) {
14     _parent = .CSSRule(h);
15   }
16   auto cssRules()() {
17     return CSSRuleList(CSSGroupingRule_cssRules_Get(this._parent));
18   }
19   auto insertRule()(string rule, uint index) {
20     return CSSGroupingRule_insertRule(this._parent, rule, index);
21   }
22   void deleteRule()(uint index) {
23     CSSGroupingRule_deleteRule(this._parent, index);
24   }
25 }
26 struct CSSImportRule {
27   nothrow:
28   spasm.bindings.cssom.CSSRule _parent;
29   alias _parent this;
30   this(Handle h) {
31     _parent = .CSSRule(h);
32   }
33   auto href()() {
34     return CSSImportRule_href_Get(this._parent);
35   }
36   auto media()() {
37     return MediaList(CSSImportRule_media_Get(this._parent));
38   }
39   auto styleSheet()() {
40     return CSSStyleSheet(CSSImportRule_styleSheet_Get(this._parent));
41   }
42 }
43 struct CSSMarginRule {
44   nothrow:
45   spasm.bindings.cssom.CSSRule _parent;
46   alias _parent this;
47   this(Handle h) {
48     _parent = .CSSRule(h);
49   }
50   auto name()() {
51     return CSSMarginRule_name_Get(this._parent);
52   }
53   auto style()() {
54     return CSSStyleDeclaration(CSSMarginRule_style_Get(this._parent));
55   }
56 }
57 struct CSSMediaRule {
58   nothrow:
59   spasm.bindings.cssom.CSSGroupingRule _parent;
60   alias _parent this;
61   this(Handle h) {
62     _parent = .CSSGroupingRule(h);
63   }
64   auto media()() {
65     return MediaList(CSSMediaRule_media_Get(this._parent));
66   }
67 }
68 struct CSSNamespaceRule {
69   nothrow:
70   spasm.bindings.cssom.CSSRule _parent;
71   alias _parent this;
72   this(Handle h) {
73     _parent = .CSSRule(h);
74   }
75   auto namespaceURI()() {
76     return CSSNamespaceRule_namespaceURI_Get(this._parent);
77   }
78   auto prefix()() {
79     return CSSNamespaceRule_prefix_Get(this._parent);
80   }
81 }
82 struct CSSPageRule {
83   nothrow:
84   spasm.bindings.cssom.CSSGroupingRule _parent;
85   alias _parent this;
86   this(Handle h) {
87     _parent = .CSSGroupingRule(h);
88   }
89   void selectorText()(string selectorText) {
90     CSSPageRule_selectorText_Set(this._parent, selectorText);
91   }
92   auto selectorText()() {
93     return CSSPageRule_selectorText_Get(this._parent);
94   }
95   auto style()() {
96     return CSSStyleDeclaration(CSSPageRule_style_Get(this._parent));
97   }
98 }
99 struct CSSRule {
100   nothrow:
101   JsHandle handle;
102   alias handle this;
103   this(Handle h) {
104     this.handle = JsHandle(h);
105   }
106   enum ushort STYLE_RULE = 1;
107   enum ushort CHARSET_RULE = 2;
108   enum ushort IMPORT_RULE = 3;
109   enum ushort MEDIA_RULE = 4;
110   enum ushort FONT_FACE_RULE = 5;
111   enum ushort PAGE_RULE = 6;
112   enum ushort MARGIN_RULE = 9;
113   enum ushort NAMESPACE_RULE = 10;
114   auto type()() {
115     return CSSRule_type_Get(this.handle);
116   }
117   void cssText()(string cssText) {
118     CSSRule_cssText_Set(this.handle, cssText);
119   }
120   auto cssText()() {
121     return CSSRule_cssText_Get(this.handle);
122   }
123   auto parentRule()() {
124     return CSSRule_parentRule_Get(this.handle);
125   }
126   auto parentStyleSheet()() {
127     return CSSRule_parentStyleSheet_Get(this.handle);
128   }
129 }
130 struct CSSRuleList {
131   nothrow:
132   JsHandle handle;
133   alias handle this;
134   this(Handle h) {
135     this.handle = JsHandle(h);
136   }
137   auto item()(uint index) {
138     return CSSRuleList_item_getter(this.handle, index);
139   }
140   auto length()() {
141     return CSSRuleList_length_Get(this.handle);
142   }
143 }
144 struct CSSStyleDeclaration {
145   nothrow:
146   JsHandle handle;
147   alias handle this;
148   this(Handle h) {
149     this.handle = JsHandle(h);
150   }
151   void cssText()(string cssText) {
152     CSSStyleDeclaration_cssText_Set(this.handle, cssText);
153   }
154   auto cssText()() {
155     return CSSStyleDeclaration_cssText_Get(this.handle);
156   }
157   auto length()() {
158     return CSSStyleDeclaration_length_Get(this.handle);
159   }
160   auto item()(uint index) {
161     return CSSStyleDeclaration_item_getter(this.handle, index);
162   }
163   void opIndexAssign()(string value, string property) {
164     CSSStyleDeclaration_setter__string_string(this.handle, property, value);
165   }
166   void opDispatch(string property)(string value) {
167     CSSStyleDeclaration_setter__string_string(this.handle, property, value);
168   }
169   auto getPropertyValue()(string property) {
170     return CSSStyleDeclaration_getPropertyValue(this.handle, property);
171   }
172   auto getPropertyPriority()(string property) {
173     return CSSStyleDeclaration_getPropertyPriority(this.handle, property);
174   }
175   void setProperty()(string property, string value, string priority /* = "" */) {
176     CSSStyleDeclaration_setProperty(this.handle, property, value, priority);
177   }
178   void setProperty()(string property, string value) {
179     CSSStyleDeclaration_setProperty_0(this.handle, property, value);
180   }
181   void setPropertyValue()(string property, string value) {
182     CSSStyleDeclaration_setPropertyValue(this.handle, property, value);
183   }
184   void setPropertyPriority()(string property, string priority) {
185     CSSStyleDeclaration_setPropertyPriority(this.handle, property, priority);
186   }
187   auto removeProperty()(string property) {
188     return CSSStyleDeclaration_removeProperty(this.handle, property);
189   }
190   auto parentRule()() {
191     return CSSStyleDeclaration_parentRule_Get(this.handle);
192   }
193   void cssFloat()(string cssFloat) {
194     CSSStyleDeclaration_cssFloat_Set(this.handle, cssFloat);
195   }
196   auto cssFloat()() {
197     return CSSStyleDeclaration_cssFloat_Get(this.handle);
198   }
199   void _camel_cased_attribute()(string _camel_cased_attribute) {
200     CSSStyleDeclaration__camel_cased_attribute_Set(this.handle, _camel_cased_attribute);
201   }
202   auto _camel_cased_attribute()() {
203     return CSSStyleDeclaration__camel_cased_attribute_Get(this.handle);
204   }
205   void _webkit_cased_attribute()(string _webkit_cased_attribute) {
206     CSSStyleDeclaration__webkit_cased_attribute_Set(this.handle, _webkit_cased_attribute);
207   }
208   auto _webkit_cased_attribute()() {
209     return CSSStyleDeclaration__webkit_cased_attribute_Get(this.handle);
210   }
211   void _dashed_attribute()(string _dashed_attribute) {
212     CSSStyleDeclaration__dashed_attribute_Set(this.handle, _dashed_attribute);
213   }
214   auto _dashed_attribute()() {
215     return CSSStyleDeclaration__dashed_attribute_Get(this.handle);
216   }
217 }
218 struct CSSStyleRule {
219   nothrow:
220   spasm.bindings.cssom.CSSRule _parent;
221   alias _parent this;
222   this(Handle h) {
223     _parent = .CSSRule(h);
224   }
225   void selectorText()(string selectorText) {
226     CSSStyleRule_selectorText_Set(this._parent, selectorText);
227   }
228   auto selectorText()() {
229     return CSSStyleRule_selectorText_Get(this._parent);
230   }
231   auto style()() {
232     return CSSStyleDeclaration(CSSStyleRule_style_Get(this._parent));
233   }
234 }
235 struct CSSStyleSheet {
236   nothrow:
237   spasm.bindings.cssom.StyleSheet _parent;
238   alias _parent this;
239   this(Handle h) {
240     _parent = .StyleSheet(h);
241   }
242   auto ownerRule()() {
243     return CSSStyleSheet_ownerRule_Get(this._parent);
244   }
245   auto cssRules()() {
246     return CSSRuleList(CSSStyleSheet_cssRules_Get(this._parent));
247   }
248   auto insertRule()(string rule, uint index) {
249     return CSSStyleSheet_insertRule(this._parent, rule, index);
250   }
251   void deleteRule()(uint index) {
252     CSSStyleSheet_deleteRule(this._parent, index);
253   }
254 }
255 struct LinkStyle {
256   nothrow:
257   JsHandle handle;
258   alias handle this;
259   this(Handle h) {
260     this.handle = JsHandle(h);
261   }
262   auto sheet()() {
263     return LinkStyle_sheet_Get(this.handle);
264   }
265 }
266 struct MediaList {
267   nothrow:
268   JsHandle handle;
269   alias handle this;
270   this(Handle h) {
271     this.handle = JsHandle(h);
272   }
273   void mediaText()(string mediaText) {
274     MediaList_mediaText_Set(this.handle, mediaText);
275   }
276   auto mediaText()() {
277     return MediaList_mediaText_Get(this.handle);
278   }
279   auto length()() {
280     return MediaList_length_Get(this.handle);
281   }
282   auto item()(uint index) {
283     return MediaList_item_getter(this.handle, index);
284   }
285   void appendMedium()(string medium) {
286     MediaList_appendMedium(this.handle, medium);
287   }
288   void deleteMedium()(string medium) {
289     MediaList_deleteMedium(this.handle, medium);
290   }
291 }
292 struct StyleSheet {
293   nothrow:
294   JsHandle handle;
295   alias handle this;
296   this(Handle h) {
297     this.handle = JsHandle(h);
298   }
299   auto type()() {
300     return StyleSheet_type_Get(this.handle);
301   }
302   auto href()() {
303     return StyleSheet_href_Get(this.handle);
304   }
305   auto ownerNode()() {
306     return StyleSheet_ownerNode_Get(this.handle);
307   }
308   auto parentStyleSheet()() {
309     return StyleSheet_parentStyleSheet_Get(this.handle);
310   }
311   auto title()() {
312     return StyleSheet_title_Get(this.handle);
313   }
314   auto media()() {
315     return MediaList(StyleSheet_media_Get(this.handle));
316   }
317   void disabled()(bool disabled) {
318     StyleSheet_disabled_Set(this.handle, disabled);
319   }
320   auto disabled()() {
321     return StyleSheet_disabled_Get(this.handle);
322   }
323 }
324 struct StyleSheetList {
325   nothrow:
326   JsHandle handle;
327   alias handle this;
328   this(Handle h) {
329     this.handle = JsHandle(h);
330   }
331   auto item()(uint index) {
332     return StyleSheetList_item_getter(this.handle, index);
333   }
334   auto length()() {
335     return StyleSheetList_length_Get(this.handle);
336   }
337 }
338 
339 
340 extern (C) Handle CSSGroupingRule_cssRules_Get(Handle);
341 extern (C) uint CSSGroupingRule_insertRule(Handle, string, uint);
342 extern (C) void CSSGroupingRule_deleteRule(Handle, uint);
343 extern (C) string CSSImportRule_href_Get(Handle);
344 extern (C) Handle CSSImportRule_media_Get(Handle);
345 extern (C) Handle CSSImportRule_styleSheet_Get(Handle);
346 extern (C) string CSSMarginRule_name_Get(Handle);
347 extern (C) Handle CSSMarginRule_style_Get(Handle);
348 extern (C) Handle CSSMediaRule_media_Get(Handle);
349 extern (C) string CSSNamespaceRule_namespaceURI_Get(Handle);
350 extern (C) string CSSNamespaceRule_prefix_Get(Handle);
351 extern (C) void CSSPageRule_selectorText_Set(Handle, string);
352 extern (C) string CSSPageRule_selectorText_Get(Handle);
353 extern (C) Handle CSSPageRule_style_Get(Handle);
354 extern (C) ushort CSSRule_type_Get(Handle);
355 extern (C) void CSSRule_cssText_Set(Handle, string);
356 extern (C) string CSSRule_cssText_Get(Handle);
357 extern (C) Optional!(CSSRule) CSSRule_parentRule_Get(Handle);
358 extern (C) Optional!(CSSStyleSheet) CSSRule_parentStyleSheet_Get(Handle);
359 extern (C) Optional!(CSSRule) CSSRuleList_item_getter(Handle, uint);
360 extern (C) uint CSSRuleList_length_Get(Handle);
361 extern (C) void CSSStyleDeclaration_cssText_Set(Handle, string);
362 extern (C) string CSSStyleDeclaration_cssText_Get(Handle);
363 extern (C) uint CSSStyleDeclaration_length_Get(Handle);
364 extern (C) string CSSStyleDeclaration_item_getter(Handle, uint);
365 extern (C) void CSSStyleDeclaration_setter__string_string(Handle, string, string);
366 extern (C) string CSSStyleDeclaration_getPropertyValue(Handle, string);
367 extern (C) string CSSStyleDeclaration_getPropertyPriority(Handle, string);
368 extern (C) void CSSStyleDeclaration_setProperty(Handle, string, string, string);
369 extern (C) void CSSStyleDeclaration_setProperty_0(Handle, string, string);
370 extern (C) void CSSStyleDeclaration_setPropertyValue(Handle, string, string);
371 extern (C) void CSSStyleDeclaration_setPropertyPriority(Handle, string, string);
372 extern (C) string CSSStyleDeclaration_removeProperty(Handle, string);
373 extern (C) Optional!(CSSRule) CSSStyleDeclaration_parentRule_Get(Handle);
374 extern (C) void CSSStyleDeclaration_cssFloat_Set(Handle, string);
375 extern (C) string CSSStyleDeclaration_cssFloat_Get(Handle);
376 extern (C) void CSSStyleDeclaration__camel_cased_attribute_Set(Handle, string);
377 extern (C) string CSSStyleDeclaration__camel_cased_attribute_Get(Handle);
378 extern (C) void CSSStyleDeclaration__webkit_cased_attribute_Set(Handle, string);
379 extern (C) string CSSStyleDeclaration__webkit_cased_attribute_Get(Handle);
380 extern (C) void CSSStyleDeclaration__dashed_attribute_Set(Handle, string);
381 extern (C) string CSSStyleDeclaration__dashed_attribute_Get(Handle);
382 extern (C) void CSSStyleRule_selectorText_Set(Handle, string);
383 extern (C) string CSSStyleRule_selectorText_Get(Handle);
384 extern (C) Handle CSSStyleRule_style_Get(Handle);
385 extern (C) Optional!(CSSRule) CSSStyleSheet_ownerRule_Get(Handle);
386 extern (C) Handle CSSStyleSheet_cssRules_Get(Handle);
387 extern (C) uint CSSStyleSheet_insertRule(Handle, string, uint);
388 extern (C) void CSSStyleSheet_deleteRule(Handle, uint);
389 extern (C) Handle ElementCSSInlineStyle_style_Get(Handle);
390 extern (C) Optional!(StyleSheet) LinkStyle_sheet_Get(Handle);
391 extern (C) void MediaList_mediaText_Set(Handle, string);
392 extern (C) string MediaList_mediaText_Get(Handle);
393 extern (C) uint MediaList_length_Get(Handle);
394 extern (C) Optional!(string) MediaList_item_getter(Handle, uint);
395 extern (C) void MediaList_appendMedium(Handle, string);
396 extern (C) void MediaList_deleteMedium(Handle, string);
397 extern (C) string StyleSheet_type_Get(Handle);
398 extern (C) Optional!(string) StyleSheet_href_Get(Handle);
399 extern (C) Optional!(SumType!(Element, ProcessingInstruction)) StyleSheet_ownerNode_Get(Handle);
400 extern (C) Optional!(StyleSheet) StyleSheet_parentStyleSheet_Get(Handle);
401 extern (C) Optional!(string) StyleSheet_title_Get(Handle);
402 extern (C) Handle StyleSheet_media_Get(Handle);
403 extern (C) void StyleSheet_disabled_Set(Handle, bool);
404 extern (C) bool StyleSheet_disabled_Get(Handle);
405 extern (C) Optional!(StyleSheet) StyleSheetList_item_getter(Handle, uint);
406 extern (C) uint StyleSheetList_length_Get(Handle);