{- |
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.DOMAttr
    ( 

-- * Exported types
    DOMAttr(..)                             ,
    IsDOMAttr                               ,
    toDOMAttr                               ,
    noDOMAttr                               ,


 -- * Methods
-- ** getLocalName #method:getLocalName#
    DOMAttrGetLocalNameMethodInfo           ,
    dOMAttrGetLocalName                     ,


-- ** getName #method:getName#
    DOMAttrGetNameMethodInfo                ,
    dOMAttrGetName                          ,


-- ** getNamespaceUri #method:getNamespaceUri#
    DOMAttrGetNamespaceUriMethodInfo        ,
    dOMAttrGetNamespaceUri                  ,


-- ** getOwnerElement #method:getOwnerElement#
    DOMAttrGetOwnerElementMethodInfo        ,
    dOMAttrGetOwnerElement                  ,


-- ** getPrefix #method:getPrefix#
    DOMAttrGetPrefixMethodInfo              ,
    dOMAttrGetPrefix                        ,


-- ** getSpecified #method:getSpecified#
    DOMAttrGetSpecifiedMethodInfo           ,
    dOMAttrGetSpecified                     ,


-- ** getValue #method:getValue#
    DOMAttrGetValueMethodInfo               ,
    dOMAttrGetValue                         ,


-- ** setValue #method:setValue#
    DOMAttrSetValueMethodInfo               ,
    dOMAttrSetValue                         ,




 -- * Properties
-- ** localName #attr:localName#
    DOMAttrLocalNamePropertyInfo            ,
    dOMAttrLocalName                        ,
    getDOMAttrLocalName                     ,


-- ** name #attr:name#
    DOMAttrNamePropertyInfo                 ,
    dOMAttrName                             ,
    getDOMAttrName                          ,


-- ** namespaceUri #attr:namespaceUri#
    DOMAttrNamespaceUriPropertyInfo         ,
    dOMAttrNamespaceUri                     ,
    getDOMAttrNamespaceUri                  ,


-- ** ownerElement #attr:ownerElement#
    DOMAttrOwnerElementPropertyInfo         ,
    dOMAttrOwnerElement                     ,
    getDOMAttrOwnerElement                  ,


-- ** prefix #attr:prefix#
    DOMAttrPrefixPropertyInfo               ,
    dOMAttrPrefix                           ,
    getDOMAttrPrefix                        ,


-- ** specified #attr:specified#
    DOMAttrSpecifiedPropertyInfo            ,
    dOMAttrSpecified                        ,
    getDOMAttrSpecified                     ,


-- ** value #attr:value#
    DOMAttrValuePropertyInfo                ,
    clearDOMAttrValue                       ,
    constructDOMAttrValue                   ,
    dOMAttrValue                            ,
    getDOMAttrValue                         ,
    setDOMAttrValue                         ,




    ) 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 {-# SOURCE #-} qualified GI.WebKit2WebExtension.Interfaces.DOMEventTarget as WebKit2WebExtension.DOMEventTarget
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMElement as WebKit2WebExtension.DOMElement
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMNode as WebKit2WebExtension.DOMNode
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMObject as WebKit2WebExtension.DOMObject

newtype DOMAttr = DOMAttr (ManagedPtr DOMAttr)
foreign import ccall "webkit_dom_attr_get_type"
    c_webkit_dom_attr_get_type :: IO GType

instance GObject DOMAttr where
    gobjectType _ = c_webkit_dom_attr_get_type
    

class GObject o => IsDOMAttr o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError DOMAttr a) =>
    IsDOMAttr a
#endif
instance IsDOMAttr DOMAttr
instance WebKit2WebExtension.DOMNode.IsDOMNode DOMAttr
instance WebKit2WebExtension.DOMObject.IsDOMObject DOMAttr
instance GObject.Object.IsObject DOMAttr
instance WebKit2WebExtension.DOMEventTarget.IsDOMEventTarget DOMAttr

toDOMAttr :: IsDOMAttr o => o -> IO DOMAttr
toDOMAttr = unsafeCastTo DOMAttr

noDOMAttr :: Maybe DOMAttr
noDOMAttr = Nothing

type family ResolveDOMAttrMethod (t :: Symbol) (o :: *) :: * where
    ResolveDOMAttrMethod "addEventListener" o = WebKit2WebExtension.DOMEventTarget.DOMEventTargetAddEventListenerMethodInfo
    ResolveDOMAttrMethod "appendChild" o = WebKit2WebExtension.DOMNode.DOMNodeAppendChildMethodInfo
    ResolveDOMAttrMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveDOMAttrMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveDOMAttrMethod "cloneNodeWithError" o = WebKit2WebExtension.DOMNode.DOMNodeCloneNodeWithErrorMethodInfo
    ResolveDOMAttrMethod "compareDocumentPosition" o = WebKit2WebExtension.DOMNode.DOMNodeCompareDocumentPositionMethodInfo
    ResolveDOMAttrMethod "contains" o = WebKit2WebExtension.DOMNode.DOMNodeContainsMethodInfo
    ResolveDOMAttrMethod "dispatchEvent" o = WebKit2WebExtension.DOMEventTarget.DOMEventTargetDispatchEventMethodInfo
    ResolveDOMAttrMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveDOMAttrMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveDOMAttrMethod "hasChildNodes" o = WebKit2WebExtension.DOMNode.DOMNodeHasChildNodesMethodInfo
    ResolveDOMAttrMethod "insertBefore" o = WebKit2WebExtension.DOMNode.DOMNodeInsertBeforeMethodInfo
    ResolveDOMAttrMethod "isDefaultNamespace" o = WebKit2WebExtension.DOMNode.DOMNodeIsDefaultNamespaceMethodInfo
    ResolveDOMAttrMethod "isEqualNode" o = WebKit2WebExtension.DOMNode.DOMNodeIsEqualNodeMethodInfo
    ResolveDOMAttrMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveDOMAttrMethod "isSameNode" o = WebKit2WebExtension.DOMNode.DOMNodeIsSameNodeMethodInfo
    ResolveDOMAttrMethod "isSupported" o = WebKit2WebExtension.DOMNode.DOMNodeIsSupportedMethodInfo
    ResolveDOMAttrMethod "lookupNamespaceUri" o = WebKit2WebExtension.DOMNode.DOMNodeLookupNamespaceUriMethodInfo
    ResolveDOMAttrMethod "lookupPrefix" o = WebKit2WebExtension.DOMNode.DOMNodeLookupPrefixMethodInfo
    ResolveDOMAttrMethod "normalize" o = WebKit2WebExtension.DOMNode.DOMNodeNormalizeMethodInfo
    ResolveDOMAttrMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveDOMAttrMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveDOMAttrMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveDOMAttrMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveDOMAttrMethod "removeChild" o = WebKit2WebExtension.DOMNode.DOMNodeRemoveChildMethodInfo
    ResolveDOMAttrMethod "removeEventListener" o = WebKit2WebExtension.DOMEventTarget.DOMEventTargetRemoveEventListenerMethodInfo
    ResolveDOMAttrMethod "replaceChild" o = WebKit2WebExtension.DOMNode.DOMNodeReplaceChildMethodInfo
    ResolveDOMAttrMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveDOMAttrMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    ResolveDOMAttrMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveDOMAttrMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveDOMAttrMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveDOMAttrMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveDOMAttrMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveDOMAttrMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveDOMAttrMethod "getBaseUri" o = WebKit2WebExtension.DOMNode.DOMNodeGetBaseUriMethodInfo
    ResolveDOMAttrMethod "getChildNodes" o = WebKit2WebExtension.DOMNode.DOMNodeGetChildNodesMethodInfo
    ResolveDOMAttrMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveDOMAttrMethod "getFirstChild" o = WebKit2WebExtension.DOMNode.DOMNodeGetFirstChildMethodInfo
    ResolveDOMAttrMethod "getLastChild" o = WebKit2WebExtension.DOMNode.DOMNodeGetLastChildMethodInfo
    ResolveDOMAttrMethod "getLocalName" o = DOMAttrGetLocalNameMethodInfo
    ResolveDOMAttrMethod "getName" o = DOMAttrGetNameMethodInfo
    ResolveDOMAttrMethod "getNamespaceUri" o = DOMAttrGetNamespaceUriMethodInfo
    ResolveDOMAttrMethod "getNextSibling" o = WebKit2WebExtension.DOMNode.DOMNodeGetNextSiblingMethodInfo
    ResolveDOMAttrMethod "getNodeName" o = WebKit2WebExtension.DOMNode.DOMNodeGetNodeNameMethodInfo
    ResolveDOMAttrMethod "getNodeType" o = WebKit2WebExtension.DOMNode.DOMNodeGetNodeTypeMethodInfo
    ResolveDOMAttrMethod "getNodeValue" o = WebKit2WebExtension.DOMNode.DOMNodeGetNodeValueMethodInfo
    ResolveDOMAttrMethod "getOwnerDocument" o = WebKit2WebExtension.DOMNode.DOMNodeGetOwnerDocumentMethodInfo
    ResolveDOMAttrMethod "getOwnerElement" o = DOMAttrGetOwnerElementMethodInfo
    ResolveDOMAttrMethod "getParentElement" o = WebKit2WebExtension.DOMNode.DOMNodeGetParentElementMethodInfo
    ResolveDOMAttrMethod "getParentNode" o = WebKit2WebExtension.DOMNode.DOMNodeGetParentNodeMethodInfo
    ResolveDOMAttrMethod "getPrefix" o = DOMAttrGetPrefixMethodInfo
    ResolveDOMAttrMethod "getPreviousSibling" o = WebKit2WebExtension.DOMNode.DOMNodeGetPreviousSiblingMethodInfo
    ResolveDOMAttrMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveDOMAttrMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveDOMAttrMethod "getSpecified" o = DOMAttrGetSpecifiedMethodInfo
    ResolveDOMAttrMethod "getTextContent" o = WebKit2WebExtension.DOMNode.DOMNodeGetTextContentMethodInfo
    ResolveDOMAttrMethod "getValue" o = DOMAttrGetValueMethodInfo
    ResolveDOMAttrMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveDOMAttrMethod "setNodeValue" o = WebKit2WebExtension.DOMNode.DOMNodeSetNodeValueMethodInfo
    ResolveDOMAttrMethod "setPrefix" o = WebKit2WebExtension.DOMNode.DOMNodeSetPrefixMethodInfo
    ResolveDOMAttrMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveDOMAttrMethod "setTextContent" o = WebKit2WebExtension.DOMNode.DOMNodeSetTextContentMethodInfo
    ResolveDOMAttrMethod "setValue" o = DOMAttrSetValueMethodInfo
    ResolveDOMAttrMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveDOMAttrMethod t DOMAttr, O.MethodInfo info DOMAttr p) => O.IsLabelProxy t (DOMAttr -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveDOMAttrMethod t DOMAttr, O.MethodInfo info DOMAttr p) => O.IsLabel t (DOMAttr -> p) where
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif

