module GI.WebKit.Objects.DOMPerformance
(
DOMPerformance(..) ,
IsDOMPerformance ,
toDOMPerformance ,
noDOMPerformance ,
DOMPerformanceGetMemoryMethodInfo ,
dOMPerformanceGetMemory ,
DOMPerformanceGetNavigationMethodInfo ,
dOMPerformanceGetNavigation ,
DOMPerformanceGetTimingMethodInfo ,
dOMPerformanceGetTiming ,
DOMPerformanceNowMethodInfo ,
dOMPerformanceNow ,
DOMPerformanceNavigationPropertyInfo ,
dOMPerformanceNavigation ,
getDOMPerformanceNavigation ,
DOMPerformanceTimingPropertyInfo ,
dOMPerformanceTiming ,
getDOMPerformanceTiming ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.WebKit.Interfaces.DOMEventTarget as WebKit.DOMEventTarget
import qualified GI.WebKit.Objects.DOMObject as WebKit.DOMObject
import qualified GI.WebKit.Objects.DOMPerformanceNavigation as WebKit.DOMPerformanceNavigation
import qualified GI.WebKit.Objects.DOMPerformanceTiming as WebKit.DOMPerformanceTiming
newtype DOMPerformance = DOMPerformance (ManagedPtr DOMPerformance)
foreign import ccall "webkit_dom_performance_get_type"
c_webkit_dom_performance_get_type :: IO GType
instance GObject DOMPerformance where
gobjectType _ = c_webkit_dom_performance_get_type
class GObject o => IsDOMPerformance o
#if MIN_VERSION_base(4,9,0)
instance (GObject a, O.UnknownAncestorError DOMPerformance a) =>
IsDOMPerformance a
#endif
instance IsDOMPerformance DOMPerformance
instance WebKit.DOMObject.IsDOMObject DOMPerformance
instance GObject.Object.IsObject DOMPerformance
instance WebKit.DOMEventTarget.IsDOMEventTarget DOMPerformance
toDOMPerformance :: IsDOMPerformance o => o -> IO DOMPerformance
toDOMPerformance = unsafeCastTo DOMPerformance
noDOMPerformance :: Maybe DOMPerformance
noDOMPerformance = Nothing
type family ResolveDOMPerformanceMethod (t :: Symbol) (o :: *) :: * where
ResolveDOMPerformanceMethod "addEventListener" o = WebKit.DOMEventTarget.DOMEventTargetAddEventListenerMethodInfo
ResolveDOMPerformanceMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDOMPerformanceMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDOMPerformanceMethod "dispatchEvent" o = WebKit.DOMEventTarget.DOMEventTargetDispatchEventMethodInfo
ResolveDOMPerformanceMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDOMPerformanceMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDOMPerformanceMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDOMPerformanceMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDOMPerformanceMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDOMPerformanceMethod "now" o = DOMPerformanceNowMethodInfo
ResolveDOMPerformanceMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDOMPerformanceMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDOMPerformanceMethod "removeEventListener" o = WebKit.DOMEventTarget.DOMEventTargetRemoveEventListenerMethodInfo
ResolveDOMPerformanceMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
ResolveDOMPerformanceMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
ResolveDOMPerformanceMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDOMPerformanceMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDOMPerformanceMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDOMPerformanceMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDOMPerformanceMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDOMPerformanceMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDOMPerformanceMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDOMPerformanceMethod "getMemory" o = DOMPerformanceGetMemoryMethodInfo
ResolveDOMPerformanceMethod "getNavigation" o = DOMPerformanceGetNavigationMethodInfo
ResolveDOMPerformanceMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDOMPerformanceMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDOMPerformanceMethod "getTiming" o = DOMPerformanceGetTimingMethodInfo
ResolveDOMPerformanceMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDOMPerformanceMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDOMPerformanceMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDOMPerformanceMethod t DOMPerformance, O.MethodInfo info DOMPerformance p) => O.IsLabelProxy t (DOMPerformance -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveDOMPerformanceMethod t DOMPerformance, O.MethodInfo info DOMPerformance p) => O.IsLabel t (DOMPerformance -> p) where
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
getDOMPerformanceNavigation :: (MonadIO m, IsDOMPerformance o) => o -> m (Maybe WebKit.DOMPerformanceNavigation.DOMPerformanceNavigation)
getDOMPerformanceNavigation obj = liftIO $ getObjectPropertyObject obj "navigation" WebKit.DOMPerformanceNavigation.DOMPerformanceNavigation
data DOMPerformanceNavigationPropertyInfo
instance AttrInfo DOMPerformanceNavigationPropertyInfo where
type AttrAllowedOps DOMPerformanceNavigationPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DOMPerformanceNavigationPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMPerformanceNavigationPropertyInfo = IsDOMPerformance
type AttrGetType DOMPerformanceNavigationPropertyInfo = (Maybe WebKit.DOMPerformanceNavigation.DOMPerformanceNavigation)
type AttrLabel DOMPerformanceNavigationPropertyInfo = "navigation"
type AttrOrigin DOMPerformanceNavigationPropertyInfo = DOMPerformance
attrGet _ = getDOMPerformanceNavigation
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
getDOMPerformanceTiming :: (MonadIO m, IsDOMPerformance o) => o -> m (Maybe WebKit.DOMPerformanceTiming.DOMPerformanceTiming)
getDOMPerformanceTiming obj = liftIO $ getObjectPropertyObject obj "timing" WebKit.DOMPerformanceTiming.DOMPerformanceTiming
data DOMPerformanceTimingPropertyInfo
instance AttrInfo DOMPerformanceTimingPropertyInfo where
type AttrAllowedOps DOMPerformanceTimingPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DOMPerformanceTimingPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMPerformanceTimingPropertyInfo = IsDOMPerformance
type AttrGetType DOMPerformanceTimingPropertyInfo = (Maybe WebKit.DOMPerformanceTiming.DOMPerformanceTiming)
type AttrLabel DOMPerformanceTimingPropertyInfo = "timing"
type AttrOrigin DOMPerformanceTimingPropertyInfo = DOMPerformance
attrGet _ = getDOMPerformanceTiming
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
instance O.HasAttributeList DOMPerformance
type instance O.AttributeList DOMPerformance = DOMPerformanceAttributeList
type DOMPerformanceAttributeList = ('[ '("coreObject", WebKit.DOMObject.DOMObjectCoreObjectPropertyInfo), '("navigation", DOMPerformanceNavigationPropertyInfo), '("timing", DOMPerformanceTimingPropertyInfo)] :: [(Symbol, *)])
dOMPerformanceNavigation :: AttrLabelProxy "navigation"
dOMPerformanceNavigation = AttrLabelProxy
dOMPerformanceTiming :: AttrLabelProxy "timing"
dOMPerformanceTiming = AttrLabelProxy
type instance O.SignalList DOMPerformance = DOMPerformanceSignalList
type DOMPerformanceSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "webkit_dom_performance_get_memory" webkit_dom_performance_get_memory ::
Ptr DOMPerformance ->
IO (Ptr ())
dOMPerformanceGetMemory ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMPerformance a) =>
a
-> m (Ptr ())
dOMPerformanceGetMemory self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- webkit_dom_performance_get_memory self'
touchManagedPtr self
return result
data DOMPerformanceGetMemoryMethodInfo
instance (signature ~ (m (Ptr ())), MonadIO m, IsDOMPerformance a) => O.MethodInfo DOMPerformanceGetMemoryMethodInfo a signature where
overloadedMethod _ = dOMPerformanceGetMemory
foreign import ccall "webkit_dom_performance_get_navigation" webkit_dom_performance_get_navigation ::
Ptr DOMPerformance ->
IO (Ptr WebKit.DOMPerformanceNavigation.DOMPerformanceNavigation)
dOMPerformanceGetNavigation ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMPerformance a) =>
a
-> m WebKit.DOMPerformanceNavigation.DOMPerformanceNavigation
dOMPerformanceGetNavigation self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- webkit_dom_performance_get_navigation self'
checkUnexpectedReturnNULL "dOMPerformanceGetNavigation" result
result' <- (wrapObject WebKit.DOMPerformanceNavigation.DOMPerformanceNavigation) result
touchManagedPtr self
return result'
data DOMPerformanceGetNavigationMethodInfo
instance (signature ~ (m WebKit.DOMPerformanceNavigation.DOMPerformanceNavigation), MonadIO m, IsDOMPerformance a) => O.MethodInfo DOMPerformanceGetNavigationMethodInfo a signature where
overloadedMethod _ = dOMPerformanceGetNavigation
foreign import ccall "webkit_dom_performance_get_timing" webkit_dom_performance_get_timing ::
Ptr DOMPerformance ->
IO (Ptr WebKit.DOMPerformanceTiming.DOMPerformanceTiming)
dOMPerformanceGetTiming ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMPerformance a) =>
a
-> m WebKit.DOMPerformanceTiming.DOMPerformanceTiming
dOMPerformanceGetTiming self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- webkit_dom_performance_get_timing self'
checkUnexpectedReturnNULL "dOMPerformanceGetTiming" result
result' <- (wrapObject WebKit.DOMPerformanceTiming.DOMPerformanceTiming) result
touchManagedPtr self
return result'
data DOMPerformanceGetTimingMethodInfo
instance (signature ~ (m WebKit.DOMPerformanceTiming.DOMPerformanceTiming), MonadIO m, IsDOMPerformance a) => O.MethodInfo DOMPerformanceGetTimingMethodInfo a signature where
overloadedMethod _ = dOMPerformanceGetTiming
foreign import ccall "webkit_dom_performance_now" webkit_dom_performance_now ::
Ptr DOMPerformance ->
IO CDouble
dOMPerformanceNow ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMPerformance a) =>
a
-> m Double
dOMPerformanceNow self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- webkit_dom_performance_now self'
let result' = realToFrac result
touchManagedPtr self
return result'
data DOMPerformanceNowMethodInfo
instance (signature ~ (m Double), MonadIO m, IsDOMPerformance a) => O.MethodInfo DOMPerformanceNowMethodInfo a signature where
overloadedMethod _ = dOMPerformanceNow