module GI.WebKit.Objects.DOMProcessingInstruction
(
DOMProcessingInstruction(..) ,
DOMProcessingInstructionK ,
toDOMProcessingInstruction ,
noDOMProcessingInstruction ,
dOMProcessingInstructionGetData ,
dOMProcessingInstructionGetSheet ,
dOMProcessingInstructionGetTarget ,
dOMProcessingInstructionSetData ,
DOMProcessingInstructionSheetPropertyInfo,
getDOMProcessingInstructionSheet ,
DOMProcessingInstructionTargetPropertyInfo,
getDOMProcessingInstructionTarget ,
) 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 DOMProcessingInstruction = DOMProcessingInstruction (ForeignPtr DOMProcessingInstruction)
foreign import ccall "webkit_dom_processing_instruction_get_type"
c_webkit_dom_processing_instruction_get_type :: IO GType
type instance ParentTypes DOMProcessingInstruction = DOMProcessingInstructionParentTypes
type DOMProcessingInstructionParentTypes = '[DOMCharacterData, DOMNode, DOMObject, GObject.Object, DOMEventTarget]
instance GObject DOMProcessingInstruction where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_webkit_dom_processing_instruction_get_type
class GObject o => DOMProcessingInstructionK o
instance (GObject o, IsDescendantOf DOMProcessingInstruction o) => DOMProcessingInstructionK o
toDOMProcessingInstruction :: DOMProcessingInstructionK o => o -> IO DOMProcessingInstruction
toDOMProcessingInstruction = unsafeCastTo DOMProcessingInstruction
noDOMProcessingInstruction :: Maybe DOMProcessingInstruction
noDOMProcessingInstruction = Nothing
getDOMProcessingInstructionSheet :: (MonadIO m, DOMProcessingInstructionK o) => o -> m DOMStyleSheet
getDOMProcessingInstructionSheet obj = liftIO $ getObjectPropertyObject obj "sheet" DOMStyleSheet
data DOMProcessingInstructionSheetPropertyInfo
instance AttrInfo DOMProcessingInstructionSheetPropertyInfo where
type AttrAllowedOps DOMProcessingInstructionSheetPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMProcessingInstructionSheetPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMProcessingInstructionSheetPropertyInfo = DOMProcessingInstructionK
type AttrGetType DOMProcessingInstructionSheetPropertyInfo = DOMStyleSheet
type AttrLabel DOMProcessingInstructionSheetPropertyInfo = "DOMProcessingInstruction::sheet"
attrGet _ = getDOMProcessingInstructionSheet
attrSet _ = undefined
attrConstruct _ = undefined
getDOMProcessingInstructionTarget :: (MonadIO m, DOMProcessingInstructionK o) => o -> m T.Text
getDOMProcessingInstructionTarget obj = liftIO $ getObjectPropertyString obj "target"
data DOMProcessingInstructionTargetPropertyInfo
instance AttrInfo DOMProcessingInstructionTargetPropertyInfo where
type AttrAllowedOps DOMProcessingInstructionTargetPropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint DOMProcessingInstructionTargetPropertyInfo = (~) ()
type AttrBaseTypeConstraint DOMProcessingInstructionTargetPropertyInfo = DOMProcessingInstructionK
type AttrGetType DOMProcessingInstructionTargetPropertyInfo = T.Text
type AttrLabel DOMProcessingInstructionTargetPropertyInfo = "DOMProcessingInstruction::target"
attrGet _ = getDOMProcessingInstructionTarget
attrSet _ = undefined
attrConstruct _ = undefined
type instance AttributeList DOMProcessingInstruction = DOMProcessingInstructionAttributeList
type DOMProcessingInstructionAttributeList = ('[ '("base-uri", DOMNodeBaseUriPropertyInfo), '("child-nodes", DOMNodeChildNodesPropertyInfo), '("core-object", DOMObjectCoreObjectPropertyInfo), '("data", DOMCharacterDataDataPropertyInfo), '("first-child", DOMNodeFirstChildPropertyInfo), '("last-child", DOMNodeLastChildPropertyInfo), '("length", DOMCharacterDataLengthPropertyInfo), '("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), '("sheet", DOMProcessingInstructionSheetPropertyInfo), '("target", DOMProcessingInstructionTargetPropertyInfo), '("text-content", DOMNodeTextContentPropertyInfo)] :: [(Symbol, *)])
type instance SignalList DOMProcessingInstruction = DOMProcessingInstructionSignalList
type DOMProcessingInstructionSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "webkit_dom_processing_instruction_get_data" webkit_dom_processing_instruction_get_data ::
Ptr DOMProcessingInstruction ->
IO CString
dOMProcessingInstructionGetData ::
(MonadIO m, DOMProcessingInstructionK a) =>
a ->
m T.Text
dOMProcessingInstructionGetData _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_processing_instruction_get_data _obj'
checkUnexpectedReturnNULL "webkit_dom_processing_instruction_get_data" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_processing_instruction_get_sheet" webkit_dom_processing_instruction_get_sheet ::
Ptr DOMProcessingInstruction ->
IO (Ptr DOMStyleSheet)
dOMProcessingInstructionGetSheet ::
(MonadIO m, DOMProcessingInstructionK a) =>
a ->
m DOMStyleSheet
dOMProcessingInstructionGetSheet _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_processing_instruction_get_sheet _obj'
checkUnexpectedReturnNULL "webkit_dom_processing_instruction_get_sheet" result
result' <- (wrapObject DOMStyleSheet) result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_processing_instruction_get_target" webkit_dom_processing_instruction_get_target ::
Ptr DOMProcessingInstruction ->
IO CString
dOMProcessingInstructionGetTarget ::
(MonadIO m, DOMProcessingInstructionK a) =>
a ->
m T.Text
dOMProcessingInstructionGetTarget _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- webkit_dom_processing_instruction_get_target _obj'
checkUnexpectedReturnNULL "webkit_dom_processing_instruction_get_target" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'
foreign import ccall "webkit_dom_processing_instruction_set_data" webkit_dom_processing_instruction_set_data ::
Ptr DOMProcessingInstruction ->
CString ->
Ptr (Ptr GError) ->
IO ()
dOMProcessingInstructionSetData ::
(MonadIO m, DOMProcessingInstructionK a) =>
a ->
T.Text ->
m ()
dOMProcessingInstructionSetData _obj value = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
value' <- textToCString value
onException (do
propagateGError $ webkit_dom_processing_instruction_set_data _obj' value'
touchManagedPtr _obj
freeMem value'
return ()
) (do
freeMem value'
)