-- VVV Prop "local-name"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

getDOMAttrLocalName :: (MonadIO m, IsDOMAttr o) => o -> m (Maybe T.Text)
getDOMAttrLocalName obj = liftIO $ getObjectPropertyString obj "local-name"

data DOMAttrLocalNamePropertyInfo
instance AttrInfo DOMAttrLocalNamePropertyInfo where
    type AttrAllowedOps DOMAttrLocalNamePropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DOMAttrLocalNamePropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMAttrLocalNamePropertyInfo = IsDOMAttr
    type AttrGetType DOMAttrLocalNamePropertyInfo = (Maybe T.Text)
    type AttrLabel DOMAttrLocalNamePropertyInfo = "local-name"
    type AttrOrigin DOMAttrLocalNamePropertyInfo = DOMAttr
    attrGet _ = getDOMAttrLocalName
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "name"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

getDOMAttrName :: (MonadIO m, IsDOMAttr o) => o -> m (Maybe T.Text)
getDOMAttrName obj = liftIO $ getObjectPropertyString obj "name"

data DOMAttrNamePropertyInfo
instance AttrInfo DOMAttrNamePropertyInfo where
    type AttrAllowedOps DOMAttrNamePropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DOMAttrNamePropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMAttrNamePropertyInfo = IsDOMAttr
    type AttrGetType DOMAttrNamePropertyInfo = (Maybe T.Text)
    type AttrLabel DOMAttrNamePropertyInfo = "name"
    type AttrOrigin DOMAttrNamePropertyInfo = DOMAttr
    attrGet _ = getDOMAttrName
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "namespace-uri"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

