{- |
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.WebKit2WebExtension.Objects.DOMDOMTokenList
    ( 

-- * Exported types
    DOMDOMTokenList(..)                     ,
    IsDOMDOMTokenList                       ,
    toDOMDOMTokenList                       ,
    noDOMDOMTokenList                       ,


 -- * Methods
-- ** contains #method:contains#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    DOMDOMTokenListContainsMethodInfo       ,
#endif
    dOMDOMTokenListContains                 ,


-- ** getLength #method:getLength#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    DOMDOMTokenListGetLengthMethodInfo      ,
#endif
    dOMDOMTokenListGetLength                ,


-- ** getValue #method:getValue#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    DOMDOMTokenListGetValueMethodInfo       ,
#endif
    dOMDOMTokenListGetValue                 ,


-- ** item #method:item#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    DOMDOMTokenListItemMethodInfo           ,
#endif
    dOMDOMTokenListItem                     ,


-- ** replace #method:replace#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    DOMDOMTokenListReplaceMethodInfo        ,
#endif
    dOMDOMTokenListReplace                  ,


-- ** setValue #method:setValue#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    DOMDOMTokenListSetValueMethodInfo       ,
#endif
    dOMDOMTokenListSetValue                 ,


-- ** toggle #method:toggle#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    DOMDOMTokenListToggleMethodInfo         ,
#endif
    dOMDOMTokenListToggle                   ,




 -- * Properties
-- ** length #attr:length#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    DOMDOMTokenListLengthPropertyInfo       ,
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    dOMDOMTokenListLength                   ,
#endif
    getDOMDOMTokenListLength                ,


-- ** value #attr:value#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    DOMDOMTokenListValuePropertyInfo        ,
#endif
    constructDOMDOMTokenListValue           ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    dOMDOMTokenListValue                    ,
#endif
    getDOMDOMTokenListValue                 ,
    setDOMDOMTokenListValue                 ,




    ) 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.WebKit2WebExtension.Objects.DOMObject as WebKit2WebExtension.DOMObject

newtype DOMDOMTokenList = DOMDOMTokenList (ManagedPtr DOMDOMTokenList)
foreign import ccall "webkit_dom_dom_token_list_get_type"
    c_webkit_dom_dom_token_list_get_type :: IO GType

instance GObject DOMDOMTokenList where
    gobjectType _ = c_webkit_dom_dom_token_list_get_type
    

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

toDOMDOMTokenList :: (MonadIO m, IsDOMDOMTokenList o) => o -> m DOMDOMTokenList
toDOMDOMTokenList = liftIO . unsafeCastTo DOMDOMTokenList

noDOMDOMTokenList :: Maybe DOMDOMTokenList
noDOMDOMTokenList = Nothing

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
type family ResolveDOMDOMTokenListMethod (t :: Symbol) (o :: *) :: * where
    ResolveDOMDOMTokenListMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveDOMDOMTokenListMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveDOMDOMTokenListMethod "contains" o = DOMDOMTokenListContainsMethodInfo
    ResolveDOMDOMTokenListMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveDOMDOMTokenListMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveDOMDOMTokenListMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveDOMDOMTokenListMethod "item" o = DOMDOMTokenListItemMethodInfo
    ResolveDOMDOMTokenListMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveDOMDOMTokenListMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveDOMDOMTokenListMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveDOMDOMTokenListMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveDOMDOMTokenListMethod "replace" o = DOMDOMTokenListReplaceMethodInfo
    ResolveDOMDOMTokenListMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveDOMDOMTokenListMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    ResolveDOMDOMTokenListMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveDOMDOMTokenListMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveDOMDOMTokenListMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveDOMDOMTokenListMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveDOMDOMTokenListMethod "toggle" o = DOMDOMTokenListToggleMethodInfo
    ResolveDOMDOMTokenListMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveDOMDOMTokenListMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveDOMDOMTokenListMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveDOMDOMTokenListMethod "getLength" o = DOMDOMTokenListGetLengthMethodInfo
    ResolveDOMDOMTokenListMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveDOMDOMTokenListMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveDOMDOMTokenListMethod "getValue" o = DOMDOMTokenListGetValueMethodInfo
    ResolveDOMDOMTokenListMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveDOMDOMTokenListMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveDOMDOMTokenListMethod "setValue" o = DOMDOMTokenListSetValueMethodInfo
    ResolveDOMDOMTokenListMethod l o = O.MethodResolutionFailed l o

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

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveDOMDOMTokenListMethod t DOMDOMTokenList, O.MethodInfo info DOMDOMTokenList p) => O.IsLabel t (DOMDOMTokenList -> 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

#endif

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

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

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data DOMDOMTokenListLengthPropertyInfo
instance AttrInfo DOMDOMTokenListLengthPropertyInfo where
    type AttrAllowedOps DOMDOMTokenListLengthPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMDOMTokenListLengthPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMDOMTokenListLengthPropertyInfo = IsDOMDOMTokenList
    type AttrGetType DOMDOMTokenListLengthPropertyInfo = CULong
    type AttrLabel DOMDOMTokenListLengthPropertyInfo = "length"
    type AttrOrigin DOMDOMTokenListLengthPropertyInfo = DOMDOMTokenList
    attrGet _ = getDOMDOMTokenListLength
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined
#endif

-- VVV Prop "value"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Nothing,Just False)

