0 | module Web.Raw.Css
  1 |
  2 | import JS
  3 | import Web.Internal.CssPrim
  4 | import Web.Internal.Types
  5 |
  6 | %default total
  7 |
  8 |
  9 | --------------------------------------------------------------------------------
 10 | --          Interfaces
 11 | --------------------------------------------------------------------------------
 12 |
 13 | namespace CSSGroupingRule
 14 |
 15 |   export
 16 |   cssRules :
 17 |        {auto 0 _ : JSType t1}
 18 |     -> {auto 0 _ : Elem CSSGroupingRule (Types t1)}
 19 |     -> (obj : t1)
 20 |     -> JSIO CSSRuleList
 21 |   cssRules a = primJS $ CSSGroupingRule.prim__cssRules (up a)
 22 |
 23 |
 24 |   export
 25 |   deleteRule :
 26 |        {auto 0 _ : JSType t1}
 27 |     -> {auto 0 _ : Elem CSSGroupingRule (Types t1)}
 28 |     -> (obj : t1)
 29 |     -> (index : Bits32)
 30 |     -> JSIO ()
 31 |   deleteRule a b = primJS $ CSSGroupingRule.prim__deleteRule (up a) b
 32 |
 33 |
 34 |   export
 35 |   insertRule' :
 36 |        {auto 0 _ : JSType t1}
 37 |     -> {auto 0 _ : Elem CSSGroupingRule (Types t1)}
 38 |     -> (obj : t1)
 39 |     -> (rule : String)
 40 |     -> (index : Optional Bits32)
 41 |     -> JSIO Bits32
 42 |   insertRule' a b c = primJS $
 43 |     CSSGroupingRule.prim__insertRule (up a) b (toFFI c)
 44 |
 45 |   export
 46 |   insertRule :
 47 |        {auto 0 _ : JSType t1}
 48 |     -> {auto 0 _ : Elem CSSGroupingRule (Types t1)}
 49 |     -> (obj : t1)
 50 |     -> (rule : String)
 51 |     -> JSIO Bits32
 52 |   insertRule a b = primJS $ CSSGroupingRule.prim__insertRule (up a) b undef
 53 |
 54 |
 55 |
 56 | namespace CSSImportRule
 57 |
 58 |   export
 59 |   href : (obj : CSSImportRule) -> JSIO String
 60 |   href a = primJS $ CSSImportRule.prim__href a
 61 |
 62 |
 63 |   export
 64 |   media : (obj : CSSImportRule) -> JSIO MediaList
 65 |   media a = primJS $ CSSImportRule.prim__media a
 66 |
 67 |
 68 |   export
 69 |   styleSheet : (obj : CSSImportRule) -> JSIO CSSStyleSheet
 70 |   styleSheet a = primJS $ CSSImportRule.prim__styleSheet a
 71 |
 72 |
 73 |
 74 | namespace CSSMarginRule
 75 |
 76 |   export
 77 |   name : (obj : CSSMarginRule) -> JSIO String
 78 |   name a = primJS $ CSSMarginRule.prim__name a
 79 |
 80 |
 81 |   export
 82 |   style : (obj : CSSMarginRule) -> JSIO CSSStyleDeclaration
 83 |   style a = primJS $ CSSMarginRule.prim__style a
 84 |
 85 |
 86 |
 87 | namespace CSSNamespaceRule
 88 |
 89 |   export
 90 |   namespaceURI : (obj : CSSNamespaceRule) -> JSIO String
 91 |   namespaceURI a = primJS $ CSSNamespaceRule.prim__namespaceURI a
 92 |
 93 |
 94 |   export
 95 |   prefix_ : (obj : CSSNamespaceRule) -> JSIO String
 96 |   prefix_ a = primJS $ CSSNamespaceRule.prim__prefix a
 97 |
 98 |
 99 |
