{- |
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.WebKit2.Objects.HitTestResult
    ( 

-- * Exported types
    HitTestResult(..)                       ,
    IsHitTestResult                         ,
    toHitTestResult                         ,
    noHitTestResult                         ,


 -- * Methods
-- ** contextIsEditable #method:contextIsEditable#
    HitTestResultContextIsEditableMethodInfo,
    hitTestResultContextIsEditable          ,


-- ** contextIsImage #method:contextIsImage#
    HitTestResultContextIsImageMethodInfo   ,
    hitTestResultContextIsImage             ,


-- ** contextIsLink #method:contextIsLink#
    HitTestResultContextIsLinkMethodInfo    ,
    hitTestResultContextIsLink              ,


-- ** contextIsMedia #method:contextIsMedia#
    HitTestResultContextIsMediaMethodInfo   ,
    hitTestResultContextIsMedia             ,


-- ** contextIsScrollbar #method:contextIsScrollbar#
    HitTestResultContextIsScrollbarMethodInfo,
    hitTestResultContextIsScrollbar         ,


-- ** contextIsSelection #method:contextIsSelection#
    HitTestResultContextIsSelectionMethodInfo,
    hitTestResultContextIsSelection         ,


-- ** getContext #method:getContext#
    HitTestResultGetContextMethodInfo       ,
    hitTestResultGetContext                 ,


-- ** getImageUri #method:getImageUri#
    HitTestResultGetImageUriMethodInfo      ,
    hitTestResultGetImageUri                ,


-- ** getLinkLabel #method:getLinkLabel#
    HitTestResultGetLinkLabelMethodInfo     ,
    hitTestResultGetLinkLabel               ,


-- ** getLinkTitle #method:getLinkTitle#
    HitTestResultGetLinkTitleMethodInfo     ,
    hitTestResultGetLinkTitle               ,


-- ** getLinkUri #method:getLinkUri#
    HitTestResultGetLinkUriMethodInfo       ,
    hitTestResultGetLinkUri                 ,


-- ** getMediaUri #method:getMediaUri#
    HitTestResultGetMediaUriMethodInfo      ,
    hitTestResultGetMediaUri                ,




 -- * Properties
-- ** context #attr:context#
    HitTestResultContextPropertyInfo        ,
    constructHitTestResultContext           ,
    getHitTestResultContext                 ,
    hitTestResultContext                    ,


-- ** imageUri #attr:imageUri#
    HitTestResultImageUriPropertyInfo       ,
    constructHitTestResultImageUri          ,
    getHitTestResultImageUri                ,
    hitTestResultImageUri                   ,


-- ** linkLabel #attr:linkLabel#
    HitTestResultLinkLabelPropertyInfo      ,
    constructHitTestResultLinkLabel         ,
    getHitTestResultLinkLabel               ,
    hitTestResultLinkLabel                  ,


-- ** linkTitle #attr:linkTitle#
    HitTestResultLinkTitlePropertyInfo      ,
    constructHitTestResultLinkTitle         ,
    getHitTestResultLinkTitle               ,
    hitTestResultLinkTitle                  ,


-- ** linkUri #attr:linkUri#
    HitTestResultLinkUriPropertyInfo        ,
    constructHitTestResultLinkUri           ,
    getHitTestResultLinkUri                 ,
    hitTestResultLinkUri                    ,


-- ** mediaUri #attr:mediaUri#
    HitTestResultMediaUriPropertyInfo       ,
    constructHitTestResultMediaUri          ,
    getHitTestResultMediaUri                ,
    hitTestResultMediaUri                   ,




    ) 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

newtype HitTestResult = HitTestResult (ManagedPtr HitTestResult)
foreign import ccall "webkit_hit_test_result_get_type"
    c_webkit_hit_test_result_get_type :: IO GType

instance GObject HitTestResult where
    gobjectType _ = c_webkit_hit_test_result_get_type
    

class GObject o => IsHitTestResult o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError HitTestResult a) =>
    IsHitTestResult a
#endif
instance IsHitTestResult HitTestResult
instance GObject.Object.IsObject HitTestResult

toHitTestResult :: IsHitTestResult o => o -> IO HitTestResult
toHitTestResult = unsafeCastTo HitTestResult

