0 | module Web.Raw.Cssomview
  1 |
  2 | import JS
  3 | import Web.Internal.CssomviewPrim
  4 | import Web.Internal.Types
  5 |
  6 | %default total
  7 |
  8 |
  9 | --------------------------------------------------------------------------------
 10 | --          Interfaces
 11 | --------------------------------------------------------------------------------
 12 |
 13 | namespace CaretPosition
 14 |
 15 |   export
 16 |   offset : (obj : CaretPosition) -> JSIO Bits32
 17 |   offset a = primJS $ CaretPosition.prim__offset a
 18 |
 19 |
 20 |   export
 21 |   offsetNode : (obj : CaretPosition) -> JSIO Node
 22 |   offsetNode a = primJS $ CaretPosition.prim__offsetNode a
 23 |
 24 |
 25 |   export
 26 |   getClientRect : (obj : CaretPosition) -> JSIO (Maybe DOMRect)
 27 |   getClientRect a = tryJS "CaretPosition.getClientRect" $
 28 |     CaretPosition.prim__getClientRect a
 29 |
 30 |
 31 |
 32 | namespace MediaQueryList
 33 |
 34 |   export
 35 |   matches : (obj : MediaQueryList) -> JSIO Bool
 36 |   matches a = tryJS "MediaQueryList.matches" $ MediaQueryList.prim__matches a
 37 |
 38 |
 39 |   export
 40 |   media : (obj : MediaQueryList) -> JSIO String
 41 |   media a = primJS $ MediaQueryList.prim__media a
 42 |
 43 |
 44 |   export
 45 |   onchange : MediaQueryList -> Attribute False Maybe EventHandlerNonNull
 46 |   onchange v = fromNullablePrim
 47 |                  "MediaQueryList.getonchange"
 48 |                  prim__onchange
 49 |                  prim__setOnchange
 50 |                  v
 51 |
 52 |
 53 |   export
 54 |   addListener :
 55 |        (obj : MediaQueryList)
 56 |     -> (callback : Maybe EventListener)
 57 |     -> JSIO ()
 58 |   addListener a b = primJS $ MediaQueryList.prim__addListener a (toFFI b)
 59 |
 60 |
 61 |   export
 62 |   removeListener :
 63 |        (obj : MediaQueryList)
 64 |     -> (callback : Maybe EventListener)
 65 |     -> JSIO ()
 66 |   removeListener a b = primJS $ MediaQueryList.prim__removeListener a (toFFI b)
 67 |
 68 |
 69 |
 70 | namespace MediaQueryListEvent
 71 |
 72 |   export
 73 |   new' :
 74 |        {auto 0 _ : JSType t2}
 75 |     -> {auto 0 _ : Elem MediaQueryListEventInit (Types t2)}
 76 |     -> (type : String)
 77 |     -> (eventInitDict : Optional t2)
 78 |     -> JSIO MediaQueryListEvent
 79 |   new' a b = primJS $ MediaQueryListEvent.prim__new a (optUp b)
 80 |
 81 |   export
 82 |   new : (type : String) -> JSIO MediaQueryListEvent
 83 |   new a = primJS $ MediaQueryListEvent.prim__new a undef
 84 |
 85 |
 86 |   export
 87 |   matches : (obj : MediaQueryListEvent) -> JSIO Bool
 88 |   matches a = tryJS "MediaQueryListEvent.matches" $
 89 |     MediaQueryListEvent.prim__matches a
 90 |
 91 |
 92 |   export
 93 |   media : (obj : MediaQueryListEvent) -> JSIO String
 94 |   media a = primJS $ MediaQueryListEvent.prim__media a
 95 |
 96 |
 97 |
 98 | namespace Screen
 99 |
