packages feed

ghcjs-dom-javascript-0.10.0.0: src/GHCJS/DOM/JSFFI/Generated/CanvasRect.hs

{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- | Generated by dom-gen from html (webref). Do not edit.
module GHCJS.DOM.JSFFI.Generated.CanvasRect
       (js_clearRect, js_fillRect, js_strokeRect, clearRect, fillRect, strokeRect, CanvasRect(..), gTypeCanvasRect, IsCanvasRect, toCanvasRect)
       where
import Prelude ((.), (==), (>>=), (<$>), (++), Bool(..), Maybe(..), IO, Int, Word, Double, Float)
import qualified Prelude as P
import Control.Monad (void)
import GHCJS.Types (JSVal, JSString)
import GHCJS.Foreign (jsUndefined, jsNull)
import GHCJS.DOM.Types
import qualified GHCJS.DOM.Types as Types
import GHCJS.DOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import GHCJS.DOM.JSFFI.Generated.Enums

foreign import javascript safe "(($1, $2, $3, $4, $5) => { return $1[\"clearRect\"]($2, $3, $4, $5); })"
        js_clearRect :: CanvasRect -> Double -> Double -> Double -> Double -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/clearRect MDN CanvasRect.clearRect documentation>
clearRect :: (MonadDOM m, IsCanvasRect self) => self -> Double -> Double -> Double -> Double -> m ()
clearRect self x y w h = liftDOM (void ((js_clearRect ((Types.toCanvasRect self)) (x) (y) (w) (h))))

foreign import javascript safe "(($1, $2, $3, $4, $5) => { return $1[\"fillRect\"]($2, $3, $4, $5); })"
        js_fillRect :: CanvasRect -> Double -> Double -> Double -> Double -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/fillRect MDN CanvasRect.fillRect documentation>
fillRect :: (MonadDOM m, IsCanvasRect self) => self -> Double -> Double -> Double -> Double -> m ()
fillRect self x y w h = liftDOM (void ((js_fillRect ((Types.toCanvasRect self)) (x) (y) (w) (h))))

foreign import javascript safe "(($1, $2, $3, $4, $5) => { return $1[\"strokeRect\"]($2, $3, $4, $5); })"
        js_strokeRect :: CanvasRect -> Double -> Double -> Double -> Double -> IO ()
-- | <https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/strokeRect MDN CanvasRect.strokeRect documentation>
strokeRect :: (MonadDOM m, IsCanvasRect self) => self -> Double -> Double -> Double -> Double -> m ()
strokeRect self x y w h = liftDOM (void ((js_strokeRect ((Types.toCanvasRect self)) (x) (y) (w) (h))))