noHitTestResult :: Maybe HitTestResult
noHitTestResult = Nothing

type family ResolveHitTestResultMethod (t :: Symbol) (o :: *) :: * where
    ResolveHitTestResultMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveHitTestResultMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveHitTestResultMethod "contextIsEditable" o = HitTestResultContextIsEditableMethodInfo
    ResolveHitTestResultMethod "contextIsImage" o = HitTestResultContextIsImageMethodInfo
    ResolveHitTestResultMethod "contextIsLink" o = HitTestResultContextIsLinkMethodInfo
    ResolveHitTestResultMethod "contextIsMedia" o = HitTestResultContextIsMediaMethodInfo
    ResolveHitTestResultMethod "contextIsScrollbar" o = HitTestResultContextIsScrollbarMethodInfo
    ResolveHitTestResultMethod "contextIsSelection" o = HitTestResultContextIsSelectionMethodInfo
    ResolveHitTestResultMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveHitTestResultMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveHitTestResultMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveHitTestResultMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveHitTestResultMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveHitTestResultMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveHitTestResultMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveHitTestResultMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveHitTestResultMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    ResolveHitTestResultMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveHitTestResultMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveHitTestResultMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveHitTestResultMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveHitTestResultMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveHitTestResultMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveHitTestResultMethod "getContext" o = HitTestResultGetContextMethodInfo
    ResolveHitTestResultMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveHitTestResultMethod "getImageUri" o = HitTestResultGetImageUriMethodInfo
    ResolveHitTestResultMethod "getLinkLabel" o = HitTestResultGetLinkLabelMethodInfo
    ResolveHitTestResultMethod "getLinkTitle" o = HitTestResultGetLinkTitleMethodInfo
    ResolveHitTestResultMethod "getLinkUri" o = HitTestResultGetLinkUriMethodInfo
    ResolveHitTestResultMethod "getMediaUri" o = HitTestResultGetMediaUriMethodInfo
    ResolveHitTestResultMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveHitTestResultMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveHitTestResultMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveHitTestResultMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveHitTestResultMethod l o = O.MethodResolutionFailed l o

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

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

-- VVV Prop "context"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Just False,Nothing)

getHitTestResultContext :: (MonadIO m, IsHitTestResult o) => o -> m Word32
getHitTestResultContext obj = liftIO $ getObjectPropertyUInt32 obj "context"

constructHitTestResultContext :: (IsHitTestResult o) => Word32 -> IO (GValueConstruct o)
constructHitTestResultContext val = constructObjectPropertyUInt32 "context" val

data HitTestResultContextPropertyInfo
instance AttrInfo HitTestResultContextPropertyInfo where
    type AttrAllowedOps HitTestResultContextPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint HitTestResultContextPropertyInfo = (~) Word32
    type AttrBaseTypeConstraint HitTestResultContextPropertyInfo = IsHitTestResult
    type AttrGetType HitTestResultContextPropertyInfo = Word32
    type AttrLabel HitTestResultContextPropertyInfo = "context"
    type AttrOrigin HitTestResultContextPropertyInfo = HitTestResult
    attrGet _ = getHitTestResultContext
    attrSet _ = undefined
    attrConstruct _ = constructHitTestResultContext
    attrClear _ = undefined

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

getHitTestResultImageUri :: (MonadIO m, IsHitTestResult o) => o -> m T.Text
getHitTestResultImageUri obj = liftIO $ checkUnexpectedNothing "getHitTestResultImageUri" $ getObjectPropertyString obj "image-uri"

constructHitTestResultImageUri :: (IsHitTestResult o) => T.Text -> IO (GValueConstruct o)
constructHitTestResultImageUri val = constructObjectPropertyString "image-uri" (Just val)

data HitTestResultImageUriPropertyInfo
instance AttrInfo HitTestResultImageUriPropertyInfo where
    type AttrAllowedOps HitTestResultImageUriPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint HitTestResultImageUriPropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint HitTestResultImageUriPropertyInfo = IsHitTestResult
    type AttrGetType HitTestResultImageUriPropertyInfo = T.Text
    type AttrLabel HitTestResultImageUriPropertyInfo = "image-uri"
    type AttrOrigin HitTestResultImageUriPropertyInfo = HitTestResult
    attrGet _ = getHitTestResultImageUri
    attrSet _ = undefined
    attrConstruct _ = constructHitTestResultImageUri
    attrClear _ = undefined

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