getDOMAttrNamespaceUri :: (MonadIO m, IsDOMAttr o) => o -> m (Maybe T.Text)
getDOMAttrNamespaceUri obj = liftIO $ getObjectPropertyString obj "namespace-uri"

data DOMAttrNamespaceUriPropertyInfo
instance AttrInfo DOMAttrNamespaceUriPropertyInfo where
    type AttrAllowedOps DOMAttrNamespaceUriPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DOMAttrNamespaceUriPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMAttrNamespaceUriPropertyInfo = IsDOMAttr
    type AttrGetType DOMAttrNamespaceUriPropertyInfo = (Maybe T.Text)
    type AttrLabel DOMAttrNamespaceUriPropertyInfo = "namespace-uri"
    type AttrOrigin DOMAttrNamespaceUriPropertyInfo = DOMAttr
    attrGet _ = getDOMAttrNamespaceUri
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "owner-element"
   -- Type: TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMElement"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

getDOMAttrOwnerElement :: (MonadIO m, IsDOMAttr o) => o -> m WebKit2WebExtension.DOMElement.DOMElement
getDOMAttrOwnerElement obj = liftIO $ checkUnexpectedNothing "getDOMAttrOwnerElement" $ getObjectPropertyObject obj "owner-element" WebKit2WebExtension.DOMElement.DOMElement

