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

-- * Exported types
    DOMDOMSelection(..)                     ,
    IsDOMDOMSelection                       ,
    toDOMDOMSelection                       ,
    noDOMDOMSelection                       ,


 -- * Methods
-- ** addRange #method:addRange#
    DOMDOMSelectionAddRangeMethodInfo       ,
    dOMDOMSelectionAddRange                 ,


-- ** collapse #method:collapse#
    DOMDOMSelectionCollapseMethodInfo       ,
    dOMDOMSelectionCollapse                 ,


-- ** collapseToEnd #method:collapseToEnd#
    DOMDOMSelectionCollapseToEndMethodInfo  ,
    dOMDOMSelectionCollapseToEnd            ,


-- ** collapseToStart #method:collapseToStart#
    DOMDOMSelectionCollapseToStartMethodInfo,
    dOMDOMSelectionCollapseToStart          ,


-- ** containsNode #method:containsNode#
    DOMDOMSelectionContainsNodeMethodInfo   ,
    dOMDOMSelectionContainsNode             ,


-- ** deleteFromDocument #method:deleteFromDocument#
    DOMDOMSelectionDeleteFromDocumentMethodInfo,
    dOMDOMSelectionDeleteFromDocument       ,


-- ** empty #method:empty#
    DOMDOMSelectionEmptyMethodInfo          ,
    dOMDOMSelectionEmpty                    ,


-- ** extend #method:extend#
    DOMDOMSelectionExtendMethodInfo         ,
    dOMDOMSelectionExtend                   ,


-- ** getAnchorNode #method:getAnchorNode#
    DOMDOMSelectionGetAnchorNodeMethodInfo  ,
    dOMDOMSelectionGetAnchorNode            ,


-- ** getAnchorOffset #method:getAnchorOffset#
    DOMDOMSelectionGetAnchorOffsetMethodInfo,
    dOMDOMSelectionGetAnchorOffset          ,


-- ** getBaseNode #method:getBaseNode#
    DOMDOMSelectionGetBaseNodeMethodInfo    ,
    dOMDOMSelectionGetBaseNode              ,


-- ** getBaseOffset #method:getBaseOffset#
    DOMDOMSelectionGetBaseOffsetMethodInfo  ,
    dOMDOMSelectionGetBaseOffset            ,


-- ** getExtentNode #method:getExtentNode#
    DOMDOMSelectionGetExtentNodeMethodInfo  ,
    dOMDOMSelectionGetExtentNode            ,


-- ** getExtentOffset #method:getExtentOffset#
    DOMDOMSelectionGetExtentOffsetMethodInfo,
    dOMDOMSelectionGetExtentOffset          ,


-- ** getFocusNode #method:getFocusNode#
    DOMDOMSelectionGetFocusNodeMethodInfo   ,
    dOMDOMSelectionGetFocusNode             ,


-- ** getFocusOffset #method:getFocusOffset#
    DOMDOMSelectionGetFocusOffsetMethodInfo ,
    dOMDOMSelectionGetFocusOffset           ,


-- ** getIsCollapsed #method:getIsCollapsed#
    DOMDOMSelectionGetIsCollapsedMethodInfo ,
    dOMDOMSelectionGetIsCollapsed           ,


-- ** getRangeAt #method:getRangeAt#
    DOMDOMSelectionGetRangeAtMethodInfo     ,
    dOMDOMSelectionGetRangeAt               ,


-- ** getRangeCount #method:getRangeCount#
    DOMDOMSelectionGetRangeCountMethodInfo  ,
    dOMDOMSelectionGetRangeCount            ,


-- ** getSelectionType #method:getSelectionType#
    DOMDOMSelectionGetSelectionTypeMethodInfo,
    dOMDOMSelectionGetSelectionType         ,


-- ** modify #method:modify#
    DOMDOMSelectionModifyMethodInfo         ,
    dOMDOMSelectionModify                   ,


-- ** removeAllRanges #method:removeAllRanges#
    DOMDOMSelectionRemoveAllRangesMethodInfo,
    dOMDOMSelectionRemoveAllRanges          ,


-- ** selectAllChildren #method:selectAllChildren#
    DOMDOMSelectionSelectAllChildrenMethodInfo,
    dOMDOMSelectionSelectAllChildren        ,


-- ** setBaseAndExtent #method:setBaseAndExtent#
    DOMDOMSelectionSetBaseAndExtentMethodInfo,
    dOMDOMSelectionSetBaseAndExtent         ,


-- ** setPosition #method:setPosition#
    DOMDOMSelectionSetPositionMethodInfo    ,
    dOMDOMSelectionSetPosition              ,




 -- * Properties
-- ** anchorNode #attr:anchorNode#
    DOMDOMSelectionAnchorNodePropertyInfo   ,
    dOMDOMSelectionAnchorNode               ,
    getDOMDOMSelectionAnchorNode            ,


-- ** anchorOffset #attr:anchorOffset#
    DOMDOMSelectionAnchorOffsetPropertyInfo ,
    dOMDOMSelectionAnchorOffset             ,
    getDOMDOMSelectionAnchorOffset          ,


-- ** baseNode #attr:baseNode#
    DOMDOMSelectionBaseNodePropertyInfo     ,
    dOMDOMSelectionBaseNode                 ,
    getDOMDOMSelectionBaseNode              ,


-- ** baseOffset #attr:baseOffset#
    DOMDOMSelectionBaseOffsetPropertyInfo   ,
    dOMDOMSelectionBaseOffset               ,
    getDOMDOMSelectionBaseOffset            ,


-- ** extentNode #attr:extentNode#
    DOMDOMSelectionExtentNodePropertyInfo   ,
    dOMDOMSelectionExtentNode               ,
    getDOMDOMSelectionExtentNode            ,


-- ** extentOffset #attr:extentOffset#
    DOMDOMSelectionExtentOffsetPropertyInfo ,
    dOMDOMSelectionExtentOffset             ,
    getDOMDOMSelectionExtentOffset          ,


