{- |
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.DOMDOMNamedFlowCollection
    ( 

-- * Exported types
    DOMDOMNamedFlowCollection(..)           ,
    IsDOMDOMNamedFlowCollection             ,
    toDOMDOMNamedFlowCollection             ,
    noDOMDOMNamedFlowCollection             ,


 -- * Methods
-- ** getLength #method:getLength#
    DOMDOMNamedFlowCollectionGetLengthMethodInfo,
    dOMDOMNamedFlowCollectionGetLength      ,


-- ** item #method:item#
    DOMDOMNamedFlowCollectionItemMethodInfo ,
    dOMDOMNamedFlowCollectionItem           ,


-- ** namedItem #method:namedItem#
    DOMDOMNamedFlowCollectionNamedItemMethodInfo,
    dOMDOMNamedFlowCollectionNamedItem      ,




 -- * Properties
-- ** length #attr:length#
    DOMDOMNamedFlowCollectionLengthPropertyInfo,
    dOMDOMNamedFlowCollectionLength         ,
    getDOMDOMNamedFlowCollectionLength      ,




    ) 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.Objects.DOMObject as WebKit.DOMObject
import {-# SOURCE #-} qualified GI.WebKit.Objects.DOMWebKitNamedFlow as WebKit.DOMWebKitNamedFlow

newtype DOMDOMNamedFlowCollection = DOMDOMNamedFlowCollection (ManagedPtr DOMDOMNamedFlowCollection)
foreign import ccall "webkit_dom_dom_named_flow_collection_get_type"
    c_webkit_dom_dom_named_flow_collection_get_type :: IO GType

instance GObject DOMDOMNamedFlowCollection where
    gobjectType _ = c_webkit_dom_dom_named_flow_collection_get_type
    

class GObject o => IsDOMDOMNamedFlowCollection o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError DOMDOMNamedFlowCollection a) =>
    IsDOMDOMNamedFlowCollection a
#endif
instance IsDOMDOMNamedFlowCollection DOMDOMNamedFlowCollection
instance WebKit.DOMObject.IsDOMObject DOMDOMNamedFlowCollection
instance GObject.Object.IsObject DOMDOMNamedFlowCollection

toDOMDOMNamedFlowCollection :: IsDOMDOMNamedFlowCollection o => o -> IO DOMDOMNamedFlowCollection
toDOMDOMNamedFlowCollection = unsafeCastTo DOMDOMNamedFlowCollection

noDOMDOMNamedFlowCollection :: Maybe DOMDOMNamedFlowCollection
noDOMDOMNamedFlowCollection = Nothing

type family ResolveDOMDOMNamedFlowCollectionMethod (t :: Symbol) (o :: *) :: * where
    ResolveDOMDOMNamedFlowCollectionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "item" o = DOMDOMNamedFlowCollectionItemMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "namedItem" o = DOMDOMNamedFlowCollectionNamedItemMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "getLength" o = DOMDOMNamedFlowCollectionGetLengthMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveDOMDOMNamedFlowCollectionMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveDOMDOMNamedFlowCollectionMethod t DOMDOMNamedFlowCollection, O.MethodInfo info DOMDOMNamedFlowCollection p) => O.IsLabelProxy t (DOMDOMNamedFlowCollection -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveDOMDOMNamedFlowCollectionMethod t DOMDOMNamedFlowCollection, O.MethodInfo info DOMDOMNamedFlowCollection p) => O.IsLabel t (DOMDOMNamedFlowCollection -> p) where
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif

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

getDOMDOMNamedFlowCollectionLength :: (MonadIO m, IsDOMDOMNamedFlowCollection o) => o -> m CULong
getDOMDOMNamedFlowCollectionLength obj = liftIO $ getObjectPropertyULong obj "length"

data DOMDOMNamedFlowCollectionLengthPropertyInfo
instance AttrInfo DOMDOMNamedFlowCollectionLengthPropertyInfo where
    type AttrAllowedOps DOMDOMNamedFlowCollectionLengthPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMDOMNamedFlowCollectionLengthPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMDOMNamedFlowCollectionLengthPropertyInfo = IsDOMDOMNamedFlowCollection
    type AttrGetType DOMDOMNamedFlowCollectionLengthPropertyInfo = CULong
    type AttrLabel DOMDOMNamedFlowCollectionLengthPropertyInfo = "length"
    type AttrOrigin DOMDOMNamedFlowCollectionLengthPropertyInfo = DOMDOMNamedFlowCollection
    attrGet _ = getDOMDOMNamedFlowCollectionLength
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

instance O.HasAttributeList DOMDOMNamedFlowCollection
type instance O.AttributeList DOMDOMNamedFlowCollection = DOMDOMNamedFlowCollectionAttributeList
type DOMDOMNamedFlowCollectionAttributeList = ('[ '("coreObject", WebKit.DOMObject.DOMObjectCoreObjectPropertyInfo), '("length", DOMDOMNamedFlowCollectionLengthPropertyInfo)] :: [(Symbol, *)])

dOMDOMNamedFlowCollectionLength :: AttrLabelProxy "length"
dOMDOMNamedFlowCollectionLength = AttrLabelProxy

type instance O.SignalList DOMDOMNamedFlowCollection = DOMDOMNamedFlowCollectionSignalList
type DOMDOMNamedFlowCollectionSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method DOMDOMNamedFlowCollection::get_length
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit", name = "DOMDOMNamedFlowCollection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMNamedFlowCollection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TULong)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_dom_named_flow_collection_get_length" webkit_dom_dom_named_flow_collection_get_length :: 
    Ptr DOMDOMNamedFlowCollection ->        -- self : TInterface (Name {namespace = "WebKit", name = "DOMDOMNamedFlowCollection"})
    IO CULong