getDOMDOMTokenListValue :: (MonadIO m, IsDOMDOMTokenList o) => o -> m (Maybe T.Text)
getDOMDOMTokenListValue obj = liftIO $ getObjectPropertyString obj "value"

setDOMDOMTokenListValue :: (MonadIO m, IsDOMDOMTokenList o) => o -> T.Text -> m ()
setDOMDOMTokenListValue obj val = liftIO $ setObjectPropertyString obj "value" (Just val)

constructDOMDOMTokenListValue :: (IsDOMDOMTokenList o) => T.Text -> IO (GValueConstruct o)
constructDOMDOMTokenListValue val = constructObjectPropertyString "value" (Just val)

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data DOMDOMTokenListValuePropertyInfo
instance AttrInfo DOMDOMTokenListValuePropertyInfo where
    type AttrAllowedOps DOMDOMTokenListValuePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint DOMDOMTokenListValuePropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint DOMDOMTokenListValuePropertyInfo = IsDOMDOMTokenList
    type AttrGetType DOMDOMTokenListValuePropertyInfo = (Maybe T.Text)
    type AttrLabel DOMDOMTokenListValuePropertyInfo = "value"
    type AttrOrigin DOMDOMTokenListValuePropertyInfo = DOMDOMTokenList
    attrGet _ = getDOMDOMTokenListValue
    attrSet _ = setDOMDOMTokenListValue
    attrConstruct _ = constructDOMDOMTokenListValue
    attrClear _ = undefined