-- ** focusNode #attr:focusNode#
    DOMDOMSelectionFocusNodePropertyInfo    ,
    dOMDOMSelectionFocusNode                ,
    getDOMDOMSelectionFocusNode             ,


-- ** focusOffset #attr:focusOffset#
    DOMDOMSelectionFocusOffsetPropertyInfo  ,
    dOMDOMSelectionFocusOffset              ,
    getDOMDOMSelectionFocusOffset           ,


-- ** isCollapsed #attr:isCollapsed#
    DOMDOMSelectionIsCollapsedPropertyInfo  ,
    dOMDOMSelectionIsCollapsed              ,
    getDOMDOMSelectionIsCollapsed           ,


-- ** rangeCount #attr:rangeCount#
    DOMDOMSelectionRangeCountPropertyInfo   ,
    dOMDOMSelectionRangeCount               ,
    getDOMDOMSelectionRangeCount            ,


-- ** type #attr:type#
    DOMDOMSelectionTypePropertyInfo         ,
    dOMDOMSelectionType                     ,
    getDOMDOMSelectionType                  ,




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

newtype DOMDOMSelection = DOMDOMSelection (ManagedPtr DOMDOMSelection)
foreign import ccall "webkit_dom_dom_selection_get_type"
    c_webkit_dom_dom_selection_get_type :: IO GType

instance GObject DOMDOMSelection where
    gobjectType _ = c_webkit_dom_dom_selection_get_type
    

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

toDOMDOMSelection :: IsDOMDOMSelection o => o -> IO DOMDOMSelection
toDOMDOMSelection = unsafeCastTo DOMDOMSelection

noDOMDOMSelection :: Maybe DOMDOMSelection
noDOMDOMSelection = Nothing

type family ResolveDOMDOMSelectionMethod (t :: Symbol) (o :: *) :: * where
    ResolveDOMDOMSelectionMethod "addRange" o = DOMDOMSelectionAddRangeMethodInfo
    ResolveDOMDOMSelectionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveDOMDOMSelectionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveDOMDOMSelectionMethod "collapse" o = DOMDOMSelectionCollapseMethodInfo
    ResolveDOMDOMSelectionMethod "collapseToEnd" o = DOMDOMSelectionCollapseToEndMethodInfo
    ResolveDOMDOMSelectionMethod "collapseToStart" o = DOMDOMSelectionCollapseToStartMethodInfo
    ResolveDOMDOMSelectionMethod "containsNode" o = DOMDOMSelectionContainsNodeMethodInfo
    ResolveDOMDOMSelectionMethod "deleteFromDocument" o = DOMDOMSelectionDeleteFromDocumentMethodInfo
    ResolveDOMDOMSelectionMethod "empty" o = DOMDOMSelectionEmptyMethodInfo
    ResolveDOMDOMSelectionMethod "extend" o = DOMDOMSelectionExtendMethodInfo
    ResolveDOMDOMSelectionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveDOMDOMSelectionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveDOMDOMSelectionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveDOMDOMSelectionMethod "modify" o = DOMDOMSelectionModifyMethodInfo
    ResolveDOMDOMSelectionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveDOMDOMSelectionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveDOMDOMSelectionMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveDOMDOMSelectionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveDOMDOMSelectionMethod "removeAllRanges" o = DOMDOMSelectionRemoveAllRangesMethodInfo
    ResolveDOMDOMSelectionMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveDOMDOMSelectionMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    ResolveDOMDOMSelectionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveDOMDOMSelectionMethod "selectAllChildren" o = DOMDOMSelectionSelectAllChildrenMethodInfo
    ResolveDOMDOMSelectionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveDOMDOMSelectionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveDOMDOMSelectionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveDOMDOMSelectionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveDOMDOMSelectionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveDOMDOMSelectionMethod "getAnchorNode" o = DOMDOMSelectionGetAnchorNodeMethodInfo
    ResolveDOMDOMSelectionMethod "getAnchorOffset" o = DOMDOMSelectionGetAnchorOffsetMethodInfo
    ResolveDOMDOMSelectionMethod "getBaseNode" o = DOMDOMSelectionGetBaseNodeMethodInfo
    ResolveDOMDOMSelectionMethod "getBaseOffset" o = DOMDOMSelectionGetBaseOffsetMethodInfo
    ResolveDOMDOMSelectionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveDOMDOMSelectionMethod "getExtentNode" o = DOMDOMSelectionGetExtentNodeMethodInfo
    ResolveDOMDOMSelectionMethod "getExtentOffset" o = DOMDOMSelectionGetExtentOffsetMethodInfo
    ResolveDOMDOMSelectionMethod "getFocusNode" o = DOMDOMSelectionGetFocusNodeMethodInfo
    ResolveDOMDOMSelectionMethod "getFocusOffset" o = DOMDOMSelectionGetFocusOffsetMethodInfo
    ResolveDOMDOMSelectionMethod "getIsCollapsed" o = DOMDOMSelectionGetIsCollapsedMethodInfo
    ResolveDOMDOMSelectionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveDOMDOMSelectionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveDOMDOMSelectionMethod "getRangeAt" o = DOMDOMSelectionGetRangeAtMethodInfo
    ResolveDOMDOMSelectionMethod "getRangeCount" o = DOMDOMSelectionGetRangeCountMethodInfo
    ResolveDOMDOMSelectionMethod "getSelectionType" o = DOMDOMSelectionGetSelectionTypeMethodInfo
    ResolveDOMDOMSelectionMethod "setBaseAndExtent" o = DOMDOMSelectionSetBaseAndExtentMethodInfo
    ResolveDOMDOMSelectionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveDOMDOMSelectionMethod "setPosition" o = DOMDOMSelectionSetPositionMethodInfo
    ResolveDOMDOMSelectionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveDOMDOMSelectionMethod l o = O.MethodResolutionFailed l o

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

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

