gi-webkit2webextension-0.2.8.12: GI/WebKit2WebExtension/Objects/DOMDocumentType.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}
module GI.WebKit2WebExtension.Objects.DOMDocumentType
(
-- * Exported types
DOMDocumentType(..) ,
DOMDocumentTypeK ,
toDOMDocumentType ,
noDOMDocumentType ,
-- * Methods
-- ** dOMDocumentTypeGetEntities
dOMDocumentTypeGetEntities ,
-- ** dOMDocumentTypeGetInternalSubset
dOMDocumentTypeGetInternalSubset ,
-- ** dOMDocumentTypeGetName
dOMDocumentTypeGetName ,
-- ** dOMDocumentTypeGetNotations
dOMDocumentTypeGetNotations ,
-- ** dOMDocumentTypeGetPublicId
dOMDocumentTypeGetPublicId ,
-- ** dOMDocumentTypeGetSystemId
dOMDocumentTypeGetSystemId ,
-- * Properties
-- ** Entities
DOMDocumentTypeEntitiesPropertyInfo ,
getDOMDocumentTypeEntities ,
-- ** InternalSubset
DOMDocumentTypeInternalSubsetPropertyInfo,
getDOMDocumentTypeInternalSubset ,
-- ** Name
DOMDocumentTypeNamePropertyInfo ,
getDOMDocumentTypeName ,
-- ** Notations
DOMDocumentTypeNotationsPropertyInfo ,
getDOMDocumentTypeNotations ,
-- ** PublicId
DOMDocumentTypePublicIdPropertyInfo ,
getDOMDocumentTypePublicId ,
-- ** SystemId
DOMDocumentTypeSystemIdPropertyInfo ,
getDOMDocumentTypeSystemId ,
) 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.WebKit2WebExtension.Types
import GI.WebKit2WebExtension.Callbacks
import qualified GI.GObject as GObject
newtype DOMDocumentType = DOMDocumentType (ForeignPtr DOMDocumentType)
foreign import ccall "webkit_dom_document_type_get_type"
c_webkit_dom_document_type_get_type :: IO GType
type instance ParentTypes DOMDocumentType = DOMDocumentTypeParentTypes
type DOMDocumentTypeParentTypes = '[DOMNode, DOMObject, GObject.Object, DOMEventTarget]
instance GObject DOMDocumentType where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_webkit_dom_document_type_get_type
class GObject o => DOMDocumentTypeK o
instance (GObject o, IsDescendantOf DOMDocumentType o) => DOMDocumentTypeK o
toDOMDocumentType :: DOMDocumentTypeK o => o -> IO DOMDocumentType
toDOMDocumentType = unsafeCastTo DOMDocumentType
noDOMDocumentType :: Maybe DOMDocumentType
noDOMDocumentType = Nothing
-- VVV Prop "entities"
-- Type: TInterface "WebKit2WebExtension" "DOMNamedNodeMap"
-- Flags: [PropertyReadable]
getDOMDocumentTypeEntities :: (MonadIO m, DOMDocumentTypeK o) => o -> m DOMNamedNodeMap
getDOMDocumentTypeEntities obj = liftIO $ getObjectPropertyObject obj "entities" DOMNamedNodeMap
data DOMDocumentTypeEntitiesPropertyInfo
instance AttrInfo DOMDocumentTypeEntitiesPropertyInfo where
type AttrAllowedOps DOMDocumentTypeEntitiesPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMDocumentTypeEntitiesPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMDocumentTypeEntitiesPropertyInfo = DOMDocumentTypeK
type AttrGetType DOMDocumentTypeEntitiesPropertyInfo = DOMNamedNodeMap
type AttrLabel DOMDocumentTypeEntitiesPropertyInfo = "DOMDocumentType::entities"
attrGet _ = getDOMDocumentTypeEntities
attrSet _ = undefined
attrConstruct _ = undefined
-- VVV Prop "internal-subset"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable]
getDOMDocumentTypeInternalSubset :: (MonadIO m, DOMDocumentTypeK o) => o -> m T.Text
getDOMDocumentTypeInternalSubset obj = liftIO $ getObjectPropertyString obj "internal-subset"
data DOMDocumentTypeInternalSubsetPropertyInfo
instance AttrInfo DOMDocumentTypeInternalSubsetPropertyInfo where
type AttrAllowedOps DOMDocumentTypeInternalSubsetPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMDocumentTypeInternalSubsetPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMDocumentTypeInternalSubsetPropertyInfo = DOMDocumentTypeK
type AttrGetType DOMDocumentTypeInternalSubsetPropertyInfo = T.Text
type AttrLabel DOMDocumentTypeInternalSubsetPropertyInfo = "DOMDocumentType::internal-subset"
attrGet _ = getDOMDocumentTypeInternalSubset
attrSet _ = undefined
attrConstruct _ = undefined
-- VVV Prop "name"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable]
getDOMDocumentTypeName :: (MonadIO m, DOMDocumentTypeK o) => o -> m T.Text
getDOMDocumentTypeName obj = liftIO $ getObjectPropertyString obj "name"
data DOMDocumentTypeNamePropertyInfo
instance AttrInfo DOMDocumentTypeNamePropertyInfo where
type AttrAllowedOps DOMDocumentTypeNamePropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMDocumentTypeNamePropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMDocumentTypeNamePropertyInfo = DOMDocumentTypeK
type AttrGetType DOMDocumentTypeNamePropertyInfo = T.Text
type AttrLabel DOMDocumentTypeNamePropertyInfo = "DOMDocumentType::name"
attrGet _ = getDOMDocumentTypeName
attrSet _ = undefined
attrConstruct _ = undefined
-- VVV Prop "notations"
-- Type: TInterface "WebKit2WebExtension" "DOMNamedNodeMap"
-- Flags: [PropertyReadable]
getDOMDocumentTypeNotations :: (MonadIO m, DOMDocumentTypeK o) => o -> m DOMNamedNodeMap
getDOMDocumentTypeNotations obj = liftIO $ getObjectPropertyObject obj "notations" DOMNamedNodeMap
data DOMDocumentTypeNotationsPropertyInfo
instance AttrInfo DOMDocumentTypeNotationsPropertyInfo where
type AttrAllowedOps DOMDocumentTypeNotationsPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMDocumentTypeNotationsPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMDocumentTypeNotationsPropertyInfo = DOMDocumentTypeK
type AttrGetType DOMDocumentTypeNotationsPropertyInfo = DOMNamedNodeMap
type AttrLabel DOMDocumentTypeNotationsPropertyInfo = "DOMDocumentType::notations"
attrGet _ = getDOMDocumentTypeNotations
attrSet _ = undefined
attrConstruct _ = undefined
-- VVV Prop "public-id"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable]
getDOMDocumentTypePublicId :: (MonadIO m, DOMDocumentTypeK o) => o -> m T.Text
getDOMDocumentTypePublicId obj = liftIO $ getObjectPropertyString obj "public-id"
data DOMDocumentTypePublicIdPropertyInfo
instance AttrInfo DOMDocumentTypePublicIdPropertyInfo where
type AttrAllowedOps DOMDocumentTypePublicIdPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMDocumentTypePublicIdPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMDocumentTypePublicIdPropertyInfo = DOMDocumentTypeK
type AttrGetType DOMDocumentTypePublicIdPropertyInfo = T.Text
type AttrLabel DOMDocumentTypePublicIdPropertyInfo = "DOMDocumentType::public-id"
attrGet _ = getDOMDocumentTypePublicId
attrSet _ = undefined
attrConstruct _ = undefined
-- VVV Prop "system-id"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable]
getDOMDocumentTypeSystemId :: (MonadIO m, DOMDocumentTypeK o) => o -> m T.Text
getDOMDocumentTypeSystemId obj = liftIO $ getObjectPropertyString obj "system-id"
data DOMDocumentTypeSystemIdPropertyInfo
instance AttrInfo DOMDocumentTypeSystemIdPropertyInfo where
type AttrAllowedOps DOMDocumentTypeSystemIdPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMDocumentTypeSystemIdPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMDocumentTypeSystemIdPropertyInfo = DOMDocumentTypeK
type AttrGetType DOMDocumentTypeSystemIdPropertyInfo = T.Text
type AttrLabel DOMDocumentTypeSystemIdPropertyInfo = "DOMDocumentType::system-id"
attrGet _ = getDOMDocumentTypeSystemId
attrSet _ = undefined
attrConstruct _ = undefined
type instance AttributeList DOMDocumentType = DOMDocumentTypeAttributeList
type DOMDocumentTypeAttributeList = ('[ '("base-uri", DOMNodeBaseUriPropertyInfo), '("child-nodes", DOMNodeChildNodesPropertyInfo), '("core-object", DOMObjectCoreObjectPropertyInfo), '("entities", DOMDocumentTypeEntitiesPropertyInfo), '("first-child", DOMNodeFirstChildPropertyInfo), '("internal-subset", DOMDocumentTypeInternalSubsetPropertyInfo), '("last-child", DOMNodeLastChildPropertyInfo), '("local-name", DOMNodeLocalNamePropertyInfo), '("name", DOMDocumentTypeNamePropertyInfo), '("namespace-uri", DOMNodeNamespaceUriPropertyInfo), '("next-sibling", DOMNodeNextSiblingPropertyInfo), '("node-name", DOMNodeNodeNamePropertyInfo), '("node-type", DOMNodeNodeTypePropertyInfo), '("node-value", DOMNodeNodeValuePropertyInfo), '("notations", DOMDocumentTypeNotationsPropertyInfo), '("owner-document", DOMNodeOwnerDocumentPropertyInfo), '("parent-element", DOMNodeParentElementPropertyInfo), '("parent-node", DOMNodeParentNodePropertyInfo), '("prefix", DOMNodePrefixPropertyInfo), '("previous-sibling", DOMNodePreviousSiblingPropertyInfo), '("public-id", DOMDocumentTypePublicIdPropertyInfo), '("system-id", DOMDocumentTypeSystemIdPropertyInfo), '("text-content", DOMNodeTextContentPropertyInfo)] :: [(Symbol, *)])
type instance SignalList DOMDocumentType = DOMDocumentTypeSignalList
type DOMDocumentTypeSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
-- method DOMDocumentType::get_entities
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMDocumentType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMDocumentType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2WebExtension" "DOMNamedNodeMap"
-- throws : False
-- Skip return : False
foreign import ccall "webkit_dom_document_type_get_entities" webkit_dom_document_type_get_entities ::
Ptr DOMDocumentType -> -- _obj : TInterface "WebKit2WebExtension" "DOMDocumentType"
IO (Ptr DOMNamedNodeMap)
dOMDocumentTypeGetEntities ::
(MonadIO m, DOMDocumentTypeK a) =>
a -> -- _obj
m DOMNamedNodeMap
dOMDocumentTypeGetEntities _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_document_type_get_entities _obj'
checkUnexpectedReturnNULL "webkit_dom_document_type_get_entities" result
result' <- (wrapObject DOMNamedNodeMap) result
touchManagedPtr _obj
return result'
-- method DOMDocumentType::get_internal_subset
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMDocumentType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMDocumentType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "webkit_dom_document_type_get_internal_subset" webkit_dom_document_type_get_internal_subset ::
Ptr DOMDocumentType -> -- _obj : TInterface "WebKit2WebExtension" "DOMDocumentType"
IO CString
dOMDocumentTypeGetInternalSubset ::
(MonadIO m, DOMDocumentTypeK a) =>
a -> -- _obj
m T.Text
dOMDocumentTypeGetInternalSubset _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_document_type_get_internal_subset _obj'
checkUnexpectedReturnNULL "webkit_dom_document_type_get_internal_subset" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method DOMDocumentType::get_name
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMDocumentType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMDocumentType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "webkit_dom_document_type_get_name" webkit_dom_document_type_get_name ::
Ptr DOMDocumentType -> -- _obj : TInterface "WebKit2WebExtension" "DOMDocumentType"
IO CString
dOMDocumentTypeGetName ::
(MonadIO m, DOMDocumentTypeK a) =>
a -> -- _obj
m T.Text
dOMDocumentTypeGetName _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_document_type_get_name _obj'
checkUnexpectedReturnNULL "webkit_dom_document_type_get_name" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method DOMDocumentType::get_notations
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMDocumentType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMDocumentType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2WebExtension" "DOMNamedNodeMap"
-- throws : False
-- Skip return : False
foreign import ccall "webkit_dom_document_type_get_notations" webkit_dom_document_type_get_notations ::
Ptr DOMDocumentType -> -- _obj : TInterface "WebKit2WebExtension" "DOMDocumentType"
IO (Ptr DOMNamedNodeMap)
dOMDocumentTypeGetNotations ::
(MonadIO m, DOMDocumentTypeK a) =>
a -> -- _obj
m DOMNamedNodeMap
dOMDocumentTypeGetNotations _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_document_type_get_notations _obj'
checkUnexpectedReturnNULL "webkit_dom_document_type_get_notations" result
result' <- (wrapObject DOMNamedNodeMap) result
touchManagedPtr _obj
return result'
-- method DOMDocumentType::get_public_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMDocumentType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMDocumentType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "webkit_dom_document_type_get_public_id" webkit_dom_document_type_get_public_id ::
Ptr DOMDocumentType -> -- _obj : TInterface "WebKit2WebExtension" "DOMDocumentType"
IO CString
dOMDocumentTypeGetPublicId ::
(MonadIO m, DOMDocumentTypeK a) =>
a -> -- _obj
m T.Text
dOMDocumentTypeGetPublicId _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_document_type_get_public_id _obj'
checkUnexpectedReturnNULL "webkit_dom_document_type_get_public_id" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
-- method DOMDocumentType::get_system_id
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMDocumentType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMDocumentType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "webkit_dom_document_type_get_system_id" webkit_dom_document_type_get_system_id ::
Ptr DOMDocumentType -> -- _obj : TInterface "WebKit2WebExtension" "DOMDocumentType"
IO CString
dOMDocumentTypeGetSystemId ::
(MonadIO m, DOMDocumentTypeK a) =>
a -> -- _obj
m T.Text
dOMDocumentTypeGetSystemId _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_document_type_get_system_id _obj'
checkUnexpectedReturnNULL "webkit_dom_document_type_get_system_id" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'