100 |   export
101 |   availHeight : (obj : Screen) -> JSIO Int32
102 |   availHeight a = primJS $ Screen.prim__availHeight a
103 |
104 |
105 |   export
106 |   availWidth : (obj : Screen) -> JSIO Int32
107 |   availWidth a = primJS $ Screen.prim__availWidth a
108 |
109 |
110 |   export
111 |   colorDepth : (obj : Screen) -> JSIO Bits32
112 |   colorDepth a = primJS $ Screen.prim__colorDepth a
113 |
114 |
115 |   export
116 |   height : (obj : Screen) -> JSIO Int32
117 |   height a = primJS $ Screen.prim__height a
118 |
119 |
120 |   export
121 |   pixelDepth : (obj : Screen) -> JSIO Bits32
122 |   pixelDepth a = primJS $ Screen.prim__pixelDepth a
123 |
124 |
125 |   export
126 |   width : (obj : Screen) -> JSIO Int32
127 |   width a = primJS $ Screen.prim__width a
128 |
129 |
130 |
131 | namespace VisualViewport
132 |
133 |   export
134 |   height : (obj : VisualViewport) -> JSIO Double
135 |   height a = primJS $ VisualViewport.prim__height a
136 |
137 |
138 |   export
139 |   offsetLeft : (obj : VisualViewport) -> JSIO Double
140 |   offsetLeft a = primJS $ VisualViewport.prim__offsetLeft a
141 |
142 |
143 |   export
144 |   offsetTop : (obj : VisualViewport) -> JSIO Double
145 |   offsetTop a = primJS $ VisualViewport.prim__offsetTop a
146 |
147 |
148 |   export
149 |   onresize : VisualViewport -> Attribute False Maybe EventHandlerNonNull
150 |   onresize v = fromNullablePrim
151 |                  "VisualViewport.getonresize"
152 |                  prim__onresize
153 |                  prim__setOnresize
154 |                  v
155 |
156 |
157 |   export
158 |   onscroll : VisualViewport -> Attribute False Maybe EventHandlerNonNull
159 |   onscroll v = fromNullablePrim
160 |                  "VisualViewport.getonscroll"
161 |                  prim__onscroll
162 |                  prim__setOnscroll
163 |                  v
164 |
165 |
166 |   export
167 |   onscrollend : VisualViewport -> Attribute False Maybe EventHandlerNonNull
168 |   onscrollend v = fromNullablePrim
169 |                     "VisualViewport.getonscrollend"
170 |                     prim__onscrollend
171 |                     prim__setOnscrollend
172 |                     v
173 |
174 |
175 |   export
176 |   pageLeft : (obj : VisualViewport) -> JSIO Double
177 |   pageLeft a = primJS $ VisualViewport.prim__pageLeft a
178 |
179 |
180 |   export
181 |   pageTop : (obj : VisualViewport) -> JSIO Double
182 |   pageTop a = primJS $ VisualViewport.prim__pageTop a
183 |
184 |
185 |   export
186 |   scale : (obj : VisualViewport) -> JSIO Double
187 |   scale a = primJS $ VisualViewport.prim__scale a
188 |
189 |
190 |   export
191 |   width : (obj : VisualViewport) -> JSIO Double
192 |   width a = primJS $ VisualViewport.prim__width a
193 |
194 |
195 |
196 |
197 | --------------------------------------------------------------------------------
198 | --          Mixins
199 | --------------------------------------------------------------------------------
200 |
201 | namespace GeometryUtils
202 |
203 |   export
204 |   convertPointFromNode' :
205 |        {auto 0 _ : JSType t1}
206 |     -> {auto 0 _ : JSType t2}
207 |     -> {auto 0 _ : JSType t4}
208 |     -> {auto 0 _ : Elem GeometryUtils (Types t1)}
209 |     -> {auto 0 _ : Elem DOMPointInit (Types t2)}
210 |     -> {auto 0 _ : Elem ConvertCoordinateOptions (Types t4)}
211 |     -> (obj : t1)
212 |     -> (point : t2)
213 |     -> (from : HSum [Text, Element, CSSPseudoElement, Document])
214 |     -> (options : Optional t4)
215 |     -> JSIO DOMPoint
216 |   convertPointFromNode' a b c d = primJS $
217 |     GeometryUtils.prim__convertPointFromNode (up a) (up b) (toFFI c) (optUp d)
218 |
219 |   export
220 |   convertPointFromNode :
221 |        {auto 0 _ : JSType t1}
222 |     -> {auto 0 _ : JSType t2}
223 |     -> {auto 0 _ : Elem GeometryUtils (Types t1)}
224 |     -> {auto 0 _ : Elem DOMPointInit (Types t2)}
225 |     -> (obj : t1)
226 |     -> (point : t2)
227 |     -> (from : HSum [Text, Element, CSSPseudoElement, Document])
228 |     -> JSIO DOMPoint
229 |   convertPointFromNode a b c = primJS $
230 |     GeometryUtils.prim__convertPointFromNode (up a) (up b) (toFFI c) undef
231 |
232 |
233 |   export
234 |   convertQuadFromNode' :
235 |        {auto 0 _ : JSType t1}
236 |     -> {auto 0 _ : JSType t2}
237 |     -> {auto 0 _ : JSType t4}
238 |     -> {auto 0 _ : Elem GeometryUtils (Types t1)}
239 |     -> {auto 0 _ : Elem DOMQuadInit (Types t2)}
240 |     -> {auto 0 _ : Elem ConvertCoordinateOptions (Types t4)}
241 |     -> (obj : t1)
242 |     -> (quad : t2)
243 |     -> (from : HSum [Text, Element, CSSPseudoElement, Document])
244 |     -> (options : Optional t4)
245 |     -> JSIO DOMQuad
246 |   convertQuadFromNode' a b c d = primJS $
247 |     GeometryUtils.prim__convertQuadFromNode (up a) (up b) (toFFI c) (optUp d)
248 |
249 |   export
250 |   convertQuadFromNode :
251 |        {auto 0 _ : JSType t1}
252 |     -> {auto 0 _ : JSType t2}
253 |     -> {auto 0 _ : Elem GeometryUtils (Types t1)}
254 |     -> {auto 0 _ : Elem DOMQuadInit (Types t2)}
255 |     -> (obj : t1)
256 |     -> (quad : t2)
257 |     -> (from : HSum [Text, Element, CSSPseudoElement, Document])
258 |     -> JSIO DOMQuad
259 |   convertQuadFromNode a b c = primJS $
260 |     GeometryUtils.prim__convertQuadFromNode (up a) (up b) (toFFI c) undef
261 |
262 |
263 |   export
264 |   convertRectFromNode' :
265 |        {auto 0 _ : JSType t1}
266 |     -> {auto 0 _ : JSType t2}
267 |     -> {auto 0 _ : JSType t4}
268 |     -> {auto 0 _ : Elem GeometryUtils (Types t1)}
269 |     -> {auto 0 _ : Elem DOMRectReadOnly (Types t2)}
270 |     -> {auto 0 _ : Elem ConvertCoordinateOptions (Types t4)}
271 |     -> (obj : t1)
272 |     -> (rect : t2)
273 |     -> (from : HSum [Text, Element, CSSPseudoElement, Document])
274 |     -> (options : Optional t4)
275 |     -> JSIO DOMQuad
276 |   convertRectFromNode' a b c d = primJS $
277 |     GeometryUtils.prim__convertRectFromNode (up a) (up b) (toFFI c) (optUp d)
278 |
279 |   export
280 |   convertRectFromNode :
281 |        {auto 0 _ : JSType t1}
282 |     -> {auto 0 _ : JSType t2}
283 |     -> {auto 0 _ : Elem GeometryUtils (Types t1)}
284 |     -> {auto 0 _ : Elem DOMRectReadOnly (Types t2)}
285 |     -> (obj : t1)
286 |     -> (rect : t2)
287 |     -> (from : HSum [Text, Element, CSSPseudoElement, Document])
288 |     -> JSIO DOMQuad
289 |   convertRectFromNode a b c = primJS $
290 |     GeometryUtils.prim__convertRectFromNode (up a) (up b) (toFFI c) undef
291 |
292 |
293 |   export
294 |   getBoxQuads' :
295 |        {auto 0 _ : JSType t1}
296 |     -> {auto 0 _ : JSType t2}
297 |     -> {auto 0 _ : Elem GeometryUtils (Types t1)}
298 |     -> {auto 0 _ : Elem BoxQuadOptions (Types t2)}
299 |     -> (obj : t1)
300 |     -> (options : Optional t2)
301 |     -> JSIO (Array DOMQuad)
302 |   getBoxQuads' a b = primJS $ GeometryUtils.prim__getBoxQuads (up a) (optUp b)
303 |
304 |   export
305 |   getBoxQuads :
306 |        {auto 0 _ : JSType t1}
307 |     -> {auto 0 _ : Elem GeometryUtils (Types t1)}
308 |     -> (obj : t1)
309 |     -> JSIO (Array DOMQuad)
310 |   getBoxQuads a = primJS $ GeometryUtils.prim__getBoxQuads (up a) undef
311 |
312 |
313 |
314 |
315 | --------------------------------------------------------------------------------
316 | --          Dictionaries
317 | --------------------------------------------------------------------------------
318 |
319 | namespace BoxQuadOptions
320 |
321 |   export
322 |   new' :
323 |        (box : Optional CSSBoxType)
324 |     -> (relativeTo : Optional
325 |                        (HSum [Text, Element, CSSPseudoElement, Document]))
326 |     -> JSIO BoxQuadOptions
327 |   new' a b = primJS $ BoxQuadOptions.prim__new (toFFI a) (toFFI b)
328 |
329 |   export
330 |   new : JSIO BoxQuadOptions
331 |   new = primJS $ BoxQuadOptions.prim__new undef undef
332 |
333 |
334 |   export
335 |   box :
336 |        {auto 0 _ : JSType t}
337 |     -> {auto 0 _ : Elem BoxQuadOptions (Types t)}
338 |     -> t
339 |     -> Attribute False Optional CSSBoxType
340 |   box v = fromUndefOrPrimNoDefault
341 |             "BoxQuadOptions.getbox"
342 |             prim__box
343 |             prim__setBox
344 |             (v :> BoxQuadOptions)
345 |
346 |
347 |   export
348 |   relativeTo :
349 |        {auto 0 _ : JSType t}
350 |     -> {auto 0 _ : Elem BoxQuadOptions (Types t)}
351 |     -> t
352 |     -> Attribute False Optional (HSum
353 |                                    [Text, Element, CSSPseudoElement, Document])
354 |   relativeTo v = fromUndefOrPrimNoDefault
355 |                    "BoxQuadOptions.getrelativeTo"
356 |                    prim__relativeTo
357 |                    prim__setRelativeTo
358 |                    (v :> BoxQuadOptions)
359 |
360 |
361 |
362 | namespace CheckVisibilityOptions
363 |
364 |   export
365 |   new' :
366 |        (checkOpacity : Optional Bool)
367 |     -> (checkVisibilityCSS : Optional Bool)
368 |     -> JSIO CheckVisibilityOptions
369 |   new' a b = primJS $ CheckVisibilityOptions.prim__new (toFFI a) (toFFI b)
370 |
371 |   export
372 |   new : JSIO CheckVisibilityOptions
373 |   new = primJS $ CheckVisibilityOptions.prim__new undef undef
374 |
375 |
376 |   export
377 |   checkOpacity :
378 |        {auto 0 _ : JSType t}
379 |     -> {auto 0 _ : Elem CheckVisibilityOptions (Types t)}
380 |     -> t
381 |     -> Attribute True Optional Bool
382 |   checkOpacity v = fromUndefOrPrim
383 |                      "CheckVisibilityOptions.getcheckOpacity"
384 |                      prim__checkOpacity
385 |                      prim__setCheckOpacity
386 |                      False
387 |                      (v :> CheckVisibilityOptions)
388 |
389 |
390 |   export
391 |   checkVisibilityCSS :
392 |        {auto 0 _ : JSType t}
393 |     -> {auto 0 _ : Elem CheckVisibilityOptions (Types t)}
394 |     -> t
395 |     -> Attribute True Optional Bool
396 |   checkVisibilityCSS v = fromUndefOrPrim
397 |                            "CheckVisibilityOptions.getcheckVisibilityCSS"
398 |                            prim__checkVisibilityCSS
399 |                            prim__setCheckVisibilityCSS
400 |                            False
401 |                            (v :> CheckVisibilityOptions)
402 |
403 |
404 |
405 | namespace ConvertCoordinateOptions
406 |
407 |   export
408 |   new' :
409 |        (fromBox : Optional CSSBoxType)
410 |     -> (toBox : Optional CSSBoxType)
411 |     -> JSIO ConvertCoordinateOptions
412 |   new' a b = primJS $ ConvertCoordinateOptions.prim__new (toFFI a) (toFFI b)
413 |
414 |   export
415 |   new : JSIO ConvertCoordinateOptions
416 |   new = primJS $ ConvertCoordinateOptions.prim__new undef undef
417 |
418 |
419 |   export
420 |   fromBox :
421 |        {auto 0 _ : JSType t}
422 |     -> {auto 0 _ : Elem ConvertCoordinateOptions (Types t)}
423 |     -> t
424 |     -> Attribute False Optional CSSBoxType
425 |   fromBox v = fromUndefOrPrimNoDefault
426 |                 "ConvertCoordinateOptions.getfromBox"
427 |                 prim__fromBox
428 |                 prim__setFromBox
429 |                 (v :> ConvertCoordinateOptions)
430 |
431 |
432 |   export
433 |   toBox :
434 |        {auto 0 _ : JSType t}
435 |     -> {auto 0 _ : Elem ConvertCoordinateOptions (Types t)}
436 |     -> t
437 |     -> Attribute False Optional CSSBoxType
438 |   toBox v = fromUndefOrPrimNoDefault
439 |               "ConvertCoordinateOptions.gettoBox"
440 |               prim__toBox
441 |               prim__setToBox
442 |               (v :> ConvertCoordinateOptions)
443 |
444 |
445 |
446 | namespace MediaQueryListEventInit
447 |
448 |   export
449 |   new' :
450 |        (media : Optional String)
451 |     -> (matches : Optional Bool)
452 |     -> JSIO MediaQueryListEventInit
453 |   new' a b = primJS $ MediaQueryListEventInit.prim__new (toFFI a) (toFFI b)
454 |
455 |   export
456 |   new : JSIO MediaQueryListEventInit
457 |   new = primJS $ MediaQueryListEventInit.prim__new undef undef
458 |
459 |
460 |   export
461 |   matches :
462 |        {auto 0 _ : JSType t}
463 |     -> {auto 0 _ : Elem MediaQueryListEventInit (Types t)}
464 |     -> t
465 |     -> Attribute True Optional Bool
466 |   matches v = fromUndefOrPrim
467 |                 "MediaQueryListEventInit.getmatches"
468 |                 prim__matches
469 |                 prim__setMatches
470 |                 False
471 |                 (v :> MediaQueryListEventInit)
472 |
473 |
474 |   export
475 |   media :
476 |        {auto 0 _ : JSType t}
477 |     -> {auto 0 _ : Elem MediaQueryListEventInit (Types t)}
478 |     -> t
479 |     -> Attribute True Optional String
480 |   media v = fromUndefOrPrim
481 |               "MediaQueryListEventInit.getmedia"
482 |               prim__media
483 |               prim__setMedia
484 |               ""
485 |               (v :> MediaQueryListEventInit)
486 |
487 |
488 |
489 | namespace ScrollIntoViewOptions
490 |
491 |   export
492 |   new' :
493 |        (block : Optional ScrollLogicalPosition)
494 |     -> (inline : Optional ScrollLogicalPosition)
495 |     -> JSIO ScrollIntoViewOptions
496 |   new' a b = primJS $ ScrollIntoViewOptions.prim__new (toFFI a) (toFFI b)
497 |
498 |   export
499 |   new : JSIO ScrollIntoViewOptions
500 |   new = primJS $ ScrollIntoViewOptions.prim__new undef undef
501 |
502 |
503 |   export
504 |   block :
505 |        {auto 0 _ : JSType t}
506 |     -> {auto 0 _ : Elem ScrollIntoViewOptions (Types t)}
507 |     -> t
508 |     -> Attribute False Optional ScrollLogicalPosition
509 |   block v = fromUndefOrPrimNoDefault
510 |               "ScrollIntoViewOptions.getblock"
511 |               prim__block
512 |               prim__setBlock
513 |               (v :> ScrollIntoViewOptions)
514 |
515 |
516 |   export
517 |   inline :
518 |        {auto 0 _ : JSType t}
519 |     -> {auto 0 _ : Elem ScrollIntoViewOptions (Types t)}
520 |     -> t
521 |     -> Attribute False Optional ScrollLogicalPosition
522 |   inline v = fromUndefOrPrimNoDefault
523 |                "ScrollIntoViewOptions.getinline"
524 |                prim__inline
525 |                prim__setInline
526 |                (v :> ScrollIntoViewOptions)
527 |
528 |
529 |
530 | namespace ScrollOptions
531 |
532 |   export
533 |   new' : (behavior : Optional ScrollBehavior) -> JSIO ScrollOptions
534 |   new' a = primJS $ ScrollOptions.prim__new (toFFI a)
535 |
536 |   export
537 |   new : JSIO ScrollOptions
538 |   new = primJS $ ScrollOptions.prim__new undef
539 |
540 |
541 |   export
542 |   behavior :
543 |        {auto 0 _ : JSType t}
544 |     -> {auto 0 _ : Elem ScrollOptions (Types t)}
545 |     -> t
546 |     -> Attribute False Optional ScrollBehavior
547 |   behavior v = fromUndefOrPrimNoDefault
548 |                  "ScrollOptions.getbehavior"
549 |                  prim__behavior
550 |                  prim__setBehavior
551 |                  (v :> ScrollOptions)
552 |
553 |
554 |
555 | namespace ScrollToOptions
556 |
557 |   export
558 |   new' :
559 |        (left : Optional Double)
560 |     -> (top : Optional Double)
561 |     -> JSIO ScrollToOptions
562 |   new' a b = primJS $ ScrollToOptions.prim__new (toFFI a) (toFFI b)
563 |
564 |   export
565 |   new : JSIO ScrollToOptions
566 |   new = primJS $ ScrollToOptions.prim__new undef undef
567 |
568 |
569 |   export
570 |   left :
571 |        {auto 0 _ : JSType t}
572 |     -> {auto 0 _ : Elem ScrollToOptions (Types t)}
573 |     -> t
574 |     -> Attribute False Optional Double
575 |   left v = fromUndefOrPrimNoDefault
576 |              "ScrollToOptions.getleft"
577 |              prim__left
578 |              prim__setLeft
579 |              (v :> ScrollToOptions)
580 |
581 |
582 |   export
583 |   top :
584 |        {auto 0 _ : JSType t}
585 |     -> {auto 0 _ : Elem ScrollToOptions (Types t)}
586 |     -> t
587 |     -> Attribute False Optional Double
588 |   top v = fromUndefOrPrimNoDefault
589 |             "ScrollToOptions.gettop"
590 |             prim__top
591 |             prim__setTop
592 |             (v :> ScrollToOptions)
593 |