-- VVV Prop "anchor-node"
   -- Type: TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMNode"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

getDOMDOMSelectionAnchorNode :: (MonadIO m, IsDOMDOMSelection o) => o -> m WebKit2WebExtension.DOMNode.DOMNode
getDOMDOMSelectionAnchorNode obj = liftIO $ checkUnexpectedNothing "getDOMDOMSelectionAnchorNode" $ getObjectPropertyObject obj "anchor-node" WebKit2WebExtension.DOMNode.DOMNode

data DOMDOMSelectionAnchorNodePropertyInfo
instance AttrInfo DOMDOMSelectionAnchorNodePropertyInfo where
    type AttrAllowedOps DOMDOMSelectionAnchorNodePropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DOMDOMSelectionAnchorNodePropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMDOMSelectionAnchorNodePropertyInfo = IsDOMDOMSelection
    type AttrGetType DOMDOMSelectionAnchorNodePropertyInfo = WebKit2WebExtension.DOMNode.DOMNode
    type AttrLabel DOMDOMSelectionAnchorNodePropertyInfo = "anchor-node"
    type AttrOrigin DOMDOMSelectionAnchorNodePropertyInfo = DOMDOMSelection
    attrGet _ = getDOMDOMSelectionAnchorNode
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

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

getDOMDOMSelectionAnchorOffset :: (MonadIO m, IsDOMDOMSelection o) => o -> m CULong
getDOMDOMSelectionAnchorOffset obj = liftIO $ getObjectPropertyULong obj "anchor-offset"

data DOMDOMSelectionAnchorOffsetPropertyInfo
instance AttrInfo DOMDOMSelectionAnchorOffsetPropertyInfo where
    type AttrAllowedOps DOMDOMSelectionAnchorOffsetPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMDOMSelectionAnchorOffsetPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMDOMSelectionAnchorOffsetPropertyInfo = IsDOMDOMSelection
    type AttrGetType DOMDOMSelectionAnchorOffsetPropertyInfo = CULong
    type AttrLabel DOMDOMSelectionAnchorOffsetPropertyInfo = "anchor-offset"
    type AttrOrigin DOMDOMSelectionAnchorOffsetPropertyInfo = DOMDOMSelection
    attrGet _ = getDOMDOMSelectionAnchorOffset
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "base-node"
   -- Type: TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMNode"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

getDOMDOMSelectionBaseNode :: (MonadIO m, IsDOMDOMSelection o) => o -> m WebKit2WebExtension.DOMNode.DOMNode
getDOMDOMSelectionBaseNode obj = liftIO $ checkUnexpectedNothing "getDOMDOMSelectionBaseNode" $ getObjectPropertyObject obj "base-node" WebKit2WebExtension.DOMNode.DOMNode

data DOMDOMSelectionBaseNodePropertyInfo
instance AttrInfo DOMDOMSelectionBaseNodePropertyInfo where
    type AttrAllowedOps DOMDOMSelectionBaseNodePropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DOMDOMSelectionBaseNodePropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMDOMSelectionBaseNodePropertyInfo = IsDOMDOMSelection
    type AttrGetType DOMDOMSelectionBaseNodePropertyInfo = WebKit2WebExtension.DOMNode.DOMNode
    type AttrLabel DOMDOMSelectionBaseNodePropertyInfo = "base-node"
    type AttrOrigin DOMDOMSelectionBaseNodePropertyInfo = DOMDOMSelection
    attrGet _ = getDOMDOMSelectionBaseNode
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

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

getDOMDOMSelectionBaseOffset :: (MonadIO m, IsDOMDOMSelection o) => o -> m CULong
getDOMDOMSelectionBaseOffset obj = liftIO $ getObjectPropertyULong obj "base-offset"

data DOMDOMSelectionBaseOffsetPropertyInfo
instance AttrInfo DOMDOMSelectionBaseOffsetPropertyInfo where
    type AttrAllowedOps DOMDOMSelectionBaseOffsetPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMDOMSelectionBaseOffsetPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMDOMSelectionBaseOffsetPropertyInfo = IsDOMDOMSelection
    type AttrGetType DOMDOMSelectionBaseOffsetPropertyInfo = CULong
    type AttrLabel DOMDOMSelectionBaseOffsetPropertyInfo = "base-offset"
    type AttrOrigin DOMDOMSelectionBaseOffsetPropertyInfo = DOMDOMSelection
    attrGet _ = getDOMDOMSelectionBaseOffset
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "extent-node"
   -- Type: TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMNode"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

getDOMDOMSelectionExtentNode :: (MonadIO m, IsDOMDOMSelection o) => o -> m WebKit2WebExtension.DOMNode.DOMNode
getDOMDOMSelectionExtentNode obj = liftIO $ checkUnexpectedNothing "getDOMDOMSelectionExtentNode" $ getObjectPropertyObject obj "extent-node" WebKit2WebExtension.DOMNode.DOMNode

data DOMDOMSelectionExtentNodePropertyInfo
instance AttrInfo DOMDOMSelectionExtentNodePropertyInfo where
    type AttrAllowedOps DOMDOMSelectionExtentNodePropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DOMDOMSelectionExtentNodePropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMDOMSelectionExtentNodePropertyInfo = IsDOMDOMSelection
    type AttrGetType DOMDOMSelectionExtentNodePropertyInfo = WebKit2WebExtension.DOMNode.DOMNode
    type AttrLabel DOMDOMSelectionExtentNodePropertyInfo = "extent-node"
    type AttrOrigin DOMDOMSelectionExtentNodePropertyInfo = DOMDOMSelection
    attrGet _ = getDOMDOMSelectionExtentNode
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

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

getDOMDOMSelectionExtentOffset :: (MonadIO m, IsDOMDOMSelection o) => o -> m CULong
getDOMDOMSelectionExtentOffset obj = liftIO $ getObjectPropertyULong obj "extent-offset"

