module GI.WebKit.Objects.DOMLocation
(
DOMLocation(..) ,
DOMLocationK ,
toDOMLocation ,
noDOMLocation ,
dOMLocationGetAncestorOrigins ,
dOMLocationGetHash ,
dOMLocationGetHost ,
dOMLocationGetHostname ,
dOMLocationGetHref ,
dOMLocationGetOrigin ,
dOMLocationGetPathname ,
dOMLocationGetPort ,
dOMLocationGetProtocol ,
dOMLocationGetSearch ,
DOMLocationAncestorOriginsPropertyInfo ,
getDOMLocationAncestorOrigins ,
DOMLocationHashPropertyInfo ,
getDOMLocationHash ,
DOMLocationHostPropertyInfo ,
getDOMLocationHost ,
DOMLocationHostnamePropertyInfo ,
getDOMLocationHostname ,
DOMLocationHrefPropertyInfo ,
getDOMLocationHref ,
DOMLocationOriginPropertyInfo ,
getDOMLocationOrigin ,
DOMLocationPathnamePropertyInfo ,
getDOMLocationPathname ,
DOMLocationPortPropertyInfo ,
getDOMLocationPort ,
DOMLocationProtocolPropertyInfo ,
getDOMLocationProtocol ,
DOMLocationSearchPropertyInfo ,
getDOMLocationSearch ,
) 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 DOMLocation = DOMLocation (ForeignPtr DOMLocation)
foreign import ccall "webkit_dom_location_get_type"
c_webkit_dom_location_get_type :: IO GType
type instance ParentTypes DOMLocation = DOMLocationParentTypes
type DOMLocationParentTypes = '[DOMObject, GObject.Object]
instance GObject DOMLocation where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_webkit_dom_location_get_type
class GObject o => DOMLocationK o
instance (GObject o, IsDescendantOf DOMLocation o) => DOMLocationK o
toDOMLocation :: DOMLocationK o => o -> IO DOMLocation
toDOMLocation = unsafeCastTo DOMLocation
noDOMLocation :: Maybe DOMLocation
noDOMLocation = Nothing
getDOMLocationAncestorOrigins :: (MonadIO m, DOMLocationK o) => o -> m DOMDOMStringList
getDOMLocationAncestorOrigins obj = liftIO $ getObjectPropertyObject obj "ancestor-origins" DOMDOMStringList
data DOMLocationAncestorOriginsPropertyInfo
instance AttrInfo DOMLocationAncestorOriginsPropertyInfo where
type AttrAllowedOps DOMLocationAncestorOriginsPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMLocationAncestorOriginsPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMLocationAncestorOriginsPropertyInfo = DOMLocationK
type AttrGetType DOMLocationAncestorOriginsPropertyInfo = DOMDOMStringList
type AttrLabel DOMLocationAncestorOriginsPropertyInfo = "DOMLocation::ancestor-origins"
attrGet _ = getDOMLocationAncestorOrigins
attrSet _ = undefined
attrConstruct _ = undefined
getDOMLocationHash :: (MonadIO m, DOMLocationK o) => o -> m T.Text
getDOMLocationHash obj = liftIO $ getObjectPropertyString obj "hash"
data DOMLocationHashPropertyInfo
instance AttrInfo DOMLocationHashPropertyInfo where
type AttrAllowedOps DOMLocationHashPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMLocationHashPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMLocationHashPropertyInfo = DOMLocationK
type AttrGetType DOMLocationHashPropertyInfo = T.Text
type AttrLabel DOMLocationHashPropertyInfo = "DOMLocation::hash"
attrGet _ = getDOMLocationHash
attrSet _ = undefined
attrConstruct _ = undefined
getDOMLocationHost :: (MonadIO m, DOMLocationK o) => o -> m T.Text
getDOMLocationHost obj = liftIO $ getObjectPropertyString obj "host"
data DOMLocationHostPropertyInfo
instance AttrInfo DOMLocationHostPropertyInfo where
type AttrAllowedOps DOMLocationHostPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMLocationHostPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMLocationHostPropertyInfo = DOMLocationK
type AttrGetType DOMLocationHostPropertyInfo = T.Text
type AttrLabel DOMLocationHostPropertyInfo = "DOMLocation::host"
attrGet _ = getDOMLocationHost
attrSet _ = undefined
attrConstruct _ = undefined
getDOMLocationHostname :: (MonadIO m, DOMLocationK o) => o -> m T.Text
getDOMLocationHostname obj = liftIO $ getObjectPropertyString obj "hostname"
data DOMLocationHostnamePropertyInfo
instance AttrInfo DOMLocationHostnamePropertyInfo where
type AttrAllowedOps DOMLocationHostnamePropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMLocationHostnamePropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMLocationHostnamePropertyInfo = DOMLocationK
type AttrGetType DOMLocationHostnamePropertyInfo = T.Text
type AttrLabel DOMLocationHostnamePropertyInfo = "DOMLocation::hostname"
attrGet _ = getDOMLocationHostname
attrSet _ = undefined
attrConstruct _ = undefined
getDOMLocationHref :: (MonadIO m, DOMLocationK o) => o -> m T.Text
getDOMLocationHref obj = liftIO $ getObjectPropertyString obj "href"
data DOMLocationHrefPropertyInfo
instance AttrInfo DOMLocationHrefPropertyInfo where
type AttrAllowedOps DOMLocationHrefPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMLocationHrefPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMLocationHrefPropertyInfo = DOMLocationK
type AttrGetType DOMLocationHrefPropertyInfo = T.Text
type AttrLabel DOMLocationHrefPropertyInfo = "DOMLocation::href"
attrGet _ = getDOMLocationHref
attrSet _ = undefined
attrConstruct _ = undefined
getDOMLocationOrigin :: (MonadIO m, DOMLocationK o) => o -> m T.Text
getDOMLocationOrigin obj = liftIO $ getObjectPropertyString obj "origin"
data DOMLocationOriginPropertyInfo
instance AttrInfo DOMLocationOriginPropertyInfo where
type AttrAllowedOps DOMLocationOriginPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMLocationOriginPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMLocationOriginPropertyInfo = DOMLocationK
type AttrGetType DOMLocationOriginPropertyInfo = T.Text
type AttrLabel DOMLocationOriginPropertyInfo = "DOMLocation::origin"
attrGet _ = getDOMLocationOrigin
attrSet _ = undefined
attrConstruct _ = undefined
getDOMLocationPathname :: (MonadIO m, DOMLocationK o) => o -> m T.Text
getDOMLocationPathname obj = liftIO $ getObjectPropertyString obj "pathname"
data DOMLocationPathnamePropertyInfo
instance AttrInfo DOMLocationPathnamePropertyInfo where
type AttrAllowedOps DOMLocationPathnamePropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMLocationPathnamePropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMLocationPathnamePropertyInfo = DOMLocationK
type AttrGetType DOMLocationPathnamePropertyInfo = T.Text
type AttrLabel DOMLocationPathnamePropertyInfo = "DOMLocation::pathname"
attrGet _ = getDOMLocationPathname
attrSet _ = undefined
attrConstruct _ = undefined
getDOMLocationPort :: (MonadIO m, DOMLocationK o) => o -> m T.Text
getDOMLocationPort obj = liftIO $ getObjectPropertyString obj "port"
data DOMLocationPortPropertyInfo
instance AttrInfo DOMLocationPortPropertyInfo where
type AttrAllowedOps DOMLocationPortPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMLocationPortPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMLocationPortPropertyInfo = DOMLocationK
type AttrGetType DOMLocationPortPropertyInfo = T.Text
type AttrLabel DOMLocationPortPropertyInfo = "DOMLocation::port"
attrGet _ = getDOMLocationPort
attrSet _ = undefined
attrConstruct _ = undefined
getDOMLocationProtocol :: (MonadIO m, DOMLocationK o) => o -> m T.Text
getDOMLocationProtocol obj = liftIO $ getObjectPropertyString obj "protocol"
data DOMLocationProtocolPropertyInfo
instance AttrInfo DOMLocationProtocolPropertyInfo where
type AttrAllowedOps DOMLocationProtocolPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMLocationProtocolPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMLocationProtocolPropertyInfo = DOMLocationK
type AttrGetType DOMLocationProtocolPropertyInfo = T.Text
type AttrLabel DOMLocationProtocolPropertyInfo = "DOMLocation::protocol"
attrGet _ = getDOMLocationProtocol
attrSet _ = undefined
attrConstruct _ = undefined
getDOMLocationSearch :: (MonadIO m, DOMLocationK o) => o -> m T.Text
getDOMLocationSearch obj = liftIO $ getObjectPropertyString obj "search"
data DOMLocationSearchPropertyInfo
instance AttrInfo DOMLocationSearchPropertyInfo where
type AttrAllowedOps DOMLocationSearchPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMLocationSearchPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMLocationSearchPropertyInfo = DOMLocationK
type AttrGetType DOMLocationSearchPropertyInfo = T.Text
type AttrLabel DOMLocationSearchPropertyInfo = "DOMLocation::search"
attrGet _ = getDOMLocationSearch
attrSet _ = undefined
attrConstruct _ = undefined
type instance AttributeList DOMLocation = DOMLocationAttributeList
type DOMLocationAttributeList = ('[ '("ancestor-origins", DOMLocationAncestorOriginsPropertyInfo), '("core-object", DOMObjectCoreObjectPropertyInfo), '("hash", DOMLocationHashPropertyInfo), '("host", DOMLocationHostPropertyInfo), '("hostname", DOMLocationHostnamePropertyInfo), '("href", DOMLocationHrefPropertyInfo), '("origin", DOMLocationOriginPropertyInfo), '("pathname", DOMLocationPathnamePropertyInfo), '("port", DOMLocationPortPropertyInfo), '("protocol", DOMLocationProtocolPropertyInfo), '("search", DOMLocationSearchPropertyInfo)] :: [(Symbol, *)])
type instance SignalList DOMLocation = DOMLocationSignalList
type DOMLocationSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "webkit_dom_location_get_ancestor_origins" webkit_dom_location_get_ancestor_origins ::
Ptr DOMLocation ->
IO (Ptr DOMDOMStringList)
dOMLocationGetAncestorOrigins ::
(MonadIO m, DOMLocationK a) =>
a ->
m DOMDOMStringList
dOMLocationGetAncestorOrigins _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_location_get_ancestor_origins _obj'
checkUnexpectedReturnNULL "webkit_dom_location_get_ancestor_origins" result
result' <- (wrapObject DOMDOMStringList) result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_location_get_hash" webkit_dom_location_get_hash ::
Ptr DOMLocation ->
IO CString
dOMLocationGetHash ::
(MonadIO m, DOMLocationK a) =>
a ->
m T.Text
dOMLocationGetHash _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_location_get_hash _obj'
checkUnexpectedReturnNULL "webkit_dom_location_get_hash" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_location_get_host" webkit_dom_location_get_host ::
Ptr DOMLocation ->
IO CString
dOMLocationGetHost ::
(MonadIO m, DOMLocationK a) =>
a ->
m T.Text
dOMLocationGetHost _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_location_get_host _obj'
checkUnexpectedReturnNULL "webkit_dom_location_get_host" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_location_get_hostname" webkit_dom_location_get_hostname ::
Ptr DOMLocation ->
IO CString
dOMLocationGetHostname ::
(MonadIO m, DOMLocationK a) =>
a ->
m T.Text
dOMLocationGetHostname _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_location_get_hostname _obj'
checkUnexpectedReturnNULL "webkit_dom_location_get_hostname" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_location_get_href" webkit_dom_location_get_href ::
Ptr DOMLocation ->
IO CString
dOMLocationGetHref ::
(MonadIO m, DOMLocationK a) =>
a ->
m T.Text
dOMLocationGetHref _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_location_get_href _obj'
checkUnexpectedReturnNULL "webkit_dom_location_get_href" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_location_get_origin" webkit_dom_location_get_origin ::
Ptr DOMLocation ->
IO CString
dOMLocationGetOrigin ::
(MonadIO m, DOMLocationK a) =>
a ->
m T.Text
dOMLocationGetOrigin _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_location_get_origin _obj'
checkUnexpectedReturnNULL "webkit_dom_location_get_origin" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_location_get_pathname" webkit_dom_location_get_pathname ::
Ptr DOMLocation ->
IO CString
dOMLocationGetPathname ::
(MonadIO m, DOMLocationK a) =>
a ->
m T.Text
dOMLocationGetPathname _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_location_get_pathname _obj'
checkUnexpectedReturnNULL "webkit_dom_location_get_pathname" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_location_get_port" webkit_dom_location_get_port ::
Ptr DOMLocation ->
IO CString
dOMLocationGetPort ::
(MonadIO m, DOMLocationK a) =>
a ->
m T.Text
dOMLocationGetPort _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_location_get_port _obj'
checkUnexpectedReturnNULL "webkit_dom_location_get_port" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_location_get_protocol" webkit_dom_location_get_protocol ::
Ptr DOMLocation ->
IO CString
dOMLocationGetProtocol ::
(MonadIO m, DOMLocationK a) =>
a ->
m T.Text
dOMLocationGetProtocol _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_location_get_protocol _obj'
checkUnexpectedReturnNULL "webkit_dom_location_get_protocol" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_location_get_search" webkit_dom_location_get_search ::
Ptr DOMLocation ->
IO CString
dOMLocationGetSearch ::
(MonadIO m, DOMLocationK a) =>
a ->
m T.Text
dOMLocationGetSearch _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_location_get_search _obj'
checkUnexpectedReturnNULL "webkit_dom_location_get_search" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'