gi-webkit2webextension-0.2.10.12: GI/WebKit2WebExtension/Objects/DOMProcessingInstruction.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.WebKit2WebExtension.Objects.DOMProcessingInstruction
(
-- * Exported types
DOMProcessingInstruction(..) ,
DOMProcessingInstructionK ,
toDOMProcessingInstruction ,
noDOMProcessingInstruction ,
-- * Methods
-- ** dOMProcessingInstructionGetSheet
dOMProcessingInstructionGetSheet ,
-- ** dOMProcessingInstructionGetTarget
dOMProcessingInstructionGetTarget ,
-- * Properties
-- ** Sheet
DOMProcessingInstructionSheetPropertyInfo,
getDOMProcessingInstructionSheet ,
-- ** Target
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.WebKit2WebExtension.Types
import GI.WebKit2WebExtension.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
-- VVV Prop "sheet"
-- Type: TInterface "WebKit2WebExtension" "DOMStyleSheet"
-- Flags: [PropertyReadable]
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
-- VVV Prop "target"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable]
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-element-sibling", DOMCharacterDataNextElementSiblingPropertyInfo), '("next-sibling", DOMNodeNextSiblingPropertyInfo), '("node-name", DOMNodeNodeNamePropertyInfo), '("node-type", DOMNodeNodeTypePropertyInfo), '("node-value", DOMNodeNodeValuePropertyInfo), '("owner-document", DOMNodeOwnerDocumentPropertyInfo), '("parent-element", DOMNodeParentElementPropertyInfo), '("parent-node", DOMNodeParentNodePropertyInfo), '("prefix", DOMNodePrefixPropertyInfo), '("previous-element-sibling", DOMCharacterDataPreviousElementSiblingPropertyInfo), '("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, *)])
-- method DOMProcessingInstruction::get_sheet
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMProcessingInstruction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMProcessingInstruction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "WebKit2WebExtension" "DOMStyleSheet"
-- throws : False
-- Skip return : False
foreign import ccall "webkit_dom_processing_instruction_get_sheet" webkit_dom_processing_instruction_get_sheet ::
Ptr DOMProcessingInstruction -> -- _obj : TInterface "WebKit2WebExtension" "DOMProcessingInstruction"
IO (Ptr DOMStyleSheet)
dOMProcessingInstructionGetSheet ::
(MonadIO m, DOMProcessingInstructionK a) =>
a -> -- _obj
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'
-- method DOMProcessingInstruction::get_target
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMProcessingInstruction", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "WebKit2WebExtension" "DOMProcessingInstruction", 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_processing_instruction_get_target" webkit_dom_processing_instruction_get_target ::
Ptr DOMProcessingInstruction -> -- _obj : TInterface "WebKit2WebExtension" "DOMProcessingInstruction"
IO CString
dOMProcessingInstructionGetTarget ::
(MonadIO m, DOMProcessingInstructionK a) =>
a -> -- _obj
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'