data DOMDOMSelectionExtentOffsetPropertyInfo
instance AttrInfo DOMDOMSelectionExtentOffsetPropertyInfo where
    type AttrAllowedOps DOMDOMSelectionExtentOffsetPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMDOMSelectionExtentOffsetPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMDOMSelectionExtentOffsetPropertyInfo = IsDOMDOMSelection
    type AttrGetType DOMDOMSelectionExtentOffsetPropertyInfo = CULong
    type AttrLabel DOMDOMSelectionExtentOffsetPropertyInfo = "extent-offset"
    type AttrOrigin DOMDOMSelectionExtentOffsetPropertyInfo = DOMDOMSelection
    attrGet _ = getDOMDOMSelectionExtentOffset
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "focus-node"
   -- Type: TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMNode"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

getDOMDOMSelectionFocusNode :: (MonadIO m, IsDOMDOMSelection o) => o -> m WebKit2WebExtension.DOMNode.DOMNode
getDOMDOMSelectionFocusNode obj = liftIO $ checkUnexpectedNothing "getDOMDOMSelectionFocusNode" $ getObjectPropertyObject obj "focus-node" WebKit2WebExtension.DOMNode.DOMNode

data DOMDOMSelectionFocusNodePropertyInfo
instance AttrInfo DOMDOMSelectionFocusNodePropertyInfo where
    type AttrAllowedOps DOMDOMSelectionFocusNodePropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DOMDOMSelectionFocusNodePropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMDOMSelectionFocusNodePropertyInfo = IsDOMDOMSelection
    type AttrGetType DOMDOMSelectionFocusNodePropertyInfo = WebKit2WebExtension.DOMNode.DOMNode
    type AttrLabel DOMDOMSelectionFocusNodePropertyInfo = "focus-node"
    type AttrOrigin DOMDOMSelectionFocusNodePropertyInfo = DOMDOMSelection
    attrGet _ = getDOMDOMSelectionFocusNode
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

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

getDOMDOMSelectionFocusOffset :: (MonadIO m, IsDOMDOMSelection o) => o -> m CULong
getDOMDOMSelectionFocusOffset obj = liftIO $ getObjectPropertyULong obj "focus-offset"

data DOMDOMSelectionFocusOffsetPropertyInfo
instance AttrInfo DOMDOMSelectionFocusOffsetPropertyInfo where
    type AttrAllowedOps DOMDOMSelectionFocusOffsetPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMDOMSelectionFocusOffsetPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMDOMSelectionFocusOffsetPropertyInfo = IsDOMDOMSelection
    type AttrGetType DOMDOMSelectionFocusOffsetPropertyInfo = CULong
    type AttrLabel DOMDOMSelectionFocusOffsetPropertyInfo = "focus-offset"
    type AttrOrigin DOMDOMSelectionFocusOffsetPropertyInfo = DOMDOMSelection
    attrGet _ = getDOMDOMSelectionFocusOffset
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "is-collapsed"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

getDOMDOMSelectionIsCollapsed :: (MonadIO m, IsDOMDOMSelection o) => o -> m Bool
getDOMDOMSelectionIsCollapsed obj = liftIO $ getObjectPropertyBool obj "is-collapsed"

data DOMDOMSelectionIsCollapsedPropertyInfo
instance AttrInfo DOMDOMSelectionIsCollapsedPropertyInfo where
    type AttrAllowedOps DOMDOMSelectionIsCollapsedPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMDOMSelectionIsCollapsedPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMDOMSelectionIsCollapsedPropertyInfo = IsDOMDOMSelection
    type AttrGetType DOMDOMSelectionIsCollapsedPropertyInfo = Bool
    type AttrLabel DOMDOMSelectionIsCollapsedPropertyInfo = "is-collapsed"
    type AttrOrigin DOMDOMSelectionIsCollapsedPropertyInfo = DOMDOMSelection
    attrGet _ = getDOMDOMSelectionIsCollapsed
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

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

getDOMDOMSelectionRangeCount :: (MonadIO m, IsDOMDOMSelection o) => o -> m CULong
getDOMDOMSelectionRangeCount obj = liftIO $ getObjectPropertyULong obj "range-count"

data DOMDOMSelectionRangeCountPropertyInfo
instance AttrInfo DOMDOMSelectionRangeCountPropertyInfo where
    type AttrAllowedOps DOMDOMSelectionRangeCountPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMDOMSelectionRangeCountPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMDOMSelectionRangeCountPropertyInfo = IsDOMDOMSelection
    type AttrGetType DOMDOMSelectionRangeCountPropertyInfo = CULong
    type AttrLabel DOMDOMSelectionRangeCountPropertyInfo = "range-count"
    type AttrOrigin DOMDOMSelectionRangeCountPropertyInfo = DOMDOMSelection
    attrGet _ = getDOMDOMSelectionRangeCount
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "type"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

getDOMDOMSelectionType :: (MonadIO m, IsDOMDOMSelection o) => o -> m (Maybe T.Text)
getDOMDOMSelectionType obj = liftIO $ getObjectPropertyString obj "type"

data DOMDOMSelectionTypePropertyInfo
instance AttrInfo DOMDOMSelectionTypePropertyInfo where
    type AttrAllowedOps DOMDOMSelectionTypePropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint DOMDOMSelectionTypePropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMDOMSelectionTypePropertyInfo = IsDOMDOMSelection
    type AttrGetType DOMDOMSelectionTypePropertyInfo = (Maybe T.Text)
    type AttrLabel DOMDOMSelectionTypePropertyInfo = "type"
    type AttrOrigin DOMDOMSelectionTypePropertyInfo = DOMDOMSelection
    attrGet _ = getDOMDOMSelectionType
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

