{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

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

module GI.WebKit2WebExtension.Objects.DOMEntityReference
    ( 

-- * Exported types
    DOMEntityReference(..)                  ,
    IsDOMEntityReference                    ,
    toDOMEntityReference                    ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveDOMEntityReferenceMethod         ,
#endif




    ) 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.BasicTypes as B.Types
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.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
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.DOMNode as WebKit2WebExtension.DOMNode
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMObject as WebKit2WebExtension.DOMObject

-- | Memory-managed wrapper type.
newtype DOMEntityReference = DOMEntityReference (SP.ManagedPtr DOMEntityReference)
    deriving (DOMEntityReference -> DOMEntityReference -> Bool
(DOMEntityReference -> DOMEntityReference -> Bool)
-> (DOMEntityReference -> DOMEntityReference -> Bool)
-> Eq DOMEntityReference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DOMEntityReference -> DOMEntityReference -> Bool
$c/= :: DOMEntityReference -> DOMEntityReference -> Bool
== :: DOMEntityReference -> DOMEntityReference -> Bool
$c== :: DOMEntityReference -> DOMEntityReference -> Bool
Eq)

instance SP.ManagedPtrNewtype DOMEntityReference where
    toManagedPtr :: DOMEntityReference -> ManagedPtr DOMEntityReference
toManagedPtr (DOMEntityReference ManagedPtr DOMEntityReference
p) = ManagedPtr DOMEntityReference
p

foreign import ccall "webkit_dom_entity_reference_get_type"
    c_webkit_dom_entity_reference_get_type :: IO B.Types.GType

instance B.Types.TypedObject DOMEntityReference where
    glibType :: IO GType
glibType = IO GType
c_webkit_dom_entity_reference_get_type

instance B.Types.GObject DOMEntityReference

-- | Convert 'DOMEntityReference' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue DOMEntityReference where
    toGValue :: DOMEntityReference -> IO GValue
toGValue DOMEntityReference
o = do
        GType
gtype <- IO GType
c_webkit_dom_entity_reference_get_type
        DOMEntityReference
-> (Ptr DOMEntityReference -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DOMEntityReference
o (GType
-> (GValue -> Ptr DOMEntityReference -> IO ())
-> Ptr DOMEntityReference
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr DOMEntityReference -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO DOMEntityReference
fromGValue GValue
gv = do
        Ptr DOMEntityReference
ptr <- GValue -> IO (Ptr DOMEntityReference)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr DOMEntityReference)
        (ManagedPtr DOMEntityReference -> DOMEntityReference)
-> Ptr DOMEntityReference -> IO DOMEntityReference
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DOMEntityReference -> DOMEntityReference
DOMEntityReference Ptr DOMEntityReference
ptr
        
    

-- | Type class for types which can be safely cast to `DOMEntityReference`, for instance with `toDOMEntityReference`.
class (SP.GObject o, O.IsDescendantOf DOMEntityReference o) => IsDOMEntityReference o
instance (SP.GObject o, O.IsDescendantOf DOMEntityReference o) => IsDOMEntityReference o

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

-- | Cast to `DOMEntityReference`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toDOMEntityReference :: (MonadIO m, IsDOMEntityReference o) => o -> m DOMEntityReference
toDOMEntityReference :: o -> m DOMEntityReference
toDOMEntityReference = IO DOMEntityReference -> m DOMEntityReference
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DOMEntityReference -> m DOMEntityReference)
-> (o -> IO DOMEntityReference) -> o -> m DOMEntityReference
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DOMEntityReference -> DOMEntityReference)
-> o -> IO DOMEntityReference
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr DOMEntityReference -> DOMEntityReference
DOMEntityReference

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

instance (info ~ ResolveDOMEntityReferenceMethod t DOMEntityReference, O.MethodInfo info DOMEntityReference p) => OL.IsLabel t (DOMEntityReference -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DOMEntityReference
type instance O.AttributeList DOMEntityReference = DOMEntityReferenceAttributeList
type DOMEntityReferenceAttributeList = ('[ '("baseUri", WebKit2WebExtension.DOMNode.DOMNodeBaseUriPropertyInfo), '("childNodes", WebKit2WebExtension.DOMNode.DOMNodeChildNodesPropertyInfo), '("coreObject", WebKit2WebExtension.DOMObject.DOMObjectCoreObjectPropertyInfo), '("firstChild", WebKit2WebExtension.DOMNode.DOMNodeFirstChildPropertyInfo), '("lastChild", WebKit2WebExtension.DOMNode.DOMNodeLastChildPropertyInfo), '("nextSibling", WebKit2WebExtension.DOMNode.DOMNodeNextSiblingPropertyInfo), '("nodeName", WebKit2WebExtension.DOMNode.DOMNodeNodeNamePropertyInfo), '("nodeType", WebKit2WebExtension.DOMNode.DOMNodeNodeTypePropertyInfo), '("nodeValue", WebKit2WebExtension.DOMNode.DOMNodeNodeValuePropertyInfo), '("ownerDocument", WebKit2WebExtension.DOMNode.DOMNodeOwnerDocumentPropertyInfo), '("parentElement", WebKit2WebExtension.DOMNode.DOMNodeParentElementPropertyInfo), '("parentNode", WebKit2WebExtension.DOMNode.DOMNodeParentNodePropertyInfo), '("previousSibling", WebKit2WebExtension.DOMNode.DOMNodePreviousSiblingPropertyInfo), '("textContent", WebKit2WebExtension.DOMNode.DOMNodeTextContentPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

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

#endif