{- |
/No description available in the introspection data./
-}
dOMDOMNamedFlowCollectionGetLength ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMNamedFlowCollection a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit.Objects.DOMDOMNamedFlowCollection.DOMDOMNamedFlowCollection' -}
    -> m CULong
    {- ^ __Returns:__ A @/gulong/@ -}
dOMDOMNamedFlowCollectionGetLength self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_dom_named_flow_collection_get_length self'
    touchManagedPtr self
    return result

data DOMDOMNamedFlowCollectionGetLengthMethodInfo
instance (signature ~ (m CULong), MonadIO m, IsDOMDOMNamedFlowCollection a) => O.MethodInfo DOMDOMNamedFlowCollectionGetLengthMethodInfo a signature where
    overloadedMethod _ = dOMDOMNamedFlowCollectionGetLength

-- method DOMDOMNamedFlowCollection::item
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit", name = "DOMDOMNamedFlowCollection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMNamedFlowCollection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "index", argType = TBasicType TULong, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #gulong", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "WebKit", name = "DOMWebKitNamedFlow"}))
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_dom_named_flow_collection_item" webkit_dom_dom_named_flow_collection_item :: 
    Ptr DOMDOMNamedFlowCollection ->        -- self : TInterface (Name {namespace = "WebKit", name = "DOMDOMNamedFlowCollection"})
    CULong ->                               -- index : TBasicType TULong
    IO (Ptr WebKit.DOMWebKitNamedFlow.DOMWebKitNamedFlow)

{- |
/No description available in the introspection data./
-}
dOMDOMNamedFlowCollectionItem ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMNamedFlowCollection a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit.Objects.DOMDOMNamedFlowCollection.DOMDOMNamedFlowCollection' -}
    -> CULong
    {- ^ /@index@/: A @/gulong/@ -}
    -> m WebKit.DOMWebKitNamedFlow.DOMWebKitNamedFlow
    {- ^ __Returns:__ A 'GI.WebKit.Objects.DOMWebKitNamedFlow.DOMWebKitNamedFlow' -}
dOMDOMNamedFlowCollectionItem self index = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_dom_named_flow_collection_item self' index
    checkUnexpectedReturnNULL "dOMDOMNamedFlowCollectionItem" result
    result' <- (wrapObject WebKit.DOMWebKitNamedFlow.DOMWebKitNamedFlow) result
    touchManagedPtr self
    return result'

data DOMDOMNamedFlowCollectionItemMethodInfo
instance (signature ~ (CULong -> m WebKit.DOMWebKitNamedFlow.DOMWebKitNamedFlow), MonadIO m, IsDOMDOMNamedFlowCollection a) => O.MethodInfo DOMDOMNamedFlowCollectionItemMethodInfo a signature where
    overloadedMethod _ = dOMDOMNamedFlowCollectionItem

-- method DOMDOMNamedFlowCollection::named_item
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit", name = "DOMDOMNamedFlowCollection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMNamedFlowCollection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "name", 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 : Just (TInterface (Name {namespace = "WebKit", name = "DOMWebKitNamedFlow"}))
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_dom_named_flow_collection_named_item" webkit_dom_dom_named_flow_collection_named_item :: 
    Ptr DOMDOMNamedFlowCollection ->        -- self : TInterface (Name {namespace = "WebKit", name = "DOMDOMNamedFlowCollection"})
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr WebKit.DOMWebKitNamedFlow.DOMWebKitNamedFlow)

{- |
/No description available in the introspection data./
-}
dOMDOMNamedFlowCollectionNamedItem ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMNamedFlowCollection a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit.Objects.DOMDOMNamedFlowCollection.DOMDOMNamedFlowCollection' -}
    -> T.Text
    {- ^ /@name@/: A @/gchar/@ -}
    -> m WebKit.DOMWebKitNamedFlow.DOMWebKitNamedFlow
    {- ^ __Returns:__ A 'GI.WebKit.Objects.DOMWebKitNamedFlow.DOMWebKitNamedFlow' -}
dOMDOMNamedFlowCollectionNamedItem self name = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    name' <- textToCString name
    result <- webkit_dom_dom_named_flow_collection_named_item self' name'
    checkUnexpectedReturnNULL "dOMDOMNamedFlowCollectionNamedItem" result
    result' <- (wrapObject WebKit.DOMWebKitNamedFlow.DOMWebKitNamedFlow) result
    touchManagedPtr self
    freeMem name'
    return result'

data DOMDOMNamedFlowCollectionNamedItemMethodInfo
instance (signature ~ (T.Text -> m WebKit.DOMWebKitNamedFlow.DOMWebKitNamedFlow), MonadIO m, IsDOMDOMNamedFlowCollection a) => O.MethodInfo DOMDOMNamedFlowCollectionNamedItemMethodInfo a signature where
    overloadedMethod _ = dOMDOMNamedFlowCollectionNamedItem