instance O.HasAttributeList DOMDOMSelection
type instance O.AttributeList DOMDOMSelection = DOMDOMSelectionAttributeList
type DOMDOMSelectionAttributeList = ('[ '("anchorNode", DOMDOMSelectionAnchorNodePropertyInfo), '("anchorOffset", DOMDOMSelectionAnchorOffsetPropertyInfo), '("baseNode", DOMDOMSelectionBaseNodePropertyInfo), '("baseOffset", DOMDOMSelectionBaseOffsetPropertyInfo), '("coreObject", WebKit2WebExtension.DOMObject.DOMObjectCoreObjectPropertyInfo), '("extentNode", DOMDOMSelectionExtentNodePropertyInfo), '("extentOffset", DOMDOMSelectionExtentOffsetPropertyInfo), '("focusNode", DOMDOMSelectionFocusNodePropertyInfo), '("focusOffset", DOMDOMSelectionFocusOffsetPropertyInfo), '("isCollapsed", DOMDOMSelectionIsCollapsedPropertyInfo), '("rangeCount", DOMDOMSelectionRangeCountPropertyInfo), '("type", DOMDOMSelectionTypePropertyInfo)] :: [(Symbol, *)])

dOMDOMSelectionAnchorNode :: AttrLabelProxy "anchorNode"
dOMDOMSelectionAnchorNode = AttrLabelProxy

dOMDOMSelectionAnchorOffset :: AttrLabelProxy "anchorOffset"
dOMDOMSelectionAnchorOffset = AttrLabelProxy

dOMDOMSelectionBaseNode :: AttrLabelProxy "baseNode"
dOMDOMSelectionBaseNode = AttrLabelProxy

dOMDOMSelectionBaseOffset :: AttrLabelProxy "baseOffset"
dOMDOMSelectionBaseOffset = AttrLabelProxy

dOMDOMSelectionExtentNode :: AttrLabelProxy "extentNode"
dOMDOMSelectionExtentNode = AttrLabelProxy

dOMDOMSelectionExtentOffset :: AttrLabelProxy "extentOffset"
dOMDOMSelectionExtentOffset = AttrLabelProxy

dOMDOMSelectionFocusNode :: AttrLabelProxy "focusNode"
dOMDOMSelectionFocusNode = AttrLabelProxy

dOMDOMSelectionFocusOffset :: AttrLabelProxy "focusOffset"
dOMDOMSelectionFocusOffset = AttrLabelProxy

dOMDOMSelectionIsCollapsed :: AttrLabelProxy "isCollapsed"
dOMDOMSelectionIsCollapsed = AttrLabelProxy

dOMDOMSelectionRangeCount :: AttrLabelProxy "rangeCount"
dOMDOMSelectionRangeCount = AttrLabelProxy

dOMDOMSelectionType :: AttrLabelProxy "type"
dOMDOMSelectionType = AttrLabelProxy

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

-- method DOMDOMSelection::add_range
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMSelection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "range", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMRange"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMRange", 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_selection_add_range" webkit_dom_dom_selection_add_range :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    Ptr WebKit2WebExtension.DOMRange.DOMRange -> -- range : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMRange"})
    IO ()

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

@since 2.16
-}
dOMDOMSelectionAddRange ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a, WebKit2WebExtension.DOMRange.IsDOMRange b) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> b
    {- ^ /@range@/: A 'GI.WebKit2WebExtension.Objects.DOMRange.DOMRange' -}
    -> m ()
dOMDOMSelectionAddRange self range = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    range' <- unsafeManagedPtrCastPtr range
    webkit_dom_dom_selection_add_range self' range'
    touchManagedPtr self
    touchManagedPtr range
    return ()

data DOMDOMSelectionAddRangeMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDOMDOMSelection a, WebKit2WebExtension.DOMRange.IsDOMRange b) => O.MethodInfo DOMDOMSelectionAddRangeMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionAddRange

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

foreign import ccall "webkit_dom_dom_selection_collapse" webkit_dom_dom_selection_collapse :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    Ptr WebKit2WebExtension.DOMNode.DOMNode -> -- node : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMNode"})
    CULong ->                               -- offset : TBasicType TULong
    IO ()

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

@since 2.16
-}
dOMDOMSelectionCollapse ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a, WebKit2WebExtension.DOMNode.IsDOMNode b) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> b
    {- ^ /@node@/: A 'GI.WebKit2WebExtension.Objects.DOMNode.DOMNode' -}
    -> CULong
    {- ^ /@offset@/: A @/gulong/@ -}
    -> m ()
dOMDOMSelectionCollapse self node offset = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    node' <- unsafeManagedPtrCastPtr node
    webkit_dom_dom_selection_collapse self' node' offset
    touchManagedPtr self
    touchManagedPtr node
    return ()

data DOMDOMSelectionCollapseMethodInfo
instance (signature ~ (b -> CULong -> m ()), MonadIO m, IsDOMDOMSelection a, WebKit2WebExtension.DOMNode.IsDOMNode b) => O.MethodInfo DOMDOMSelectionCollapseMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionCollapse

-- method DOMDOMSelection::collapse_to_end
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMSelection", 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_selection_collapse_to_end" webkit_dom_dom_selection_collapse_to_end :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    Ptr (Ptr GError) ->                     -- error
    IO ()

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

