#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.WebKit2WebExtension.Objects.DOMHTMLCollection
(
DOMHTMLCollection(..) ,
IsDOMHTMLCollection ,
toDOMHTMLCollection ,
noDOMHTMLCollection ,
#if ENABLE_OVERLOADING
DOMHTMLCollectionGetLengthMethodInfo ,
#endif
dOMHTMLCollectionGetLength ,
#if ENABLE_OVERLOADING
DOMHTMLCollectionItemMethodInfo ,
#endif
dOMHTMLCollectionItem ,
#if ENABLE_OVERLOADING
DOMHTMLCollectionNamedItemMethodInfo ,
#endif
dOMHTMLCollectionNamedItem ,
#if ENABLE_OVERLOADING
DOMHTMLCollectionLengthPropertyInfo ,
#endif
#if ENABLE_OVERLOADING
dOMHTMLCollectionLength ,
#endif
getDOMHTMLCollectionLength ,
) 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.Objects.DOMNode as WebKit2WebExtension.DOMNode
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMObject as WebKit2WebExtension.DOMObject
newtype DOMHTMLCollection = DOMHTMLCollection (ManagedPtr DOMHTMLCollection)
foreign import ccall "webkit_dom_html_collection_get_type"
c_webkit_dom_html_collection_get_type :: IO GType
instance GObject DOMHTMLCollection where
gobjectType = c_webkit_dom_html_collection_get_type
class (GObject o, O.IsDescendantOf DOMHTMLCollection o) => IsDOMHTMLCollection o
instance (GObject o, O.IsDescendantOf DOMHTMLCollection o) => IsDOMHTMLCollection o
instance O.HasParentTypes DOMHTMLCollection
type instance O.ParentTypes DOMHTMLCollection = '[WebKit2WebExtension.DOMObject.DOMObject, GObject.Object.Object]
toDOMHTMLCollection :: (MonadIO m, IsDOMHTMLCollection o) => o -> m DOMHTMLCollection
toDOMHTMLCollection = liftIO . unsafeCastTo DOMHTMLCollection
noDOMHTMLCollection :: Maybe DOMHTMLCollection
noDOMHTMLCollection = Nothing
#if ENABLE_OVERLOADING
type family ResolveDOMHTMLCollectionMethod (t :: Symbol) (o :: *) :: * where
ResolveDOMHTMLCollectionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDOMHTMLCollectionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDOMHTMLCollectionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDOMHTMLCollectionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDOMHTMLCollectionMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDOMHTMLCollectionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDOMHTMLCollectionMethod "item" o = DOMHTMLCollectionItemMethodInfo
ResolveDOMHTMLCollectionMethod "namedItem" o = DOMHTMLCollectionNamedItemMethodInfo
ResolveDOMHTMLCollectionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDOMHTMLCollectionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDOMHTMLCollectionMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDOMHTMLCollectionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDOMHTMLCollectionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDOMHTMLCollectionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDOMHTMLCollectionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDOMHTMLCollectionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDOMHTMLCollectionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDOMHTMLCollectionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDOMHTMLCollectionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDOMHTMLCollectionMethod "getLength" o = DOMHTMLCollectionGetLengthMethodInfo
ResolveDOMHTMLCollectionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDOMHTMLCollectionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDOMHTMLCollectionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDOMHTMLCollectionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDOMHTMLCollectionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDOMHTMLCollectionMethod t DOMHTMLCollection, O.MethodInfo info DOMHTMLCollection p) => OL.IsLabel t (DOMHTMLCollection -> 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
getDOMHTMLCollectionLength :: (MonadIO m, IsDOMHTMLCollection o) => o -> m CULong
getDOMHTMLCollectionLength obj = liftIO $ B.Properties.getObjectPropertyULong obj "length"
#if ENABLE_OVERLOADING
data DOMHTMLCollectionLengthPropertyInfo
instance AttrInfo DOMHTMLCollectionLengthPropertyInfo where
type AttrAllowedOps DOMHTMLCollectionLengthPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMHTMLCollectionLengthPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMHTMLCollectionLengthPropertyInfo = IsDOMHTMLCollection
type AttrGetType DOMHTMLCollectionLengthPropertyInfo = CULong
type AttrLabel DOMHTMLCollectionLengthPropertyInfo = "length"
type AttrOrigin DOMHTMLCollectionLengthPropertyInfo = DOMHTMLCollection
attrGet _ = getDOMHTMLCollectionLength
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList DOMHTMLCollection
type instance O.AttributeList DOMHTMLCollection = DOMHTMLCollectionAttributeList
type DOMHTMLCollectionAttributeList = ('[ '("coreObject", WebKit2WebExtension.DOMObject.DOMObjectCoreObjectPropertyInfo), '("length", DOMHTMLCollectionLengthPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
dOMHTMLCollectionLength :: AttrLabelProxy "length"
dOMHTMLCollectionLength = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList DOMHTMLCollection = DOMHTMLCollectionSignalList
type DOMHTMLCollectionSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "webkit_dom_html_collection_get_length" webkit_dom_html_collection_get_length ::
Ptr DOMHTMLCollection ->
IO CULong
{-# DEPRECATED dOMHTMLCollectionGetLength ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
dOMHTMLCollectionGetLength ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMHTMLCollection a) =>
a
-> m CULong
dOMHTMLCollectionGetLength self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- webkit_dom_html_collection_get_length self'
touchManagedPtr self
return result
#if ENABLE_OVERLOADING
data DOMHTMLCollectionGetLengthMethodInfo
instance (signature ~ (m CULong), MonadIO m, IsDOMHTMLCollection a) => O.MethodInfo DOMHTMLCollectionGetLengthMethodInfo a signature where
overloadedMethod _ = dOMHTMLCollectionGetLength
#endif
foreign import ccall "webkit_dom_html_collection_item" webkit_dom_html_collection_item ::
Ptr DOMHTMLCollection ->
CULong ->
IO (Ptr WebKit2WebExtension.DOMNode.DOMNode)
{-# DEPRECATED dOMHTMLCollectionItem ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
dOMHTMLCollectionItem ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMHTMLCollection a) =>
a
-> CULong
-> m WebKit2WebExtension.DOMNode.DOMNode
dOMHTMLCollectionItem self index = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- webkit_dom_html_collection_item self' index
checkUnexpectedReturnNULL "dOMHTMLCollectionItem" result
result' <- (newObject WebKit2WebExtension.DOMNode.DOMNode) result
touchManagedPtr self
return result'
#if ENABLE_OVERLOADING
data DOMHTMLCollectionItemMethodInfo
instance (signature ~ (CULong -> m WebKit2WebExtension.DOMNode.DOMNode), MonadIO m, IsDOMHTMLCollection a) => O.MethodInfo DOMHTMLCollectionItemMethodInfo a signature where
overloadedMethod _ = dOMHTMLCollectionItem
#endif
foreign import ccall "webkit_dom_html_collection_named_item" webkit_dom_html_collection_named_item ::
Ptr DOMHTMLCollection ->
CString ->
IO (Ptr WebKit2WebExtension.DOMNode.DOMNode)
{-# DEPRECATED dOMHTMLCollectionNamedItem ["(Since version 2.22)","Use JavaScriptCore API instead"] #-}
dOMHTMLCollectionNamedItem ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMHTMLCollection a) =>
a
-> T.Text
-> m WebKit2WebExtension.DOMNode.DOMNode
dOMHTMLCollectionNamedItem self name = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
name' <- textToCString name
result <- webkit_dom_html_collection_named_item self' name'
checkUnexpectedReturnNULL "dOMHTMLCollectionNamedItem" result
result' <- (newObject WebKit2WebExtension.DOMNode.DOMNode) result
touchManagedPtr self
freeMem name'
return result'
#if ENABLE_OVERLOADING
data DOMHTMLCollectionNamedItemMethodInfo
instance (signature ~ (T.Text -> m WebKit2WebExtension.DOMNode.DOMNode), MonadIO m, IsDOMHTMLCollection a) => O.MethodInfo DOMHTMLCollectionNamedItemMethodInfo a signature where
overloadedMethod _ = dOMHTMLCollectionNamedItem
#endif