getHitTestResultLinkLabel :: (MonadIO m, IsHitTestResult o) => o -> m T.Text
getHitTestResultLinkLabel obj = liftIO $ checkUnexpectedNothing "getHitTestResultLinkLabel" $ getObjectPropertyString obj "link-label"

constructHitTestResultLinkLabel :: (IsHitTestResult o) => T.Text -> IO (GValueConstruct o)
constructHitTestResultLinkLabel val = constructObjectPropertyString "link-label" (Just val)

data HitTestResultLinkLabelPropertyInfo
instance AttrInfo HitTestResultLinkLabelPropertyInfo where
    type AttrAllowedOps HitTestResultLinkLabelPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint HitTestResultLinkLabelPropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint HitTestResultLinkLabelPropertyInfo = IsHitTestResult
    type AttrGetType HitTestResultLinkLabelPropertyInfo = T.Text
    type AttrLabel HitTestResultLinkLabelPropertyInfo = "link-label"
    type AttrOrigin HitTestResultLinkLabelPropertyInfo = HitTestResult
    attrGet _ = getHitTestResultLinkLabel
    attrSet _ = undefined
    attrConstruct _ = constructHitTestResultLinkLabel
    attrClear _ = undefined

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

getHitTestResultLinkTitle :: (MonadIO m, IsHitTestResult o) => o -> m T.Text
getHitTestResultLinkTitle obj = liftIO $ checkUnexpectedNothing "getHitTestResultLinkTitle" $ getObjectPropertyString obj "link-title"

constructHitTestResultLinkTitle :: (IsHitTestResult o) => T.Text -> IO (GValueConstruct o)
constructHitTestResultLinkTitle val = constructObjectPropertyString "link-title" (Just val)

data HitTestResultLinkTitlePropertyInfo
instance AttrInfo HitTestResultLinkTitlePropertyInfo where
    type AttrAllowedOps HitTestResultLinkTitlePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint HitTestResultLinkTitlePropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint HitTestResultLinkTitlePropertyInfo = IsHitTestResult
    type AttrGetType HitTestResultLinkTitlePropertyInfo = T.Text
    type AttrLabel HitTestResultLinkTitlePropertyInfo = "link-title"
    type AttrOrigin HitTestResultLinkTitlePropertyInfo = HitTestResult
    attrGet _ = getHitTestResultLinkTitle
    attrSet _ = undefined
    attrConstruct _ = constructHitTestResultLinkTitle
    attrClear _ = undefined

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

getHitTestResultLinkUri :: (MonadIO m, IsHitTestResult o) => o -> m T.Text
getHitTestResultLinkUri obj = liftIO $ checkUnexpectedNothing "getHitTestResultLinkUri" $ getObjectPropertyString obj "link-uri"

constructHitTestResultLinkUri :: (IsHitTestResult o) => T.Text -> IO (GValueConstruct o)
constructHitTestResultLinkUri val = constructObjectPropertyString "link-uri" (Just val)

data HitTestResultLinkUriPropertyInfo
instance AttrInfo HitTestResultLinkUriPropertyInfo where
    type AttrAllowedOps HitTestResultLinkUriPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint HitTestResultLinkUriPropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint HitTestResultLinkUriPropertyInfo = IsHitTestResult
    type AttrGetType HitTestResultLinkUriPropertyInfo = T.Text
    type AttrLabel HitTestResultLinkUriPropertyInfo = "link-uri"
    type AttrOrigin HitTestResultLinkUriPropertyInfo = HitTestResult
    attrGet _ = getHitTestResultLinkUri
    attrSet _ = undefined
    attrConstruct _ = constructHitTestResultLinkUri
    attrClear _ = undefined

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

getHitTestResultMediaUri :: (MonadIO m, IsHitTestResult o) => o -> m T.Text
getHitTestResultMediaUri obj = liftIO $ checkUnexpectedNothing "getHitTestResultMediaUri" $ getObjectPropertyString obj "media-uri"