@since 2.16
-}
dOMDOMSelectionCollapseToEnd ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> m ()
    {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
dOMDOMSelectionCollapseToEnd self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    onException (do
        propagateGError $ webkit_dom_dom_selection_collapse_to_end self'
        touchManagedPtr self
        return ()
     ) (do
        return ()
     )

data DOMDOMSelectionCollapseToEndMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionCollapseToEndMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionCollapseToEnd

-- method DOMDOMSelection::collapse_to_start
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMSelection", 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_selection_collapse_to_start" webkit_dom_dom_selection_collapse_to_start :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    Ptr (Ptr GError) ->                     -- error
    IO ()

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

@since 2.16
-}
dOMDOMSelectionCollapseToStart ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> m ()
    {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
dOMDOMSelectionCollapseToStart self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    onException (do
        propagateGError $ webkit_dom_dom_selection_collapse_to_start self'
        touchManagedPtr self
        return ()
     ) (do
        return ()
     )

data DOMDOMSelectionCollapseToStartMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionCollapseToStartMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionCollapseToStart

-- method DOMDOMSelection::contains_node
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMSelection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "node", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMNode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMNode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "allowPartial", 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 : False
-- Skip return : False

foreign import ccall "webkit_dom_dom_selection_contains_node" webkit_dom_dom_selection_contains_node :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    Ptr WebKit2WebExtension.DOMNode.DOMNode -> -- node : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMNode"})
    CInt ->                                 -- allowPartial : TBasicType TBoolean
    IO CInt

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

@since 2.16
-}
dOMDOMSelectionContainsNode ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a, WebKit2WebExtension.DOMNode.IsDOMNode b) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> b
    {- ^ /@node@/: A 'GI.WebKit2WebExtension.Objects.DOMNode.DOMNode' -}
    -> Bool
    {- ^ /@allowPartial@/: A 'Bool' -}
    -> m Bool
    {- ^ __Returns:__ A 'Bool' -}
dOMDOMSelectionContainsNode self node allowPartial = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    node' <- unsafeManagedPtrCastPtr node
    let allowPartial' = (fromIntegral . fromEnum) allowPartial
    result <- webkit_dom_dom_selection_contains_node self' node' allowPartial'
    let result' = (/= 0) result
    touchManagedPtr self
    touchManagedPtr node
    return result'

data DOMDOMSelectionContainsNodeMethodInfo
instance (signature ~ (b -> Bool -> m Bool), MonadIO m, IsDOMDOMSelection a, WebKit2WebExtension.DOMNode.IsDOMNode b) => O.MethodInfo DOMDOMSelectionContainsNodeMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionContainsNode

-- method DOMDOMSelection::delete_from_document
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMSelection", 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_selection_delete_from_document" webkit_dom_dom_selection_delete_from_document :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    IO ()

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

@since 2.16
-}
dOMDOMSelectionDeleteFromDocument ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> m ()
dOMDOMSelectionDeleteFromDocument self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    webkit_dom_dom_selection_delete_from_document self'
    touchManagedPtr self
    return ()

data DOMDOMSelectionDeleteFromDocumentMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionDeleteFromDocumentMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionDeleteFromDocument

-- method DOMDOMSelection::empty
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMSelection", 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_selection_empty" webkit_dom_dom_selection_empty :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    IO ()

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

@since 2.16
-}
dOMDOMSelectionEmpty ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> m ()
dOMDOMSelectionEmpty self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    webkit_dom_dom_selection_empty self'
    touchManagedPtr self
    return ()

data DOMDOMSelectionEmptyMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionEmptyMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionEmpty

-- method DOMDOMSelection::extend
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMSelection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "node", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMNode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMNode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "offset", 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 : Nothing
-- throws : True
-- Skip return : False

foreign import ccall "webkit_dom_dom_selection_extend" webkit_dom_dom_selection_extend :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    Ptr WebKit2WebExtension.DOMNode.DOMNode -> -- node : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMNode"})
    CULong ->                               -- offset : TBasicType TULong
    Ptr (Ptr GError) ->                     -- error
    IO ()

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

@since 2.16
-}
dOMDOMSelectionExtend ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a, WebKit2WebExtension.DOMNode.IsDOMNode b) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> b
    {- ^ /@node@/: A 'GI.WebKit2WebExtension.Objects.DOMNode.DOMNode' -}
    -> CULong
    {- ^ /@offset@/: A @/gulong/@ -}
    -> m ()
    {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
dOMDOMSelectionExtend self node offset = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    node' <- unsafeManagedPtrCastPtr node
    onException (do
        propagateGError $ webkit_dom_dom_selection_extend self' node' offset
        touchManagedPtr self
        touchManagedPtr node
        return ()
     ) (do
        return ()
     )

data DOMDOMSelectionExtendMethodInfo
instance (signature ~ (b -> CULong -> m ()), MonadIO m, IsDOMDOMSelection a, WebKit2WebExtension.DOMNode.IsDOMNode b) => O.MethodInfo DOMDOMSelectionExtendMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionExtend

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

foreign import ccall "webkit_dom_dom_selection_get_anchor_node" webkit_dom_dom_selection_get_anchor_node :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    IO (Ptr WebKit2WebExtension.DOMNode.DOMNode)

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

@since 2.16
-}
dOMDOMSelectionGetAnchorNode ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> m WebKit2WebExtension.DOMNode.DOMNode
    {- ^ __Returns:__ A 'GI.WebKit2WebExtension.Objects.DOMNode.DOMNode' -}
dOMDOMSelectionGetAnchorNode self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_dom_selection_get_anchor_node self'
    checkUnexpectedReturnNULL "dOMDOMSelectionGetAnchorNode" result
    result' <- (newObject WebKit2WebExtension.DOMNode.DOMNode) result
    touchManagedPtr self
    return result'

