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

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


 -- * Methods
-- ** getIsId #method:getIsId#
    DOMAttrGetIsIdMethodInfo                ,
    dOMAttrGetIsId                          ,


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


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


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


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


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




 -- * Properties
-- ** isId #attr:isId#
    DOMAttrIsIdPropertyInfo                 ,
    dOMAttrIsId                             ,
    getDOMAttrIsId                          ,


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


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


-- ** 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.WebKit.Interfaces.DOMEventTarget as WebKit.DOMEventTarget
import {-# SOURCE #-} qualified GI.WebKit.Objects.DOMElement as WebKit.DOMElement
import {-# SOURCE #-} qualified GI.WebKit.Objects.DOMNode as WebKit.DOMNode
import {-# SOURCE #-} qualified GI.WebKit.Objects.DOMObject as WebKit.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 WebKit.DOMNode.IsDOMNode DOMAttr
instance WebKit.DOMObject.IsDOMObject DOMAttr
instance GObject.Object.IsObject DOMAttr
instance WebKit.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 = WebKit.DOMEventTarget.DOMEventTargetAddEventListenerMethodInfo
    ResolveDOMAttrMethod "appendChild" o = WebKit.DOMNode.DOMNodeAppendChildMethodInfo
    ResolveDOMAttrMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveDOMAttrMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveDOMAttrMethod "cloneNode" o = WebKit.DOMNode.DOMNodeCloneNodeMethodInfo
    ResolveDOMAttrMethod "compareDocumentPosition" o = WebKit.DOMNode.DOMNodeCompareDocumentPositionMethodInfo
    ResolveDOMAttrMethod "contains" o = WebKit.DOMNode.DOMNodeContainsMethodInfo
    ResolveDOMAttrMethod "dispatchEvent" o = WebKit.DOMNode.DOMNodeDispatchEventMethodInfo
    ResolveDOMAttrMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveDOMAttrMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveDOMAttrMethod "hasAttributes" o = WebKit.DOMNode.DOMNodeHasAttributesMethodInfo
    ResolveDOMAttrMethod "hasChildNodes" o = WebKit.DOMNode.DOMNodeHasChildNodesMethodInfo
    ResolveDOMAttrMethod "insertBefore" o = WebKit.DOMNode.DOMNodeInsertBeforeMethodInfo
    ResolveDOMAttrMethod "isDefaultNamespace" o = WebKit.DOMNode.DOMNodeIsDefaultNamespaceMethodInfo
    ResolveDOMAttrMethod "isEqualNode" o = WebKit.DOMNode.DOMNodeIsEqualNodeMethodInfo
    ResolveDOMAttrMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveDOMAttrMethod "isSameNode" o = WebKit.DOMNode.DOMNodeIsSameNodeMethodInfo
    ResolveDOMAttrMethod "isSupported" o = WebKit.DOMNode.DOMNodeIsSupportedMethodInfo
    ResolveDOMAttrMethod "lookupNamespaceUri" o = WebKit.DOMNode.DOMNodeLookupNamespaceUriMethodInfo
    ResolveDOMAttrMethod "lookupPrefix" o = WebKit.DOMNode.DOMNodeLookupPrefixMethodInfo
    ResolveDOMAttrMethod "normalize" o = WebKit.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 = WebKit.DOMNode.DOMNodeRemoveChildMethodInfo
    ResolveDOMAttrMethod "removeEventListener" o = WebKit.DOMEventTarget.DOMEventTargetRemoveEventListenerMethodInfo
    ResolveDOMAttrMethod "replaceChild" o = WebKit.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 "getAttributes" o = WebKit.DOMNode.DOMNodeGetAttributesMethodInfo
    ResolveDOMAttrMethod "getBaseUri" o = WebKit.DOMNode.DOMNodeGetBaseUriMethodInfo
    ResolveDOMAttrMethod "getChildNodes" o = WebKit.DOMNode.DOMNodeGetChildNodesMethodInfo
    ResolveDOMAttrMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveDOMAttrMethod "getFirstChild" o = WebKit.DOMNode.DOMNodeGetFirstChildMethodInfo
    ResolveDOMAttrMethod "getIsId" o = DOMAttrGetIsIdMethodInfo
    ResolveDOMAttrMethod "getLastChild" o = WebKit.DOMNode.DOMNodeGetLastChildMethodInfo
    ResolveDOMAttrMethod "getLocalName" o = WebKit.DOMNode.DOMNodeGetLocalNameMethodInfo
    ResolveDOMAttrMethod "getName" o = DOMAttrGetNameMethodInfo
    ResolveDOMAttrMethod "getNamespaceUri" o = WebKit.DOMNode.DOMNodeGetNamespaceUriMethodInfo
    ResolveDOMAttrMethod "getNextSibling" o = WebKit.DOMNode.DOMNodeGetNextSiblingMethodInfo
    ResolveDOMAttrMethod "getNodeName" o = WebKit.DOMNode.DOMNodeGetNodeNameMethodInfo
    ResolveDOMAttrMethod "getNodeType" o = WebKit.DOMNode.DOMNodeGetNodeTypeMethodInfo
    ResolveDOMAttrMethod "getNodeValue" o = WebKit.DOMNode.DOMNodeGetNodeValueMethodInfo
    ResolveDOMAttrMethod "getOwnerDocument" o = WebKit.DOMNode.DOMNodeGetOwnerDocumentMethodInfo
    ResolveDOMAttrMethod "getOwnerElement" o = DOMAttrGetOwnerElementMethodInfo
    ResolveDOMAttrMethod "getParentElement" o = WebKit.DOMNode.DOMNodeGetParentElementMethodInfo
    ResolveDOMAttrMethod "getParentNode" o = WebKit.DOMNode.DOMNodeGetParentNodeMethodInfo
    ResolveDOMAttrMethod "getPrefix" o = WebKit.DOMNode.DOMNodeGetPrefixMethodInfo
    ResolveDOMAttrMethod "getPreviousSibling" o = WebKit.DOMNode.DOMNodeGetPreviousSiblingMethodInfo
    ResolveDOMAttrMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveDOMAttrMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveDOMAttrMethod "getSpecified" o = DOMAttrGetSpecifiedMethodInfo
    ResolveDOMAttrMethod "getTextContent" o = WebKit.DOMNode.DOMNodeGetTextContentMethodInfo
    ResolveDOMAttrMethod "getValue" o = DOMAttrGetValueMethodInfo
    ResolveDOMAttrMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveDOMAttrMethod "setNodeValue" o = WebKit.DOMNode.DOMNodeSetNodeValueMethodInfo
    ResolveDOMAttrMethod "setPrefix" o = WebKit.DOMNode.DOMNodeSetPrefixMethodInfo
    ResolveDOMAttrMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveDOMAttrMethod "setTextContent" o = WebKit.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 "is-id"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

getDOMAttrIsId :: (MonadIO m, IsDOMAttr o) => o -> m Bool
getDOMAttrIsId obj = liftIO $ getObjectPropertyBool obj "is-id"

data DOMAttrIsIdPropertyInfo
instance AttrInfo DOMAttrIsIdPropertyInfo where
    type AttrAllowedOps DOMAttrIsIdPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMAttrIsIdPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMAttrIsIdPropertyInfo = IsDOMAttr
    type AttrGetType DOMAttrIsIdPropertyInfo = Bool
    type AttrLabel DOMAttrIsIdPropertyInfo = "is-id"
    type AttrOrigin DOMAttrIsIdPropertyInfo = DOMAttr
    attrGet _ = getDOMAttrIsId
    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 "owner-element"
   -- Type: TInterface (Name {namespace = "WebKit", name = "DOMElement"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

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

data DOMAttrOwnerElementPropertyInfo
instance AttrInfo DOMAttrOwnerElementPropertyInfo where
    type AttrAllowedOps DOMAttrOwnerElementPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DOMAttrOwnerElementPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMAttrOwnerElementPropertyInfo = IsDOMAttr
    type AttrGetType DOMAttrOwnerElementPropertyInfo = WebKit.DOMElement.DOMElement
    type AttrLabel DOMAttrOwnerElementPropertyInfo = "owner-element"
    type AttrOrigin DOMAttrOwnerElementPropertyInfo = DOMAttr
    attrGet _ = getDOMAttrOwnerElement
    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", WebKit.DOMNode.DOMNodeBaseUriPropertyInfo), '("childNodes", WebKit.DOMNode.DOMNodeChildNodesPropertyInfo), '("coreObject", WebKit.DOMObject.DOMObjectCoreObjectPropertyInfo), '("firstChild", WebKit.DOMNode.DOMNodeFirstChildPropertyInfo), '("isId", DOMAttrIsIdPropertyInfo), '("lastChild", WebKit.DOMNode.DOMNodeLastChildPropertyInfo), '("localName", WebKit.DOMNode.DOMNodeLocalNamePropertyInfo), '("name", DOMAttrNamePropertyInfo), '("namespaceUri", WebKit.DOMNode.DOMNodeNamespaceUriPropertyInfo), '("nextSibling", WebKit.DOMNode.DOMNodeNextSiblingPropertyInfo), '("nodeName", WebKit.DOMNode.DOMNodeNodeNamePropertyInfo), '("nodeType", WebKit.DOMNode.DOMNodeNodeTypePropertyInfo), '("nodeValue", WebKit.DOMNode.DOMNodeNodeValuePropertyInfo), '("ownerDocument", WebKit.DOMNode.DOMNodeOwnerDocumentPropertyInfo), '("ownerElement", DOMAttrOwnerElementPropertyInfo), '("parentElement", WebKit.DOMNode.DOMNodeParentElementPropertyInfo), '("parentNode", WebKit.DOMNode.DOMNodeParentNodePropertyInfo), '("prefix", WebKit.DOMNode.DOMNodePrefixPropertyInfo), '("previousSibling", WebKit.DOMNode.DOMNodePreviousSiblingPropertyInfo), '("specified", DOMAttrSpecifiedPropertyInfo), '("textContent", WebKit.DOMNode.DOMNodeTextContentPropertyInfo), '("value", DOMAttrValuePropertyInfo)] :: [(Symbol, *)])

dOMAttrIsId :: AttrLabelProxy "isId"
dOMAttrIsId = AttrLabelProxy

dOMAttrName :: AttrLabelProxy "name"
dOMAttrName = AttrLabelProxy

dOMAttrOwnerElement :: AttrLabelProxy "ownerElement"
dOMAttrOwnerElement = 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_is_id
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit", 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_is_id" webkit_dom_attr_get_is_id :: 
    Ptr DOMAttr ->                          -- self : TInterface (Name {namespace = "WebKit", name = "DOMAttr"})
    IO CInt

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

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

-- method DOMAttr::get_name
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit", 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 = "WebKit", name = "DOMAttr"})
    IO CString

{- |
/No description available in the introspection data./
-}
dOMAttrGetName ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMAttr a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit.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_owner_element
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit", 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 = "WebKit", 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 = "WebKit", name = "DOMAttr"})
    IO (Ptr WebKit.DOMElement.DOMElement)

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

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

-- method DOMAttr::get_specified
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit", 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 = "WebKit", name = "DOMAttr"})
    IO CInt

{- |
/No description available in the introspection data./
-}
dOMAttrGetSpecified ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMAttr a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit.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 = "WebKit", 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 = "WebKit", name = "DOMAttr"})
    IO CString

{- |
/No description available in the introspection data./
-}
dOMAttrGetValue ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMAttr a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit.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 = "WebKit", 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 = "WebKit", 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.WebKit.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