data DOMAttrOwnerElementPropertyInfo
instance AttrInfo DOMAttrOwnerElementPropertyInfo where
    type AttrAllowedOps DOMAttrOwnerElementPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DOMAttrOwnerElementPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMAttrOwnerElementPropertyInfo = IsDOMAttr
    type AttrGetType DOMAttrOwnerElementPropertyInfo = WebKit2WebExtension.DOMElement.DOMElement
    type AttrLabel DOMAttrOwnerElementPropertyInfo = "owner-element"
    type AttrOrigin DOMAttrOwnerElementPropertyInfo = DOMAttr
    attrGet _ = getDOMAttrOwnerElement
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "prefix"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

getDOMAttrPrefix :: (MonadIO m, IsDOMAttr o) => o -> m (Maybe T.Text)
getDOMAttrPrefix obj = liftIO $ getObjectPropertyString obj "prefix"

data DOMAttrPrefixPropertyInfo
instance AttrInfo DOMAttrPrefixPropertyInfo where
    type AttrAllowedOps DOMAttrPrefixPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DOMAttrPrefixPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMAttrPrefixPropertyInfo = IsDOMAttr
    type AttrGetType DOMAttrPrefixPropertyInfo = (Maybe T.Text)
    type AttrLabel DOMAttrPrefixPropertyInfo = "prefix"
    type AttrOrigin DOMAttrPrefixPropertyInfo = DOMAttr
    attrGet _ = getDOMAttrPrefix
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "specified"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

getDOMAttrSpecified :: (MonadIO m, IsDOMAttr o) => o -> m Bool
getDOMAttrSpecified obj = liftIO $ getObjectPropertyBool obj "specified"

