module GI.WebKit.Objects.DOMDocumentFragment
(
DOMDocumentFragment(..) ,
DOMDocumentFragmentK ,
toDOMDocumentFragment ,
noDOMDocumentFragment ,
dOMDocumentFragmentQuerySelector ,
dOMDocumentFragmentQuerySelectorAll ,
) 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 DOMDocumentFragment = DOMDocumentFragment (ForeignPtr DOMDocumentFragment)
foreign import ccall "webkit_dom_document_fragment_get_type"
c_webkit_dom_document_fragment_get_type :: IO GType
type instance ParentTypes DOMDocumentFragment = DOMDocumentFragmentParentTypes
type DOMDocumentFragmentParentTypes = '[DOMNode, DOMObject, GObject.Object, DOMEventTarget]
instance GObject DOMDocumentFragment where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_webkit_dom_document_fragment_get_type
class GObject o => DOMDocumentFragmentK o
instance (GObject o, IsDescendantOf DOMDocumentFragment o) => DOMDocumentFragmentK o
toDOMDocumentFragment :: DOMDocumentFragmentK o => o -> IO DOMDocumentFragment
toDOMDocumentFragment = unsafeCastTo DOMDocumentFragment
noDOMDocumentFragment :: Maybe DOMDocumentFragment
noDOMDocumentFragment = Nothing
type instance AttributeList DOMDocumentFragment = DOMDocumentFragmentAttributeList
type DOMDocumentFragmentAttributeList = ('[ '("base-uri", DOMNodeBaseUriPropertyInfo), '("child-nodes", DOMNodeChildNodesPropertyInfo), '("core-object", DOMObjectCoreObjectPropertyInfo), '("first-child", DOMNodeFirstChildPropertyInfo), '("last-child", DOMNodeLastChildPropertyInfo), '("local-name", DOMNodeLocalNamePropertyInfo), '("namespace-uri", DOMNodeNamespaceUriPropertyInfo), '("next-sibling", DOMNodeNextSiblingPropertyInfo), '("node-name", DOMNodeNodeNamePropertyInfo), '("node-type", DOMNodeNodeTypePropertyInfo), '("node-value", DOMNodeNodeValuePropertyInfo), '("owner-document", DOMNodeOwnerDocumentPropertyInfo), '("parent-element", DOMNodeParentElementPropertyInfo), '("parent-node", DOMNodeParentNodePropertyInfo), '("prefix", DOMNodePrefixPropertyInfo), '("previous-sibling", DOMNodePreviousSiblingPropertyInfo), '("text-content", DOMNodeTextContentPropertyInfo)] :: [(Symbol, *)])
type instance SignalList DOMDocumentFragment = DOMDocumentFragmentSignalList
type DOMDocumentFragmentSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "webkit_dom_document_fragment_query_selector" webkit_dom_document_fragment_query_selector ::
Ptr DOMDocumentFragment ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr DOMElement)
dOMDocumentFragmentQuerySelector ::
(MonadIO m, DOMDocumentFragmentK a) =>
a ->
T.Text ->
m DOMElement
dOMDocumentFragmentQuerySelector _obj selectors = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
selectors' <- textToCString selectors
onException (do
result <- propagateGError $ webkit_dom_document_fragment_query_selector _obj' selectors'
checkUnexpectedReturnNULL "webkit_dom_document_fragment_query_selector" result
result' <- (newObject DOMElement) result
touchManagedPtr _obj
freeMem selectors'
return result'
) (do
freeMem selectors'
)
foreign import ccall "webkit_dom_document_fragment_query_selector_all" webkit_dom_document_fragment_query_selector_all ::
Ptr DOMDocumentFragment ->
CString ->
Ptr (Ptr GError) ->
IO (Ptr DOMNodeList)
dOMDocumentFragmentQuerySelectorAll ::
(MonadIO m, DOMDocumentFragmentK a) =>
a ->
T.Text ->
m DOMNodeList
dOMDocumentFragmentQuerySelectorAll _obj selectors = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
selectors' <- textToCString selectors
onException (do
result <- propagateGError $ webkit_dom_document_fragment_query_selector_all _obj' selectors'
checkUnexpectedReturnNULL "webkit_dom_document_fragment_query_selector_all" result
result' <- (wrapObject DOMNodeList) result
touchManagedPtr _obj
freeMem selectors'
return result'
) (do
freeMem selectors'
)