module GI.WebKit.Objects.DOMPerformanceEntry
(
DOMPerformanceEntry(..) ,
DOMPerformanceEntryK ,
toDOMPerformanceEntry ,
noDOMPerformanceEntry ,
dOMPerformanceEntryGetDuration ,
dOMPerformanceEntryGetEntryType ,
dOMPerformanceEntryGetName ,
dOMPerformanceEntryGetStartTime ,
DOMPerformanceEntryDurationPropertyInfo ,
getDOMPerformanceEntryDuration ,
DOMPerformanceEntryEntryTypePropertyInfo,
getDOMPerformanceEntryEntryType ,
DOMPerformanceEntryNamePropertyInfo ,
getDOMPerformanceEntryName ,
DOMPerformanceEntryStartTimePropertyInfo,
getDOMPerformanceEntryStartTime ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.WebKit.Types
import GI.WebKit.Callbacks
import qualified GI.GObject as GObject
newtype DOMPerformanceEntry = DOMPerformanceEntry (ForeignPtr DOMPerformanceEntry)
foreign import ccall "webkit_dom_performance_entry_get_type"
c_webkit_dom_performance_entry_get_type :: IO GType
type instance ParentTypes DOMPerformanceEntry = DOMPerformanceEntryParentTypes
type DOMPerformanceEntryParentTypes = '[DOMObject, GObject.Object]
instance GObject DOMPerformanceEntry where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_webkit_dom_performance_entry_get_type
class GObject o => DOMPerformanceEntryK o
instance (GObject o, IsDescendantOf DOMPerformanceEntry o) => DOMPerformanceEntryK o
toDOMPerformanceEntry :: DOMPerformanceEntryK o => o -> IO DOMPerformanceEntry
toDOMPerformanceEntry = unsafeCastTo DOMPerformanceEntry
noDOMPerformanceEntry :: Maybe DOMPerformanceEntry
noDOMPerformanceEntry = Nothing
getDOMPerformanceEntryDuration :: (MonadIO m, DOMPerformanceEntryK o) => o -> m Double
getDOMPerformanceEntryDuration obj = liftIO $ getObjectPropertyDouble obj "duration"
data DOMPerformanceEntryDurationPropertyInfo
instance AttrInfo DOMPerformanceEntryDurationPropertyInfo where
type AttrAllowedOps DOMPerformanceEntryDurationPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMPerformanceEntryDurationPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMPerformanceEntryDurationPropertyInfo = DOMPerformanceEntryK
type AttrGetType DOMPerformanceEntryDurationPropertyInfo = Double
type AttrLabel DOMPerformanceEntryDurationPropertyInfo = "DOMPerformanceEntry::duration"
attrGet _ = getDOMPerformanceEntryDuration
attrSet _ = undefined
attrConstruct _ = undefined
getDOMPerformanceEntryEntryType :: (MonadIO m, DOMPerformanceEntryK o) => o -> m T.Text
getDOMPerformanceEntryEntryType obj = liftIO $ getObjectPropertyString obj "entry-type"
data DOMPerformanceEntryEntryTypePropertyInfo
instance AttrInfo DOMPerformanceEntryEntryTypePropertyInfo where
type AttrAllowedOps DOMPerformanceEntryEntryTypePropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMPerformanceEntryEntryTypePropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMPerformanceEntryEntryTypePropertyInfo = DOMPerformanceEntryK
type AttrGetType DOMPerformanceEntryEntryTypePropertyInfo = T.Text
type AttrLabel DOMPerformanceEntryEntryTypePropertyInfo = "DOMPerformanceEntry::entry-type"
attrGet _ = getDOMPerformanceEntryEntryType
attrSet _ = undefined
attrConstruct _ = undefined
getDOMPerformanceEntryName :: (MonadIO m, DOMPerformanceEntryK o) => o -> m T.Text
getDOMPerformanceEntryName obj = liftIO $ getObjectPropertyString obj "name"
data DOMPerformanceEntryNamePropertyInfo
instance AttrInfo DOMPerformanceEntryNamePropertyInfo where
type AttrAllowedOps DOMPerformanceEntryNamePropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMPerformanceEntryNamePropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMPerformanceEntryNamePropertyInfo = DOMPerformanceEntryK
type AttrGetType DOMPerformanceEntryNamePropertyInfo = T.Text
type AttrLabel DOMPerformanceEntryNamePropertyInfo = "DOMPerformanceEntry::name"
attrGet _ = getDOMPerformanceEntryName
attrSet _ = undefined
attrConstruct _ = undefined
getDOMPerformanceEntryStartTime :: (MonadIO m, DOMPerformanceEntryK o) => o -> m Double
getDOMPerformanceEntryStartTime obj = liftIO $ getObjectPropertyDouble obj "start-time"
data DOMPerformanceEntryStartTimePropertyInfo
instance AttrInfo DOMPerformanceEntryStartTimePropertyInfo where
type AttrAllowedOps DOMPerformanceEntryStartTimePropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMPerformanceEntryStartTimePropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMPerformanceEntryStartTimePropertyInfo = DOMPerformanceEntryK
type AttrGetType DOMPerformanceEntryStartTimePropertyInfo = Double
type AttrLabel DOMPerformanceEntryStartTimePropertyInfo = "DOMPerformanceEntry::start-time"
attrGet _ = getDOMPerformanceEntryStartTime
attrSet _ = undefined
attrConstruct _ = undefined
type instance AttributeList DOMPerformanceEntry = DOMPerformanceEntryAttributeList
type DOMPerformanceEntryAttributeList = ('[ '("core-object", DOMObjectCoreObjectPropertyInfo), '("duration", DOMPerformanceEntryDurationPropertyInfo), '("entry-type", DOMPerformanceEntryEntryTypePropertyInfo), '("name", DOMPerformanceEntryNamePropertyInfo), '("start-time", DOMPerformanceEntryStartTimePropertyInfo)] :: [(Symbol, *)])
type instance SignalList DOMPerformanceEntry = DOMPerformanceEntrySignalList
type DOMPerformanceEntrySignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "webkit_dom_performance_entry_get_duration" webkit_dom_performance_entry_get_duration ::
Ptr DOMPerformanceEntry ->
IO CDouble
dOMPerformanceEntryGetDuration ::
(MonadIO m, DOMPerformanceEntryK a) =>
a ->
m Double
dOMPerformanceEntryGetDuration _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_performance_entry_get_duration _obj'
let result' = realToFrac result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_performance_entry_get_entry_type" webkit_dom_performance_entry_get_entry_type ::
Ptr DOMPerformanceEntry ->
IO CString
dOMPerformanceEntryGetEntryType ::
(MonadIO m, DOMPerformanceEntryK a) =>
a ->
m T.Text
dOMPerformanceEntryGetEntryType _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_performance_entry_get_entry_type _obj'
checkUnexpectedReturnNULL "webkit_dom_performance_entry_get_entry_type" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_performance_entry_get_name" webkit_dom_performance_entry_get_name ::
Ptr DOMPerformanceEntry ->
IO CString
dOMPerformanceEntryGetName ::
(MonadIO m, DOMPerformanceEntryK a) =>
a ->
m T.Text
dOMPerformanceEntryGetName _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_performance_entry_get_name _obj'
checkUnexpectedReturnNULL "webkit_dom_performance_entry_get_name" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_performance_entry_get_start_time" webkit_dom_performance_entry_get_start_time ::
Ptr DOMPerformanceEntry ->
IO CDouble
dOMPerformanceEntryGetStartTime ::
(MonadIO m, DOMPerformanceEntryK a) =>
a ->
m Double
dOMPerformanceEntryGetStartTime _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_performance_entry_get_start_time _obj'
let result' = realToFrac result
touchManagedPtr _obj
return result'