100 | namespace CSSPageRule
101 |
102 |   export
103 |   selectorText : CSSPageRule -> Attribute True Prelude.id String
104 |   selectorText v = fromPrim
105 |                      "CSSPageRule.getselectorText"
106 |                      prim__selectorText
107 |                      prim__setSelectorText
108 |                      v
109 |
110 |
111 |   export
112 |   style : (obj : CSSPageRule) -> JSIO CSSStyleDeclaration
113 |   style a = primJS $ CSSPageRule.prim__style a
114 |
115 |
116 |
117 | namespace CSSPseudoElement
118 |
119 |   export
120 |   element : (obj : CSSPseudoElement) -> JSIO Element
121 |   element a = primJS $ CSSPseudoElement.prim__element a
122 |
123 |
124 |   export
125 |   type : (obj : CSSPseudoElement) -> JSIO String
126 |   type a = primJS $ CSSPseudoElement.prim__type a
127 |
128 |
129 |
130 | namespace CSSRule
131 |
132 |   public export
133 |   CHARSET_RULE : Bits16
134 |   CHARSET_RULE = 2
135 |
136 |
137 |   public export
138 |   FONT_FACE_RULE : Bits16
139 |   FONT_FACE_RULE = 5
140 |
141 |
142 |   public export
143 |   IMPORT_RULE : Bits16
144 |   IMPORT_RULE = 3
145 |
146 |
147 |   public export
148 |   MARGIN_RULE : Bits16
149 |   MARGIN_RULE = 9
150 |
151 |
152 |   public export
153 |   MEDIA_RULE : Bits16
154 |   MEDIA_RULE = 4
155 |
156 |
157 |   public export
158 |   NAMESPACE_RULE : Bits16
159 |   NAMESPACE_RULE = 10
160 |
161 |
162 |   public export
163 |   PAGE_RULE : Bits16
164 |   PAGE_RULE = 6
165 |
166 |
167 |   public export
168 |   STYLE_RULE : Bits16
169 |   STYLE_RULE = 1
170 |
171 |
172 |   export
173 |   cssText :
174 |        {auto 0 _ : JSType t}
175 |     -> {auto 0 _ : Elem CSSRule (Types t)}
176 |     -> t
177 |     -> Attribute True Prelude.id String
178 |   cssText v = fromPrim
179 |                 "CSSRule.getcssText"
180 |                 prim__cssText
181 |                 prim__setCssText
182 |                 (v :> CSSRule)
183 |
184 |
185 |   export
186 |   parentRule :
187 |        {auto 0 _ : JSType t1}
188 |     -> {auto 0 _ : Elem CSSRule (Types t1)}
189 |     -> (obj : t1)
190 |     -> JSIO (Maybe CSSRule)
191 |   parentRule a = tryJS "CSSRule.parentRule" $ CSSRule.prim__parentRule (up a)
192 |
193 |
194 |   export
195 |   parentStyleSheet :
196 |        {auto 0 _ : JSType t1}
197 |     -> {auto 0 _ : Elem CSSRule (Types t1)}
198 |     -> (obj : t1)
199 |     -> JSIO (Maybe CSSStyleSheet)
200 |   parentStyleSheet a = tryJS "CSSRule.parentStyleSheet" $
201 |     CSSRule.prim__parentStyleSheet (up a)
202 |
203 |
204 |   export
205 |   type :
206 |        {auto 0 _ : JSType t1}
207 |     -> {auto 0 _ : Elem CSSRule (Types t1)}
208 |     -> (obj : t1)
209 |     -> JSIO Bits16
210 |   type a = primJS $ CSSRule.prim__type (up a)
211 |
212 |
213 |
214 | namespace CSSRuleList
215 |
216 |   export
217 |   length : (obj : CSSRuleList) -> JSIO Bits32
218 |   length a = primJS $ CSSRuleList.prim__length a
219 |
220 |
221 |   export
222 |   item : (obj : CSSRuleList) -> (index : Bits32) -> JSIO (Maybe CSSRule)
223 |   item a b = tryJS "CSSRuleList.item" $ CSSRuleList.prim__item a b
224 |
225 |
226 |
227 | namespace CSSStyleDeclaration
228 |
229 |   export
230 |   cssFloat : CSSStyleDeclaration -> Attribute True Prelude.id String
231 |   cssFloat v = fromPrim
232 |                  "CSSStyleDeclaration.getcssFloat"
233 |                  prim__cssFloat
234 |                  prim__setCssFloat
235 |                  v
236 |
237 |
238 |   export
239 |   cssText : CSSStyleDeclaration -> Attribute True Prelude.id String
240 |   cssText v = fromPrim
241 |                 "CSSStyleDeclaration.getcssText"
242 |                 prim__cssText
243 |                 prim__setCssText
244 |                 v
245 |
246 |
247 |   export
248 |   length : (obj : CSSStyleDeclaration) -> JSIO Bits32
249 |   length a = primJS $ CSSStyleDeclaration.prim__length a
250 |
251 |
252 |   export
253 |   parentRule : (obj : CSSStyleDeclaration) -> JSIO (Maybe CSSRule)
254 |   parentRule a = tryJS "CSSStyleDeclaration.parentRule" $
255 |     CSSStyleDeclaration.prim__parentRule a
256 |
257 |
258 |   export
259 |   getPropertyPriority :
260 |        (obj : CSSStyleDeclaration)
261 |     -> (property : String)
262 |     -> JSIO String
263 |   getPropertyPriority a b = primJS $
264 |     CSSStyleDeclaration.prim__getPropertyPriority a b
265 |
266 |
267 |   export
268 |   getPropertyValue :
269 |        (obj : CSSStyleDeclaration)
270 |     -> (property : String)
271 |     -> JSIO String
272 |   getPropertyValue a b = primJS $ CSSStyleDeclaration.prim__getPropertyValue a b
273 |
274 |
275 |   export
276 |   item : (obj : CSSStyleDeclaration) -> (index : Bits32) -> JSIO String
277 |   item a b = primJS $ CSSStyleDeclaration.prim__item a b
278 |
279 |
280 |   export
281 |   removeProperty :
282 |        (obj : CSSStyleDeclaration)
283 |     -> (property : String)
284 |     -> JSIO String
285 |   removeProperty a b = primJS $ CSSStyleDeclaration.prim__removeProperty a b
286 |
287 |
288 |   export
289 |   setProperty' :
290 |        (obj : CSSStyleDeclaration)
291 |     -> (property : String)
292 |     -> (value : String)
293 |     -> (priority : Optional String)
294 |     -> JSIO ()
295 |   setProperty' a b c d = primJS $
296 |     CSSStyleDeclaration.prim__setProperty a b c (toFFI d)
297 |
298 |   export
299 |   setProperty :
300 |        (obj : CSSStyleDeclaration)
301 |     -> (property : String)
302 |     -> (value : String)
303 |     -> JSIO ()
304 |   setProperty a b c = primJS $ CSSStyleDeclaration.prim__setProperty a b c undef
305 |
306 |
307 |
308 | namespace CSSStyleRule
309 |
310 |   export
311 |   selectorText : CSSStyleRule -> Attribute True Prelude.id String
312 |   selectorText v = fromPrim
313 |                      "CSSStyleRule.getselectorText"
314 |                      prim__selectorText
315 |                      prim__setSelectorText
316 |                      v
317 |
318 |
319 |   export
320 |   style : (obj : CSSStyleRule) -> JSIO CSSStyleDeclaration
321 |   style a = primJS $ CSSStyleRule.prim__style a
322 |
323 |
324 |
325 | namespace CSSStyleSheet
326 |
327 |   export
328 |   cssRules : (obj : CSSStyleSheet) -> JSIO CSSRuleList
329 |   cssRules a = primJS $ CSSStyleSheet.prim__cssRules a
330 |
331 |
332 |   export
333 |   ownerRule : (obj : CSSStyleSheet) -> JSIO (Maybe CSSRule)
334 |   ownerRule a = tryJS "CSSStyleSheet.ownerRule" $
335 |     CSSStyleSheet.prim__ownerRule a
336 |
337 |
338 |   export
339 |   rules : (obj : CSSStyleSheet) -> JSIO CSSRuleList
340 |   rules a = primJS $ CSSStyleSheet.prim__rules a
341 |
342 |
343 |   export
344 |   addRule' :
345 |        (obj : CSSStyleSheet)
346 |     -> (selector : Optional String)
347 |     -> (style : Optional String)
348 |     -> (index : Optional Bits32)
349 |     -> JSIO Int32
350 |   addRule' a b c d = primJS $
351 |     CSSStyleSheet.prim__addRule a (toFFI b) (toFFI c) (toFFI d)
352 |
353 |   export
354 |   addRule : (obj : CSSStyleSheet) -> JSIO Int32
355 |   addRule a = primJS $ CSSStyleSheet.prim__addRule a undef undef undef
356 |
357 |
358 |   export
359 |   deleteRule : (obj : CSSStyleSheet) -> (index : Bits32) -> JSIO ()
360 |   deleteRule a b = primJS $ CSSStyleSheet.prim__deleteRule a b
361 |
362 |
363 |   export
364 |   insertRule' :
365 |        (obj : CSSStyleSheet)
366 |     -> (rule : String)
367 |     -> (index : Optional Bits32)
368 |     -> JSIO Bits32
369 |   insertRule' a b c = primJS $ CSSStyleSheet.prim__insertRule a b (toFFI c)
370 |
371 |   export
372 |   insertRule : (obj : CSSStyleSheet) -> (rule : String) -> JSIO Bits32
373 |   insertRule a b = primJS $ CSSStyleSheet.prim__insertRule a b undef
374 |
375 |
376 |   export
377 |   removeRule' : (obj : CSSStyleSheet) -> (index : Optional Bits32) -> JSIO ()
378 |   removeRule' a b = primJS $ CSSStyleSheet.prim__removeRule a (toFFI b)
379 |
380 |   export
381 |   removeRule : (obj : CSSStyleSheet) -> JSIO ()
382 |   removeRule a = primJS $ CSSStyleSheet.prim__removeRule a undef
383 |
384 |
385 |
386 | namespace MediaList
387 |
388 |   export
389 |   length : (obj : MediaList) -> JSIO Bits32
390 |   length a = primJS $ MediaList.prim__length a
391 |
392 |
393 |   export
394 |   mediaText : MediaList -> Attribute True Prelude.id String
395 |   mediaText v = fromPrim
396 |                   "MediaList.getmediaText"
397 |                   prim__mediaText
398 |                   prim__setMediaText
399 |                   v
400 |
401 |
402 |   export
403 |   appendMedium : (obj : MediaList) -> (medium : String) -> JSIO ()
404 |   appendMedium a b = primJS $ MediaList.prim__appendMedium a b
405 |
406 |
407 |   export
408 |   deleteMedium : (obj : MediaList) -> (medium : String) -> JSIO ()
409 |   deleteMedium a b = primJS $ MediaList.prim__deleteMedium a b
410 |
411 |
412 |   export
413 |   item : (obj : MediaList) -> (index : Bits32) -> JSIO (Maybe String)
414 |   item a b = tryJS "MediaList.item" $ MediaList.prim__item a b
415 |
416 |
417 |
418 | namespace StyleSheet
419 |
420 |   export
421 |   disabled :
422 |        {auto 0 _ : JSType t}
423 |     -> {auto 0 _ : Elem StyleSheet (Types t)}
424 |     -> t
425 |     -> Attribute True Prelude.id Bool
426 |   disabled v = fromPrim
427 |                  "StyleSheet.getdisabled"
428 |                  prim__disabled
429 |                  prim__setDisabled
430 |                  (v :> StyleSheet)
431 |
432 |
433 |   export
434 |   href :
435 |        {auto 0 _ : JSType t1}
436 |     -> {auto 0 _ : Elem StyleSheet (Types t1)}
437 |     -> (obj : t1)
438 |     -> JSIO (Maybe String)
439 |   href a = tryJS "StyleSheet.href" $ StyleSheet.prim__href (up a)
440 |
441 |
442 |   export
443 |   media :
444 |        {auto 0 _ : JSType t1}
445 |     -> {auto 0 _ : Elem StyleSheet (Types t1)}
446 |     -> (obj : t1)
447 |     -> JSIO MediaList
448 |   media a = primJS $ StyleSheet.prim__media (up a)
449 |
450 |
451 |   export
452 |   ownerNode :
453 |        {auto 0 _ : JSType t1}
454 |     -> {auto 0 _ : Elem StyleSheet (Types t1)}
455 |     -> (obj : t1)
456 |     -> JSIO (Maybe (HSum [Element, ProcessingInstruction]))
457 |   ownerNode a = tryJS "StyleSheet.ownerNode" $ StyleSheet.prim__ownerNode (up a)
458 |
459 |
460 |   export
461 |   parentStyleSheet :
462 |        {auto 0 _ : JSType t1}
463 |     -> {auto 0 _ : Elem StyleSheet (Types t1)}
464 |     -> (obj : t1)
465 |     -> JSIO (Maybe CSSStyleSheet)
466 |   parentStyleSheet a = tryJS "StyleSheet.parentStyleSheet" $
467 |     StyleSheet.prim__parentStyleSheet (up a)
468 |
469 |
470 |   export
471 |   title :
472 |        {auto 0 _ : JSType t1}
473 |     -> {auto 0 _ : Elem StyleSheet (Types t1)}
474 |     -> (obj : t1)
475 |     -> JSIO (Maybe String)
476 |   title a = tryJS "StyleSheet.title" $ StyleSheet.prim__title (up a)
477 |
478 |
479 |   export
480 |   type :
481 |        {auto 0 _ : JSType t1}
482 |     -> {auto 0 _ : Elem StyleSheet (Types t1)}
483 |     -> (obj : t1)
484 |     -> JSIO String
485 |   type a = primJS $ StyleSheet.prim__type (up a)
486 |
487 |
488 |
489 | namespace StyleSheetList
490 |
491 |   export
492 |   length : (obj : StyleSheetList) -> JSIO Bits32
493 |   length a = primJS $ StyleSheetList.prim__length a
494 |
495 |
496 |   export
497 |   item :
498 |        (obj : StyleSheetList)
499 |     -> (index : Bits32)
500 |     -> JSIO (Maybe CSSStyleSheet)
501 |   item a b = tryJS "StyleSheetList.item" $ StyleSheetList.prim__item a b
502 |
503 |
504 |
505 |
506 | --------------------------------------------------------------------------------
507 | --          Mixins
508 | --------------------------------------------------------------------------------
509 |
510 | namespace ElementCSSInlineStyle
511 |
512 |   export
513 |   style :
514 |        {auto 0 _ : JSType t1}
515 |     -> {auto 0 _ : Elem ElementCSSInlineStyle (Types t1)}
516 |     -> (obj : t1)
517 |     -> JSIO CSSStyleDeclaration
518 |   style a = primJS $ ElementCSSInlineStyle.prim__style (up a)
519 |
520 |
521 |
522 | namespace LinkStyle
523 |
524 |   export
525 |   sheet :
526 |        {auto 0 _ : JSType t1}
527 |     -> {auto 0 _ : Elem LinkStyle (Types t1)}
528 |     -> (obj : t1)
529 |     -> JSIO (Maybe CSSStyleSheet)
530 |   sheet a = tryJS "LinkStyle.sheet" $ LinkStyle.prim__sheet (up a)
531 |