{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.WebKit2WebExtension.Objects.WebHitTestResult
(
WebHitTestResult(..) ,
IsWebHitTestResult ,
toWebHitTestResult ,
#if defined(ENABLE_OVERLOADING)
ResolveWebHitTestResultMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
WebHitTestResultGetJsNodeMethodInfo ,
#endif
webHitTestResultGetJsNode ,
#if defined(ENABLE_OVERLOADING)
WebHitTestResultGetNodeMethodInfo ,
#endif
webHitTestResultGetNode ,
#if defined(ENABLE_OVERLOADING)
WebHitTestResultNodePropertyInfo ,
#endif
constructWebHitTestResultNode ,
getWebHitTestResultNode ,
#if defined(ENABLE_OVERLOADING)
webHitTestResultNode ,
#endif
) 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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Unions.Event as Gdk.Event
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.Action as Gio.Action
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gio.Objects.UnixFDList as Gio.UnixFDList
import qualified GI.Gtk.Objects.Action as Gtk.Action
import qualified GI.JavaScriptCore.Objects.Context as JavaScriptCore.Context
import qualified GI.JavaScriptCore.Objects.Value as JavaScriptCore.Value
import qualified GI.Soup.Structs.MessageHeaders as Soup.MessageHeaders
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Enums as WebKit2WebExtension.Enums
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Interfaces.DOMEventTarget as WebKit2WebExtension.DOMEventTarget
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Interfaces.DOMNodeFilter as WebKit2WebExtension.DOMNodeFilter
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Interfaces.DOMXPathNSResolver as WebKit2WebExtension.DOMXPathNSResolver
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.ContextMenu as WebKit2WebExtension.ContextMenu
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.ContextMenuItem as WebKit2WebExtension.ContextMenuItem
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMAttr as WebKit2WebExtension.DOMAttr
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMCDATASection as WebKit2WebExtension.DOMCDATASection
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMCSSRule as WebKit2WebExtension.DOMCSSRule
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMCSSRuleList as WebKit2WebExtension.DOMCSSRuleList
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMCSSStyleDeclaration as WebKit2WebExtension.DOMCSSStyleDeclaration
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMCSSStyleSheet as WebKit2WebExtension.DOMCSSStyleSheet
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMCharacterData as WebKit2WebExtension.DOMCharacterData
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMClientRect as WebKit2WebExtension.DOMClientRect
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMClientRectList as WebKit2WebExtension.DOMClientRectList
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMComment as WebKit2WebExtension.DOMComment
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMDOMImplementation as WebKit2WebExtension.DOMDOMImplementation
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMDOMSelection as WebKit2WebExtension.DOMDOMSelection
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMDOMTokenList as WebKit2WebExtension.DOMDOMTokenList
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMDOMWindow as WebKit2WebExtension.DOMDOMWindow
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMDocument as WebKit2WebExtension.DOMDocument
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMDocumentFragment as WebKit2WebExtension.DOMDocumentFragment
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMDocumentType as WebKit2WebExtension.DOMDocumentType
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMElement as WebKit2WebExtension.DOMElement
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMEntityReference as WebKit2WebExtension.DOMEntityReference
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMEvent as WebKit2WebExtension.DOMEvent
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMHTMLCollection as WebKit2WebExtension.DOMHTMLCollection
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMHTMLDocument as WebKit2WebExtension.DOMHTMLDocument
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMHTMLElement as WebKit2WebExtension.DOMHTMLElement
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMHTMLHeadElement as WebKit2WebExtension.DOMHTMLHeadElement
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMHTMLScriptElement as WebKit2WebExtension.DOMHTMLScriptElement
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMMediaList as WebKit2WebExtension.DOMMediaList
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMNamedNodeMap as WebKit2WebExtension.DOMNamedNodeMap
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMNode as WebKit2WebExtension.DOMNode
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMNodeIterator as WebKit2WebExtension.DOMNodeIterator
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMNodeList as WebKit2WebExtension.DOMNodeList
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMObject as WebKit2WebExtension.DOMObject
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMProcessingInstruction as WebKit2WebExtension.DOMProcessingInstruction
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMRange as WebKit2WebExtension.DOMRange
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMStyleSheet as WebKit2WebExtension.DOMStyleSheet
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMStyleSheetList as WebKit2WebExtension.DOMStyleSheetList
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMText as WebKit2WebExtension.DOMText
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMTreeWalker as WebKit2WebExtension.DOMTreeWalker
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMXPathExpression as WebKit2WebExtension.DOMXPathExpression
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMXPathResult as WebKit2WebExtension.DOMXPathResult
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.Frame as WebKit2WebExtension.Frame
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.HitTestResult as WebKit2WebExtension.HitTestResult
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.ScriptWorld as WebKit2WebExtension.ScriptWorld
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.URIRequest as WebKit2WebExtension.URIRequest
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.URIResponse as WebKit2WebExtension.URIResponse
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.UserMessage as WebKit2WebExtension.UserMessage
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.WebEditor as WebKit2WebExtension.WebEditor
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.WebFormManager as WebKit2WebExtension.WebFormManager
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.WebPage as WebKit2WebExtension.WebPage
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Structs.ConsoleMessage as WebKit2WebExtension.ConsoleMessage
#else
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.JavaScriptCore.Objects.Value as JavaScriptCore.Value
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.DOMNode as WebKit2WebExtension.DOMNode
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.HitTestResult as WebKit2WebExtension.HitTestResult
import {-# SOURCE #-} qualified GI.WebKit2WebExtension.Objects.ScriptWorld as WebKit2WebExtension.ScriptWorld
#endif
newtype WebHitTestResult = WebHitTestResult (SP.ManagedPtr WebHitTestResult)
deriving (WebHitTestResult -> WebHitTestResult -> Bool
(WebHitTestResult -> WebHitTestResult -> Bool)
-> (WebHitTestResult -> WebHitTestResult -> Bool)
-> Eq WebHitTestResult
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WebHitTestResult -> WebHitTestResult -> Bool
== :: WebHitTestResult -> WebHitTestResult -> Bool
$c/= :: WebHitTestResult -> WebHitTestResult -> Bool
/= :: WebHitTestResult -> WebHitTestResult -> Bool
Eq)
instance SP.ManagedPtrNewtype WebHitTestResult where
toManagedPtr :: WebHitTestResult -> ManagedPtr WebHitTestResult
toManagedPtr (WebHitTestResult ManagedPtr WebHitTestResult
p) = ManagedPtr WebHitTestResult
p
foreign import ccall "webkit_web_hit_test_result_get_type"
c_webkit_web_hit_test_result_get_type :: IO B.Types.GType
instance B.Types.TypedObject WebHitTestResult where
glibType :: IO GType
glibType = IO GType
c_webkit_web_hit_test_result_get_type
instance B.Types.GObject WebHitTestResult
class (SP.GObject o, O.IsDescendantOf WebHitTestResult o) => IsWebHitTestResult o
instance (SP.GObject o, O.IsDescendantOf WebHitTestResult o) => IsWebHitTestResult o
instance O.HasParentTypes WebHitTestResult
type instance O.ParentTypes WebHitTestResult = '[WebKit2WebExtension.HitTestResult.HitTestResult, GObject.Object.Object]
toWebHitTestResult :: (MIO.MonadIO m, IsWebHitTestResult o) => o -> m WebHitTestResult
toWebHitTestResult :: forall (m :: * -> *) o.
(MonadIO m, IsWebHitTestResult o) =>
o -> m WebHitTestResult
toWebHitTestResult = IO WebHitTestResult -> m WebHitTestResult
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO WebHitTestResult -> m WebHitTestResult)
-> (o -> IO WebHitTestResult) -> o -> m WebHitTestResult
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr WebHitTestResult -> WebHitTestResult)
-> o -> IO WebHitTestResult
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr WebHitTestResult -> WebHitTestResult
WebHitTestResult
instance B.GValue.IsGValue (Maybe WebHitTestResult) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_webkit_web_hit_test_result_get_type
gvalueSet_ :: Ptr GValue -> Maybe WebHitTestResult -> IO ()
gvalueSet_ Ptr GValue
gv Maybe WebHitTestResult
P.Nothing = Ptr GValue -> Ptr WebHitTestResult -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr WebHitTestResult
forall a. Ptr a
FP.nullPtr :: FP.Ptr WebHitTestResult)
gvalueSet_ Ptr GValue
gv (P.Just WebHitTestResult
obj) = WebHitTestResult -> (Ptr WebHitTestResult -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr WebHitTestResult
obj (Ptr GValue -> Ptr WebHitTestResult -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe WebHitTestResult)
gvalueGet_ Ptr GValue
gv = do
Ptr WebHitTestResult
ptr <- Ptr GValue -> IO (Ptr WebHitTestResult)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr WebHitTestResult)
if Ptr WebHitTestResult
ptr Ptr WebHitTestResult -> Ptr WebHitTestResult -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr WebHitTestResult
forall a. Ptr a
FP.nullPtr
then WebHitTestResult -> Maybe WebHitTestResult
forall a. a -> Maybe a
P.Just (WebHitTestResult -> Maybe WebHitTestResult)
-> IO WebHitTestResult -> IO (Maybe WebHitTestResult)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr WebHitTestResult -> WebHitTestResult)
-> Ptr WebHitTestResult -> IO WebHitTestResult
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr WebHitTestResult -> WebHitTestResult
WebHitTestResult Ptr WebHitTestResult
ptr
else Maybe WebHitTestResult -> IO (Maybe WebHitTestResult)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe WebHitTestResult
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveWebHitTestResultMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveWebHitTestResultMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveWebHitTestResultMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveWebHitTestResultMethod "contextIsEditable" o = WebKit2WebExtension.HitTestResult.HitTestResultContextIsEditableMethodInfo
ResolveWebHitTestResultMethod "contextIsImage" o = WebKit2WebExtension.HitTestResult.HitTestResultContextIsImageMethodInfo
ResolveWebHitTestResultMethod "contextIsLink" o = WebKit2WebExtension.HitTestResult.HitTestResultContextIsLinkMethodInfo
ResolveWebHitTestResultMethod "contextIsMedia" o = WebKit2WebExtension.HitTestResult.HitTestResultContextIsMediaMethodInfo
ResolveWebHitTestResultMethod "contextIsScrollbar" o = WebKit2WebExtension.HitTestResult.HitTestResultContextIsScrollbarMethodInfo
ResolveWebHitTestResultMethod "contextIsSelection" o = WebKit2WebExtension.HitTestResult.HitTestResultContextIsSelectionMethodInfo
ResolveWebHitTestResultMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveWebHitTestResultMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveWebHitTestResultMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveWebHitTestResultMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveWebHitTestResultMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveWebHitTestResultMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveWebHitTestResultMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveWebHitTestResultMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveWebHitTestResultMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveWebHitTestResultMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveWebHitTestResultMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveWebHitTestResultMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveWebHitTestResultMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveWebHitTestResultMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveWebHitTestResultMethod "getContext" o = WebKit2WebExtension.HitTestResult.HitTestResultGetContextMethodInfo
ResolveWebHitTestResultMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveWebHitTestResultMethod "getImageUri" o = WebKit2WebExtension.HitTestResult.HitTestResultGetImageUriMethodInfo
ResolveWebHitTestResultMethod "getJsNode" o = WebHitTestResultGetJsNodeMethodInfo
ResolveWebHitTestResultMethod "getLinkLabel" o = WebKit2WebExtension.HitTestResult.HitTestResultGetLinkLabelMethodInfo
ResolveWebHitTestResultMethod "getLinkTitle" o = WebKit2WebExtension.HitTestResult.HitTestResultGetLinkTitleMethodInfo
ResolveWebHitTestResultMethod "getLinkUri" o = WebKit2WebExtension.HitTestResult.HitTestResultGetLinkUriMethodInfo
ResolveWebHitTestResultMethod "getMediaUri" o = WebKit2WebExtension.HitTestResult.HitTestResultGetMediaUriMethodInfo
ResolveWebHitTestResultMethod "getNode" o = WebHitTestResultGetNodeMethodInfo
ResolveWebHitTestResultMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveWebHitTestResultMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveWebHitTestResultMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveWebHitTestResultMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveWebHitTestResultMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveWebHitTestResultMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveWebHitTestResultMethod t WebHitTestResult, O.OverloadedMethod info WebHitTestResult p) => OL.IsLabel t (WebHitTestResult -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveWebHitTestResultMethod t WebHitTestResult, O.OverloadedMethod info WebHitTestResult p, R.HasField t WebHitTestResult p) => R.HasField t WebHitTestResult p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveWebHitTestResultMethod t WebHitTestResult, O.OverloadedMethodInfo info WebHitTestResult) => OL.IsLabel t (O.MethodProxy info WebHitTestResult) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getWebHitTestResultNode :: (MonadIO m, IsWebHitTestResult o) => o -> m WebKit2WebExtension.DOMNode.DOMNode
getWebHitTestResultNode :: forall (m :: * -> *) o.
(MonadIO m, IsWebHitTestResult o) =>
o -> m DOMNode
getWebHitTestResultNode o
obj = IO DOMNode -> m DOMNode
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DOMNode -> m DOMNode) -> IO DOMNode -> m DOMNode
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe DOMNode) -> IO DOMNode
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getWebHitTestResultNode" (IO (Maybe DOMNode) -> IO DOMNode)
-> IO (Maybe DOMNode) -> IO DOMNode
forall a b. (a -> b) -> a -> b
$ o
-> String -> (ManagedPtr DOMNode -> DOMNode) -> IO (Maybe DOMNode)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"node" ManagedPtr DOMNode -> DOMNode
WebKit2WebExtension.DOMNode.DOMNode
constructWebHitTestResultNode :: (IsWebHitTestResult o, MIO.MonadIO m, WebKit2WebExtension.DOMNode.IsDOMNode a) => a -> m (GValueConstruct o)
constructWebHitTestResultNode :: forall o (m :: * -> *) a.
(IsWebHitTestResult o, MonadIO m, IsDOMNode a) =>
a -> m (GValueConstruct o)
constructWebHitTestResultNode a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"node" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data WebHitTestResultNodePropertyInfo
instance AttrInfo WebHitTestResultNodePropertyInfo where
type AttrAllowedOps WebHitTestResultNodePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint WebHitTestResultNodePropertyInfo = IsWebHitTestResult
type AttrSetTypeConstraint WebHitTestResultNodePropertyInfo = WebKit2WebExtension.DOMNode.IsDOMNode
type AttrTransferTypeConstraint WebHitTestResultNodePropertyInfo = WebKit2WebExtension.DOMNode.IsDOMNode
type AttrTransferType WebHitTestResultNodePropertyInfo = WebKit2WebExtension.DOMNode.DOMNode
type AttrGetType WebHitTestResultNodePropertyInfo = WebKit2WebExtension.DOMNode.DOMNode
type AttrLabel WebHitTestResultNodePropertyInfo = "node"
type AttrOrigin WebHitTestResultNodePropertyInfo = WebHitTestResult
attrGet = getWebHitTestResultNode
attrSet = undefined
attrTransfer _ v = do
unsafeCastTo WebKit2WebExtension.DOMNode.DOMNode v
attrConstruct = constructWebHitTestResultNode
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.WebHitTestResult.node"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.31/docs/GI-WebKit2WebExtension-Objects-WebHitTestResult.html#g:attr:node"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList WebHitTestResult
type instance O.AttributeList WebHitTestResult = WebHitTestResultAttributeList
type WebHitTestResultAttributeList = ('[ '("context", WebKit2WebExtension.HitTestResult.HitTestResultContextPropertyInfo), '("imageUri", WebKit2WebExtension.HitTestResult.HitTestResultImageUriPropertyInfo), '("linkLabel", WebKit2WebExtension.HitTestResult.HitTestResultLinkLabelPropertyInfo), '("linkTitle", WebKit2WebExtension.HitTestResult.HitTestResultLinkTitlePropertyInfo), '("linkUri", WebKit2WebExtension.HitTestResult.HitTestResultLinkUriPropertyInfo), '("mediaUri", WebKit2WebExtension.HitTestResult.HitTestResultMediaUriPropertyInfo), '("node", WebHitTestResultNodePropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
webHitTestResultNode :: AttrLabelProxy "node"
webHitTestResultNode = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList WebHitTestResult = WebHitTestResultSignalList
type WebHitTestResultSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "webkit_web_hit_test_result_get_js_node" webkit_web_hit_test_result_get_js_node ::
Ptr WebHitTestResult ->
Ptr WebKit2WebExtension.ScriptWorld.ScriptWorld ->
IO (Ptr JavaScriptCore.Value.Value)
webHitTestResultGetJsNode ::
(B.CallStack.HasCallStack, MonadIO m, IsWebHitTestResult a, WebKit2WebExtension.ScriptWorld.IsScriptWorld b) =>
a
-> Maybe (b)
-> m (Maybe JavaScriptCore.Value.Value)
webHitTestResultGetJsNode :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWebHitTestResult a, IsScriptWorld b) =>
a -> Maybe b -> m (Maybe Value)
webHitTestResultGetJsNode a
webHitTestResult Maybe b
world = IO (Maybe Value) -> m (Maybe Value)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Value) -> m (Maybe Value))
-> IO (Maybe Value) -> m (Maybe Value)
forall a b. (a -> b) -> a -> b
$ do
Ptr WebHitTestResult
webHitTestResult' <- a -> IO (Ptr WebHitTestResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
webHitTestResult
Ptr ScriptWorld
maybeWorld <- case Maybe b
world of
Maybe b
Nothing -> Ptr ScriptWorld -> IO (Ptr ScriptWorld)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ScriptWorld
forall a. Ptr a
nullPtr
Just b
jWorld -> do
Ptr ScriptWorld
jWorld' <- b -> IO (Ptr ScriptWorld)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jWorld
Ptr ScriptWorld -> IO (Ptr ScriptWorld)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ScriptWorld
jWorld'
Ptr Value
result <- Ptr WebHitTestResult -> Ptr ScriptWorld -> IO (Ptr Value)
webkit_web_hit_test_result_get_js_node Ptr WebHitTestResult
webHitTestResult' Ptr ScriptWorld
maybeWorld
Maybe Value
maybeResult <- Ptr Value -> (Ptr Value -> IO Value) -> IO (Maybe Value)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Value
result ((Ptr Value -> IO Value) -> IO (Maybe Value))
-> (Ptr Value -> IO Value) -> IO (Maybe Value)
forall a b. (a -> b) -> a -> b
$ \Ptr Value
result' -> do
Value
result'' <- ((ManagedPtr Value -> Value) -> Ptr Value -> IO Value
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Value -> Value
JavaScriptCore.Value.Value) Ptr Value
result'
Value -> IO Value
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Value
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
webHitTestResult
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
world b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe Value -> IO (Maybe Value)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Value
maybeResult
#if defined(ENABLE_OVERLOADING)
data WebHitTestResultGetJsNodeMethodInfo
instance (signature ~ (Maybe (b) -> m (Maybe JavaScriptCore.Value.Value)), MonadIO m, IsWebHitTestResult a, WebKit2WebExtension.ScriptWorld.IsScriptWorld b) => O.OverloadedMethod WebHitTestResultGetJsNodeMethodInfo a signature where
overloadedMethod = webHitTestResultGetJsNode
instance O.OverloadedMethodInfo WebHitTestResultGetJsNodeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.WebHitTestResult.webHitTestResultGetJsNode",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.31/docs/GI-WebKit2WebExtension-Objects-WebHitTestResult.html#v:webHitTestResultGetJsNode"
})
#endif
foreign import ccall "webkit_web_hit_test_result_get_node" webkit_web_hit_test_result_get_node ::
Ptr WebHitTestResult ->
IO (Ptr WebKit2WebExtension.DOMNode.DOMNode)
{-# DEPRECATED webHitTestResultGetNode ["(Since version 2.40)","Use 'GI.WebKit2WebExtension.Objects.WebHitTestResult.webHitTestResultGetJsNode' instead"] #-}
webHitTestResultGetNode ::
(B.CallStack.HasCallStack, MonadIO m, IsWebHitTestResult a) =>
a
-> m WebKit2WebExtension.DOMNode.DOMNode
webHitTestResultGetNode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWebHitTestResult a) =>
a -> m DOMNode
webHitTestResultGetNode a
hitTestResult = IO DOMNode -> m DOMNode
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DOMNode -> m DOMNode) -> IO DOMNode -> m DOMNode
forall a b. (a -> b) -> a -> b
$ do
Ptr WebHitTestResult
hitTestResult' <- a -> IO (Ptr WebHitTestResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
hitTestResult
Ptr DOMNode
result <- Ptr WebHitTestResult -> IO (Ptr DOMNode)
webkit_web_hit_test_result_get_node Ptr WebHitTestResult
hitTestResult'
Text -> Ptr DOMNode -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"webHitTestResultGetNode" Ptr DOMNode
result
DOMNode
result' <- ((ManagedPtr DOMNode -> DOMNode) -> Ptr DOMNode -> IO DOMNode
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DOMNode -> DOMNode
WebKit2WebExtension.DOMNode.DOMNode) Ptr DOMNode
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
hitTestResult
DOMNode -> IO DOMNode
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DOMNode
result'
#if defined(ENABLE_OVERLOADING)
data WebHitTestResultGetNodeMethodInfo
instance (signature ~ (m WebKit2WebExtension.DOMNode.DOMNode), MonadIO m, IsWebHitTestResult a) => O.OverloadedMethod WebHitTestResultGetNodeMethodInfo a signature where
overloadedMethod = webHitTestResultGetNode
instance O.OverloadedMethodInfo WebHitTestResultGetNodeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.WebKit2WebExtension.Objects.WebHitTestResult.webHitTestResultGetNode",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-webkit2webextension-4.0.31/docs/GI-WebKit2WebExtension-Objects-WebHitTestResult.html#v:webHitTestResultGetNode"
})
#endif