data DOMDOMSelectionGetAnchorNodeMethodInfo
instance (signature ~ (m WebKit2WebExtension.DOMNode.DOMNode), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionGetAnchorNodeMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionGetAnchorNode

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

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

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

data DOMDOMSelectionGetAnchorOffsetMethodInfo
instance (signature ~ (m CULong), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionGetAnchorOffsetMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionGetAnchorOffset

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

foreign import ccall "webkit_dom_dom_selection_get_base_node" webkit_dom_dom_selection_get_base_node :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    IO (Ptr WebKit2WebExtension.DOMNode.DOMNode)

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

@since 2.16
-}
dOMDOMSelectionGetBaseNode ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> m WebKit2WebExtension.DOMNode.DOMNode
    {- ^ __Returns:__ A 'GI.WebKit2WebExtension.Objects.DOMNode.DOMNode' -}
dOMDOMSelectionGetBaseNode self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_dom_selection_get_base_node self'
    checkUnexpectedReturnNULL "dOMDOMSelectionGetBaseNode" result
    result' <- (newObject WebKit2WebExtension.DOMNode.DOMNode) result
    touchManagedPtr self
    return result'

data DOMDOMSelectionGetBaseNodeMethodInfo
instance (signature ~ (m WebKit2WebExtension.DOMNode.DOMNode), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionGetBaseNodeMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionGetBaseNode

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

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

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

data DOMDOMSelectionGetBaseOffsetMethodInfo
instance (signature ~ (m CULong), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionGetBaseOffsetMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionGetBaseOffset

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

foreign import ccall "webkit_dom_dom_selection_get_extent_node" webkit_dom_dom_selection_get_extent_node :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    IO (Ptr WebKit2WebExtension.DOMNode.DOMNode)

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

@since 2.16
-}
dOMDOMSelectionGetExtentNode ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> m WebKit2WebExtension.DOMNode.DOMNode
    {- ^ __Returns:__ A 'GI.WebKit2WebExtension.Objects.DOMNode.DOMNode' -}
dOMDOMSelectionGetExtentNode self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_dom_selection_get_extent_node self'
    checkUnexpectedReturnNULL "dOMDOMSelectionGetExtentNode" result
    result' <- (newObject WebKit2WebExtension.DOMNode.DOMNode) result
    touchManagedPtr self
    return result'

data DOMDOMSelectionGetExtentNodeMethodInfo
instance (signature ~ (m WebKit2WebExtension.DOMNode.DOMNode), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionGetExtentNodeMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionGetExtentNode

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

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

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

data DOMDOMSelectionGetExtentOffsetMethodInfo
instance (signature ~ (m CULong), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionGetExtentOffsetMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionGetExtentOffset

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

foreign import ccall "webkit_dom_dom_selection_get_focus_node" webkit_dom_dom_selection_get_focus_node :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    IO (Ptr WebKit2WebExtension.DOMNode.DOMNode)

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

@since 2.16
-}
dOMDOMSelectionGetFocusNode ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> m WebKit2WebExtension.DOMNode.DOMNode
    {- ^ __Returns:__ A 'GI.WebKit2WebExtension.Objects.DOMNode.DOMNode' -}
dOMDOMSelectionGetFocusNode self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_dom_selection_get_focus_node self'
    checkUnexpectedReturnNULL "dOMDOMSelectionGetFocusNode" result
    result' <- (newObject WebKit2WebExtension.DOMNode.DOMNode) result
    touchManagedPtr self
    return result'

data DOMDOMSelectionGetFocusNodeMethodInfo
instance (signature ~ (m WebKit2WebExtension.DOMNode.DOMNode), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionGetFocusNodeMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionGetFocusNode

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

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

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

data DOMDOMSelectionGetFocusOffsetMethodInfo
instance (signature ~ (m CULong), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionGetFocusOffsetMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionGetFocusOffset

-- method DOMDOMSelection::get_is_collapsed
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMSelection", 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_selection_get_is_collapsed" webkit_dom_dom_selection_get_is_collapsed :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    IO CInt

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

@since 2.16
-}
dOMDOMSelectionGetIsCollapsed ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> m Bool
    {- ^ __Returns:__ A 'Bool' -}
dOMDOMSelectionGetIsCollapsed self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_dom_selection_get_is_collapsed self'
    let result' = (/= 0) result
    touchManagedPtr self
    return result'

data DOMDOMSelectionGetIsCollapsedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionGetIsCollapsedMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionGetIsCollapsed

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

foreign import ccall "webkit_dom_dom_selection_get_range_at" webkit_dom_dom_selection_get_range_at :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    CULong ->                               -- index : TBasicType TULong
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr WebKit2WebExtension.DOMRange.DOMRange)

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

@since 2.16
-}
dOMDOMSelectionGetRangeAt ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> CULong
    {- ^ /@index@/: A @/gulong/@ -}
    -> m WebKit2WebExtension.DOMRange.DOMRange
    {- ^ __Returns:__ A 'GI.WebKit2WebExtension.Objects.DOMRange.DOMRange' /(Can throw 'Data.GI.Base.GError.GError')/ -}
dOMDOMSelectionGetRangeAt self index = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    onException (do
        result <- propagateGError $ webkit_dom_dom_selection_get_range_at self' index
        checkUnexpectedReturnNULL "dOMDOMSelectionGetRangeAt" result
        result' <- (wrapObject WebKit2WebExtension.DOMRange.DOMRange) result
        touchManagedPtr self
        return result'
     ) (do
        return ()
     )

data DOMDOMSelectionGetRangeAtMethodInfo
instance (signature ~ (CULong -> m WebKit2WebExtension.DOMRange.DOMRange), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionGetRangeAtMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionGetRangeAt

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

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

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

data DOMDOMSelectionGetRangeCountMethodInfo
instance (signature ~ (m CULong), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionGetRangeCountMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionGetRangeCount

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

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

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

data DOMDOMSelectionGetSelectionTypeMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionGetSelectionTypeMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionGetSelectionType

-- method DOMDOMSelection::modify
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMSelection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "alter", 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 = "direction", 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 = "granularity", 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_selection_modify" webkit_dom_dom_selection_modify :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    CString ->                              -- alter : TBasicType TUTF8
    CString ->                              -- direction : TBasicType TUTF8
    CString ->                              -- granularity : TBasicType TUTF8
    IO ()

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

@since 2.16
-}
dOMDOMSelectionModify ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> T.Text
    {- ^ /@alter@/: A @/gchar/@ -}
    -> T.Text
    {- ^ /@direction@/: A @/gchar/@ -}
    -> T.Text
    {- ^ /@granularity@/: A @/gchar/@ -}
    -> m ()
dOMDOMSelectionModify self alter direction granularity = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    alter' <- textToCString alter
    direction' <- textToCString direction
    granularity' <- textToCString granularity
    webkit_dom_dom_selection_modify self' alter' direction' granularity'
    touchManagedPtr self
    freeMem alter'
    freeMem direction'
    freeMem granularity'
    return ()

data DOMDOMSelectionModifyMethodInfo
instance (signature ~ (T.Text -> T.Text -> T.Text -> m ()), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionModifyMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionModify

-- method DOMDOMSelection::remove_all_ranges
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMSelection", 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_selection_remove_all_ranges" webkit_dom_dom_selection_remove_all_ranges :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    IO ()

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

@since 2.16
-}
dOMDOMSelectionRemoveAllRanges ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> m ()
dOMDOMSelectionRemoveAllRanges self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    webkit_dom_dom_selection_remove_all_ranges self'
    touchManagedPtr self
    return ()

data DOMDOMSelectionRemoveAllRangesMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDOMDOMSelection a) => O.MethodInfo DOMDOMSelectionRemoveAllRangesMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionRemoveAllRanges

-- method DOMDOMSelection::select_all_children
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMSelection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "node", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMNode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMNode", 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_selection_select_all_children" webkit_dom_dom_selection_select_all_children :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    Ptr WebKit2WebExtension.DOMNode.DOMNode -> -- node : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMNode"})
    IO ()

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

@since 2.16
-}
dOMDOMSelectionSelectAllChildren ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a, WebKit2WebExtension.DOMNode.IsDOMNode b) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> b
    {- ^ /@node@/: A 'GI.WebKit2WebExtension.Objects.DOMNode.DOMNode' -}
    -> m ()
