{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)

/No description available in the introspection data./
-}

#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
       && !defined(__HADDOCK_VERSION__))

module GI.WebKit2WebExtension.Objects.DOMAttr
    (

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


 -- * Methods
-- ** getLocalName #method:getLocalName#

#if ENABLE_OVERLOADING
    DOMAttrGetLocalNameMethodInfo           ,
#endif
    dOMAttrGetLocalName                     ,


-- ** getName #method:getName#

#if ENABLE_OVERLOADING
    DOMAttrGetNameMethodInfo                ,
#endif
    dOMAttrGetName                          ,


-- ** getNamespaceUri #method:getNamespaceUri#

#if ENABLE_OVERLOADING
    DOMAttrGetNamespaceUriMethodInfo        ,
#endif
    dOMAttrGetNamespaceUri                  ,


-- ** getOwnerElement #method:getOwnerElement#

#if ENABLE_OVERLOADING
    DOMAttrGetOwnerElementMethodInfo        ,
#endif
    dOMAttrGetOwnerElement                  ,


-- ** getPrefix #method:getPrefix#

#if ENABLE_OVERLOADING
    DOMAttrGetPrefixMethodInfo              ,
#endif
    dOMAttrGetPrefix                        ,


-- ** getSpecified #method:getSpecified#

#if ENABLE_OVERLOADING
    DOMAttrGetSpecifiedMethodInfo           ,
#endif
    dOMAttrGetSpecified                     ,


-- ** getValue #method:getValue#

#if ENABLE_OVERLOADING
    DOMAttrGetValueMethodInfo               ,
#endif
    dOMAttrGetValue                         ,


-- ** setValue #method:setValue#

#if ENABLE_OVERLOADING
    DOMAttrSetValueMethodInfo               ,
#endif
    dOMAttrSetValue                         ,




 -- * Properties
-- ** localName #attr:localName#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    DOMAttrLocalNamePropertyInfo            ,
#endif
#if ENABLE_OVERLOADING
    dOMAttrLocalName                        ,
#endif
    getDOMAttrLocalName                     ,


-- ** name #attr:name#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    DOMAttrNamePropertyInfo                 ,
#endif
#if ENABLE_OVERLOADING
    dOMAttrName                             ,
#endif
    getDOMAttrName                          ,


-- ** namespaceUri #attr:namespaceUri#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    DOMAttrNamespaceUriPropertyInfo         ,
#endif
#if ENABLE_OVERLOADING
    dOMAttrNamespaceUri                     ,
#endif
    getDOMAttrNamespaceUri                  ,


-- ** ownerElement #attr:ownerElement#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    DOMAttrOwnerElementPropertyInfo         ,
#endif
#if ENABLE_OVERLOADING
    dOMAttrOwnerElement                     ,
#endif
    getDOMAttrOwnerElement                  ,


-- ** prefix #attr:prefix#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    DOMAttrPrefixPropertyInfo               ,
#endif
#if ENABLE_OVERLOADING
    dOMAttrPrefix                           ,
#endif
    getDOMAttrPrefix                        ,


-- ** specified #attr:specified#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    DOMAttrSpecifiedPropertyInfo            ,
#endif
#if ENABLE_OVERLOADING
    dOMAttrSpecified                        ,
#endif
    getDOMAttrSpecified                     ,


-- ** value #attr:value#
{- | /No description available in the introspection data./
-}
#if ENABLE_OVERLOADING
    DOMAttrValuePropertyInfo                ,
#endif
    clearDOMAttrValue                       ,
    constructDOMAttrValue                   ,
#if ENABLE_OVERLOADING
    dOMAttrValue                            ,
#endif
    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.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
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 GHC.OverloadedLabels as OL

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

-- | Memory-managed wrapper type.
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


-- | Type class for types which can be safely cast to `DOMAttr`, for instance with `toDOMAttr`.
class (GObject o, O.IsDescendantOf DOMAttr o) => IsDOMAttr o
instance (GObject o, O.IsDescendantOf DOMAttr o) => IsDOMAttr o

instance O.HasParentTypes DOMAttr
type instance O.ParentTypes DOMAttr = '[WebKit2WebExtension.DOMNode.DOMNode, WebKit2WebExtension.DOMObject.DOMObject, GObject.Object.Object, WebKit2WebExtension.DOMEventTarget.DOMEventTarget]

-- | Cast to `DOMAttr`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toDOMAttr :: (MonadIO m, IsDOMAttr o) => o -> m DOMAttr
toDOMAttr = liftIO . unsafeCastTo DOMAttr

-- | A convenience alias for `Nothing` :: `Maybe` `DOMAttr`.
noDOMAttr :: Maybe DOMAttr
noDOMAttr = Nothing

#if ENABLE_OVERLOADING
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 "getv" o = GObject.Object.ObjectGetvMethodInfo
    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 "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 "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    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) => OL.IsLabel t (DOMAttr -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif

#endif

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

{- |
Get the value of the “@local-name@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' dOMAttr #localName
@
-}
getDOMAttrLocalName :: (MonadIO m, IsDOMAttr o) => o -> m (Maybe T.Text)
getDOMAttrLocalName obj = liftIO $ B.Properties.getObjectPropertyString obj "local-name"

#if ENABLE_OVERLOADING
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
#endif

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

{- |
Get the value of the “@name@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' dOMAttr #name
@
-}
getDOMAttrName :: (MonadIO m, IsDOMAttr o) => o -> m (Maybe T.Text)
getDOMAttrName obj = liftIO $ B.Properties.getObjectPropertyString obj "name"

#if ENABLE_OVERLOADING
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
#endif

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

{- |
Get the value of the “@namespace-uri@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' dOMAttr #namespaceUri
@
-}
getDOMAttrNamespaceUri :: (MonadIO m, IsDOMAttr o) => o -> m (Maybe T.Text)
getDOMAttrNamespaceUri obj = liftIO $ B.Properties.getObjectPropertyString obj "namespace-uri"

#if ENABLE_OVERLOADING
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
#endif

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

{- |
Get the value of the “@owner-element@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' dOMAttr #ownerElement
@
-}
getDOMAttrOwnerElement :: (MonadIO m, IsDOMAttr o) => o -> m WebKit2WebExtension.DOMElement.DOMElement
getDOMAttrOwnerElement obj = liftIO $ checkUnexpectedNothing "getDOMAttrOwnerElement" $ B.Properties.getObjectPropertyObject obj "owner-element" WebKit2WebExtension.DOMElement.DOMElement

#if ENABLE_OVERLOADING
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
#endif

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

{- |
Get the value of the “@prefix@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' dOMAttr #prefix
@
-}
getDOMAttrPrefix :: (MonadIO m, IsDOMAttr o) => o -> m (Maybe T.Text)
getDOMAttrPrefix obj = liftIO $ B.Properties.getObjectPropertyString obj "prefix"

#if ENABLE_OVERLOADING
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
#endif

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

{- |
Get the value of the “@specified@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' dOMAttr #specified
@
-}
getDOMAttrSpecified :: (MonadIO m, IsDOMAttr o) => o -> m Bool
getDOMAttrSpecified obj = liftIO $ B.Properties.getObjectPropertyBool obj "specified"

#if ENABLE_OVERLOADING
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
#endif

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

{- |
Get the value of the “@value@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.get' dOMAttr #value
@
-}
getDOMAttrValue :: (MonadIO m, IsDOMAttr o) => o -> m (Maybe T.Text)
getDOMAttrValue obj = liftIO $ B.Properties.getObjectPropertyString obj "value"

{- |
Set the value of the “@value@” property.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.set' dOMAttr [ #value 'Data.GI.Base.Attributes.:=' value ]
@
-}
setDOMAttrValue :: (MonadIO m, IsDOMAttr o) => o -> T.Text -> m ()
setDOMAttrValue obj val = liftIO $ B.Properties.setObjectPropertyString obj "value" (Just val)

{- |
Construct a `GValueConstruct` with valid value for the “@value@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
-}
constructDOMAttrValue :: (IsDOMAttr o) => T.Text -> IO (GValueConstruct o)
constructDOMAttrValue val = B.Properties.constructObjectPropertyString "value" (Just val)

{- |
Set the value of the “@value@” property to `Nothing`.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to

@
'Data.GI.Base.Attributes.clear' #value
@
-}
clearDOMAttrValue :: (MonadIO m, IsDOMAttr o) => o -> m ()
clearDOMAttrValue obj = liftIO $ B.Properties.setObjectPropertyString obj "value" (Nothing :: Maybe T.Text)

#if ENABLE_OVERLOADING
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
#endif

#if ENABLE_OVERLOADING
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, *)])
#endif

#if ENABLE_OVERLOADING
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

#endif

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

#endif

-- 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

{-# DEPRECATED dOMAttrGetLocalName ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
{- |
/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'

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

#endif

-- 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

{-# DEPRECATED dOMAttrGetName ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
{- |
/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'

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

#endif

-- 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

{-# DEPRECATED dOMAttrGetNamespaceUri ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
{- |
/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'

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

#endif

-- 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)

{-# DEPRECATED dOMAttrGetOwnerElement ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
{- |
/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'

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

#endif

-- 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

{-# DEPRECATED dOMAttrGetPrefix ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
{- |
/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'

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

#endif

-- 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

{-# DEPRECATED dOMAttrGetSpecified ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
{- |
/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'

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

#endif

-- 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

{-# DEPRECATED dOMAttrGetValue ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
{- |
/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'

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

#endif

-- 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 ()

{-# DEPRECATED dOMAttrSetValue ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
{- |
/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'
     )

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

#endif