gi-webkit-0.2.4.12: GI/WebKit/Objects/DOMXPathNSResolver.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}
module GI.WebKit.Objects.DOMXPathNSResolver
(
-- * Exported types
DOMXPathNSResolver(..) ,
DOMXPathNSResolverK ,
toDOMXPathNSResolver ,
noDOMXPathNSResolver ,
-- * Methods
-- ** dOMXPathNSResolverLookupNamespaceUri
dOMXPathNSResolverLookupNamespaceUri ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.WebKit.Types
import GI.WebKit.Callbacks
import qualified GI.GObject as GObject
newtype DOMXPathNSResolver = DOMXPathNSResolver (ForeignPtr DOMXPathNSResolver)
foreign import ccall "webkit_dom_xpath_ns_resolver_get_type"
c_webkit_dom_xpath_ns_resolver_get_type :: IO GType
type instance ParentTypes DOMXPathNSResolver = DOMXPathNSResolverParentTypes
type DOMXPathNSResolverParentTypes = '[DOMObject, GObject.Object]
instance GObject DOMXPathNSResolver where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_webkit_dom_xpath_ns_resolver_get_type
class GObject o => DOMXPathNSResolverK o
instance (GObject o, IsDescendantOf DOMXPathNSResolver o) => DOMXPathNSResolverK o
toDOMXPathNSResolver :: DOMXPathNSResolverK o => o -> IO DOMXPathNSResolver
toDOMXPathNSResolver = unsafeCastTo DOMXPathNSResolver
noDOMXPathNSResolver :: Maybe DOMXPathNSResolver
noDOMXPathNSResolver = Nothing
type instance AttributeList DOMXPathNSResolver = DOMXPathNSResolverAttributeList
type DOMXPathNSResolverAttributeList = ('[ '("core-object", DOMObjectCoreObjectPropertyInfo)] :: [(Symbol, *)])
type instance SignalList DOMXPathNSResolver = DOMXPathNSResolverSignalList
type DOMXPathNSResolverSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
-- method DOMXPathNSResolver::lookup_namespace_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMXPathNSResolver", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "prefix", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit" "DOMXPathNSResolver", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "prefix", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "webkit_dom_xpath_ns_resolver_lookup_namespace_uri" webkit_dom_xpath_ns_resolver_lookup_namespace_uri ::
Ptr DOMXPathNSResolver -> -- _obj : TInterface "WebKit" "DOMXPathNSResolver"
CString -> -- prefix : TBasicType TUTF8
IO CString
dOMXPathNSResolverLookupNamespaceUri ::
(MonadIO m, DOMXPathNSResolverK a) =>
a -> -- _obj
T.Text -> -- prefix
m T.Text
dOMXPathNSResolverLookupNamespaceUri _obj prefix = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
prefix' <- textToCString prefix
result <- webkit_dom_xpath_ns_resolver_lookup_namespace_uri _obj' prefix'
checkUnexpectedReturnNULL "webkit_dom_xpath_ns_resolver_lookup_namespace_uri" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
freeMem prefix'
return result'