dOMDOMSelectionSelectAllChildren self node = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    node' <- unsafeManagedPtrCastPtr node
    webkit_dom_dom_selection_select_all_children self' node'
    touchManagedPtr self
    touchManagedPtr node
    return ()

data DOMDOMSelectionSelectAllChildrenMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDOMDOMSelection a, WebKit2WebExtension.DOMNode.IsDOMNode b) => O.MethodInfo DOMDOMSelectionSelectAllChildrenMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionSelectAllChildren

-- method DOMDOMSelection::set_base_and_extent
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMSelection", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "baseNode", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMNode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMNode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "baseOffset", 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},Arg {argCName = "extentNode", argType = TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMNode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMNode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "extentOffset", 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 : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_dom_selection_set_base_and_extent" webkit_dom_dom_selection_set_base_and_extent :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    Ptr WebKit2WebExtension.DOMNode.DOMNode -> -- baseNode : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMNode"})
    CULong ->                               -- baseOffset : TBasicType TULong
    Ptr WebKit2WebExtension.DOMNode.DOMNode -> -- extentNode : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMNode"})
    CULong ->                               -- extentOffset : TBasicType TULong
    IO ()

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

@since 2.16
-}
dOMDOMSelectionSetBaseAndExtent ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a, WebKit2WebExtension.DOMNode.IsDOMNode b, WebKit2WebExtension.DOMNode.IsDOMNode c) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> b
    {- ^ /@baseNode@/: A 'GI.WebKit2WebExtension.Objects.DOMNode.DOMNode' -}
    -> CULong
    {- ^ /@baseOffset@/: A @/gulong/@ -}
    -> c
    {- ^ /@extentNode@/: A 'GI.WebKit2WebExtension.Objects.DOMNode.DOMNode' -}
    -> CULong
    {- ^ /@extentOffset@/: A @/gulong/@ -}
    -> m ()
dOMDOMSelectionSetBaseAndExtent self baseNode baseOffset extentNode extentOffset = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    baseNode' <- unsafeManagedPtrCastPtr baseNode
    extentNode' <- unsafeManagedPtrCastPtr extentNode
    webkit_dom_dom_selection_set_base_and_extent self' baseNode' baseOffset extentNode' extentOffset
    touchManagedPtr self
    touchManagedPtr baseNode
    touchManagedPtr extentNode
    return ()

data DOMDOMSelectionSetBaseAndExtentMethodInfo
instance (signature ~ (b -> CULong -> c -> CULong -> m ()), MonadIO m, IsDOMDOMSelection a, WebKit2WebExtension.DOMNode.IsDOMNode b, WebKit2WebExtension.DOMNode.IsDOMNode c) => O.MethodInfo DOMDOMSelectionSetBaseAndExtentMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionSetBaseAndExtent

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

foreign import ccall "webkit_dom_dom_selection_set_position" webkit_dom_dom_selection_set_position :: 
    Ptr DOMDOMSelection ->                  -- self : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMDOMSelection"})
    Ptr WebKit2WebExtension.DOMNode.DOMNode -> -- node : TInterface (Name {namespace = "WebKit2WebExtension", name = "DOMNode"})
    CULong ->                               -- offset : TBasicType TULong
    IO ()

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

@since 2.16
-}
dOMDOMSelectionSetPosition ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMSelection a, WebKit2WebExtension.DOMNode.IsDOMNode b) =>
    a
    {- ^ /@self@/: A 'GI.WebKit2WebExtension.Objects.DOMDOMSelection.DOMDOMSelection' -}
    -> b
    {- ^ /@node@/: A 'GI.WebKit2WebExtension.Objects.DOMNode.DOMNode' -}
    -> CULong
    {- ^ /@offset@/: A @/gulong/@ -}
    -> m ()
dOMDOMSelectionSetPosition self node offset = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    node' <- unsafeManagedPtrCastPtr node
    webkit_dom_dom_selection_set_position self' node' offset
    touchManagedPtr self
    touchManagedPtr node
    return ()

data DOMDOMSelectionSetPositionMethodInfo
instance (signature ~ (b -> CULong -> m ()), MonadIO m, IsDOMDOMSelection a, WebKit2WebExtension.DOMNode.IsDOMNode b) => O.MethodInfo DOMDOMSelectionSetPositionMethodInfo a signature where
    overloadedMethod _ = dOMDOMSelectionSetPosition