data DOMAttrSpecifiedPropertyInfo
instance AttrInfo DOMAttrSpecifiedPropertyInfo where
    type AttrAllowedOps DOMAttrSpecifiedPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMAttrSpecifiedPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMAttrSpecifiedPropertyInfo = IsDOMAttr
    type AttrGetType DOMAttrSpecifiedPropertyInfo = Bool
    type AttrLabel DOMAttrSpecifiedPropertyInfo = "specified"
    type AttrOrigin DOMAttrSpecifiedPropertyInfo = DOMAttr
    attrGet _ = getDOMAttrSpecified
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "value"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Nothing)

getDOMAttrValue :: (MonadIO m, IsDOMAttr o) => o -> m (Maybe T.Text)
getDOMAttrValue obj = liftIO $ getObjectPropertyString obj "value"

setDOMAttrValue :: (MonadIO m, IsDOMAttr o) => o -> T.Text -> m ()
setDOMAttrValue obj val = liftIO $ setObjectPropertyString obj "value" (Just val)

constructDOMAttrValue :: (IsDOMAttr o) => T.Text -> IO (GValueConstruct o)
constructDOMAttrValue val = constructObjectPropertyString "value" (Just val)

clearDOMAttrValue :: (MonadIO m, IsDOMAttr o) => o -> m ()
clearDOMAttrValue obj = liftIO $ setObjectPropertyString obj "value" (Nothing :: Maybe T.Text)

data DOMAttrValuePropertyInfo
instance AttrInfo DOMAttrValuePropertyInfo where
    type AttrAllowedOps DOMAttrValuePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DOMAttrValuePropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint DOMAttrValuePropertyInfo = IsDOMAttr
    type AttrGetType DOMAttrValuePropertyInfo = (Maybe T.Text)
    type AttrLabel DOMAttrValuePropertyInfo = "value"
    type AttrOrigin DOMAttrValuePropertyInfo = DOMAttr
    attrGet _ = getDOMAttrValue
    attrSet _ = setDOMAttrValue
    attrConstruct _ = constructDOMAttrValue
    attrClear _ = clearDOMAttrValue

instance O.HasAttributeList DOMAttr
type instance O.AttributeList DOMAttr = DOMAttrAttributeList
type DOMAttrAttributeList = ('[ '("baseUri", WebKit2WebExtension.DOMNode.DOMNodeBaseUriPropertyInfo), '("childNodes", WebKit2WebExtension.DOMNode.DOMNodeChildNodesPropertyInfo), '("coreObject", WebKit2WebExtension.DOMObject.DOMObjectCoreObjectPropertyInfo), '("firstChild", WebKit2WebExtension.DOMNode.DOMNodeFirstChildPropertyInfo), '("lastChild", WebKit2WebExtension.DOMNode.DOMNodeLastChildPropertyInfo), '("localName", DOMAttrLocalNamePropertyInfo), '("name", DOMAttrNamePropertyInfo), '("namespaceUri", DOMAttrNamespaceUriPropertyInfo), '("nextSibling", WebKit2WebExtension.DOMNode.DOMNodeNextSiblingPropertyInfo), '("nodeName", WebKit2WebExtension.DOMNode.DOMNodeNodeNamePropertyInfo), '("nodeType", WebKit2WebExtension.DOMNode.DOMNodeNodeTypePropertyInfo), '("nodeValue", WebKit2WebExtension.DOMNode.DOMNodeNodeValuePropertyInfo), '("ownerDocument", WebKit2WebExtension.DOMNode.DOMNodeOwnerDocumentPropertyInfo), '("ownerElement", DOMAttrOwnerElementPropertyInfo), '("parentElement", WebKit2WebExtension.DOMNode.DOMNodeParentElementPropertyInfo), '("parentNode", WebKit2WebExtension.DOMNode.DOMNodeParentNodePropertyInfo), '("prefix", DOMAttrPrefixPropertyInfo), '("previousSibling", WebKit2WebExtension.DOMNode.DOMNodePreviousSiblingPropertyInfo), '("specified", DOMAttrSpecifiedPropertyInfo), '("textContent", WebKit2WebExtension.DOMNode.DOMNodeTextContentPropertyInfo), '("value", DOMAttrValuePropertyInfo)] :: [(Symbol, *)])