#endif

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
instance O.HasAttributeList DOMDOMTokenList
type instance O.AttributeList DOMDOMTokenList = DOMDOMTokenListAttributeList
type DOMDOMTokenListAttributeList = ('[ '("coreObject", WebKit2WebExtension.DOMObject.DOMObjectCoreObjectPropertyInfo), '("length", DOMDOMTokenListLengthPropertyInfo), '("value", DOMDOMTokenListValuePropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
dOMDOMTokenListLength :: AttrLabelProxy "length"
dOMDOMTokenListLength = AttrLabelProxy

dOMDOMTokenListValue :: AttrLabelProxy "value"
dOMDOMTokenListValue = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
type instance O.SignalList DOMDOMTokenList = DOMDOMTokenListSignalList
type DOMDOMTokenListSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

#endif

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

foreign import ccall "webkit_dom_dom_token_list_contains" webkit_dom_dom_token_list_contains :: 
    Ptr DOMDOMTokenList ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMTokenList"})
    CString ->                              -- token : TBasicType TUTF8
    IO CInt

{- |
/No description available in the introspection data./

@since 2.16
-}
dOMDOMTokenListContains ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMTokenList a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMTokenList.DOMDOMTokenList' -}
    -> T.Text
    {- ^ /@token@/: A @/gchar/@ -}
    -> m Bool
    {- ^ __Returns:__ A 'Bool' -}
dOMDOMTokenListContains self token = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    token' <- textToCString token
    result <- webkit_dom_dom_token_list_contains self' token'
    let result' = (/= 0) result
    touchManagedPtr self
    freeMem token'
    return result'

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data DOMDOMTokenListContainsMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsDOMDOMTokenList a) => O.MethodInfo DOMDOMTokenListContainsMethodInfo a signature where
    overloadedMethod _ = dOMDOMTokenListContains

#endif

-- method DOMDOMTokenList::get_length
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMTokenList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMTokenList", 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_token_list_get_length" webkit_dom_dom_token_list_get_length :: 
    Ptr DOMDOMTokenList ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMTokenList"})
    IO CULong

{- |
/No description available in the introspection data./

@since 2.16
-}
dOMDOMTokenListGetLength ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMTokenList a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMTokenList.DOMDOMTokenList' -}
    -> m CULong
    {- ^ __Returns:__ A @/gulong/@ -}
dOMDOMTokenListGetLength self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_dom_token_list_get_length self'
    touchManagedPtr self
    return result

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data DOMDOMTokenListGetLengthMethodInfo
instance (signature ~ (m CULong), MonadIO m, IsDOMDOMTokenList a) => O.MethodInfo DOMDOMTokenListGetLengthMethodInfo a signature where
    overloadedMethod _ = dOMDOMTokenListGetLength

#endif

-- method DOMDOMTokenList::get_value
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMTokenList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMTokenList", 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_dom_token_list_get_value" webkit_dom_dom_token_list_get_value :: 
    Ptr DOMDOMTokenList ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMTokenList"})
    IO CString

{- |
/No description available in the introspection data./

@since 2.16
-}
dOMDOMTokenListGetValue ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMTokenList a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMTokenList.DOMDOMTokenList' -}
    -> m T.Text
    {- ^ __Returns:__ A @/gchar/@ -}
dOMDOMTokenListGetValue self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_dom_token_list_get_value self'
    checkUnexpectedReturnNULL "dOMDOMTokenListGetValue" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr self
    return result'

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data DOMDOMTokenListGetValueMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDOMDOMTokenList a) => O.MethodInfo DOMDOMTokenListGetValueMethodInfo a signature where
    overloadedMethod _ = dOMDOMTokenListGetValue

#endif

-- method DOMDOMTokenList::item
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMTokenList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMTokenList", 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 (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_dom_token_list_item" webkit_dom_dom_token_list_item :: 
    Ptr DOMDOMTokenList ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMTokenList"})
    CULong ->                               -- index : TBasicType TULong
    IO CString

{- |
/No description available in the introspection data./

@since 2.16
-}
dOMDOMTokenListItem ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMTokenList a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMTokenList.DOMDOMTokenList' -}
    -> CULong
    {- ^ /@index@/: A @/gulong/@ -}
    -> m T.Text
    {- ^ __Returns:__ A @/gchar/@ -}
dOMDOMTokenListItem self index = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_dom_token_list_item self' index
    checkUnexpectedReturnNULL "dOMDOMTokenListItem" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr self
    return result'

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data DOMDOMTokenListItemMethodInfo
instance (signature ~ (CULong -> m T.Text), MonadIO m, IsDOMDOMTokenList a) => O.MethodInfo DOMDOMTokenListItemMethodInfo a signature where
    overloadedMethod _ = dOMDOMTokenListItem

#endif