constructHitTestResultMediaUri :: (IsHitTestResult o) => T.Text -> IO (GValueConstruct o)
constructHitTestResultMediaUri val = constructObjectPropertyString "media-uri" (Just val)

data HitTestResultMediaUriPropertyInfo
instance AttrInfo HitTestResultMediaUriPropertyInfo where
    type AttrAllowedOps HitTestResultMediaUriPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrSetTypeConstraint HitTestResultMediaUriPropertyInfo = (~) T.Text
    type AttrBaseTypeConstraint HitTestResultMediaUriPropertyInfo = IsHitTestResult
    type AttrGetType HitTestResultMediaUriPropertyInfo = T.Text
    type AttrLabel HitTestResultMediaUriPropertyInfo = "media-uri"
    type AttrOrigin HitTestResultMediaUriPropertyInfo = HitTestResult
    attrGet _ = getHitTestResultMediaUri
    attrSet _ = undefined
    attrConstruct _ = constructHitTestResultMediaUri
    attrClear _ = undefined

instance O.HasAttributeList HitTestResult
type instance O.AttributeList HitTestResult = HitTestResultAttributeList
type HitTestResultAttributeList = ('[ '("context", HitTestResultContextPropertyInfo), '("imageUri", HitTestResultImageUriPropertyInfo), '("linkLabel", HitTestResultLinkLabelPropertyInfo), '("linkTitle", HitTestResultLinkTitlePropertyInfo), '("linkUri", HitTestResultLinkUriPropertyInfo), '("mediaUri", HitTestResultMediaUriPropertyInfo)] :: [(Symbol, *)])

hitTestResultContext :: AttrLabelProxy "context"
hitTestResultContext = AttrLabelProxy

hitTestResultImageUri :: AttrLabelProxy "imageUri"
hitTestResultImageUri = AttrLabelProxy

hitTestResultLinkLabel :: AttrLabelProxy "linkLabel"
hitTestResultLinkLabel = AttrLabelProxy

hitTestResultLinkTitle :: AttrLabelProxy "linkTitle"
hitTestResultLinkTitle = AttrLabelProxy

hitTestResultLinkUri :: AttrLabelProxy "linkUri"
hitTestResultLinkUri = AttrLabelProxy

hitTestResultMediaUri :: AttrLabelProxy "mediaUri"
hitTestResultMediaUri = AttrLabelProxy

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

-- method HitTestResult::context_is_editable
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "hit_test_result", argType = TInterface (Name {namespace = "WebKit2", name = "HitTestResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitHitTestResult", 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_hit_test_result_context_is_editable" webkit_hit_test_result_context_is_editable :: 
    Ptr HitTestResult ->                    -- hit_test_result : TInterface (Name {namespace = "WebKit2", name = "HitTestResult"})
    IO CInt

{- |
Gets whether 'GI.WebKit2.Flags.HitTestResultContextEditable' flag is present in
'GI.WebKit2.Objects.HitTestResult.HitTestResult':@/context/@.
-}
hitTestResultContextIsEditable ::
    (B.CallStack.HasCallStack, MonadIO m, IsHitTestResult a) =>
    a
    {- ^ /@hitTestResult@/: a 'GI.WebKit2.Objects.HitTestResult.HitTestResult' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if there\'s an editable element at the coordinates of the /@hitTestResult@/,
   or 'False' otherwise -}
hitTestResultContextIsEditable hitTestResult = liftIO $ do
    hitTestResult' <- unsafeManagedPtrCastPtr hitTestResult
    result <- webkit_hit_test_result_context_is_editable hitTestResult'
    let result' = (/= 0) result
    touchManagedPtr hitTestResult
    return result'

data HitTestResultContextIsEditableMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsHitTestResult a) => O.MethodInfo HitTestResultContextIsEditableMethodInfo a signature where
    overloadedMethod _ = hitTestResultContextIsEditable

-- method HitTestResult::context_is_image
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "hit_test_result", argType = TInterface (Name {namespace = "WebKit2", name = "HitTestResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitHitTestResult", 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_hit_test_result_context_is_image" webkit_hit_test_result_context_is_image :: 
    Ptr HitTestResult ->                    -- hit_test_result : TInterface (Name {namespace = "WebKit2", name = "HitTestResult"})
    IO CInt

{- |
Gets whether 'GI.WebKit2.Flags.HitTestResultContextImage' flag is present in
'GI.WebKit2.Objects.HitTestResult.HitTestResult':@/context/@.
-}
hitTestResultContextIsImage ::
    (B.CallStack.HasCallStack, MonadIO m, IsHitTestResult a) =>
    a
    {- ^ /@hitTestResult@/: a 'GI.WebKit2.Objects.HitTestResult.HitTestResult' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if there\'s an image element in the coordinates of the Hit Test,
   or 'False' otherwise -}
hitTestResultContextIsImage hitTestResult = liftIO $ do
    hitTestResult' <- unsafeManagedPtrCastPtr hitTestResult
    result <- webkit_hit_test_result_context_is_image hitTestResult'
    let result' = (/= 0) result
    touchManagedPtr hitTestResult
    return result'

data HitTestResultContextIsImageMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsHitTestResult a) => O.MethodInfo HitTestResultContextIsImageMethodInfo a signature where
    overloadedMethod _ = hitTestResultContextIsImage

-- method HitTestResult::context_is_link
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "hit_test_result", argType = TInterface (Name {namespace = "WebKit2", name = "HitTestResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitHitTestResult", 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_hit_test_result_context_is_link" webkit_hit_test_result_context_is_link :: 
    Ptr HitTestResult ->                    -- hit_test_result : TInterface (Name {namespace = "WebKit2", name = "HitTestResult"})
    IO CInt

{- |
Gets whether 'GI.WebKit2.Flags.HitTestResultContextLink' flag is present in
'GI.WebKit2.Objects.HitTestResult.HitTestResult':@/context/@.
-}
hitTestResultContextIsLink ::
    (B.CallStack.HasCallStack, MonadIO m, IsHitTestResult a) =>
    a
    {- ^ /@hitTestResult@/: a 'GI.WebKit2.Objects.HitTestResult.HitTestResult' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if there\'s a link element in the coordinates of the Hit Test,
   or 'False' otherwise -}
hitTestResultContextIsLink hitTestResult = liftIO $ do
    hitTestResult' <- unsafeManagedPtrCastPtr hitTestResult
    result <- webkit_hit_test_result_context_is_link hitTestResult'
    let result' = (/= 0) result
    touchManagedPtr hitTestResult
    return result'

data HitTestResultContextIsLinkMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsHitTestResult a) => O.MethodInfo HitTestResultContextIsLinkMethodInfo a signature where
    overloadedMethod _ = hitTestResultContextIsLink

-- method HitTestResult::context_is_media
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "hit_test_result", argType = TInterface (Name {namespace = "WebKit2", name = "HitTestResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitHitTestResult", 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_hit_test_result_context_is_media" webkit_hit_test_result_context_is_media :: 
    Ptr HitTestResult ->                    -- hit_test_result : TInterface (Name {namespace = "WebKit2", name = "HitTestResult"})
    IO CInt

{- |
Gets whether 'GI.WebKit2.Flags.HitTestResultContextMedia' flag is present in
'GI.WebKit2.Objects.HitTestResult.HitTestResult':@/context/@.
-}
hitTestResultContextIsMedia ::
    (B.CallStack.HasCallStack, MonadIO m, IsHitTestResult a) =>
    a
    {- ^ /@hitTestResult@/: a 'GI.WebKit2.Objects.HitTestResult.HitTestResult' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if there\'s a media element in the coordinates of the Hit Test,
   or 'False' otherwise -}
hitTestResultContextIsMedia hitTestResult = liftIO $ do
    hitTestResult' <- unsafeManagedPtrCastPtr hitTestResult
    result <- webkit_hit_test_result_context_is_media hitTestResult'
    let result' = (/= 0) result
    touchManagedPtr hitTestResult
    return result'

data HitTestResultContextIsMediaMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsHitTestResult a) => O.MethodInfo HitTestResultContextIsMediaMethodInfo a signature where
    overloadedMethod _ = hitTestResultContextIsMedia

-- method HitTestResult::context_is_scrollbar
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "hit_test_result", argType = TInterface (Name {namespace = "WebKit2", name = "HitTestResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitHitTestResult", 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_hit_test_result_context_is_scrollbar" webkit_hit_test_result_context_is_scrollbar :: 
    Ptr HitTestResult ->                    -- hit_test_result : TInterface (Name {namespace = "WebKit2", name = "HitTestResult"})
    IO CInt

{- |
Gets whether 'GI.WebKit2.Flags.HitTestResultContextScrollbar' flag is present in
'GI.WebKit2.Objects.HitTestResult.HitTestResult':@/context/@.
-}
hitTestResultContextIsScrollbar ::
    (B.CallStack.HasCallStack, MonadIO m, IsHitTestResult a) =>
    a
    {- ^ /@hitTestResult@/: a 'GI.WebKit2.Objects.HitTestResult.HitTestResult' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if there\'s a scrollbar element at the coordinates of the /@hitTestResult@/,
   or 'False' otherwise -}
hitTestResultContextIsScrollbar hitTestResult = liftIO $ do
    hitTestResult' <- unsafeManagedPtrCastPtr hitTestResult
    result <- webkit_hit_test_result_context_is_scrollbar hitTestResult'
    let result' = (/= 0) result
    touchManagedPtr hitTestResult
    return result'

data HitTestResultContextIsScrollbarMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsHitTestResult a) => O.MethodInfo HitTestResultContextIsScrollbarMethodInfo a signature where
    overloadedMethod _ = hitTestResultContextIsScrollbar

-- method HitTestResult::context_is_selection
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "hit_test_result", argType = TInterface (Name {namespace = "WebKit2", name = "HitTestResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitHitTestResult", 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_hit_test_result_context_is_selection" webkit_hit_test_result_context_is_selection :: 
    Ptr HitTestResult ->                    -- hit_test_result : TInterface (Name {namespace = "WebKit2", name = "HitTestResult"})
    IO CInt

{- |
Gets whether 'GI.WebKit2.Flags.HitTestResultContextSelection' flag is present in
'GI.WebKit2.Objects.HitTestResult.HitTestResult':@/context/@.

@since 2.8
-}
hitTestResultContextIsSelection ::
    (B.CallStack.HasCallStack, MonadIO m, IsHitTestResult a) =>
    a
    {- ^ /@hitTestResult@/: a 'GI.WebKit2.Objects.HitTestResult.HitTestResult' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if there\'s a selected element at the coordinates of the /@hitTestResult@/,
   or 'False' otherwise -}
hitTestResultContextIsSelection hitTestResult = liftIO $ do
    hitTestResult' <- unsafeManagedPtrCastPtr hitTestResult
    result <- webkit_hit_test_result_context_is_selection hitTestResult'
    let result' = (/= 0) result
    touchManagedPtr hitTestResult
    return result'

data HitTestResultContextIsSelectionMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsHitTestResult a) => O.MethodInfo HitTestResultContextIsSelectionMethodInfo a signature where
    overloadedMethod _ = hitTestResultContextIsSelection

-- method HitTestResult::get_context
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "hit_test_result", argType = TInterface (Name {namespace = "WebKit2", name = "HitTestResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitHitTestResult", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_hit_test_result_get_context" webkit_hit_test_result_get_context :: 
    Ptr HitTestResult ->                    -- hit_test_result : TInterface (Name {namespace = "WebKit2", name = "HitTestResult"})
    IO Word32

{- |
Gets the value of the 'GI.WebKit2.Objects.HitTestResult.HitTestResult':@/context/@ property.
-}
hitTestResultGetContext ::
    (B.CallStack.HasCallStack, MonadIO m, IsHitTestResult a) =>
    a
    {- ^ /@hitTestResult@/: a 'GI.WebKit2.Objects.HitTestResult.HitTestResult' -}
    -> m Word32
    {- ^ __Returns:__ a bitmask of 'GI.WebKit2.Flags.HitTestResultContext' flags -}
hitTestResultGetContext hitTestResult = liftIO $ do
    hitTestResult' <- unsafeManagedPtrCastPtr hitTestResult
    result <- webkit_hit_test_result_get_context hitTestResult'
    touchManagedPtr hitTestResult
    return result

data HitTestResultGetContextMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsHitTestResult a) => O.MethodInfo HitTestResultGetContextMethodInfo a signature where
    overloadedMethod _ = hitTestResultGetContext

-- method HitTestResult::get_image_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "hit_test_result", argType = TInterface (Name {namespace = "WebKit2", name = "HitTestResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitHitTestResult", 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_hit_test_result_get_image_uri" webkit_hit_test_result_get_image_uri :: 
    Ptr HitTestResult ->                    -- hit_test_result : TInterface (Name {namespace = "WebKit2", name = "HitTestResult"})
    IO CString

{- |
Gets the value of the 'GI.WebKit2.Objects.HitTestResult.HitTestResult':@/image-uri/@ property.
-}
hitTestResultGetImageUri ::
    (B.CallStack.HasCallStack, MonadIO m, IsHitTestResult a) =>
    a
    {- ^ /@hitTestResult@/: a 'GI.WebKit2.Objects.HitTestResult.HitTestResult' -}
    -> m T.Text
    {- ^ __Returns:__ the URI of the image element in the coordinates of the Hit Test,
   or 'Nothing' if there ins\'t an image element in /@hitTestResult@/ context -}
hitTestResultGetImageUri hitTestResult = liftIO $ do
    hitTestResult' <- unsafeManagedPtrCastPtr hitTestResult
    result <- webkit_hit_test_result_get_image_uri hitTestResult'
    checkUnexpectedReturnNULL "hitTestResultGetImageUri" result
    result' <- cstringToText result
    touchManagedPtr hitTestResult
    return result'

data HitTestResultGetImageUriMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsHitTestResult a) => O.MethodInfo HitTestResultGetImageUriMethodInfo a signature where
    overloadedMethod _ = hitTestResultGetImageUri

-- method HitTestResult::get_link_label
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "hit_test_result", argType = TInterface (Name {namespace = "WebKit2", name = "HitTestResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitHitTestResult", 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_hit_test_result_get_link_label" webkit_hit_test_result_get_link_label :: 
    Ptr HitTestResult ->                    -- hit_test_result : TInterface (Name {namespace = "WebKit2", name = "HitTestResult"})
    IO CString

{- |
Gets the value of the 'GI.WebKit2.Objects.HitTestResult.HitTestResult':@/link-label/@ property.
-}
hitTestResultGetLinkLabel ::
    (B.CallStack.HasCallStack, MonadIO m, IsHitTestResult a) =>
    a
    {- ^ /@hitTestResult@/: a 'GI.WebKit2.Objects.HitTestResult.HitTestResult' -}
    -> m T.Text
    {- ^ __Returns:__ the label of the link element in the coordinates of the Hit Test,
   or 'Nothing' if there ins\'t a link element in /@hitTestResult@/ context or the
   link element doesn\'t have a label -}
hitTestResultGetLinkLabel hitTestResult = liftIO $ do
    hitTestResult' <- unsafeManagedPtrCastPtr hitTestResult
    result <- webkit_hit_test_result_get_link_label hitTestResult'
    checkUnexpectedReturnNULL "hitTestResultGetLinkLabel" result
    result' <- cstringToText result
    touchManagedPtr hitTestResult
    return result'

data HitTestResultGetLinkLabelMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsHitTestResult a) => O.MethodInfo HitTestResultGetLinkLabelMethodInfo a signature where
    overloadedMethod _ = hitTestResultGetLinkLabel

-- method HitTestResult::get_link_title
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "hit_test_result", argType = TInterface (Name {namespace = "WebKit2", name = "HitTestResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitHitTestResult", 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_hit_test_result_get_link_title" webkit_hit_test_result_get_link_title :: 
    Ptr HitTestResult ->                    -- hit_test_result : TInterface (Name {namespace = "WebKit2", name = "HitTestResult"})
    IO CString

{- |
Gets the value of the 'GI.WebKit2.Objects.HitTestResult.HitTestResult':@/link-title/@ property.
-}
hitTestResultGetLinkTitle ::
    (B.CallStack.HasCallStack, MonadIO m, IsHitTestResult a) =>
    a
    {- ^ /@hitTestResult@/: a 'GI.WebKit2.Objects.HitTestResult.HitTestResult' -}
    -> m T.Text
    {- ^ __Returns:__ the title of the link element in the coordinates of the Hit Test,
   or 'Nothing' if there ins\'t a link element in /@hitTestResult@/ context or the
   link element doesn\'t have a title -}
hitTestResultGetLinkTitle hitTestResult = liftIO $ do
    hitTestResult' <- unsafeManagedPtrCastPtr hitTestResult
    result <- webkit_hit_test_result_get_link_title hitTestResult'
    checkUnexpectedReturnNULL "hitTestResultGetLinkTitle" result
    result' <- cstringToText result
    touchManagedPtr hitTestResult
    return result'

data HitTestResultGetLinkTitleMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsHitTestResult a) => O.MethodInfo HitTestResultGetLinkTitleMethodInfo a signature where
    overloadedMethod _ = hitTestResultGetLinkTitle

-- method HitTestResult::get_link_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "hit_test_result", argType = TInterface (Name {namespace = "WebKit2", name = "HitTestResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitHitTestResult", 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_hit_test_result_get_link_uri" webkit_hit_test_result_get_link_uri :: 
    Ptr HitTestResult ->                    -- hit_test_result : TInterface (Name {namespace = "WebKit2", name = "HitTestResult"})
    IO CString

{- |
Gets the value of the 'GI.WebKit2.Objects.HitTestResult.HitTestResult':@/link-uri/@ property.
-}
hitTestResultGetLinkUri ::
    (B.CallStack.HasCallStack, MonadIO m, IsHitTestResult a) =>
    a
    {- ^ /@hitTestResult@/: a 'GI.WebKit2.Objects.HitTestResult.HitTestResult' -}
    -> m T.Text
    {- ^ __Returns:__ the URI of the link element in the coordinates of the Hit Test,
   or 'Nothing' if there ins\'t a link element in /@hitTestResult@/ context -}
hitTestResultGetLinkUri hitTestResult = liftIO $ do
    hitTestResult' <- unsafeManagedPtrCastPtr hitTestResult
    result <- webkit_hit_test_result_get_link_uri hitTestResult'
    checkUnexpectedReturnNULL "hitTestResultGetLinkUri" result
    result' <- cstringToText result
    touchManagedPtr hitTestResult
    return result'

data HitTestResultGetLinkUriMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsHitTestResult a) => O.MethodInfo HitTestResultGetLinkUriMethodInfo a signature where
    overloadedMethod _ = hitTestResultGetLinkUri

-- method HitTestResult::get_media_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "hit_test_result", argType = TInterface (Name {namespace = "WebKit2", name = "HitTestResult"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #WebKitHitTestResult", 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_hit_test_result_get_media_uri" webkit_hit_test_result_get_media_uri :: 
    Ptr HitTestResult ->                    -- hit_test_result : TInterface (Name {namespace = "WebKit2", name = "HitTestResult"})
    IO CString

{- |
Gets the value of the 'GI.WebKit2.Objects.HitTestResult.HitTestResult':@/media-uri/@ property.
-}
hitTestResultGetMediaUri ::
    (B.CallStack.HasCallStack, MonadIO m, IsHitTestResult a) =>
    a
    {- ^ /@hitTestResult@/: a 'GI.WebKit2.Objects.HitTestResult.HitTestResult' -}
    -> m T.Text
    {- ^ __Returns:__ the URI of the media element in the coordinates of the Hit Test,
   or 'Nothing' if there ins\'t a media element in /@hitTestResult@/ context -}
hitTestResultGetMediaUri hitTestResult = liftIO $ do
    hitTestResult' <- unsafeManagedPtrCastPtr hitTestResult
    result <- webkit_hit_test_result_get_media_uri hitTestResult'
    checkUnexpectedReturnNULL "hitTestResultGetMediaUri" result
    result' <- cstringToText result
    touchManagedPtr hitTestResult
    return result'

data HitTestResultGetMediaUriMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsHitTestResult a) => O.MethodInfo HitTestResultGetMediaUriMethodInfo a signature where
    overloadedMethod _ = hitTestResultGetMediaUri