dOMAttrLocalName :: AttrLabelProxy "localName"
dOMAttrLocalName = AttrLabelProxy

dOMAttrName :: AttrLabelProxy "name"
dOMAttrName = AttrLabelProxy

dOMAttrNamespaceUri :: AttrLabelProxy "namespaceUri"
dOMAttrNamespaceUri = AttrLabelProxy

dOMAttrOwnerElement :: AttrLabelProxy "ownerElement"
dOMAttrOwnerElement = AttrLabelProxy

dOMAttrPrefix :: AttrLabelProxy "prefix"
dOMAttrPrefix = AttrLabelProxy

dOMAttrSpecified :: AttrLabelProxy "specified"
dOMAttrSpecified = AttrLabelProxy

dOMAttrValue :: AttrLabelProxy "value"
dOMAttrValue = AttrLabelProxy

type instance O.SignalList DOMAttr = DOMAttrSignalList
type DOMAttrSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method DOMAttr::get_local_name
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMAttr"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMAttr", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_attr_get_local_name" webkit_dom_attr_get_local_name :: 
    Ptr DOMAttr ->                          -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMAttr"})
    IO CString

{- |
/No description available in the introspection data./

@since 2.14
-}
dOMAttrGetLocalName ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMAttr a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMAttr.DOMAttr' -}
    -> m T.Text
    {- ^ __Returns:__ A @/gchar/@ -}
dOMAttrGetLocalName self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_attr_get_local_name self'
    checkUnexpectedReturnNULL "dOMAttrGetLocalName" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr self
    return result'

data DOMAttrGetLocalNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDOMAttr a) => O.MethodInfo DOMAttrGetLocalNameMethodInfo a signature where
    overloadedMethod _ = dOMAttrGetLocalName

-- method DOMAttr::get_name
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMAttr"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMAttr", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_attr_get_name" webkit_dom_attr_get_name :: 
    Ptr DOMAttr ->                          -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMAttr"})
    IO CString

{- |
/No description available in the introspection data./
-}
dOMAttrGetName ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMAttr a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMAttr.DOMAttr' -}
    -> m T.Text
    {- ^ __Returns:__ A @/gchar/@ -}
dOMAttrGetName self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_attr_get_name self'
    checkUnexpectedReturnNULL "dOMAttrGetName" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr self
    return result'

data DOMAttrGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDOMAttr a) => O.MethodInfo DOMAttrGetNameMethodInfo a signature where
    overloadedMethod _ = dOMAttrGetName

-- method DOMAttr::get_namespace_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMAttr"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMAttr", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_attr_get_namespace_uri" webkit_dom_attr_get_namespace_uri :: 
    Ptr DOMAttr ->                          -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMAttr"})
    IO CString

{- |
/No description available in the introspection data./

@since 2.14
-}
dOMAttrGetNamespaceUri ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMAttr a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMAttr.DOMAttr' -}
    -> m T.Text
    {- ^ __Returns:__ A @/gchar/@ -}
dOMAttrGetNamespaceUri self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_attr_get_namespace_uri self'
    checkUnexpectedReturnNULL "dOMAttrGetNamespaceUri" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr self
    return result'

data DOMAttrGetNamespaceUriMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDOMAttr a) => O.MethodInfo DOMAttrGetNamespaceUriMethodInfo a signature where
    overloadedMethod _ = dOMAttrGetNamespaceUri

-- method DOMAttr::get_owner_element
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMAttr"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMAttr", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMElement"}))
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_attr_get_owner_element" webkit_dom_attr_get_owner_element :: 
    Ptr DOMAttr ->                          -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMAttr"})
    IO (Ptr WebKit2WebExtension.DOMElement.DOMElement)

{- |
/No description available in the introspection data./
-}
dOMAttrGetOwnerElement ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMAttr a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMAttr.DOMAttr' -}
    -> m WebKit2WebExtension.DOMElement.DOMElement
    {- ^ __Returns:__ A 'GI.WebKit2WebExtension.Objects.DOMElement.DOMElement' -}
