{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.InspectorFrontendHost
(loaded, closeWindow, bringToFront, inspectedURLChanged,
setZoomFactor, zoomFactor, zoomFactor_,
userInterfaceLayoutDirection, userInterfaceLayoutDirection_,
requestSetDockSide, setAttachedWindowHeight,
setAttachedWindowWidth, startWindowDrag, moveWindowBy,
localizedStringsURL, localizedStringsURL_, backendCommandsURL,
backendCommandsURL_, debuggableType, debuggableType_,
inspectionLevel, inspectionLevel_, copyText, killText,
openInNewTab, canSave, canSave_, save, append, close, platform,
platform_, port, port_, showContextMenu,
dispatchEventAsContextMenuEvent, sendMessageToBackend,
unbufferedLog, isUnderTest, isUnderTest_, beep,
InspectorFrontendHost(..), gTypeInspectorFrontendHost)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..))
import qualified Prelude (error)
import Data.Typeable (Typeable)
import Data.Traversable (mapM)
import Language.Javascript.JSaddle (JSM(..), JSVal(..), JSString, strictEqual, toJSVal, valToStr, valToNumber, valToBool, js, jss, jsf, jsg, function, asyncFunction, new, array, jsUndefined, (!), (!!))
import Data.Int (Int64)
import Data.Word (Word, Word64)
import JSDOM.Types
import Control.Applicative ((<$>))
import Control.Monad (void)
import Control.Lens.Operators ((^.))
import JSDOM.EventTargetClosures (EventName, unsafeEventName, unsafeEventNameAsync)
import JSDOM.Enums
loaded :: (MonadDOM m) => InspectorFrontendHost -> m ()
loaded self = liftDOM (void (self ^. jsf "loaded" ()))
closeWindow :: (MonadDOM m) => InspectorFrontendHost -> m ()
closeWindow self = liftDOM (void (self ^. jsf "closeWindow" ()))
bringToFront :: (MonadDOM m) => InspectorFrontendHost -> m ()
bringToFront self = liftDOM (void (self ^. jsf "bringToFront" ()))
inspectedURLChanged ::
(MonadDOM m, ToJSString newURL) =>
InspectorFrontendHost -> newURL -> m ()
inspectedURLChanged self newURL
= liftDOM
(void (self ^. jsf "inspectedURLChanged" [toJSVal newURL]))
setZoomFactor ::
(MonadDOM m) => InspectorFrontendHost -> Float -> m ()
setZoomFactor self zoom
= liftDOM (void (self ^. jsf "setZoomFactor" [toJSVal zoom]))
zoomFactor :: (MonadDOM m) => InspectorFrontendHost -> m Float
zoomFactor self
= liftDOM
(realToFrac <$> ((self ^. jsf "zoomFactor" ()) >>= valToNumber))
zoomFactor_ :: (MonadDOM m) => InspectorFrontendHost -> m ()
zoomFactor_ self = liftDOM (void (self ^. jsf "zoomFactor" ()))
userInterfaceLayoutDirection ::
(MonadDOM m, FromJSString result) =>
InspectorFrontendHost -> m result
userInterfaceLayoutDirection self
= liftDOM
((self ^. jsf "userInterfaceLayoutDirection" ()) >>=
fromJSValUnchecked)
userInterfaceLayoutDirection_ ::
(MonadDOM m) => InspectorFrontendHost -> m ()
userInterfaceLayoutDirection_ self
= liftDOM (void (self ^. jsf "userInterfaceLayoutDirection" ()))
requestSetDockSide ::
(MonadDOM m, ToJSString side) =>
InspectorFrontendHost -> side -> m ()
requestSetDockSide self side
= liftDOM (void (self ^. jsf "requestSetDockSide" [toJSVal side]))
setAttachedWindowHeight ::
(MonadDOM m) => InspectorFrontendHost -> Word -> m ()
setAttachedWindowHeight self height
= liftDOM
(void (self ^. jsf "setAttachedWindowHeight" [toJSVal height]))
setAttachedWindowWidth ::
(MonadDOM m) => InspectorFrontendHost -> Word -> m ()
setAttachedWindowWidth self width
= liftDOM
(void (self ^. jsf "setAttachedWindowWidth" [toJSVal width]))
startWindowDrag :: (MonadDOM m) => InspectorFrontendHost -> m ()
startWindowDrag self
= liftDOM (void (self ^. jsf "startWindowDrag" ()))
moveWindowBy ::
(MonadDOM m) => InspectorFrontendHost -> Float -> Float -> m ()
moveWindowBy self x y
= liftDOM
(void (self ^. jsf "moveWindowBy" [toJSVal x, toJSVal y]))
localizedStringsURL ::
(MonadDOM m, FromJSString result) =>
InspectorFrontendHost -> m result
localizedStringsURL self
= liftDOM
((self ^. jsf "localizedStringsURL" ()) >>= fromJSValUnchecked)
localizedStringsURL_ ::
(MonadDOM m) => InspectorFrontendHost -> m ()
localizedStringsURL_ self
= liftDOM (void (self ^. jsf "localizedStringsURL" ()))
backendCommandsURL ::
(MonadDOM m, FromJSString result) =>
InspectorFrontendHost -> m result
backendCommandsURL self
= liftDOM
((self ^. jsf "backendCommandsURL" ()) >>= fromJSValUnchecked)
backendCommandsURL_ ::
(MonadDOM m) => InspectorFrontendHost -> m ()
backendCommandsURL_ self
= liftDOM (void (self ^. jsf "backendCommandsURL" ()))
debuggableType ::
(MonadDOM m, FromJSString result) =>
InspectorFrontendHost -> m result
debuggableType self
= liftDOM
((self ^. jsf "debuggableType" ()) >>= fromJSValUnchecked)
debuggableType_ :: (MonadDOM m) => InspectorFrontendHost -> m ()
debuggableType_ self
= liftDOM (void (self ^. jsf "debuggableType" ()))
inspectionLevel :: (MonadDOM m) => InspectorFrontendHost -> m Word
inspectionLevel self
= liftDOM
(round <$> ((self ^. jsf "inspectionLevel" ()) >>= valToNumber))
inspectionLevel_ :: (MonadDOM m) => InspectorFrontendHost -> m ()
inspectionLevel_ self
= liftDOM (void (self ^. jsf "inspectionLevel" ()))
copyText ::
(MonadDOM m, ToJSString text) =>
InspectorFrontendHost -> text -> m ()
copyText self text
= liftDOM (void (self ^. jsf "copyText" [toJSVal text]))
killText ::
(MonadDOM m, ToJSString text) =>
InspectorFrontendHost -> text -> Bool -> Bool -> m ()
killText self text shouldPrependToKillRing shouldStartNewSequence
= liftDOM
(void
(self ^. jsf "killText"
[toJSVal text, toJSVal shouldPrependToKillRing,
toJSVal shouldStartNewSequence]))
openInNewTab ::
(MonadDOM m, ToJSString url) =>
InspectorFrontendHost -> url -> m ()
openInNewTab self url
= liftDOM (void (self ^. jsf "openInNewTab" [toJSVal url]))
canSave :: (MonadDOM m) => InspectorFrontendHost -> m Bool
canSave self = liftDOM ((self ^. jsf "canSave" ()) >>= valToBool)
canSave_ :: (MonadDOM m) => InspectorFrontendHost -> m ()
canSave_ self = liftDOM (void (self ^. jsf "canSave" ()))
save ::
(MonadDOM m, ToJSString url, ToJSString content) =>
InspectorFrontendHost -> url -> content -> Bool -> Bool -> m ()
save self url content base64Encoded forceSaveAs
= liftDOM
(void
(self ^. jsf "save"
[toJSVal url, toJSVal content, toJSVal base64Encoded,
toJSVal forceSaveAs]))
append ::
(MonadDOM m, ToJSString url, ToJSString content) =>
InspectorFrontendHost -> url -> content -> m ()
append self url content
= liftDOM
(void (self ^. jsf "append" [toJSVal url, toJSVal content]))
close ::
(MonadDOM m, ToJSString url) =>
InspectorFrontendHost -> url -> m ()
close self url = liftDOM (void (self ^. jsf "close" [toJSVal url]))
platform ::
(MonadDOM m, FromJSString result) =>
InspectorFrontendHost -> m result
platform self
= liftDOM ((self ^. jsf "platform" ()) >>= fromJSValUnchecked)
platform_ :: (MonadDOM m) => InspectorFrontendHost -> m ()
platform_ self = liftDOM (void (self ^. jsf "platform" ()))
port ::
(MonadDOM m, FromJSString result) =>
InspectorFrontendHost -> m result
port self
= liftDOM ((self ^. jsf "port" ()) >>= fromJSValUnchecked)
port_ :: (MonadDOM m) => InspectorFrontendHost -> m ()
port_ self = liftDOM (void (self ^. jsf "port" ()))
showContextMenu ::
(MonadDOM m, IsMouseEvent event, ToJSVal items) =>
InspectorFrontendHost -> event -> items -> m ()
showContextMenu self event items
= liftDOM
(void
(self ^. jsf "showContextMenu" [toJSVal event, toJSVal items]))
dispatchEventAsContextMenuEvent ::
(MonadDOM m, IsEvent event) =>
InspectorFrontendHost -> Maybe event -> m ()
dispatchEventAsContextMenuEvent self event
= liftDOM
(void
(self ^. jsf "dispatchEventAsContextMenuEvent" [toJSVal event]))
sendMessageToBackend ::
(MonadDOM m, ToJSString message) =>
InspectorFrontendHost -> message -> m ()
sendMessageToBackend self message
= liftDOM
(void (self ^. jsf "sendMessageToBackend" [toJSVal message]))
unbufferedLog ::
(MonadDOM m, ToJSString message) =>
InspectorFrontendHost -> message -> m ()
unbufferedLog self message
= liftDOM (void (self ^. jsf "unbufferedLog" [toJSVal message]))
isUnderTest :: (MonadDOM m) => InspectorFrontendHost -> m Bool
isUnderTest self
= liftDOM ((self ^. jsf "isUnderTest" ()) >>= valToBool)
isUnderTest_ :: (MonadDOM m) => InspectorFrontendHost -> m ()
isUnderTest_ self = liftDOM (void (self ^. jsf "isUnderTest" ()))
beep :: (MonadDOM m) => InspectorFrontendHost -> m ()
beep self = liftDOM (void (self ^. jsf "beep" ()))