-- method DOMDOMTokenList::replace
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMTokenList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMTokenList", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "token", 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},Arg {argCName = "newToken", 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_dom_token_list_replace" webkit_dom_dom_token_list_replace :: 
    Ptr DOMDOMTokenList ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMTokenList"})
    CString ->                              -- token : TBasicType TUTF8
    CString ->                              -- newToken : TBasicType TUTF8
    Ptr (Ptr GError) ->                     -- error
    IO ()

{- |
/No description available in the introspection data./

@since 2.16
-}
dOMDOMTokenListReplace ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMTokenList a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMTokenList.DOMDOMTokenList' -}
    -> T.Text
    {- ^ /@token@/: A @/gchar/@ -}
    -> T.Text
    {- ^ /@newToken@/: A @/gchar/@ -}
    -> m ()
    {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
dOMDOMTokenListReplace self token newToken = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    token' <- textToCString token
    newToken' <- textToCString newToken
    onException (do
        propagateGError $ webkit_dom_dom_token_list_replace self' token' newToken'
        touchManagedPtr self
        freeMem token'
        freeMem newToken'
        return ()
     ) (do
        freeMem token'
        freeMem newToken'
     )

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data DOMDOMTokenListReplaceMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsDOMDOMTokenList a) => O.MethodInfo DOMDOMTokenListReplaceMethodInfo a signature where
    overloadedMethod _ = dOMDOMTokenListReplace

#endif

-- method DOMDOMTokenList::set_value
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMTokenList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMTokenList", 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 : False
-- Skip return : False

foreign import ccall "webkit_dom_dom_token_list_set_value" webkit_dom_dom_token_list_set_value :: 
    Ptr DOMDOMTokenList ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMTokenList"})
    CString ->                              -- value : TBasicType TUTF8
    IO ()

{- |
/No description available in the introspection data./

@since 2.16
-}
dOMDOMTokenListSetValue ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMTokenList a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMTokenList.DOMDOMTokenList' -}
    -> T.Text
    {- ^ /@value@/: A @/gchar/@ -}
    -> m ()
dOMDOMTokenListSetValue self value = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    value' <- textToCString value
    webkit_dom_dom_token_list_set_value self' value'
    touchManagedPtr self
    freeMem value'
    return ()

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data DOMDOMTokenListSetValueMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDOMDOMTokenList a) => O.MethodInfo DOMDOMTokenListSetValueMethodInfo a signature where
    overloadedMethod _ = dOMDOMTokenListSetValue

#endif

-- method DOMDOMTokenList::toggle
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMTokenList"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMTokenList", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "token", 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},Arg {argCName = "force", argType = TBasicType TBoolean, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #gboolean", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "webkit_dom_dom_token_list_toggle" webkit_dom_dom_token_list_toggle :: 
    Ptr DOMDOMTokenList ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMTokenList"})
    CString ->                              -- token : TBasicType TUTF8
    CInt ->                                 -- force : TBasicType TBoolean
    Ptr (Ptr GError) ->                     -- error
    IO CInt

{- |
/No description available in the introspection data./

@since 2.16
-}
dOMDOMTokenListToggle ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMTokenList a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMTokenList.DOMDOMTokenList' -}
    -> T.Text
    {- ^ /@token@/: A @/gchar/@ -}
    -> Bool
    {- ^ /@force@/: A 'Bool' -}
    -> m ()
    {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
dOMDOMTokenListToggle self token force = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    token' <- textToCString token
    let force' = (fromIntegral . fromEnum) force
    onException (do
        _ <- propagateGError $ webkit_dom_dom_token_list_toggle self' token' force'
        touchManagedPtr self
        freeMem token'
        return ()
     ) (do
        freeMem token'
     )

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data DOMDOMTokenListToggleMethodInfo
instance (signature ~ (T.Text -> Bool -> m ()), MonadIO m, IsDOMDOMTokenList a) => O.MethodInfo DOMDOMTokenListToggleMethodInfo a signature where
    overloadedMethod _ = dOMDOMTokenListToggle

#endif