dOMAttrGetOwnerElement self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_attr_get_owner_element self'
    checkUnexpectedReturnNULL "dOMAttrGetOwnerElement" result
    result' <- (newObject WebKit2WebExtension.DOMElement.DOMElement) result
    touchManagedPtr self
    return result'

data DOMAttrGetOwnerElementMethodInfo
instance (signature ~ (m WebKit2WebExtension.DOMElement.DOMElement), MonadIO m, IsDOMAttr a) => O.MethodInfo DOMAttrGetOwnerElementMethodInfo a signature where
    overloadedMethod _ = dOMAttrGetOwnerElement

-- method DOMAttr::get_prefix
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMAttr"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMAttr", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_attr_get_prefix" webkit_dom_attr_get_prefix :: 
    Ptr DOMAttr ->                          -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMAttr"})
    IO CString

{- |
/No description available in the introspection data./

@since 2.14
-}
dOMAttrGetPrefix ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMAttr a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMAttr.DOMAttr' -}
    -> m T.Text
    {- ^ __Returns:__ A @/gchar/@ -}
dOMAttrGetPrefix self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_attr_get_prefix self'
    checkUnexpectedReturnNULL "dOMAttrGetPrefix" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr self
    return result'

data DOMAttrGetPrefixMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDOMAttr a) => O.MethodInfo DOMAttrGetPrefixMethodInfo a signature where
    overloadedMethod _ = dOMAttrGetPrefix

-- method DOMAttr::get_specified
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMAttr"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMAttr", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_attr_get_specified" webkit_dom_attr_get_specified :: 
    Ptr DOMAttr ->                          -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMAttr"})
    IO CInt

{- |
/No description available in the introspection data./
-}
dOMAttrGetSpecified ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMAttr a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMAttr.DOMAttr' -}
    -> m Bool
    {- ^ __Returns:__ A 'Bool' -}
dOMAttrGetSpecified self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_attr_get_specified self'
    let result' = (/= 0) result
    touchManagedPtr self
    return result'

data DOMAttrGetSpecifiedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDOMAttr a) => O.MethodInfo DOMAttrGetSpecifiedMethodInfo a signature where
    overloadedMethod _ = dOMAttrGetSpecified

-- method DOMAttr::get_value
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMAttr"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMAttr", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_attr_get_value" webkit_dom_attr_get_value :: 
    Ptr DOMAttr ->                          -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMAttr"})
    IO CString

{- |
/No description available in the introspection data./
-}
dOMAttrGetValue ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMAttr a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMAttr.DOMAttr' -}
    -> m T.Text
    {- ^ __Returns:__ A @/gchar/@ -}
dOMAttrGetValue self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_attr_get_value self'
    checkUnexpectedReturnNULL "dOMAttrGetValue" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr self
    return result'

data DOMAttrGetValueMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDOMAttr a) => O.MethodInfo DOMAttrGetValueMethodInfo a signature where
    overloadedMethod _ = dOMAttrGetValue

-- method DOMAttr::set_value
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMAttr"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMAttr", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #gchar", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : True
-- Skip return : False

foreign import ccall "webkit_dom_attr_set_value" webkit_dom_attr_set_value :: 
    Ptr DOMAttr ->                          -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMAttr"})
    CString ->                              -- value : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO ()

{- |
/No description available in the introspection data./
-}
dOMAttrSetValue ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMAttr a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMAttr.DOMAttr' -}
    -> T.Text
    {- ^ /@value@/: A @/gchar/@ -}
    -> m ()
    {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
dOMAttrSetValue self value = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    value' <- textToCString value
    onException (do
        propagateGError $ webkit_dom_attr_set_value self' value'
        touchManagedPtr self
        freeMem value'
        return ()
     ) (do
        freeMem value'
     )

data DOMAttrSetValueMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDOMAttr a) => O.MethodInfo DOMAttrSetValueMethodInfo a signature where
    overloadedMethod _ = dOMAttrSetValue