module GI.WebKit2WebExtension.Objects.DOMNodeList
(
DOMNodeList(..) ,
IsDOMNodeList ,
toDOMNodeList ,
noDOMNodeList ,
DOMNodeListGetLengthMethodInfo ,
dOMNodeListGetLength ,
DOMNodeListItemMethodInfo ,
dOMNodeListItem ,
DOMNodeListLengthPropertyInfo ,
dOMNodeListLength ,
getDOMNodeListLength ,
) 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 qualified GI.WebKit2WebExtension.Objects.DOMNode as WebKit2WebExtension.DOMNode
import qualified GI.WebKit2WebExtension.Objects.DOMObject as WebKit2WebExtension.DOMObject
newtype DOMNodeList = DOMNodeList (ManagedPtr DOMNodeList)
foreign import ccall "webkit_dom_node_list_get_type"
c_webkit_dom_node_list_get_type :: IO GType
instance GObject DOMNodeList where
gobjectType _ = c_webkit_dom_node_list_get_type
class GObject o => IsDOMNodeList o
#if MIN_VERSION_base(4,9,0)
instance (GObject a, O.UnknownAncestorError DOMNodeList a) =>
IsDOMNodeList a
#endif
instance IsDOMNodeList DOMNodeList
instance WebKit2WebExtension.DOMObject.IsDOMObject DOMNodeList
instance GObject.Object.IsObject DOMNodeList
toDOMNodeList :: IsDOMNodeList o => o -> IO DOMNodeList
toDOMNodeList = unsafeCastTo DOMNodeList
noDOMNodeList :: Maybe DOMNodeList
noDOMNodeList = Nothing
type family ResolveDOMNodeListMethod (t :: Symbol) (o :: *) :: * where
ResolveDOMNodeListMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDOMNodeListMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDOMNodeListMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDOMNodeListMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDOMNodeListMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDOMNodeListMethod "item" o = DOMNodeListItemMethodInfo
ResolveDOMNodeListMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDOMNodeListMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDOMNodeListMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDOMNodeListMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDOMNodeListMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
ResolveDOMNodeListMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
ResolveDOMNodeListMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDOMNodeListMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDOMNodeListMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDOMNodeListMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDOMNodeListMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDOMNodeListMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDOMNodeListMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDOMNodeListMethod "getLength" o = DOMNodeListGetLengthMethodInfo
ResolveDOMNodeListMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDOMNodeListMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDOMNodeListMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDOMNodeListMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDOMNodeListMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDOMNodeListMethod t DOMNodeList, O.MethodInfo info DOMNodeList p) => O.IsLabelProxy t (DOMNodeList -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveDOMNodeListMethod t DOMNodeList, O.MethodInfo info DOMNodeList p) => O.IsLabel t (DOMNodeList -> p) where
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
getDOMNodeListLength :: (MonadIO m, IsDOMNodeList o) => o -> m CULong
getDOMNodeListLength obj = liftIO $ getObjectPropertyULong obj "length"
data DOMNodeListLengthPropertyInfo
instance AttrInfo DOMNodeListLengthPropertyInfo where
type AttrAllowedOps DOMNodeListLengthPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMNodeListLengthPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMNodeListLengthPropertyInfo = IsDOMNodeList
type AttrGetType DOMNodeListLengthPropertyInfo = CULong
type AttrLabel DOMNodeListLengthPropertyInfo = "length"
type AttrOrigin DOMNodeListLengthPropertyInfo = DOMNodeList
attrGet _ = getDOMNodeListLength
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
instance O.HasAttributeList DOMNodeList
type instance O.AttributeList DOMNodeList = DOMNodeListAttributeList
type DOMNodeListAttributeList = ('[ '("coreObject", WebKit2WebExtension.DOMObject.DOMObjectCoreObjectPropertyInfo), '("length", DOMNodeListLengthPropertyInfo)] :: [(Symbol, *)])
dOMNodeListLength :: AttrLabelProxy "length"
dOMNodeListLength = AttrLabelProxy
type instance O.SignalList DOMNodeList = DOMNodeListSignalList
type DOMNodeListSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "webkit_dom_node_list_get_length" webkit_dom_node_list_get_length ::
Ptr DOMNodeList ->
IO CULong
dOMNodeListGetLength ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMNodeList a) =>
a
-> m CULong
dOMNodeListGetLength self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- webkit_dom_node_list_get_length self'
touchManagedPtr self
return result
data DOMNodeListGetLengthMethodInfo
instance (signature ~ (m CULong), MonadIO m, IsDOMNodeList a) => O.MethodInfo DOMNodeListGetLengthMethodInfo a signature where
overloadedMethod _ = dOMNodeListGetLength
foreign import ccall "webkit_dom_node_list_item" webkit_dom_node_list_item ::
Ptr DOMNodeList ->
CULong ->
IO (Ptr WebKit2WebExtension.DOMNode.DOMNode)
dOMNodeListItem ::
(B.CallStack.HasCallStack, MonadIO m, IsDOMNodeList a) =>
a
-> CULong
-> m WebKit2WebExtension.DOMNode.DOMNode
dOMNodeListItem self index = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- webkit_dom_node_list_item self' index
checkUnexpectedReturnNULL "dOMNodeListItem" result
result' <- (newObject WebKit2WebExtension.DOMNode.DOMNode) result
touchManagedPtr self
return result'
data DOMNodeListItemMethodInfo
instance (signature ~ (CULong -> m WebKit2WebExtension.DOMNode.DOMNode), MonadIO m, IsDOMNodeList a) => O.MethodInfo DOMNodeListItemMethodInfo a signature where
overloadedMethod _ = dOMNodeListItem